#ifndef _IOKIT_HID_IOHIDEVENTTYPES_H
#define _IOKIT_HID_IOHIDEVENTTYPES_H
#include <IOKit/IOTypes.h>
#define IOHIDEventTypeMask(type) (1<<type)
#define IOHIDEventFieldBase(type) (type << 16)
enum {
kIOHIDEventTypeNULL, kIOHIDEventTypeVendorDefined,
kIOHIDEventTypeButton,
kIOHIDEventTypeKeyboard,
kIOHIDEventTypeTranslation,
kIOHIDEventTypeRotation, kIOHIDEventTypeScroll,
kIOHIDEventTypeScale,
kIOHIDEventTypeZoom,
kIOHIDEventTypeVelocity,
kIOHIDEventTypeOrientation, kIOHIDEventTypeDigitizer,
kIOHIDEventTypeAmbientLightSensor,
kIOHIDEventTypeAccelerometer,
kIOHIDEventTypeProximity,
kIOHIDEventTypeTemperature, kIOHIDEventTypeNavigationSwipe,
kIOHIDEventTypeSwipe = kIOHIDEventTypeNavigationSwipe,
kIOHIDEventTypeMouse,
kIOHIDEventTypeProgress,
kIOHIDEventTypeCount,
kIOHIDEventTypeGyro, kIOHIDEventTypeCompass,
kIOHIDEventTypeZoomToggle,
kIOHIDEventTypeDockSwipe, kIOHIDEventTypeSymbolicHotKey,
kIOHIDEventTypePower, kIOHIDEventTypeBrightness,
kIOHIDEventTypeFluidTouchGesture, kIOHIDEventTypeBoundaryScroll,
kIOHIDEventTypeReset,
};
typedef uint32_t IOHIDEventType;
enum {
kIOHIDEventFieldIsRelative = IOHIDEventFieldBase(kIOHIDEventTypeNULL),
kIOHIDEventFieldIsCollection
};
enum {
kIOHIDEventFieldVendorDefinedUsagePage = IOHIDEventFieldBase(kIOHIDEventTypeVendorDefined),
kIOHIDEventFieldVendorDefinedUsage,
kIOHIDEventFieldVendorDefinedVersion,
kIOHIDEventFieldVendorDefinedDataLength,
kIOHIDEventFieldVendorDefinedData
};
enum {
kIOHIDEventFieldButtonMask = IOHIDEventFieldBase(kIOHIDEventTypeButton),
kIOHIDEventFieldButtonNumber,
kIOHIDEventFieldButtonClickCount,
kIOHIDEventFieldButtonPressure
};
enum {
kIOHIDEventFieldTranslationX = IOHIDEventFieldBase(kIOHIDEventTypeTranslation),
kIOHIDEventFieldTranslationY,
kIOHIDEventFieldTranslationZ
};
enum {
kIOHIDEventFieldRotationX = IOHIDEventFieldBase(kIOHIDEventTypeRotation),
kIOHIDEventFieldRotationY,
kIOHIDEventFieldRotationZ
};
enum {
kIOHIDEventFieldScrollX = IOHIDEventFieldBase(kIOHIDEventTypeScroll),
kIOHIDEventFieldScrollY,
kIOHIDEventFieldScrollZ,
kIOHIDEventFieldScrollIsPixels
};
enum {
kIOHIDEventFieldScaleX = IOHIDEventFieldBase(kIOHIDEventTypeScale),
kIOHIDEventFieldScaleY,
kIOHIDEventFieldScaleZ
};
enum {
kIOHIDEventFieldVelocityX = IOHIDEventFieldBase(kIOHIDEventTypeVelocity),
kIOHIDEventFieldVelocityY,
kIOHIDEventFieldVelocityZ
};
enum {
kIOHIDMotionStart = 0,
kIOHIDMotionEnd = 1,
};
typedef uint32_t IOHIDMotionType;
enum {
kIOHIDAccelerometerTypeNormal = 0,
kIOHIDAccelerometerTypeShake = 1
};
typedef uint32_t IOHIDAccelerometerType;
typedef IOHIDMotionType IOHIDAccelerometerSubType;
enum {
kIOHIDEventFieldAccelerometerX = IOHIDEventFieldBase(kIOHIDEventTypeAccelerometer),
kIOHIDEventFieldAccelerometerY,
kIOHIDEventFieldAccelerometerZ,
kIOHIDEventFieldAccelerometerType,
kIOHIDEventFieldAccelerometerSubType
};
enum {
kIOHIDEventFieldMouseX = IOHIDEventFieldBase(kIOHIDEventTypeMouse),
kIOHIDEventFieldMouseY,
kIOHIDEventFieldMouseZ,
kIOHIDEventFieldMouseButtonMask,
kIOHIDEventFieldMouseNumber,
kIOHIDEventFieldMouseClickCount,
kIOHIDEventFieldMousePressure
};
enum {
kIOHIDGyroTypeNormal = 0,
kIOHIDGyroTypeShake = 1,
kIOHIDGyroTypeMotion = 2
};
typedef uint32_t IOHIDGyroType;
typedef IOHIDMotionType IOHIDGyroSubType ;
enum {
kIOHIDEventFieldGyroX = IOHIDEventFieldBase(kIOHIDEventTypeGyro),
kIOHIDEventFieldGyroY,
kIOHIDEventFieldGyroZ,
kIOHIDEventFieldGyroType,
kIOHIDEventFieldGyroSubType,
};
typedef IOHIDMotionType IOHIDCompassType ;
enum {
kIOHIDEventFieldCompassX = IOHIDEventFieldBase(kIOHIDEventTypeCompass),
kIOHIDEventFieldCompassY,
kIOHIDEventFieldCompassZ,
kIOHIDEventFieldCompassType
};
enum {
kIOHIDEventFieldAmbientLightSensorLevel = IOHIDEventFieldBase(kIOHIDEventTypeAmbientLightSensor),
kIOHIDEventFieldAmbientLightSensorRawChannel0,
kIOHIDEventFieldAmbientLightSensorRawChannel1,
kIOHIDEventFieldAmbientLightSensorRawChannel2,
kIOHIDEventFieldAmbientLightSensorRawChannel3,
kIOHIDEventFieldAmbientLightDisplayBrightnessChanged
};
enum {
kIOHIDEventFieldTemperatureLevel = IOHIDEventFieldBase(kIOHIDEventTypeTemperature)
};
enum {
kIOHIDEventFieldProximityDetectionMask = IOHIDEventFieldBase(kIOHIDEventTypeProximity),
kIOHIDEventFieldProximityLevel
};
enum {
kIOHIDEventFieldOrientationRadius = IOHIDEventFieldBase(kIOHIDEventTypeOrientation),
kIOHIDEventFieldOrientationAzimuth,
kIOHIDEventFieldOrientationAltitude
};
enum {
kIOHIDEventFieldKeyboardUsagePage = IOHIDEventFieldBase(kIOHIDEventTypeKeyboard),
kIOHIDEventFieldKeyboardUsage,
kIOHIDEventFieldKeyboardDown,
kIOHIDEventFieldKeyboardRepeat
};
enum {
kIOHIDEventFieldDigitizerX = IOHIDEventFieldBase(kIOHIDEventTypeDigitizer),
kIOHIDEventFieldDigitizerY,
kIOHIDEventFieldDigitizerZ,
kIOHIDEventFieldDigitizerButtonMask,
kIOHIDEventFieldDigitizerType,
kIOHIDEventFieldDigitizerIndex,
kIOHIDEventFieldDigitizerIdentity,
kIOHIDEventFieldDigitizerEventMask,
kIOHIDEventFieldDigitizerRange,
kIOHIDEventFieldDigitizerTouch,
kIOHIDEventFieldDigitizerPressure,
kIOHIDEventFieldDigitizerBarrelPressure,
kIOHIDEventFieldDigitizerTwist,
kIOHIDEventFieldDigitizerTiltX,
kIOHIDEventFieldDigitizerTiltY,
kIOHIDEventFieldDigitizerAltitude,
kIOHIDEventFieldDigitizerAzimuth,
kIOHIDEventFieldDigitizerQuality,
kIOHIDEventFieldDigitizerDensity,
kIOHIDEventFieldDigitizerIrregularity,
kIOHIDEventFieldDigitizerMajorRadius,
kIOHIDEventFieldDigitizerMinorRadius,
kIOHIDEventFieldDigitizerCollection,
kIOHIDEventFieldDigitizerCollectionChord,
kIOHIDEventFieldDigitizerChildEventMask
};
enum {
kIOHIDEventFieldSwipeMask = IOHIDEventFieldBase(kIOHIDEventTypeSwipe),
kIOHIDEventFieldSwipeMotion,
kIOHIDEventFieldSwipeProgress,
kIOHIDEventFieldSwipePositionX,
kIOHIDEventFieldSwipePositionY,
kIOHIDEventFieldSwipeFlavor,
};
enum {
kIOHIDEventFieldNavigationSwipeMask = IOHIDEventFieldBase(kIOHIDEventTypeNavigationSwipe),
kIOHIDEventFieldNavigationSwipeMotion,
kIOHIDEventFieldNavigationSwipeProgress,
kIOHIDEventFieldNavigationSwipePositionX,
kIOHIDEventFieldNavigationSwipePositionY,
kIOHIDEventFieldNavagationSwipeFlavor,
};
enum {
kIOHIDEventFieldDockSwipeMask = IOHIDEventFieldBase(kIOHIDEventTypeDockSwipe),
kIOHIDEventFieldDockSwipeMotion,
kIOHIDEventFieldDockSwipeProgress,
kIOHIDEventFieldDockSwipePositionX,
kIOHIDEventFieldDockSwipePositionY,
kIOHIDEventFieldDockSwipeFlavor,
};
enum {
kIOHIDEventFieldFluidTouchGestureMask = IOHIDEventFieldBase(kIOHIDEventTypeFluidTouchGesture),
kIOHIDEventFieldFluidTouchGestureMotion,
kIOHIDEventFieldFluidTouchGestureProgress,
kIOHIDEventFieldFluidTouchGesturePositionX,
kIOHIDEventFieldFluidTouchGesturePositionY,
kIOHIDEventFieldFluidTouchGestureFlavor,
};
enum {
kIOHIDEventFieldBoundaryScrollMask = IOHIDEventFieldBase(kIOHIDEventTypeBoundaryScroll),
kIOHIDEventFieldBoundaryScrollMotion,
kIOHIDEventFieldBoundaryScrollProgress,
kIOHIDEventFieldBoundaryScrollPositionX,
kIOHIDEventFieldBoundaryScrollPositionY,
kIOHIDEventFieldBoundaryScrollFlavor,
};
enum {
kIOHIDEventFieldProgressEventType = IOHIDEventFieldBase(kIOHIDEventTypeProgress),
kIOHIDEventFieldProgressLevel,
};
enum {
kIOHIDEventFieldSymbolicHotKeyValue = IOHIDEventFieldBase(kIOHIDEventTypeSymbolicHotKey),
kIOHIDEventFieldSymbolicHotKeyIsCGSEvent,
};
enum {
kIOHIDPowerTypePower = 0,
kIOHIDPowerTypeCurrent = 1,
kIOHIDPowerTypeVoltage = 2
};
typedef uint32_t IOHIDPowerType;
enum {
kIOHIDPowerSubTypeNormal = 0
};
typedef uint32_t IOHIDPowerSubType;
enum {
kIOHIDEventFieldPowerMeasurement = IOHIDEventFieldBase(kIOHIDEventTypePower),
kIOHIDEventFieldPowerType,
kIOHIDEventFieldPowerSubType,
};
enum {
kIOHIDEventFieldBrightnessLevel = IOHIDEventFieldBase(kIOHIDEventTypeBrightness),
};
typedef uint32_t IOHIDEventField;
enum {
kIOHIDSwipeNone = 0x00000000,
kIOHIDSwipeUp = 0x00000001,
kIOHIDSwipeDown = 0x00000002,
kIOHIDSwipeLeft = 0x00000004,
kIOHIDSwipeRight = 0x00000008,
kIOHIDScaleExpand = 0x00000010,
kIOHIDScaleContract = 0x00000020,
kIOHIDRotateCW = 0x00000040,
kIOHIDRotateCCW = 0x00000080,
};
typedef uint32_t IOHIDSwipeMask;
enum {
kIOHIDGestureMotionNone,
kIOHIDGestureMotionHorizontalX,
kIOHIDGestureMotionVerticalY,
kIOHIDGestureMotionScale,
kIOHIDGestureMotionRotate,
kIOHIDGestureMotionTap,
kIOHIDGestureMotionDoubleTap,
kIOHIDGestureMotionFromLeftEdge,
kIOHIDGestureMotionOffLeftEdge,
kIOHIDGestureMotionFromRightEdge,
kIOHIDGestureMotionOffRightEdge,
kIOHIDGestureMotionFromTopEdge,
kIOHIDGestureMotionOffTopEdge,
kIOHIDGestureMotionFromBottomEdge,
kIOHIDGestureMotionOffBottomEdge,
};
typedef uint16_t IOHIDGestureMotion;
enum {
kIOHIDGestureFlavorNone,
kIOHIDGestureFlavorNotificationCenterPrimary,
kIOHIDGestureFlavorNotificationCenterSecondary,
kIOHIDGestureFlavorDockPrimary,
kIOHIDGestureFlavorDockSecondary,
kIOHIDGestureFlavorNavagationPrimary,
kIOHIDGestureFlavorNavagationSecondary,
};
typedef uint16_t IOHIDGestureFlavor;
enum {
kIOHIDProximityDetectionLargeBodyContact = 0x0001,
kIOHIDProximityDetectionLargeBodyFarField = 0x0002,
kIOHIDProximityDetectionIrregularObjects = 0x0004,
kIOHIDProximityDetectionEdgeStraddling = 0x0008,
kIOHIDProximityDetectionFlatFingerClasp = 0x0010,
kIOHIDProximityDetectionFingerTouch = 0x0020,
kIOHIDProximityDetectionReceiver = 0x0040,
kIOHIDProximityDetectionSmallObjectsHovering = 0x0080,
kIOHIDProximityDetectionReceiverCrude = 0x0100,
kIOHIDProximityDetectionReceiverMonitoring = 0x0200
};
typedef uint32_t IOHIDProximityDetectionMask;
enum {
kIOHIDDigitizerTransducerTypeStylus = 0x20,
kIOHIDDigitizerTransducerTypePuck,
kIOHIDDigitizerTransducerTypeFinger,
kIOHIDDigitizerTransducerTypeHand
};
typedef uint32_t IOHIDDigitizerTransducerType;
enum {
kIOHIDDigitizerEventRange = 0x00000001,
kIOHIDDigitizerEventTouch = 0x00000002,
kIOHIDDigitizerEventPosition = 0x00000004,
kIOHIDDigitizerEventStop = 0x00000008,
kIOHIDDigitizerEventPeak = 0x00000010,
kIOHIDDigitizerEventIdentity = 0x00000020,
kIOHIDDigitizerEventAttribute = 0x00000040,
kIOHIDDigitizerEventCancel = 0x00000080,
kIOHIDDigitizerEventStart = 0x00000100,
kIOHIDDigitizerEventResting = 0x00000200,
kIOHIDDigitizerEventSwipeUp = 0x01000000,
kIOHIDDigitizerEventSwipeDown = 0x02000000,
kIOHIDDigitizerEventSwipeLeft = 0x04000000,
kIOHIDDigitizerEventSwipeRight = 0x08000000,
kIOHIDDigitizerEventSwipeMask = 0xFF000000,
};
typedef uint32_t IOHIDDigitizerEventMask;
enum {
kIOHIDEventOptionNone = 0x00000000,
kIOHIDEventOptionIsAbsolute = 0x00000001,
kIOHIDEventOptionIsCollection = 0x00000002,
kIOHIDEventOptionPixelUnits = 0x00000004
};
typedef uint32_t IOHIDEventOptionBits;
enum {
kIOHIDEventPhaseUndefined = 0x00,
kIOHIDEventPhaseBegan = 0x01,
kIOHIDEventPhaseChanged = 0x02,
kIOHIDEventPhaseEnded = 0x04,
kIOHIDEventPhaseCancelled = 0x08,
kIOHIDEventPhaseMayBegin = 0x80,
kIOHIDEventEventPhaseMask = 0xFF,
kIOHIDEventEventOptionPhaseShift = 24,
};
typedef uint16_t IOHIDEventPhaseBits;
enum {
kIOHIDSymbolicHotKeyUndefined,
kIOHIDSymbolicHotKeyDictionaryApp,
};
typedef uint32_t IOHIDSymbolicHotKeyValue;
enum {
kIOHIDEventSenderIDUndefined = 0x0000000000000000LL,
};
typedef uint64_t IOHIDEventSenderID;
#ifndef KERNEL
#ifdef __LP64__
typedef double IOHIDFloat;
#else
typedef float IOHIDFloat;
#endif
typedef struct _IOHID3DPoint {
IOHIDFloat x;
IOHIDFloat y;
IOHIDFloat z;
} IOHID3DPoint;
#endif
#endif