diff options
Diffstat (limited to 'src/commands.c')
-rw-r--r-- | src/commands.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/commands.c b/src/commands.c index 7b327e6..7689ea1 100644 --- a/src/commands.c +++ b/src/commands.c @@ -92,11 +92,23 @@ VIEWFUNC(reload_bypass_cache) VIEWFUNC(stop_loading) VIEWFUNC(zoom_in) VIEWFUNC(zoom_out) -VIEWFUNC(go_back) -VIEWFUNC(go_forward) #undef VIEWFUNC void +view_go_back(WebKitWebView *page, GArray *argv, GString *result) { + (void)result; + int n = argv_idx(argv, 0) ? atoi(argv_idx(argv, 0)) : 1; + webkit_web_view_go_back_or_forward(page, -n); +} + +void +view_go_forward(WebKitWebView *page, GArray *argv, GString *result) { + (void)result; + int n = argv_idx(argv, 0) ? atoi(argv_idx(argv, 0)) : 1; + webkit_web_view_go_back_or_forward(page, n); +} + +void toggle_zoom_type (WebKitWebView* page, GArray *argv, GString *result) { (void)argv; (void)result; webkit_web_view_set_full_content_zoom (page, !webkit_web_view_get_full_content_zoom (page)); |