/*----------------------------------------------------------------------------

FILE NAME

TabletEvents.h - Header file for TabletEvent Category.
                 This is an extension to the NSEvent class.

COPYRIGHT

Copyright WACOM Technology, Inc. 2001.

All rights reserved.

----------------------------------------------------------------------------*/

#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>

typedef enum EPointerType
{
	EUnknown = 0,		// should never happen
	EPen,					// tip end of a stylus like device
	ECursor,				// any puck like device
	EEraser				// eraser end of a stylus like device
} EPointerType;

@interface NSEvent ( TabletEvents )

- (void *)wtcEventRef;
- (BOOL) wtcIsTabletPointerEvent;
- (BOOL) wtcIsTabletProximityEvent;
- (void) wtcSetLocation:(NSPoint)loc;
- (TabletPointerRec) wtcTabletRec;
- (SInt32) wtcAbsoluteX;
- (SInt32) wtcAbsoluteY;
- (SInt32) wtcAbsoluteZ;
- (void) wtcGetAbsoluteX:(SInt32*)absX Y:(SInt32*)absY Z:(SInt32*)absZ;
- (NSPoint) wtcTilt;
- (UInt16) wtcRawTabletPressure;
- (float) wtcScaledTabletPressure;
- (float) wtcRotationInDegrees; /* 0¡ <-> +359.9999¡ */
- (float) wtcRotationInRadians; /* 0 <-> 2¹ */
- (UInt16) wtcDeviceID;
@end

///////////////////////////////////////////////////////////////////////////
/* This is the name of the Notification sent when a proximity event is
   captured by the application */
extern NSString *kProximityNotification;   

/* vendor-defined ID - typically will be USB vendor ID */
extern NSString *kVendorID; 

/* vendor-defined tablet ID  */
extern NSString *kTabletID;

/* vendor-defined ID of the specific pointing device */
extern NSString *kPointerID; 

/*  unique device ID - matches to deviceID field in tablet event */
extern NSString *kDeviceID;

/*  unique tablet ID */
extern NSString *kSystemTabletID;

/* vendor-defined pointer type */
extern NSString *kVendorPointerType;      

 /* vendor-defined serial number of the specific pointing device */
extern NSString *kPointerSerialNumber;

 /* vendor-defined unique ID for this pointer */
extern NSString *kUniqueID;

/* mask representing the capabilities of the device */
extern NSString *kCapabilityMask;

 /* type of pointing device - enum to be defined */
extern NSString *kPointerType;

 /* non-zero = entering; zero = leaving */
extern NSString *kEnterProximity;  
