Global Variables,Constants, and Defined Types

This section lists the global variables, constants, and defined types that are defined in the Application Kit. Error codes are documented in the chapter on the Support Kit.

Although the Application Kit defines the constants for all system messages (such as B_REFS_RECEIVED and B_KEY_DOWN), only those that objects in this kit handle are listed here. Those that designate interface messages are documented in the chapter on the Interface Kit.


Global Variables


be_app

Declared in: be/app/Application.h

      BApplication *be_app

This variable provides global access to the BApplication object. It's initialized by the BApplication constructor.

See also: the BApplication class


be_app_messenger

Declared in: be/app/Application.h

      BMessenger *be_app_messenger

This variable provides global access to a BMessenger object whose target is be_app. It's initialized by the BApplication constructor.

See also: the BApplication class


be_clipboard

Declared in: be/app/Clipboard.h

      BClipboard *be_clipboard 

This variable gives applications access to the system clipboard--the shared repository of data for cut, copy, and paste operations. It's initialized at startup.

See also: the BClipboard class


be_roster

Declared in: be/app/Roster.h

      const BRoster *be_roster 

This variable points to the application's global BRoster object. The BRoster keeps a roster of all running applications and can add applications to the roster by launching them. It's initialized when the application starts up.

See also: the BRoster class


Constants


Application Flags

Declared in: be/app/Roster.h

Constant
B_BACKGROUND_APP
B_ARGV_ONLY
B_LAUNCH_MASK

These constants are used to get information from the flags field of an app_info structure.

See also: BRoster::GetAppInfo(), "Launch Constants" below


Application Messages

Declared in: be/app/AppDefs.h

Constant
B_QUIT_REQUESTED
B_READY_TO_RUN
B_APP_ACTIVATED
B_ABOUT_REQUESTED
B_QUIT_REQUESTED
B_ARGV_RECEIVED
B_REFS_RECEIVED
B_PULSE

These constants represent the system messages that are recognized and given special treatment by BApplication and BLooper dispatchers. Application messages concern the application as a whole, rather than any particular window thread. See the introduction to this chapter and the BApplication class for details.

See also: "Application Messages" on page 30 of the BApplication class


Cursor Constants

Declared in: be/app/AppDefs.h

      const unsigned char B_HAND_CURSOR[]
      const unsigned char B_I_BEAM_CURSOR[]

These constants contain all the data needed to set the cursor to the default hand image or to the standard I-beam image for text selection.

See also: BApplication::SetCursor()


filter_result Constants

Declared in: be/app/MessageFilter.h

Constant
B_SKIP_MESSAGE
B_DISPATCH_MESSAGE

These constants list the possible return values of a filter function.

See also: BMessageFilter::Filter()


Launch Constants

Declared in: be/app/Roster.h

Constant
B_MULTIPLE_LAUNCH
B_SINGLE_LAUNCH
B_EXCLUSIVE_LAUNCH

These constants explain whether an application can be launched any number of times, only once from a particular executable file, or only once for a particular application signature. This information is part of the flags field of an app_info structure and can be extracted using the B_LAUNCH_MASK constant.

See also: BRoster::GetAppInfo(), "Application Flags" above


Looper Port Capacity

Declared in: be/app/Looper.h

Constant
B_LOOPER_PORT_DEFAULT_CAPACITY

This constant records the default capacity of a BLooper's port. The default is 100 slots; a greater or smaller number can be specified when constructing the BLooper.

See also: the BLooper constructor


Message Constants

Declared in: be/app/AppDefs.h

Constant
B_REPLY
B_NO_REPLY
B_MESSAGE_NOT_UNDERSTOOD
B_SAVE_REQUESTED
B_CANCEL
B_SIMPLE_DATA
B_MIME_DATA
B_ARCHIVED_OBJECT
B_UPDATE_STATUS_BAR
B_RESET_STATUS_BAR
B_NODE_MONITOR
B_QUERY_UPDATE
B_CUT
B_COPY
B_PASTE
B_SELECT_ALL
B_SET_PROPERTY
B_GET_PROPERTY
B_CREATE_PROPERTY
B_DELETE_PROPERTY
B_GET_SUPPORTED_SUITES

These constants mark messages that the system sometimes puts together, but that aren't dispatched like system messages. See "Standard Messages" in the Message Protocols appendix for details.

See also: BMessage::SendReply(), the BTextView class in the Interface Kit


message_delivery Constants

Declared in: be/app/MessageFilter.h

Constant
B_ANY_DELIVERY
B_DROPPED_DELIVERY
B_PROGRAMMED_DELIVERY

These constants distinguish the delivery criterion for filtering a BMessage.

See also: the BMessageFilter constructor


message_source Constants

Declared in: be/app/MessageFilter.h

Constant
B_ANY_SOURCE
B_REMOTE_SOURCE
B_LOCAL_SOURCE

These constants list the possible constraints that a BMessageFilter might impose on the source of the messages it filters.

See also: the BMessageFilter constructor


Message Specifiers

Declared in: be/app/Message.h

Constant
B_NO_SPECIFIER
B_DIRECT_SPECIFIER
B_INDEX_SPECIFIER
B_REVERSE_INDEX_SPECIFIER
B_RANGE_SPECIFIER
B_REVERSE_RANGE_SPECIFIER
B_NAME_SPECIFIER
B_ID_SPECIFIER
B_SPECIFIERS_END = 128

These constants fill the what slot of specifier BMessages. Each constant indicates what other information the specifer contains and how it should be interpreted. For example, a B_REVERSE_INDEX_SPECIFIER message has an "index" field with an index that counts backwards from the end of a list. A B_NAME_SPECIFIER message includes a "name" field that names the requested item.


Defined Types


app_info

Declared in: be/app/Roster.h

      typedef struct {
            thread_id thread;
            team_id team;
            port_id port;
            uint32 flags;
            entry_ref ref;
            char signature[B_MIME_TYPE_LENGTH];
            app_info(void);
            ~app_info(void);
         } app_info 

This structure is used by BRoster's GetAppInfo(), GetRunningAppInfo(), and GetActiveAppInfo() functions to report information about an application. Its constructor ensures that its fields are initialized to invalid values. To get meaningful values for an actual application, you must pass the structure to one of the BRoster functions. See those functions for a description of the various fields.

See also: BRoster::GetAppInfo()


filter_result

Declared in: be/app/MessageFilter.h

      typedef enum { . . . } filter_result 

This type distinguishes between the B_SKIP_MESSAGE and B_DISPATCH_MESSAGE return values for a filter function.

See also: BMessageFilter::Filter()


message_delivery

Declared in: be/app/MessageFilter.h

      typedef enum { . . . } message_delivery 

This type enumerates the delivery criteria for filtering a message.

See also: the BMessageFilter constructor


message_source

Declared in: be/app/MessageFilter.h

      typedef enum { . . . } message_source 

This type enumerates the source criteria for filtering a message.

See also: the BMessageFilter constructor






The Be Book, in lovely HTML, for BeOS Release 4.

Copyright © 1998 Be, Inc. All rights reserved.

Last modified December 25, 1997.