Return to Unit Reference
Description
Ultibo HID Touch Consumer unit
HID Touch
This is a consumer for any generic HID touch screen, it accepts HID application collections in the digitizer device page (HID_PAGE_DIGITIZERS) with the usage set to touch screen (HID_DIGITIZERS_TOUCH_SCREEN).
The consumer will bind to any touch collection that implements at a minimum the X and Y axis and the tip switch. The event data for in range, confidence, width and height are not currently reported but may be added if required.
To prevent the HID mouse consumer from binding to touch screen devices that also include a mouse collection, this consumer sets the HID_MOUSE_REJECT_TOUCH variable to True during initialization.
Constants
[Expand]
HID touch specific constants HID_TOUCH_*
HID_TOUCH_CONSUMER_NAME = 'HID Touch Consumer';
|
Name of HID Touch consumer
|
HID_TOUCH_DESCRIPTION = 'HID Touch';
|
Description of HID Touch device
|
Type definitions
HID touch point
[Expand]
PHIDTouchPoint = ^THIDTouchPoint;
THIDTouchPoint = record
X:LongWord;
|
|
Y:LongWord;
|
|
Width:LongWord;
|
|
Height:LongWord;
|
|
Pressure:LongWord;
|
|
TipSwitch:Boolean;
|
|
InRange:Boolean;
|
|
Confidence:Boolean;
|
|
Identifier:LongWord;
|
|
HID touch points
[Expand]
PHIDTouchPoints = ^THIDTouchPoints;
THIDTouchPoints = array[0..0] of THIDTouchPoint;
HID touch device
[Expand]
PHIDTouchDevice = ^THIDTouchDevice;
THIDTouchDevice = record
Touch Properties
|
Touch:TTouchDevice;
|
|
General Properties
|
MaxX:LongWord;
|
Maximum X value from current configuration
|
MaxY:LongWord;
|
Maximum Y value from current configuration
|
MaxZ:LongWord;
|
Maximum Z value from current configuration
|
MaxWidth:LongWord;
|
Maximum width value from current configuration
|
MaxHeight:LongWord;
|
Maximum height value from current configuration
|
MaxPoints:LongWord;
|
Maximum touch points for this device
|
LastCount:LongWord;
|
Number of touch points for last touch report
|
LastPoints:PHIDTouchPoints;
|
Touch points for last touch report
|
TouchPoints:PHIDTouchPoints;
|
Touch points for current touch report
|
FirstIdentifier:LongWord;
|
Id number of first touch point identifier
|
HID Properties
|
Timer:TTimerHandle;
|
Handle for touch release timer
|
Collection:PHIDCollection;
|
The HID collection this touch is bound to
|
Definitions:PHIDDefinition;
|
The input report definitions that can be accepted as touch reports
|
FeatureDefinition:PHIDDefinition;
|
The report definition that corresponds to the maximum contact count feature
|
Public variables
None defined
Function declarations
Initialization functions
[Expand]
procedure HIDTouchInit;
Description: Initialize the HID Touch unit and HID Touch driver
Note
|
Called only during system startup
|
HID touch functions
[Expand]
function HIDTouchStart(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceStart API for HID Touch device
Note
|
Not intended to be called directly by applications, use TouchDeviceStart instead.
|
[Expand]
function HIDTouchStop(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceStop API for HID Touch device
Note
|
Not intended to be called directly by applications, use TouchDeviceStop instead.
|
[Expand]
function HIDTouchUpdate(Touch:PTouchDevice):LongWord;
Description: Implementation of TouchDeviceUpdate API for HID Touch device
Note
|
Not intended to be called directly by applications, use TouchDeviceUpdate instead.
|
HID touch helper functions
[Expand]
function HIDTouchCheckCollection(Collection:PHIDCollection):LongWord;
Description: Check if a HID collection is suitable for use as a touch device
[Expand]
function HIDTouchCheckInputDefinition(Definition:PHIDDefinition):LongWord;
Description: Check if a HID definition is suitable for use as a touch input report
[Expand]
function HIDTouchCheckFeatureDefinition(Definition:PHIDDefinition):LongWord;
Description: Check if a HID definition is suitable for use as a touch feature report
Note
|
A touch feature report is commonly used to report the maximum number of contacts
|
Return to Unit Reference