PointerPointProperties.HasUsage(UInt32, UInt32) PointerPointProperties.HasUsage(UInt32, UInt32) PointerPointProperties.HasUsage(UInt32, UInt32) PointerPointProperties.HasUsage(UInt32, UInt32) PointerPointProperties.HasUsage(UInt32, UInt32) Method

Definition

Gets a value that indicates whether the input data from the pointer device contains the specified Human Interface Device (HID) usage information.

public : Platform::Boolean HasUsage(unsigned int usagePage, unsigned int usageId)
bool HasUsage(uint32_t usagePage, uint32_t usageId) const;
public bool HasUsage(UInt32 usagePage, UInt32 usageId)
Public Function HasUsage(usagePage As UInt32, usageId As UInt32) As bool
var bool = pointerPointProperties.hasUsage(usagePage, usageId);

Parameters

usagePage
UInt32 UInt32 UInt32

The Human Interface Device (HID) usage page of the pointer device. Usage pages specify the class of device. For example, touch digitizers (0x0D) and generic input (0x01).

usageId
UInt32 UInt32 UInt32

Indicates a usage in a usage page.Usage ID specify a device or property in the usagePage. For example, for touch digitizers this includes tip switch (0x42) to indicate finger contact or tip pressure (0x30).

Returns

bool bool bool

True if the input data includes usage information; otherwise false.

Remarks

PointerPoint and PointerPointProperties expose common Human Interface Device (HID) usages directly.

Use HasUsage to query for additional, custom, and device-specific usages or when you need to verify that a device actually supports a property (where PointerPoint and PointerPointProperties return a default value).

The following table lists the Human Interface Device (HID) usages that are exposed directly through PointerPoint and PointerPointProperties.

Property Usage page Usage
Position (X) 0x01 0x30
Position (Y) 0x01 0x31
RawPosition (X) 0x01 0x30
RawPosition (Y) 0x01 0x31
IsInContact 0x0D 0x42 (tip) or 0x45 (eraser tip)
Pressure 0x0D 0x30
IsInverted 0x0D 0x3C
IsEraser 0x0D 0x45
Orientation 0x0D 0x3F
XTilt 0x0D 0x3D
YTilt 0x0D 0x3E
Twist 0x0D 0x41
ContactRect (Width) 0x0D 0x48
ContactRect (Height) 0x0D 0x49
ContactRectRaw (Width) 0x0D 0x48
ContactRectRaw (Height) 0x0D 0x49
TouchConfidence 0x0D 0x47
IsInRange 0x0D 0x32

See also