Variable: touch-screen-current-tool

touch-screen-current-tool is a variable defined in touch-screen.el.gz.

Value

nil

Documentation

The touch point currently being tracked, or nil.

If non-nil, this is a list of ten elements: the ID of the touch point being tracked, the window where the touch began, a cons holding the last registered position of the touch point, relative to that window, a field used to store data while tracking the touch point, the initial position of the touchpoint, another four fields to used store data while tracking the touch point, and the last known position of the touch point.

See touch-screen-handle-point-update and touch-screen-handle-point-up for the meanings of the fourth element.

The third and last elements differ in that the former is not modified until after a gesture is recognized in reaction to an update, whereas the latter is updated upon each apposite touchscreen-update event.

Source Code

;; Defined in /usr/src/emacs/lisp/touch-screen.el.gz
;;; touch-screen.el --- touch screen support for X and Android  -*- lexical-binding: t; -*-

;; Copyright (C) 2023-2025 Free Software Foundation, Inc.

;; Maintainer: emacs-devel@gnu.org
;; Package: emacs

;; This file is part of GNU Emacs.

;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; This file provides code to recognize simple touch screen gestures.
;; It is used on X, PGTK, Android, and MS-Windows, currently the only
;; systems where Emacs supports touch input.
;;
;; See (elisp)Touchscreen Events for a description of the details of
;; touch events.

;;; Code:

(defvar touch-screen-current-tool nil
  "The touch point currently being tracked, or nil.
If non-nil, this is a list of ten elements: the ID of the touch
point being tracked, the window where the touch began, a cons
holding the last registered position of the touch point, relative
to that window, a field used to store data while tracking the
touch point, the initial position of the touchpoint, another four
fields to used store data while tracking the touch point, and the
last known position of the touch point.

See `touch-screen-handle-point-update' and
`touch-screen-handle-point-up' for the meanings of the fourth
element.

The third and last elements differ in that the former is not
modified until after a gesture is recognized in reaction to an
update, whereas the latter is updated upon each apposite
`touchscreen-update' event.")