haiku-website/static/legacy-docs/bebook/TheApplicationKit_MessageCo...

133 lines
32 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - Classes And Methods - The Application Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheApplicationKit.html" title="The Application Kit" /><link rel="prev" href="BRoster.html" title="BRoster" /><link rel="next" href="TheDeviceKit.html" title="The Device Kit" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BRoster.html" title="BRoster"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheApplicationKit.html" title="The Application Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="TheDeviceKit.html" title="The Device Kit"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - Classes And Methods - The Application Kit</div></div><div id="headerB">Prev: <a href="BRoster.html">BRoster</a>  Up: <a href="TheApplicationKit.html">The Application Kit</a>  Next: <a href="TheDeviceKit.html">The Device Kit</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_MessageConstants"></a>Message Constants</h2></div></div></div><p>The following sections describe Application Kit constants
which can be either used as a return value from a method or as a
<code class="varname">what</code> data member of a
<a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>.</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_MessageConstants_Application"></a>Application Messages</h3></div></div></div><p>These constants represent the system messages that are recognized and
given special treatment by
<a class="link" href="BApplication.html" title="BApplication"><code class="classname">BApplication</code></a>.
Application messages concern the application as a whole, rather than any
particular window thread. See the introduction to this chapter and the
<a class="link" href="BApplication.html" title="BApplication"><code class="classname">BApplication</code></a>
class for details.</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_ABOUT_REQUESTED"></a>B_ABOUT_REQUESTED</h4></div></div></div><a id="id939237" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system or your app.</td></tr><tr><td>Target:</td><td>App-defined; typically
<a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a>.</td></tr><tr><td>Hook:</td><td><a class="link" href="BApplication.html#BApplication_AboutRequested" title="AboutRequested()"><code class="methodname">BApplication::AboutRequested()</code></a>
if the target is
<a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a>.</td></tr></tbody></table></div><p>The message should be assigned to an <span class="guimenuitem">About...</span> 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.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_APP_ACTIVATED"></a>B_APP_ACTIVATED</h4></div></div></div><a id="id939375" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a></td></tr><tr><td>Hook:</td><td><a class="link" href="BApplication.html#BApplication_AppActivated" title="AppActivated()"><code class="methodname">BApplication::AppActivated()</code></a></td></tr></tbody></table></div><p>Sent when an application becomes active or inactive.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">active</code></td><td><code class="constant">B_BOOL_TYPE</code></td><td><code class="constant">true</code> if the app has become active; otherwise <code class="constant">false</code>.</td></tr></tbody></table></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_ARGV_RECEIVED"></a>B_ARGV_RECEIVED</h4></div></div></div><a id="id939576" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a></td></tr><tr><td>Hook:</td><td><a class="link" href="BApplication.html#BApplication_ArgvReceived" title="ArgvReceived()"><code class="methodname">BApplication::ArgvReceived()</code></a></td></tr></tbody></table></div><p>Forwards arguments that (a) the user passes while launching the app from
the command line, or (b) are passed to
<a class="link" href="BRoster.html#BRoster_Launch" title="Launch()"><code class="methodname">BRoster::Launch()</code></a>. 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 <code class="varname">cwd</code> field to reconstruct the full path.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">argc</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The number of arguments.</td></tr><tr><td><code class="varname">argv</code> [<code class="varname">argc</code>]</td><td><code class="constant">B_STRING_TYPE</code></td><td>The arguments.</td></tr><tr><td><code class="varname">cwd</code></td><td><code class="constant">B_STRING_TYPE</code></td><td>The path name of the current working directory.</td></tr></tbody></table></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_PULSE"></a>B_PULSE</h4></div></div></div><a id="id939834" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a> or
<a class="link" href="BWindow.html" title="BWindow"><code class="classname">BWindow</code></a> object.</td></tr><tr><td>Hook:</td><td><a class="link" href="BApplication.html#BApplication_Pulse" title="Pulse()"><code class="methodname">BApplication::Pulse()</code></a> and
<a class="link" href="BView.html#BView_Pulse" title="Pulse()"><code class="methodname">BView::Pulse()</code></a></td></tr></tbody></table></div><p>Sent at regular intervals, but with no particular intent. You can
implement <code class="methodname">Pulse()</code> to do whatever you want. The message is to the
<a class="link" href="BWindow.html" title="BWindow"><code class="classname">BWindow</code></a>
only if a
<a class="link" href="BView.html" title="BView"><code class="classname">BView</code></a>
within the window declares <code class="constant">B_PULSE_NEEDED</code> in its
constructor flags.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_READY_TO_RUN"></a>B_READY_TO_RUN</h4></div></div></div><a id="id939989" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a></td></tr><tr><td>Hook:</td><td><a class="link" href="BApplication.html#BApplication_ReadyToRun" title="ReadyToRun()"><code class="methodname">BApplication::ReadyToRun()</code></a></td></tr></tbody></table></div><p>Sent when an application has finished configuring itself and is ready to
start running.</p><p>(No Be-defined fields)</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_REFS_RECEIVED"></a>B_REFS_RECEIVED</h4></div></div></div><a id="id940110" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system or your app.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a>,
or other app-defined target.</td></tr><tr><td>Hook:</td><td><a class="link" href="BApplication.html#BApplication_RefsReceived" title="RefsReceived()"><code class="methodname">BApplication::RefsReceived()</code></a></td></tr></tbody></table></div><p>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
<a class="link" href="BFilePanel.html#BFilePanel_SetTarget" title="SetTarget(), Messenger()"><code class="methodname">BFilePanel::SetTarget()</code></a>).
You can also create, stuff, and send a
<a class="link" href="TheApplicationKit_MessageConstants.html#B_REFS_RECEIVED" title="B_REFS_RECEIVED"><code class="constant">B_REFS_RECEIVED</code></a>
message yourself. When it receives this message, an app is expected to open
the files that the message refers to.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">refs</code> [i]</td><td><code class="constant">B_REF_TYPE</code></td><td><span class="type">entry_ref</span>
items, one for each file or directory.</td></tr></tbody></table></div></div><p>See also:
"<a class="link" href="BApplication_Overview.html#BApplication_Overview_Application_Messages" title="Application Messages">Application Messages</a>"</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_MessageConstants_Looper"></a>BLooper Messages</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_QUIT_REQUESTED"></a>B_QUIT_REQUESTED</h4></div></div></div><a id="id940352" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system or your app.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a>,
<a class="link" href="BWindow.html" title="BWindow"><code class="classname">BWindow</code></a>
closed by the user, or other
<a class="link" href="BLooper.html" title="BLooper"><code class="classname">BLooper</code></a> object.</td></tr><tr><td>Hook:</td><td><a class="link" href="BLooper.html#BLooper_QuitRequested" title="QuitRequested()"><code class="methodname">BLooper::QuitRequested()</code></a>.</td></tr></tbody></table></div><p>Automatically sent (a) to
<a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a>
when the user types
<span class="keycap">Command</span>+<span class="keycap">q</span>,
and (b) to a
<a class="link" href="BWindow.html" title="BWindow"><code class="classname">BWindow</code></a>
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.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">shortcut</code></td><td><code class="constant">B_BOOL_TYPE</code></td><td><code class="constant">true</code> if the user typed
<span class="keycap">Command</span>+<span class="keycap">q</span>.</td></tr></tbody></table></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_MessageConstants_Scripting"></a>Scripting Messages</h3></div></div></div><p>The scripting system defines four generic messages that can operate on
the specific properties of an object and two meta-messages that query an
object about the messages it can handle.
See "<a class="xref" href="TheApplicationKit_Scripting.html" title="Scripting">Scripting</a>" in The
Application Kit chapter for a full explanation.</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_COUNT_PROPERTIES"></a>B_COUNT_PROPERTIES</h4></div></div></div><a id="id940626" class="indexterm"></a><p>This message requests the number of properties supported by the receiver.
It contains no data, but the reply message should contain one field:</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">result</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The number of properties supported.</td></tr></tbody></table></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_GET_SUPPORTED_SUITES"></a>B_GET_SUPPORTED_SUITES</h4></div></div></div><a id="id940723" class="indexterm"></a><p>This message requests the names of all message suites that the receiver
supports. It doesn't contain any data, but the message that's sent in
reply has one field:</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">suites</code></td><td><code class="constant">B_STRING_TYPE</code></td><td>An array of suite names.</td></tr></tbody></table></div><p>A suite is a named set of messages and specifiers. A
<a class="link" href="BHandler.html" title="BHandler"><code class="classname">BHandler</code></a> supports
the suite if it can respond to the messages and resolve the specifiers.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_SET_PROPERTY"></a><a id="B_GET_PROPERTY"></a>
<a id="B_CREATE_PROPERTY"></a>
<a id="B_DELETE_PROPERTY"></a>
B_SET_PROPERTY, B_GET_PROPERTY, B_CREATE_PROPERTY, B_DELETE_PROPERTY</h4></div></div></div><a id="id940847" class="indexterm"></a><a id="id940856" class="indexterm"></a><a id="id940865" class="indexterm"></a><a id="id940874" class="indexterm"></a><p>These messages—as their names state—target a particular
property under the control of the target handler. They have the following
data fields:</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">specifiers</code></td><td><code class="constant">B_MESSAGE_TYPE</code></td><td>An array of one or more
<a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>s
that specify the targeted property. See
<a class="link" href="BMessage.html#BMessage_AddSpecifier" title="AddSpecifier()"><code class="methodname">AddSpecifier()</code></a>
in the <a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a> class
of the Application Kit for details on the contents of a specifier.</td></tr><tr><td><code class="varname">data</code></td><td><span class="emphasis"><em>variable</em></span></td><td>For <code class="constant">B_SET_PROPERTY</code> messages only, the data that should be
set. The data type depends on the targeted property.</td></tr></tbody></table></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_MessageConstants_Reply"></a>Reply Messages</h3></div></div></div><p>The following three messages are sent as replies to other messages.</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_MESSAGE_NOT_UNDERSTOOD"></a>B_MESSAGE_NOT_UNDERSTOOD</h4></div></div></div><a id="id941033" class="indexterm"></a><p>This message doesn't contain any data. The system sends it as a reply to
a message that the receiving thread's chain of
<a class="link" href="BHandler.html" title="BHandler"><code class="classname">BHandler</code></a>
does not recognize. See
<a class="link" href="BHandler.html#BHandler_MessageReceived" title="MessageReceived()"><code class="methodname">MessageReceived()</code></a>
and
<a class="link" href="BHandler.html#BHandler_ResolveSpecifier" title="ResolveSpecifier()"><code class="methodname">ResolveSpecifier()</code></a>
in the
<a class="link" href="BHandler.html" title="BHandler"><code class="classname">BHandler</code></a>
class of the Application Kit.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_NO_REPLY"></a>B_NO_REPLY</h4></div></div></div><a id="id941088" class="indexterm"></a><p>This message doesn't contain any data. It's sent as a default reply to
another message when the original message is about to be deleted. The
default reply is sent only if a synchronous reply is expected and none
has been sent. See the
<a class="link" href="BMessage.html#BMessage_SendReply" title="SendReply()"><code class="methodname">SendReply()</code></a>
function in the
<a class="link" href="BMessage.html" title="BMessage"><code class="classname">BMessage</code></a>
class of the Application Kit.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_REPLY"></a>B_REPLY</h4></div></div></div><a id="id941128" class="indexterm"></a><p>This constant identifies a message as being a reply to a previous
message. The data in the reply depends on the circumstances and,
particularly, on the original message. For replies to scripting messages,
it generally has a <code class="varname">result</code> field
with requested data and an <code class="varname">error</code>
field with an error code reporting the success or failure of the scripted
request.</p></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_MessageConstants_General"></a>General Messages</h3></div></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_CLIPBOARD_CHANGED"></a>B_CLIPBOARD_CHANGED</h4></div></div></div><a id="id941179" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The Application Server.</td></tr><tr><td>Target:</td><td>Selected <a class="link" href="BMessenger.html" title="BMessenger"><code class="classname">BMessenger</code></a>.</td></tr></tbody></table></div><p>If you've called
<a class="link" href="BClipboard.html#BClipboard_StartWatching" title="StartWatching(), StopWatching()"><code class="methodname">BClipboard::StartWatching()</code></a>
to monitor a clipboard for changes, this message is sent to the specified
<a class="link" href="BMessenger.html" title="BMessenger"><code class="classname">BMessenger</code></a> when the
clipboard changes.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_OBSERVER_NOTICE_CHANGE"></a>B_OBSERVER_NOTICE_CHANGE</h4></div></div></div><a id="id941297" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td>Application-defined target.</td></tr><tr><td>Hook:</td><td> </td></tr></tbody></table></div><p>Sent by
<a class="link" href="BHandler.html" title="BHandler"><code class="classname">BHandler</code></a>s
to all targets that have been registered with the
<a class="link" href="BHandler.html" title="BHandler"><code class="classname">BHandler</code></a>'s
<a class="link" href="BHandler.html#BHandler_StartWatching" title="StartWatching(), StartWatchingAll(), StopWatching(), StopWatchingAll()"><code class="methodname">StartWatching()</code></a> or
<a class="link" href="BHandler.html#BHandler_StartWatchingAll"><code class="methodname">StartWatchingAll()</code></a>
function.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">be:observe_change_what</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The <code class="varname">what</code> code of the message
being broadcast.</td></tr><tr><td><code class="varname">be:observe_orig_what</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The original <code class="varname">what</code> code of the
message, before it was altered by the broadcasting mechanism.</td></tr></tbody></table></div><p>The message may have other fields, depending on what the broadcast
message is. Messages are sent to targets in response to the
<a class="link" href="BHandler.html#BHandler_SendNotices" title="SendNotices()"><code class="methodname">BHandler::SendNotices()</code></a>
function. The logic is:</p><div class="orderedlist"><ol><li><p>Take the message to broadcast and place its what code into the
<code class="varname">be:observe_change_orig_what</code> field.</p></li><li><p>Add the <code class="varname">be:observe_change_what</code>
field, which is set to the <code class="parameter">what</code> code specified by the call to
<a class="link" href="BHandler.html#BHandler_SendNotices" title="SendNotices()"><code class="methodname">SendNotices()</code></a>.</p></li><li><p>Set the message's <code class="varname">what</code> code to
<code class="constant">B_OBSERVER_NOTICE_CHANGE</code>.</p></li></ol></div><p>The resulting message is then sent to all interested parties.</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_SILENT_RELAUNCH"></a>B_SILENT_RELAUNCH</h4></div></div></div><a id="id941618" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The system.</td></tr><tr><td>Target:</td><td><a class="link" href="BApplication.html#BApplication_be_app" title="be_app"><code class="varname">be_app</code></a></td></tr><tr><td>Hook:</td><td> </td></tr></tbody></table></div><p>Sent to a single-launch application when it's activated by being launched
(for example, if the user double-clicks its icon in Tracker).</p><p>(No Be-defined fields)</p></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="B_SOME_APP_ACTIVATED"></a><a id="B_SOME_APP_LAUNCHED"></a>
<a id="B_SOME_APP_QUIT"></a>
B_SOME_APP_ACTIVATED, B_SOME_APP_LAUNCHED, B_SOME_APP_QUIT</h4></div></div></div><a id="id941743" class="indexterm"></a><a id="id941753" class="indexterm"></a><a id="id941762" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The Roster Monitor.</td></tr><tr><td>Target:</td><td>App-defined.</td></tr><tr><td>Hook:</td><td> </td></tr></tbody></table></div><p>Sent as apps are launched, activated, or quit. You get these messages by
invoking
<a class="link" href="BRoster.html#BRoster_StartWatching" title="StartWatching() , StopWatching()"><code class="methodname">BRoster::StartWatching()</code></a>
passing a one or more of
<a class="link" href="BRoster.html#B_REQUEST_ACTIVATED"><code class="constant">B_REQUEST_ACTIVATED</code></a>,
<a class="link" href="BRoster.html#B_REQUEST_LAUNCHED"><code class="constant">B_REQUEST_LAUNCHED</code></a>,
and <a class="link" href="BRoster.html#B_REQUEST_QUIT"><code class="constant">B_REQUEST_QUIT</code></a>.</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Field</th><th>Type code</th><th>Description</th></tr></thead><tbody><tr><td><code class="varname">mime_sig</code></td><td><code class="constant">B_STRING_TYPE</code></td><td>The app signature.</td></tr><tr><td><code class="varname">team</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The app's team id.</td></tr><tr><td><code class="varname">thread</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The id of the app's main thread.</td></tr><tr><td><code class="varname">flags</code></td><td><code class="constant">B_INT32_TYPE</code></td><td>The app's app flags (<code class="constant">B_SINGLE_LAUNCH</code>,
<code class="constant">B_BACKGROUND_APP</code>, etc).</td></tr><tr><td><code class="varname">ref</code></td><td><code class="constant">B_REF_TYPE</code></td><td>The <span class="type">entry_ref</span> of the app's executable.</td></tr></tbody></table></div></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h4 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="TheApplicationKit_B_CANCEL"></a>B_CANCEL</h4></div></div></div><a id="id942068" class="indexterm"></a><div class="informaltable"><table border="0"><colgroup><col /><col /></colgroup><tbody><tr><td>Purpose:</td><td>Deliverable</td></tr><tr><td>Source:</td><td>The Application Kit.</td></tr><tr><td>Target:</td><td>Application Server.</td></tr></tbody></table></div><p>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.</p></div></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BRoster.html">BRoster</a>  Up: <a href="TheApplicationKit.html">The Application Kit</a>  Next: <a href="TheDeviceKit.html">The Device Kit</a> </div><div id="footerB"><div id="footerBL"><a href="BRoster.html" title="BRoster"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheApplicationKit.html" title="The Application Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="TheDeviceKit.html" title="The Device Kit"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>