|
|
Log In | Not a Member? |
Contact ADC |
|
ADC Home > Reference Library > Reference > Hardware & Drivers > I/O Kit Framework Reference
|
IOHIDManager |
| Includes: |
IOHIDManager defines an Human Interface Device (HID) managment object. It provides global interaction with managed HID devices such as discovery/removal and receiving input events. IOHIDManager is also a CFType object and as such conforms to all the conventions expected such object.
This documentation assumes that you have a basic understanding of the
material contained in Accessing Hardware From Applications
For definitions of I/O Kit terms used in this documentation, such as
matching dictionary, family, and driver, see the overview of I/O Kit terms
and concepts n the "Device Access and the I/O Kit" chapter of
Accessing Hardware From Applications.
This documentation also assumes you have read Human Interface Device & Force Feedback.
Please review documentation before using this reference.
All of the information described in this document is contained in the header file IOHIDManager.h found at /System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDManager.h.
IOHIDDeviceScheduleWithRunLoop |
Schedules HID manager with run loop.
CF_EXPORT void IOHIDManagerScheduleWithRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
managerrunLooprunLoopModeFormally associates manager with client's run loop. Scheduling this device with the run loop is necessary before making use of any asynchronous APIs. This will propagate to current and future devices that are enumerated.
IOHIDDeviceUnscheduleFromRunLoop |
Unschedules HID manager with run loop.
CF_EXPORT void IOHIDManagerUnscheduleFromRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
managerrunLooprunLoopModeFormally disassociates device with client's run loop. This will propagate to current devices that are enumerated.
IOHIDManagerClose |
Closes the IOHIDManager.
CF_EXPORT IOReturn IOHIDManagerClose( IOHIDManagerRef manager, IOOptionBits options) ;
manageroptionsReturns kIOReturnSuccess if successful.
This will also close all devices that are currently enumerated.
IOHIDManagerCopyDevices |
Obtains currently enumerated devices.
CF_EXPORT CFSetRef IOHIDManagerCopyDevices( IOHIDManagerRef manager) ;
managerCFSetRef containing IOHIDDeviceRefs.
IOHIDManagerCreate |
Creates an IOHIDManager object.
CF_EXPORT IOHIDManagerRef IOHIDManagerCreate( CFAllocatorRef allocator, IOOptionBits options) ;
allocatoroptionsReturns a new IOHIDManagerRef.
The IOHIDManager object is meant as a global management system for communicating with HID devices.
IOHIDManagerGetProperty |
Obtains a property of an IOHIDManager.
CF_EXPORT CFTypeRef IOHIDManagerGetProperty( IOHIDManagerRef manager, CFStringRef key) ;
managerkeyReturns CFTypeRef containing the property.
Property keys are prefixed by kIOHIDDevice and declared in
IOHIDManagerGetTypeID |
Returns the type identifier of all IOHIDManager instances.
CF_EXPORT CFTypeID IOHIDManagerGetTypeID( void) ;
IOHIDManagerOpen |
Opens the IOHIDManager.
CF_EXPORT IOReturn IOHIDManagerOpen( IOHIDManagerRef manager, IOOptionBits options) ;
manageroptionsReturns kIOReturnSuccess if successful.
This will open both current and future devices that are enumerated. To establish an exclusive link use the kIOHIDOptionsTypeSeizeDevice option.
IOHIDManagerRegisterDeviceMatchingCallback |
Registers a callback to be used a device is enumerated.
CF_EXPORT void IOHIDManagerRegisterDeviceMatchingCallback( IOHIDManagerRef manager, IOHIDDeviceCallback callback, void *context) ;
managercallbackcontextOnly device matching the set criteria will be enumerated.
IOHIDManagerRegisterDeviceRemovalCallback |
Registers a callback to be used when any enumerated device is removed.
CF_EXPORT void IOHIDManagerRegisterDeviceRemovalCallback( IOHIDManagerRef manager, IOHIDDeviceCallback callback, void *context) ;
managercallbackcontextIn most cases this occurs when a device is unplugged.
IOHIDManagerRegisterInputReportCallback |
Registers a callback to be used when an input report is issued by any enumerated device.
CF_EXPORT void IOHIDManagerRegisterInputReportCallback( IOHIDManagerRef manager, IOHIDReportCallback callback, void *context) ;
managercallbackcontextAn input report is an interrupt driver report issued by a device.
IOHIDManagerRegisterInputValueCallback |
Registers a callback to be used when an input value is issued by any enumerated device.
CF_EXPORT void IOHIDManagerRegisterInputValueCallback( IOHIDManagerRef manager, IOHIDValueCallback callback, void *context) ;
managercallbackcontextAn input element refers to any element of type kIOHIDElementTypeInput and is usually issued by interrupt driven reports.
IOHIDManagerScheduleWithRunLoop |
Schedules HID manager with run loop.
CF_EXPORT void IOHIDManagerScheduleWithRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
managerrunLooprunLoopModeFormally associates manager with client's run loop. Scheduling this device with the run loop is necessary before making use of any asynchronous APIs. This will propagate to current and future devices that are enumerated.
IOHIDManagerSetDeviceMatching |
Sets matching criteria for device enumeration.
CF_EXPORT void IOHIDManagerSetDeviceMatching( IOHIDManagerRef manager, CFDictionaryRef matching) ;
managermatchingMatching keys are prefixed by kIOHIDDevice and declared in
IOHIDManagerSetDeviceMatchingMultiple |
Sets multiple matching criteria for device enumeration.
CF_EXPORT void IOHIDManagerSetDeviceMatchingMultiple( IOHIDManagerRef manager, CFArrayRef multiple) ;
managermultipleMatching keys are prefixed by kIOHIDDevice and declared in
IOHIDManagerSetInputValueMatching |
Sets matching criteria for input values received via IOHIDManagerRegisterInputValueCallback.
CF_EXPORT void IOHIDManagerSetInputValueMatching( IOHIDManagerRef manager, CFDictionaryRef matching) ;
managermatchingMatching keys are prefixed by kIOHIDElement and declared in
IOHIDManagerSetInputValueMatchingMultiple |
Sets multiple matching criteria for input values received via IOHIDManagerRegisterInputValueCallback.
CF_EXPORT void IOHIDManagerSetInputValueMatchingMultiple( IOHIDManagerRef manager, CFArrayRef multiple) ;
managermultipleMatching keys are prefixed by kIOHIDElement and declared in
IOHIDManagerSetProperty |
Sets a property for an IOHIDManager.
CF_EXPORT Boolean IOHIDManagerSetProperty( IOHIDManagerRef manager, CFStringRef key, CFTypeRef value) ;
managerkeypropertyReturns TRUE if successful.
Property keys are prefixed by kIOHIDDevice and kIOHIDManager and
declared in
IOHIDManagerUnscheduleFromRunLoop |
Unschedules HID manager with run loop.
CF_EXPORT void IOHIDManagerUnscheduleFromRunLoop( IOHIDManagerRef manager, CFRunLoopRef runLoop, CFStringRef runLoopMode) ;
managerrunLooprunLoopModeFormally disassociates device with client's run loop. This will propagate to current devices that are enumerated.
IOHIDManagerRef |
This is the type of a reference to the IOHIDManager.
typedef struct __IOHIDManager * IOHIDManagerRef;
|