Vuo
1.2.1
|
VuoHid interface.
Typedefs | |
typedef void * | VuoHid |
Manages receiving HID control data. | |
Functions | |
char * | VuoHid_getUsageText (uint32_t usagePage, uint32_t usage) |
Returns a string containing a verbal description of the specified USB HID usage. | |
VuoList_VuoHidDevice | VuoHid_getDeviceList (void) |
Returns a list of the currently-avaialble HID devices. | |
VuoInteger | VuoHid_getLocation (void *device) |
Given an IOHIDDeviceRef , returns its hopefully-unique Vuo-specific location (based on kIOHIDLocationIDKey and kUSBInterfaceNumber). | |
bool | VuoHid_isElementValid (void *element) |
Returns true if the specified IOHIDElementRef is valid (contains usable data). | |
VuoHidControl | VuoHid_getControlForElement (void *element) |
Creates a VuoHidControl from the values of the specified IOHIDElementRef . | |
void | VuoHid_use (void) |
Indicates that the caller needs to get notifications about HID devices. | |
void | VuoHid_disuse (void) |
Indicates that the caller no longer needs notifications about HID devices. | |
void | VuoHid_addDevicesChangedTriggers (VuoOutputTrigger(devices, VuoList_VuoHidDevice)) |
Adds a trigger callback, to be invoked whenever the list of known HID devices changes. | |
void | VuoHid_removeDevicesChangedTriggers (VuoOutputTrigger(devices, VuoList_VuoHidDevice)) |
Removes a trigger callback previously added by VuoHid_addDevicesChangedTriggers. | |
VuoHid | VuoHid_make (const VuoHidDevice device, const VuoBoolean exclusive) |
Creates a reference-counted object for the specified HID device. | |
void | VuoHid_checkPendingDevices (void) |
Attempts to open each device that has been requested but hasn't yet been successfully opened. | |
void | VuoHid_addReceiveTrigger (VuoHid device, VuoOutputTrigger(receivedControl, VuoHidControl)) |
Adds a trigger callback, to be invoked whenever the specified HID device receives data. | |
void | VuoHid_removeReceiveTrigger (VuoHid device, VuoOutputTrigger(receivedControl, VuoHidControl)) |
Removes a trigger callback previously added by VuoHid_addReceiveTrigger. | |
typedef void* VuoHid |
Manages receiving HID control data.
void VuoHid_addDevicesChangedTriggers | ( | VuoOutputTrigger(devices, VuoList_VuoHidDevice) | ) |
Adds a trigger callback, to be invoked whenever the list of known HID devices changes.
Call VuoHid_use()
before calling this.
This function may be called from any thread.
void VuoHid_addReceiveTrigger | ( | VuoHid | device, |
VuoOutputTrigger(receivedControl, VuoHidControl) | |||
) |
Adds a trigger callback, to be invoked whenever the specified HID device receives data.
This function may be called from any thread.
void VuoHid_checkPendingDevices | ( | void | ) |
Attempts to open each device that has been requested but hasn't yet been successfully opened.
This function may be called from any thread.
void VuoHid_disuse | ( | void | ) |
Indicates that the caller no longer needs notifications about HID devices.
This function may be called from any thread.
VuoHidControl VuoHid_getControlForElement | ( | void * | element | ) |
Creates a VuoHidControl from the values of the specified IOHIDElementRef
.
VuoList_VuoHidDevice VuoHid_getDeviceList | ( | void | ) |
Returns a list of the currently-avaialble HID devices.
VuoInteger VuoHid_getLocation | ( | void * | device | ) |
Given an IOHIDDeviceRef
, returns its hopefully-unique Vuo-specific location (based on kIOHIDLocationIDKey and kUSBInterfaceNumber).
char* VuoHid_getUsageText | ( | uint32_t | usagePage, |
uint32_t | usage | ||
) |
Returns a string containing a verbal description of the specified USB HID usage.
The caller is responsible for freeing the returned string.
Based on "HID Usage Tables 10/28/2004 Version 1.12" (with a few spelling errors corrected), plus changes from Review Requests 28 through 52. Exceptions:
bool VuoHid_isElementValid | ( | void * | element | ) |
Returns true if the specified IOHIDElementRef
is valid (contains usable data).
VuoHid VuoHid_make | ( | const VuoHidDevice | device, |
const VuoBoolean | exclusive | ||
) |
Creates a reference-counted object for the specified HID device.
void VuoHid_removeDevicesChangedTriggers | ( | VuoOutputTrigger(devices, VuoList_VuoHidDevice) | ) |
Removes a trigger callback previously added by VuoHid_addDevicesChangedTriggers.
This function may be called from any thread.
void VuoHid_removeReceiveTrigger | ( | VuoHid | device, |
VuoOutputTrigger(receivedControl, VuoHidControl) | |||
) |
Removes a trigger callback previously added by VuoHid_addReceiveTrigger.
This function may be called from any thread.
void VuoHid_use | ( | void | ) |
Indicates that the caller needs to get notifications about HID devices.
This function may be called from any thread.