IOHIDQueue.h

Overview

IOHIDQueue defines an object used to queue values from input parsed items (IOHIDElement) contained within a Human Interface Device (HID) object. This object is useful when you need to keep track of all values of an input element, rather than just the most recent one. IOHIDQueue is a CFType object and as such conforms to all the conventions expected such object.

IOHIDQueue should be considered optional and is only useful for working with complex input elements. These elements include those whose length are greater than sizeof(CFIndex) or elements that are duplicate items. Whenever possible please defer to using IOHIDManagerRegisterInputValueCallback or IOHIDDeviceRegisterInputValueCallback.

Note:Absolute element values (based on a fixed origin) will only be placed on a queue if there is a change in value.

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 in 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 IOHIDQueue.h found at /System/Library/Frameworks/IOKit.framework/Headers/hid/IOHIDQueue.h.

Included Headers

  • <CoreFoundation/CoreFoundation.h>

  • <IOKit/hid/IOHIDBase.h>

Topics

Miscellaneous

IOHIDQueueAddElement

Adds an element to the queue

IOHIDQueueContainsElement

Queries the queue to determine if elemement has been added.

IOHIDQueueCopyNextValue

Dequeues a retained copy of an element value from the head of an IOHIDQueue.

IOHIDQueueCopyNextValueWithTimeout

Dequeues a retained copy of an element value from the head of an IOHIDQueue. This method will block until either a value is available or it times out.

IOHIDQueueCreate

Creates an IOHIDQueue object for the specified device.

IOHIDQueueGetDepth

Obtain the depth of the queue.

IOHIDQueueGetDevice

Obtain the device associated with the queue.

IOHIDQueueGetTypeID

Returns the type identifier of all IOHIDQueue instances.

IOHIDQueueRegisterValueAvailableCallback

Sets callback to be used when the queue transitions to non-empty.

IOHIDQueueRemoveElement

Removes an element from the queue

IOHIDQueueScheduleWithRunLoop

Schedules queue with run loop.

IOHIDQueueSetDepth

Sets the depth of the queue. @disussion Set the appropriate depth value based on the number of elements contained in a queue.

IOHIDQueueStart

Starts element value delivery to the queue.

IOHIDQueueStop

Stops element value delivery to the queue.

IOHIDQueueUnscheduleFromRunLoop

Unschedules queue with run loop.

Data Types

See the Overview for header-level documentation.