Commit graph

99 commits

Author SHA1 Message Date
Paul Eggert
edae7d93ed Remove buggy non-native image scrolling
This never worked, and could cause infinite recursion.
Problem reported by Glenn Morris (Bug#22465).
* lisp/xwidget.el (xwidget-webkit-scroll-behavior): Remove.
All uses removed.
2016-05-13 09:52:43 -07:00
Joakim Verona
36e05f0bf7 Remove unused arguments from make-xwidget
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
2016-04-02 18:32:13 -07:00
Paul Eggert
91557f5e2d Quoting fixes in doc strings and diagnostics
* lisp/emacs-lisp/bytecomp.el (byte-compile-setq, byte-compile-funcall):
* lisp/gnus/mml-smime.el (mml-smime-get-dns-cert)
(mml-smime-get-ldap-cert):
Follow user style preference when quoting diagnostics.
2016-02-03 17:20:17 -08:00
Glenn Morris
8e5046a6e5 * lisp/xwidget.el (xwidget-query-on-exit-flag): Declare. 2016-01-27 17:06:08 -05:00
Glenn Morris
82bf438c56 * lisp/xwidget.el (xwidget-webkit-browse-url): Give explicit error
if not compiled with xwidgets.
2016-01-27 17:01:30 -05:00
Glenn Morris
60f6bd85a6 * lisp/xwidget.el (xwidget-webkit-scroll-behavior):
Rename using American spelling.  Update all uses.
2016-01-25 18:19:34 -05:00
Glenn Morris
cea07fdf42 Yet more xwidget doc fixes.
* lisp/xwidget.el (xwidget-webkit-scroll-behaviour)
(xwidget-insert, xwidget-webkit-browse-url)
(xwidget-webkit-scroll-up, xwidget-webkit-scroll-down)
(xwidget-webkit-scroll-forward, xwidget-webkit-scroll-backward)
(xwidget-webkit-insert-string, xwidget-webkit-show-named-element)
(xwidget-webkit-show-id-element)
(xwidget-webkit-show-id-or-named-element)
(xwidget-webkit-adjust-size, xwidget-webkit-current-url)
(xwidget-webkit-execute-script-rv)
(xwidget-webkit-copy-selection-as-kill, xwidget-get)
(xwidget-put):  Doc fixes.
(xwidget-webkit-insert-string, xwidget-webkit-show-named-element)
(xwidget-webkit-show-id-element)
(xwidget-webkit-show-id-or-named-element): Prompt fixes.
2016-01-25 18:17:33 -05:00
Paul Eggert
a528a60f48 Spelling fixes 2016-01-25 08:09:09 -08:00
Stefan Monnier
c5ee6de21d * lisp/xwidget.el: Nitpicks
* lisp/xwidget.el (xwidget-log, xwidget-webkit-callback):
Use with-current-buffer rather than save-excursion + set-buffer.
2016-01-19 20:53:10 -05:00
Glenn Morris
96f6cace6b Don't hard-code 1 as point-min.
* lisp/image-mode.el (image-display-size):
* lisp/xwidget.el (xwidget-webkit-last-session)
(xwidget-webkit-current-session): Don't hard-code 1 as point-min.
2016-01-19 19:09:45 -05:00
Glenn Morris
833d53b98b ; * lisp/xwidget.el: Spelling fixes. 2016-01-19 19:06:32 -05:00
Glenn Morris
c9471132c3 * lisp/xwidget.el: Add declarations to silence non-xwidget compilation. 2016-01-19 18:44:29 -05:00
Glenn Morris
0b356a6aeb Avoid advising image-display-size for xwidgets.
* lisp/xwidget.el (xwidget-image-display-size): Remove.
(image-display-size): Remove advice.
* lisp/image-mode.el (xwidget-info, xwidget-at): Declare.
(image-display-size): Incorporate xwidget code directly.
2016-01-19 18:13:07 -05:00
Glenn Morris
b88f4a2c76 Avoid breaking non-xwidget Emacs that happen to load xwidget.el.
* lisp/xwidget.el (window-configuration-change-hook)
(kill-buffer-query-functions): Only modify these hooks if
compiled with xwidget support.
2016-01-19 18:06:30 -05:00
Glenn Morris
22977b5c51 * lisp/xwidget.el (xwidget-webkit-scroll-behaviour): Fix custom spec. 2016-01-19 18:03:37 -05:00
Glenn Morris
9d00392520 * lisp/xwidget.el (report-xwidget-bug): Remove.
(top-level): No longer require reporter.
2016-01-19 16:02:18 -05:00
Glenn Morris
c7441cd7d8 ; Add 2016 to copyright years of new files. 2016-01-19 16:00:34 -05:00
Joakim Verona
7c1f66a94b Support for the new Xwidget feature.
* 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:
2016-01-19 20:58:22 +01:00
Paul Eggert
241260cc28 Revert changes installed by xwidgets merge 2015-02-01 11:45:15 -08:00
Joakim Verona
4edad429ca Fix compile warnings xwidget.el 2015-01-31 21:09:11 +01:00
Joakim Verona
ac94737e8d First attempt at bookmark support 2015-01-28 01:02:43 +01:00
Joakim Verona
f93da81268 added hint to webkit buffer 2015-01-26 21:56:44 +01:00
Joakim Verona
8a6a92fe12 Improved glitch fix 2015-01-25 23:52:34 +01:00
Joakim Verona
c251ec9611 Fix visual glitch during webkit resizing 2015-01-25 21:27:08 +01:00
Joakim Verona
487d6cdc4d webkit scrolling bugfix 2015-01-21 23:17:19 +01:00
Joakim Verona
ffd9ee1d64 rely less onimage mode 2015-01-21 00:24:14 +01:00
Joakim Verona
e1653dd725 Native scrolling
Initial support for native scrolling of the webkit xwidget.
Also some checkstyle cleanups.
2015-01-21 00:00:47 +01:00
Grégoire Jadi
c9215889cc * lisp/xwidget.el (xwidget-display): Return a useful value.
* test/automated/xwidget-tests.el (xwidget-view-p): Use `xwidget-display'.
2013-08-13 16:04:50 +02:00
Grégoire Jadi
7e457d94c0 * lisp/xwidget.el (xwidget-delete-zombies): Rewrite with dolist/memq
instead of mapcar/find.
2013-07-25 15:30:30 +02:00
Joakim Verona
7270f246f4 Merge pull request #7 from daimrod/fix-image-mode-interaction
Fix image mode interaction
2013-07-18 13:14:17 -07:00
Grégoire Jadi
feac206c91 * lisp/xwidget.el: Fix the interaction between `image-mode' and xwidget.
(xwidget-image-mode-navigation-adaptor
xwidget-image-mode-navigation-adaptor-p): `flet' has been deprecated and
`cl-flet' doesn't work like the old `flet', we now use a `defadvice'
around `image-display-size' instead.
(xwidget-webkit-mode-map): No need to use the adaptators now.
2013-07-18 19:54:12 +02:00
Grégoire Jadi
1eea231d3e * src/xwidget.c (Fset_frame_visible): Hack to force a frame to be
considered as visible to trigger the display engine.
* lisp/xwidget.el (xwidget-display): Force the display engine to create a
xwidget_view of the given xwidget.
2013-07-18 14:12:03 +02:00
Grégoire Jadi
a425ea6523 * src/xwidget.c (Fxwidget_delete_zombies): Re-implemented in Lisp.
Note: It is not longer necessary to delete xwidget with killed buffer
here because it is done automatically when a buffer is killed.
(Fdelete_xwidget_view): New function to delete the given
xwidget-view.
* lisp/xwidget.el (xwidget-delete-zombies): Re-implementation.
* src/xwidget.c (Fxwidget_delete_zombies): Re-implemented in Lisp. Note: It is not longer necessary to delete xwidget with killed buffer here because it is done automatically when a buffer is killed. (Fdelete_xwidget_view): New function to delete the given xwidget-view. * lisp/xwidget.el (xwidget-delete-zombies): New implementation.
2013-07-18 11:48:13 +02:00
Grégoire Jadi
b849935e98 * src/xwidget.c: Add a `query-on-exit' flag to determine whether we can
kill xwidget when the buffer is killed without confirmation.
(Fset_xwidget_query_on_exit_flag): New function to set the `query-on-exit'
flag.
(Fxwidget_query_on_exit_flag): New function to retrieve the value of the
`query-on-exit' flag.
(Fmake_xwidget): Set the `query-on-exit' flag to t by default.
* src/xwidget.h (xwidget): Add new field `kill_without_query'.
* lisp/xwidget.el (xwidget-kill-buffer-query-function): Ask for
confirmation before killing the buffer if a xwidget is present only if its
`query-on-exit' flag is enabled.
2013-07-16 19:39:20 +02:00
Grégoire Jadi
da95bc007d Handle xwidgets like processes and delete them when their buffer is killed.
* lisp/xwidget.el (xwidget-kill-buffer-query-function): New function to
query a user before killing a buffer with xwidgets in it.

This function is stored in `kill-buffer-query-functions' and called from
`kill-buffer'.
* src/buffer.c (Fkill_buffer): Call `kill_buffer_xwidgets'.
* src/xwidget.c (kill_buffer_xwidgets): Delete xwidgets attached to the
specified buffer.
* src/xwidget.h (kill_buffer_xwidgets): Add definition.
2013-06-24 10:22:45 +02:00
Grégoire Jadi
e32984567a * lisp/xwidget.el (report-xwidget-bug): Add a function to submit a bug
with the proper address and pseudo-header.
* README.xwidget: Update the documentation to mention
`report-xwidget-bug'.
2013-06-13 09:42:41 +02:00
Grégoire Jadi
5a99554993 * lisp/xwidget.el: Fix some warnings raised by the byte-compiler. 2013-06-11 15:14:47 +02:00
Grégoire Jadi
7a00481ac3 * src/xwidget.c (Fmake_xwidget): Add a docstring and add BUFFER as an optional parameter.
The docstring now lists the types accepted.
The GCPROtection has also been removed because it wasn't necessary (no
call to Feval/eval_sub either directly or indirectly).

(syms_of_xwidget): Add a comment to remind us to update the docstring of
`Fmake_xwidget' if new types are added.
2013-06-11 15:14:43 +02:00
Grégoire Jadi
8847f1116c Small fixes
* lisp/xwidget.el: Do some cosmetic changes.

Align expressions, remove some whitespaces, remove duplicated provide,
replace (if foo foo bar) by (or foo bar)
* src/xwidget.c (Fmake_xwidget): Cosmetic changes and fix a comment.
* README.xwidget: Fix some typos.
2013-06-11 15:12:58 +02:00
Joakim Verona
62dd123f7c cl-flet replaces flet (Stefan Hussman) 2013-03-26 16:15:43 +01:00
Joakim Verona
08ab3a852d fixes so xwidgets doesnt pollute a non xwidget build 2012-07-08 17:42:57 +02:00
Joakim Verona
28d5f38df4 textarea 2012-03-20 18:53:34 +01:00
Joakim Verona
1de331c486 upstream+selection support 2012-03-08 01:42:31 +01:00
Joakim Verona
e8e42079e7 bug when passing xwidget in event 2012-02-27 00:31:01 +01:00
Joakim Verona
d5114bfea3 added stuff for logging 2012-01-23 15:08:53 +01:00
Joakim Verona
69a8e78e4d fixes for typechecking to avoid crashes when some webkit functions are called with nil instead of valid webkit obj. intended to make it run on archlinux 2012-01-12 16:30:04 +01:00
Joakim Verona
32db4845d5 nav + text edit 2011-11-09 13:46:24 +01:00
Joakim Verona
d66104e9ad password support. doc. 2011-11-07 16:06:50 +01:00
Joakim Verona
2670512ad7 even better relative links 2011-11-03 23:49:00 +01:00
Joakim Verona
e40ee7bd1e improvement to 'g' 2011-11-03 22:25:57 +01:00