]> git.eshelyaron.com Git - emacs.git/commit
Report touch events on MS-Windows
authorPo Lu <luangruo@yahoo.com>
Sun, 9 Jun 2024 09:44:25 +0000 (17:44 +0800)
committerEshel Yaron <me@eshelyaron.com>
Mon, 10 Jun 2024 07:26:06 +0000 (09:26 +0200)
commite4eb62defa01588877049402c44e010f569508e2
treeb7d6293a9a56884dac8f7a4ae8496e01909e01f0
parent1ecab53823d16519bd0879927b75d2b5d30ba9ee
Report touch events on MS-Windows

* etc/NEWS: Announce change.

* src/w32fns.c (RegisterTouchWindow_fn): New function.
(w32_createwindow): Assign a base value for touch event
identifiers to the frame, and register for touch input.
(w32_wnd_proc): Forward WM_TOUCH/WM_TOUCHMOVE messages to the
main thread.
(globals_of_w32fns): Load RegisterTouchWindow from user32.dll.

* src/w32term.c (w32_read_socket) <WM_TOUCH>: Detect WM_TOUCH
events, compare and record their touch points with and into the
frame's record of their prior state, and report the same to Lisp.
(pfnCloseTouchInputHandle, pfnGetTouchInputInfo): New variables.
(w32_initialize): Load the above functions from user32.dll.

* src/w32term.h (MAX_TOUCH_POINTS): New definition.
(struct w32_output) <touch_ids, touch_x, touch_y, touch_base>:
New fields.

(cherry picked from commit 5eb729c0b36a31869cf4928bc7bf5111b6f59ebb)
etc/NEWS
src/w32fns.c
src/w32term.c
src/w32term.h