Partager via


GESTUREMETRICS

4/8/2010

This structure contains information about the time and distance constraints (thresholds) used by the touch gesture engine to recognize specific gesture types.

This structure is used by TKGetGestureMetrics.

Syntax

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

Parameters

  • cbSize
    Unsigned integer that specifies the size, in bytes, of this structure.
  • dwID
    DWORD that contains the gesture identifier for which the gesture metrics parameters are being obtained. The dwID field must be set to one of the following values:

    GID_PAN

    GID_ SCROLL

    GID_HOLD

    GID_SELECT

    GID_DOUBLESELECT

    All other fields will be overwritten as needed, based on the dwID value.

  • dwTimeout
    DWORD that specifies a value in milliseconds. This value is interpreted in the following way for the gesture identifier listed in the dwID field:

    GID_SCROLL This parameter determines the maximum amount of time that the touch contact with the surface must be maintained for a scroll gesture to be recognized. The returned value is 250.

    GID_HOLD The amount of time that has to elapse from the point a touch contact with the surface is made for a hold gesture to be recognized. The returned value is 901.

    GID_SELECT The maximum amount of time that can elapse between the moment a touch contact is made with the surface to the moment the touch contact lifted up from the surface, for a select gesture to be recognized. The returned value is 900.

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

    If the elapsed time between the two select gestures is greater than this doubleselect gesture timeout, a second select gesture may be recognized instead. The returned value is 350.

    GID_PAN This value is not used.

  • dwDistanceTolerance
    DWORD that specifies a value represented in thousandths of an inch. This value is interpreted in the following way for the gesture identifier listed in the dwID field:

    GID_SCROLL This parameter determines the minimum distance the touch contact must move on the surface for a scroll gesture to be recognized. The returned value is 198.

    GID_HOLD The maximum distance tolerance (the boundary radius from the finger down touch point), within which a touch contact can move across the surface for a hold gesture to be recognized. The returned value is 197.

    GID_SELECT The maximum distance tolerance (the boundary radius from the finger down touch point), within which a touch contact can move across the surface for a select gesture to be recognized. The returned value is 197.

    GID_DOUBLESELECT The maximum distance tolerance (from first finger down touch point to the second finger down touch point), within which the two consecutive select gestures have to happen for a doubleselect gesture to be recognized.

    If this distance is exceeded, a second select gesture may be recognized instead. The returned value is 197.

    GID_PAN The minimum distance tolerance (from first finger down touch point to the second finger down touch point) that a touch contact must move across the surface for a pan gesture to be detected. The returned value is 198.

  • dwAngularTolerance
    DWORD that specifies a value in radians. This value is interpreted in the following way for the gesture identifier listed in the dwID field:

    GID_SCROLL The maximum amount of angular tolerance that a touch contact can diverge within for a scroll gesture to be recognized. The return value is 0.34586 (in radians).

    GID_HOLD This value is not used.

    GID_SELECT This value is not used.

    GID_DOUBLESELECT This value is not used.

    GID_PAN This value is not used.

  • dwExtraInfo
    DWORD that specifies a gesture dependent value. This value is interpreted in the following way for the gesture identifier listed in the dwID field:

    GID_SCROLL The maximum allowed amount of angular divergence from a horizontal or vertical axis allowed for a valid scroll gesture to be classified as being in one of the core 4 pre-defined directions: Up, Down, Left, or Right. This parameter can also be referred to as the scroll gesture directional tolerance. The return value is 0.50000 (in radians).

    GID_HOLD This value is not used.

    GID_SELECT This value is not used.

    GID_DOUBLESELECT This value is not used.

    GID_PAN This value is not used.

Requirements

Header Gesture.h

See Also

Other Resources

Using Gestures in Windows Mobile 6.5