diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/xwidget.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/xwidget.c b/src/xwidget.c index dbd8fc18ad7..8105b3d825d 100644 --- a/src/xwidget.c +++ b/src/xwidget.c | |||
| @@ -681,6 +681,25 @@ DEFUN ("xwidget-webkit-goto-uri", | |||
| 681 | return Qnil; | 681 | return Qnil; |
| 682 | } | 682 | } |
| 683 | 683 | ||
| 684 | DEFUN ("xwidget-webkit-zoom", | ||
| 685 | Fxwidget_webkit_zoom, Sxwidget_webkit_zoom, | ||
| 686 | 2, 2, 0, | ||
| 687 | doc: /* Change the zoom factor of the xwidget webkit instance | ||
| 688 | referenced by XWIDGET. */) | ||
| 689 | (Lisp_Object xwidget, Lisp_Object factor) | ||
| 690 | { | ||
| 691 | WEBKIT_FN_INIT (); | ||
| 692 | if (FLOATP (factor)) | ||
| 693 | { | ||
| 694 | double zoom_change = XFLOAT_DATA (factor); | ||
| 695 | webkit_web_view_set_zoom_level | ||
| 696 | (WEBKIT_WEB_VIEW (xw->widget_osr), | ||
| 697 | webkit_web_view_get_zoom_level | ||
| 698 | (WEBKIT_WEB_VIEW (xw->widget_osr)) + zoom_change); | ||
| 699 | } | ||
| 700 | return Qnil; | ||
| 701 | } | ||
| 702 | |||
| 684 | 703 | ||
| 685 | DEFUN ("xwidget-webkit-execute-script", | 704 | DEFUN ("xwidget-webkit-execute-script", |
| 686 | Fxwidget_webkit_execute_script, Sxwidget_webkit_execute_script, | 705 | Fxwidget_webkit_execute_script, Sxwidget_webkit_execute_script, |
| @@ -953,6 +972,7 @@ syms_of_xwidget (void) | |||
| 953 | defsubr (&Sset_xwidget_query_on_exit_flag); | 972 | defsubr (&Sset_xwidget_query_on_exit_flag); |
| 954 | 973 | ||
| 955 | defsubr (&Sxwidget_webkit_goto_uri); | 974 | defsubr (&Sxwidget_webkit_goto_uri); |
| 975 | defsubr (&Sxwidget_webkit_zoom); | ||
| 956 | defsubr (&Sxwidget_webkit_execute_script); | 976 | defsubr (&Sxwidget_webkit_execute_script); |
| 957 | DEFSYM (Qwebkit, "webkit"); | 977 | DEFSYM (Qwebkit, "webkit"); |
| 958 | 978 | ||