<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src/xwidget.h, branch features/user-directory</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Fix build on nextstep</title>
<updated>2021-11-07T01:59:42+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-11-07T01:17:11+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5b7ab895e1c9a8ddf82cc6d4946dd40c1b720ff0'/>
<id>5b7ab895e1c9a8ddf82cc6d4946dd40c1b720ff0</id>
<content type='text'>
* src/xwidget.h: Make some prototypes conditional to X-Windows.
(struct xwidget): Move find_text field out of GTK conditional.

* src/xwidget.c (Fmake_xwidget): Move find_text out of GTK
conditional.
* src/print.c (print_vectorlike): Print correct pointer on macOS.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xwidget.h: Make some prototypes conditional to X-Windows.
(struct xwidget): Move find_text field out of GTK conditional.

* src/xwidget.c (Fmake_xwidget): Move find_text out of GTK
conditional.
* src/print.c (print_vectorlike): Print correct pointer on macOS.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add functions for performing searches on xwidgets</title>
<updated>2021-11-07T01:59:41+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-11-06T07:07:09+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=286467a6b1bff1d7b7bebe285538fb9a67084f01'/>
<id>286467a6b1bff1d7b7bebe285538fb9a67084f01</id>
<content type='text'>
* etc/NEWS:
* doc/lispref/display.texi: Document changes.

* src/xwidget.c (Fxwidget_webkit_search)
(Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_wenkit_finish_search): New functions.

(syms_of_xwidget): Define new built-ins.
(kill_buffer_xwidgets): Free search query if present.
* src/xwidget.h (struct xwidget): Add field for search query.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* etc/NEWS:
* doc/lispref/display.texi: Document changes.

* src/xwidget.c (Fxwidget_webkit_search)
(Fxwidget_webkit_next_result)
(Fxwidget_webkit_previous_result)
(Fxwidget_wenkit_finish_search): New functions.

(syms_of_xwidget): Define new built-ins.
(kill_buffer_xwidgets): Free search query if present.
* src/xwidget.h (struct xwidget): Add field for search query.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix cursor for new widget views</title>
<updated>2021-11-07T01:59:41+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-11-06T04:34:41+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=eb5a079feed99379dacf8c6ced449a65e8069c4b'/>
<id>eb5a079feed99379dacf8c6ced449a65e8069c4b</id>
<content type='text'>
* src/xwidget.c (Fmake_xwidget): Clear hit result.
(cursor_for_hit): Use integer hit result.
(define_cursors): Set hit result appropriately.
(widget_init_view): Set cursor to the existing hit result.

* src/xwidget.h (struct xwidget): Add hit result field.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xwidget.c (Fmake_xwidget): Clear hit result.
(cursor_for_hit): Use integer hit result.
(define_cursors): Set hit result appropriately.
(widget_init_view): Set cursor to the existing hit result.

* src/xwidget.h (struct xwidget): Add hit result field.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for cursors in xwidget views</title>
<updated>2021-11-07T01:59:41+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-11-06T03:28:40+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=1cc19d0437a712a1589c0adaaa65d7c12decd8c1'/>
<id>1cc19d0437a712a1589c0adaaa65d7c12decd8c1</id>
<content type='text'>
* src/xwidget.c (mouse_target_changed): New function.
(Fmake_xwidget): Attach mouse target changed signal.
(cursor_for_hit, define_cursors, mouse_target_changed): New functions.
(xwidget_init_view): Set default cursor to nontext cursor.
(x_draw_xwidget_glyph_string): Define cursor.

* src/xwidget.h (struct xwidget_view): Add cursor field.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xwidget.c (mouse_target_changed): New function.
(Fmake_xwidget): Attach mouse target changed signal.
(cursor_for_hit, define_cursors, mouse_target_changed): New functions.
(xwidget_init_view): Set default cursor to nontext cursor.
(x_draw_xwidget_glyph_string): Define cursor.

* src/xwidget.h (struct xwidget_view): Add cursor field.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow xwidgets to accept motion and button events</title>
<updated>2021-11-07T01:59:40+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-11-03T11:02:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=f52f7725305506a75ea4709aff56f3190455b7de'/>
<id>f52f7725305506a75ea4709aff56f3190455b7de</id>
<content type='text'>
* src/xterm.c (handle_one_xevent): Pass through some events to
xwidgets.

* src/xwidget.c (synthesize_focus_in_event)
(find_suitable_pointer, xwidget_button_1)
(xwidget_button, xwidget_motion_or_crossing): New functions.
(xwidget_view_from_window): Draw offscreen window instead of the
widget.
(x_draw_xwidget_glyph_string): Set appropriate event masks.

* src/xwidget.h (xwidget_button, xwidget_motion_or_crossing): New
functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xterm.c (handle_one_xevent): Pass through some events to
xwidgets.

* src/xwidget.c (synthesize_focus_in_event)
(find_suitable_pointer, xwidget_button_1)
(xwidget_button, xwidget_motion_or_crossing): New functions.
(xwidget_view_from_window): Draw offscreen window instead of the
widget.
(x_draw_xwidget_glyph_string): Set appropriate event masks.

* src/xwidget.h (xwidget_button, xwidget_motion_or_crossing): New
functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Destroy xwidgets when destroying frames</title>
<updated>2021-11-07T01:59:39+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-10-29T11:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=9c9e15a0186603ef4bddd4df5f448f880636f4da'/>
<id>9c9e15a0186603ef4bddd4df5f448f880636f4da</id>
<content type='text'>
* src/xterm.c (x_free_frame_resources): Make sure to kill xwidget views.
* src/xwidget.c (Fmake_xwidget): Attach damage event signal.
(offscreen_damage_event): Operate on xwidgets and not individual
views.
(xwidget_init_view): Don't attach damage event signal here.
(Fdelete_xwidget_view): Destroy window correctly and stop removing
damage event signal.
(kill_frame_xwidget_views): New function.
* src/xwidget.c (kill_frame_xwidget_views): New function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/xterm.c (x_free_frame_resources): Make sure to kill xwidget views.
* src/xwidget.c (Fmake_xwidget): Attach damage event signal.
(offscreen_damage_event): Operate on xwidgets and not individual
views.
(xwidget_init_view): Don't attach damage event signal here.
(Fdelete_xwidget_view): Destroy window correctly and stop removing
damage event signal.
(kill_frame_xwidget_views): New function.
* src/xwidget.c (kill_frame_xwidget_views): New function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable scrolling optimization for xwidgets</title>
<updated>2021-11-07T01:59:39+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-10-29T03:33:06+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5c387ad437872c6e95599710ba5dcdfaa470c5ea'/>
<id>5c387ad437872c6e95599710ba5dcdfaa470c5ea</id>
<content type='text'>
* src/dispextern.h (struct glyph): Store xwidget ID instead of a
reference.
* src/dispnew.c (scrolling_window): Enable scrolling optimization on
xwidget builds.
* src/xdisp.c (fill_xwidget_glyph_string, produce_xwidget_glyph):
Obtain xwidget from ID.
* src/xterm.c (x_scroll_run): Scroll xwidget windows.
* src/xwidget.c (id_to_xwidget_map, xwidget_counter): New xwidget
variables.
(Fmake_xwidget): Assign each xwidget a unique ID, and keep track of
that ID.
(xwidget_from_id): New function.
(syms_of_xwidget): Initialize id_to_xwidget_map.
(xwidget_end_redisplay): Lookup xwidgets via ID.
* src/xwidget.h (struct xwidget): Add ID field.
(xwidget_from_id): New function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/dispextern.h (struct glyph): Store xwidget ID instead of a
reference.
* src/dispnew.c (scrolling_window): Enable scrolling optimization on
xwidget builds.
* src/xdisp.c (fill_xwidget_glyph_string, produce_xwidget_glyph):
Obtain xwidget from ID.
* src/xterm.c (x_scroll_run): Scroll xwidget windows.
* src/xwidget.c (id_to_xwidget_map, xwidget_counter): New xwidget
variables.
(Fmake_xwidget): Assign each xwidget a unique ID, and keep track of
that ID.
(xwidget_from_id): New function.
(syms_of_xwidget): Initialize id_to_xwidget_map.
(xwidget_end_redisplay): Lookup xwidgets via ID.
* src/xwidget.h (struct xwidget): Add ID field.
(xwidget_from_id): New function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use an X window to display xwidgets on X11</title>
<updated>2021-11-07T01:59:39+00:00</updated>
<author>
<name>Po Lu</name>
</author>
<published>2021-10-28T13:46:01+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=61d049aaff2ede48d3d4b357bc1cb06447f15229'/>
<id>61d049aaff2ede48d3d4b357bc1cb06447f15229</id>
<content type='text'>
Since Emacs draws using X11 primitives, Emacs drawing operations can
erase the GtkDrawingArea used to draw the offscreen widget, which
leads to unpleasant flickering effects, all of which can be prevented
by creating a native X window and drawing to that instead.

* src/xterm.c (x_window_to_frame): Return xwidget window if
appropriate.
(handle_one_xevent): Handle xwidget expose events.

* src/xwidget.c (x_window_to_xvw_map): New variable.
(xwidget_view_from_window): New function.

(xwidget_show_view, xwidget_hide_view)
(offscreen_damage_event): Move to drawing xwidgets with X windows.

(xv_do_draw)
(xwidget_expose): New function.

(xwidget_osr_draw_cb, xwidget_osr_event_forward)
(xwidget_osr_event_set_embedder): Removed.

(xwidget_init_view): Replace use of GtkDrawingArea with that of an X
window.

(x_draw_xwidget_glyph_string): Prevent xwidget views from constantly
generating expose events, and use an X window instead of a
GtkDrawingArea.

(syms_of_xwidget): Initialize x_window_to_xwv_map.

src/xwidget.h (struct xwidget_view): Replace GTK widgets with
X-related fields.

(xwidget_view_from_window, xwidget_expose): New functions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since Emacs draws using X11 primitives, Emacs drawing operations can
erase the GtkDrawingArea used to draw the offscreen widget, which
leads to unpleasant flickering effects, all of which can be prevented
by creating a native X window and drawing to that instead.

* src/xterm.c (x_window_to_frame): Return xwidget window if
appropriate.
(handle_one_xevent): Handle xwidget expose events.

* src/xwidget.c (x_window_to_xvw_map): New variable.
(xwidget_view_from_window): New function.

(xwidget_show_view, xwidget_hide_view)
(offscreen_damage_event): Move to drawing xwidgets with X windows.

(xv_do_draw)
(xwidget_expose): New function.

(xwidget_osr_draw_cb, xwidget_osr_event_forward)
(xwidget_osr_event_set_embedder): Removed.

(xwidget_init_view): Replace use of GtkDrawingArea with that of an X
window.

(x_draw_xwidget_glyph_string): Prevent xwidget views from constantly
generating expose events, and use an X window instead of a
GtkDrawingArea.

(syms_of_xwidget): Initialize x_window_to_xwv_map.

src/xwidget.h (struct xwidget_view): Replace GTK widgets with
X-related fields.

(xwidget_view_from_window, xwidget_expose): New functions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update copyright year to 2021</title>
<updated>2021-01-01T09:13:56+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2021-01-01T09:13:56+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ba05d005e5a81bc123ad8da928b1bccb6b160e7a'/>
<id>ba05d005e5a81bc123ad8da928b1bccb6b160e7a</id>
<content type='text'>
Run "TZ=UTC0 admin/update-copyright".
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run "TZ=UTC0 admin/update-copyright".
</pre>
</div>
</content>
</entry>
<entry>
<title>Add utility functions and new xwidget commands</title>
<updated>2020-08-12T10:39:50+00:00</updated>
<author>
<name>Sungbin Jo</name>
</author>
<published>2020-08-12T10:39:50+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c25321e44707253381c2ab92033e8d57ff00c746'/>
<id>c25321e44707253381c2ab92033e8d57ff00c746</id>
<content type='text'>
Co-authored-by: Jaesup Kwak &lt;veshboo@gmail.com&gt;

* lisp/xwidget.el (xwidget-webkit-callback): Add case for
'response-callback' event.
(xwidget-webkit-download-dir): New variable.
(xwidget-webkit-save-as-file): New function.
* src/nsxwidget.m (XwWebView::decidePolicyForNavigationResponse):
Store download event.
* src/xwidget.c src/xwidget.h (store_xwidget_download_callback_event):
New function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-authored-by: Jaesup Kwak &lt;veshboo@gmail.com&gt;

* lisp/xwidget.el (xwidget-webkit-callback): Add case for
'response-callback' event.
(xwidget-webkit-download-dir): New variable.
(xwidget-webkit-save-as-file): New function.
* src/nsxwidget.m (XwWebView::decidePolicyForNavigationResponse):
Store download event.
* src/xwidget.c src/xwidget.h (store_xwidget_download_callback_event):
New function.
</pre>
</div>
</content>
</entry>
</feed>
