Generic FunctionPackage: cgToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
This page is new in 10.0.

touch-event

Arguments: window touch-points count

This generic function is called one or more times for any gesture on a window if register-touch-window has been called to switch that window to the touch interface. (Otherwise gesture-event will be called by default.) This function will be called once for each different position of one or more fingers during a continuous gesture. This is the somewhat lower-level interface that does not figure out which type of gesture is being done for you, but you can interpret any sort of touches and drags of up to ten simultaneous fingers however you like.

An application can supply methods for this generic function to handle gestures. If a method handles a gesture, it should return true. Otherwise it should return nil to perform the default behavior that's built into Windows. The default method on basic-pane does nothing and returns nil.

window is the window where the gesture began.

touch-points is a vector of touch-point Lisp structures, and count is the number of structures in the vector. Each touch-point is for one of the fingers that are currently touching the screen, and provides a variety of information about that finger.

Note that these structures and the vector containing them are reused on each call to touch-event for the same window. (This is done to reduce consing.) So if you want to save any of this information then you need to extract it from the touch-points and save it elsewhere. Typically you will want to save the X and Y coordinates from the first call for a gesture, or all calls, to compare the coordinates of later calls to them.

Here are the accessor functions of the touch-point structure that a touch-event method can read to determine the current state of a gesture.

See also the touch-point class and About Touch Gesture Support in Common Graphics on Windows in cgide.htm, which has a complete example.


Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page is new in the 10.0 release.
Created 2019.8.20.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 10.0
This page is new in 10.0.