From 871c102bbc93b4a1a528d16b8e41d1b0075dd7d7 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 8 Jun 2009 01:10:33 +0300 Subject: Added support for full content zoom (AKA full page zoom) --- uzbl.c | 9 +++++++++ uzbl.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/uzbl.c b/uzbl.c index 7b810dc..6c74959 100644 --- a/uzbl.c +++ b/uzbl.c @@ -486,6 +486,14 @@ cmd_set_status() { update_title(); } +static void +toggle_zoom_type (WebKitWebView* page, GArray *argv) { + (void)page; + (void)argv; + + webkit_web_view_set_full_content_zoom (page, !webkit_web_view_get_full_content_zoom (page)); +} + static void toggle_status_cb (WebKitWebView* page, GArray *argv) { (void)page; @@ -614,6 +622,7 @@ static struct {char *name; Command command[2];} cmdlist[] = { "stop", {view_stop_loading, 0}, }, { "zoom_in", {view_zoom_in, 0}, }, //Can crash (when max zoom reached?). { "zoom_out", {view_zoom_out, 0}, }, + { "toggle_zoom_type", {toggle_zoom_type, 0}, }, { "uri", {load_uri, NOSPLIT} }, { "js", {run_js, NOSPLIT} }, { "script", {run_external_js, 0} }, diff --git a/uzbl.h b/uzbl.h index 2e7ccf9..67fbbb5 100644 --- a/uzbl.h +++ b/uzbl.h @@ -259,6 +259,9 @@ create_web_view_cb (WebKitWebView *web_view, WebKitWebFrame *frame, gpointer us static gboolean download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data); +static void +toggle_zoom_type (WebKitWebView* page, GArray *argv); + static void toggle_status_cb (WebKitWebView* page, GArray *argv); -- cgit v1.2.3