Difference between revisions of "Unit HIDTOUCH"
(4 intermediate revisions by the same user not shown) | |||
Line 18: | Line 18: | ||
---- | ---- | ||
− | '' | + | |
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''HID touch specific constants''' <code> HID_TOUCH_* </code></div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>HID_TOUCH_CONSUMER_NAME = 'HID Touch Consumer';</code> | ||
+ | | Name of HID Touch consumer | ||
+ | |- | ||
+ | | <code>HID_TOUCH_DESCRIPTION = 'HID Touch';</code> | ||
+ | | Description of HID Touch device | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Type definitions === | === Type definitions === | ||
---- | ---- | ||
− | '' | + | |
+ | '''HID touch point''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PHIDTouchPoint = ^THIDTouchPoint;</code> | ||
+ | |||
+ | <code>THIDTouchPoint = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | <code>X:LongWord;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>Y:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Width:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Height:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Pressure:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>TipSwitch:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>InRange:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Confidence:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>Identifier:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''HID touch points''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PHIDTouchPoints = ^THIDTouchPoints;</code> | ||
+ | |||
+ | <code>THIDTouchPoints = array[0..0] of THIDTouchPoint;</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | | | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''HID touch device''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | <code>PHIDTouchDevice = ^THIDTouchDevice;</code> | ||
+ | |||
+ | <code>THIDTouchDevice = record</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|''Touch Properties'' | ||
+ | |- | ||
+ | | <code>Touch:TTouchDevice;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|''General Properties'' | ||
+ | |- | ||
+ | | <code>MaxX:LongWord;</code> | ||
+ | | Maximum X value from current configuration | ||
+ | |- | ||
+ | | <code>MaxY:LongWord;</code> | ||
+ | | Maximum Y value from current configuration | ||
+ | |- | ||
+ | | <code>MaxZ:LongWord;</code> | ||
+ | | Maximum Z value from current configuration | ||
+ | |- | ||
+ | | <code>MaxWidth:LongWord;</code> | ||
+ | | Maximum width value from current configuration | ||
+ | |- | ||
+ | | <code>MaxHeight:LongWord;</code> | ||
+ | | Maximum height value from current configuration | ||
+ | |- | ||
+ | | <code>MaxPoints:LongWord;</code> | ||
+ | | Maximum touch points for this device | ||
+ | |- | ||
+ | | <code>LastCount:LongWord;</code> | ||
+ | | Number of touch points for last touch report | ||
+ | |- | ||
+ | | <code>LastPoints:PHIDTouchPoints;</code> | ||
+ | | Touch points for last touch report | ||
+ | |- | ||
+ | | <code>TouchPoints:PHIDTouchPoints;</code> | ||
+ | | Touch points for current touch report | ||
+ | |- | ||
+ | | <code>FirstIdentifier:LongWord;</code> | ||
+ | | Id number of first touch point identifier | ||
+ | |- | ||
+ | |colspan="2"|''HID Properties'' | ||
+ | |- | ||
+ | | <code>Timer:TTimerHandle;</code> | ||
+ | | Handle for touch release timer | ||
+ | |- | ||
+ | | <code>Collection:PHIDCollection;</code> | ||
+ | | The HID collection this touch is bound to | ||
+ | |- | ||
+ | | <code>Definitions:PHIDDefinition;</code> | ||
+ | | The input report definitions that can be accepted as touch reports | ||
+ | |- | ||
+ | | <code>FeatureDefinition:PHIDDefinition;</code> | ||
+ | | The report definition that corresponds to the maximum contact count feature | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === | ||
---- | ---- | ||
− | '' | + | ''None defined'' |
=== Function declarations === | === Function declarations === | ||
---- | ---- | ||
− | |||
+ | '''Initialization functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">procedure HIDTouchInit;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Initialize the HID Touch unit and HID Touch driver</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Called only during system startup | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''HID touch functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDTouchStart(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceStart API for HID Touch device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use TouchDeviceStart instead. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDTouchStop(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceStop API for HID Touch device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use TouchDeviceStop instead. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDTouchUpdate(Touch:PTouchDevice):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Implementation of TouchDeviceUpdate API for HID Touch device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | Not intended to be called directly by applications, use TouchDeviceUpdate instead. | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | |||
+ | '''HID touch helper functions''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDTouchCheckCollection(Collection:PHIDCollection):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a HID collection is suitable for use as a touch device</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDTouchCheckInputDefinition(Definition:PHIDDefinition):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a HID definition is suitable for use as a touch input report</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | None documented | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 0px; padding-bottom: 15px;"> | ||
+ | <pre style="border: 0; padding-bottom:0px;">function HIDTouchCheckFeatureDefinition(Definition:PHIDDefinition):LongWord;</pre> | ||
+ | <div style="font-size: 14px; padding-left: 12px;">'''Description:''' Check if a HID definition is suitable for use as a touch feature report</div> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | ! Note | ||
+ | | A touch feature report is commonly used to report the maximum number of contacts | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
Return to [[Unit_Reference|Unit Reference]] | Return to [[Unit_Reference|Unit Reference]] |
Latest revision as of 04:02, 28 March 2024
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
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
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
PHIDTouchPoints = ^THIDTouchPoints;
THIDTouchPoints = array[0..0] of THIDTouchPoint;
HID touch device
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
procedure HIDTouchInit;
Note | Called only during system startup |
---|
HID touch functions
function HIDTouchStart(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceStart instead. |
---|
function HIDTouchStop(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceStop instead. |
---|
function HIDTouchUpdate(Touch:PTouchDevice):LongWord;
Note | Not intended to be called directly by applications, use TouchDeviceUpdate instead. |
---|
HID touch helper functions
function HIDTouchCheckCollection(Collection:PHIDCollection):LongWord;
Note | None documented |
---|
function HIDTouchCheckInputDefinition(Definition:PHIDDefinition):LongWord;
Note | None documented |
---|
function HIDTouchCheckFeatureDefinition(Definition:PHIDDefinition):LongWord;
Note | A touch feature report is commonly used to report the maximum number of contacts |
---|
Return to Unit Reference