| Purpose: | Deliverable |
| Source: | The system or your app. |
| Target: | App-defined; typically
be_app. |
| Hook: | BApplication::AboutRequested()
if the target is
be_app. |
The message should be assigned to an menu item, such that the message is sent when the user clicks the item. Your application is expected to put up an "About This Application" panel when it receives this message.
| Purpose: | Deliverable |
| Source: | A graphics driver. |
| Target: | The team owning the overlay. |
B_ACQUIRE_OVERLAY_LOCK
is sent by a graphics driver when an overlay is acquired.
B_RELEASE_OVERLAY_LOCK
is sent when the overlay is released.
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | be_app |
| Hook: | BApplication::AppActivated() |
Sent when an application becomes active or inactive.
| Field | Type code | Description |
|---|---|---|
active | B_BOOL_TYPE | true if the app has become active; otherwise false. |
| Purpose: | Deliverable and format |
| Source: | A dragged replicant, or your app. |
| Target: | A (remote) application. |
| Hook: | BShelf::CanAcceptReplicantMessage() |
The replicant system uses this message as a
deliverable. If you're using
BDragger and
BShelf objects, the message is
created and delivered for you. You can also simulate a dragged replicant
by archiving a view, setting the archive message's command to
B_ARCHIVED_OBJECT, and sending the message to a remote application. If
the remote application has a
BShelf object, the
BShelf will pick up the
message (through a BMessageFilter)
and pass it to the hook function.
To create a simulated replicant message, you call
Archive() on the view
that you want to replicate, and add (at least) the
add_on field to the
archive message.
See BShelf and
BDragger for
more information about replicants.
B_ARCHIVED_OBJECT
should be used as the command constant for
all archive messages. When you archive an object, the class field is
automatically added to the archive message. All other fields must be
added by your archiving code. See the
BArchivable class for more
information about archiving.
| Field | Type code | Description |
|---|---|---|
class [ ] | B_STRING_TYPE | An array of class names that gives the class hierarchy of the archived object. |
add_on | B_STRING_TYPE | The signature of the library or application that knows how to create the archived object. |
be:add_on_version | B_INT32_TYPE | The version of the add_on. |
be:load_each_time | B_BOOL_TYPE | true: The add_on is loaded each time the
object is unarchived. false: The add_on is
loaded only if it isn't already loaded. |
be:unload_on_delete | B_BOOL_TYPE | Is the add_on unloaded when the unarchived object is deleted? |
shelf_type
(replicants only; optional) | B_STRING_TYPE | The type of shelf that you
want to have display the replicant. A shelf's type is its name, as
assigned when it's created. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | be_app |
| Hook: | BApplication::ArgvReceived() |
Forwards arguments that (a) the user passes while launching the app from
the command line, or (b) are passed to
BRoster::Launch(). Most apps treat
command line arguments as filenames that should be opened. If the
filename is relative (if it doesn't start with "/"), you should append it
to the cwd field to reconstruct the full path.
| Field | Type code | Description |
|---|---|---|
argc | B_INT32_TYPE | The number of arguments. |
argv [argc] | B_STRING_TYPE | The arguments. |
cwd | B_STRING_TYPE | The path name of the current working directory. |
| Purpose: | Deliverable |
| Source: | The Application Kit. |
| Target: | Application Server. |
Used to cancel an ongoing operation. The Application Kit sends this message to the Application Server to cancel a shutdown if a window refuses to quit.
| Purpose: | Deliverable |
| Source: | The Application Server. |
| Target: | Selected BMessenger. |
If you've called
BClipboard::StartWatching()
to monitor a clipboard for changes, this message is sent to the specified
BMessenger when the
clipboard changes.
| Purpose: | Deliverable |
| Source: | A BControl. |
| Target: | Selected BMessenger. |
This message is sent to the targeted messenger when a
BControl-derived
object is invoked.
| Purpose: | Deliverable |
| Source: | The Input Server. |
| Target: | Add-on specified target. |
| Hook: | BInputDevice::Control() |
This message is sent by the Input Server to send you notification when a
device starts or stops, or when the set of registered devices changes.
These messages are sent only if you've used the
watch_input_devices()
function to request such notification. The messages are sent to the
target indicated in the function call.
| Field | Type code | Description |
|---|---|---|
code | B_INT32_TYPE |
Operation code for the keyboard device control
request being issued. One of:
B_INPUT_DEVICE_ADDED
B_INPUT_DEVICE_STARTED
B_INPUT_DEVICE_STOPPED
B_INPUT_DEVICE_REMOVED
|
device | B_STRING_TYPE | The name of the device. If this field doesn't
exist, the device is identified by type instead. |
type | B_INT32_TYPE | The device type. If this field doesn't exist, the
device field identifies the device. |
message | B_MESSAGE_TYPE | The control message. None of the BeOS standard messages use this field. |
| Purpose: | Deliverable |
| Source: | The Input Server. |
| Target: | Input method add-on's BLooper. |
This message is sent by the Input Server to an input method add-on to let
it know that a method event has occurred. The message's be:opcode field
indicates which event has occurred.
B_INPUT_METHOD_STARTEDB_INPUT_METHOD_STOPPEDB_INPUT_METHOD_CHANGEDB_INPUT_METHOD_LOCATION_REQUESTThese are discussed in more detail in the Input Server chapter.
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The focus view's BWindow. |
| Hook: |
BView::KeyDown() (B_KEY_DOWN)BView::KeyUp() (B_KEY_UP)(The ... UNMAPPED... messages don't map to hook functions.) |
B_KEY_DOWN is sent when the user presses (or holds down) a key that's
mapped to a character; B_KEY_UP is sent when the user releases the key.
B_UNMAPPED_KEY_DOWN and B_UNMAPPED_KEY_UP are sent if the key isn't
mapped to a character. This doesn't include modifier keys, which are
reported in the B_MODIFIERS_CHANGED message.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
key | B_INT32_TYPE | The code for the physical key that was pressed. See <x> for the key map. |
be:key_repeat (B_KEY_DOWN only) | B_INT32_TYPE | The "iteration number" of this key down. When the user holds the key down, successive messages are sent with increasing key repeat values. This field isn't present in the initial event; the first repeat message (i.e., the second key down message) has a key repeat value of 1. |
modifiers | B_INT32_TYPE | The modifier keys that were in effect at the time of the event. See <x> for a list of values. |
states | B_UINT8_TYPE | The state of all keys at the time of the event. See <x>. |
byte [3]
(B_KEY_DOWN and B_KEY_UP only) | B_INT8_TYPE | The UTF8 data that's generated |
bytes
(B_KEY_DOWN and B_KEY_UP only) | B_STRING_TYPE | The string that's generated. (The string usually contains a single character.) |
raw_char
(B_KEY_DOWN and B_KEY_UP only) | B_INT32_TYPE | Modifier-independent ASCII code for the character. |
| Purpose: | Deliverable |
| Source: | The input server. |
| Target: | A keyboard device add-on. |
| Hook: | BInput::Control() |
This message is used by the input server to send a request to a keyboard device add-on.
| Field | Type code | Description |
|---|---|---|
code | B_INT32_TYPE | Operation code for the keyboard device control
request being issued. One of:
|
device | B_STRING_TYPE | The name of the device. If this field doesn't
exist, the device is identified by type instead. |
type | B_INT32_TYPE | The device type. If this field doesn't exist, the
device field identifies the device. |
message | B_MESSAGE_TYPE | The control message for the request. None of the BeOS standard messages use this field. |
| Purpose: | Deliverable |
| Source: | The system or your app. |
| Target: | The BWindow
that's hidden/unhidden. |
| Hook: | BWindow::Minimize() |
Sent when the user double-clicks a window's title bar (to hide the window), or selects a window from the DeskBar's window list (to unhide the window).
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70. |
minimize | B_BOOL_TYPE | true if the
window is being hidden; false if it's
being unhidden. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The focus view's window. |
| Hook: |
Sent when the user presses or releases a modifier key.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
modifiers | B_INT32_TYPE | The current modifier keys. |
be:old_modifiers | B_INT32_TYPE | The previous modifier keys. |
states | B_UINT8_TYPE | The state of all keys at the time of the event. See <x>. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The
BWindow
of the view the mouse is pointing to. |
| Hook: | BView::MouseDown() |
Sent when the user presses a mouse button. This message is only sent if no other mouse button is already down.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
where | B_POINT_TYPE | Mouse location in the view's coordinate system. |
modifiers | B_INT32_TYPE | The modifier keys that were in effect at the time of the event. |
buttons | B_INT32_TYPE | The mouse button that was pressed, one of:
B_PRIMARY_MOUSE_BUTTON,
B_SECONDARY_MOUSE_BUTTON,
B_TERTIARY_MOUSE_BUTTON |
clicks | B_INT32_TYPE | 1 for a single-click, 2 for double-click, 3 for triple-click, and so on. The counter is reset if the time between clicks exceeds the "Double-click speed" set by the user in the Mouse preferences. Note that the counter is not reset if the mouse moves between clicks. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The
BWindow
of the view the mouse is pointing to. |
| Hook: | BView::MouseMoved() |
Sent when the user moves the mouse.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
where | B_POINT_TYPE | The mouse's new location in window coordinates. |
buttons | B_INT32_TYPE | The mouse buttons that are down. Zero or more of:
B_PRIMARY_MOUSE_BUTTON,
B_SECONDARY_MOUSE_BUTTON,
B_TERTIARY_MOUSE_BUTTON |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | BWindow
of the view the mouse is pointing to. |
| Hook: | BView::MouseUp() |
Sent when the user releases a mouse button. It's only sent if no other mouse button remains down.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
where | B_POINT_TYPE | Mouse location in the view's coordinate system. |
modifiers | B_INT32_TYPE | The modifier keys that were in effect at the time of the event. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The
BWindow
of the view the mouse is pointing to. |
| Hook: |
Sent when the user moves the mouse wheel (on mice that have them).
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
be:wheel_delta_x | B_FLOAT_TYPE | How much the Y value of the wheel has changed. |
be:wheel_delta_y | B_FLOAT_TYPE | How much the Y value of the wheel has changed. |
The standard mouse driver that comes with BeOS only supports a Y-oriented wheel.
| Purpose: | Deliverable |
| Source: | The Node Monitor. |
| Target: | App-defined. |
| Hook: |
Sent when a monitored file changes. All Node Monitor messages contain an
int32 opcode field that tells you what happened (a file was removed, an
attribute changed, etc.). The format of the rest of the message depends
on the opcode. The formats are given under individual entries in this
appendix, listed by opcode value:
B_ENTRY_CREATED
B_ENTRY_REMOVED
B_ENTRY_MOVED
B_STAT_CHANGED
B_ATTR_CHANGED
B_DEVICE_MOUNTED
B_DEVICE_UNMOUNTED
These are discussed in the section "The Node Monitor".
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | Application-defined target. |
| Hook: |
Sent by
BHandlers
to all targets that have been registered with the
BHandler's
StartWatching() or
StartWatchingAll()
function.
| Field | Type code | Description |
|---|---|---|
be:observe_change_what | B_INT32_TYPE | The what code of the message
being broadcast. |
be:observe_orig_what | B_INT32_TYPE | The original what code of the
message, before it was altered by the broadcasting mechanism. |
The message may have other fields, depending on what the broadcast
message is. Messages are sent to targets in response to the
BHandler::SendNotices()
function. The logic is:
Take the message to broadcast and place its what code into the
be:observe_change_orig_what field.
Add the be:observe_change_what
field, which is set to the what code specified by the call to
SendNotices().
Set the message's what code to
B_OBSERVER_NOTICE_CHANGE.
The resulting message is then sent to all interested parties.
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | BApplication. |
| Hook: |
Sent to an application when it's first launched to tell it to open in a
specific workspace. The message will be handled during the construction
of the BApplication
object.
| Field | Type code | Description |
|---|---|---|
be:workspace | B_INT32_TYPE | Workspace number into which the application should open. |
| Purpose: | Deliverable |
| Source: | The input server. |
| Target: | A pointing device add-on. |
| Hook: | BInputDevice::Control() |
This message is used by the input server to send a request to a pointing device add-on.
| Field | Type code | Description |
|---|---|---|
code | B_INT32_TYPE | Operation code for the pointing device control request being issued. One of:
B_MOUSE_TYPE_CHANGED,
B_MOUSE_MAP_CHANGED,
B_MOUSE_SPEED_CHANGED,
B_CLICK_SPEED_CHANGED,
B_MOUSE_ACCELERATION_CHANGED |
device | B_STRING_TYPE | The name of the device. If this field doesn't
exist, the device is identified by type instead. |
type | B_INT32_TYPE | The device type. If this field doesn't exist, the
device field identifies the device. |
message | B_MESSAGE_TYPE | The control message for the request. None of the BeOS standard messages use this field. |
| Purpose: | Deliverable |
| Source: | The Print Server. |
| Target: | Everyone. |
| Hook: |
Sent whenever the user changes printers. Applications that support printing should watch for this message, and if they receive it, they should suggest that the user check their page setup the next time they choose to print.
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | be_app or
BWindow object. |
| Hook: | BApplication::Pulse() and
BView::Pulse() |
Sent at regular intervals, but with no particular intent. You can
implement Pulse() to do whatever you want. The message is to the
BWindow
only if a
BView
within the window declares B_PULSE_NEEDED in its
constructor flags.
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | App-defined. |
| Hook: |
Sent when the results of a live query change: If a new file meets the
query requirements,
B_ENTRY_CREATED
is sent. If a file that previously passed the query requirements no longer does,
B_ENTRY_REMOVED
is sent.
| Purpose: | Deliverable |
| Source: | The system or your app. |
| Target: | be_app,
BWindow
closed by the user, or other
BLooper object. |
| Hook: | BLooper::QuitRequested(). |
Automatically sent (a) to
be_app
when the user types
Command+q,
and (b) to a
BWindow
when the user clicks the window's close box. Applications
can also manufacture and send the message themselves. A looper that
receives this message is expected to quit, or at least consider quitting.
| Field | Type code | Description |
|---|---|---|
shortcut | B_BOOL_TYPE | true if the user typed
Command+q. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | be_app |
| Hook: | BApplication::ReadyToRun() |
Sent when an application has finished configuring itself and is ready to start running.
(No Be-defined fields)
| Purpose: | Deliverable |
| Source: | The system or your app. |
| Target: | be_app,
or other app-defined target. |
| Hook: | BApplication::RefsReceived() |
Automatically sent to be_app when (a) the user double-clicks a file that
has a type that's supported by the app, and (b) when the user confirms
some files (or directories) in an Open File panel (the target is be_app
by default; it can be changed in
BFilePanel::SetTarget()).
You can also create, stuff, and send a
B_REFS_RECEIVED
message yourself. When it receives this message, an app is expected to open
the files that the message refers to.
| Field | Type code | Description |
|---|---|---|
refs [i] | B_REF_TYPE | entry_ref items, one for each file or directory. |
| Purpose: | Deliverable |
| Source: | Your app. |
| Target: | Reset() |
| Hook: | The
BStatusBar
you're resetting. |
You construct and send this message to a
BStatusBar
object to tell it to
(asynchronously) reset itself. The message also lets you reset the
object's labels. To send the message, invoke
BWindow's
PostMessage()
naming the target
BStatusBar
as the handler:
statusBar->Window()->PostMessage(theMessage,statusBar);
| Field | Type code | Description |
|---|---|---|
label | B_STRING_TYPE | The object's new label (NULL-terminated). |
trailing_label | B_STRING_TYPE | The object's new trailing label
(NULL-terminated).. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | Every BWindow
in the screen that changed (even hidden windows). |
| Hook: | BWindow::ScreenChanged() |
Sent when the screen's dimensions or color space changes—because the user played with the Screen preferences app, for example.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
frame | B_RECT_TYPE | The screen's dimensions. |
mode | B_INT32_TYPE | The screen's color space:
B_CMAP8, B_RGB15,
B_RGB15, or BRGB32. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | be_app |
| Hook: |
Sent to a single-launch application when it's activated by being launched (for example, if the user double-clicks its icon in Tracker).
(No Be-defined fields)
| Purpose: | Deliverable |
| Source: | The Roster Monitor. |
| Target: | App-defined. |
| Hook: |
Sent as apps are launched, activated, or quit. You get these messages by
invoking
BRoster::StartWatching()
passing a one or more of
B_REQUEST_ACTIVATED,
B_REQUEST_LAUNCHED,
and B_REQUEST_QUIT.
| Field | Type code | Description |
|---|---|---|
mime_sig | B_STRING_TYPE | The app signature. |
team | B_INT32_TYPE | The app's team id. |
thread | B_INT32_TYPE | The id of the app's main thread. |
flags | B_INT32_TYPE | The app's app flags (B_SINGLE_LAUNCH,
B_BACKGROUND_APP, etc). |
ref | B_REF_TYPE | The entry_ref of the app's executable. |
| Purpose: | Deliverable |
| Source: | Your app. |
| Target: | The BStatusBar
you're updating. |
| Hook: | BStatusBar::Update() |
You construct and send this message to a
BStatusBar
object to tell it to
(asynchronously) update its progress. To send the message, invoke
BWindow's
PostMessage()
naming the target
BStatusBar
as the handler:
statusBar->Window()->PostMessage(theMessage,statusBar);
| Field | Type code | Description |
|---|---|---|
delta | B_FLOAT_TYPE | An increment to the object's current value. |
text | B_STRING_TYPE | The object's new text (NULL-terminated). |
trailing_text | B_STRING_TYPE | The object's new trailing text
(NULL-terminated).. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The manipulated scrollbar's
BWindow. |
| Hook: | BScrollBar::ValueChanged() |
Sent when the user plays with a scrollbar.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
value | B_INT32_TYPE | The scrollbar's new value. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The moved view's
BWindow. |
| Hook: | BView::FrameMoved() |
Sent when a view's origin (left top corner) changes relative to the
origin of its parent. The message isn't sent if the view doesn't have the
B_FRAME_EVENTS flag set.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
where | B_POINT_TYPE | The view's new origin in the coordinate system of its parent. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The resized view's
BWindow. |
| Hook: | BView::FrameResized() |
Sent when the size of the view's frame changes. The message isn't sent if
the view doesn't have the B_FRAME_EVENTS flag set.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
width | B_INT32_TYPE | The view's new width. |
height | B_INT32_TYPE | The view's new height. |
where | B_POINT_TYPE | The view's new origin expressed in the coordinate
system of its parent. This field is only included if the view actually
moved while being resized, and can always be ignored: If the view did
move, you'll hear about it in a separate
B_VIEW_MOVED
BMessage. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The activated/deactivated
BWindow. |
| Hook: | BWindow::WindowActivated() and
BView::WindowActivated() |
Sent just after a window is activated or deactivated. Note that the
BWindow
invokes WindowActivated()
on each of its views.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
active | B_BOOL_TYPE | true if the window is
now active; false if not. |
| Purpose: | Deliverable. |
| Source: | Your application. |
| Target: | The
BWindow
to be moved. |
| Hook: |
You can send this message to a window to resize it by the specified deltas.
| Field | Type code | Description |
|---|---|---|
data | B_POINT_TYPE | The amount by which to move the window's X and Y coordinates. |
| Purpose: | Deliverable. |
| Source: | Your application. |
| Target: | The
BWindow
to be moved. |
| Hook: |
You can send this message to a window to resize it to the specified size.
| Field | Type code | Description |
|---|---|---|
data | B_POINT_TYPE | The width and height (in X and Y) to resize the window to. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | BWindow
that moved. |
| Hook: | BWindow::FrameMoved() |
Sent when a window's origin (left top corner) changes within the screen coordinate system.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
where | B_POINT_TYPE | The window's new origin in screen coordinates. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The resized
BWindow. |
| Hook: | BWindow::FrameResized() |
Sent when the size of the window's frame changes. Note that
the width
and height fields measure
the window's content area—they don't
include the window border or window tab.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
width | B_INT32_TYPE | The width of the window's content area. |
height | B_INT32_TYPE | The height of the window's content area. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | Every
BWindow
in the activated and deactivated workspaces. |
| Hook: | BWindow::WorkspaceActivated() |
Sent when the active workspace changes.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
workspace | B_INT32_TYPE | The index of the window's workspace. |
active | B_BOOL_TYPE | true if the workspace is now
active; false if not. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The
BWindow
whose set of workspaces changed. |
| Hook: | BWindow::WorkspacesChanged() |
Sent when there's a change to the set of workspaces in which a window can appear.
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |
old | B_INT32_TYPE | The window's old workspace set, given as a vector of workspace indices. |
new | B_INT32_TYPE | The window's new workspace set, given as a vector of workspace indices. |
| Purpose: | Deliverable |
| Source: | The system. |
| Target: | The BWindow
that was zoomed. |
| Hook: | BWindow::Zoom() |
Sent when the user clicks a window's zoom button.
The message has just one data field:
| Field | Type code | Description |
|---|---|---|
when | B_INT64_TYPE | Event time, in microseconds since 01/01/70 |