#ifndef _IOHITABLET_H
#define _IOHITABLET_H
#include <IOKit/hidsystem/IOHIPointing.h>
#include <IOKit/hidsystem/IOLLEvent.h>
class IOHITabletPointer;
#define kIOHIVendorID "VendorID"
#define kIOHISystemTabletID "SystemTabletID"
#define kIOHIVendorTabletID "VendorTabletID"
typedef void (*TabletEventAction)(OSObject *target,
NXEventData *tabletData, AbsoluteTime ts);
typedef void (*ProximityEventAction)(OSObject *target,
NXEventData *proximityData, AbsoluteTime ts);
typedef void (*TabletEventCallback)(
OSObject * target,
NXEventData * tabletData,
AbsoluteTime ts,
OSObject * sender,
void * refcon);
typedef void (*ProximityEventCallback)(
OSObject * target,
NXEventData * proximityData,
AbsoluteTime ts,
OSObject * sender,
void * refcon);
class IOHITablet : public IOHIPointing
{
OSDeclareDefaultStructors(IOHITablet);
friend class IOHITabletPointer;
public:
UInt16 _systemTabletID;
private:
OSObject * _tabletEventTarget;
TabletEventAction _tabletEventAction;
OSObject * _proximityEventTarget;
ProximityEventAction _proximityEventAction;
protected:
virtual void dispatchTabletEvent(NXEventData *tabletEvent,
AbsoluteTime ts);
virtual void dispatchProximityEvent(NXEventData *proximityEvent,
AbsoluteTime ts);
virtual bool startTabletPointer(IOHITabletPointer *pointer, OSDictionary *properties);
public:
static UInt16 generateTabletID();
virtual bool init(OSDictionary * propTable);
virtual bool open(IOService * client,
IOOptionBits options,
RelativePointerEventAction rpeAction,
AbsolutePointerEventAction apeAction,
ScrollWheelEventAction sweAction,
TabletEventAction tabletAction,
ProximityEventAction proximityAction);
bool open( IOService * client,
IOOptionBits options,
void *,
RelativePointerEventCallback rpeCallback,
AbsolutePointerEventCallback apeCallback,
ScrollWheelEventCallback sweCallback,
TabletEventCallback tabletCallback,
ProximityEventCallback proximityCallback);
private:
static void _tabletEvent(IOHITablet *self,
NXEventData *tabletData,
AbsoluteTime ts);
static void _proximityEvent(IOHITablet *self,
NXEventData *proximityData,
AbsoluteTime ts);
};
#endif