From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Touchscreen support Date: Thu, 16 Dec 2021 16:02:37 +0800 Message-ID: <87wnk5j7tu.fsf@yahoo.com> References: <87czlxkntg.fsf.ref@yahoo.com> <87czlxkntg.fsf@yahoo.com> <87a6h13rsk.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21163"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: Po Lu via "Emacs development discussions." To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 16 09:06:43 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 1mxlml-0005E2-9A for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Dec 2021 09:06:43 +0100 Original-Received: from localhost ([::1]:60906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxlmk-00006C-7P for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Dec 2021 03:06:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxliz-0005lA-QK for emacs-devel@gnu.org; Thu, 16 Dec 2021 03:02:49 -0500 Original-Received: from sonic303-20.consmr.mail.ne1.yahoo.com ([66.163.188.146]:45429) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxliw-0007Xq-Qd for emacs-devel@gnu.org; Thu, 16 Dec 2021 03:02:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639641764; bh=kxBnG02wgMHnacMWDasyAcyrDMI7gPa+6codlhUEQco=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=NcNfks5PnP9kYn/2IBBmtjqmzuT3rA9F+OwMIG/knLUE5Ey+6UmnVYVg6gh1RsPGOzQ7EMSkLv4cSTvraTXPK0GYQwmHQCKQmAc2gzjxChcuJES15a+TFj94jEUgFtjIMEOQXkXqsGrzlW9kGNf6jQ0N57tEw9QaPoqczBqCMemFUO/tnv87HC6TVV6uxuZdsdEIgXPwOTIX1dkL/6FyLbUw9kViY3AyqQ30rf6rNKk39jlbOCv5xc27BE+qNUZEySC1c20vnOs4YAp/8Ea7NeInCH/gssp4PWPdE7YQ42YWaZ/QplJi+hd453eTIC7zwmG1tApOR960XPCy5pK32A== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1639641764; bh=aZPYzogeGXGT8HsfCAlSHr7AsW5kNJXz86eULhNkjjj=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=CXjTBaQTPZwkSKenHQsk/PMPbq+z1jQsuHEmFmCGq8KdJjLci3vxmWFhN5OZ8xRxVMR8OAytLq9x+c8aO6+yoD5317ONFqKoLnuzxaNogp7GPHpMggcO0YkKJN8lWFeRNS2pQUXb8BbIT47ZhO1h+BficG753dmSmLjHTgEg5Nn/QXEYHq6pWb8Tb9BallBqRDwKu+/euMJSKUveVLy+a0KD4D7zJRwzgJthZYYX2BqethONxdSuOhmukWLhdKjCf/VyPCKeyDwypzr7Cg/zONAweakGUrrwAlCztvlGHJzDZkNK7xFAzgBCX8T3KgGHHWhYuLJdXVFAlURZ4xdspA== X-YMail-OSG: f21CMwMVM1ko9k6j1.fffQmq8MRor.NCysDfOVl7j4PL.bxnBUZnmz0CvT6K.TV GA2pUx5cYWwr5mGXu53RduO2uf_.t2mwThDvIWZS3V8T_puvt59c5PxxyFjnXEwnMDtjXCj02SiK uNWEl4LX2tAbcBYN2lusCciLzDqeIXuX.z7WPALiZ8x9dTuXGHW2KhP6gBHQZswbV9glDA5n4IiA QsXR8J_us.lE133u9.L1a.DcHtFP2tcirCTsmElvWjqmRVv9RhseAco5RcTGniqVG7avK3dYTw1z pQtBycrc_kdCyus7QmHaOMWF3yCJzqtKfZB6NmRUGAjAJtXV7iptI5DKiviSy7wcaMEqhSX5fyHd _TATTCGrpOg4iiRxO5LU9lXN9QQuN26qXnrHIBm.8_QhWOuc0Oojbf2MwPz_DvKUjTXhfdyb4web j8nnjM2a8XQF.oT3AVnztw7.559__6_RNIooSpnfD9vkbvh3EY5vksoQ3ppOKRpiIPlqT27BSC6X uMzVLBv9H_sUmoy1bMkwUL0K.1c9__x5X5Gn.evmcGKiW85A0Scan4Z53upUKcujAUBCSzN31zoP wugZADOhQGs6VeK749HEYB.wXQ0e.GfyNyzRUUEJ5fHYj4APZBqq5Bj1Te7.6kO33TqN8Uu7vYAD khldAgeLARR5XUodfYy6Z_y4LX_jFh299rxWgTH0QWJnIQYTtdjt.y5DN_Hz9AQRVFR0Mqd29l_0 uCbUTlOy9Gbu04CPpc.n6VuDspWHNkKbHGXZAQrHPPFk_lOxC4BQJABOkKH92DE17RWEicbtXS_. 9E1OTSV06fOYtlMQOoJkScMDMWAogqR53nKbW5_C_v X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic303.consmr.mail.ne1.yahoo.com with HTTP; Thu, 16 Dec 2021 08:02:44 +0000 Original-Received: by kubenode514.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a32b4841718c21bfadf756e8c9053cca; Thu, 16 Dec 2021 08:02:41 +0000 (UTC) In-Reply-To: <87a6h13rsk.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 16 Dec 2021 08:58:03 +0100") X-Mailer: WebService/1.1.19415 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.146; envelope-from=luangruo@yahoo.com; helo=sonic303-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:282129 Archived-At: Lars Ingebrigtsen writes: > Po Lu via "Emacs development discussions." 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.