Firm foundation in the main hci principles, the book provides a working
Download 4.23 Mb. Pdf ko'rish
|
Human Computer Interaction Fundamentals
Figure 5.3 Root (background) window activated by default upon system start and also serving
as the top window for the window manager process. 8 8 H U M A N – C O M P U T E R I N T E R A C T I O N directed to the target program or process), to invoke its corresponding handler. Note that an event does not necessarily correspond exactly just to an individual physical input. The stream of raw inputs may be filtered and processed to form/find meaningful input sequences from the cur- rent context. For instance, a sequence of raw inputs may form a mean- ingful event such as a double-click command, keyboard commands with modifiers (e.g., ctrl-alt-del), and mouse enter/exit commands (e.g., detection of mouse cursor leaving a particular window). Figure 5.5 shows the two-tier event-queuing system in greater detail. There is the system-level event-queuing system that dispatches the events at the top application level. Each application or process also typically manages its own event queue, dispatching them to its own UI objects. The proper event is captured by the UI object as it tra- verses down the application’s hierarchical UI structure, e.g., from top to bottom. Figures 5.4 and 5.5 illustrate this process. Then the event Event 76 Event 75 Top Window (Address Book) Add Dialog Box Textbox 1 Textbox 2 Textbox 1 Handler Textbox 2 Handler Top Window Mouse Left Button Handler Event 74 Application Event Queue File Menu Edit Menu Figure 5.4 Event being dispatched to the right UI object handler for a given application (organized as a set of UI objects and associated event handlers in a hierarchical manner) from the application- event queue. 8 9 U S E R I N T E R FA C E L AY E R handler (also sometimes called the callback function) associated with the UI object is activated in response to the event that is captured. The events do not necessarily have to be generated externally by the interaction devices; indeed, sometimes they are generated internally for special purposes (these are sometimes called the pseudo-events). For instance, when a window is resized, in addition to the resizing event itself, the internal content of the window must be redrawn, and the same goes for the other windows occluded or newly revealed by the resized window. Special pseudo-events are enqueued and con- veyed to the respective applications/windows. In the case of resiz- ing/hiding/activating and redrawing of windows, it is the individual application’s responsibility, rather than the window manager’s, to update its display contents, because only the respective applications have the knowledge of how to update their content. Thus a special redraw pseudo-event is sent to the application with information about which region is to be updated (Figure 5.6). The window content might need to be redrawn not because of the window management com- mands such as resizing and window activation, but due to the needs of the application itself, which can generate special pseudo-events for redrawing parts of its own window. More generally, UI objects can Download 4.23 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling