Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

CGPrivateAPI.h

Go to the documentation of this file.
00001 /*
00002 ===========================================================================
00003 Copyright (C) 1999-2005 Id Software, Inc.
00004 
00005 This file is part of Quake III Arena source code.
00006 
00007 Quake III Arena source code is free software; you can redistribute it
00008 and/or modify it under the terms of the GNU General Public License as
00009 published by the Free Software Foundation; either version 2 of the License,
00010 or (at your option) any later version.
00011 
00012 Quake III Arena source code is distributed in the hope that it will be
00013 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Foobar; if not, write to the Free Software
00019 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020 ===========================================================================
00021 */
00022 
00023 
00024 typedef unsigned long CGSNotificationType;
00025 typedef void * CGSNotificationData;
00026 typedef void * CGSNotificationArg;
00027 typedef void * CGSWindowID;
00028 typedef void * CGSConnectionID;
00029 
00030 typedef unsigned long long      CGSUInt64;
00031 typedef long long               CGSInt64;
00032 typedef unsigned long           CGSUInt32;
00033 typedef long                    CGSInt32;
00034 typedef unsigned short          CGSUInt16;
00035 typedef short                   CGSInt16;
00036 typedef unsigned char           CGSUInt8;
00037 typedef char                    CGSInt8;
00038 typedef float                   CGSFloat32;
00039 
00040 typedef CGSUInt32 CGSByteCount;
00041 typedef CGSUInt16 CGSEventRecordVersion;
00042 typedef unsigned long CGSEventType;
00043 typedef CGSUInt64 CGSEventRecordTime;  /* nanosecond timer */
00044 typedef unsigned long CGSEventFlag;
00045 typedef CGSUInt32  CGSError;
00046 
00047 
00048 typedef union {
00049     struct {    /* For mouse events */
00050         CGSUInt8    subx;           /* sub-pixel position for x */
00051         CGSUInt8    suby;           /* sub-pixel position for y */
00052         CGSInt16    eventNum;       /* unique identifier for this button */
00053         CGSInt32    click;          /* click state of this event */
00054         CGSUInt8    pressure;   /* pressure value: 0=none, 255=full */
00055         CGSInt8     _reserved1;
00056         CGSInt16    _reserved2;
00057         CGSInt16    deltaX;
00058         CGSInt16    deltaY;
00059         CGSInt32    _padding[8];
00060     } mouse;
00061     struct {    /* For pointer movement events */
00062         CGSInt16    _obsolete_deltaX;   /* Revert to subX, subY, eventNum */
00063         CGSInt16    _obsolete_deltaY;   /* for Gonzo 1H */
00064         CGSInt32    click;          /* click state of this event */
00065         CGSUInt8    pressure;   /* pressure value: 0=none, 255=full */
00066         CGSInt8     _reserved1;
00067         CGSInt16    _reserved2;
00068         CGSInt16    deltaX;
00069         CGSInt16    deltaY;
00070         CGSInt32    _padding[8];
00071     } move;
00072     struct {    /* For key-down and key-up events */
00073         CGSInt16    reserved;
00074         CGSInt16    repeat;     /* for key-down: nonzero if really a repeat */
00075         CGSUInt16   charSet;    /* character set code */
00076         CGSUInt16   charCode;   /* character code in that set */
00077         CGSUInt16   keyCode;    /* device-dependent virtual key code */
00078         CGSInt16    keyData;    /* device-dependent info */
00079         CGSInt16    specialKey; /* CPSSpecialKeyID if kCGSFlagsMaskSpecialKey is set */
00080         CGSInt16    _pad;
00081         CGSInt32    _padding[8];
00082     } key;
00083     struct {    /* For mouse-entered and mouse-exited events */
00084         CGSInt16    reserved;
00085         CGSInt16    eventNum;   /* unique identifier from mouse down event */
00086         CGSInt32    trackingNum;    /* unique identifier from settrackingrect */
00087         CGSInt32    userData;   /* unCGSInt32erpreted CGSInt32eger from settrackingrect */
00088         CGSInt32    _padding[9];
00089     } tracking;
00090     struct {    /* For process-related events */
00091         CGSUInt16   notifyCode; /* CPSNotificationCodes in CPSProcesses.h */
00092         CGSUInt16   flags;      /* CPSEventFlags in CPSProcesses.h */
00093         CGSUInt32   targetHiPSN;    /* hiword of PSN */
00094         CGSUInt32   targetLoPSN;    /* loword of PSN */
00095         CGSInt32    status;     /* operation result */
00096         CGSInt32    _padding[8];
00097     } process;
00098     struct {        /* For scroll wheel events */
00099         CGSInt16    deltaAxis1;
00100         CGSInt16    deltaAxis2;
00101         CGSInt16    deltaAxis3;
00102         CGSInt16    reserved1;
00103         CGSInt32    reserved2;
00104         CGSInt32    _padding[9];
00105     } scrollWheel;
00106     struct {
00107         CGSInt32    x;  /* absolute x coordinate in tablet space at full tablet resolution */
00108         CGSInt32    y;  /* absolute y coordinate in tablet space at full tablet resolution */
00109         CGSInt32    z;  /* absolute z coordinate in tablet space at full tablet resolution */
00110         CGSUInt16   buttons;    /* one bit per button - bit 0 is first button - 1 = closed */
00111         CGSUInt16   pressure;   /* scaled pressure value; MAXPRESSURE=(2^16)-1, MINPRESSURE=0 */
00112         struct {
00113             CGSInt16 x; /* scaled tilt x value; range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */
00114             CGSInt16 y; /* scaled tilt y value; range is -((2^15)-1) to (2^15)-1 (-32767 to 32767) */
00115         } tilt;
00116         CGSUInt16   rotation;   /* Fixed-point representation of device rotation in a 10.6 format */
00117         CGSInt16    tangentialPressure; /* tangential pressure on the device; range same as tilt */
00118         CGSUInt16   deviceID;   /* system-assigned unique device ID - matches to deviceID field in proximity event */
00119         CGSInt16    vendor1;    /* vendor-defined signed 16-bit integer */
00120         CGSInt16    vendor2;    /* vendor-defined signed 16-bit integer */
00121         CGSInt16    vendor3;    /* vendor-defined signed 16-bit integer */
00122         CGSInt32    _padding[4];
00123     } tablet;
00124     struct {
00125         CGSUInt16   vendorID;   /* vendor-defined ID - typically will be USB vendor ID */
00126         CGSUInt16   tabletID;   /* vendor-defined tablet ID - typically will be USB product ID for the tablet */
00127         CGSUInt16   pointerID;  /* vendor-defined ID of the specific pointing device */
00128         CGSUInt16   deviceID;   /* system-assigned unique device ID - matches to deviceID field in tablet event */
00129         CGSUInt16   systemTabletID; /* system-assigned unique tablet ID */
00130         CGSUInt16   vendorPointerType;  /* vendor-defined pointer type */
00131         CGSUInt32  pointerSerialNumber; /* vendor-defined serial number of the specific pointing device */
00132         CGSUInt64   uniqueID;   /* vendor-defined unique ID for this pointer */
00133         CGSUInt32   capabilityMask; /* mask representing the capabilities of the device */
00134         CGSUInt8    pointerType;    /* type of pointing device - enum to be defined */
00135         CGSUInt8    enterProximity; /* non-zero = entering; zero = leaving */
00136         CGSInt16    reserved1;
00137         CGSInt32    _padding[4];
00138     } proximity;
00139     struct {    /* For AppKit-defined, sys-defined, and app-defined events */
00140         CGSInt16    reserved;
00141         CGSInt16    subtype;    /* event subtype for compound events */
00142         union {
00143             CGSFloat32  F[11];  /* for use in compound events */
00144             CGSInt32    L[11];  /* for use in compound events */
00145             CGSInt16    S[22];  /* for use in compound events */
00146             CGSInt8 C[44];  /* for use in compound events */
00147         } misc;
00148     } compound;
00149 } CGSEventRecordData;
00150 
00151 
00152 struct _CGSEventRecord {
00153     CGSEventRecordVersion major;
00154     CGSEventRecordVersion minor;
00155     CGSByteCount length;    /* Length of complete event record */
00156     CGSEventType type;      /* An event type from above */
00157     CGPoint location;       /* Base coordinates (global), from upper-left */
00158     CGPoint windowLocation; /* Coordinates relative to window */
00159     CGSEventRecordTime time;    /* nanoseconds since startup */
00160     CGSEventFlag flags;     /* key state flags */
00161     CGSWindowID window;     /* window number of assigned window */
00162     CGSConnectionID connection; /* connection the event came from */
00163     CGSEventRecordData data;    /* type-dependent data: 40 bytes */
00164 };
00165 typedef struct _CGSEventRecord CGSEventRecord;
00166 typedef CGSEventRecord *CGSEventRecordPtr;
00167 
00168 
00169 typedef void (*CGSNotifyProcPtr)(CGSNotificationType type,
00170                                 CGSNotificationData data,
00171                                 CGSByteCount dataLength,
00172                                 CGSNotificationArg arg);
00173 
00174 // Define a type for the 'CGSRegisterNotifyProc' call.  Don't reference it explicitly since we don't want link errors if Apple removes this private function.
00175 typedef CGSError (*CGSRegisterNotifyProcType)(CGSNotifyProcPtr proc,
00176                                               CGSNotificationType type,
00177                                               CGSNotificationArg arg);
00178 
00179 
00180 #define kCGSEventNotificationMouseMoved                    (710 + 5)
00181 #define kCGSEventNotificationLeftMouseDragged              (710 + 6)
00182 #define kCGSEventNotificationRightMouseDragged             (710 + 7)
00183 #define kCGSEventNotificationNotificationOtherMouseDragged (710 + 27)
00184 
00185 

Generated on Thu Aug 25 12:37:37 2005 for Quake III Arena by  doxygen 1.3.9.1