Difference between revisions of "Unit Touch"
From Ultibo.org
Line 488: | Line 488: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| Called only during system startup | | Called only during system startup | ||
|- | |- | ||
Line 503: | Line 503: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to start | | The Touch device to start | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 518: | Line 518: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to stop | | The Touch device to stop | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 533: | Line 533: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to peek at | | The Touch device to peek at | ||
|- | |- | ||
− | ! | + | ! Return |
− | | ERROR_SUCCESS if packets are ready, ERROR_NO_MORE_ITEMS if not or another error code on failure | + | | ERROR_SUCCESS if packets are ready, ERROR_NO_MORE_ITEMS if not or another error code on failure. |
|- | |- | ||
|} | |} | ||
Line 548: | Line 548: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to read from | | The Touch device to read from | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to copy the touch data packets to | | Pointer to a buffer to copy the touch data packets to | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer in bytes (Must be at least TTouchData or greater) | | The size of the buffer in bytes (Must be at least TTouchData or greater) | ||
|- | |- | ||
− | ! | + | ! Flags |
| The flags for the behaviour of the read (eg TOUCH_FLAG_NON_BLOCK) | | The flags for the behaviour of the read (eg TOUCH_FLAG_NON_BLOCK) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of touch data packets copied to the buffer | | The number of touch data packets copied to the buffer | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 575: | Line 575: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to write to | | The Touch device to write to | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to copy the touch data packets from | | Pointer to a buffer to copy the touch data packets from | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer in bytes (Must be at least TTouchData or greater) | | The size of the buffer in bytes (Must be at least TTouchData or greater) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of touch data packets to copy from the buffer | | The number of touch data packets to copy from the buffer | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 599: | Line 599: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to flush | | The Touch device to flush | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 614: | Line 614: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to control | | The Touch device to control | ||
|- | |- | ||
− | ! | + | ! Request |
| The request code for the operation (eg TOUCH_CONTROL_GET_FLAG) | | The request code for the operation (eg TOUCH_CONTROL_GET_FLAG) | ||
|- | |- | ||
− | ! | + | ! Argument1 |
| The first argument for the operation (Dependent on request code) | | The first argument for the operation (Dependent on request code) | ||
|- | |- | ||
− | ! | + | ! Argument2 |
| The second argument for the operation (Dependent on request code) | | The second argument for the operation (Dependent on request code) | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 638: | Line 638: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to get properties from | | The Touch device to get properties from | ||
|- | |- | ||
− | ! | + | ! Properties |
| Pointer to a TTouchProperties structure to fill in | | Pointer to a TTouchProperties structure to fill in | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Replaced by TouchDeviceGetProperties for consistency | | Replaced by TouchDeviceGetProperties for consistency | ||
|- | |- | ||
Line 659: | Line 659: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The Touch device to get properties from | | The Touch device to get properties from | ||
|- | |- | ||
− | ! | + | ! Properties |
| Pointer to a TTouchProperties structure to fill in | | Pointer to a TTouchProperties structure to fill in | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 677: | Line 677: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Touch device entry or nil if Touch device could not be created | | Pointer to new Touch device entry or nil if Touch device could not be created | ||
|- | |- | ||
Line 689: | Line 689: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Size |
| Size in bytes to allocate for new Touch device (Including the Touch device entry) | | Size in bytes to allocate for new Touch device (Including the Touch device entry) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Touch device entry or nil if Touch device could not be created | | Pointer to new Touch device entry or nil if Touch device could not be created | ||
|- | |- | ||
Line 704: | Line 704: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 716: | Line 716: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 728: | Line 728: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 740: | Line 740: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 752: | Line 752: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 764: | Line 764: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 776: | Line 776: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 788: | Line 788: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 803: | Line 803: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 815: | Line 815: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 827: | Line 827: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 839: | Line 839: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 851: | Line 851: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Touch |
| The touch device to insert data for | | The touch device to insert data for | ||
|- | |- | ||
− | ! | + | ! Data |
| The TTouchData entry to insert | | The TTouchData entry to insert | ||
|- | |- | ||
− | ! | + | ! Signal |
| If True then signal that new data is available in the buffer | | If True then signal that new data is available in the buffer | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
− | ! | + | ! Note |
| Caller must hold the touch device lock | | Caller must hold the touch device lock | ||
|- | |- | ||
Line 875: | Line 875: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 887: | Line 887: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 899: | Line 899: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 911: | Line 911: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 923: | Line 923: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- |
Revision as of 06:12, 20 April 2018
Return to Unit Reference
Contents
[hide]Description
Ultibo Touch interface unit
To be documented
Constants
[Expand]
Touch specific constants
TOUCH_*
[Expand]
Touch device type
TOUCH_TYPE_*
[Expand]
Touch device state
TOUCH_STATE_*
[Expand]
Touch device flag
TOUCH_FLAG_*
[Expand]
Touch device control code
TOUCH_CONTROL_*
[Expand]
Touch buffer size
TOUCH_BUFFER_*
[Expand]
Touch data definitions
TOUCH_FINGER*, TOUCH_ID_*
[Expand]
Touch rotation
TOUCH_ROTATION_*
[Expand]
Touch logging
TOUCH_LOG_*
Type definitions
Touch data
Touch buffer
Touch properties
Touch enumeration callback
TTouchEnumerate = function(Touch:PTouchDevice; Data:Pointer):LongWord;
|
Touch notification callback
TTouchNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Touch device start
TTouchDeviceStart = function(Touch:PTouchDevice):LongWord;
|
Touch device stop
TTouchDeviceStop = function(Touch:PTouchDevice):LongWord;
|
Touch device peek
TTouchDevicePeek = function(Touch:PTouchDevice):LongWord;
|
Touch device read
TTouchDeviceRead = function(Touch:PTouchDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
|
Touch device write
TTouchDeviceWrite = function(Touch:PTouchDevice; Buffer:Pointer; Size,Count:LongWord):LongWord;
|
Touch device flush
TTouchDeviceFlush = function(Touch:PTouchDevice):LongWord;
|
Touch device control
TTouchDeviceControl = function(Touch:PTouchDevice; Request:Integer; Argument1:LongWord; var Argument2:LongWord):LongWord;
|
Touch device get properties
TTouchDeviceGetProperties = function(Touch:PTouchDevice; Properties:PTouchProperties):LongWord;
|
Touch device
Public variables
Touch logging
TOUCH_DEFAULT_LOG_LEVEL:LongWord = TOUCH_LOG_LEVEL_DEBUG;
|
Minimum level for Touch messages. Only messages with level greater than or equal to this will be printed. |
TOUCH_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
Touch functions
[Expand]
function TouchDeviceStart(Touch:PTouchDevice):LongWord;
Description: Start the specified Touch device ready for receiving events
[Expand]
function TouchDeviceStop(Touch:PTouchDevice):LongWord;
Description: Stop the specified Touch device and terminate receiving events
[Expand]
function TouchDevicePeek(Touch:PTouchDevice):LongWord;
Description: Peek at the buffer of the specified touch device to see if any data packets are ready
[Expand]
function TouchDeviceRead(Touch:PTouchDevice; Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: Read touch data packets from the buffer of the specified touch device
[Expand]
function TouchDeviceWrite(Touch:PTouchDevice; Buffer:Pointer; Size,Count:LongWord):LongWord;
Description: Write touch data packets to the buffer of the specified touch device
[Expand]
function TouchDeviceFlush(Touch:PTouchDevice):LongWord;
Description: Flush the contents of the buffer of the specified touch device
[Expand]
function TouchDeviceControl(Touch:PTouchDevice; Request:Integer; Argument1:LongWord; var Argument2:LongWord):LongWord;
Description: Perform a control request on the specified touch device
[Expand]
function TouchDeviceProperties(Touch:PTouchDevice; Properties:PTouchProperties):LongWord; inline;
Description: Get the properties for the specified Touch device
[Expand]
function TouchDeviceGetProperties(Touch:PTouchDevice;Properties:PTouchProperties):LongWord;
Description: Get the properties for the specified Touch device
[Expand]
function TouchDeviceCreateEx(Size:LongWord):PTouchDevice;
Description: Create a new Touch device entry
[Expand]
function TouchDeviceDestroy(Touch:PTouchDevice):LongWord;
Description: Destroy an existing Touch device entry
[Expand]
function TouchDeviceRegister(Touch:PTouchDevice):LongWord;
Description: Register a new Touch device in the Touch device table
[Expand]
function TouchDeviceDeregister(Touch:PTouchDevice):LongWord;
Description: Deregister an Touch device from the Touch device table
[Expand]
function TouchDeviceFindByName(const Name:String):PTouchDevice; inline;
Description: To be documented
[Expand]
function TouchDeviceFindByDescription(const Description:String):PTouchDevice; inline;
Description: To be documented
[Expand]
function TouchDeviceEnumerate(Callback:TTouchEnumerate; Data:Pointer):LongWord;
Description: To be documented
[Expand]
function TouchDeviceNotification(Touch:PTouchDevice; Callback:TTouchNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: To be documented
Touch helper functions
[Expand]
function TouchDeviceGetDefault:PTouchDevice; inline;
Description: Get the current default Touch device
[Expand]
function TouchDeviceSetDefault(Touch:PTouchDevice):LongWord;
Description: Set the current default Touch device
[Expand]
function TouchDeviceCheck(Touch:PTouchDevice):PTouchDevice;
Description: Check if the supplied Touch device is in the Touch device table
[Expand]
function TouchInsertData(Touch:PTouchDevice; Data:PTouchData; Signal:Boolean):LongWord;
Description: Insert a TTouchData entry into the touch device buffer
[Expand]
procedure TouchLog(Level:LongWord; Touch:PTouchDevice; const AText:String);
Description: To be documented
[Expand]
procedure TouchLogInfo(Touch:PTouchDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure TouchLogWarn(Touch:PTouchDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure TouchLogError(Touch:PTouchDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure TouchLogDebug(Touch:PTouchDevice; const AText:String); inline;
Description: To be documented
Return to Unit Reference