pub struct IOHIDDeviceQueueInterface {Show 13 fields
pub QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>,
pub AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
pub Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>,
pub getAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *const CFType) -> IOReturn>,
pub setDepth: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, IOOptionBits) -> IOReturn>,
pub getDepth: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>,
pub addElement: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOHIDElement, IOOptionBits) -> IOReturn>,
pub removeElement: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOHIDElement, IOOptionBits) -> IOReturn>,
pub containsElement: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOHIDElement, *mut u8, IOOptionBits) -> IOReturn>,
pub start: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
pub stop: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>,
pub setValueAvailableCallback: Option<unsafe extern "C-unwind" fn(*mut c_void, IOHIDCallback, *mut c_void) -> IOReturn>,
pub copyNextValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut IOHIDValue, u32, IOOptionBits) -> IOReturn>,
/* private fields */
}hid only.Expand description
The object you use to access a HID queue from user space, returned by version 1.5 of the IOHIDFamily.
The functions listed here will work with any version of the IOHIDDeviceQueueInterface. This behavior is useful when you
need to keep track of all values of an input element, rather than just the most recent one.
Note:
Absolute element values (based on a fixed origin) will only be placed on a queue if there is a change in value.
See also Apple’s documentation
Fields§
§QueryInterface: Option<unsafe extern "C-unwind" fn(*mut c_void, REFIID, *mut LPVOID) -> HRESULT>§AddRef: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>§Release: Option<unsafe extern "C-unwind" fn(*mut c_void) -> ULONG>§getAsyncEventSource: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *const CFType) -> IOReturn>Obtains the event source for this IOHIDDeviceQueueInterface instance.
The returned event source can be of type CFRunLoopSourceRef or CFRunLoopTimerRef.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter pSource: Pointer to a CFType to return the run loop event source.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
setDepth: Option<unsafe extern "C-unwind" fn(*mut c_void, u32, IOOptionBits) -> IOReturn>Sets the depth for this IOHIDDeviceQueueInterface instance.
Regardless of element value size, queue will guarantee n=depth elements will be serviced.
Parameter self: Pointer to the IOHIDDeviceTransactionInterface.
Parameter depth: The maximum number of elements in the queue before the oldest elements in the queue begin to be lost.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
getDepth: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut u32) -> IOReturn>Obtains the queue depth for this IOHIDDeviceQueueInterface instance.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter pDepth: Pointer to a uint32_t to obtain the number of elements that can be serviced by the queue.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
addElement: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOHIDElement, IOOptionBits) -> IOReturn>Adds an element to this IOHIDDeviceQueueInterface instance.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter element: IOHIDElementRef referencing the element to be added to the queue.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
removeElement: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOHIDElement, IOOptionBits) -> IOReturn>Removes an element from this IOHIDDeviceQueueInterface instance.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter element: IOHIDElementRef referencing the element to be removed from the queue.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
containsElement: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut IOHIDElement, *mut u8, IOOptionBits) -> IOReturn>Determines whether an element has been added to this IOHIDDeviceQueueInterface instance.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter element: IOHIDElementRef referencing the element to be be found in the queue.
Parameter pValue: Pointer to a Boolean to return whether or not the element was found in the queue.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
start: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>Starts element value delivery to the queue.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
stop: Option<unsafe extern "C-unwind" fn(*mut c_void, IOOptionBits) -> IOReturn>Stops element value delivery to the queue.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
setValueAvailableCallback: Option<unsafe extern "C-unwind" fn(*mut c_void, IOHIDCallback, *mut c_void) -> IOReturn>Sets callback to be used when the queue transitions to non-empty.
In order to make use of asynchronous behavior, the event source obtained using getAsyncEventSource must be added to a run loop.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter callback: Callback of type IOHIDCallback to be used when data is placed on the queue.
Parameter context: Pointer to data to be passed to the callback.
Returns: Returns kIOReturnSuccess if successful or a kern_return_t if unsuccessful.
copyNextValue: Option<unsafe extern "C-unwind" fn(*mut c_void, *mut *mut IOHIDValue, u32, IOOptionBits) -> IOReturn>Dequeues a retained copy of an element value from the head of an IOHIDDeviceQueueInterface.
Because the value is a retained copy, it is up to the caller to release the value using CFRelease. Use with setValueCallback to avoid polling the queue for data.
Parameter self: Pointer to the IOHIDDeviceQueueInterface.
Parameter pValue: Pointer to a IOHIDValueRef to return the value at the head of the queue.
Parameter timeout: Timeout in milliseconds before aborting an attempt to dequeue a value from the head of a queue.
Parameter options: Reserved for future use. Ignored in current implementation. Set to zero.
Returns: Returns kIOReturnSuccess if successful, kIOReturnUnderrun if data is unavailble, or a kern_return_t if unsuccessful.
Trait Implementations§
Source§impl Clone for IOHIDDeviceQueueInterface
impl Clone for IOHIDDeviceQueueInterface
Source§fn clone(&self) -> IOHIDDeviceQueueInterface
fn clone(&self) -> IOHIDDeviceQueueInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IOHIDDeviceQueueInterface
impl Debug for IOHIDDeviceQueueInterface
Source§impl Encode for IOHIDDeviceQueueInterface
Available on crate feature objc2 only.
impl Encode for IOHIDDeviceQueueInterface
objc2 only.Source§impl RefEncode for IOHIDDeviceQueueInterface
Available on crate feature objc2 only.
impl RefEncode for IOHIDDeviceQueueInterface
objc2 only.