Gesture Macros (Windows Embedded CE 6.0)

1/6/2010

The following macros are available for use with the gesture API:

Name Value Description

GID_IS_BUILTIN_GESTURE(x)

(((x)>GID_END)&&((x)<=GID_LAST))

Indicates if a gesture ID is a predefined gesture command.

GID_ROTATE_ANGLE_TO_ARGUMENT(_arg_)

((USHORT)((((_arg_) + 2.0 * 3.14159265) / (4.0 * 3.14159265)) * 65536.0))

Converts an angle from radians to an unsigned, 16-bit integer.

GID_ROTATE_ANGLE_FROM_ARGUMENT(_arg_)

((((double)(_arg_) / 65536.0) * 4.0 * 3.14159265) - 2.0 * 3.14159265)

Converts an angle from an unsigned, 16-bit integer to radians.

GID_SCROLL_ANGLE(x)

(HIWORD((x)))

Retrieves the angle of a flick gesture as an unsigned, 16-bit integer from the ullArguments member of GESTUREINFO.

GID_SCROLL_DIRECTION(x)

(LOWORD((x)))

Retrieves the direction of a flick gesture from the ullArguments member of GESTUREINFO. The direction is one of the following values:

  • ARG_SCROLL_NONE
  • ARG_SCROLL_DOWN
  • ARG_SCROLL_LEFT
  • ARG_SCROLL_UP
  • ARG_SCROLL_RIGHT

GID_SCROLL_VELOCITY(x)

((LONG)(((ULONGLONG)(x)) >> 32))

Retrieves the velocity of a flick gesture, in pixels per second, from the ullArguments member of GESTUREINFO.

GID_TO_TGF(x)

(1ULL << (x))

Converts a gesture ID into a flag bit that you can use when you enable or disable gestures.

Requirements

Header pwinuser.h
sysgen SYSGEN_TOUCHGESTURE

See Also

Reference

GESTUREINFO

Other Resources

Gesture Reference