low-level events
About Low-Level Events
Low-level events report changes to the hardware made by the user. This
includes pressing a key, pressing the mouse button, inserting a floppy diskette,
and similar hardware-related events.
Low-level events are of various types, distinguished according to their origin
and meaning. The kinds are:
keyboard events
mouse events
disk-insertion event
application status events
certain window events
application-generated events
MultiFinder events
null events
Events that report actions by the user (such as pressing the mouse button,
typing on the keyboard, or inserting a disk) and events that report that the
Event Manager has no other events to report (null events) are called
low-level events because they report very low-level hardware and software
occurrences. The following figure depicts the relationships among the
Operating System Event Manager, the Event Manager, the
Window Manager, and a single application.
Other low-level events can arise from changes in windows on the screen. For
example, if a user has several documents open while running an application,
the user can switch from one document to another by clicking in the
appropriate window. Before your application is sent such an event, the
Window Manager does some work for you, such as highlighting the newly
activated window and unhighlighting the deactivated window. As illustrated in
the next figure, activate and update events are not placed into the event queue
but are sent directly to the Event Manager.
Applications can generate events themselves and send them (using the
PostEvent function) to the Event Manager for processing. These types of
events are application- specific. In an environment where only one application
can execute at a time, application- defined events allow your application to send
events to itself. You should be careful not to post events that are not normally
placed in the event queue (such as activate events).
Note: In System 7.0+, the work done by any of your application- defined events
must be accomplished using Apple events or other high-level events.
Events in a single application environment