Library: libbe.so
The Application Kit is the starting point for all applications. Its classes establish an application as an identifiable entity--one that can cooperate and communicate with other applications (including the Tracker). It lays a foundation for the other kits. Before designing and building your application, you should become comfortably familiar with this basic kit.
There are four parts to the Application Kit:
The messaging mechanism is implemented by a set of collaborating classes: BMessage objects bundle information so that it can be posted to a thread within the same application or sent to a thread in another application. BLooper objects run message loops in threads, getting messages as they arrive and dispatching them to BHandler objects. The BHandler's job is to respond to the message.
The system employs the messaging mechanism to carry basic input to applications--from the keyboard and mouse, from the Tracker, and from other external sources; system messages drive what most applications do. Every application will be on the receiving end of at least some of these messages and must have handlers ready to respond to them.
Applications can also use the mechanism to create threads with a messaging interface, arrange communication among the threads, or exchange information with and issue commands to other applications.
The BApplication object also runs the application's main message loop, where it receives messages that concern the application as a whole. Externally, this object represents the application to other applications; internally, it's the center where applicationwide services and global information can be found. Because of its pivotal role, it's assigned to a global variable, be_app, to make it easily accessible.
Other kits--the Interface Kit in particular--won't work until a BApplication object has been constructed.
The messaging framework is described in the next section. The BApplication class is documented after the messaging overview, followed by the other classes in alphabetical order.
The Be Book, in lovely HTML, for the BeOS Preview Release.
Copyright © 1997 Be, Inc. All rights reserved.
Be is a registered trademark; BeOS, BeBox, BeWare, GeekPort, the Be logo, and the BeOS logo are trademarks of Be, Inc.
Last modified June 28, 1997.