Skip to Main Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced content levelIntermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
20
The Notifier
In this chapter, we look at the Notifier in greater detail, discussing its role in processing
events for an XView application. This chapter serves as an introduction to the Notifier and
covers its use for most applications. You should be familiar with the topics covered in Chap-
ter 6, Handling Input, before you read this chapter.
20.1 Basic Concepts
The Notifier maintains the flow of control in an application. To understand the basic con-
cepts of the Notifier, we must distinguish between two different styles of input handling,
mainline and event-driven input, and consider how they affect where the flow of control
resides within a program.
20.1.1 Mainline Input Handling
The traditional type of input handling of most text-based applications is mainline-based and
input-driven. The flow of control resides in the main routine and the program blocks when it
expects input. That is to say, no other portion of the program may be executed while the pro-
gram is waiting for input. For example, in a mainline-driven application, a C programmer
will use fgets() or getchar() to wait for characters that the user types. Based on the
user’s input, the program chooses an action to take. Sometimes, that action requires more
input, so the application calls getchar() again. The program does not return to the main
routine until the processing for the current input is done.
The tight control represented by ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Alejandro Terrazas, John Ostuni, Michael Barlow

Publisher Resources

ISBN: 9780937175873