Instance Property

setEventCallout

Sets the event callout to be called when the queue transitions to non-empty.

Declaration

IOReturn (*setEventCallout)(void *self, IOHIDCallbackFunction callback, void *callbackTarget, void *callbackRefcon);

Parameters

callback

if non-NULL is a callback to be called when data is inserted to the queue

callbackTarget

The callback target passed to the callback

callbackRefcon

The callback refcon passed to the callback.

Return Value

Returns an IOReturn code.

Discussion

In order for this to work correctly, you must call createAsyncPort and createAsyncEventSource.