emacs-devel
[Top][All Lists]
Advanced

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

Re: Touchscreen support


From: Po Lu
Subject: Re: Touchscreen support
Date: Thu, 16 Dec 2021 16:02:37 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Po Lu via "Emacs development discussions." <emacs-devel@gnu.org> writes:
>
>> I implemented the events required for full touchscreen support for
>> XInput 2.  These events are generated only for DirectTouch devices,
>> which means real touchscreens only, no touchpads.
>
> That's fantastic -- proper touchscreen support is something I've been
> wanting to have in Emacs for at least a decade.
>
> One question:
>
>> Please take a look and see if the API I'm exposing is useful, and also
>> easy enough to implement on non-X platforms.
>> +The low-level touchscreen events described below can be used to
>> +implement all the touch sequences described above.  In those events,
>> +each point is represented by a cons of an arbitrary number identifying
>> +the point and a mouse position list (@pxref{Click Events}) specifying
>> +the position of the finger when the event occurred.
>
> What would the implementation of a (for instance) "three finger swipe
> left" event look like based on these primitives?

You would wait for three consecutive `touchscreen-down' events, then
decide if the fingers are in an appropriate location, and then keep
reading for `touchscreen-update' events, calculating their movement.

I can't think of that in any more detail right now, but it should be
similar to how it's implemented on X, whose APIs are paralleled by this
implementation.

Thanks.


reply via email to

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