hide random home http://www.be.com/documentation/be_book/AppKit/akitAPI.html (Amiga Plus Extra No. 5/97, 05/1997)


The Application Kit: Global Variables,Constants, and Defined Types


The Application Kit: Global Variables,Constants, and Defined Types

This section lists the global variables, constants, and defined types that are defined by the Application Kit. There's just a few defined types, three global variables-- be_app, be_roster, and be_clipboard--and a handful of constants. 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, B_ACTIVATE, and B_KEY_DOWN), only those that mark system management and application messages are listed here. Those that designate interface messages are documented in the chapter on the Interface Kit.


Global Variables


be_app

Declared in: <app/Application.h>

      BApplication *be_app 

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

See also: the BApplication class


be_clipboard

Declared in: <app/Clipboard.h>

      BClipboard *be_clipboard 

This variable gives applications access to the shared repository of data for cut, copy, and paste operations. It's initialized at startup; an application has just one BClipboard object.

See also: the BClipboard class


be_roster

Declared in: <app/Roster.h>

      BRoster *be_roster 

This variable points to the global BRoster object that's shared by all applications. The BRoster keeps a roster of all running applications and can add applications to the roster by launching them.

See also: the BRoster class


Constants


Application Flags

Declared in: <app/Roster.h>

Defined 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: <app/AppDefs.h>

Enumerated constant Enumerated constant
B_ACTIVATE B_ARGV_RECEIVED
B_READY_TO_RUN B_REFS_RECEIVED
B_APP_ACTIVATED B_PANEL_CLOSED
B_ABOUT_REQUESTED B_PULSE
B_QUIT_REQUESTED

These constants represent the system messages that are received and recognized by the BApplication class. 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 of the chapter introduction, System Management Messages below


Cursor Constants

Declared in: <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()


Data Type Codes

Declared in: <app/AppDefs.h>

Enumerated constant Enumerated constant
B_BOOL_TYPE B_ASCII_TYPE
B_CHAR_TYPE B_STRING_TYPE
B_UCHAR_TYPE B_RTF_TYPE
B_SHORT_TYPE B_PATTERN_TYPE
B_USHORT_TYPE B_RGB_COLOR_TYPE
B_LONG_TYPE B_RECORD_TYPE
B_ULONG_TYPE B_TIME_TYPE
B_FLOAT_TYPE B_MONEY_TYPE
B_DOUBLE_TYPE B_RAW_TYPE
B_POINTER_TYPE B_MONOCHROME_1_BIT_TYPE
B_OBJECT_TYPE B_GRAYSCALE_8_BIT_TYPE
B_POINT_TYPE B_COLOR_8_BIT_TYPE
B_RECT_TYPE B_RGB_24_BIT_TYPE [sic]
B_MESSENGER_TYPE B_TIFF_TYPE
B_REF_TYPE B_ANY_TYPE

These constants are used in a BMessage object to describe the types of data the message holds. B_ANY_TYPE refers to all types; the others refer only to a particular type. See the BMessage class for more information on what they mean.

See also: Type Codes of the BMessage class overview


filter_result Constants

Declared in: <app/MessageFilter.h>

Enumerated 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: <app/Roster.h>

Defined 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


Message Constants

Declared in: <app/AppDefs.h>

Enumerated constant
B_NO_REPLY
B_MESSAGE_NOT_UNDERSTOOD
B_HANDLERS_INFO
B_SIMPLE_DATA
B_CUT
B_COPY
B_PASTE

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, BHandler::HandlersRequested()


message_delivery Constants

Declared in: <app/MessageFilter.h>

Enumerated constant
B_ANY_DELIVERY
B_DROPPED_DELIVERY
B_PROGRAMMED_DELIVERY

These constants distinguish the delivery criterion for the application of a BMessageFilter.

See also: the BMessageFilter constructor


message_source Constants

Declared in: <app/MessageFilter.h>

Enumerated constant
B_ANY_SOURCE
B_REMOTE_SOURCE
B_LOCAL_SOURCE

These constants list the possible constraints on the message source for the application of a BMessageFilters.

See also: the BMessageFilter constructor


System Management Messages

Declared in: <app/AppDefs.h>

Enumerated constant
B_QUIT_REQUESTED
B_HANDLERS_REQUESTED

These constants represent system messages that are used to help run the messaging system. They're received and recognized by generic BLooper objects.

See also: System Management Messages of the introduction, Application Messages above


Defined Types


app_info

Declared in: <app/Roster.h>

      typedef struct {
            ulong signature;
            thread_id thread;
            team_id team;
            port_id port;
            record_ref ref;
            ulong flags;
         } app_info 

This structure is used by BRoster's GetAppInfo(), GetRunningAppInfo(), and GetActiveAppInfo() functions to report information about an application. See those functions for a description of its various fields.

See also: BRoster::GetAppInfo()


filter_result

Declared in: <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: <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: <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, HTML Edition, for Developer Release 8 of the Be Operating System.

Copyright © 1996 Be, Inc. All rights reserved.

Be, the Be logo, BeBox, BeOS, BeWare, and GeekPort are trademarks of Be, Inc.

Last modified September 6, 1996.