Reference
Overview
This document describes the Wacom Feel™ Multi-Touch application programmers interface. This API allows an application to get low level touch data from a Wacom multi-touch device. While the API library is included with the Wacom tablet driver, not all devices support multi-touch. The low level data provided by this API is finger point data, blob region data, and/or raw sensor data. Some devices may not support all data types.
Data Types
WacomMTError
Error conditions used as a return value for all functions.
typedef enum _WacomMTError
{
WMTErrorSuccess = 0,
WMTErrorDriverNotFound = 1,
WMTErrorBadVersion = 2,
WMTErrorAPIOutdated = 3,
WMTErrorInvalidParam = 4,
WMTErrorQuit = 5,
WMTErrorBufferTooSmall = 6
} WacomMTError;
Field | Definition |
---|---|
WMTErrorSuccess | Returned when a call is successful. |
WMTErrorDriverNotFound | Returned when the API does not find an installed and running driver. |
WMTErrorBadVersion | Returned when the version of the driver is not compatible with the API. This will happen when an application requests newer API data structures that are not supported by the driver. |
WMTErrorAPIOutdated | Returned when an application requests API data structures that are no longer supported by the driver. |
WMTErrorInvalidParam | Returned when one or more parameters are invalid. |
WMTErrorQuit | Returned by wait functions when the API quit call is made or if the API has not been successfully initialized. |
WMTErrorBufferTooSmall | Returned if the supplied buffer is too small. |
WacomMTDeviceType
Type of sensor device. Used in the capabilities data structure.
typedef enum _WacomMTDeviceType
{
WMTDeviceTypeOpaque = 0,
WMTDeviceTypeIntegrated = 1
} WacomMTDeviceType;
Field | Definition |
---|---|
WMTDeviceTypeOpaque | The touch sensor is not integrated with a display. Opaque trackpad-like devices return this value. |
WMTDeviceTypeIntegrated | The touch sensor is integrated with a display. Screen touch devices, such as TabletPCs return this value. |
WacomMTCapabilityFlags
Used in the capabilities structure to indicate the type of data supported by the device.
enum _WacomMTCapabilityFlags
{
WMTCapabilityFlagsRawAvailable = (1 << 0),
WMTCapabilityFlagsBlobAvailable = (1 << 1),
WMTCapabilityFlagsSensitivityAvailable = (1 << 2),
WMTCapabilityFlagsReserved = (1 << 31)
};
typedef int WacomMTCapabilityFlags;
Field | Definition |
---|---|
WMTCapabilityFlagsRawAvailable | If this flag is set, the device supports raw data and raw data can be read. |
WMTCapabilityFlagsBlobAvailable | If this flag is set, the device supports blob data and blob data can be read. |
WMTCapabilityFlagsSensitivityAvailable | If this flag is set, sensitivity data will be available in the finger data. Sensitivity data is a value between 0 and 0xFFFF. If this flag is not set, sensitivity data will be set to zero in each up packet and max for the down/hold packets. See the WacomMTFinger data structure for a definition of sensitivity. |
WacomMTCapability
This structure contains the physical and logical capabilities of a multi-touch device.
typedef struct _WacomMTCapability
{
int Version;
int DeviceID;
WacomMTDeviceType Type;
float LogicalOriginX;
float LogicalOriginY;
float LogicalWidth;
float LogicalHeight;
float PhysicalSizeX;
float PhysicalSizeY;
int ReportedSizeX;
int ReportedSizeY;
int ScanSizeX;
int ScanSizeY;
int FingerMax;
int BlobMax;
int BlobPointsMax;
WacomMTCapabilityFlags CapabilityFlags;
} WacomMTCapability;
Field | Definition |
---|---|
Version | The version of this data structure. |
DeviceID | A value that identifies a touch device. This is a unique number that may vary from machine to machine and session to session, but will be the same during any given session. This value is used with all other calls to identify the device. |
Type | A value that indicates the device type. An opaque device does not have a fixed relationship with the screen. An integrated device has a one-to-one relationship to a single monitor. |
LogicalOriginX | Minimum horizontal value of the device reported after interpolation. For an opaque device this value will be zero. For integrated devices this value is the (upper) left point in pixels of the mapped monitor in relation to the entire desktop. This may map to an adjacent monitor if the touch device is larger than the integrated display. |
LogicalOriginY | Minimum vertical value of the device reported after interpolation. For an opaque device this value will be zero. For integrated devices this value is the upper (left) point in pixels of the mapped monitor in relation to the entire desktop. This may map to an adjacent monitor if the touch device is larger than the integrated display. |
LogicalWidth | Width of the device reported after interpolation. For an opaque device this value is 1 and is unit neutral. For integrated devices this value is the number of pixels the device covers. This may map to an adjacent display if the touch device is larger than the integrated display. |
LogicalHeight | Height of the device reported after interpolation. For an opaque device this value is 1 and is unit neutral. For integrated devices this value is the number of pixels the device covers. This may map to an adjacent display if the touch device is larger than the integrated display. |
PhysicalSizeX | Width of the sensing area of the device in mm. Used with other size factors to convert the device data from one coordinate system to another. |
PhysicalSizeY | Height of the sensing area of the device in mm. Used with other size factors to convert the device data from one coordinate system to another. |
ReportedSizeX | Width of the device in native counts. Used with other size factors to determine the maximum resolution of the data. The horizontal resolution is calculated by dividing this value by PhysicalSizeX. |
ReportedSizeY | Height of the device in native counts. Used with other size factors to determine the maximum resolution of the data. The vertical resolution is calculated by dividing this value by PhysicalSizeY. |
ScanSizeX | Width of the device in scan coils. This is only provided for devices that support raw data. This value is used to calculate the size of the raw data buffer (ScanSizeX * ScanSizeY). If the device does not support raw data this value should be ignored. |
ScanSizeY | Height of the device in scan coils. This is only provided for devices that support raw data. This value is used to calculate the size of the raw data buffer (ScanSizeX * ScanSizeY). If the device does not support raw data this value should be ignored. |
FingerMax | Maximum number of fingers that are supported. This is the number of fingers this device can report as down at any given time. The can be used to help calculate the maximum size of the finger collection structure. This is not the maximum value for FingerID. |
BlobMax | Maximum number of blobs in a blob aggregate. A blob is a series of points that define its outline. A blob can be a primary blob or a void blob. Each void blob has one and only one parent while a primary blob can have zero or more child blobs which define void areas within the parent blob. For example, a doughnut shape is a blob aggregate with the outer ring being the parent blob and the inner ring being a child blob. |
BlobPointsMax | Maximum number of blob points that make up a blob. These blob values (BlobMax and BlobPointsMax) can be used to calculate the maximum size of a blob aggregate (BlobMax * BlobPointsMax). |
CapabilityFlags | A value to indicate the presence of specific data elements. See the WacomMTCapabilityFlags enumeration definition. |
WacomMTFingerState
Used in the finger structure to indicate the state of the finger.
typedef enum _WacomMTFingerState
{
WMTFingerStateNone = 0,
WMTFingerStateDown = 1,
WMTFingerStateHold = 2,
WMTFingerStateUp = 3
} WacomMTFingerState;
Field | Definition |
---|---|
WMTFingerStateNone | A finger buffer may contain room for more than one contact. Any extra unused contact is set to "None". Once a contact has passed through the "Up" state it has the TouchState set to "None" to indicate that no further processing is needed. Any other data included with this state is not valid. |
WMTFingerStateDown | Indicates initial finger contact. It is sent with the first touch packet for a particular contact. |
WMTFingerStateHold | Subsequent packets during the finger contact. |
WMTFingerStateUp | Last touch packet for a particular finger contact. Reported when the finger is lifted. This will be reported at the last known valid position. |
WacomMTFinger
This structure contains the data for individual touch contacts.
typedef struct _WacomMTFinger
{
int FingerID;
float X;
float Y;
float Width;
float Height;
unsigned short Sensitivity;
float Orientation;
bool Confidence;
WacomMTFingerState TouchState;
} WacomMTFinger;
Field | Definition |
---|---|
FingerID | Unique identifier of the contact. This value starts with 1 for the first contact and increments for each subsequent contact. This value resets to 1 when all contacts are lifted up. This is to be used to track contacts from frame to frame. This does not represent a unique value for a specific finger but is unique for the contact and represents the same contact point for the duration of the contact. |
X | Scaled X of the contact area in logical units. |
Y | Scaled Y of the contact area in logical units. |
Width | Width of the contact area in logical units. |
Height | Height of the contact area in logical units. |
Sensitivity | Strength of the contact. This is not pressure. This is a device/user-specific indication of the strength of the contact point. Only valid in relation to other fingers within the same frame/gesture. |
Orientation | The orientation of the contact point in degrees. |
Confidence | If true, the driver believes this is a valid touch from a finger. If false, the driver thinks this may be an accidental touch, forearm, or palm. |
TouchState | State of this finger contact. See the WacomMTFingerState enumeration definition. |
WacomMTFingerCollection
This structure allows for a list of fingers.
typedef struct _WacomMTFingerCollection
{
int Version;
int DeviceID;
int FrameNumber;
int FingerCount;
WacomMTFinger *Fingers;
} WacomMTFingerCollection;
Field | Definition |
---|---|
Version | The version of this data structure. |
DeviceID | A value that identifies a touch device. This is a unique number that may vary from machine to machine and session to session, but will be the same during any given session. |
FingerCount | The number of elements in the finger data array. This value will vary from frame to frame but will never be greater than the FingerMax value for the specific device. |
FingerData | Pointer to an array of fingers. The size of the FingerData block is FingerCount * sizeof(WacomMTFinger). |
WacomMTBlobType
Used by the blob structure to identify the blob type.
typedef enum _WacomMTBlobType
{
WMTBlobTypePrimary = 0,
WMTBlobTypeVoid = 1
} WacomMTBlobType;
Field | Definition |
---|---|
WMTBlobTypePrimary | This is an outline of an outer primary blob. |
WMTBlobTypeVoid | This is an outline of an inner blob that is contained within an outer primary blob. Void blobs are regions of no touch within primary blobs. A primary blob may contain one or more void blobs. Void blobs do not contain other blobs. A unique primary blob can be within another blob's void but the void does not reference that blob. |
WacomMTBlobPoint
This structure contains information about a specific point of blob data.
typedef struct _WacomMTBlobPoint
{
float X;
float Y;
unsigned short Sensitivity;
} WacomMTBlobPoint;
Field | Definition |
---|---|
X | Scaled X value of a blob point in logical units. |
Y | Scaled Y value of a blob point in logical units. |
Sensitivity | Strength of the signal at this blob point. This is not pressure. This is a device/user-specific indication of the strength of the contact point. Only valid in relation to other blobs within the same frame. |
WacomMTBlob
This structure contains the contact data for an irregular region.
{
int BlobID;
float X;
float Y;
bool Confidence;
WacomMTBlobType BlobType;
int ParentID;
int PointCount;
WacomMTBlobPoint *BlobPoints;
} WacomMTBlob;
Field | Definition |
---|---|
BlobID | This is a value that uniquely identifies this blob. This value persists from frame to frame. |
X | Scaled X center of gravity of the blob area in logical units. |
Y | Scaled Y center of gravity of the blob area in logical units. |
Confidence | If true, the driver believes this is a valid touch. If false, the driver thinks this may be an accidental touch, forearm, or palm. |
BlobType | The blob type this structure represents. See the WacomMTBlobType enumeration definition. |
ParentID | This identifies the parent blob. Valid only if the BlobType is "Void". |
PointCount | The number of elements in the blob points array. This is the number of points that make up the outline of the blob. |
BlobPoints | Pointer to an array of blob points. The size of the BlobPoints block is PointCount * sizeof(WacomMTBlobPoint). The blob points form a closed area. |
WacomMTBlobAggregate
This structure allows for a list of blobs.
typedef struct _WacomMTBlobAggregate
{
int Version;
int DeviceID;
int FrameNumber;
int BlobCount;
WacomMTBlob *BlobArray;
} WacomMTBlobAggregate;
Field | Definition |
---|---|
Version | The version of this data structure. |
DeviceID | A value that identifies a touch device. This is a unique number that may vary from machine to machine and session to session, but will be the same during any given session. |
FrameNumber | This value is incremented every time a new packet of contacts is detected. |
BlobCount | Number of elements in the blob data array. |
BlobArray | An array of blobs. The size of the BlobArray block is BlobCount * sizeof(WacomMTBlob). |
WacomMTRawData
This structure represents the strength values for the surface of the device.
typedef struct _WacomMTRawData
{
int Version;
int DeviceID;
int FrameNumber;
int ElementCount;
unsigned short *Sensitivity;
} WacomMTRawData;
Field | Definition |
---|---|
Version | The version of this data structure. |
DeviceID | A value that identifies a touch device. This is a unique number that may vary from machine to machine but will be the same during any given session. |
FrameNumber | This value is incremented every time a new packet of contacts is detected. |
ElementCount | Number of elements in the sensitivity array. This value should be ScanSizeY * ScanSizeX. |
Sensitivity | Pointer to an array of sensitivity values. The size of the Sensitivity block is ElementCount * sizeof(unsigned short). The location of each point is calculated as (Y * ScanSizeX) + X. |
WacomMTHitRect
This structure represents a hit test rectangle. For opaque tablets (such as Intuos), the hitrect coordinates are normalized to a value between 0.0 and 1.0. For display tablets (such as Cintiq), the hitrect coordinates are desktop pixel values.
typedef struct _WacomMTHitRect
{
float originX;
float originY;
float width;
float height;
} WacomMTHitRect;
Field | Definition |
---|---|
originX | The horizontal value of the origin point of the rectangle. |
originY | The vertical value of the origin point of the rectangle. |
width | The horizontal width of the rectangle. |
height | The vertical height of the rectangle. |
WacomMTProcessingMode
Used by the callback functions. Provides instructions for how to process the data. If no flags are set, the data is sent to the callback and not processed by the system.
typedef enum _WacomMTProcessingMode
{
WMTProcessingModeNone = 0,
WMTProcessingModeObserver = (1 << 0),
WMTProcessingModePassThrough = (1 << 1),
WMTProcessingModeReserved = (1 << 31)
} WacomMTProcessingMode;
Field | Definition |
---|---|
WMTProcessingModeNone | The data is sent to the callback and no other processing is done. |
WMTProcessingModeObserver | The data is posted in parallel to the OS for processing. |
WMTProcessingModePassthrough | The data is posted in parallel to the OS and WMT observers. |
Functions
WacomMTInitialize
Syntax
WacomMTError WacomMTInitialize(libraryAPIVersion)
This function attempts to connect the application to the driver and must be called successfully before any other Wacom Multi-Touch function is called.
Parameter | Type | Description |
---|---|---|
libraryAPIVersion | int | This is the version of the API that the application is using. This value will be used by the API to construct the expected data structures for the application. Please use the provided predefined value WACOM_MULTI_TOUCH_API_VERSION. |
Return Value See the WacomMTError enumeration definition.
WacomMTQuit
Syntax
void WacomMTQuit()
This function closes the connection to the driver service. This should be called when the application is closing or no longer needs touch data. After calling WacomMTQuit, WacomMTInitialize would need to be called again to resume touch interaction.
WacomMTGetAttachedDeviceIDs
Syntax
int WacomMTGetAttachedDeviceIDs(deviceArray, bufferSize)
This function returns the number of multi-touch sensors attached to the system.
Parameter | Type | Description |
---|---|---|
deviceArray | int * | A user-allocated buffer used to return the deviceIDs of the currently attached devices. This call will provide as many devices as will fit into the provided buffer. This can be NULL. |
bufferSize | size_t | The size of the buffer provided. Should be zero if no buffer provided. |
Return Value
The return value is the number of sensors attached to the system.
WacomMTGetDeviceCapabilities
Syntax
WacomMTError WacomMTGetDeviceCapabilities(deviceID, capabilityBuffer)
This function fills in a caller allocated WacomMTCapability structure with the capability information for the requested device identifier.
Parameter | Type | Description |
---|---|---|
deviceID | int | The ID of the device. These IDs can be from the GetAttachedDeviceIDs array, the finger packet deviceID member, the blob packet deviceID member or the raw packet deviceID member. |
capabilityBuffer | WacomMTCapability * | This is the caller allocated structure that is filled in with device capability data upon success. This structure will be defined by the API version provided at initialization. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterAttachCallback
Syntax
WacomMTError WacomMTRegisterAttachCallback(attachCallback, userData)
This function allows you to register a callback function that you would like called when a new touch device is attached. When registered the API will issue a callback for each device currently attached. Only one attach callback can be registered for each process. To cancel the attach callback, a process can call this function with NULL.
Parameter | Type | Description |
---|---|---|
attachCallback | WMT_ATTACH_CALLBACK | The function definition for this callback is: void ( *WMT_ATTACH_CALLBACK )( WacomMTCapability deviceInformation, void *userData ) |
userData | void * | This function will be called with the WacomMTCapability structure for the device attached and the userData provided when the call was registered. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterDetachCallback
Syntax
WacomMTError WacomMTRegisterDetachCallback(detachCallback, userData)
This function allows you to register a callback function that you would like called when a touch device is detached. Only one detach callback can be registered for each process. To cancel the detach callback, a process can call this function with NULL.
Parameter | Type | Description |
---|---|---|
detachCallback | WMT_DETACH_CALLBACK | The function definition for this callback is: void ( *WMT_DETACH_CALLBACK )( int deviceId, void *userData ) |
userData | void * | The function will be called with the deviceID of the sensor that has been detached and the userData provided when the call was registered. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterFingerReadCallback
Syntax
WacomMTError WacomMTRegisterFingerReadCallback(deviceID, hitRect, mode, fingerCallback, userData)
This function allows you to register a callback function that you would like called when a finger touch packet is ready and within the requested device's hit rectangle. A process can create as many callbacks as needed but only one callback per device hit rectangle. If you wish to cancel a callback, call this function or WacomMTUnRegisterFingerReadCallback() on an existing device hit rectangle with NULL for the function. The callbacks are processed in the order in which they are created.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
hitRect | WacomMTHitRect * | A rectangle used to hit test the data. If a finger begins contact within the hit rectangle the callback will be called. The callback will continue to be called for that finger until that contact is removed from the device. If a contact begins outside the hit rectangle, the callback will not be called for that finger. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
fingerCallback | WMT_FINGER_CALLBACK | The function definition for this callback is: int ( *WMT_FINGER_CALLBACK )( WacomMTFingerCollection *fingerPacket, void *userData ) The function will be called with the fingerPacket structure filled in and the userData provided when the call was registered. The fingerPacket is only valid while the callback is being processed. This memory is released/reused upon return from the callback. The return value is reserved and should be zero. |
userData | void * | A parameter provided by the caller and echoed back in the callback function. |
Return Value
See the WacomMTError enumeration definition.
WacomMTUnRegisterFingerReadCallback
Syntax
WacomMTError WacomMTUnRegisterFingerReadCallback(deviceID, hitRect, mode, userData)
This function allows you to cancel a callback.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
hitRect | WacomMTHitRect * | A rectangle that was registered for callbacks. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
userData | void * | A parameter provided by the caller and echoed back in the callback function. |
Return Value
If a matching hitrect/mode is not found, then this function will return an error. See the WacomMTError enumeration definition.
WacomMTRegisterBlobReadCallback
Syntax
WacomMTError WacomMTRegisterBlobReadCallback(deviceID, hitRect, mode, blobCallback, userData)
This function allows you to register a callback function that you would like called when blob data is ready and within the requested device's hit rectangle. A process can create as many callbacks as needed but only one callback per device hit rectangle. If you wish to cancel a callback, call this function on an existing device hit rectangle with NULL for the function. The callbacks are processed in the order in which they are created.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
hitRect | WacomMTHitRect * | A rectangle used to hit test the data. If any part of the blob contact is within the hit rectangle the callback will be called. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
blobCallback | WMT_BLOB_CALLBACK | The function definition for this callback is: int ( *WMT_BLOB_CALLBACK )( WacomMTBlobAggregate *blobPacket, void *userData ) The function will be called with the blobPacket structure filled in and the userData provided when the call was registered. The blobPacket is only valid while the callback is being processed. This memory is release/reused upon return from the callback. The return value is reserved and should be zero. |
userData | void * | A parameter provided by the caller and echoed back in the callback function. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterRawReadCallback
Syntax
WacomMTError WacomMTRegisterRawReadCallback(deviceID, mode, rawCallback, userData)
This function allows you to register a callback function that you would like called when raw data is ready for the specified device. Only one callback can be registered per device. If you wish to cancel the device callback, call this function with NULL for the callback. The callbacks are processed in the order in which they are created.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
rawCallback | WMT_RAW_CALLBACK | The function definition is: int ( *WMT_RAW_CALLBACK )( WacomMTRawData *rawPacket, void *userData ) The function will be called with the rawPacket structure filled in and the userData provided when the call was registered. The rawPacket is only valid while the callback is being processed. This memory is release/reused upon return from the callback. The return value is reserved and should be zero. |
userData | void * | A parameter provided by the caller and echoed back in the callback function. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterFingerReadHWND
Syntax
WacomMTError WacomMTRegisterFingerReadHWND(deviceID, mode, hWnd, bufferDepth)
This function allows you to register a window handle to receive finger data. When a packet of finger data for the given device is ready, a WM_FINGERDATA message will be sent to the window handle. The lParam parameter will be a pointer to a WacomMTFingerCollection structure that contains the finger data. The bufferDepth parameter determines the number of callback buffers created. The buffers are used in a ring format. Only one finger data message is allowed for each device per window handle. The window handle is also used to produce a hit rectangle. The hit rectangle is calculated when this function is called. If the window is moved or resized, this function should be called again. If the bufferDepth is changed, all existing buffers will be invalid. To cancel the device callback, this function can either be called with a bufferDepth of zero, or the function WacomMTUnRegisterFingerReadHWND can be used.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
hWnd | HWND | This is the window handle that will receive the WM_FINGERDATA message. |
bufferDepth | int | This is the number of WacomMTFingerCollection data structures that will be allocated for the message callbacks. |
Return Value
See the WacomMTError enumeration definition.
WacomMTUnRegisterFingerReadHWND
Syntax
WacomMTError WacomMTUnRegisterFingerReadHWND(hWnd)
This function allows you to unregister a window handle from receiving touch finger data updates. The function will return an error for an invalid window handle.
Parameter | Type | Description |
---|---|---|
HWND | HWND | This is a window handle that was registered to receive the WM_FINGERDATA message. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterBlobReadHWND
Syntax
WacomMTError WacomMTRegisterBlobReadHWND(deviceID, mode, hWnd, bufferDepth)
This function allows you to register a window handle to receive blob data. When a blob packet for the given device is ready a WM_BLOBDATA message will be sent to the window handle. The lParam parameter will be a pointer to a WacomMTBlobAggregate structure that contains the blob data. The bufferDepth parameter determines the number of callback buffers created. The buffers are used in a ring format. Only one blob data callback is allowed for each device per window handle. The window handle is also used to produce a hit rectangle. The hit rectangle is calculated when this function is called. If the window is moved or resized, this function should be called again. If the bufferDepth is changed, all existing buffers will be invalid. To cancel the device callback, this function can be called with a bufferDepth of zero, or the function WacomMTUnRegisterBlobReadHWND can be used.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
hWnd | HWND | This is the window handle that will receive the WM_BLOBDATA message. |
bufferDepth | int | This is the number of WacomMTBlobAggregate data structures that will be allocated for the message callbacks. |
Return Value
See the WacomMTError enumeration definition.
WacomMTUnRegisterBlobReadHWND
Syntax
WacomMTError WacomMTUnRegisterBlobReadHWND(hWnd)
This function allows you to unregister a window handle from receiving touch blob data updates. The function will return an error for an invalid window handle.
Parameter | Type | Description |
---|---|---|
hWnd | HWND | This is a window handle that was registered to receive the WM_FINGERDATA message. |
Return Value
See the WacomMTError enumeration definition.
WacomMTRegisterRawReadHWND
Syntax
WacomMTError WacomMTRegisterRawReadHWND(deviceID, mode, hWnd, bufferDepth)
This function allows you to register a window handle to receive raw data. When a data frame for the given device is ready, a WM_RAWDATA message will be sent to the window handle. The lParam parameter will be a pointer to a WacomMTRawData structure. The bufferDepth parameter determines the number of callback buffers created. The buffers are used in a ring format. Only one raw data callback is allowed for each device per window handle. If the bufferDepth is changed, all existing buffers will be invalid. To cancel the device callback, this function should be called with the bufferDepth equal to zero. It is recommended that developers use WacomMTRegisterRawReadCallback instead of this call.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
hWnd | HWND | This is the window handle that will receive the WM_RAWDATA message. |
bufferDepth | int | This is the number if RawData data structures that will be allocated for the message callbacks. |
Return Value
See the WacomMTError enumeration definition.
WacomMTMoveRegisteredFingerReadCallback
Syntax
WacomMTError WacomMTMoveRegisteredFingerReadCallback(deviceID, oldHitRect, mode, newHitRect, userData)
This function allows you to register a new finger hitrect without having to first explicitly unregister an old hitrect.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
oldHitRect | WacomMTHitRect * | A rectangle that was registered for callbacks. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
newHitRect | WacomMTHitRect * | A new rectangle to be registered for callbacks. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
userData | void * | A parameter provided by the caller and echoed back in the callback function. |
Return Value
If oldHitRect/mode is not found or if the newHitRect/mode has already been registered, then this function will return an error. See the WacomMTError enumeration definition.
WacomMTMoveRegisteredBlobReadCallback
Syntax
WacomMTError WacomMTMoveRegisteredBlobReadCallback(deviceID, oldHitRect, mode, newHitRect, userData)
This function allows you to register a new blob hitrect without having to first explicitly unregister an old hitrect.
Parameter | Type | Description |
---|---|---|
deviceID | int | The deviceID of the device. |
oldHitRect | WacomMTHitRect * | A rectangle that was registered for callbacks. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
mode | WacomMTProcessingMode | Specifies what the API does with the data during the callback. |
newHitRect | WacomMTHitRect * | A new rectangle to be registered for callbacks. A NULL rectangle will assume the entire device surface. The hit rectangle is defined in the logical units of the device. See WacomMTCapability structure for a definition of logical units. |
userData | void * | A parameter provided by the caller and echoed back in the callback function. |
Return Value
If oldHitRect/mode is not found or if the newHitRect/mode has already been registered, then this function will return an error. See the WacomMTError enumeration definition.