Important: The Event Manager is a legacy System 7 technology. You should use the Mac OS X Carbon Event Manager instead. See Carbon Event Manager Programming Guide.
| Framework | Carbon/Carbon.h |
| Declared in | CarbonEvents.h CarbonEventsCore.h Events.h |
Important: The Event Manager is a legacy System 7 technology. You should use the Mac OS X Carbon Event Manager instead. See Carbon Event Manager Programming Guide.
The Event Manager is a legacy System 7 technology that was created to support the cooperative, multitasking environment available on Macintosh computers at the time. This environment allowed users to switch between many open applications and allows other applications to receive background processing time.
The Carbon Event Manager, introduced in Mac OS X, offers a simple yet flexible approach to event handling that greatly reduces the amount of code needed to write a basic application. Moreover, the Carbon Event Manager's streamlined event handling enhances system performance on Mac OS X through more efficient allocation of processing time. Applications that use the Carbon Event Manager not only run better on Mac OS X, they help improve overall performance and responsiveness.
Since the introduction of the Macintosh computer, Mac applications have used the Event Manager to receive information about actions performed by the user, to receive notices of changes in their processing, and to communicate with other applications. For example, an application can retrieve information from the Event Manager about whether the user has pressed a key or the mouse button, whether one of the application’s windows needs updating, or whether some other hardware-related or software-related action requires a response from the application.
Applications also used the Event Manager to support the cooperative, multitasking environment available on versions of the Mac OS that preceded Mac OS X. This environment allows users to switch between many open applications and allows other applications to receive background processing time. By using Event Manager routines, an application allowed the system software to coordinate the scheduling of processing time between it and other applications.
Carbon supports the majority of the Event Manager.
High-level events APIs (as contained in EPPC.h) are not supported. You should use Apple events instead.
Carbon does not support the diskEvt event. Support for volume mount and unmount events will be available in the Carbon Event Manager.
Carbon does not set the convertClipboardFlag in the EventRecord to indicate that the scrap has changed while the application was suspended. You should call the Scrap Manager function GetCurrentScrap instead.
Low-level event queue functions, such as GetEvQHdr and PPostEvent, are no longer supported.
Application-defined function-key procedures are not supported in Carbon.
LMGetKeyRepThresh
LMGetKeyThresh
LMSetKeyRepThresh
LMSetKeyThresh
LMGetKbdType
LMGetKbdLast
LMSetKbdLast
LMSetKbdType
KeyScript Deprecated in Mac OS X v10.5
GetKeys
GetCurrentKeyModifiers
IsCmdChar Deprecated in Mac OS X v10.6
KeyTranslate Deprecated in Mac OS X v10.6
SetEventMask
EventAvail Deprecated in Mac OS X v10.6
FlushEvents Deprecated in Mac OS X v10.6
GetNextEvent Deprecated in Mac OS X v10.6
WaitNextEvent Deprecated in Mac OS X v10.6
PostEvent Deprecated in Mac OS X v10.6
Checks the event queue for an user-cancel event.
Boolean CheckEventQueueForUserCancel ( void );
Returns true if
a user-cancel event is in the queue, false otherwise.
CarbonEvents.hObtains the suggested difference in ticks that should exist between blinks of the caret (usually a vertical bar marking the insertion point) in editable text.
UInt32 GetCaretTime ( void );
The blink delay, in ticks.
If your application supports editable text, your application should use the value returned by GetCaretTime to determine how often to blink the caret. If your application uses only TextEdit, you can use TextEdit functions to automatically blink the caret at the time interval that the user specifies in the General Controls panel.
Events.hReturns the current state of the keyboard modifier keys.
UInt32 GetCurrentKeyModifiers ( void );
A bit mask indicating which keyboard modifier keys are pressed. See “Event Modifier Constants” for a list of possible values.
GetCurrentKeyModifiers provides a more convenient way to get the modifier key state than calling GetNextEvent. It returns a value whose individual bits indicate which keyboard modifier keys are currently being pressed. You can test for the Caps Lock, Shift, Control, Option, and Command keys.
CarbonEventsCore.hDetermines whether a sequence of mouse events constitutes a double click.
UInt32 GetDblTime ( void );
The suggested maximum elapsed time, in ticks, between a mouse-up event and a mouse-down event.
The GetDblTime function returns the suggested maximum elapsed time, in ticks, between a mouse-up event and a mouse-down event. The user can adjust this value using the Mouse control panel.
If your application distinguishes a double click of the mouse from a single click, your application should use the value returned by GetDblTime to make this distinction. If your application uses TextEdit, the TextEdit functions automatically recognize and handle double clicks of text within a TextEdit edit structure by appropriately highlighting or unhighlighting the selection.
The ratio of ticks to value in the DoubleTime global variable is 1:1. However, the Finder multiplies DoubleTime by 2 to determine double click time because it needs to account for user problems that typically occur during icon arrangement. Therefore, the Finder uses DoubleTime*2 whereas the rest of the system uses DoubleTime.
Incidentally, the Finder does not limit the DoubleTime to 64 ticks. In most places, it treats it like a byte although in some others it treats it like a longword. The best method would be to provide a one-second double-byte (two seconds in the Finder).
Events.hObtains the position of the mouse, in global coordinates.
void GetGlobalMouse ( Point *globalMouse );
The position of the mouse, as a global point.
CarbonEventsCore.hObtains the current state of the keyboard.
void GetKeys ( KeyMap theKeys );
On output, the current state of the keyboard, including the keypad, if any.
You can use the GetKeys function to determine the current state of the keyboard at any time. For example, you can determine whether one of the modifier keys is down by itself or in combination with another key using the GetKeys function.
Events.hReturns a value that specifies the last physical keyboard type used.
UInt8 LMGetKbdLast ( void );
The last physical keyboard type used.
Events.hReturns a value that specifies the physical keyboard type.
UInt8 LMGetKbdType ( void );
The physical keyboard type.
Events.hReturns the low-memory auto-key rate.
SInt16 LMGetKeyRepThresh ( void );
The auto-key rate, that is, the amount of time, in ticks, that must elapse before the Event Manager generates a subsequent auto-key event.
Events.hReturns the low-memory auto-key threshold.
SInt16 LMGetKeyThresh ( void );
Returns the auto-key threshold, that is, the amount of time, in ticks, that must elapse before the Event Manager generates an auto-key event.
Events.hSets a value that specifies the last physical keyboard type used.
void LMSetKbdLast ( UInt8 value );
The physical keyboard type you want to set.
Events.hSets the keyboard type.
void LMSetKbdType ( UInt8 value );
The physical keyboard type you want to set.
Events.hSets the low-memory auto-key rate.
void LMSetKeyRepThresh ( SInt16 value );
The low-memory auto-key rate you want to set.
LMSetKeyRepThresh sets the low-memory auto-key rate, that is, the amount of time, in ticks, that must elapse before the Event Manager generates a subsequent auto-key event.
Events.hSets the low-memory auto-key threshold.
void LMSetKeyThresh ( SInt16 value );
The low-memory auto-key threshold you want to set.
LMSetKeyThresh sets the low-memory auto-key threshold, that is, the amount of time, in ticks, that must elapse before the Event Manager generates an auto-key event.
Events.hSets the system event mask of your application to the specified mask.
void SetEventMask ( EventMask value );
A value that specifies which events should be posted in the Operating System event queue. You specify the event mask using one or more of the values defined in “Event Mask Constants.”
Your application should not call the SetEventMask function
to disable any event types from being posted. Use SetEventMask only
to enable key-up events if your application needs to respond to
key-up events.
The SetEventMask function
sets the system event mask of your application according to the parameter value.
The Operating System Event Manager posts only low-level events (other than
update or activate events) corresponding to bits in the system event
mask of the current process when posting events in the Operating
System event queue. The system event mask of an application is initially
set to post mouse-up, mouse-down, key-down, auto-key, and disk-inserted
events into the Operating System event queue.
Events.hContains information associated with an event.
struct EventRecord {
EventKind what;
UInt32 message;
UInt32 when;
Point where;
EventModifiers modifiers;
};
typedef struct EventRecord EventRecord;
whatThe kind of event received. The Event Manager
specifies the kind of event with one of the values defined by the EventKind enumeration.
messageAdditional information associated with the event.
The interpretation of this information depends on the event type.
The contents of the message field
for each event type are summarized here:
For a null, mouse-up, or mouse-down event, the event message is:Undefined.
For a key-up, key-down, or auto-key event, the event message
is:The low-order word contains the character code and virtual key
code, which you can access with the constants charCodeMask and keyCodeMask, respectively.
For Apple Desktop Bus (ADB) keyboards, the low byte of the high-order
word contains the ADB address of the keyboard where the keyboard
event occurred. The high byte of the high-order word is reserved.
For an update or activate event, the event message is:A pointer to the window to update, activate, or deactivate.
For a disk-inserted event, the event message is:The drive number in the low-order word, the File Manager result code in the high-order word.
For a resume event, the event message is:The suspendResumeMessage enumerator
in bits 24–31 and a 1 (the resumeFlag enumerator)
in bit 0 indicate the event is a resume event. Bit 1 contains a
1 (the convertClipBoardFlag enumerator)
if Clipboard conversion is required, and bits 2–23 are reserved.
For a suspend event, the event message is:The suspendResumeMessage enumerator
in bits 24–31 and a 0 in bit 0 to indicate the event is a suspend
event. Bit 1 is undefined, and bits 2–23 are reserved.
For a mouse-moved event, the event message is:The mouseMovedMessage enumerator
in bits 24–31. Bits 2–23 are reserved, and bit 0 and bit 1 are undefined.
For a high-level event, the event message is:
The class
of events to which the high-level event belongs. The message and where fields
of a high-level event define the specific type of high-level event
received.
whenThe when field
indicates the time when the event was posted (in ticks since system
startup).
whereFor low-level events and operating-system events,
the where field contains the
location of the cursor at the time the event was posted (in global coordinates).
For
high-level events, the where field
contains a second event specifier, the event ID. The event ID defines
the particular type of event within the class of events defined
by the message field
of the high-level event. For high-level events, you should interpret
the where field as having
the data type OSType, not Point.
modifiersThe modifiers field
contains information about the state of the modifier keys and the
mouse button at the time the event was posted. For activate events, this
field also indicates whether the window should be activated or deactivated.
In System 7 it also indicates whether the mouse-down event caused
your application to switch to the foreground.
Each of the
modifier keys is represented by a specific bit in the modifiers field of
the event structure. The modifier keys include the Option, Command, Caps
Lock, Control, and Shift keys. If your application attaches special meaning
to any of these keys in combination with other keys or when the mouse
button is down, you can test the state of the modifiers field
to determine the action your application should take. For example,
you can use this information to determine whether the user pressed
the Command key and another key to make a menu choice.
When your application uses an Event Manager function to retrieve
an event, the Event Manager returns information about the retrieved
event in an event structure, which is a structure of type EventRecord.
Events.hDefines an event queue entry.
struct EvQEl {
QElemPtr qLink;
SInt16 qType;
EventKind evtQWhat;
UInt32 evtQMessage;
UInt32 evtQWhen;
Point evtQWhere;
EventModifiers evtQModifiers;
};
typedef struct EvQEl EvQEl;
typedef EvQEl * EvQElPtr;
qLinkNext queue entry.
qTypeQueue type (evType).
evtQWhatEvent code.
evtQMessageEvent message.
evtQWhenTicks since startup.
evtQWhereMouse location.
evtQModifiersModifier flags.
A structure of type EvQEl defines
an entry in the Operating System event queue. Each entry in the
event queue begins with 4 bytes of flags followed by a pointer to
the next queue entry. The flags are maintained by and internal to
the Operating System Event Manager. The queue entries are linked
by pointers, and the first field of the EvQEl data
type, which represents the structure of a queue entry, begins with
a pointer to the next queue entry. Thus, you cannot directly access
the flags using the EvQEl data
type.
Events.hContains information about the current state of the keyboard.
typedef BigEndianLong KeyMap[4];
The type KeyMap is used in GetKeys to return the current state of the keyboard, including the keypad, if any. The KeyMap type is interpreted as an array of 128 elements, each having a Boolean value. Each key on the keyboard or keypad corresponds to an element in the KeyMap array. A KeyMap element is true if the corresponding key is down and false if it isn’t. The maximum number of keys that can be down simultaneously is two character keys plus any combination of the five modifier keys.
Events.hContains information about the current state of the keyboard.
typedef UInt8 KeyMapByteArray[16];
The type KeyMapByteArray is an alternate version of the type KeyMap for use on little endian platforms.
Events.hDefine modifiers for event types.
enum {
activeFlagBit = 0,
btnStateBit = 7,
cmdKeyBit = 8,
shiftKeyBit = 9,
alphaLockBit = 10,
optionKeyBit = 11,
controlKeyBit = 12,
rightShiftKeyBit = 13,
rightOptionKeyBit = 14,
rightControlKeyBit = 15
};
typedef UInt16 EventModifiers;
activeFlagBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
btnStateBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
cmdKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
shiftKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
alphaLockBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
optionKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
controlKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
rightShiftKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
rightOptionKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
rightControlKeyBitAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
enum {
charCodeMask = 0x000000FF,
keyCodeMask = 0x0000FF00,
adbAddrMask = 0x00FF0000,
osEvtMessageMask = 0xFF000000
};
charCodeMaskThe enumerator indicating you want your application to receive a character-code keyboard event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
keyCodeMaskThe enumerator indicating you want your application to receive a key-code keyboard event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
adbAddrMaskThe enumerator indicating you want your application to receive an ADB address if there is an ADB keyboard.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
osEvtMessageMaskThe enumerator indicating you want your application to receive a keyboard event that can be used to extract a message code.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
Obsolete in Carbon.
enum {
convertClipboardFlag = 2
};
Obsolete in Carbon. To determine if the clipboard has changed
while your application was suspended, use the Scrap Manager function GetCurrentScrap.
Unsupported. To determine if the clipboard has changed while
your application was suspended, use the Scrap Manager function GetCurrentScrap.
Modifer bits for events.
enum {
activeFlag = 1 << activeFlagBit,
btnState = 1 << btnStateBit,
cmdKey = 1 << cmdKeyBit,
shiftKey = 1 << shiftKeyBit,
alphaLock = 1 << alphaLockBit,
optionKey = 1 << optionKeyBit,
controlKey = 1 << controlKeyBit,
rightShiftKey = 1 << rightShiftKeyBit,
rightOptionKey = 1 << rightOptionKeyBit,
rightControlKey = 1 << rightControlKeyBit
};
activeFlagThe enumerator that indicates a window is being activated or that a mouse-down event caused a foreground switch.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
btnStateThe enumerator indicating that the mouse button has been released.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
cmdKeyThe enumerator indicating that the Command key is being pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
shiftKeyThe enumerator indicating that the Shift key is being pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
alphaLockThe enumerator indicating that the Caps Lock key is being pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
optionKeyThe enumerator indicating that the Option key is being pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
controlKeyThe enumerator indicating that the Control key is being pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
rightShiftKeyAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
rightOptionKeyAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
rightControlKeyAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
enum {
HighLevelEventMsgClass = 'jaym',
rtrnReceiptMsgID = 'rtrn'
};
HighLevelEventMsgClassThe enumerator indicating a high-level event message class for return receipt.
rtrnReceiptMsgIDThe posting enumerator indicating the return receipt message ID.
Define character codes for events.
enum {
kNullCharCode = 0,
kHomeCharCode = 1,
kEnterCharCode = 3,
kEndCharCode = 4,
kHelpCharCode = 5,
kBellCharCode = 7,
kBackspaceCharCode = 8,
kTabCharCode = 9,
kLineFeedCharCode = 10,
kVerticalTabCharCode = 11,
kPageUpCharCode = 11,
kFormFeedCharCode = 12,
kPageDownCharCode = 12,
kReturnCharCode = 13,
kFunctionKeyCharCode = 16,
kCommandCharCode = 17,
kCheckCharCode = 18,
kDiamondCharCode = 19,
kAppleLogoCharCode = 20,
kEscapeCharCode = 27,
kClearCharCode = 27,
kLeftArrowCharCode = 28,
kRightArrowCharCode = 29,
kUpArrowCharCode = 30,
kDownArrowCharCode = 31,
kSpaceCharCode = 32,
kDeleteCharCode = 127,
kBulletCharCode = 165,
kNonBreakingSpaceCharCode = 202
};
kNullCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kHomeCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kEnterCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kEndCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kHelpCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kBellCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kBackspaceCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kTabCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kLineFeedCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kVerticalTabCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kPageUpCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kFormFeedCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kPageDownCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kReturnCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kFunctionKeyCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kCommandCharCodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kCheckCharCodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kDiamondCharCodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kAppleLogoCharCodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kEscapeCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kClearCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kLeftArrowCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kRightArrowCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kUpArrowCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kDownArrowCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kSpaceCharCodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kDeleteCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
kBulletCharCodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kNonBreakingSpaceCharCodeAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
enum {
kShiftUnicode = 0x21E7,
kControlUnicode = 0x2303,
kOptionUnicode = 0x2325,
kCommandUnicode = 0x2318,
kPencilUnicode = 0x270E,
kCheckUnicode = 0x2713,
kDiamondUnicode = 0x25C6,
kBulletUnicode = 0x2022,
kAppleLogoUnicode = 0xF8FF
};
kShiftUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kControlUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kOptionUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kCommandUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kPencilUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kCheckUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kDiamondUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kBulletUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
kAppleLogoUnicodeAvailable in Mac OS X v10.1 and later.
Declared in Events.h.
Define constants you can use in the event mask.
enum {
mDownMask = 1 << mouseDown,
mUpMask = 1 << mouseUp,
keyDownMask = 1 << keyDown,
keyUpMask = 1 << keyUp,
autoKeyMask = 1 << autoKey,
updateMask = 1 << updateEvt,
diskMask = 1 << diskEvt,
activMask = 1 << activateEvt,
highLevelEventMask = 0x0400,
osMask = 1 << osEvt,
everyEvent = 0xFFFF
};
typedef UInt16 EventMask;
mDownMaskThe enumerator indicating you want your application to receive a mouse-down event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
mUpMaskThe enumerator indicating you want your application to receive a mouse-up event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
keyDownMaskThe enumerator indicating you want your application to receive a key-down event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
keyUpMaskThe enumerator indicating you want your application to receive a key-up event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
autoKeyMaskThe enumerator indicating you want your application to receive an auto-key event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
updateMaskThe enumerator indicating you want your application to receive an update event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
diskMaskThe enumerator indicating you want your application to receive a disk-inserted event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
activMaskThe enumerator indicating you want your application to receive an activate event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
highLevelEventMaskThe enumerator indicating you want your application to receive a high-level event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
osMaskThe enumerator indicating you want your application to receive an operating-system event
Available in Mac OS X v10.0 and later.
Declared in Events.h.
everyEventThe enumerator indicating you want your application to receive every event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
enum {
mouseMovedMessage = 0x00FA,
suspendResumeMessage = 0x0001
};
mouseMovedMessageThe message code indicating the mouse-moved operating-system event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
suspendResumeMessageThe message code indicating a suspend or resume operating-system event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
enum {
msgWasPartiallyAccepted = 2,
msgWasFullyAccepted = 1,
msgWasNotAccepted = 0
};
msgWasPartiallyAcceptedThe posting enumerator value in the return receipt that indicates the message was partially accepted.
msgWasFullyAcceptedThe posting enumerator value in the return receipt that indicates the message was fully accepted.
msgWasNotAcceptedThe posting enumerator value in the return receipt that indicates the message was fully accepted.
enum {
networkEvt = 10,
driverEvt = 11,
app1Evt = 12,
app2Evt = 13,
app3Evt = 14,
app4Evt = 15,
networkMask = 0x0400,
driverMask = 0x0800,
app1Mask = 0x1000,
app2Mask = 0x2000,
app3Mask = 0x4000,
app4Mask = 0x8000
};
networkEvtAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
driverEvtAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app1EvtAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app2EvtAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app3EvtAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app4EvtAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
networkMaskAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
driverMaskAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app1MaskAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app2MaskAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app3MaskAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
app4MaskAvailable in Mac OS X v10.0 and later.
Declared in Events.h.
Define event kinds.
enum {
nullEvent = 0,
mouseDown = 1,
mouseUp = 2,
keyDown = 3,
keyUp = 4,
autoKey = 5,
updateEvt = 6,
diskEvt = 7,
activateEvt = 8,
osEvt = 15,
kHighLevelEvent = 23
};
typedef UInt16 EventKind;
nullEventThe event code indicating that there are no other pending events.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
mouseDownThe event code indicating that the mouse button has been pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
mouseUpThe event code indicating that the mouse button has been released.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
keyDownThe event code indicating that a key has been pressed.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
keyUpThe event code indicating that a key has been released.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
autoKeyThe event code indicating that a key has been repeatedly held down.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
updateEvtThe event code indicating that a window needs updating.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
diskEvtThe event code indicating that a disk has been inserted.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
activateEvtThe event code indicating that a window has been activated or deactivated.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
osEvtThe event code indicating a suspend, resume, or mouse-moved operating-system event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
kHighLevelEventA high-level event.
Available in Mac OS X v10.0 and later.
Declared in Events.h.
Indicates a resume event.
enum {
resumeFlag = 1
};
Result codes defined for the Event Manager are listed below.
| Result Code | Value | Description |
|---|---|---|
evtNotEnb |
1 | Event not enabled for Available in Mac OS X v10.0 and later. |
Last updated: 2007-10-31