/* * * @APPLE_LICENSE_HEADER_START@ * * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code and all software distributed under the License are * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. * Please see the License for the specific language governing rights and * limitations under the License. * * @APPLE_LICENSE_HEADER_END@ */ #ifndef _IOKIT_HID_IOHIDEVENTTYPES_H #define _IOKIT_HID_IOHIDEVENTTYPES_H /* { */ #include #include #define IOHIDEventTypeMask(type) (1LL< Please Note: If you append a child digitizer event to a parent digitizer event, appropriate state will be transfered on to the parent. @constant kIOHIDDigitizerEventRange Issued when the range state has changed. @constant kIOHIDDigitizerEventTouch Issued when the touch state has changed. @constant kIOHIDDigitizerEventPosition Issued when the position has changed. @constant kIOHIDDigitizerEventStop Issued when motion has achieved a state of calculated non-movement. @constant kIOHIDDigitizerEventPeak Issues when new maximum values have been detected. @constant kIOHIDDigitizerEventIdentity Issued when the identity has changed. @constant kIOHIDDigitizerEventAttribute Issued when an attribute has changed. @constant kIOHIDDigitizerEventCancel @constant kIOHIDDigitizerEventResting @constant kIOHIDDigitizerEventFromEdgeFlat Issued when a digitizer approaches from the edge with flattened presentation @constant kIOHIDDigitizerEventFromEdgeTip Issued when a digitizer approaches from the edge with standard (i.e. un-flattened) presentation. @constant kIOHIDDigitizerEventFromCorner Issued when a digitizer approaches from a corner @constant kIOHIDDigitizerEventSwipePending Issued to indicate that an edge swipe is pending @constant kIOHIDDigitizerEventUpSwipe Issued when an up swipe has been detected. @constant kIOHIDDigitizerEventDownSwipe Issued when an down swipe has been detected. @constant kIOHIDDigitizerEventLeftSwipe Issued when an left swipe has been detected. @constant kIOHIDDigitizerEventRightSwipe Issued when an right swipe has been detected. @constant kIOHIDDigitizerEventSwipeMask Mask used to gather swipe events. */ enum { kIOHIDDigitizerEventRange = 1<<0, kIOHIDDigitizerEventTouch = 1<<1, kIOHIDDigitizerEventPosition = 1<<2, kIOHIDDigitizerEventStop = 1<<3, kIOHIDDigitizerEventPeak = 1<<4, kIOHIDDigitizerEventIdentity = 1<<5, kIOHIDDigitizerEventAttribute = 1<<6, kIOHIDDigitizerEventCancel = 1<<7, kIOHIDDigitizerEventStart = 1<<8, kIOHIDDigitizerEventResting = 1<<9, kIOHIDDigitizerEventFromEdgeFlat = 1<<10, kIOHIDDigitizerEventFromEdgeTip = 1<<11, kIOHIDDigitizerEventFromCorner = 1<<12, kIOHIDDigitizerEventSwipePending = 1<<13, kIOHIDDigitizerEventSwipeUp = 1<<24, kIOHIDDigitizerEventSwipeDown = 1<<25, kIOHIDDigitizerEventSwipeLeft = 1<<26, kIOHIDDigitizerEventSwipeRight = 1<<27, kIOHIDDigitizerEventSwipeMask = 0xFF<<24, }; typedef uint32_t IOHIDDigitizerEventMask; enum { kIOHIDEventOptionNone = 0, kIOHIDEventOptionIsAbsolute = 1<<0, kIOHIDEventOptionIsCollection = 1<<1, kIOHIDEventOptionIsPixelUnits = 1<<2, kIOHIDEventOptionIsCenterOrigin = 1<<3, kIOHIDEventOptionIsBuiltIn = 1<<4, // misspellings kIOHIDEventOptionPixelUnits = kIOHIDEventOptionIsPixelUnits, }; typedef uint32_t IOHIDEventOptionBits; enum { kIOHIDEventPhaseUndefined = 0, kIOHIDEventPhaseBegan = 1<<0, kIOHIDEventPhaseChanged = 1<<1, kIOHIDEventPhaseEnded = 1<<2, kIOHIDEventPhaseCancelled = 1<<3, kIOHIDEventPhaseMayBegin = 1<<7, kIOHIDEventEventPhaseMask = 0xFF, kIOHIDEventEventOptionPhaseShift = 24, }; typedef uint16_t IOHIDEventPhaseBits; /*! @typedef IOHIDSymbolicHotKey @abstract Enumerted values for sending symbolic hot key events. @constant kIOHIDSymbolicHotKeyDictionaryApp This will get translated into a kCGSDictionaryAppHotKey by CG. @constant kIOHIDSymbolicHotKeyIronwoodApp This will get translated into a kCGSIronwoodHotKey by CG. @constant kIOHIDSymbolicHotKeyDictationApp This will get translated into a kCGSDictationHotKey by CG. @constant kIOHIDSymbolicHotKeyOptionIsCGSHotKey This is an option flag to denote that the SymbolicHotKey value is actually from the enumeration in CGSHotKeys.h. */ enum { kIOHIDSymbolicHotKeyUndefined, kIOHIDSymbolicHotKeyDictionaryApp, kIOHIDSymbolicHotKeyIronwoodApp, kIOHIDSymbolicHotKeyDictationApp, // for kIOHIDSymbolicHotKeyOptionIsCGSHotKey, see IOHIDFamily/IOHIDEventData.h }; typedef uint32_t IOHIDSymbolicHotKeyValue; enum { kIOHIDEventSenderIDUndefined = 0x0000000000000000LL, }; typedef uint64_t IOHIDEventSenderID; // must be the same size as that returned from IORegistryEntry::getRegistryEntryID #ifndef KERNEL /*! @typedef IOHIDFloat */ #ifdef __LP64__ typedef double IOHIDFloat; #else typedef float IOHIDFloat; #endif /*! @typedef IOHID3DPoint */ typedef struct _IOHID3DPoint { IOHIDFloat x; IOHIDFloat y; IOHIDFloat z; } IOHID3DPoint; #endif #endif /* _IOKIT_HID_IOHIDEVENTTYPES_H } */