GESTUREMETRICS (Compact 2013)

3/28/2014

This structure defines the constraints that the gesture recognizer uses to detect touch gestures. When you call the SystemParametersInfo function, you can use this structure to query or set system-wide parameters for the gestures API.

Syntax

typedef struct tagGESTUREMETRICS {
    UINT cbSize;
    DWORD dwID;
    DWORD dwTimeout;
    DWORD dwDistanceTolerance; 
    DWORD dwAngularTolerance;
        DWORD dwExtraInfo;
} GESTUREMETRICS, *LPGESTUREMETRICS;

Parameters

  • cbSize
    Specifies the size, in bytes, of this structure. Set this value to sizeof(GESTUREMETRICS).
  • dwID
    Contains the ID of the gesture to get or set the parameters for.
  • dwTimeout
    Specifies a value, in milliseconds, for one of the following dwID values.

    Value

    Timeout definition

    Default value

    GID_SCROLL

    The maximum period of touch contact with the screen for the gesture to be recognized as a flick.

    250

    GID_HOLD

    The minimum period of touch contact with the screen for the gesture to be recognized as a hold gesture.

    901

    GID_SELECT

    The maximum amount of time between the beginning of a touch contact to the end of the touch contact for a select gesture to be recognized.

    This value must be smaller than the timeout value for GID_HOLD.

    900

    GID_DOUBLESELECT

    The maximum amount of time between two consecutive select gestures for a double select gesture to be recognized.

    If the time between the two select gestures is greater than this, a select gesture is recognized instead.

    350

    GID_PAN

    None.

    None.

  • dwDistanceTolerance
    Specifies a value in 1/1000 of an inch for one of the following dwID values.

    Value

    Distance limit

    Default value

    GID_SCROLL

    The minimum distance a touch contact can move across the screen to be recognized as a flick.

    This value must be greater than the dwDistanceTolerance for GID_PAN.

    198

    GID_HOLD, GID_SELECT

    The maximum distance a touch contact can move across the screen for a hold or select gesture detection to be recognized. Setting this value for GCI_COMMAND_HOLD also sets this value for GCI_COMMAND_SELECT and vice versa.

    This value must be smaller than or equal to the dwDistanceTolerance for GID_PAN.

    This value must be greater than or equal to the dwDistanceTolerance for GID_SELECT.

    197

    GID_DOUBLESELECT

    The maximum distance between two consecutive select gestures for a double select gesture to be recognized.

    If the distance between the two consecutive select gestures is greater than this double select tolerance, a select gesture is recognized instead.

    197

    GID_PAN

    The minimum distance that a touch contact must move across the surface for a pan gesture to be recognized.

    198

  • dwAngularTolerance
    Specifies a value in radians.

    Value

    Angle limit

    Default value

    GID_SCROLL

    The angle of the maximum arc that a touch contact can trace for a flick to be recognized.

    If the angle of the arc is less than the set limit, the gesture is a flick.

    0.34586

    GID_HOLD, GID_SELECT, GID_DOUBLESELECT, GID_PAN

    None.

    None.

  • dwExtraInfo
    Specifies a gesture specific DWORD value.

    Value

    Additional information

    Default value

    GID_SCROLL

    The maximum angle that a flick direction can vary from the x-axis or the y-axis for the gesture recognizer to identify the flick direction as right, left, up, or down. If the direction of the flick is not identified, the direction is set to none, and the control scrolls on both the x-axis and the y-axis.

    0.5 (radians)

    GID_HOLD, GID_SELECT, GID_DOUBLESELECT, GID_PAN

    None.

     None.

Remarks

This structure is used by SystemParametersInfo.

Requirements

Header

winuser.h

sysgen

SYSGEN_TOUCHGESTURE

See Also

Reference

Gesture Structures
Touch Structures