Difference between revisions of "Unit Mouse"
From Ultibo.org
Line 564: | Line 564: | ||
{| 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 579: | Line 579: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! 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 591: | Line 591: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to copy the mouse data packets to | | Pointer to a buffer to copy the mouse data packets to | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer in bytes (Must be at least TMouseData or greater) | | The size of the buffer in bytes (Must be at least TMouseData or greater) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of mouse data packets copied to the buffer | | The number of mouse 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 612: | Line 612: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to copy the mouse data packets to | | Pointer to a buffer to copy the mouse data packets to | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer in bytes (Must be at least TMouseData or greater) | | The size of the buffer in bytes (Must be at least TMouseData or greater) | ||
|- | |- | ||
− | ! | + | ! Flags |
| The flags for the behaviour of the read (eg MOUSE_FLAG_NON_BLOCK) | | The flags for the behaviour of the read (eg MOUSE_FLAG_NON_BLOCK) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of mouse data packets copied to the buffer | | The number of mouse 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 636: | Line 636: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to copy the mouse data packets from | | Pointer to a buffer to copy the mouse data packets from | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer in bytes (Must be at least TMouseData or greater) | | The size of the buffer in bytes (Must be at least TMouseData or greater) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of mouse data packets to copy from the buffer | | The number of mouse 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 657: | Line 657: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 669: | Line 669: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to read from | | The mouse device to read from | ||
|- | |- | ||
− | ! | + | ! Buffer |
| Pointer to a buffer to copy the mouse data packets to | | Pointer to a buffer to copy the mouse data packets to | ||
|- | |- | ||
− | ! | + | ! Size |
| The size of the buffer in bytes (Must be at least TMouseData or greater) | | The size of the buffer in bytes (Must be at least TMouseData or greater) | ||
|- | |- | ||
− | ! | + | ! Count |
| The number of mouse data packets copied to the buffer | | The number of mouse 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 693: | Line 693: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to control | | The mouse device to control | ||
|- | |- | ||
− | ! | + | ! Request |
| The request code for the operation (eg MOUSE_CONTROL_GET_FLAG) | | The request code for the operation (eg MOUSE_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 717: | Line 717: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse to set the state for | | The mouse to set the state for | ||
|- | |- | ||
− | ! | + | ! State |
| The new state to set and notify | | The new state to set and notify | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 735: | Line 735: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Mouse device entry or nil if mouse could not be created | | Pointer to new Mouse device entry or nil if mouse could not be created | ||
|- | |- | ||
Line 747: | Line 747: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Size |
| Size in bytes to allocate for new mouse (Including the mouse device entry) | | Size in bytes to allocate for new mouse (Including the mouse device entry) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to new Mouse device entry or nil if mouse could not be created | | Pointer to new Mouse device entry or nil if mouse could not be created | ||
|- | |- | ||
Line 762: | Line 762: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to destroy | | The mouse device to destroy | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 777: | Line 777: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to register | | The mouse device to register | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 792: | Line 792: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to deregister | | The mouse device to deregister | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 807: | Line 807: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! MouseId |
| The ID number of the mouse to find | | The ID number of the mouse to find | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to mouse device entry or nil if not found | | Pointer to mouse device entry or nil if not found | ||
|- | |- | ||
Line 822: | Line 822: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Name |
| The name of the mouse to find (eg Mouse0) | | The name of the mouse to find (eg Mouse0) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to mouse device entry or nil if not found | | Pointer to mouse device entry or nil if not found | ||
|- | |- | ||
Line 837: | Line 837: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Description |
| The description of the mouse to find (eg USB HID Mouse) | | The description of the mouse to find (eg USB HID Mouse) | ||
|- | |- | ||
− | ! | + | ! Return |
| Pointer to mouse device entry or nil if not found | | Pointer to mouse device entry or nil if not found | ||
|- | |- | ||
Line 852: | Line 852: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Callback |
| The callback function to call for each mouse in the table | | The callback function to call for each mouse in the table | ||
|- | |- | ||
− | ! | + | ! Data |
| A private data pointer to pass to callback for each mouse in the table | | A private data pointer to pass to callback for each mouse in the table | ||
|- | |- | ||
− | ! | + | ! Return |
| ERROR_SUCCESS if completed or another error code on failure | | ERROR_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 870: | Line 870: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to notify changes for (Optional, pass nil for all mice) | | The mouse device to notify changes for (Optional, pass nil for all mice) | ||
|- | |- | ||
− | ! | + | ! Callback |
| The function to call when a notification event occurs | | The function to call when a notification event occurs | ||
|- | |- | ||
− | ! | + | ! Data |
| A private data pointer to pass to callback when a notification event occurs | | A private data pointer to pass to callback when a notification event occurs | ||
|- | |- | ||
− | ! | + | ! Notification |
| The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER) | | The events to register for notification of (eg DEVICE_NOTIFICATION_REGISTER) | ||
|- | |- | ||
− | ! | + | ! Flags |
| The flags to control the notification (eg NOTIFIER_FLAG_WORKER) | | The flags to control the notification (eg NOTIFIER_FLAG_WORKER) | ||
|- | |- | ||
Line 897: | Line 897: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 909: | Line 909: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 921: | Line 921: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 936: | Line 936: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use MouseDeviceRead instead | + | | Not intended to be called directly by applications, use MouseDeviceRead instead. |
|- | |- | ||
|} | |} | ||
Line 948: | Line 948: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
− | | Not intended to be called directly by applications, use MouseDeviceControl instead | + | | Not intended to be called directly by applications, use MouseDeviceControl instead. |
|- | |- | ||
|} | |} | ||
Line 960: | Line 960: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to attempt to bind to | | The USB device to attempt to bind to | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The USB interface to attempt to bind to (or nil for whole device) | | The USB interface to attempt to bind to (or nil for whole device) | ||
|- | |- | ||
− | ! | + | ! Return |
− | | USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure | + | | USB_STATUS_SUCCESS if completed, USB_STATUS_DEVICE_UNSUPPORTED if unsupported or another error code on failure. |
|- | |- | ||
|} | |} | ||
Line 978: | Line 978: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Device |
| The USB device to unbind from | | The USB device to unbind from | ||
|- | |- | ||
− | ! | + | ! Interrface |
| The USB interface to unbind from (or nil for whole device) | | The USB interface to unbind from (or nil for whole device) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another error code on failure | | USB_STATUS_SUCCESS if completed or another error code on failure | ||
|- | |- | ||
Line 996: | Line 996: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
Line 1,008: | Line 1,008: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Request |
| The USB request which has completed | | The USB request which has completed | ||
|- | |- | ||
− | ! | + | ! Note |
| Request is passed to worker thread for processing to prevent blocking the USB completion | | Request is passed to worker thread for processing to prevent blocking the USB completion | ||
|- | |- | ||
Line 1,026: | Line 1,026: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,038: | Line 1,038: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,050: | Line 1,050: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,062: | Line 1,062: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,074: | Line 1,074: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,086: | Line 1,086: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The mouse device to insert data for | | The mouse device to insert data for | ||
|- | |- | ||
− | ! | + | ! Data |
| The TMouseData entry to insert | | The TMouseData 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 mouse lock | | Caller must hold the mouse lock | ||
|- | |- | ||
Line 1,110: | Line 1,110: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,122: | Line 1,122: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,134: | Line 1,134: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,146: | Line 1,146: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,158: | Line 1,158: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Note |
| None documented | | None documented | ||
|- | |- | ||
Line 1,173: | Line 1,173: | ||
{| class="wikitable" style="font-size: 14px; background: white;" | {| class="wikitable" style="font-size: 14px; background: white;" | ||
|- | |- | ||
− | ! | + | ! Mouse |
| The USB mouse device to set the report protocol for | | The USB mouse device to set the report protocol for | ||
|- | |- | ||
− | ! | + | ! Protocol |
| The report protocol to set (eg USB_HID_PROTOCOL_BOOT) | | The report protocol to set (eg USB_HID_PROTOCOL_BOOT) | ||
|- | |- | ||
− | ! | + | ! Return |
| USB_STATUS_SUCCESS if completed or another USB error code on failure | | USB_STATUS_SUCCESS if completed or another USB error code on failure | ||
|- | |- |
Revision as of 04:51, 20 April 2018
Return to Unit Reference
Contents
[hide]Description
Ultibo Mouse interface unit
This unit provides both the Mouse device interface and the generic USB HID mouse driver.
Constants
[Expand]
Mouse specific constants
MOUSE_*
[Expand]
Mouse device type
MOUSE_TYPE_*
[Expand]
Mouse device state
MOUSE_STATE_*
[Expand]
Mouse device flag
MOUSE_FLAG_*
[Expand]
Mouse device control code
MOUSE_CONTROL_*
[Expand]
Mouse buffer size
MOUSE_BUFFER_*
[Expand]
Mouse sampling rate
MOUSE_SAMPLE_*
[Expand]
Mouse data definition
MOUSE_LEFT_*, MOUSE_RIGHT_*
[Expand]
Mouse logging
MOUSE_LOG_*
[Expand]
USB mouse specific constants
USBMOUSE_*
Type definitions
Mouse data
Mouse buffer
Mouse enumeration callback
TMouseEnumerate = function(Mouse:PMouseDevice; Data:Pointer):LongWord;
|
Mouse notification callback
TMouseNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;
|
Mouse device read
TMouseDeviceRead = function(Mouse:PMouseDevice; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
|
Mouse device control
TMouseDeviceControl = function(Mouse:PMouseDevice; Request:Integer; Argument1:LongWord; var Argument2:LongWord):LongWord;
|
Mouse device types
USB mouse device types
Public variables
Mouse logging
MOUSE_DEFAULT_LOG_LEVEL:LongWord = MOUSE_LOG_LEVEL_DEBUG;
|
Minimum level for Mouse messages. Only messages with level greater than or equal to this will be printed. |
MOUSE_LOG_ENABLED:Boolean;
|
Function declarations
Initialization functions
[Expand]
procedure MouseInit;
Description: Initialize the mouse unit, device table and USB mouse driver
Mouse functions
[Expand]
function MousePeek:LongWord;
Description: Peek at the global mouse buffer to see if any data packets are ready
[Expand]
function MouseRead(Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: Read mouse data packets from the global mouse buffer
[Expand]
function MouseReadEx(Buffer:Pointer; Size,Flags:LongWord; var Count:LongWord):LongWord;
Description: Read mouse data packets from the global mouse buffer
[Expand]
function MouseWrite(Buffer:Pointer; Size,Count:LongWord):LongWord;
Description: Write mouse data packets to the global mouse buffer
[Expand]
function MouseDeviceRead(Mouse:PMouseDevice; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: Read mouse data packets from the buffer of the specified mouse
[Expand]
function MouseDeviceControl(Mouse:PMouseDevice; Request:Integer; Argument1:LongWord; var Argument2:LongWord):LongWord;
Description: Perform a control request on the specified mouse device
[Expand]
function MouseDeviceSetState(Mouse:PMouseDevice; State:LongWord):LongWord;
Description: Set the state of the specified mouse and send a notification
[Expand]
function MouseDeviceCreateEx(Size:LongWord):PMouseDevice;
Description: Create a new Mouse device entry
[Expand]
function MouseDeviceDestroy(Mouse:PMouseDevice):LongWord;
Description: Destroy an existing Mouse device entry
[Expand]
function MouseDeviceRegister(Mouse:PMouseDevice):LongWord;
Description: Register a new Mouse device in the Mouse table
[Expand]
function MouseDeviceDeregister(Mouse:PMouseDevice):LongWord;
Description: Deregister a Mouse device from the Mouse table
[Expand]
function MouseDeviceFind(MouseId:LongWord):PMouseDevice;
Description: Find a mouse device by ID in the mouse table
[Expand]
function MouseDeviceFindByName(const Name:String):PMouseDevice; inline;
Description: Find a mouse device by name in the mouse table
[Expand]
function MouseDeviceFindByDescription(const Description:String):PMouseDevice; inline;
Description: Find a mouse device by description in the mouse table
[Expand]
function MouseDeviceEnumerate(Callback:TMouseEnumerate; Data:Pointer):LongWord;
Description: Enumerate all mouse devices in the mouse table
[Expand]
function MouseDeviceNotification(Mouse:PMouseDevice; Callback:TMouseNotification; Data:Pointer; Notification,Flags:LongWord):LongWord;
Description: Register a notification for mouse device changes
RTL console functions
[Expand]
function SysConsoleHideMouse(AUserData:Pointer):Boolean;
Description: Handler for Platform ConsoleHideMouse function
[Expand]
function SysConsoleShowMouse(X,Y:LongWord; AUserData:Pointer):Boolean;
Description: Handler for Platform ConsoleShowMouse function
[Expand]
function SysConsoleReadMouse(var X,Y,Buttons:LongWord; AUserData:Pointer):Boolean;
Description: Handler for Platform ConsoleReadMouse function
USB mouse functions
[Expand]
function USBMouseDeviceRead(Mouse:PMouseDevice; Buffer:Pointer; Size:LongWord; var Count:LongWord):LongWord;
Description: Implementation of MouseDeviceRead API for USB Mouse
[Expand]
function USBMouseDeviceControl(Mouse:PMouseDevice; Request:Integer; Argument1:LongWord; var Argument2:LongWord):LongWord;
Description: Implementation of MouseDeviceControl API for USB Mouse
[Expand]
function USBMouseDriverBind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Bind the Mouse driver to a USB device if it is suitable
[Expand]
function USBMouseDriverUnbind(Device:PUSBDevice; Interrface:PUSBInterface):LongWord;
Description: Unbind the Mouse driver from a USB device
[Expand]
procedure USBMouseReportWorker(Request:PUSBRequest);
Description: Called (by a Worker thread) to process a completed USB request from a USB mouse IN interrupt endpoint
[Expand]
procedure USBMouseReportComplete(Request:PUSBRequest);
Description: Called when a USB request from a USB mouse IN interrupt endpoint completes
Mouse helper functions
[Expand]
function MouseDeviceCheck(Mouse:PMouseDevice):PMouseDevice;
Description: Check if the supplied Mouse is in the mouse table
[Expand]
function MouseDeviceStateToString(MouseState:LongWord):String;
Description: To be documented
[Expand]
function MouseDeviceStateToNotification(State:LongWord):LongWord;
Description: Convert a Mouse state value into the notification code for device notifications
[Expand]
function MouseInsertData(Mouse:PMouseDevice; Data:PMouseData; Signal:Boolean):LongWord;
Description: Insert a TMouseData entry into the mouse buffer (Direct or Global)
[Expand]
procedure MouseLog(Level:LongWord; Mouse:PMouseDevice; const AText:String);
Description: To be documented
[Expand]
procedure MouseLogInfo(Mouse:PMouseDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure MouseLogWarn(Mouse:PMouseDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure MouseLogError(Mouse:PMouseDevice; const AText:String); inline;
Description: To be documented
[Expand]
procedure MouseLogDebug(Mouse:PMouseDevice;const AText:String); inline;
Description: To be documented
USB mouse helper functions
[Expand]
function USBMouseDeviceSetProtocol(Mouse:PUSBMouseDevice; Protocol:Byte):LongWord;
Description: Set the report protocol for a USB mouse device
Return to Unit Reference