aboutsummaryrefslogtreecommitdiffstats
path: root/src/xwidget.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Verify xwidget USE_LSB_TAG assumptionPaul Eggert2017-02-201-0/+2
| | | | | * src/xwidget.c (Fxwidget_webkit_execute_script): Add verification. Problem reported by Andreas Schwab (Bug#25816#8).
* Port xwidget to -DCHECK_LISP_OBJECT_TYPEPaul Eggert2017-02-201-5/+12
| | | | | | | * src/xwidget.c (webkit_javascript_finished_cb) (Fxwidget_webkit_execute_script): Don't assume Lisp_Object is an integer. This fix is just a hack; I’ll file a bug report about the underlying problem.
* Fix a few integer-overflow glitchesPaul Eggert2017-02-101-6/+6
| | | | | | | | | | * src/composite.c (composition_compute_stop_pos, composition_reseat_it): * src/dispextern.h (struct composition_it.rule_idx): * src/keyboard.c (Fset__this_command_keys): * src/xwidget.c (webkit_js_to_lisp): Don’t assume object sizes fit in ‘int’. * src/xwidget.c (Fxwidget_resize): Don’t assume Emacs integers fit in ‘int’.
* Merge from origin/emacs-25Paul Eggert2017-01-011-1/+1
|\ | | | | | | | | 2e2a806 Fix copyright years by hand 5badc81 Update copyright year to 2017
| * Update copyright year to 2017Paul Eggert2016-12-311-1/+1
| | | | | | | | Run admin/update-copyright.
* | Simplify FUNCTIONP implementationPaul Eggert2016-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | * src/bytecode.c (exec_byte_code): * src/image.c (parse_image_spec): Prefer FUNCTIONP (x) to !NILP (Ffunctionp (x)). * src/eval.c (FUNCTIONP): Move here ... * src/lisp.h: ... from here. No longer inline, as that bloats the text and does not help speed (at least on my platform). (functionp): Remove this name, since callers use FUNCTIONP.
* | Prefer comments /* like this */ in C codePaul Eggert2016-11-051-7/+7
| |
* | ; Spelling fixPaul Eggert2016-10-271-1/+1
| |
* | * src/xwidget.c (webkit_js_to_lisp): Now static.Paul Eggert2016-10-251-1/+1
| |
* | Implement zoom for WebKit widget.Ricardo Wurmus2016-10-251-0/+20
| | | | | | | | | | | | | | * src/xwidget.c (xwidget-webkit-zoom): New procedure. * lisp/xwidget.el: Bind "+" and "-" to zoom in and out, respectively. (xwidget-webkit-zoom): Declare procedure. (xwidget-webkit-zoom-in, xwidget-webkit-zoom-out): New procedures.
* | xwidget: Remove title hack.Ricardo Wurmus2016-10-251-22/+0
| | | | | | | | | | | | * src/xwidget.c (xwidget-webkit-get-title): Remove procedure. * lisp/xwidget.el (xwidget-webkit-get-title, xwidget-webkit-execute-script-rv): Remove procedures.
* | Remove scrolled window container around WebKit widgetRicardo Wurmus2016-10-251-60/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The WebKit widget can scroll on its own and does not need to wrapped with a scrolled window container. * src/xwidget.h: Remove struct member widgetscrolledwindow_osr. * src/xwidget.c: Remove widgetscrolledwindow_osr. (xwidget-set-adjustment): Remove. (xwidget-resize): Resize Webkit widget last. * lisp/xwidget.el (xwidget-set-adjustment): Remove. (xwidget-webkit-scroll-up, xwidget-webkit-scroll-down, xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward): Implement scrolling via JavaScript.
* | xwidget: Pass JavaScript return value to optional callback procedureRicardo Wurmus2016-10-251-7/+158
| | | | | | | | | | | | | | | | | | | | | | * lisp/xwidget.el (xwidget-webkit-execute-script): Accept optional callback argument. (xwidget-webkit-callback): Handle "javascript-callback" event type. * src/xwidget.c (xwidget-webkit-execute-script): Accept optional argument FUN, a Lisp procedure to execute on the JavaScript return value. (store_xwidget_js_callback_event, webkit_javascript_finished_cb, webkit_js_to_lisp): New procedures.
* | xwidget: Use WebKit2 APIRicardo Wurmus2016-10-251-106/+80
| | | | | | | | | | | | | | * configure.ac: Check for webkit2gtk-4.0. * src/xwidget.c: Adjust to use WebKit2 API. * lisp/xwidget.el (xwidget-webkit-callback): Adjust matches for `xwidget-event-type'.
* | Omit unnecessary #includes from xwidget.cPaul Eggert2016-07-131-74/+0
| | | | | | | | | | | | * src/xwidget.c: Remove #include directives that are not needed. Also, don’t conditionalize #includes on HAVE_X_WINDOWS, since this file is compiled only if the X interface is available.
* | Port xwidget.c to GCC 6 with --enable-gcc-warningsPaul Eggert2016-07-131-2/+12
|/ | | | | | * src/xwidget.c (x_draw_xwidget_glyph_string, xwidget_end_redisplay): Adjust to pacify GCC. Add a couple of FIXME comments, suggesting possible bugs found by GCC.
* * src/xwidget.c (x_draw_xwidget_glyph_string): More clipping fixes.YAMAMOTO Mitsuharu2016-04-141-16/+10
|
* Fix clipping of xwidgetsJoakim Verona2016-04-091-18/+16
| | | | | | * src/xwidget.c (x_draw_xwidget_glyph_string): Use window_box instead of calculating the clipping borders manually. Suggested by YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>.
* make-xwidget unused arg cleanupPaul Eggert2016-04-021-7/+7
| | | | | * doc/lispref/display.texi (Xwidgets): Remove stray refs. * src/xwidget.c (syms_of_xwidget): Qwebkit, not Qwebkit_osr.
* Remove unused arguments from make-xwidgetJoakim Verona2016-04-021-10/+6
| | | | | | | | | The arguments BEG and END were unused, and are now removed. * display.texi (Xwidgets): Document the change * xwidget.el (make-xwidget, xwidget-insert) (xwidget-webkit-new-session): Reflect changed arguments * xwidget.c (Fmake_xwidget, syms_of_xwidget): Reflect changed arguments
* * src/xwidget.c (Fxwidget_resize): Fix inappropriate use of XFASTINT.YAMAMOTO Mitsuharu2016-03-271-1/+1
|
* Fix scrolling upwards with 'xwidget-webkit-browse-url'Eli Zaretskii2016-03-251-1/+1
| | | | | | * src/xwidget.c (Fxwidget_set_adjustment): Use CHECK_NUMBER instead of CHECK_NATNUM. Suggested by Shayan Pirani <shayanpirani@gmail.com>. (Bug#22918)
* Rework C source files to avoid ^(Paul Eggert2016-03-101-13/+20
| | | | | | | | Work around Bug#22884 by rewording comments and strings to avoid ‘(’ at the start of a line unless it starts a function. This change is a short-term hack; in the longer run we plan to fix cc-mode’s performance for C files that have ‘(’ at the start of a line in a comment or string.
* Spelling fixPaul Eggert2016-01-301-1/+1
|
* ; Spelling fixes (American spelling)Glenn Morris2016-01-251-1/+1
|
* Spelling fixesPaul Eggert2016-01-251-4/+4
|
* * src/xwidget.c (Fxwidget_set_adjustment): Fix doc string quoting typo.Paul Eggert2016-01-241-1/+1
|
* xwidgets style cleanupPaul Eggert2016-01-221-338/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust the newly-added Xwidgets code so that it uses a more-typical Emacs style. This should not affect behavior, except that in a few places it adds runtime checks that Lisp arguments are of the proper type, and in one place it uses more-precise arithmetic. * src/buffer.c, src/dispnew.c, src/emacs.c, src/emacsgtkfixed.c: * src/emacs.c, src/print.c, src/window.c, src/xdisp.c, src/xterm.c: Include xwidget.h unconditionally. * src/buffer.c (Fkill_buffer): * src/dispnew.c (update_window): * src/emacs.c (main): * src/print.c (print_object): * src/window.c (Fdelete_window_internal): * src/xdisp.c (handle_single_display_spec, push_it, pop_it) (get_next_element, set_iterator_to_next, next_element_from_xwidget) (dump_glyph, calc_pixel_width_or_height, BUILD_GLYPH_STRINGS_XW) (BUILD_GLYPH_STRINGS, x_produce_glyphs, get_window_cursor_type): * src/xterm.c (x_draw_glyph_string, x_draw_bar_cursor): Call xwidget functions and macros without worrying about HAVE_XWIDGETS when the code is a no-op on non-xwidget platforms. * src/dispextern.h (XWIDGET_GLYPH, struct glyph_string.xwidget) (IT_XWIDGET, GET_FROM_XWIDGET, struct it.u.xwidget) (struct it.xwidget): * src/lisp.h (PVEC_XWIDGET, PVEC_XWIDGET_VIEW): Always define. * src/emacsgtkfixed.h: Omit unnecessary comment. * src/keyboard.c: Fix spacing. * src/xdisp.c (BUILD_XWIDGET_GLYPH_STRING, produce_xwidget_glyph): Define to be a no-op if not HAVE_XWIDGETS. * src/xwidget.c: Include xwidget.h first (after config.h) to make sure that it can stand by itself. (Fmake_xwidget, Fxwidget_webkit_execute_script): Fix typo in doc string. (Fmake_xwidget): Check type of args. (Fmake_xwidget, offscreen_damage_event) (webkit_document_load_finished_cb, webkit_download_cb) (webkit_new_window_policy_decision_requested_cb) (webkit_navigation_policy_decision_requested_cb) (xwidget_osr_draw_cb, xwidget_osr_event_forward) (xwidget_osr_event_set_embedder, xwidget_init_view): Omit unnecessary casts. * src/xwidget.c (Fmake_xwidget, xwidget_hidden) (xwidget_show_view, xwidget_hide_view) (x_draw_xwidget_glyph_string, xwidget_start_redisplay, xwidget_touch) (xwidget_touched): * src/xwidget.h (struct xwidget.kill_without_query) (struct xwidget_view.redisplayed, struct xwidget_view.hidden): Use bool for boolean. * src/xwidget.c (store_xwidget_event_string, Fxwidget_size_request): Simplify by using list functions. (WEBKIT_FN_INIT): Omit unnecessary test for nil. (Fxwidget_resize): Check type of integer args before doing any work. Check that they are nonnegative. (Fxwidget_set_adjustment): Check type of integer arg. Avoid redundant call to gtk_scrolled_window_get_vadjustment. Simplify. Use double, not float. (Fxwidget_info, Fxwidget_view_info): Simplify by using CALLN. (valid_xwidget_spec_p): Simplify. (xwidget_spec_value): Omit unused arg FOUND. All callers changed. * src/xwidget.h: Include lisp.h first, so that includers do not need to worry about doing that before including this file. Make this .h file safe to include even on non-HAVE_XWIDGETS configurations, to simplify the includers. (x_draw_xwidget_glyph_string, syms_of_xwidget, valid_xwidget_spec_p) (xwidget_end_redisplay, lookup_xwidget) (xwidget_view_delete_all_in_window, kill_buffer_xwidgets): Now a no-op if !HAVE_XWIDGETS, to simplify callers. (struct glyph_matrix, struct glyph_string, struct xwidget) (struct xwidget_view, struct window): New forward or incomplete decls, so that includers need not assume the corresponding .h files are already included, or that HAVE_XWIDGETS is defined. (struct xwidget_type, xwidget_from_id): Remove; unused.
* Don’t export C symbols not used elsewherePaul Eggert2016-01-201-19/+17
| | | | | | | | | | | | | | | | | | | | | | | These were recently added, mostly as part of xwidget code. * src/emacsgtkfixed.c (emacs_fixed_get_type): Now static. (EMACS_FIXED, EMACS_FIXED_GET_CLASS): Now static functions here, not macros in emacsgtkfixed.h. * src/emacsgtkfixed.h (EMACS_TYPE_FIXED): Remove. All uses replaced by definiens. (EMACS_FIXED, EMACS_FIXED_GET_CLASS): Remove; these are now static functions in emacsgtkfixed.c. (EMACS_FIXED_CLASS, EMACS_IS_FIXED, EMACS_IS_FIXED_CLASS): Remove; unused. (emacs_fixed_get_type): Remove decl; no longer extern. * src/xwidget.c (offscreen_damage_event) (webkit_mime_type_policy_typedecision_requested_cb) (webkit_new_window_policy_decision_requested_cb) (webkit_navigation_policy_decision_requested_cb) (xwidget_spec_value, xwidget_view_lookup) (xwidget_start_redisplay, xwidget_touch): Now static. * src/xwidget.h (xwidget_start_redisplay, xwidget_touch): Remove decls.
* Port to platforms with gtk3 but not webkitgtk3Paul Eggert2016-01-201-2/+0
| | | | | | | | | | | | | | | | I ran into this problem on my Fedora 23 installation; Emacs configured but did not build when --with-xwidgets was specified. * configure.ac (HAVE_WEBKIT, HAVE_GIR): Omit unnecessary initializations. (DOES_XWIDGETS_USE_GIR): New var. If --with-xwidgets is specified, report an error if not doable, to be consistent with the other --with options. Require webkitgtk3 to use Xwidgets, as the Xwidgets code does not work at all without webkitgtk3. Simplify use of EMACS_CHECK_MODULES. Output message about gobject introspection only if xwidgets are used. * etc/NEWS: Users need webkitgtk3, not merely webkit. * src/xwidget.c (syms_of_xwidget): Don’t worry about HAVE_WEBKIT_OSR, since this file is no longer compiled if webkitgtk3 is not available.
* Trivial doc copyedits.Glenn Morris2016-01-191-53/+45
| | | | | | | | * src/xwidget.c (Fmake_xwidget, Fget_buffer_xwidgets) (Fxwidget_webkit_get_title, Fxwidget_resize) (Fxwidget_set_adjustment, Fxwidgetp, Fxwidget_view_p) (Fxwidget_info, Fxwidget_view_lookup) (Fset_xwidget_query_on_exit_flag): Trivial doc copyedits.
* ; Add 2016 to copyright years of new files.Glenn Morris2016-01-191-1/+1
|
* Support for the new Xwidget feature.Joakim Verona2016-01-191-0/+1332
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac: (HAVE_XWIDGETS, WIDGET_OBJ, EMACS_CONFIG_FEATURES): * xterm.c (x_draw_glyph_string, x_draw_bar_cursor): * xdisp.c: (handle_display_spec, handle_single_display_spec, push_it) (pop_it, set_iterator_to_next, dump_glyph) (calc_pixel_width_or_height, fill_xwidget_glyph_string) (BUILD_XWIDGET_GLYPH_STRING, BUILD_GLYPH_STRINGS) (produce_xwidget_glyph, x_produce_glyphs) (get_window_cursor_type): * window.c (Fdelete_window_internal): * termhooks.h (e): * print.c (print_object): * lisp.h (ptrdiff_t): * keyboard.c (kbd_buffer_get_event, make_lispy_event) (syms_of_keyboard): * emacs.c (main): * dispnew.c (update_window, scrolling_window): * dispextern.h (g, i): * Makefile.in (XWIDGETS_OBJ, WEBKIT_CFLAGS, WEBKIT_LIBS) (GIR_LIBS, ALL_CFLAGS, base_obj, LIBES): * keyboard.c (kbd_buffer_get_event): * emacsgtkfixed.c (emacs_fixed_gtk_widget_size_allocate) (emacs_fixed_class_init): Add case for an xwidget view. * xwidget.c, xwidget.h, xwidget.el: New files for xwidgets Co-authored-by: Grégoire Jadi <daimrod@gmail.com> Various improvements to the Xwidget feature. * xwidgets.c: * emacsgtkfixed.c: * xwidget.el:
* Revert changes installed by xwidgets mergePaul Eggert2015-02-011-1853/+0
|
* CleanupJoakim Verona2015-01-211-22/+0
|
* cleanupJoakim Verona2015-01-211-34/+3
|
* Implement native scrolling of the webkit xwidgetJoakim Verona2015-01-201-10/+81
| | | | | | It is now possible to use native scrolling with the webkit view. There is also a new function xwidget-set-adjustment, which can manipulate the viewport.
* Update to new DEFSYM strategyJoakim Verona2015-01-111-20/+3
| | | | Update to new DEFSYM strategy which was slightly tricky.
* Added two CHECK_STRING of argumentsjave2015-01-071-0/+2
| | | | Suggested by Eli Zaretski
* Doc strings, and whitespacejave2009-01-011-71/+89
|
* fixes: PREPARE_FACE_FOR_DISPLAY was removed, DEFUN less lenientJoakim Verona2014-06-231-1/+2
|
* remove FRAME_PTRroot2013-08-121-1/+1
|
* Merge pull request #14 from daimrod/offscreen_forward_eventsJoakim Verona2013-07-251-177/+81
|\ | | | | | | Offscreen forward events
| * * src/xwidget.c (Fmake_xwidget): Force each widget to be shown.Grégoire Jadi2013-07-251-1/+2
| |
| * * src/xwidget.c: Remove old code.Grégoire Jadi2013-07-251-71/+1
| |
| * * src/xwidget.c (xwidget_init_view): Transfer embedder ownership when theGrégoire Jadi2013-07-251-2/+2
| | | | | | | | pointer enter a widget, not on motion.
| * * src/xwidget.c (xwidget_init_view): Transfer all events.Grégoire Jadi2013-07-251-4/+1
| |
| * * src/xwidget.c: Implement events forwarding with the set_embedder strategy.Grégoire Jadi2013-07-251-47/+47
| |
| * * src/xwidget.c (xwidget_init_view): Remove dead code.Grégoire Jadi2013-07-251-11/+2
| |