updateMask
Notes: Use these constants to select which types of events should be included when
Note that networkMask, driverMask, app1Mask, app2Mask, app3Mask and
app4Mask are obsolete.
As bit flags, you can add or remove events via bitwise logical operations:
GetNextEvent( updateMask | activMask ); /* two event type only */ GetNextEvent( everyEvent & ~diskMask); /* all but disk events */ Each type of event is associated with a named constant used in processing
The following three constants have been added in System 7 in order to
handle return receipts:
msgWasPartiallyAccepted = 2
msgWasFullyAccepted = 1
msgWasNotAccepted = 0
HighLevelEventMsgClass = 'jaym';
rtrnReceiptMsgID = 'rtrn';
In System 7, the Event Mask constants are:
everyEvent -1; [TOKEN:12079] every event
mDownMask 2; [TOKEN:12079] mouseDown
mUpMask 4; [TOKEN:12079] mouseUp
keyDownMask 8; [TOKEN:12079] keyDown
keyUpMask 16; [TOKEN:12079] keyUp
autoKeyMask 32; [TOKEN:12079] autoKey
updateMask 64; [TOKEN:12079] update
diskMask 128; // disk-inserted
activMask 256; // activate
highLevelEventMask 1024; // high-level eventMask
osMask -32768; // operating- system
Several of the Event Manager routines can be restricted to operate on a specific event type or group of types. You do this by disabling (or “masking
out”) the events you are not interested in receiving. To specify which event
types a Event Manager routine governs, supply a parameter known as an eventMask. Masks for each individual event type are available as pre defined
event mask constants.
You can form any particular mask you need from the mask constants. ORing
two mask constants together effectively adds them. ANDing the complement of
a mask constant effectively subtracts it.
For example, to request the next available event that is not a mouseUp event,
you can use the code:
Note that masking out types of events does not remove those events from the
Operating System event queue. If a type of event is masked out, it is simply
ignored by the Event Manager when it reads the event queue. Note also that you cannot mask out null events. Even if every other kind of event is disabled,
In System 7.0+, you can mask out high-level events by subtracting the
constant highLevelEventMask from your event mask. (This constant has the
same value as the defunct constant networkMask.)