Gesture Commands (Windows Embedded CE 6.0)

1/6/2010

The gesture API defines the following gesture commands, in addition to any custom gestures that you register with RegisterGesture.

  • GID_BEGIN
    Marks the beginning of each touch gesture, when the user first touches the screen.
  • GID_END
    Marks the end of each touch gesture, when the user lifts their finger from the screen.
  • GID_PAN
    A pan gesture occurs when the user touches the screen and moves their finger in any direction. When the finger moves a distance equal to or greater than the pan threshold, the gesture recognizer sends an initial GID_PAN message that contains the current location of the finger.

    For more information about defining the pan threshold, see GESTUREMETRICS.

    The gesture recognizer sends a new GID_PAN message for each mouse move message until the user lifts up their finger. GID_END marks the end of the pan movement.

    You can calculate the movement delta by comparing two consecutive pan messages.

  • GID_ROTATE
    Reserved.
  • GID_SCROLL
    A flick gesture occurs when the user touches their finger to the screen and then moves the finger quickly in any direction before lifting the finger.

    The gesture recognizer sends the GID_SCROLL message after a flick.

    The ullArguments member of GESTUREINFO contains the following information:

    • Direction   You can use the GID_SCROLL_DIRECTION(x) macro to retrieve the direction. The direction is one of the following values:
      • ARG_SCROLL_NONE
      • ARG_SCROLL_DOWN
      • ARG_SCROLL_LEFT
      • ARG_SCROLL_UP
      • ARG_SCROLL_RIGHT
    • **Velocity   **You can use the GID_SCROLL_VELOCITY(x) macro to retrieve the velocity, in pixels per second.
    • Angle   You can use the GID_SCROLL_ANGLE(x) macro to retrieve the angle as an unsigned, 16-bit integer. You can use the GID_ROTATE_ANGLE_FROM_ARGUMENT(_arg_) macro to convert the angle to radians.

    The gesture recognizer sends the GID_SCROLL message to the window that received the first gesture message, usually a pan or a hold message, for the current touch session.

  • GID_HOLD
    A hold gesture occurs when the user touches the screen and holds their finger down for more than the hold time-out period.

    The gesture recognizer sends a GID_HOLD gesture message and then sends a GID_END message when the user lifts their finger.

    The hold gesture can be followed by a panning movement that generates several GID_PAN messages, but the gesture recognizer never sends a GID_HOLD message after a GID_PAN message. The gesture recognizer always sends a GID_HOLD message first after the user touches the screen, if the gesture parameters meet the hold time-out recognition values.

    For more information about defining the hold time-out period, see GESTUREMETRICS.

  • GID_SELECT
    A select gesture occurs when the user taps on the screen for a period of time that is less than the hold time-out period.
  • GID_DOUBLESELECT
    A select gesture occurs when the user taps twice on the screen within a period of time that is less than the hold time-out period.

Requirements

Header pwinuser.h
sysgen SYSGEN_TOUCHGESTURE

See Also

Reference

Gesture Commands
GESTUREINFO
WM_GESTURE

Other Resources

Gesture Reference