#ifndef _IOHIDPOINTING_H
#define _IOHIDPOINTING_H
#include <IOKit/hidsystem/IOHIDTypes.h>
#include "IOHITablet.h"
#include "IOHIDEventService.h"
#include "IOHIDevicePrivateKeys.h"
class IOHIDPointing : public IOHITablet
{
OSDeclareDefaultStructors(IOHIDPointing);
private:
IOHIDEventService * _provider;
IOItemCount _numButtons;
IOFixed _resolution;
IOFixed _scrollResolution;
IOFixed _rate;
bool _isDispatcher;
public:
static UInt16 generateDeviceID();
static IOHIDPointing * Pointing(
UInt32 buttonCount,
IOFixed pointerResolution,
IOFixed scrollResolution,
bool isDispatcher);
virtual bool initWithMouseProperties(
UInt32 buttonCount,
IOFixed pointerResolution,
IOFixed scrollResolution,
bool isDispatcher);
virtual bool start(IOService * provider);
virtual void stop(IOService * provider);
virtual void dispatchAbsolutePointerEvent(
AbsoluteTime timeStamp,
IOGPoint * newLoc,
IOGBounds * bounds,
UInt32 buttonState,
bool inRange,
SInt32 tipPressure,
SInt32 tipPressureMin,
SInt32 tipPressureMax,
IOOptionBits options = 0);
virtual void dispatchRelativePointerEvent(
AbsoluteTime timeStamp,
SInt32 dx,
SInt32 dy,
UInt32 buttonState,
IOOptionBits options = 0);
virtual void dispatchScrollWheelEvent(
AbsoluteTime timeStamp,
SInt32 deltaAxis1,
SInt32 deltaAxis2,
UInt32 deltaAxis3,
IOOptionBits options = 0);
virtual void dispatchTabletEvent(
NXEventData * tabletEvent,
AbsoluteTime ts);
virtual void dispatchProximityEvent(
NXEventData * proximityEvent,
AbsoluteTime ts);
protected:
virtual IOItemCount buttonCount();
virtual IOFixed resolution();
private:
void setupProperties();
};
#endif