Mac Developer Library

Developer

IOHIDEventService Class Reference

Options
Deployment Target:

On This Page
Language:

IOHIDEventService

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Not Applicable

Objective-C

@import Kernel;

Availability


Available in OS X v10.4 and later.

  • Dispatch tablet events without orientation

    Declaration

    C++

    virtual void dispatchDigitizerEvent( AbsoluteTime timeStamp, UInt32 transducerID, DigitizerTransducerType type, bool inRange, UInt32 buttonState, IOFixed x, IOFixed y, IOFixed z = 0, IOFixed tipPressure = 0, IOFixed auxPressure = 0, IOFixed twist = 0, IOOptionBits options = 0 );

    Parameters

    timeStamp

    AbsoluteTime representing origination of event

    ID

    ID of the transducer generating the event

    type

    Type of the transducer generating the event

    inRange

    Details whether the transducer is in promitity to digitizer surface

    buttonState

    Button mask where bit0 is the primary button, bit1 secondary and so forth

    x

    Absolute location of transducer along the x-axis from 0.0 to 1.0 in 16:16 fixed point.

    y

    Absolute location of transducer along the y-axis from 0.0 to 1.0 in 16:16 fixed point.

    z

    Absolute location of transducer along the z-axis from 0.0 to 1.0 in 16:16 fixed point. This is typically used to determine the distance between the transducer and surface

    tipPressure

    Absolute pressure exerted on surface by tip from 0.0 to 1.0 in 16:16 fixed point.

    auxPressure

    Absolute pressure exerted on transducer from 0.0 to 1.0 in 16:16 fixed point.

    options

    Additional options to be used when dispatching event.

    Discussion

    This is meant to be used with transducers without any orientation.

  • Dispatch tablet events with polar orientation

    Declaration

    C++

    virtual void dispatchDigitizerEventWithPolarOrientation( AbsoluteTime timeStamp, UInt32 transducerID, DigitizerTransducerType type, bool inRange, UInt32 buttonState, IOFixed x, IOFixed y, IOFixed z = 0, IOFixed tipPressure = 0, // 0.0-1.0 in 16:16 fixed IOFixed tanPressure = 0, // 0.0-1.0 in 16:16 fixed IOFixed twist = 0, IOFixed altitude = 0, IOFixed azimuth = 0, IOOptionBits options = 0 );

    Parameters

    timeStamp

    AbsoluteTime representing origination of event

    ID

    ID of the transducer generating the event

    type

    Type of the transducer generating the event

    inRange

    Details whether the transducer is in promitity to digitizer surface

    buttonState

    Button mask where bit0 is the primary button, bit1 secondary and so forth

    x

    Absolute location of transducer along the x-axis from 0.0 to 1.0 in 16:16 fixed point.

    y

    Absolute location of transducer along the y-axis from 0.0 to 1.0 in 16:16 fixed point.

    z

    Absolute location of transducer along the z-axis from 0.0 to 1.0 in 16:16 fixed point. This is typically used to determine the distance between the transducer and surface

    tipPressure

    Absolute pressure exerted on surface by tip from 0.0 to 1.0 in 16:16 fixed point.

    auxPressure

    Absolute pressure exerted on transducer from 0.0 to 1.0 in 16:16 fixed point.

    twist

    Absolute clockwise rotation along the transducer's major axis from 0.0 to 360.0 degrees in 16:16 fixed point.

    altitude

    Specifies angle with the X-Y plane thorugh a signed, semicircular range. Positive values specify an angle downward and toward the positive Z axis. Value is represented in degrees from -180.0 to 180.0 in 16:16 fixed point.

    azimuth

    Counter clockwise rotation of the cursor around the Z-axis through a full circular range. Value is represented in degrees from 0.0 to 360.0 in 16:16 fixed point.

    options

    Additional options to be used when dispatching event.

    Discussion

    This is meant to be used with transducers that leverage polar orientation

  • Dispatch tablet events with tilt orientation

    Declaration

    C++

    virtual void dispatchDigitizerEventWithTiltOrientation( AbsoluteTime timeStamp, UInt32 ID, DigitizerTransducerType type, bool inRange, UInt32 buttonState, IOFixed x, IOFixed y, IOFixed z = 0, IOFixed tipPressure = 0, // 0.0-1.0 in 16:16 fixed IOFixed auxPressure = 0, // 0.0-1.0 in 16:16 fixed IOFixed twist = 0, IOFixed tiltX = 0, IOFixed tiltY = 0, IOOptionBits options = 0 );

    Parameters

    timeStamp

    AbsoluteTime representing origination of event

    ID

    ID of the transducer generating the event

    type

    Type of the transducer generating the event

    inRange

    Details whether the transducer is in promitity to digitizer surface

    buttonState

    Button mask where bit0 is the primary button, bit1 secondary and so forth

    x

    Absolute location of transducer along the x-axis from 0.0 to 1.0 in 16:16 fixed point.

    y

    Absolute location of transducer along the y-axis from 0.0 to 1.0 in 16:16 fixed point.

    z

    Absolute location of transducer along the z-axis from 0.0 to 1.0 in 16:16 fixed point. This is typically used to determine the distance between the transducer and surface

    tipPressure

    Absolute pressure exerted on surface by tip from 0.0 to 1.0 in 16:16 fixed point.

    auxPressure

    Absolute pressure exerted on transducer from 0.0 to 1.0 in 16:16 fixed point.

    twist

    Absolute clockwise rotation along the transducer's major axis from 0.0 to 360.0 degrees in 16:16 fixed point.

    tiltX

    Absolute plane angle between the Y-Z plane and the plane containing the transducer axis and the Y axis. A positive X tilt is to the right. Value is represented in degrees from -90.0 to 90.0 in 16:16 fixed point.

    tiltY

    Absolute plane angle between the X-Z plane and the plane containing the transducer axis and the X axis. A positive Y tilt is towards the user. Value is represented in degrees from -90.0 to 90.0 in 16:16 fixed point.

    options

    Additional options to be used when dispatching event.

    Discussion

    This is meant to be used with transducers that leverage tilt orientation

  • Dispatch multi-axis pointer event

    Declaration

    C++

    virtual void dispatchMultiAxisPointerEvent( AbsoluteTime timeStamp, UInt32 buttonState, IOFixed x, IOFixed y, IOFixed z, IOFixed rX = 0, IOFixed rY = 0, IOFixed rZ = 0, IOOptionBits options = 0 );

    Parameters

    timeStamp

    AbsoluteTime representing origination of event

    buttonState

    Button mask where bit0 is the primary button, bit1 secondary and so forth

    x

    Absolute location of pointer along the x-axis from -1.0 to 1.0 in 16:16 fixed point.

    y

    Absolute location of pointer along the y-axis from -1.0 to 1.0 in 16:16 fixed point.

    z

    Absolute location of pointer along the z-axis from -1.0 to 1.0 in 16:16 fixed point.

    rX

    Absolute rotation of pointer around the x-axis from -1.0 to 1.0 in 16:16 fixed point.

    rY

    Absolute rotation of pointer around the y-axis from -1.0 to 1.0 in 16:16 fixed point.

    rZ

    Absolute rotation of pointer around the z-axis from -1.0 to 1.0 in 16:16 fixed point.

    options

    Additional options to be used when dispatching event such as leveraging rotational axis for translation or using the z axis for vertical scrolling.

    Discussion

    This is meant to be used with joysticks or multi-axis pointer devices such as those with with 6 degrees of freedom. This function will generate related relative pointer and scroll event associated with movement.

  • Handle a client close on the interface.

    Declaration

    C++

    virtual void handleClose( IOService *client, IOOptionBitsoptions);

    Parameters

    client

    The client object that requested the close.

    options

    Options passed to IOService::close().

    Discussion

    This method is called by IOService::close() with the arbitration lock held. This method will in turn call handleClientClose() to notify interested subclasses about the client close. If this represents the last close, then the interface will also close the controller before this method returns. The controllerWillClose() method will be called before closing the controller. Subclasses should not override this method.

  • Query whether a client has an open on the interface.

    Declaration

    C++

    virtual bool handleIsOpen( const IOService *client) const;

    Return Value

    true if the specified client, or any client if none (0) is specified, presently has an open on this object.

    Discussion

    This method is always called by IOService with the arbitration lock held. Subclasses should not override this method.

  • Handle a client open on the interface.

    Declaration

    C++

    virtual bool handleOpen( IOService *client, IOOptionBitsoptions, void *argument);

    Parameters

    client

    The client object that requested the open.

    options

    Options passed to IOService::open().

    argument

    Argument passed to IOService::open().

    Return Value

    true to accept the client open, false otherwise.

    Discussion

    This method is called by IOService::open() with the arbitration lock held, and must return true to accept the client open. This method will in turn call handleClientOpen() to qualify the client requesting the open.

  • Prepare the hardware and driver to support I/O operations.

    Declaration

    C++

    virtual bool handleStart( IOService *provider );

    Parameters

    provider

    The provider argument passed to start().

    Return Value

    True on success, or false otherwise. Returning false will cause start() to fail and return false.

    Discussion

    IOHIDEventService will call this method from start() before any I/O operations are issued to the concrete subclass. Methods such as getReportElements() are only called after handleStart() has returned true. A subclass that overrides this method should begin its implementation by calling the version in super, and then check the return value.

  • Quiesce the hardware and stop the driver.

    Declaration

    C++

    virtual void handleStop( IOService *provider );

    Parameters

    provider

    The provider argument passed to stop().

    Discussion

    IOHIDEventService will call this method from stop() to signal that the hardware should be quiesced and the driver stopped. A subclass that overrides this method should end its implementation by calling the version in super.

Instance Variables

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData * _reserved;

  • Reserved for future use. (Internal use only)

    Declaration

    C++

    ExpansionData * _reserved;