Mac OS 9
CarbonEvents.h
Go to the documentation of this file.
1 
19 #ifndef __CARBONEVENTS__
20 #define __CARBONEVENTS__
21 
22 #ifndef __EVENTS__
23 #include <Events.h>
24 #endif
25 
26 #ifndef __MENUS__
27 #include <Menus.h>
28 #endif
29 
30 #ifndef __CONTROLS__
31 #include <Controls.h>
32 #endif
33 
34 #ifndef __MACWINDOWS__
35 #include <MacWindows.h>
36 #endif
37 
38 #ifndef __CFSTRING__
39 #include <CFString.h>
40 #endif
41 
42 #ifndef __AEREGISTRY__
43 #include <AERegistry.h>
44 #endif
45 
46 #ifndef __AEDATAMODEL__
47 #include <AEDataModel.h>
48 #endif
49 
50 #if PRAGMA_ONCE
51 #pragma once
52 #endif
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
58 #if PRAGMA_IMPORT
59 #pragma import on
60 #endif
61 
62 #if PRAGMA_STRUCT_ALIGN
63 #pragma options align = mac68k
64 #elif PRAGMA_STRUCT_PACKPUSH
65 #pragma pack(push, 2)
66 #elif PRAGMA_STRUCT_PACK
67 #pragma pack(2)
68 #endif
69 
70 /*======================================================================================*/
71 /* EVENT COMMON */
72 /*======================================================================================*/
73 
79 enum {
80 
86 
92 
97 
102 
109 
114 
119 
124 
132 
138 
144 
150  eventHotKeyExistsErr = -9878,
151  eventHotKeyInvalidErr = -9879
152 };
153 
154 /*======================================================================================*/
155 /* EVENT CORE */
156 /*======================================================================================*/
157 /*��������������������������������������������������������������������������������������*/
158 /* � Event Flags, options */
159 /*��������������������������������������������������������������������������������������*/
160 
173 typedef SInt16 EventPriority;
174 enum {
175 
181 
186 
191 };
192 
193 enum { kEventLeaveInQueue = false, kEventRemoveFromQueue = true };
194 
195 /*��������������������������������������������������������������������������������������*/
196 /* � Event Times */
197 /* */
198 /* EventTime is in seconds since boot. Use the constants to make life easy. */
199 /*��������������������������������������������������������������������������������������*/
200 typedef double EventTime;
201 typedef EventTime EventTimeout;
202 typedef EventTime EventTimerInterval;
203 #define kEventDurationSecond ((EventTime)1.0)
204 #define kEventDurationMillisecond ((EventTime)(kEventDurationSecond / 1000))
205 #define kEventDurationMicrosecond ((EventTime)(kEventDurationSecond / 1000000))
206 #define kEventDurationNanosecond \
207  ((EventTime)(kEventDurationSecond / 1000000000))
208 #define kEventDurationMinute ((EventTime)(kEventDurationSecond * 60))
209 #define kEventDurationHour ((EventTime)(kEventDurationMinute * 60))
210 #define kEventDurationDay ((EventTime)(kEventDurationHour * 24))
211 #define kEventDurationNoWait ((EventTime)0.0)
212 #define kEventDurationForever ((EventTime)(-1.0))
213 
214 /* Helpful doodads to convert to and from ticks and event times*/
215 #ifdef __cplusplus
216 inline EventTime TicksToEventTime(UInt32 t) { return ((t) / 60.0); }
217 inline UInt32 EventTimeToTicks(EventTime t) {
218  return (UInt32)(((t) * 60) + 0.5);
219 }
220 #else
221 #define TicksToEventTime(t) ((EventTime)((t) / 60.0))
222 #define EventTimeToTicks(t) ((UInt32)(((t) * 60) + 0.5))
223 #endif /* defined(__cplusplus) */
224 
225 /*��������������������������������������������������������������������������������������*/
226 /* EventTypeSpec structure */
227 /* */
228 /* This structure is used in many routines to pass a list of event types to a
229  * function. */
230 /* You typically would declare a const array of these types to pass in. */
231 /*��������������������������������������������������������������������������������������*/
232 
243  UInt32 eventClass;
244  UInt32 eventKind;
245 };
246 typedef struct EventTypeSpec EventTypeSpec;
247 /*A helpful macro for dealing with EventTypeSpecs */
248 #define GetEventTypeCount(t) (sizeof((t)) / sizeof(EventTypeSpec))
249 
264 enum { kTrackMouseLocationOptionDontConsumeMouseUp = (1 << 0) };
265 
266 typedef UInt16 MouseTrackingResult;
267 enum {
268  kMouseTrackingMouseDown = 1,
269  kMouseTrackingMouseUp = 2,
270  kMouseTrackingMouseExited = 3,
271  kMouseTrackingMouseEntered = 4,
272  kMouseTrackingMouseDragged = 5,
273  kMouseTrackingKeyModifiersChanged = 6,
274  kMouseTrackingUserCancelled = 7,
275  kMouseTrackingTimedOut = 8
276 };
277 
278 typedef OSType EventParamName;
279 typedef OSType EventParamType;
280 /*��������������������������������������������������������������������������������������*/
281 /* � EventLoop */
282 /*��������������������������������������������������������������������������������������*/
283 
300 typedef struct OpaqueEventLoopRef *EventLoopRef;
319 
336 
358 OSStatus
359 RunCurrentEventLoop(EventTimeout inTimeout);
360 
384 OSStatus
386 
413 CFTypeRef
415 
416 /*��������������������������������������������������������������������������������������*/
417 /* � Low-level event fetching */
418 /*��������������������������������������������������������������������������������������*/
460 OSStatus
461 ReceiveNextEvent(UInt32 inNumTypes, const EventTypeSpec *inList,
462  EventTimeout inTimeout, Boolean inPullEvent,
463  EventRef *outEvent);
464 
465 /*��������������������������������������������������������������������������������������*/
466 /* � Core event lifetime APIs */
467 /*��������������������������������������������������������������������������������������*/
468 typedef UInt32 EventAttributes;
469 enum { kEventAttributeNone = 0, kEventAttributeUserEvent = (1 << 0) };
470 
479 #if TARGET_OS_MAC
480 #define MacCreateEvent CreateEvent
481 #endif
482 OSStatus
483 MacCreateEvent(CFAllocatorRef inAllocator, /* can be NULL */
484  UInt32 inClassID, UInt32 kind, EventTime when,
485  EventAttributes flags, EventRef *outEvent);
486 
495 EventRef
497 
506 EventRef
508 
517 UInt32
519 
528 void
530 
562 OSStatus
563 SetEventParameter(EventRef inEvent, EventParamName inName,
564  EventParamType inType, UInt32 inSize, const void *inDataPtr);
565 
607 OSStatus
608 GetEventParameter(EventRef inEvent, EventParamName inName,
609  EventParamType inDesiredType,
610  EventParamType *outActualType, /* can be NULL */
611  UInt32 inBufferSize, UInt32 *outActualSize, /* can be NULL */
612  void *outData);
613 
614 /*��������������������������������������������������������������������������������������*/
615 /* � Getters for 'base-class' event info */
616 /*��������������������������������������������������������������������������������������*/
637 UInt32
639 
662 UInt32
664 
686 EventTime
688 
689 /*��������������������������������������������������������������������������������������*/
690 /* � Setters for 'base-class' event info */
691 /*��������������������������������������������������������������������������������������*/
692 
718 OSStatus
719 SetEventTime(EventRef inEvent, EventTime inTime);
720 
721 /*��������������������������������������������������������������������������������������*/
722 /* � Event Queue routines (posting, finding, flushing) */
723 /*��������������������������������������������������������������������������������������*/
724 
725 typedef struct OpaqueEventQueueRef *EventQueueRef;
742 EventQueueRef
744 
759 EventQueueRef
761 
780 typedef CALLBACK_API(Boolean, EventComparatorProcPtr)(EventRef inEvent,
781  void *inCompareData);
782 typedef STACK_UPP_TYPE(EventComparatorProcPtr) EventComparatorUPP;
791 EventComparatorUPP
792 NewEventComparatorUPP(EventComparatorProcPtr userRoutine);
793 #if !OPAQUE_UPP_TYPES
794 enum {
795  uppEventComparatorProcInfo = 0x000003D0
796 }; /* pascal 1_byte Func(4_bytes, 4_bytes) */
797 #ifdef __cplusplus
798 inline EventComparatorUPP
799 NewEventComparatorUPP(EventComparatorProcPtr userRoutine) {
800  return (EventComparatorUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
801  uppEventComparatorProcInfo,
802  GetCurrentArchitecture());
803 }
804 #else
805 #define NewEventComparatorUPP(userRoutine) \
806  (EventComparatorUPP) \
807  NewRoutineDescriptor((ProcPtr)(userRoutine), uppEventComparatorProcInfo, \
808  GetCurrentArchitecture())
809 #endif
810 #endif
811 
820 void
821 DisposeEventComparatorUPP(EventComparatorUPP userUPP);
822 #if !OPAQUE_UPP_TYPES
823 #ifdef __cplusplus
824 inline void DisposeEventComparatorUPP(EventComparatorUPP userUPP) {
825  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
826 }
827 #else
828 #define DisposeEventComparatorUPP(userUPP) DisposeRoutineDescriptor(userUPP)
829 #endif
830 #endif
831 
840 Boolean
841 InvokeEventComparatorUPP(EventRef inEvent, void *inCompareData,
842  EventComparatorUPP userUPP);
843 #if !OPAQUE_UPP_TYPES
844 #ifdef __cplusplus
845 inline Boolean InvokeEventComparatorUPP(EventRef inEvent, void *inCompareData,
846  EventComparatorUPP userUPP) {
847  return (Boolean)CALL_TWO_PARAMETER_UPP(userUPP, uppEventComparatorProcInfo,
848  inEvent, inCompareData);
849 }
850 #else
851 #define InvokeEventComparatorUPP(inEvent, inCompareData, userUPP) \
852  (Boolean) CALL_TWO_PARAMETER_UPP((userUPP), uppEventComparatorProcInfo, \
853  (inEvent), (inCompareData))
854 #endif
855 #endif
856 
857 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
858 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
859 #define NewEventComparatorProc(userRoutine) NewEventComparatorUPP(userRoutine)
860 #define CallEventComparatorProc(userRoutine, inEvent, inCompareData) \
861  InvokeEventComparatorUPP(inEvent, inCompareData, userRoutine)
862 #endif /* CALL_NOT_IN_CARBON */
863 
892 OSStatus
893 PostEventToQueue(EventQueueRef inQueue, EventRef inEvent,
894  EventPriority inPriority);
895 
922 OSStatus
923 FlushEventsMatchingListFromQueue(EventQueueRef inQueue, UInt32 inNumTypes,
924  const EventTypeSpec *inList);
925 
951 OSStatus
952 FlushSpecificEventsFromQueue(EventQueueRef inQueue,
953  EventComparatorUPP inComparator,
954  void *inCompareData);
955 
975 OSStatus
976 FlushEventQueue(EventQueueRef inQueue);
977 
1004 EventRef
1005 FindSpecificEventInQueue(EventQueueRef inQueue, EventComparatorUPP inComparator,
1006  void *inCompareData);
1007 
1027 UInt32
1028 GetNumEventsInQueue(EventQueueRef inQueue);
1029 
1055 OSStatus
1056 RemoveEventFromQueue(EventQueueRef inQueue, EventRef inEvent);
1057 
1080 Boolean
1081 IsEventInQueue(EventQueueRef inQueue, EventRef inEvent);
1082 
1083 /*��������������������������������������������������������������������������������������*/
1084 /* � Helpful utilities */
1085 /*��������������������������������������������������������������������������������������*/
1086 
1101 EventTime
1103 
1121 Boolean
1123 
1160 OSStatus
1161 TrackMouseLocation(GrafPtr inPort, /* can be NULL */
1162  Point *outPt, MouseTrackingResult *outResult);
1163 
1216 OSStatus
1217 TrackMouseLocationWithOptions(GrafPtr inPort, /* can be NULL */
1218  OptionBits inOptions, EventTimeout inTimeout,
1219  Point *outPt,
1220  UInt32 *outModifiers, /* can be NULL */
1221  MouseTrackingResult *outResult);
1222 
1270 OSStatus
1271 TrackMouseRegion(GrafPtr inPort, /* can be NULL */
1272  RgnHandle inRegion, Boolean *ioWasInRgn,
1273  MouseTrackingResult *outResult);
1274 
1302 Boolean
1304 
1332 Boolean
1333 IsEventInMask(EventRef inEvent, EventMask inMask);
1334 
1343 EventTime
1345 
1346 /*��������������������������������������������������������������������������������������*/
1347 /* � Mouse Coalescing */
1348 /*��������������������������������������������������������������������������������������*/
1367 Boolean
1369 
1398 OSStatus
1400  Boolean *outOldState); /* can be NULL */
1401 
1402 /*��������������������������������������������������������������������������������������*/
1403 /* � Timers */
1404 /*��������������������������������������������������������������������������������������*/
1405 
1437 typedef struct OpaqueEventLoopTimerRef *EventLoopTimerRef;
1438 
1453 typedef CALLBACK_API(void, EventLoopTimerProcPtr)(EventLoopTimerRef inTimer,
1454  void *inUserData);
1455 typedef STACK_UPP_TYPE(EventLoopTimerProcPtr) EventLoopTimerUPP;
1464 EventLoopTimerUPP
1465 NewEventLoopTimerUPP(EventLoopTimerProcPtr userRoutine);
1466 #if !OPAQUE_UPP_TYPES
1467 enum {
1468  uppEventLoopTimerProcInfo = 0x000003C0
1469 }; /* pascal no_return_value Func(4_bytes, 4_bytes) */
1470 #ifdef __cplusplus
1471 inline EventLoopTimerUPP
1472 NewEventLoopTimerUPP(EventLoopTimerProcPtr userRoutine) {
1473  return (EventLoopTimerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
1474  uppEventLoopTimerProcInfo,
1475  GetCurrentArchitecture());
1476 }
1477 #else
1478 #define NewEventLoopTimerUPP(userRoutine) \
1479  (EventLoopTimerUPP) \
1480  NewRoutineDescriptor((ProcPtr)(userRoutine), uppEventLoopTimerProcInfo, \
1481  GetCurrentArchitecture())
1482 #endif
1483 #endif
1484 
1493 void
1494 DisposeEventLoopTimerUPP(EventLoopTimerUPP userUPP);
1495 #if !OPAQUE_UPP_TYPES
1496 #ifdef __cplusplus
1497 inline void DisposeEventLoopTimerUPP(EventLoopTimerUPP userUPP) {
1498  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1499 }
1500 #else
1501 #define DisposeEventLoopTimerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1502 #endif
1503 #endif
1504 
1513 void
1514 InvokeEventLoopTimerUPP(EventLoopTimerRef inTimer, void *inUserData,
1515  EventLoopTimerUPP userUPP);
1516 #if !OPAQUE_UPP_TYPES
1517 #ifdef __cplusplus
1518 inline void InvokeEventLoopTimerUPP(EventLoopTimerRef inTimer, void *inUserData,
1519  EventLoopTimerUPP userUPP) {
1520  CALL_TWO_PARAMETER_UPP(userUPP, uppEventLoopTimerProcInfo, inTimer,
1521  inUserData);
1522 }
1523 #else
1524 #define InvokeEventLoopTimerUPP(inTimer, inUserData, userUPP) \
1525  CALL_TWO_PARAMETER_UPP((userUPP), uppEventLoopTimerProcInfo, (inTimer), \
1526  (inUserData))
1527 #endif
1528 #endif
1529 
1530 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1531 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1532 #define NewEventLoopTimerProc(userRoutine) NewEventLoopTimerUPP(userRoutine)
1533 #define CallEventLoopTimerProc(userRoutine, inTimer, inUserData) \
1534  InvokeEventLoopTimerUPP(inTimer, inUserData, userRoutine)
1535 #endif /* CALL_NOT_IN_CARBON */
1536 
1584 OSStatus
1585 InstallEventLoopTimer(EventLoopRef inEventLoop, EventTimerInterval inFireDelay,
1586  EventTimerInterval inInterval,
1587  EventLoopTimerUPP inTimerProc, void *inTimerData,
1588  EventLoopTimerRef *outTimer);
1589 
1611 OSStatus
1613 
1645 OSStatus
1647  EventTimerInterval inNextFire);
1648 
1649 /*======================================================================================*/
1650 /* EVENT CLASSES */
1651 /*======================================================================================*/
1652 
1657 enum {
1658 
1662  kEventClassMouse = FOUR_CHAR_CODE('mous'),
1663 
1667  kEventClassKeyboard = FOUR_CHAR_CODE('keyb'),
1668 
1672  kEventClassTextInput = FOUR_CHAR_CODE('text'),
1673 
1677  kEventClassApplication = FOUR_CHAR_CODE('appl'),
1678 
1682  kEventClassAppleEvent = FOUR_CHAR_CODE('eppc'),
1683 
1687  kEventClassMenu = FOUR_CHAR_CODE('menu'),
1688 
1692  kEventClassWindow = FOUR_CHAR_CODE('wind'),
1693 
1697  kEventClassControl = FOUR_CHAR_CODE('cntl'),
1698 
1702  kEventClassCommand = FOUR_CHAR_CODE('cmds'),
1703 
1707  kEventClassTablet = FOUR_CHAR_CODE('tblt'),
1708 
1712  kEventClassVolume = FOUR_CHAR_CODE('vol '),
1713 
1717  kEventClassAppearance = FOUR_CHAR_CODE('appm'),
1718 
1722  kEventClassService = FOUR_CHAR_CODE('serv')
1723 };
1724 
1725 /*��������������������������������������������������������������������������������������*/
1726 /* Mouse Events */
1727 /*��������������������������������������������������������������������������������������*/
1728 /* Mouse Events */
1729 
1734 enum {
1735 
1740 
1745 
1750 
1755 
1760 };
1761 
1777 struct HIPoint {
1778 
1782  float x;
1783 
1787  float y;
1788 };
1789 typedef struct HIPoint HIPoint;
1854 typedef UInt16 EventMouseButton;
1855 enum {
1856 
1862 
1867 
1872 };
1873 
1878 typedef UInt16 EventMouseWheelAxis;
1879 enum {
1880 
1885 
1890 };
1891 
1892 /*��������������������������������������������������������������������������������������*/
1893 /* Text Input Events */
1894 /*��������������������������������������������������������������������������������������*/
1895 
1912 enum {
1913 
1919 
1933 
1941 
1950 
1957 
1963 };
1964 
2061 /*��������������������������������������������������������������������������������������*/
2062 /* Raw Keyboard Events */
2063 /*��������������������������������������������������������������������������������������*/
2064 
2072 enum {
2073 
2077  kEventRawKeyDown = 1, /* hardware-level events*/
2078 
2083 
2088 
2093 
2098 
2102  kEventHotKeyReleased = 6 /* Mac OS X only*/
2103 };
2104 
2113 enum {
2114 
2118  kEventKeyModifierNumLockBit = 16, /* Num Lock is on? (Mac OS X only)*/
2119 
2123  kEventKeyModifierFnBit = 17 /* Fn key is down? (Mac OS X only)*/
2124 };
2125 
2126 enum {
2127  kEventKeyModifierNumLockMask = 1L << kEventKeyModifierNumLockBit,
2128  kEventKeyModifierFnMask = 1L << kEventKeyModifierFnBit
2129 };
2130 
2162 /*��������������������������������������������������������������������������������������*/
2163 /* Application Events */
2164 /*��������������������������������������������������������������������������������������*/
2165 
2170 enum {
2171 
2178 
2183 
2194 
2201 
2207 
2213 
2219 
2232 };
2233 
2263 /*��������������������������������������������������������������������������������������*/
2264 /* Apple Events */
2265 /*��������������������������������������������������������������������������������������*/
2266 
2271 enum {
2272 
2277  kEventAppleEvent = 1
2278 };
2279 
2289 /*��������������������������������������������������������������������������������������*/
2290 /* Window Events */
2291 /*��������������������������������������������������������������������������������������*/
2292 
2300 enum {
2301 
2309 
2316 };
2317 
2335 enum {
2336 
2343 
2350 
2359 };
2360 
2389 enum {
2390 
2395 
2400 
2405 
2410 
2427 
2435 
2440 
2445 
2450 
2455 };
2456 
2469 enum {
2470 
2476 
2481 
2486 
2491 };
2492 
2550 enum {
2551 
2557 
2563 
2571 
2577 
2583 
2591 
2598 
2605 
2611 };
2612 
2617 enum {
2618 
2630 };
2631 
2651 enum {
2652 
2661 
2666 
2675 
2686 
2691 
2700 
2708 
2713 
2722 
2731 
2736 
2746 
2755 
2762 
2768 
2774 
2780 
2815 
2823 
2829 
2835 
2847 };
2848 
2937 enum {
2938 
2946 
2953 };
2954 
2974 enum {
2975 
2983 
2990 
2998 
3006 
3013 
3018 
3025 
3032 
3039 
3045 
3051 
3061 
3071 
3082  kEventWindowPaint = 1013
3083 };
3084 
3177 /*��������������������������������������������������������������������������������������*/
3178 /* Menu Events */
3179 /*��������������������������������������������������������������������������������������*/
3180 
3185 enum {
3186 
3196 
3201 
3209 
3223 
3228 
3234 
3267 
3306 
3331 
3341 
3351  kEventMenuDrawItem = 102,
3352  kEventMenuDrawItemContent = 103,
3353 
3357  kEventMenuDispose = 1001
3358 };
3359 
3365 enum {
3366  /* menu location*/
3367 
3373  kMenuContextMenuBar = 1 << 0, /* menu type*/
3374 
3380 
3386 
3391  kMenuContextSubmenu = 1 << 10, /* menu usage*/
3392 
3398 
3404 
3410 
3418  kMenuContextMenuEnabling = 1 << 19
3419 };
3420 
3531 /*��������������������������������������������������������������������������������������*/
3532 /* Command Events */
3533 /*��������������������������������������������������������������������������������������*/
3534 
3539 enum {
3540  kEventProcessCommand = 1,
3541 
3550 
3560 };
3561 
3573 /* HI Commands */
3574 
3579 enum {
3580 
3584  kHICommandOK = FOUR_CHAR_CODE('ok '),
3585 
3589  kHICommandCancel = FOUR_CHAR_CODE('not!'),
3590 
3594  kHICommandQuit = FOUR_CHAR_CODE('quit'),
3595 
3599  kHICommandUndo = FOUR_CHAR_CODE('undo'),
3600 
3604  kHICommandRedo = FOUR_CHAR_CODE('redo'),
3605 
3609  kHICommandCut = FOUR_CHAR_CODE('cut '),
3610 
3614  kHICommandCopy = FOUR_CHAR_CODE('copy'),
3615 
3619  kHICommandPaste = FOUR_CHAR_CODE('past'),
3620 
3624  kHICommandClear = FOUR_CHAR_CODE('clea'),
3625 
3629  kHICommandSelectAll = FOUR_CHAR_CODE('sall'),
3630 
3636  kHICommandHide = FOUR_CHAR_CODE('hide'),
3637 
3643  kHICommandHideOthers = FOUR_CHAR_CODE('hido'),
3644 
3650  kHICommandShowAll = FOUR_CHAR_CODE('shal'),
3651 
3655  kHICommandPreferences = FOUR_CHAR_CODE('pref'),
3656 
3664  kHICommandZoomWindow = FOUR_CHAR_CODE('zoom'),
3665 
3671  kHICommandMinimizeWindow = FOUR_CHAR_CODE('mini'),
3672 
3679  kHICommandMinimizeAll = FOUR_CHAR_CODE('mina'),
3680 
3686  kHICommandMaximizeWindow = FOUR_CHAR_CODE('maxi'),
3687 
3694  kHICommandMaximizeAll = FOUR_CHAR_CODE('maxa'),
3695 
3701  kHICommandArrangeInFront = FOUR_CHAR_CODE('frnt'),
3702 
3709  kHICommandBringAllToFront = FOUR_CHAR_CODE('bfrt'),
3710 
3720  kHICommandWindowListSeparator = FOUR_CHAR_CODE('wldv'),
3721 
3730  kHICommandWindowListTerminator = FOUR_CHAR_CODE('wlst'),
3731 
3737  kHICommandSelectWindow = FOUR_CHAR_CODE('swin'),
3738 
3742  kHICommandAbout = FOUR_CHAR_CODE('abou'),
3743 
3747  kHICommandNew = FOUR_CHAR_CODE('new '),
3748 
3752  kHICommandOpen = FOUR_CHAR_CODE('open'),
3753 
3757  kHICommandClose = FOUR_CHAR_CODE('clos'),
3758 
3762  kHICommandSave = FOUR_CHAR_CODE('save'),
3763 
3767  kHICommandSaveAs = FOUR_CHAR_CODE('svas'),
3768 
3773  kHICommandRevert = FOUR_CHAR_CODE('rvrt'),
3774 
3778  kHICommandPrint = FOUR_CHAR_CODE('prnt'),
3779 
3784  kHICommandPageSetup = FOUR_CHAR_CODE('page'),
3785 
3792  kHICommandAppHelp = FOUR_CHAR_CODE('ahlp')
3793 };
3794 
3795 enum { kHICommandFromMenu = (1L << 0) };
3796 
3797 struct HICommand {
3798  UInt32 attributes;
3799  UInt32 commandID;
3800  struct {
3801  MenuRef menuRef;
3802  MenuItemIndex menuItemIndex;
3803  } menu;
3804 };
3805 typedef struct HICommand HICommand;
3806 /*��������������������������������������������������������������������������������������*/
3807 /* Control Events */
3808 /*��������������������������������������������������������������������������������������*/
3809 
3814 enum {
3815 
3820 
3825 
3836  kEventControlDefInitialize = kEventControlInitialize,
3837  kEventControlDefDispose = kEventControlDispose,
3838 
3844 
3851 
3859 
3866 
3874 
3884 
3891 
3898 
3904 
3910 
3916 
3923 
3931 
3939 
3948 
3955 
3963 
3969 
3977 
3985 
3993 
3999 
4005 
4012 
4018 
4024 
4030 
4037 
4043 };
4044 
4055 enum {
4056 
4061 
4066 };
4067 
4252 /*��������������������������������������������������������������������������������������*/
4253 /* Tablet Events (and tablet data in mouse events) */
4254 /*��������������������������������������������������������������������������������������*/
4255 
4260 enum {
4261 
4267 
4273  kEventTabletPointer =
4274  1 /* deprecated form for compatibility only, use kEventTabletPoint*/
4275 };
4276 
4278  SInt32 absX; /* absolute x coordinate in tablet space at full tablet
4279  resolution */
4280  SInt32 absY; /* absolute y coordinate in tablet space at full tablet
4281  resolution */
4282  SInt32 absZ; /* absolute z coordinate in tablet space at full tablet
4283  resolution */
4284  UInt16 buttons; /* one bit per button - bit 0 is first button - 1 = closed */
4285  UInt16
4286  pressure; /* scaled pressure value; MAXPRESSURE=(2^16)-1, MINPRESSURE=0 */
4287  SInt16 tiltX; /* scaled tilt x value; range is -((2^15)-1) to (2^15)-1 (-32767
4288  to 32767) */
4289  SInt16 tiltY; /* scaled tilt y value; range is -((2^15)-1) to (2^15)-1 (-32767
4290  to 32767) */
4291  UInt16 rotation; /* Fixed-point representation of device rotation in a 10.6
4292  format */
4293  SInt16 tangentialPressure; /* tangential pressure on the device; range same as
4294  tilt */
4295  UInt16 deviceID; /* system-assigned unique device ID - matches to deviceID
4296  field in proximity event */
4297  SInt16 vendor1; /* vendor-defined signed 16-bit integer */
4298  SInt16 vendor2; /* vendor-defined signed 16-bit integer */
4299  SInt16 vendor3; /* vendor-defined signed 16-bit integer */
4300 };
4301 typedef struct TabletPointRec TabletPointRec;
4304  UInt16 vendorID; /* vendor-defined ID - typically will be USB vendor ID */
4305  UInt16 tabletID; /* vendor-defined tablet ID - typically will be USB product
4306  ID for the tablet */
4307  UInt16 pointerID; /* vendor-defined ID of the specific pointing device */
4308  UInt16 deviceID; /* system-assigned unique device ID - matches to deviceID
4309  field in tablet event */
4310  UInt16 systemTabletID; /* system-assigned unique tablet ID */
4311  UInt16 vendorPointerType; /* vendor-defined pointer type */
4312  UInt32 pointerSerialNumber; /* vendor-defined serial number of the specific
4313  pointing device */
4314  UInt64 uniqueID; /* vendor-defined unique ID for this pointer */
4315  UInt32 capabilityMask; /* mask representing the capabilities of the device */
4316  UInt8 pointerType; /* type of pointing device - enum to be defined */
4317  UInt8 enterProximity; /* non-zero = entering; zero = leaving */
4318 };
4319 typedef struct TabletProximityRec TabletProximityRec;
4320 /*��������������������������������������������������������������������������������������*/
4321 /* Volume Events */
4322 /*��������������������������������������������������������������������������������������*/
4323 
4328 enum {
4329 
4334  kEventVolumeMounted = 1, /* new volume mounted*/
4335 
4340  kEventVolumeUnmounted = 2 /* volume has been ejected or unmounted*/
4341 };
4342 
4353 /* types for volume events*/
4354 
4355 enum {
4356  typeFSVolumeRefNum = FOUR_CHAR_CODE('voln') /* FSVolumeRefNum*/
4357 };
4358 
4359 /*��������������������������������������������������������������������������������������*/
4360 /* Appearance Events */
4361 /*��������������������������������������������������������������������������������������*/
4362 /* Appearance Events */
4363 
4368 enum {
4369 
4375 };
4376 
4383 /*��������������������������������������������������������������������������������������*/
4384 /* Services Events */
4385 /*��������������������������������������������������������������������������������������*/
4386 
4403 enum {
4404 
4411 
4418 
4431 
4441 };
4442 
4487 CFStringRef
4489 
4490 /*��������������������������������������������������������������������������������������*/
4491 /* Parameter names and types */
4492 /*��������������������������������������������������������������������������������������*/
4493 enum {
4494  kEventParamDirectObject =
4495  FOUR_CHAR_CODE('----') /* type varies depending on event*/
4496 };
4497 
4498 /* Generic toolbox parameters and types*/
4499 
4500 enum {
4501  kEventParamWindowRef = FOUR_CHAR_CODE('wind'), /* typeWindowRef*/
4502  kEventParamGrafPort = FOUR_CHAR_CODE('graf'), /* typeGrafPtr*/
4503  kEventParamDragRef = FOUR_CHAR_CODE('drag'), /* typeDragRef*/
4504  kEventParamMenuRef = FOUR_CHAR_CODE('menu'), /* typeMenuRef*/
4505  kEventParamEventRef = FOUR_CHAR_CODE('evnt'), /* typeEventRef*/
4506  kEventParamControlRef = FOUR_CHAR_CODE('ctrl'), /* typeControlRef*/
4507  kEventParamRgnHandle = FOUR_CHAR_CODE('rgnh'), /* typeQDRgnHandle*/
4508  kEventParamEnabled = FOUR_CHAR_CODE('enab'), /* typeBoolean*/
4509  kEventParamDimensions = FOUR_CHAR_CODE('dims'), /* typeQDPoint*/
4510  kEventParamAvailableBounds = FOUR_CHAR_CODE('avlb'), /* typeQDRectangle*/
4511  kEventParamAEEventID = keyAEEventID, /* typeType*/
4512  kEventParamAEEventClass = keyAEEventClass, /* typeType*/
4513  kEventParamCGContextRef = FOUR_CHAR_CODE('cntx'), /* typeCGContextRef*/
4514  kEventParamDeviceDepth = FOUR_CHAR_CODE('devd'), /* typeShortInteger*/
4515  kEventParamDeviceColor = FOUR_CHAR_CODE('devc'), /* typeBoolean*/
4516  typeWindowRef = FOUR_CHAR_CODE('wind'), /* WindowRef*/
4517  typeGrafPtr = FOUR_CHAR_CODE('graf'), /* CGrafPtr*/
4518  typeGWorldPtr = FOUR_CHAR_CODE('gwld'), /* GWorldPtr*/
4519  typeDragRef = FOUR_CHAR_CODE('drag'), /* DragRef*/
4520  typeMenuRef = FOUR_CHAR_CODE('menu'), /* MenuRef*/
4521  typeControlRef = FOUR_CHAR_CODE('ctrl'), /* ControlRef*/
4522  typeCollection = FOUR_CHAR_CODE('cltn'), /* Collection*/
4523  typeQDRgnHandle = FOUR_CHAR_CODE('rgnh'), /* RgnHandle*/
4524  typeOSStatus = FOUR_CHAR_CODE('osst'), /* OSStatus*/
4525  typeCFStringRef = FOUR_CHAR_CODE('cfst'), /* CFStringRef*/
4526  typeCGContextRef = FOUR_CHAR_CODE('cntx'), /* CGContextRef*/
4527  typeHIPoint = FOUR_CHAR_CODE('hipt') /* HIPoint*/
4528 };
4529 
4530 /* Mouse event parameters and types*/
4531 
4532 enum {
4533  kEventParamMouseLocation = FOUR_CHAR_CODE('mloc'), /* typeQDPoint*/
4534  kEventParamMouseButton = FOUR_CHAR_CODE('mbtn'), /* typeMouseButton*/
4535  kEventParamClickCount = FOUR_CHAR_CODE('ccnt'), /* typeUInt32*/
4536  kEventParamMouseWheelAxis = FOUR_CHAR_CODE('mwax'), /* typeMouseWheelAxis*/
4537  kEventParamMouseWheelDelta = FOUR_CHAR_CODE('mwdl'), /* typeSInt32*/
4538  kEventParamMouseDelta = FOUR_CHAR_CODE('mdta'), /* typeQDPoint*/
4539  kEventParamMouseChord = FOUR_CHAR_CODE('chor'), /* typeUInt32*/
4540  kEventParamTabletEventType = FOUR_CHAR_CODE('tblt'), /* typeUInt32*/
4541  typeMouseButton = FOUR_CHAR_CODE('mbtn'), /* EventMouseButton*/
4542  typeMouseWheelAxis = FOUR_CHAR_CODE('mwax') /* EventMouseWheelAxis*/
4543 };
4544 
4545 /* Keyboard event parameter and types*/
4546 
4547 enum {
4548  kEventParamKeyCode = FOUR_CHAR_CODE('kcod'), /* typeUInt32*/
4549  kEventParamKeyMacCharCodes = FOUR_CHAR_CODE('kchr'), /* typeChar*/
4550  kEventParamKeyModifiers = FOUR_CHAR_CODE('kmod'), /* typeUInt32*/
4551  kEventParamKeyUnicodes = FOUR_CHAR_CODE('kuni'), /* typeUnicodeText*/
4552  kEventParamKeyboardType = FOUR_CHAR_CODE('kbdt'), /* typeUInt32*/
4553  typeEventHotKeyID = FOUR_CHAR_CODE('hkid') /* EventHotKeyID*/
4554 };
4555 
4556 /* TextInput event parameters*/
4557 
4558 enum {
4559  kEventParamTextInputSendRefCon =
4560  FOUR_CHAR_CODE('tsrc'), /* typeLongInteger*/
4561  kEventParamTextInputSendComponentInstance =
4562  FOUR_CHAR_CODE('tsci'), /* typeComponentInstance*/
4563  kEventParamTextInputSendSLRec =
4564  FOUR_CHAR_CODE('tssl'), /* typeIntlWritingCode*/
4565  kEventParamTextInputReplySLRec =
4566  FOUR_CHAR_CODE('trsl'), /* typeIntlWritingCode*/
4567  kEventParamTextInputSendText =
4568  FOUR_CHAR_CODE('tstx'), /* typeUnicodeText (if TSMDocument is Unicode),
4569  otherwise typeChar*/
4570  kEventParamTextInputReplyText =
4571  FOUR_CHAR_CODE('trtx'), /* typeUnicodeText (if TSMDocument is Unicode),
4572  otherwise typeChar*/
4573  kEventParamTextInputSendUpdateRng =
4574  FOUR_CHAR_CODE('tsup'), /* typeTextRangeArray*/
4575  kEventParamTextInputSendHiliteRng =
4576  FOUR_CHAR_CODE('tshi'), /* typeTextRangeArray*/
4577  kEventParamTextInputSendClauseRng =
4578  FOUR_CHAR_CODE('tscl'), /* typeOffsetArray*/
4579  kEventParamTextInputSendPinRng = FOUR_CHAR_CODE('tspn'), /* typeTextRange*/
4580  kEventParamTextInputSendFixLen =
4581  FOUR_CHAR_CODE('tsfx'), /* typeLongInteger*/
4582  kEventParamTextInputSendLeadingEdge =
4583  FOUR_CHAR_CODE('tsle'), /* typeBoolean*/
4584  kEventParamTextInputReplyLeadingEdge =
4585  FOUR_CHAR_CODE('trle'), /* typeBoolean*/
4586  kEventParamTextInputSendTextOffset =
4587  FOUR_CHAR_CODE('tsto'), /* typeLongInteger*/
4588  kEventParamTextInputReplyTextOffset =
4589  FOUR_CHAR_CODE('trto'), /* typeLongInteger*/
4590  kEventParamTextInputReplyRegionClass =
4591  FOUR_CHAR_CODE('trrg'), /* typeLongInteger*/
4592  kEventParamTextInputSendCurrentPoint =
4593  FOUR_CHAR_CODE('tscp'), /* typeQDPoint*/
4594  kEventParamTextInputSendDraggingMode =
4595  FOUR_CHAR_CODE('tsdm'), /* typeBoolean*/
4596  kEventParamTextInputReplyPoint = FOUR_CHAR_CODE('trpt'), /* typeQDPoint*/
4597  kEventParamTextInputReplyFont =
4598  FOUR_CHAR_CODE('trft'), /* typeLongInteger*/
4599  kEventParamTextInputReplyFMFont = FOUR_CHAR_CODE('trfm'), /* typeUInt32*/
4600  kEventParamTextInputReplyPointSize = FOUR_CHAR_CODE('trpz'), /* typeFixed*/
4601  kEventParamTextInputReplyLineHeight =
4602  FOUR_CHAR_CODE('trlh'), /* typeShortInteger*/
4603  kEventParamTextInputReplyLineAscent =
4604  FOUR_CHAR_CODE('trla'), /* typeShortInteger*/
4605  kEventParamTextInputReplyTextAngle = FOUR_CHAR_CODE('trta'), /* typeFixed*/
4606  kEventParamTextInputSendShowHide = FOUR_CHAR_CODE('tssh'), /* typeBoolean*/
4607  kEventParamTextInputReplyShowHide =
4608  FOUR_CHAR_CODE('trsh'), /* typeBoolean*/
4609  kEventParamTextInputSendKeyboardEvent =
4610  FOUR_CHAR_CODE('tske'), /* typeEventRef*/
4611  kEventParamTextInputSendTextServiceEncoding =
4612  FOUR_CHAR_CODE('tsse'), /* typeUInt32*/
4613  kEventParamTextInputSendTextServiceMacEncoding =
4614  FOUR_CHAR_CODE('tssm') /* typeUInt32*/
4615 };
4616 
4617 /* Command event parameters and types*/
4618 
4619 enum {
4620  kEventParamHICommand = FOUR_CHAR_CODE('hcmd'), /* typeHICommand*/
4621  typeHICommand = FOUR_CHAR_CODE('hcmd') /* HICommand*/
4622 };
4623 
4624 /* Window event parameters and types*/
4625 
4626 enum {
4627  kEventParamWindowFeatures = FOUR_CHAR_CODE('wftr'), /* typeUInt32*/
4628  kEventParamWindowDefPart = FOUR_CHAR_CODE('wdpc'), /* typeWindowDefPartCode*/
4629  kEventParamCurrentBounds = FOUR_CHAR_CODE('crct'), /* typeQDRectangle*/
4630  kEventParamOriginalBounds = FOUR_CHAR_CODE('orct'), /* typeQDRectangle*/
4631  kEventParamPreviousBounds = FOUR_CHAR_CODE('prct'), /* typeQDRectangle*/
4632  kEventParamClickActivation =
4633  FOUR_CHAR_CODE('clac'), /* typeClickActivationResult*/
4634  kEventParamWindowRegionCode =
4635  FOUR_CHAR_CODE('wshp'), /* typeWindowRegionCode*/
4636  kEventParamWindowDragHiliteFlag = FOUR_CHAR_CODE('wdhf'), /* typeBoolean*/
4637  kEventParamWindowModifiedFlag = FOUR_CHAR_CODE('wmff'), /* typeBoolean*/
4638  kEventParamWindowProxyGWorldPtr = FOUR_CHAR_CODE('wpgw'), /* typeGWorldPtr*/
4639  kEventParamWindowProxyImageRgn = FOUR_CHAR_CODE('wpir'), /* typeQDRgnHandle*/
4640  kEventParamWindowProxyOutlineRgn =
4641  FOUR_CHAR_CODE('wpor'), /* typeQDRgnHandle*/
4642  kEventParamWindowStateChangedFlags = FOUR_CHAR_CODE('wscf'), /* typeUInt32 */
4643  kEventParamWindowTitleFullWidth = FOUR_CHAR_CODE('wtfw'), /* typeSInt16*/
4644  kEventParamWindowTitleTextWidth = FOUR_CHAR_CODE('wttw'), /* typeSInt16*/
4645  kEventParamWindowGrowRect = FOUR_CHAR_CODE('grct'), /* typeQDRectangle*/
4646  kEventParamAttributes = FOUR_CHAR_CODE('attr'), /* typeUInt32*/
4647  typeWindowRegionCode = FOUR_CHAR_CODE('wshp'), /* WindowRegionCode*/
4648  typeWindowDefPartCode = FOUR_CHAR_CODE('wdpt'), /* WindowDefPartCode*/
4649  typeClickActivationResult = FOUR_CHAR_CODE('clac') /* ClickActivationResult*/
4650 };
4651 
4652 /* Control event parameters and types*/
4653 
4654 enum {
4655  kEventParamControlPart = FOUR_CHAR_CODE('cprt'), /* typeControlPartCode*/
4656  kEventParamInitCollection = FOUR_CHAR_CODE('icol'), /* typeCollection*/
4657  kEventParamControlMessage = FOUR_CHAR_CODE('cmsg'), /* typeShortInteger*/
4658  kEventParamControlParam = FOUR_CHAR_CODE('cprm'), /* typeLongInteger*/
4659  kEventParamControlResult = FOUR_CHAR_CODE('crsl'), /* typeLongInteger*/
4660  kEventParamControlRegion = FOUR_CHAR_CODE('crgn'), /* typeQDRgnHandle*/
4661  kEventParamControlAction = FOUR_CHAR_CODE('caup'), /* typeControlActionUPP*/
4662  kEventParamControlIndicatorDragConstraint =
4663  FOUR_CHAR_CODE('cidc'), /* typeIndicatorDragConstraint*/
4664  kEventParamControlIndicatorRegion =
4665  FOUR_CHAR_CODE('cirn'), /* typeQDRgnHandle*/
4666  kEventParamControlIsGhosting = FOUR_CHAR_CODE('cgst'), /* typeBoolean*/
4667  kEventParamControlIndicatorOffset = FOUR_CHAR_CODE('ciof'), /* typeQDPoint*/
4668  kEventParamControlClickActivationResult =
4669  FOUR_CHAR_CODE('ccar'), /* typeClickActivationResult*/
4670  kEventParamControlSubControl = FOUR_CHAR_CODE('csub'), /* typeControlRef*/
4671  kEventParamControlOptimalBounds = FOUR_CHAR_CODE('cobn'), /* typeQDRectangle*/
4672  kEventParamControlOptimalBaselineOffset =
4673  FOUR_CHAR_CODE('cobo'), /* typeShortInteger*/
4674  kEventParamControlDataTag = FOUR_CHAR_CODE('cdtg'), /* typeEnumeration*/
4675  kEventParamControlDataBuffer = FOUR_CHAR_CODE('cdbf'), /* typePtr*/
4676  kEventParamControlDataBufferSize =
4677  FOUR_CHAR_CODE('cdbs'), /* typeLongInteger*/
4678  kEventParamControlDrawDepth = FOUR_CHAR_CODE('cddp'), /* typeShortInteger*/
4679  kEventParamControlDrawInColor = FOUR_CHAR_CODE('cdic'), /* typeBoolean*/
4680  kEventParamControlFeatures = FOUR_CHAR_CODE('cftr'), /* typeUInt32*/
4681  kEventParamControlPartBounds = FOUR_CHAR_CODE('cpbd'), /* typeQDRectangle*/
4682  kEventParamControlOriginalOwningWindow =
4683  FOUR_CHAR_CODE('coow'), /* typeWindowRef*/
4684  kEventParamControlCurrentOwningWindow =
4685  FOUR_CHAR_CODE('ccow'), /* typeWindowRef*/
4686  typeControlActionUPP = FOUR_CHAR_CODE('caup'), /* ControlActionUPP*/
4687  typeIndicatorDragConstraint =
4688  FOUR_CHAR_CODE('cidc'), /* IndicatorDragConstraint*/
4689  typeControlPartCode = FOUR_CHAR_CODE('cprt') /* ControlPartCode*/
4690 };
4691 
4692 /* Menu event parameters and types*/
4693 
4694 enum {
4695  kEventParamCurrentMenuTrackingMode =
4696  FOUR_CHAR_CODE('cmtm'), /* typeMenuTrackingMode*/
4697  kEventParamNewMenuTrackingMode =
4698  FOUR_CHAR_CODE('nmtm'), /* typeMenuTrackingMode*/
4699  kEventParamMenuFirstOpen = FOUR_CHAR_CODE('1sto'), /* typeBoolean*/
4700  kEventParamMenuItemIndex = FOUR_CHAR_CODE('item'), /* typeMenuItemIndex*/
4701  kEventParamMenuCommand = FOUR_CHAR_CODE('mcmd'), /* typeMenuCommand*/
4702  kEventParamEnableMenuForKeyEvent = FOUR_CHAR_CODE('fork'), /* typeBoolean*/
4703  kEventParamMenuEventOptions =
4704  FOUR_CHAR_CODE('meop'), /* typeMenuEventOptions*/
4705  kEventParamMenuContext = FOUR_CHAR_CODE('mctx'), /* typeUInt32*/
4706  kEventParamMenuItemBounds = FOUR_CHAR_CODE('mitb'), /* typeQDRectangle*/
4707  kEventParamMenuMarkBounds = FOUR_CHAR_CODE('mmkb'), /* typeQDRectangle*/
4708  kEventParamMenuIconBounds = FOUR_CHAR_CODE('micb'), /* typeQDRectangle*/
4709  kEventParamMenuTextBounds = FOUR_CHAR_CODE('mtxb'), /* typeQDRectangle*/
4710  kEventParamMenuTextBaseline = FOUR_CHAR_CODE('mtbl'), /* typeShortInteger*/
4711  kEventParamMenuCommandKeyBounds = FOUR_CHAR_CODE('mcmb'), /* typeQDRectangle*/
4712  kEventParamMenuVirtualTop = FOUR_CHAR_CODE('mvrt'), /* typeLongInteger*/
4713  kEventParamMenuVirtualBottom = FOUR_CHAR_CODE('mvrb'), /* typeLongInteger*/
4714  kEventParamMenuDrawState = FOUR_CHAR_CODE('mdrs'), /* typeThemeDrawState*/
4715  kEventParamMenuItemType = FOUR_CHAR_CODE('mitp'), /* typeThemeMenuItemType*/
4716  kEventParamMenuItemWidth = FOUR_CHAR_CODE('mitw'), /* typeShortInteger*/
4717  kEventParamMenuItemHeight = FOUR_CHAR_CODE('mith'), /* typeShortInteger*/
4718  typeMenuItemIndex = FOUR_CHAR_CODE('midx'), /* MenuItemIndex*/
4719  typeMenuCommand = FOUR_CHAR_CODE('mcmd'), /* MenuCommand*/
4720  typeMenuTrackingMode = FOUR_CHAR_CODE('mtmd'), /* MenuTrackingMode*/
4721  typeMenuEventOptions = FOUR_CHAR_CODE('meop'), /* MenuEventOptions*/
4722  typeThemeMenuState = FOUR_CHAR_CODE('tmns'), /* ThemeMenuState*/
4723  typeThemeMenuItemType = FOUR_CHAR_CODE('tmit') /* ThemeMenuItemType*/
4724 };
4725 
4726 /* Application event parameters*/
4727 
4728 enum {
4729  kEventParamProcessID = FOUR_CHAR_CODE('psn '), /* typeProcessSerialNumber*/
4730  kEventParamLaunchRefCon = FOUR_CHAR_CODE('lref'), /* typeUInt32*/
4731  kEventParamLaunchErr = FOUR_CHAR_CODE('err ') /* typeOSStatus*/
4732 };
4733 
4734 /* Tablet event parameters and types*/
4735 
4736 enum {
4737  kEventParamTabletPointRec = FOUR_CHAR_CODE('tbrc'), /* typeTabletPointRec*/
4738  kEventParamTabletProximityRec =
4739  FOUR_CHAR_CODE('tbpx'), /* typeTabletProximityRec*/
4740  typeTabletPointRec = FOUR_CHAR_CODE('tbrc'), /* kEventParamTabletPointRec*/
4741  typeTabletProximityRec =
4742  FOUR_CHAR_CODE('tbpx'), /* kEventParamTabletProximityRec*/
4743  kEventParamTabletPointerRec =
4744  FOUR_CHAR_CODE('tbrc'), /* typeTabletPointerRec -- deprecated, for
4745  compatibility only*/
4746  typeTabletPointerRec =
4747  FOUR_CHAR_CODE('tbrc') /* kEventParamTabletPointerRec -- deprecated,
4748  for compatibility only*/
4749 };
4750 
4751 /* Appearance event parameters*/
4752 
4753 enum {
4754  kEventParamNewScrollBarVariant = FOUR_CHAR_CODE('nsbv') /* typeShortInteger*/
4755 };
4756 
4757 /* Service event parameters*/
4758 
4759 enum {
4760  kEventParamScrapRef = FOUR_CHAR_CODE('scrp'), /* typeScrapRef*/
4761  kEventParamServiceCopyTypes =
4762  FOUR_CHAR_CODE('svsd'), /* typeCFMutableArrayRef*/
4763  kEventParamServicePasteTypes =
4764  FOUR_CHAR_CODE('svpt'), /* typeCFMutableArrayRef*/
4765  kEventParamServiceMessageName =
4766  FOUR_CHAR_CODE('svmg'), /* typeCFStringRef*/
4767  kEventParamServiceUserData = FOUR_CHAR_CODE('svud'), /* typeCFStringRef*/
4768  typeScrapRef = FOUR_CHAR_CODE('scrp'), /* ScrapRef*/
4769  typeCFMutableArrayRef = FOUR_CHAR_CODE('cfma') /* CFMutableArrayRef*/
4770 };
4771 
4772 /*======================================================================================*/
4773 /* EVENT HANDLERS */
4774 /*======================================================================================*/
4775 
4776 typedef struct OpaqueEventHandlerRef *EventHandlerRef;
4777 typedef struct OpaqueEventHandlerCallRef *EventHandlerCallRef;
4778 
4779 /*��������������������������������������������������������������������������������������*/
4780 /* � EventHandler specification */
4781 /*��������������������������������������������������������������������������������������*/
4782 
4810 typedef CALLBACK_API(OSStatus,
4811  EventHandlerProcPtr)(EventHandlerCallRef inHandlerCallRef,
4812  EventRef inEvent, void *inUserData);
4813 typedef STACK_UPP_TYPE(EventHandlerProcPtr) EventHandlerUPP;
4822 EventHandlerUPP
4823 NewEventHandlerUPP(EventHandlerProcPtr userRoutine);
4824 #if !OPAQUE_UPP_TYPES
4825 enum {
4826  uppEventHandlerProcInfo = 0x00000FF0
4827 }; /* pascal 4_bytes Func(4_bytes, 4_bytes, 4_bytes) */
4828 #ifdef __cplusplus
4829 inline EventHandlerUPP NewEventHandlerUPP(EventHandlerProcPtr userRoutine) {
4830  return (EventHandlerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
4831  uppEventHandlerProcInfo,
4832  GetCurrentArchitecture());
4833 }
4834 #else
4835 #define NewEventHandlerUPP(userRoutine) \
4836  (EventHandlerUPP) \
4837  NewRoutineDescriptor((ProcPtr)(userRoutine), uppEventHandlerProcInfo, \
4838  GetCurrentArchitecture())
4839 #endif
4840 #endif
4841 
4850 void
4851 DisposeEventHandlerUPP(EventHandlerUPP userUPP);
4852 #if !OPAQUE_UPP_TYPES
4853 #ifdef __cplusplus
4854 inline void DisposeEventHandlerUPP(EventHandlerUPP userUPP) {
4855  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
4856 }
4857 #else
4858 #define DisposeEventHandlerUPP(userUPP) DisposeRoutineDescriptor(userUPP)
4859 #endif
4860 #endif
4861 
4870 OSStatus
4871 InvokeEventHandlerUPP(EventHandlerCallRef inHandlerCallRef, EventRef inEvent,
4872  void *inUserData, EventHandlerUPP userUPP);
4873 #if !OPAQUE_UPP_TYPES
4874 #ifdef __cplusplus
4875 inline OSStatus InvokeEventHandlerUPP(EventHandlerCallRef inHandlerCallRef,
4876  EventRef inEvent, void *inUserData,
4877  EventHandlerUPP userUPP) {
4878  return (OSStatus)CALL_THREE_PARAMETER_UPP(
4879  userUPP, uppEventHandlerProcInfo, inHandlerCallRef, inEvent, inUserData);
4880 }
4881 #else
4882 #define InvokeEventHandlerUPP(inHandlerCallRef, inEvent, inUserData, userUPP) \
4883  (OSStatus) \
4884  CALL_THREE_PARAMETER_UPP((userUPP), uppEventHandlerProcInfo, \
4885  (inHandlerCallRef), (inEvent), (inUserData))
4886 #endif
4887 #endif
4888 
4889 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
4890 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
4891 #define NewEventHandlerProc(userRoutine) NewEventHandlerUPP(userRoutine)
4892 #define CallEventHandlerProc(userRoutine, inHandlerCallRef, inEvent, \
4893  inUserData) \
4894  InvokeEventHandlerUPP(inHandlerCallRef, inEvent, inUserData, userRoutine)
4895 #endif /* CALL_NOT_IN_CARBON */
4896 
4897 /*��������������������������������������������������������������������������������������*/
4898 /* � Installing Event Handlers */
4899 /* */
4900 /* Use these routines to install event handlers for a specific toolbox object.
4901  * You may */
4902 /* pass zero for inNumTypes and NULL for inList if you need to be in a situation
4903  * where */
4904 /* you know you will be receiving events, but not exactly which ones at the time
4905  * you */
4906 /* are installing the handler. Later, your application can call the Add/Remove
4907  * routines */
4908 /* listed below this section. */
4909 /* */
4910 /* You can only install a specific handler once. The combination of inHandler
4911  * and */
4912 /* inUserData is considered the 'signature' of a handler. Any attempt to install
4913  * a new */
4914 /* handler with the same proc and user data as an already-installed handler will
4915  * result */
4916 /* in eventHandlerAlreadyInstalledErr. Installing the same proc and user data on
4917  * a */
4918 /* different object is legal. */
4919 /* */
4920 /* Upon successful completion of this routine, you are returned an
4921  * EventHandlerRef, */
4922 /* which you can use in various other calls, and is passed to your event
4923  * handler. You */
4924 /* use it to extract information about the handler, such as the target (window,
4925  * etc.) */
4926 /* if you have the same handler installed for different objects and need to
4927  * perform */
4928 /* actions on the current target (say, call a window manager function). */
4929 /*��������������������������������������������������������������������������������������*/
4930 typedef struct OpaqueEventTargetRef *EventTargetRef;
4952 EventTargetRef
4954 
4976 EventTargetRef
4978 
5000 EventTargetRef
5002 
5019 EventTargetRef
5021 
5037 EventTargetRef
5039 
5058 EventTargetRef
5060 
5103 OSStatus
5104 InstallEventHandler(EventTargetRef inTarget, EventHandlerUPP inHandler,
5105  UInt32 inNumTypes, const EventTypeSpec *inList,
5106  void *inUserData,
5107  EventHandlerRef *outRef); /* can be NULL */
5108 
5117 OSStatus
5118 InstallStandardEventHandler(EventTargetRef inTarget);
5119 
5120 #define InstallApplicationEventHandler(h, n, l, u, r) \
5121  InstallEventHandler(GetApplicationEventTarget(), (h), (n), (l), (u), (r))
5122 
5123 #define InstallWindowEventHandler(t, h, n, l, u, r) \
5124  InstallEventHandler(GetWindowEventTarget(t), (h), (n), (l), (u), (r))
5125 
5126 #define InstallControlEventHandler(t, h, n, l, u, r) \
5127  InstallEventHandler(GetControlEventTarget(t), (h), (n), (l), (u), (r))
5128 
5129 #define InstallMenuEventHandler(t, h, n, l, u, r) \
5130  InstallEventHandler(GetMenuEventTarget(t), (h), (n), (l), (u), (r))
5131 
5138 #define DEFINE_ONE_SHOT_HANDLER_GETTER(x) \
5139  EventHandlerUPP Get##x##UPP() { \
5140  static EventHandlerUPP sHandler = NULL; \
5141  \
5142  if (sHandler == NULL) \
5143  sHandler = NewEventHandlerUPP(x); \
5144  \
5145  return sHandler; \
5146  }
5147 
5169 OSStatus
5170 RemoveEventHandler(EventHandlerRef inHandlerRef);
5171 
5172 /*��������������������������������������������������������������������������������������*/
5173 /* � Adjusting set of event types after a handler is created */
5174 /* */
5175 /* After installing a handler with the routine above, you can adjust the event
5176  * type */
5177 /* list telling the toolbox what events to send to that handler by calling the
5178  * two */
5179 /* routines below. If you add an event type twice for the same handler, your
5180  * handler */
5181 /* will only be called once, but it will take two RemoveEventType calls to stop
5182  * your */
5183 /* handler from being called with that event type. In other words, the install
5184  * count */
5185 /* for each event type is maintained by the toolbox. This might allow you, for
5186  * example */
5187 /* to have subclasses of a window object register for types without caring if
5188  * the base */
5189 /* class has already registered for that type. When the subclass removes its
5190  * types, it */
5191 /* can successfully do so without affecting the base class's reception of its
5192  * event */
5193 /* types, yielding eternal bliss. */
5194 /*��������������������������������������������������������������������������������������*/
5195 
5222 OSStatus
5223 AddEventTypesToHandler(EventHandlerRef inHandlerRef, UInt32 inNumTypes,
5224  const EventTypeSpec *inList);
5225 
5252 OSStatus
5253 RemoveEventTypesFromHandler(EventHandlerRef inHandlerRef, UInt32 inNumTypes,
5254  const EventTypeSpec *inList);
5255 
5256 /*��������������������������������������������������������������������������������������*/
5257 /* � Explicit Propogation */
5258 /* */
5259 /* CallNextEventHandler can be used to call thru to all handlers below the
5260  * current */
5261 /* handler being called. You pass the EventHandlerCallRef passed to your
5262  * EventHandler */
5263 /* into this call so that we know how to properly forward the event. The result
5264  * of */
5265 /* this function should normally be the result of your own handler that you
5266  * called */
5267 /* this API from. The typical use of this routine would be to allow the toolbox
5268  * to do */
5269 /* its standard processing and then follow up with some type of embellishment.
5270  */
5271 /*��������������������������������������������������������������������������������������*/
5272 
5299 OSStatus
5300 CallNextEventHandler(EventHandlerCallRef inCallRef, EventRef inEvent);
5301 
5302 /*��������������������������������������������������������������������������������������*/
5303 /* � Sending Events */
5304 /*��������������������������������������������������������������������������������������*/
5327 OSStatus
5328 SendEventToEventTarget(EventRef inEvent, EventTargetRef inTarget);
5329 
5330 #define SendEventToApplication(e) \
5331  SendEventToEventTarget((e), GetApplicationEventTarget())
5332 
5333 #define SendEventToWindow(e, t) \
5334  SendEventToEventTarget((e), GetWindowEventTarget(t))
5335 
5336 #define SendEventToControl(e, t) \
5337  SendEventToEventTarget((e), GetControlEventTarget(t))
5338 
5339 #define SendEventToMenu(e, t) SendEventToEventTarget((e), GetMenuEventTarget(t))
5340 
5341 #define SendEventToUserFocus(e) \
5342  SendEventToEventTarget((e), GetUserFocusEventTarget())
5343 
5344 /*======================================================================================*/
5345 /* EVENT-BASED OBJECT CLASSES */
5346 /* */
5347 /* Here it is - the replacement for classic defprocs. This is also a convenient
5348  * way */
5349 /* to create toolbox objects (windows, etc.) that have a specific behavior
5350  * without */
5351 /* installing handlers on each instance of the object. With a toolbox object
5352  * class, */
5353 /* you register your class, then use special creation routines to create
5354  * objects of */
5355 /* that class. The event handlers are automatically installed and ready to go.
5356  */
5357 /*======================================================================================*/
5358 
5359 typedef struct OpaqueToolboxObjectClassRef *ToolboxObjectClassRef;
5360 
5369 OSStatus
5370 RegisterToolboxObjectClass(CFStringRef inClassID,
5371  ToolboxObjectClassRef inBaseClass, /* can be NULL */
5372  UInt32 inNumEvents, const EventTypeSpec *inEventList,
5373  EventHandlerUPP inEventHandler,
5374  void *inEventHandlerData,
5375  ToolboxObjectClassRef *outClassRef);
5376 
5385 OSStatus
5386 UnregisterToolboxObjectClass(ToolboxObjectClassRef inClassRef);
5387 
5388 /*======================================================================================*/
5389 /* � Command Routines */
5390 /*======================================================================================*/
5391 
5400 OSStatus
5401 ProcessHICommand(const HICommand *inCommand);
5402 
5403 /*��������������������������������������������������������������������������������������*/
5404 /* � Event Loop Routines */
5405 /*��������������������������������������������������������������������������������������*/
5406 
5421 void
5423 
5442 void
5444 
5445 /*��������������������������������������������������������������������������������������*/
5446 /* � Event Modality routines */
5447 /*��������������������������������������������������������������������������������������*/
5448 
5475 OSStatus
5477 
5501 OSStatus
5503 
5534 OSStatus
5536 
5557 OSStatus
5559 
5560 /*��������������������������������������������������������������������������������������*/
5561 /* � User Focus */
5562 /* */
5563 /* The 'user focus' is where keyboard input goes. We also use the term 'key'
5564  * applied */
5565 /* to windows to mean this. The user focus window is normally the active
5566  * non-floating */
5567 /* window or dialog. It is possible to make a floater get the focus, however, by
5568  * calling*/
5569 /* SetUserFocusWindow. After that call, the event model will automatically route
5570  * key */
5571 /* input to the active keyboard focus of that window, if any. Passing
5572  * kUserFocusAuto */
5573 /* into the window parameter tells the toolbox to pick what it considers to be
5574  * the best */
5575 /* candidate for focus. You should call this to restore focus, rather than
5576  * getting the */
5577 /* focus, setting it to a special window, and then restoring to the saved focus.
5578  * There */
5579 /* are cases, however, when you might want to restore to an explicit window, but
5580  * the */
5581 /* typical usage should just be to restore to the kUserFocusAuto focus. */
5582 /* */
5583 /* Keep in mind that setting the focus will only last until you restore focus,
5584  * or the */
5585 /* user starts clicking in other windows. When that happens, the toolbox will
5586  * auto- */
5587 /* redirect the user focus to a newly selected window. */
5588 /*��������������������������������������������������������������������������������������*/
5589 enum { kUserFocusAuto = -1 };
5590 
5599 OSStatus
5601 
5610 WindowRef
5612 
5613 /*��������������������������������������������������������������������������������������*/
5614 /* � Default/Cancel buttons */
5615 /* */
5616 /* In our quest to eliminate the need for dialogs when using the new event
5617  * model, we */
5618 /* have added the following routines which add dialog-like button control to
5619  * normal */
5620 /* windows. With these routines, you can set the default and cancel buttons for
5621  * a */
5622 /* window; these work just like the corresponding concepts in dialogs, and when
5623  */
5624 /* present, the standard toolbox handlers will handle keyboard input mapping to
5625  * these */
5626 /* buttons. This means that pressing return or enter will 'press' the default
5627  * button */
5628 /* and escape or command-period will 'press' the cancel button. */
5629 /*��������������������������������������������������������������������������������������*/
5630 
5639 OSStatus
5641  ControlRef inControl); /* can be NULL */
5642 
5651 OSStatus
5653  ControlRef inControl); /* can be NULL */
5654 
5663 OSStatus
5665 
5674 OSStatus
5676 
5677 /*��������������������������������������������������������������������������������������*/
5678 /* � Global HotKey API */
5679 /*��������������������������������������������������������������������������������������*/
5681  OSType signature;
5682  UInt32 id;
5683 };
5684 typedef struct EventHotKeyID EventHotKeyID;
5685 typedef struct OpaqueEventHotKeyRef *EventHotKeyRef;
5731 OSStatus
5732 RegisterEventHotKey(UInt32 inHotKeyCode, UInt32 inHotKeyModifiers,
5733  EventHotKeyID inHotKeyID, EventTargetRef inTarget,
5734  OptionBits inOptions, EventHotKeyRef *outRef);
5735 
5760 OSStatus
5761 UnregisterEventHotKey(EventHotKeyRef inHotKey);
5762 
5763 /* OBSOLETE CONSTANTS*/
5764 
5765 enum {
5766  kMouseTrackingMousePressed = kMouseTrackingMouseDown,
5767  kMouseTrackingMouseReleased = kMouseTrackingMouseUp,
5768  kMouseTrackingMouseMoved = kMouseTrackingMouseDragged
5769 };
5770 
5771 #if PRAGMA_STRUCT_ALIGN
5772 #pragma options align = reset
5773 #elif PRAGMA_STRUCT_PACKPUSH
5774 #pragma pack(pop)
5775 #elif PRAGMA_STRUCT_PACK
5776 #pragma pack()
5777 #endif
5778 
5779 #ifdef PRAGMA_IMPORT_OFF
5780 #pragma import off
5781 #elif PRAGMA_IMPORT
5782 #pragma import reset
5783 #endif
5784 
5785 #ifdef __cplusplus
5786 }
5787 #endif
5788 
5789 #endif /* __CARBONEVENTS__ */
AppleEvent Data Model Interfaces.
AppleEvents Registry Interface.
@ keyAEEventID
Definition: AERegistry.h:345
@ keyAEEventClass
Definition: AERegistry.h:344
OSStatus InstallEventHandler(EventTargetRef inTarget, EventHandlerUPP inHandler, UInt32 inNumTypes, const EventTypeSpec *inList, void *inUserData, EventHandlerRef *outRef)
EventTime GetEventTime(EventRef inEvent)
EventQueueRef GetCurrentEventQueue(void)
Boolean IsEventInMask(EventRef inEvent, EventMask inMask)
void RunApplicationEventLoop(void)
UInt32 GetEventKind(EventRef inEvent)
@ kEventControlSetFocusPart
Definition: CarbonEvents.h:3890
@ kEventControlRemovingSubControl
Definition: CarbonEvents.h:4023
@ kEventControlGetOptimalBounds
Definition: CarbonEvents.h:3835
@ kEventControlGetFocusPart
Definition: CarbonEvents.h:3897
@ kEventControlApplyBackground
Definition: CarbonEvents.h:3873
@ kEventControlAddedSubControl
Definition: CarbonEvents.h:4017
@ kEventControlSetData
Definition: CarbonEvents.h:3998
@ kEventControlOwningWindowChanged
Definition: CarbonEvents.h:4036
@ kEventControlGetPartBounds
Definition: CarbonEvents.h:3992
@ kEventControlGetData
Definition: CarbonEvents.h:4004
@ kEventControlSimulateHit
Definition: CarbonEvents.h:3850
@ kEventControlActivate
Definition: CarbonEvents.h:3903
@ kEventControlApplyTextColor
Definition: CarbonEvents.h:3883
@ kEventControlTrack
Definition: CarbonEvents.h:3938
@ kEventControlHitTest
Definition: CarbonEvents.h:3858
@ kEventControlDispose
Definition: CarbonEvents.h:3824
@ kEventControlArbitraryMessage
Definition: CarbonEvents.h:4042
@ kEventControlGetScrollToHereStartPoint
Definition: CarbonEvents.h:3947
@ kEventControlIndicatorMoved
Definition: CarbonEvents.h:3962
@ kEventControlInitialize
Definition: CarbonEvents.h:3819
@ kEventControlGetPartRegion
Definition: CarbonEvents.h:3984
@ kEventControlGetIndicatorDragConstraint
Definition: CarbonEvents.h:3954
@ kEventControlSetCursor
Definition: CarbonEvents.h:3915
@ kEventControlDeactivate
Definition: CarbonEvents.h:3909
@ kEventControlClick
Definition: CarbonEvents.h:3930
@ kEventControlDraw
Definition: CarbonEvents.h:3865
@ kEventControlContextualMenuClick
Definition: CarbonEvents.h:3922
@ kEventControlValueFieldChanged
Definition: CarbonEvents.h:4011
@ kEventControlHit
Definition: CarbonEvents.h:3843
@ kEventControlGhostingFinished
Definition: CarbonEvents.h:3968
@ kEventControlGetActionProcPart
Definition: CarbonEvents.h:3976
@ kEventControlBoundsChanged
Definition: CarbonEvents.h:4029
OSStatus SetEventLoopTimerNextFireTime(EventLoopTimerRef inTimer, EventTimerInterval inNextFire)
OSStatus RunCurrentEventLoop(EventTimeout inTimeout)
@ kEventAppearanceScrollBarVariantChanged
Definition: CarbonEvents.h:4374
EventTime GetLastUserEventTime(void)
OSStatus ReceiveNextEvent(UInt32 inNumTypes, const EventTypeSpec *inList, EventTimeout inTimeout, Boolean inPullEvent, EventRef *outEvent)
OSStatus EndAppModalStateForWindow(WindowRef inWindow)
@ kEventWindowActivated
Definition: CarbonEvents.h:2342
@ kEventWindowGetClickActivation
Definition: CarbonEvents.h:2358
@ kEventWindowDeactivated
Definition: CarbonEvents.h:2349
EventRef FindSpecificEventInQueue(EventQueueRef inQueue, EventComparatorUPP inComparator, void *inCompareData)
OSStatus InstallStandardEventHandler(EventTargetRef inTarget)
OSStatus RemoveEventLoopTimer(EventLoopTimerRef inTimer)
OSStatus RegisterToolboxObjectClass(CFStringRef inClassID, ToolboxObjectClassRef inBaseClass, UInt32 inNumEvents, const EventTypeSpec *inEventList, EventHandlerUPP inEventHandler, void *inEventHandlerData, ToolboxObjectClassRef *outClassRef)
@ kEventMouseWheelAxisX
Definition: CarbonEvents.h:1884
@ kEventMouseWheelAxisY
Definition: CarbonEvents.h:1889
OSStatus AddEventTypesToHandler(EventHandlerRef inHandlerRef, UInt32 inNumTypes, const EventTypeSpec *inList)
@ kControlBoundsChangePositionChanged
Definition: CarbonEvents.h:4065
@ kControlBoundsChangeSizeChanged
Definition: CarbonEvents.h:4060
@ kEventMouseButtonSecondary
Definition: CarbonEvents.h:1866
@ kEventMouseButtonPrimary
Definition: CarbonEvents.h:1861
@ kEventMouseButtonTertiary
Definition: CarbonEvents.h:1871
OSStatus CallNextEventHandler(EventHandlerCallRef inCallRef, EventRef inEvent)
@ kWindowBoundsChangeOriginChanged
Definition: CarbonEvents.h:2490
@ kWindowBoundsChangeUserResize
Definition: CarbonEvents.h:2480
@ kWindowBoundsChangeSizeChanged
Definition: CarbonEvents.h:2485
@ kWindowBoundsChangeUserDrag
Definition: CarbonEvents.h:2475
@ kEventAppleEvent
Definition: CarbonEvents.h:2277
@ kHICommandAbout
Definition: CarbonEvents.h:3742
@ kHICommandClear
Definition: CarbonEvents.h:3624
@ kHICommandNew
Definition: CarbonEvents.h:3747
@ kHICommandHide
Definition: CarbonEvents.h:3636
@ kHICommandArrangeInFront
Definition: CarbonEvents.h:3701
@ kHICommandOpen
Definition: CarbonEvents.h:3752
@ kHICommandUndo
Definition: CarbonEvents.h:3599
@ kHICommandMaximizeWindow
Definition: CarbonEvents.h:3686
@ kHICommandWindowListTerminator
Definition: CarbonEvents.h:3730
@ kHICommandCancel
Definition: CarbonEvents.h:3589
@ kHICommandSelectWindow
Definition: CarbonEvents.h:3737
@ kHICommandWindowListSeparator
Definition: CarbonEvents.h:3720
@ kHICommandMinimizeWindow
Definition: CarbonEvents.h:3671
@ kHICommandSelectAll
Definition: CarbonEvents.h:3629
@ kHICommandMinimizeAll
Definition: CarbonEvents.h:3679
@ kHICommandPageSetup
Definition: CarbonEvents.h:3784
@ kHICommandPreferences
Definition: CarbonEvents.h:3655
@ kHICommandOK
Definition: CarbonEvents.h:3584
@ kHICommandMaximizeAll
Definition: CarbonEvents.h:3694
@ kHICommandPrint
Definition: CarbonEvents.h:3778
@ kHICommandClose
Definition: CarbonEvents.h:3757
@ kHICommandShowAll
Definition: CarbonEvents.h:3650
@ kHICommandRedo
Definition: CarbonEvents.h:3604
@ kHICommandRevert
Definition: CarbonEvents.h:3773
@ kHICommandBringAllToFront
Definition: CarbonEvents.h:3709
@ kHICommandCut
Definition: CarbonEvents.h:3609
@ kHICommandQuit
Definition: CarbonEvents.h:3594
@ kHICommandAppHelp
Definition: CarbonEvents.h:3792
@ kHICommandCopy
Definition: CarbonEvents.h:3614
@ kHICommandZoomWindow
Definition: CarbonEvents.h:3664
@ kHICommandSaveAs
Definition: CarbonEvents.h:3767
@ kHICommandPaste
Definition: CarbonEvents.h:3619
@ kHICommandSave
Definition: CarbonEvents.h:3762
@ kHICommandHideOthers
Definition: CarbonEvents.h:3643
UInt32 GetEventRetainCount(EventRef inEvent)
void DisposeEventComparatorUPP(EventComparatorUPP userUPP)
@ kEventPriorityHigh
Definition: CarbonEvents.h:190
@ kEventPriorityLow
Definition: CarbonEvents.h:180
@ kEventPriorityStandard
Definition: CarbonEvents.h:185
EventComparatorUPP NewEventComparatorUPP(EventComparatorProcPtr userRoutine)
void QuitApplicationEventLoop(void)
Boolean ConvertEventRefToEventRecord(EventRef inEvent, EventRecord *outEvent)
@ kEventTabletProximity
Definition: CarbonEvents.h:4272
@ kEventTabletPoint
Definition: CarbonEvents.h:4266
UInt16 EventMouseButton
Definition: CarbonEvents.h:1854
struct OpaqueEventLoopTimerRef * EventLoopTimerRef
Definition: CarbonEvents.h:1437
OSStatus RemoveEventFromQueue(EventQueueRef inQueue, EventRef inEvent)
typedef CALLBACK_API(Boolean, EventComparatorProcPtr)(EventRef inEvent
EventLoopRef GetCurrentEventLoop(void)
OSStatus RemoveEventTypesFromHandler(EventHandlerRef inHandlerRef, UInt32 inNumTypes, const EventTypeSpec *inList)
EventTime GetCurrentEventTime(void)
EventTargetRef GetMenuEventTarget(MenuRef inMenu)
EventTargetRef GetControlEventTarget(ControlRef inControl)
OSStatus SetWindowDefaultButton(WindowRef inWindow, ControlRef inControl)
@ kEventWindowFocusRelinquish
Definition: CarbonEvents.h:2952
@ kEventWindowFocusAcquired
Definition: CarbonEvents.h:2945
OSStatus FlushEventQueue(EventQueueRef inQueue)
OSStatus SetMouseCoalescingEnabled(Boolean inNewState, Boolean *outOldState)
@ kEventServiceGetTypes
Definition: CarbonEvents.h:4430
@ kEventServicePaste
Definition: CarbonEvents.h:4417
@ kEventServiceCopy
Definition: CarbonEvents.h:4410
@ kEventServicePerform
Definition: CarbonEvents.h:4440
EventQueueRef GetMainEventQueue(void)
void InvokeEventLoopTimerUPP(EventLoopTimerRef inTimer, void *inUserData, EventLoopTimerUPP userUPP)
OSStatus SetUserFocusWindow(WindowRef inWindow)
void ReleaseEvent(EventRef inEvent)
EventRef RetainEvent(EventRef inEvent)
@ kMenuContextPullDown
Definition: CarbonEvents.h:3379
@ kMenuContextPopUp
Definition: CarbonEvents.h:3385
@ kMenuContextMenuBarTracking
Definition: CarbonEvents.h:3397
@ kMenuContextMenuEnabling
Definition: CarbonEvents.h:3418
@ kMenuContextMenuBar
Definition: CarbonEvents.h:3373
@ kMenuContextPopUpTracking
Definition: CarbonEvents.h:3403
@ kMenuContextKeyMatching
Definition: CarbonEvents.h:3409
@ kMenuContextSubmenu
Definition: CarbonEvents.h:3391
OSStatus InstallEventLoopTimer(EventLoopRef inEventLoop, EventTimerInterval inFireDelay, EventTimerInterval inInterval, EventLoopTimerUPP inTimerProc, void *inTimerData, EventLoopTimerRef *outTimer)
OSStatus GetWindowDefaultButton(WindowRef inWindow, ControlRef *outControl)
OSStatus BeginAppModalStateForWindow(WindowRef inWindow)
void DisposeEventHandlerUPP(EventHandlerUPP userUPP)
@ kEventWindowDrawContent
Definition: CarbonEvents.h:2315
@ kEventWindowUpdate
Definition: CarbonEvents.h:2308
OSStatus GetWindowCancelButton(WindowRef inWindow, ControlRef *outControl)
OSStatus RegisterEventHotKey(UInt32 inHotKeyCode, UInt32 inHotKeyModifiers, EventHotKeyID inHotKeyID, EventTargetRef inTarget, OptionBits inOptions, EventHotKeyRef *outRef)
OSStatus ProcessHICommand(const HICommand *inCommand)
@ kEventVolumeMounted
Definition: CarbonEvents.h:4334
@ kEventVolumeUnmounted
Definition: CarbonEvents.h:4340
EventTargetRef GetApplicationEventTarget(void)
OSStatus QuitEventLoop(EventLoopRef inEventLoop)
void DisposeEventLoopTimerUPP(EventLoopTimerUPP userUPP)
Boolean InvokeEventComparatorUPP(EventRef inEvent, void *inCompareData, EventComparatorUPP userUPP)
@ kEventWindowExpanded
Definition: CarbonEvents.h:2690
@ kEventWindowZoomAll
Definition: CarbonEvents.h:2745
@ kEventWindowGetMaximumSize
Definition: CarbonEvents.h:2779
@ kEventWindowZoomed
Definition: CarbonEvents.h:2735
@ kEventWindowExpand
Definition: CarbonEvents.h:2685
@ kEventWindowCloseAll
Definition: CarbonEvents.h:2721
@ kEventWindowConstrain
Definition: CarbonEvents.h:2814
@ kEventWindowGetMinimumSize
Definition: CarbonEvents.h:2773
@ kEventWindowCollapse
Definition: CarbonEvents.h:2660
@ kEventWindowCollapsed
Definition: CarbonEvents.h:2665
@ kEventWindowPathSelect
Definition: CarbonEvents.h:2761
@ kEventWindowCollapseAll
Definition: CarbonEvents.h:2674
@ kEventWindowContextualMenuSelect
Definition: CarbonEvents.h:2754
@ kEventWindowGetIdealSize
Definition: CarbonEvents.h:2767
@ kEventWindowExpandAll
Definition: CarbonEvents.h:2699
@ kEventWindowProxyBeginDrag
Definition: CarbonEvents.h:2828
@ kEventWindowClosed
Definition: CarbonEvents.h:2712
@ kEventWindowZoom
Definition: CarbonEvents.h:2730
@ kEventWindowClose
Definition: CarbonEvents.h:2707
@ kEventWindowProxyEndDrag
Definition: CarbonEvents.h:2834
@ kEventWindowHandleContentClick
Definition: CarbonEvents.h:2822
@ kEventWindowToolbarSwitchMode
Definition: CarbonEvents.h:2846
Boolean IsMouseCoalescingEnabled(void)
OSStatus SendEventToEventTarget(EventRef inEvent, EventTargetRef inTarget)
Boolean IsUserCancelEventRef(EventRef event)
CFTypeRef GetCFRunLoopFromEventLoop(EventLoopRef inEventLoop)
OSStatus InvokeEventHandlerUPP(EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData, EventHandlerUPP userUPP)
@ kEventKeyModifierNumLockBit
Definition: CarbonEvents.h:2118
@ kEventKeyModifierFnBit
Definition: CarbonEvents.h:2123
@ kEventClassVolume
Definition: CarbonEvents.h:1712
@ kEventClassAppleEvent
Definition: CarbonEvents.h:1682
@ kEventClassTablet
Definition: CarbonEvents.h:1707
@ kEventClassCommand
Definition: CarbonEvents.h:1702
@ kEventClassApplication
Definition: CarbonEvents.h:1677
@ kEventClassMenu
Definition: CarbonEvents.h:1687
@ kEventClassAppearance
Definition: CarbonEvents.h:1717
@ kEventClassService
Definition: CarbonEvents.h:1722
@ kEventClassTextInput
Definition: CarbonEvents.h:1672
@ kEventClassWindow
Definition: CarbonEvents.h:1692
@ kEventClassKeyboard
Definition: CarbonEvents.h:1667
@ kEventClassMouse
Definition: CarbonEvents.h:1662
@ kEventClassControl
Definition: CarbonEvents.h:1697
OSStatus PostEventToQueue(EventQueueRef inQueue, EventRef inEvent, EventPriority inPriority)
EventLoopRef GetMainEventLoop(void)
@ kEventMouseMoved
Definition: CarbonEvents.h:1749
@ kEventMouseDown
Definition: CarbonEvents.h:1739
@ kEventMouseUp
Definition: CarbonEvents.h:1744
@ kEventMouseDragged
Definition: CarbonEvents.h:1754
@ kEventMouseWheelMoved
Definition: CarbonEvents.h:1759
@ kEventWindowClickDragRgn
Definition: CarbonEvents.h:2556
@ kEventWindowClickResizeRgn
Definition: CarbonEvents.h:2562
@ kEventWindowClickProxyIconRgn
Definition: CarbonEvents.h:2597
@ kEventWindowClickCollapseRgn
Definition: CarbonEvents.h:2570
@ kEventWindowClickContentRgn
Definition: CarbonEvents.h:2590
@ kEventWindowClickZoomRgn
Definition: CarbonEvents.h:2582
@ kEventWindowClickToolbarButtonRgn
Definition: CarbonEvents.h:2604
@ kEventWindowClickCloseRgn
Definition: CarbonEvents.h:2576
@ kEventWindowClickStructureRgn
Definition: CarbonEvents.h:2610
OSStatus UnregisterToolboxObjectClass(ToolboxObjectClassRef inClassRef)
WindowRef GetUserFocusWindow(void)
OSStatus TrackMouseLocationWithOptions(GrafPtr inPort, OptionBits inOptions, EventTimeout inTimeout, Point *outPt, UInt32 *outModifiers, MouseTrackingResult *outResult)
EventTargetRef GetUserFocusEventTarget(void)
UInt32 GetNumEventsInQueue(EventQueueRef inQueue)
OSStatus SetEventParameter(EventRef inEvent, EventParamName inName, EventParamType inType, UInt32 inSize, const void *inDataPtr)
@ kEventWindowModified
Definition: CarbonEvents.h:3031
@ kEventWindowDrawGrowBox
Definition: CarbonEvents.h:3060
@ kEventWindowHitTest
Definition: CarbonEvents.h:3005
@ kEventWindowStateChanged
Definition: CarbonEvents.h:3044
@ kEventWindowDrawPart
Definition: CarbonEvents.h:2989
@ kEventWindowDragHilite
Definition: CarbonEvents.h:3024
@ kEventWindowGetRegion
Definition: CarbonEvents.h:2997
@ kEventWindowSetupProxyDragImage
Definition: CarbonEvents.h:3038
@ kEventWindowPaint
Definition: CarbonEvents.h:3082
@ kEventWindowInit
Definition: CarbonEvents.h:3012
@ kEventWindowDispose
Definition: CarbonEvents.h:3017
@ kEventWindowDrawFrame
Definition: CarbonEvents.h:2982
@ kEventWindowMeasureTitle
Definition: CarbonEvents.h:3050
@ kEventWindowGetGrowImageRegion
Definition: CarbonEvents.h:3070
OSStatus TrackMouseRegion(GrafPtr inPort, RgnHandle inRegion, Boolean *ioWasInRgn, MouseTrackingResult *outResult)
OSStatus FlushSpecificEventsFromQueue(EventQueueRef inQueue, EventComparatorUPP inComparator, void *inCompareData)
EventLoopTimerUPP NewEventLoopTimerUPP(EventLoopTimerProcPtr userRoutine)
@ kEventMenuClosed
Definition: CarbonEvents.h:3227
@ kEventMenuOpening
Definition: CarbonEvents.h:3222
@ kEventMenuBeginTracking
Definition: CarbonEvents.h:3195
@ kEventMenuMeasureItemWidth
Definition: CarbonEvents.h:3340
@ kEventMenuEndTracking
Definition: CarbonEvents.h:3200
@ kEventMenuEnableItems
Definition: CarbonEvents.h:3305
@ kEventMenuTargetItem
Definition: CarbonEvents.h:3233
@ kEventMenuMeasureItemHeight
Definition: CarbonEvents.h:3350
@ kEventMenuMatchKey
Definition: CarbonEvents.h:3266
@ kEventMenuDispose
Definition: CarbonEvents.h:3357
@ kEventMenuPopulate
Definition: CarbonEvents.h:3330
@ kEventMenuChangeTrackingMode
Definition: CarbonEvents.h:3208
UInt16 EventMouseWheelAxis
Definition: CarbonEvents.h:1878
@ kEventTextInputOffsetToPos
Definition: CarbonEvents.h:1940
@ kEventTextInputUnicodeForKeyEvent
Definition: CarbonEvents.h:1932
@ kEventTextInputGetSelectedText
Definition: CarbonEvents.h:1962
@ kEventTextInputShowHideBottomWindow
Definition: CarbonEvents.h:1956
@ kEventTextInputUpdateActiveInputArea
Definition: CarbonEvents.h:1918
@ kEventTextInputPosToOffset
Definition: CarbonEvents.h:1949
CFStringRef CreateTypeStringWithOSType(OSType inType)
OSStatus SetWindowCancelButton(WindowRef inWindow, ControlRef inControl)
@ kEventWindowShowing
Definition: CarbonEvents.h:2394
@ kEventWindowDragStarted
Definition: CarbonEvents.h:2449
@ kEventWindowShown
Definition: CarbonEvents.h:2404
@ kEventWindowBoundsChanging
Definition: CarbonEvents.h:2426
@ kEventWindowResizeStarted
Definition: CarbonEvents.h:2439
@ kEventWindowDragCompleted
Definition: CarbonEvents.h:2454
@ kEventWindowBoundsChanged
Definition: CarbonEvents.h:2434
@ kEventWindowResizeCompleted
Definition: CarbonEvents.h:2444
@ kEventWindowHiding
Definition: CarbonEvents.h:2399
@ kEventWindowHidden
Definition: CarbonEvents.h:2409
EventTargetRef GetEventDispatcherTarget(void)
OSStatus MacCreateEvent(CFAllocatorRef inAllocator, UInt32 inClassID, UInt32 kind, EventTime when, EventAttributes flags, EventRef *outEvent)
@ kEventAppActivated
Definition: CarbonEvents.h:2177
@ kEventAppLaunched
Definition: CarbonEvents.h:2206
@ kEventAppFrontSwitched
Definition: CarbonEvents.h:2218
@ kEventAppLaunchNotification
Definition: CarbonEvents.h:2200
@ kEventAppGetDockTileMenu
Definition: CarbonEvents.h:2231
@ kEventAppTerminated
Definition: CarbonEvents.h:2212
@ kEventAppDeactivated
Definition: CarbonEvents.h:2182
@ kEventAppQuit
Definition: CarbonEvents.h:2193
OSStatus UnregisterEventHotKey(EventHotKeyRef inHotKey)
EventRef CopyEvent(EventRef inOther)
OSStatus TrackMouseLocation(GrafPtr inPort, Point *outPt, MouseTrackingResult *outResult)
OSStatus GetEventParameter(EventRef inEvent, EventParamName inName, EventParamType inDesiredType, EventParamType *outActualType, UInt32 inBufferSize, UInt32 *outActualSize, void *outData)
@ kEventRawKeyUp
Definition: CarbonEvents.h:2087
@ kEventRawKeyModifiersChanged
Definition: CarbonEvents.h:2092
@ kEventHotKeyReleased
Definition: CarbonEvents.h:2102
@ kEventRawKeyDown
Definition: CarbonEvents.h:2077
@ kEventHotKeyPressed
Definition: CarbonEvents.h:2097
@ kEventRawKeyRepeat
Definition: CarbonEvents.h:2082
OSStatus SetEventTime(EventRef inEvent, EventTime inTime)
SInt16 EventPriority
Definition: CarbonEvents.h:173
struct OpaqueEventLoopRef * EventLoopRef
Definition: CarbonEvents.h:300
EventTargetRef GetWindowEventTarget(WindowRef inWindow)
OSStatus FlushEventsMatchingListFromQueue(EventQueueRef inQueue, UInt32 inNumTypes, const EventTypeSpec *inList)
OSStatus RunAppModalLoopForWindow(WindowRef inWindow)
OSStatus RemoveEventHandler(EventHandlerRef inHandlerRef)
EventHandlerUPP NewEventHandlerUPP(EventHandlerProcPtr userRoutine)
UInt32 GetEventClass(EventRef inEvent)
Boolean IsEventInQueue(EventQueueRef inQueue, EventRef inEvent)
OSStatus QuitAppModalLoopForWindow(WindowRef inWindow)
@ kEventWindowCursorChange
Definition: CarbonEvents.h:2629
@ kEventCommandUpdateStatus
Definition: CarbonEvents.h:3559
@ kEventCommandProcess
Definition: CarbonEvents.h:3549
@ eventKindIncorrectErr
Definition: CarbonEvents.h:118
@ eventLoopTimedOutErr
Definition: CarbonEvents.h:137
@ eventLoopQuitErr
Definition: CarbonEvents.h:143
@ eventAlreadyPostedErr
Definition: CarbonEvents.h:85
@ eventHandlerAlreadyInstalledErr
Definition: CarbonEvents.h:108
@ eventClassInvalidErr
Definition: CarbonEvents.h:96
@ eventInternalErr
Definition: CarbonEvents.h:113
@ eventTargetBusyErr
Definition: CarbonEvents.h:91
@ eventNotHandledErr
Definition: CarbonEvents.h:131
@ eventNotInQueueErr
Definition: CarbonEvents.h:149
@ eventParameterNotFoundErr
Definition: CarbonEvents.h:123
@ eventClassIncorrectErr
Definition: CarbonEvents.h:101
Control Manager interfaces.
Event Manager Interfaces.
struct OpaqueEventRef * EventRef
Definition: Events.h:1081
unsigned char Boolean
Definition: MacTypes.h:318
Window Manager Interfaces.
Menu Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Definition: Controls.h:165
Definition: CarbonEvents.h:5680
Definition: Events.h:224
Definition: CarbonEvents.h:242
Definition: Quickdraw.h:1648
Definition: CarbonEvents.h:3797
Definition: CarbonEvents.h:1777
float y
Definition: CarbonEvents.h:1787
float x
Definition: CarbonEvents.h:1782
Definition: Quickdraw.h:306
Definition: Menus.h:753
Definition: MacTypes.h:520
Definition: CarbonEvents.h:4277
Definition: CarbonEvents.h:4303
Definition: MacTypes.h:110