| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |
Arguments: window count gesture
This generic function is called whenever all fingers are removed from
the screen after a gesture on a two-stroke-mixin
window. An application can
provide methods on this generic function to handle certain kinds of
gestures. See the two-stroke-mixin
class for more
information.
A two-stroke-gesture method
should return true if it handled the gesture, to override any default
behavior. Returning will allow default behavior, which for a tap will
call mouse-left-down and for a
hold will call mouse-right-down. Other default behavior would
depend on what Microsoft does when touch-event
returns nil
.
window will be the two-stroke-mixin
window where the
gesture was done.
count will be an integer from 1 to 10 (inclusive) for the maximum number of fingers that were in contact with the screen simultaneously during the gesture.
gesture will be a keyword symbol for the particular gesture that was interpreted from the many finger coordinates that were passed at a lower level to a touch-event method. Here are the possible keywords that may get passed, with their meanings:
:tap
- the user did not drag appreciably, and
released all fingers within two-stroke-hold-time milliseconds.
:hold
- the user did not drag appreciably, and held
one or more fingers down longer than two-stroke-hold-time milliseconds.
:pinch
- the maximum finger count is 2, and the two
fingers were moved closer to each other during the gesture by a
certain threshold or more.
:spread
- the maximum finger count is 2, and the
two fingers were moved farther from each other during the gesture by a
certain threshold or more.
:left
, :up
, :right
,
or :down
- the user dragged in one of these
orthogonal directions.
:left-up
, :left-right
,
:left-down
,
:up-left
, :up-down
,
:up-right
,
:right-up
, :right-left
,
:right-down
, :down-right
,
:down-up
, or :down-left
- the
user dragged in the direction that's mentioned first in the keyword
and then (with fingers still in contact with the screen) dragged in
the second direction. A curved motion will still be interpreted as
two directions as long as the path ventures sufficiently to one side
of the line between the starting and ending positions, and where both
vertical and horizontal differences between the starting and ending
positions are also sufficient.
While up to ten fingers are tracked, a dragging gesture will be interpreted only from the path of the first finger that made contact with the screen. Gestures other than those mentioned above will be interpreted as the one that most closely resembles the gesture that was done.
Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version |