Vuo
1.2.6
|
VuoHid implementation.
Functions | |
void | VuoHid_getDeviceUsage (IOHIDDeviceRef device, uint32_t *usagePage, uint32_t *usage) |
Given a device, returns its usagePage and usage. | |
void | VuoHid_getDeviceDescription (IOHIDDeviceRef device, VuoText *manufacturer, VuoText *product, VuoInteger *vendorID, VuoInteger *productID) |
Given a device, returns strings describing its manufacturer and product model. | |
VuoInteger | VuoHid_getLocation (void *d) |
Given an IOHIDDeviceRef , returns its hopefully-unique Vuo-specific location (based on kIOHIDLocationIDKey and kUSBInterfaceNumber). | |
bool | VuoHid_isElementValid (void *e) |
Returns true if the specified IOHIDElementRef is valid (contains usable data). | |
VuoHidControl | VuoHid_getControlForElement (void *e) |
Creates a VuoHidControl from the values of the specified IOHIDElementRef . | |
VuoList_VuoHidDevice | VuoHid_getDeviceList (void) |
Returns a list of the currently-avaialble HID devices. | |
static void | VuoHid_devicesChanged (void *context, IOReturn result, void *sender, IOHIDDeviceRef device) |
Invoked by the IONotification system when a HID device is added or removed. | |
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. | |
Variables | |
static VuoTriggerSet < VuoList_VuoHidDevice > | VuoHid_deviceCallbacks |
Trigger functions to call when the list of devices changes. | |
unsigned int | VuoHid_useCount = 0 |
Process-wide count of callers (typically node instances) interested in notifications about Hid devices. | |
IOHIDManagerRef | VuoHid_manager |
Manages notifications about HID devices. | |
bool | VuoHid_devicesChangedCalled = false |
Has VuoHid_devicesChanged been called since our HID Manager was initialized? | |
bool | VuoHid_devicesChangedInitialized = false |
Has HID Manager initialization completed? | |
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.
|
static |
Invoked by the IONotification system when a HID device is added or removed.
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 * | e | ) |
Creates a VuoHidControl from the values of the specified IOHIDElementRef
.
void VuoHid_getDeviceDescription | ( | IOHIDDeviceRef | device, |
VuoText * | manufacturer, | ||
VuoText * | product, | ||
VuoInteger * | vendorID, | ||
VuoInteger * | productID | ||
) |
Given a device, returns strings describing its manufacturer and product model.
VuoList_VuoHidDevice VuoHid_getDeviceList | ( | void | ) |
Returns a list of the currently-avaialble HID devices.
void VuoHid_getDeviceUsage | ( | IOHIDDeviceRef | device, |
uint32_t * | usagePage, | ||
uint32_t * | usage | ||
) |
Given a device, returns its usagePage and usage.
VuoInteger VuoHid_getLocation | ( | void * | d | ) |
Given an IOHIDDeviceRef
, returns its hopefully-unique Vuo-specific location (based on kIOHIDLocationIDKey and kUSBInterfaceNumber).
bool VuoHid_isElementValid | ( | void * | e | ) |
Returns true if the specified IOHIDElementRef
is valid (contains usable data).
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_use | ( | void | ) |
Indicates that the caller needs to get notifications about HID devices.
This function may be called from any thread.
|
static |
Trigger functions to call when the list of devices changes.
bool VuoHid_devicesChangedCalled = false |
Has VuoHid_devicesChanged been called since our HID Manager was initialized?
bool VuoHid_devicesChangedInitialized = false |
Has HID Manager initialization completed?
IOHIDManagerRef VuoHid_manager |
Manages notifications about HID devices.
unsigned int VuoHid_useCount = 0 |
Process-wide count of callers (typically node instances) interested in notifications about Hid devices.