From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Touchscreen support Date: Sun, 19 Dec 2021 10:14:30 +0200 Message-ID: <834k759fkp.fsf@gnu.org> References: <87czlxkntg.fsf.ref@yahoo.com> <87czlxkntg.fsf@yahoo.com> <87mtkziwhi.fsf@yahoo.com> <87wnk3h0hn.fsf@yahoo.com> <877dc2xsjn.fsf@gnus.org> <83y24i9diw.fsf@gnu.org> <877dc1cug5.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6941"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 19 09:15:30 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1myrLt-0001d4-MQ for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 09:15:29 +0100 Original-Received: from localhost ([::1]:54604 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myrLr-0003zi-S5 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 03:15:27 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myrL7-0003KC-Is for emacs-devel@gnu.org; Sun, 19 Dec 2021 03:14:41 -0500 Original-Received: from [2001:470:142:3::e] (port=54852 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myrL6-0002oE-Tl; Sun, 19 Dec 2021 03:14:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=hpDhP+aJZkCwOaKAllPNZGntkTBz0jXkBh7aFxw0AUw=; b=DLOco22e1eQy 4/24NlGvVMX1bWLkxACY30lntnzMXb3PJwT9+QXnFqEaWa4UfbI4TYSaSX20jJNuHxcC02r1OFOuS BA5lrbcDu/Oh6dY6IvOn6tOav9ir4jQuxlA/grBrPV/18NqpKyvwNvziPiYC9xFBk6LeiDHk+G8zw Z7WH3YCtEBL7UgJcOTphYzwvpxj6W7G9a3eTVUDr9R14lvBEYBu993Qxrh72wCJRamFKmZ0waHRoD DC192vbslsgHQTqtQEIZJClMDGia67vVN4vlyBCOQoq87sLt3a3XHnackLQ423FqLA/poRpPOPgmN /Nc8iiVrIAeb+Jhzb7wDTg==; Original-Received: from [87.69.77.57] (port=2891 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myrL6-0004ip-M7; Sun, 19 Dec 2021 03:14:40 -0500 In-Reply-To: <877dc1cug5.fsf@yahoo.com> (message from Po Lu on Sun, 19 Dec 2021 08:24:58 +0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282377 Archived-At: > From: Po Lu > Cc: Lars Ingebrigtsen , monnier@iro.umontreal.ca, > emacs-devel@gnu.org > Date: Sun, 19 Dec 2021 08:24:58 +0800 > > Eli Zaretskii 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.