emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Touchscreen support


From: Eli Zaretskii
Subject: Re: Touchscreen support
Date: Sun, 19 Dec 2021 10:14:30 +0200

> From: Po Lu <luangruo@yahoo.com>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>,  monnier@iro.umontreal.ca,
>   emacs-devel@gnu.org
> Date: Sun, 19 Dec 2021 08:24:58 +0800
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > FWIW, MS-Windows seems to provide higher-level abstraction for touch
> > events, see
> >
> >   
> > https://docs.microsoft.com/en-us/windows/win32/wintouch/windows-touch-gestures-overview
> >
> > Is the plan to have xterm.c/xfns.c to generate similar higher-level
> > events based on just the 3 basic low-level events we now have in
> > xterm.c?
> 
> The plan is to have that infrastructure in Lisp, which should be much
> more portable (for example, judging by the MS documentation you sent,
> there are at least 3 gestures not supported by GTK: left/right selection
> drag, flicks, and I think rotate as well.)

If you do it in Lisp, it will be hard to use on other platforms, where
the higher-level abstractions are reported on the level of the
window-system events.

> MS-Windows does support the low level reporting of touch events like
> we have in xterm.c, correct?

I don't think so, although I'm far from being an expert.  I see it
provides the gesture-begin and gesture-end events, but not
gesture-update; instead, the "cooked" gestures are provided which are
already constructed from lower-level events.  The MS documentation
clearly says:

  Note Most applications should ignore the GID_BEGIN and GID_END
  messages and pass them to DefWindowProc. These messages are used by
  the default gesture handler. Application behavior is undefined when
  the GID_BEGIN and GID_END messages are consumed by a third-party
  application.

So they advise against using the low-level events.

In any case, it makes no sense to me to "decompose" events that are
already composed into meaningful gestures.  We should be able to use
those higher-level abstractions when they are provided.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]