IOHIDEventService

Inherits from
IOService
Availability
Available in OS X v10.4 and later.
Declared in
IOHIDEventService.h

Overview

Tasks

Miscellaneous

Instance Methods

dispatchDigitizerEvent

Dispatch tablet events without orientation

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.

dispatchDigitizerEventWithPolarOrientation

Dispatch tablet events with polar orientation

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

dispatchDigitizerEventWithTiltOrientation

Dispatch tablet events with tilt orientation

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

dispatchMultiAxisPointerEvent

Dispatch multi-axis pointer event

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.

handleClose

Handle a client close on the interface.

virtual void handleClose( IOService *client, IOOptionBits options);
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.

handleIsOpen

Query whether a client has an open on the interface.

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.

handleOpen

Handle a client open on the interface.

virtual bool handleOpen( IOService *client, IOOptionBits options, 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.

handleStart

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

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.

handleStop

Quiesce the hardware and stop the driver.

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

ExpansionData * _reserved;

Reserved for future use. (Internal use only)

See Also

_reserved

ExpansionData * _reserved;

Reserved for future use. (Internal use only)

See Also