2007-10-15 15:49:54 +04:00
|
|
|
/*
|
2019-09-02 08:57:37 +03:00
|
|
|
* Copyright 2007-2014, 2019 Haiku, Inc. All rights reserved.
|
2007-10-15 15:49:54 +04:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
2014-06-12 00:25:57 +04:00
|
|
|
* Niels Sascha Reedijk, niels.reedijk@gmail.com
|
|
|
|
* John Scipione, jscpione@gmail.com
|
|
|
|
*
|
2007-10-15 15:49:54 +04:00
|
|
|
* Corresponds to:
|
2019-09-02 08:57:37 +03:00
|
|
|
* headers/os/app/Message.h hrev51780
|
|
|
|
* src/kits/app/Message.cpp hrev53160
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\file Message.h
|
2013-02-07 06:05:00 +04:00
|
|
|
\ingroup app
|
2013-02-08 00:04:05 +04:00
|
|
|
\ingroup libbe
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Provides the BMessage class.
|
|
|
|
*/
|
|
|
|
|
2013-02-08 00:04:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
///// Name lengths and Scripting specifiers /////
|
|
|
|
|
2013-02-08 00:04:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
|
|
|
\def B_FIELD_NAME_LENGTH
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\def B_PROPERTY_NAME_LENGTH
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_NO_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_DIRECT_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_INDEX_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_REVERSE_INDEX_SPECIFIER,
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_RANGE_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_REVERSE_RANGE_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_NAME_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2016-04-27 21:02:23 +03:00
|
|
|
/*!
|
2007-10-15 15:49:54 +04:00
|
|
|
\var B_ID_SPECIFIER
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var B_SPECIFIERS_END
|
|
|
|
\brief Undocumented...
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
///// Class BMessage /////
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\class BMessage
|
|
|
|
\ingroup app
|
2013-02-08 00:04:05 +04:00
|
|
|
\ingroup libbe
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief A container that can be send and received using the Haiku messaging
|
2014-06-12 00:25:57 +04:00
|
|
|
subsystem.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This class is at the center of the web of messaging classes, in the sense
|
|
|
|
that it defines the actual structure of the messages. Messages have two
|
2011-08-10 01:46:13 +04:00
|
|
|
<b>important elements</b>: the #what identifier, and the data members. The
|
2007-12-27 16:30:30 +03:00
|
|
|
first can be directly manipulated, the latter can be manipulated through
|
2011-08-10 01:46:13 +04:00
|
|
|
AddData(), FindData() and ReplaceData() and their derivatives. Neither of
|
2007-10-15 15:49:54 +04:00
|
|
|
these elements are mandatory.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-12-27 16:30:30 +03:00
|
|
|
The second important role of BMessage is that it stores <b>meta data</b>:
|
|
|
|
who sent the message and with what intention? The methods of BMessage will
|
|
|
|
disclose if the message was a reply (IsReply()), where it came from
|
2007-10-15 15:49:54 +04:00
|
|
|
(IsSourceRemote()), whether a reply is expected (IsSourceWaiting()), and in
|
|
|
|
case the message is a reply, what it's a reply to (Previous()).
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-12-27 16:30:30 +03:00
|
|
|
Mostly, messages are used to pass information between the the objects in
|
|
|
|
your application, but because messages are such flexible data containers,
|
|
|
|
they are also often used for other <b>data storage purposes</b>. Many
|
|
|
|
applications store their settings as messages. Because messages can be
|
|
|
|
flattened to data streams (such as files), they provide an easy but
|
|
|
|
powerful tool for data storage.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
All methods can be classified in these areas:
|
|
|
|
- Adding, Finding, Replacing and Removing Data.
|
2011-08-10 01:46:13 +04:00
|
|
|
- Statistics and Miscellaneous information.
|
2007-10-15 15:49:54 +04:00
|
|
|
- Delivery information.
|
|
|
|
- Utilities to reply to messages.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
To see how messages fit in with the greater picture, have a look at the
|
|
|
|
\ref app_messaging "Messaging Introduction".
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\var BMessage::what
|
|
|
|
\brief A 4-byte constant that determines the type of message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
You can directly manipulate this data member.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BMessage::BMessage()
|
2016-04-27 21:02:23 +03:00
|
|
|
\brief Construct an empty message, without any data members and with a
|
2014-06-12 00:25:57 +04:00
|
|
|
\a what constant set to \c 0.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see BMessage(uint32 what)
|
2014-06-12 00:25:57 +04:00
|
|
|
\see BMessage(const BMessage& other)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BMessage::BMessage(uint32 what)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Construct an empty message with the \a what member set to the
|
2014-06-12 00:25:57 +04:00
|
|
|
specified value.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see BMessage::BMessage()
|
2014-06-12 00:25:57 +04:00
|
|
|
\see BMessage::BMessage(const BMessage& other)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn BMessage::BMessage(const BMessage& other)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Construct a new message that is a copy of another message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
The \a what member and the data values are copied. The metadata, such as
|
2014-06-12 00:25:57 +04:00
|
|
|
whether or not the message is a drop message or reply information is
|
|
|
|
not copied. If the original message is a reply to a previous message
|
|
|
|
this will make IsReply() return \c true, while calling the same method on
|
|
|
|
a copy of the message will return \c false.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\remark BeOS kept the metadata of the message while Haiku deviates from
|
|
|
|
this behavior. Use the Haiku implementation of message copying
|
|
|
|
as the default behavior to keep your applications backwards
|
|
|
|
compatible.
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
\see BMessage::BMessage()
|
|
|
|
\see BMessage(uint32 what)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BMessage::~BMessage()
|
|
|
|
\brief Free the data members associated with the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
If there still is a sender waiting for a reply, the \c B_NO_REPLY message
|
|
|
|
will be sent to inform them that there won't be a reply.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2011-08-10 01:46:13 +04:00
|
|
|
\name Statistics and Miscellaneous Information
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
2016-04-27 21:02:23 +03:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::GetInfo(type_code typeRequested, int32 index,
|
2014-06-12 00:25:57 +04:00
|
|
|
char** nameFound, type_code* typeFound, int32* countFound) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Retrieve the name, the type and the number of items in a message by
|
2014-06-12 00:25:57 +04:00
|
|
|
an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param[in] typeRequested If you want to limit the search to only one type,
|
2014-06-12 00:25:57 +04:00
|
|
|
pass that type code here. If you don't care which type the data
|
|
|
|
has, you can pass \c B_ANY_TYPE.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param[in] index The index of the data you want to investigate.
|
|
|
|
\param[out] nameFound The name of the item if it is found. Haiku will fill
|
2014-06-12 00:25:57 +04:00
|
|
|
in a pointer to the internal name buffer in the message. This
|
|
|
|
means that you should not manipulate this name. If you are not
|
|
|
|
interested in the name, you can safely pass \c NULL.
|
2011-08-10 01:46:13 +04:00
|
|
|
\param[out] typeFound The type of the item at \a index. If you are
|
2014-06-12 00:25:57 +04:00
|
|
|
not interested in the type (because you specifically asked for
|
|
|
|
a type), you can safely pass \c NULL.
|
2011-08-10 01:46:13 +04:00
|
|
|
\param[out] countFound The number of items at \a index. If data
|
2014-06-12 00:25:57 +04:00
|
|
|
items have the same name, they will be placed under the same
|
|
|
|
index.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
\return If the \a index is found, and matches the requested type,
|
2014-06-12 00:25:57 +04:00
|
|
|
then the other parameters will be filled in. If this is not the
|
|
|
|
case, the method will return with an error.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK An match was found. The values have been filled in.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_BAD_INDEX The \a index was out of range. None of the
|
2014-06-12 00:25:57 +04:00
|
|
|
passed variables have been altered.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_BAD_TYPE The data field at \a index does not have the
|
2014-06-12 00:25:57 +04:00
|
|
|
requested type.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
|
|
|
|
int32* countFound) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Retrieve the type and the number of data items in this message that
|
2014-06-12 00:25:57 +04:00
|
|
|
are associated with a \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param[in] name The name of the data member that you are looking for.
|
|
|
|
\param[out] typeFound In case of a match, the name of the data member will
|
2014-06-12 00:25:57 +04:00
|
|
|
be put in this parameter. In case you are not interested, you
|
|
|
|
can pass \c NULL.
|
2016-04-27 21:02:23 +03:00
|
|
|
\param[out] countFound In case of a match, the number of items at this
|
2014-06-12 00:25:57 +04:00
|
|
|
label will be in this parameter. In case you are not
|
|
|
|
interested, you can safely pass \c NULL.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
\return If the message has data associated with the given \a name,
|
2014-06-12 00:25:57 +04:00
|
|
|
the other parameters will contain information associated with the
|
|
|
|
data, else, the method will return with an error.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK A match was found. The other parameters have been filled in.
|
|
|
|
\retval B_BAD_VALUE You passed \c NULL as argument to \a name.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no data with the label \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
|
|
|
|
bool* fixedSize) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Retrieve the type and whether or not the size of the data is fixed
|
|
|
|
associated with a \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
This method is the same as GetInfo(const char*, type_code*, int32*) const,
|
2011-08-10 01:46:13 +04:00
|
|
|
with the difference that you can find out whether or not the size of the
|
|
|
|
data associated with the \a name is fixed. You will get this value
|
|
|
|
in the variable you passed as \a fixedSize parameter.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R4
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::GetInfo(const char* name, type_code* typeFound,
|
|
|
|
int32* countFound, bool* fixedSize) const
|
|
|
|
\brief Retrieve the type and whether or not the size of the data is fixed
|
|
|
|
associated with a \a name.
|
|
|
|
|
|
|
|
This method is the same as GetInfo(const char*, type_code*, int32*) const,
|
|
|
|
with the difference that you can find out whether or not the size of the
|
|
|
|
data associated with the \a name is fixed. You will get this value
|
|
|
|
in the variable you passed as \a fixedSize parameter.
|
|
|
|
|
|
|
|
\since BeOS R4
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
|
|
|
\fn int32 BMessage::CountNames(type_code type) const
|
|
|
|
\brief Count the number of names of a certain \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method can be used to count the number of items of a certain type.
|
|
|
|
It's practical use is limited to debugging purposes.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param type The type you want to find. If you pass \c B_ANY_TYPE, this
|
2014-06-12 00:25:57 +04:00
|
|
|
method will return the total number of data items.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\return The number of data items in this message with the specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a type, or \c 0 in case no items match the type.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::IsEmpty() const
|
|
|
|
\brief Check if the message has data members.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\return If this message contains data members, this method will return
|
2014-06-12 00:25:57 +04:00
|
|
|
\c true, else it will return \c false.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see MakeEmpty()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::IsSystem() const
|
|
|
|
\brief Check if the message is a system message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\return If this message is a system message, the method will return
|
2014-06-12 00:25:57 +04:00
|
|
|
\c true.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::IsReply() const
|
|
|
|
\brief Check if the message is a reply to a (previous) message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\return If this message is a reply, this method will return \c true.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn void BMessage::PrintToStream() const
|
|
|
|
\brief Print the message to the standard output.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method can be used to debug your application. It can be used to check
|
|
|
|
if it creates the messages properly, by checking if all the required fields
|
|
|
|
are present, and it can be used to debug your message handling routines,
|
|
|
|
especially the handling of those that are sent by external applications, to
|
|
|
|
see if you understand the semantics correctly.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::Rename(const char* oldEntry, const char* newEntry)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Rename a data label.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param oldEntry The name of the label you want to rename.
|
|
|
|
\param newEntry The new name of the data entry.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK Renaming succeeded.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_BAD_VALUE Either the \a oldEntry or the
|
2014-06-12 00:25:57 +04:00
|
|
|
\a newEntry pointers are \c NULL.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no data associated with the label
|
2014-06-12 00:25:57 +04:00
|
|
|
\a oldEntry.
|
|
|
|
|
|
|
|
\since Haiku R1
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
|
|
|
\name Delivery Info
|
|
|
|
*/
|
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::WasDelivered() const
|
|
|
|
\brief Check if this message was delivered through the delivery methods.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
If this message is passed via a BMessenger or BLooper::PostMessage(), this
|
|
|
|
method will return \c true.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\warning This method should not be abused by a thread that sends a message
|
2014-06-12 00:25:57 +04:00
|
|
|
to track whether or not a message was delivered. This is because
|
|
|
|
the ownership of the message goes to the receiving looper, which
|
|
|
|
will delete the message as soon as it is done with it.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\warning If you need to check whether a message is delivered, you should
|
2016-04-27 21:02:23 +03:00
|
|
|
either ask for a reply, or use one of the synchronous
|
2014-06-12 00:25:57 +04:00
|
|
|
BMessenger::SendMessage() methods.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::IsSourceWaiting() const
|
|
|
|
\brief Check if the sender expects a reply.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method will return \c true, if the sender flagged that it is waiting
|
|
|
|
for a reply, and such a reply has not yet been sent.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::IsSourceRemote() const
|
|
|
|
\brief Check if the message is sent by another application.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BMessenger BMessage::ReturnAddress() const
|
|
|
|
\brief Get a messenger that points to the sender of the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
Using this method, you can fetch a BMessenger that can be used to deliver
|
|
|
|
replies to this message. This method works both for local and remote
|
|
|
|
deliveries.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
For remote deliveries, this approach is preferred over sending the reply
|
|
|
|
using a standard BMessenger that is created with the signature of the
|
|
|
|
application. A standard BMessenger sends the messages to the main BLooper
|
|
|
|
of the application, the BApplication object. With the delivery data stored
|
|
|
|
in the messages, the reply using this messenger will be directed at a
|
|
|
|
specific looper that is able to handle the replies.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
If this method is called on a message that has not been delivered (yet),
|
|
|
|
it will return an empty BMessenger object.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn const BMessage* BMessage::Previous() const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Get the message to which this message is a reply.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\return Returns a new BMessage with the same data stuctures as the message
|
2018-08-28 20:13:38 +03:00
|
|
|
to which this message is a reply. The pointer is only valid as
|
|
|
|
long as this message is still allocated, you do not get ownership.
|
|
|
|
If this message isn't a reply to another message, this method will
|
|
|
|
return \c NULL.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::WasDropped() const
|
|
|
|
\brief Check if the message was delivered through 'drag and drop'.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\return This method returns \c true if the message has been delivered
|
2014-06-12 00:25:57 +04:00
|
|
|
through drag and drop. It returns \c false if it has been delivered
|
|
|
|
through the regular messaging functions, or if the message has not
|
|
|
|
been delivered at all.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see DropPoint()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn BPoint BMessage::DropPoint(BPoint* offset) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Get the coordinates of the drop point of the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
If the message has been delivered because of drag and drop, which can be
|
|
|
|
verified with the WasDropped() method, this method will return a BPoint to
|
2016-04-27 21:02:23 +03:00
|
|
|
where exactly the drop off was made.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
Because drop messages are delivered to the BWindow in which they were
|
|
|
|
dropped, and BWindow is a subclass of BLooper, you can use BWindow to
|
|
|
|
determine based on the location, how you should react to it.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
If this message was not delivered through drag and drop, it will return
|
|
|
|
a \c NULL pointer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see WasDropped()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Replying
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::SendReply(uint32 command, BHandler* replyTo)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Asynchronously send a reply to this message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
This is an overloaded member of
|
|
|
|
SendReply(BMessage*, BMessenger, bigtime_t). Use this variant if you
|
|
|
|
want to send a message without data members.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::SendReply(BMessage* reply, BHandler* replyTo,
|
|
|
|
bigtime_t timeout)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Asynchronously send a reply to this message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
This is an overloaded member of SendReply(BMessage*, BMessenger, bigtime_t).
|
2007-10-15 15:49:54 +04:00
|
|
|
Use this variant if you want to send the message to a specific handler
|
|
|
|
(instead of a complete messenger).
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::SendReply(BMessage* reply, BMessenger replyTo,
|
|
|
|
bigtime_t timeout)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Asynchronously send a reply to this message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method sends a reply to this message to the sender. On your turn,
|
|
|
|
you specify a messenger that handles a reply back to the message you
|
2011-08-10 01:46:13 +04:00
|
|
|
specify as the \a reply argument. You can set a timeout for the
|
|
|
|
message to be delivered. This method blocks until the message has been
|
|
|
|
received, or the \a timeout has been reached.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param reply The message that is in reply to this message.
|
|
|
|
\param replyTo In case the receiver needs to reply to the message you are
|
2014-06-12 00:25:57 +04:00
|
|
|
sending, you can specify the return address with this argument.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param timeout The maximum time in microseconds this delivery may take. The
|
2014-06-12 00:25:57 +04:00
|
|
|
\a timeout is a relative timeout. You can also use
|
|
|
|
\c B_INFINITE_TIMEOUT if you want to wait infinitely for the message
|
|
|
|
to be delivered.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The message has been delivered.
|
|
|
|
\retval B_DUPLICATE_REPLY There already has been a reply to this message.
|
|
|
|
\retval B_BAD_PORT_ID The reply address is not valid (anymore).
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_WOULD_BLOCK The delivery \a timeout was
|
2014-06-12 00:25:57 +04:00
|
|
|
\c B_INFINITE_TIMEOUT (\c 0) and the target port was full when
|
|
|
|
trying to deliver the message.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_TIMED_OUT The timeout expired while trying to deliver the
|
2014-06-12 00:25:57 +04:00
|
|
|
message.
|
|
|
|
|
|
|
|
\see SendReply(uint32 command, BHandler* replyTo)
|
|
|
|
|
|
|
|
\since Haiku R1
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::SendReply(uint32 command, BMessage* replyToReply)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Synchronously send a reply to this message, and wait for a reply
|
2014-06-12 00:25:57 +04:00
|
|
|
back.
|
|
|
|
|
|
|
|
This is an overloaded member of
|
|
|
|
SendReply(BMessage*, BMessage*, bigtime_t, bigtime_t)
|
|
|
|
Use this variant if you want to send a message without data members.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::SendReply(BMessage* reply, BMessage* replyToReply,
|
2007-10-15 15:49:54 +04:00
|
|
|
bigtime_t sendTimeout, bigtime_t replyTimeout)
|
2014-06-12 00:25:57 +04:00
|
|
|
\brief Synchronously send a reply to this message, and wait for a reply
|
|
|
|
back.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method sends a reply to this message to the sender. The
|
|
|
|
\a reply is delivered, and then the method waits for a reply from
|
|
|
|
the receiver. If a reply is received, that reply is copied into the
|
|
|
|
\a replyToReply argument.
|
2007-10-15 15:49:54 +04:00
|
|
|
If the message was delivered properly, but the receiver did not reply
|
2011-08-10 01:46:13 +04:00
|
|
|
within the specified \a replyTimeout, the \a what member of
|
|
|
|
\a replyToReply will be set to \c B_NO_REPLY.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param reply The message that is in reply to this message.
|
2016-04-27 21:02:23 +03:00
|
|
|
\param[out] replyToReply The reply is copied into this argument.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param sendTimeout The maximum time in microseconds this delivery may take.
|
2014-06-12 00:25:57 +04:00
|
|
|
The \a timeout is a relative timeout. You can also use
|
|
|
|
\c B_INFINITE_TIMEOUT if you want to wait infinitely for the message
|
|
|
|
to be delivered.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param replyTimeout The maximum time in microseconds you want to wait for a
|
2014-06-12 00:25:57 +04:00
|
|
|
reply. Note that the timer starts when the message has been
|
|
|
|
delivered.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The message has been delivered.
|
|
|
|
\retval B_DUPLICATE_REPLY There already has been a reply to this message.
|
2014-06-12 00:25:57 +04:00
|
|
|
\retval B_BAD_VALUE Either \a reply or \a replyToReply is \c NULL.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_BAD_PORT_ID The reply address is not valid (anymore).
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_WOULD_BLOCK The delivery \a timeout was
|
2014-06-12 00:25:57 +04:00
|
|
|
\c B_INFINITE_TIMEOUT (\c 0) and the target port was full when
|
|
|
|
trying to deliver the message.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_TIMED_OUT The timeout expired while trying to deliver the
|
2014-06-12 00:25:57 +04:00
|
|
|
message.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_NO_MORE_PORTS All reply ports are in use.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\see SendReply(uint32 command, BMessage* replyToReply)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\name Flattening
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
Because of historical reasons and for binary compatibility, this class
|
|
|
|
provides a flattening API without inheriting the BFlattenable class. The
|
|
|
|
API is more or less the same, but you are inconvenienced when you want to
|
|
|
|
use messages in methods that handle BFlattenable objects.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn ssize_t BMessage::FlattenedSize() const
|
|
|
|
\brief Return the size in bytes required when you want to flatten this
|
2014-06-12 00:25:57 +04:00
|
|
|
message to a stream of bytes.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::Flatten(char* buffer, ssize_t size) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Flatten the message to a \a buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param buffer The buffer to write the data to.
|
|
|
|
\param size The size of the buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\return \c B_OK in case of success, or an error code in case something
|
|
|
|
went awry.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\warning Make sure the buffer is large enough to hold the message. This
|
2014-06-12 00:25:57 +04:00
|
|
|
method does not double-check for you!
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see FlattenedSize()
|
2014-06-12 00:25:57 +04:00
|
|
|
\see Flatten(BDataIO* stream, ssize_t* size) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::Flatten(BDataIO* stream, ssize_t* size) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Flatten the message to a \a stream.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\param[in] stream The stream to flatten the message to.
|
|
|
|
\param[out] size The method writes the number of bytes actually written
|
2016-04-27 21:02:23 +03:00
|
|
|
to this argument.
|
2014-06-12 00:25:57 +04:00
|
|
|
\return \c B_OK in case of success, or an error code in case something
|
|
|
|
went awry.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\warning Make sure the subclass of the BDataIO interface either protects
|
2014-06-12 00:25:57 +04:00
|
|
|
against buffer overwrites, or check if the number of bytes that
|
|
|
|
is going to be written isn't larger than it can handle.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see FlattenedSize()
|
2014-06-12 00:25:57 +04:00
|
|
|
\see Flatten(char* buffer, ssize_t size) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::Unflatten(const char* flatBuffer)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Unflatten a message from a buffer and put it into the current
|
2014-06-12 00:25:57 +04:00
|
|
|
object.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This action clears the current contents of the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param flatBuffer The buffer that contains the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The buffer has been unflattened.
|
|
|
|
\retval B_BAD_VALUE The buffer does not contain a valid message.
|
|
|
|
\retval B_NO_MEMORY An error occured whilst allocating memory for the data
|
2014-06-12 00:25:57 +04:00
|
|
|
members.
|
|
|
|
|
|
|
|
\see Flatten(char* buffer, ssize_t size) const
|
|
|
|
\see Unflatten(BDataIO* stream)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::Unflatten(BDataIO* stream)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Unflatten a message from a stream and put it into the current
|
2014-06-12 00:25:57 +04:00
|
|
|
object.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This action clears the current contents of the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param stream The stream that contains the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The message has been unflattened.
|
|
|
|
\retval B_BAD_VALUE The stream does not contain a valid message.
|
2014-06-12 00:25:57 +04:00
|
|
|
\retval B_NO_MEMORY An error occured whilst allocating memory for the
|
|
|
|
data members.
|
|
|
|
|
|
|
|
\see Flatten(BDataIO* stream, ssize_t* size) const
|
|
|
|
\see Unflatten(const char*)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\name Specifiers (Scripting)
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
//! @{
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddSpecifier(const char* property)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddSpecifier(const char* property, int32 index)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddSpecifier(const char* property, int32 index,
|
|
|
|
int32 range)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddSpecifier(const char* property, const char* name)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddSpecifier(const BMessage* specifier)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetCurrentSpecifier(int32 index)
|
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::GetCurrentSpecifier(int32* index,
|
|
|
|
BMessage* specifier, int32* what, const char** property) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::HasSpecifiers() const
|
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::PopSpecifier()
|
|
|
|
\brief Undocumented.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Adding Data
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddData(const char* name, type_code type,
|
|
|
|
const void* data, ssize_t numBytes, bool isFixedSize, int32 count)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Add \a data of a certain \a type to the message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
The amount of \a numBytes is copied into the message. The data is
|
|
|
|
stored at the label specified in \a name. You are responsible for
|
|
|
|
specifying the correct \a type. The Haiku API already specifies
|
|
|
|
many constants, such as \c B_FLOAT_TYPE or \c B_RECT_TYPE. See
|
2016-04-27 21:02:23 +03:00
|
|
|
TypeConstants.h for more information on the system-wide defined types.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
If the field with the \a name already exists, the data is added in
|
|
|
|
an array-like form. If you are adding a certain \a name for the
|
|
|
|
first time, you are able to specify some properties of this array. You can
|
|
|
|
fix the size of each data entry, and you can also instruct BMessage to
|
|
|
|
allocate a \a count of items. The latter does not mean that the
|
|
|
|
number of items is fixed; the array will grow nonetheless. Also, note that
|
|
|
|
every \a name can only be associated with one \a type of
|
|
|
|
data.
|
|
|
|
|
|
|
|
If consecutive method calls specify a different \a type than the
|
|
|
|
initial, these calls will fail.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
There is no limit to the number of labels, or the amount of data, but
|
|
|
|
note that searching of data members is linear, as well as that some
|
|
|
|
messages will be copied whilst being passed around, so if the amount of
|
|
|
|
data you need to pass is too big, find another way to pass it.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which this data needs to be associated. If the
|
2014-06-12 00:25:57 +04:00
|
|
|
\a name already exists, the new data will be added in an
|
|
|
|
array-like style.
|
2011-08-10 01:46:13 +04:00
|
|
|
\param type The type of data. If you are adding data to the same
|
|
|
|
\a name, make sure it is the same type.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param data The data buffer to copy the bytes from.
|
2014-06-12 00:25:57 +04:00
|
|
|
\param numBytes The number of bytes to be copied. If this is the first
|
|
|
|
call to this method for this type of data, and you set
|
|
|
|
\a isFixedSize to \c true, this will specify the size of all
|
|
|
|
consecutive calls to this method.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param isFixedSize If this is the first call to this method with this
|
2014-06-12 00:25:57 +04:00
|
|
|
\a name, you can specify the whether or not all items in this
|
|
|
|
array should have the same fixed size.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param count If this is the first call to this method with this
|
2014-06-12 00:25:57 +04:00
|
|
|
\a name, you can instruct this message to allocate a number of
|
|
|
|
items in advance. This does not limit the amount of items though.
|
|
|
|
The array will grow if needed.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The \a data is succesfully added.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_BAD_VALUE The \a numBytes is less than, or equal to \c 0,
|
2014-06-12 00:25:57 +04:00
|
|
|
or the size of this item is larger than the \a name allows,
|
|
|
|
since it has been specified to have a fixed size.
|
|
|
|
\retval B_ERROR There was an error whilst creating the label with
|
|
|
|
your \a name.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_BAD_TYPE The \a type you specified is different than the
|
2014-06-12 00:25:57 +04:00
|
|
|
one already associated with \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddAlignment(const char* name,
|
|
|
|
const BAlignment& alignment)
|
|
|
|
\brief Convenience method to add a BAlignment to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_ALIGNMENT_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param alignment The alignment to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindAlignment()
|
|
|
|
\see GetAlignment()
|
|
|
|
\see ReplaceAlignment()
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddRect(const char* name, BRect aRect)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a BRect to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_RECT_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aRect The rectangle to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindRect()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetRect()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceRect()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddPoint(const char* name, BPoint aPoint)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a BPoint to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_POINT_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aPoint The point to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindPoint()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetPoint()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplacePoint()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddSize(const char* name, BSize size)
|
|
|
|
\brief Convenience method to add a BSize to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_SIZE_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param size The BSize to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindSize()
|
|
|
|
\see GetSize()
|
|
|
|
\see ReplaceSize()
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddString(const char* name, const char* aString)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a C-string to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_STRING_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aString The string to copy to the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindString()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetString()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceString()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddString(const char* name, const BString& aString)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a BString to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_STRING_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aString The string to copy to the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindString()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetString()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceString()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R5
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddStrings(const char* name,
|
|
|
|
const BStringList& list)
|
|
|
|
\brief Convenience method to add list of strings to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_STRING_TYPE \a type for each
|
|
|
|
string in the BStringList.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param list The list of strings to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindStrings()
|
|
|
|
\see GetStrings()
|
|
|
|
\see ReplaceStrings()
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddInt8(const char* name, int8 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add an \c int8 to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_INT8_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindInt8()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetInt8()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceInt8()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddUInt8(const char* name, uint8 value)
|
|
|
|
\brief Convenience method to add an \c uint8 to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_UINT8_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindUInt8()
|
|
|
|
\see GetUInt8()
|
|
|
|
\see ReplaceUInt8()
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2016-04-27 21:02:23 +03:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddInt16(const char* name, int16 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add an \c int16 to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_INT16_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindInt16()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetInt16()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceInt16()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddUInt16(const char* name, uint16 value)
|
|
|
|
\brief Convenience method to add an \c uint16 to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_UINT16_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindUInt16()
|
|
|
|
\see GetUInt16()
|
|
|
|
\see ReplaceUInt16()
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2016-04-27 21:02:23 +03:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddInt32(const char* name, int32 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add an \c int32 to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_INT32_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindInt32()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetInt32()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceInt32()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddUInt32(const char* name, uint32 value)
|
|
|
|
\brief Convenience method to add an \c uint32 to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_UINT32_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindUInt32()
|
|
|
|
\see GetUInt32()
|
|
|
|
\see ReplaceUInt32()
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddInt64(const char* name, int64 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add an \c int64 to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_INT64_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindInt64()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetInt64()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceInt64()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddUInt64(const char* name, uint64 value)
|
|
|
|
\brief Convenience method to add an \c uint64 to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_UINT64_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param value The value to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindUInt64()
|
|
|
|
\see GetUInt64()
|
|
|
|
\see ReplaceUInt64()
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddBool(const char* name, bool aBoolean)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a \c bool to the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method calls AddData() with the \c B_BOOL_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aBoolean The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindBool()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetBool()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceBool()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddFloat(const char* name, float aFloat)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a \c float to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_FLOAT_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aFloat The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindFloat()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetFloat()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceFloat()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddDouble(const char* name, double aDouble)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a \c double to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_DOUBLE_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aDouble The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindDouble()
|
2013-03-19 04:02:05 +04:00
|
|
|
\see GetDouble()
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceDouble()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddColor(const char* name, rgb_color aColor)
|
|
|
|
\brief Convenience method to add a \c rgb_color to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_RGB_32_BIT_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aColor The value to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddColor() for a more detailed overview of the inner workings.
|
|
|
|
\see FindColor()
|
|
|
|
\see GetColor()
|
|
|
|
\see ReplaceColor()
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddPointer(const char* name, const void* aPointer)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a \c pointer to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_POINTER_TYPE \a type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\warning If you want to share objects between applications, remember
|
2014-06-12 00:25:57 +04:00
|
|
|
that each application has its own address space, and that it
|
|
|
|
therefore is useless to try to pass around objects by sending
|
|
|
|
pointers in messages. You should think about copying the
|
|
|
|
entire object in the message, or you should consider using
|
|
|
|
shared memory.
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param aPointer The value to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindPointer()
|
|
|
|
\see ReplacePointer()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddMessenger(const char* name, BMessenger messenger)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a messenger to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_MESSENGER_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param messenger The messenger to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindMessenger()
|
|
|
|
\see ReplaceMessenger()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddRef(const char* name, const entry_ref* ref)
|
2020-09-09 05:06:24 +03:00
|
|
|
\brief Convenience method to add an \c entry_ref to the label \a name.
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
This method calls AddData() with the \c B_REF_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param ref The reference to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindRef()
|
|
|
|
\see ReplaceRef()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-08-30 04:39:38 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddNodeRef(const char* name, const node_ref* ref)
|
|
|
|
\brief Convenience method to add a \c node_ref with the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_NODE_REF_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param ref The node reference to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindNodeRef()
|
|
|
|
\see ReplaceNodeRef()
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddMessage(const char* name,
|
|
|
|
const BMessage* message)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Convenience method to add a message to the label \a name.
|
|
|
|
|
|
|
|
This method calls AddData() with the \c B_MESSAGE_TYPE \a type.
|
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param message The message to store in this message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindMessage()
|
|
|
|
\see ReplaceMessage()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::AddFlat(const char* name, BFlattenable* object,
|
2007-10-15 15:49:54 +04:00
|
|
|
int32 count = 1)
|
|
|
|
\brief Convenience method to add a flattenable to the label \a name.
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\deprecated This method is deprecated. Use
|
|
|
|
AddFlat(const char*, const BFlattenable*, int32) instead
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::AddFlat(const char* name,
|
|
|
|
const BFlattenable* object, int32 count = 1)
|
|
|
|
\brief Convenience method to add a flattenable to the label \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This method uses BFlattenable::TypeCode() to determine the type. It also
|
|
|
|
uses BFlattenable::IsFixedSize() to determine whether or not the size of
|
2011-08-10 01:46:13 +04:00
|
|
|
the object is supposedly always the same. You can specify a
|
|
|
|
\a count, to pre-allocate more entries if you are going to add
|
|
|
|
more than one of this type.
|
2007-10-15 15:49:54 +04:00
|
|
|
|
|
|
|
\param name The label to associate the data with.
|
|
|
|
\param object The object to flatten into the message.
|
|
|
|
\param count The number of items to pre-allocate associated with this
|
2014-06-12 00:25:57 +04:00
|
|
|
\a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see AddData() for a more detailed overview of the inner workings.
|
|
|
|
\see FindFlat()
|
|
|
|
\see ReplaceFlat()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\since Haiku R1
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::Append(const BMessage& message)
|
|
|
|
\brief Append the data of another \a message to this message.
|
|
|
|
|
|
|
|
This copies all the data of the \a message to this message. If an item
|
|
|
|
already exists with a given name, and the incoming data is of the same
|
|
|
|
type, the new items will be added to that label. If the item exists but
|
|
|
|
has a different type, then the call will fail. This might leave your
|
|
|
|
message in an incomplete state, because data is processed field by field,
|
|
|
|
so it could be that some data was copied succesfully. After encountering an
|
|
|
|
incompatible data type, any data after that field will not be processed.
|
|
|
|
|
|
|
|
\param message The message with the data you want to append. This message
|
|
|
|
will not be modified.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
*/
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Removing Data
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::RemoveData(const char* name, int32 index)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Remove data associated with \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
If this is the only instance of the data, then the entire label will be
|
|
|
|
removed. This means you can recreate it with another type.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The \a name of which the associated data should be cleared.
|
|
|
|
\param index The \a index of the item that should be cleared.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The data has been removed.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_BAD_VALUE The \a index is less than \c 0.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_BAD_INDEX The \a index is out of bounds.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND The \a name does not have any data associated
|
|
|
|
with it.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see RemoveName()
|
|
|
|
\see MakeEmpty()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::RemoveName(const char* name)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Remove all data associated with a \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
This also removes the label, so that you can recreate it with another type,
|
|
|
|
if you want to.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The \a name that refers to the data you want to clear out.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK All the data is removed.
|
|
|
|
\retval B_BAD_VALUE The \a name pointer points to \c NULL.
|
|
|
|
\retval B_NAME_NOT_FOUND The \a name does not exist in this message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see RemoveData()
|
|
|
|
\see MakeEmpty()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::MakeEmpty()
|
|
|
|
\brief Clear all data and metadata in this message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
Everything is cleared out, all labels and all associated data, as well
|
|
|
|
as metadata such as reply info.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
\return This method always returns \c B_OK.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see RemoveData()
|
|
|
|
\see RemoveName()
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Finding Data
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
Look at FindData() for a general introduction to finding data.
|
|
|
|
*/
|
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
/* TODO:
|
2007-10-15 15:49:54 +04:00
|
|
|
Quick overview:
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
<table>
|
|
|
|
<tr><th>Type of data</th><th>Type code</th><th>Method</td></tr>
|
2011-08-10 01:46:13 +04:00
|
|
|
<tr><td>BRect</td><td>\c B_RECT_TYPE</td><td>FindRect()</td></tr>
|
2007-10-15 15:49:54 +04:00
|
|
|
</table>
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindData(const char* name, type_code type,
|
|
|
|
int32 index, const void** data, ssize_t* numBytes) const
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Find \a data that is stored in this message at an
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method matches the label \a name with the \a type you
|
|
|
|
are asking for, and it looks for the data that is stored at a certain
|
|
|
|
\a index number. If all these things match, you will get a pointer
|
|
|
|
to the internal buffer, and the method will put the size of the item in
|
|
|
|
\a numBytes.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
Note that only this method, and FindString(const char*, const char**),
|
2007-10-15 15:49:54 +04:00
|
|
|
pass a pointer to the internal buffer. The other more specific methods,
|
|
|
|
such as FindBool() and FindRect() copy the data into a buffer you specify.
|
|
|
|
This means that the data retrieved with this method is valid until the
|
|
|
|
message is deleted.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label the data should be associated with.
|
2016-04-27 21:02:23 +03:00
|
|
|
\param type The type of data you want to retrieve. You can pass
|
2014-06-12 00:25:57 +04:00
|
|
|
\c B_ANY_TYPE if you don't mind which type the data is.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array of the data that you want to retrieve.
|
2014-06-12 00:25:57 +04:00
|
|
|
Note that the array is zero-based.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param[out] data A pointer to a pointer where the data can point to.
|
|
|
|
\param[out] numBytes The size of the data will be put in this parameter.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2011-08-10 01:46:13 +04:00
|
|
|
\retval B_OK The \a name was found, matches the type, and the data
|
2013-03-19 04:02:05 +04:00
|
|
|
at \a index has been put in \a data.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_BAD_VALUE One of the output arguments were \c NULL.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see status_t FindData(const char*, type_code, int32,
|
|
|
|
const void**, ssize_t*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindData(const char* name, type_code type,
|
|
|
|
const void** data, ssize_t* numBytes) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find \a data that is stored in this message.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindData(const char*, type_code, int32, const void**, ssize_t*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where data is sought at \a index \c 0.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindAlignment(const char* name,
|
|
|
|
BAlignment* alignment) const
|
|
|
|
\brief Find an alignment at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindAlignment(const char*, int32, BAlignment*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindAlignment(const char* name, int32 index,
|
|
|
|
BAlignment* alignment) const
|
|
|
|
\brief Find an alignment at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_ALIGNMENT_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param alignment The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindAlignment(const char*, BAlignment*) const
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindRect(const char* name, BRect* rect) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a rectangle at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindRect(const char*, int32, BRect*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindRect(const char* name, int32 index,
|
|
|
|
BRect* rect) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a rectangle at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_RECT_TYPE, and copies it into
|
2007-10-15 15:49:54 +04:00
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param rect The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindRect(const char*, BRect*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindPoint(const char* name, BPoint* point) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a point at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindPoint(const char*, int32, BPoint*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindPoint(const char* name, int32 index,
|
|
|
|
BPoint* point) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a point at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_POINT_TYPE, and copies it into
|
2007-10-15 15:49:54 +04:00
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param point The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindPoint(const char*, BPoint*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindSize(const char* name, BSize* size) const
|
|
|
|
\brief Find a size at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindSize(const char*, int32, BSize*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindSize(const char* name, int32 index,
|
|
|
|
BSize* size) const
|
|
|
|
\brief Find a size at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_SIZE_TYPE, and copies it into
|
|
|
|
a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param size The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindSize(const char*, BSize*) const
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindString(const char* name,
|
|
|
|
const char** string) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a string at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindString(const char*, int32, const char**) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindString(const char* name, int32 index,
|
|
|
|
const char** string) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a string at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_STRING_TYPE, and returns a
|
2007-10-15 15:49:54 +04:00
|
|
|
pointer to the internal buffer of the message. Note that this pointer is
|
|
|
|
valid, until the message is deleted.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param string The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindString(const char*, const char**) const
|
|
|
|
\see FindString(const char*, int32, BString*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindString(const char* name, BString* string) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a string at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindString(const char*, int32, BString*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R5
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindString(const char* name, int32 index,
|
|
|
|
BString* string) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a string at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_STRING_TYPE, and copies it
|
2007-10-15 15:49:54 +04:00
|
|
|
into the \a string object.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param string The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindString(const char*, BString*) const
|
|
|
|
\see FindString(const char*, int32, const char**) const
|
|
|
|
|
|
|
|
\since BeOS R5
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindStrings(const char* name,
|
|
|
|
BStringList* list) const
|
|
|
|
\brief Find all the strings at the label \a name.
|
|
|
|
|
|
|
|
This method fetches all the strings that are stored at label \a name, and
|
|
|
|
copies all the entries into the \a list.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindInt8(const char* name, int8* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
This is an overloaded version of
|
|
|
|
FindInt8(const char*, int32, int8*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindInt8(const char* name, int32 index,
|
|
|
|
int8* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_INT8_TYPE, and copies it into
|
2007-10-15 15:49:54 +04:00
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindInt8(const char*, int8*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindUInt8(const char* name, uint8* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This is an overloaded version of
|
|
|
|
FindUInt8(const char*, int32, uint8*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindUInt8(const char* name, int32 index,
|
|
|
|
uint8* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This method looks for the data with the \c B_UINT8_TYPE, and copies it into
|
2007-10-15 15:49:54 +04:00
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see FindUInt8(const char*, uint8*) const
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindInt16(const char* name, int16* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This is an overloaded version of FindInt16(const char*, int32, int16*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindInt16(const char* name, int32 index,
|
|
|
|
int16* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This method looks for the data with the \c B_INT16_TYPE, and copies it into
|
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see FindInt16(const char*, int16*) const
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindUInt16(const char* name, uint16* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This is an overloaded version of FindUInt16(const char*, int32, uint16*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindUInt16(const char* name, int32 index,
|
|
|
|
uint16* value) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This method looks for the data with the \c B_UINT16_TYPE, and copies it
|
|
|
|
into a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see FindUInt16(const char*, uint16*) const
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindInt32(const char* name, int32* value) const
|
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2019-09-02 08:57:37 +03:00
|
|
|
FindInt32(const char*, int32, int32*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindInt32(const char* name, int32 index,
|
|
|
|
int32* value) const
|
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This method looks for the data with the \c B_INT32_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see FindInt32(const char*, int32*) const
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindUInt32(const char* name, uint32* value) const
|
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2019-09-02 08:57:37 +03:00
|
|
|
FindUInt32(const char*, int32, uint32*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindUInt32(const char* name, int32 index,
|
|
|
|
uint32* value) const
|
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This method looks for the data with the \c B_UINT32_TYPE, and copies
|
2014-06-12 00:25:57 +04:00
|
|
|
it into a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see FindUInt32(const char*, uint32*) const
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindInt64(const char* name, int64* value) const
|
|
|
|
\brief Find an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2019-09-02 08:57:37 +03:00
|
|
|
FindInt64(const char*, int32, int64*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::FindInt64(const char* name, int32 index,
|
|
|
|
int64* value) const
|
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_INT64_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindInt64(const char*, int64*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindUInt64(const char* name, uint64* value) const
|
|
|
|
\brief Find an integer at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindUInt64(const char*, int32, uint64*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindUInt64(const char* name, int32 index,
|
|
|
|
uint64* value) const
|
|
|
|
\brief Find an integer at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_UINT64_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindUInt64(const char*, uint64*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindBool(const char* name, bool* value) const
|
|
|
|
\brief Find a boolean at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindBool(const char*, int32, bool*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindBool(const char* name, int32 index,
|
|
|
|
bool* value) const
|
|
|
|
\brief Find a boolean at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_BOOL_TYPE, and copies it into
|
|
|
|
a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindBool(const char*, bool*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindFloat(const char* name, float* value) const
|
|
|
|
\brief Find a float at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindFloat(const char*, int32, float*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindFloat(const char* name, int32 index,
|
|
|
|
float* value) const
|
|
|
|
\brief Find a float at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_FLOAT_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindFloat(const char*, float*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindDouble(const char* name, double* value) const
|
|
|
|
\brief Find a double at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindDouble(const char*, int32, double*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindDouble(const char* name, int32 index,
|
|
|
|
double* value) const
|
|
|
|
\brief Find a double at the label \a name at an \a index.
|
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_DOUBLE_TYPE, and copies it into
|
2007-10-15 15:49:54 +04:00
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindDouble(const char*, double*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
/*!
|
2016-04-27 21:02:23 +03:00
|
|
|
\fn status_t BMessage::FindColor(const char* name, rgb_color* value) const
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
\brief Find a color with the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindColor(const char*, int32, rgb_color*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindColor(const char* name, int32 index,
|
|
|
|
rgb_color* value) const
|
|
|
|
\brief Find a color at the label \a name at an \a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_RGB_32_BIT_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param value The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindColor(const char*, rgb_color*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindPointer(const char* name, void** pointer) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a pointer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindPointer(const char*, int32, void*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param pointer The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindPointer(const char* name, int32 index,
|
|
|
|
void** pointer) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a pointer at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
This method looks for the data with the \c B_POINTER_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\warning If you want to share objects between applications, remember
|
2014-06-12 00:25:57 +04:00
|
|
|
that each application has its own address space, and that it
|
|
|
|
therefore is useless to try to pass around objects by sending
|
|
|
|
pointers in messages. You should think about copying the entire
|
|
|
|
object in the message, or you should consider using shared memory.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param pointer The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
\see FindPointer(const char*, void*) const
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindMessenger(const char* name,
|
|
|
|
BMessenger* messenger) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a messenger at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindMessenger(const char*, int32, BMessenger*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param messenger The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindMessenger(const char* name, int32 index,
|
|
|
|
BMessenger* messenger) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a messenger at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_MESSENGER_TYPE, and copies it
|
|
|
|
into a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param messenger The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindMessenger(const char*, BMessenger*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindRef(const char* name, entry_ref* ref) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a reference to a file at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindRef(const char*, int32, entry_ref*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param ref The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindRef(const char* name, int32 index,
|
|
|
|
entry_ref* ref) const
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Find a reference to a file at the label \a name at an
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method looks for the data with the \c B_REF_TYPE, and copies it into
|
2007-10-15 15:49:54 +04:00
|
|
|
a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param ref The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindRef(const char*, entry_ref*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-08-30 04:39:38 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindNodeRef(const char* name, node_ref* ref) const
|
|
|
|
\brief Find a reference to a node at the label \a name.
|
|
|
|
|
|
|
|
This is an overloaded version of
|
|
|
|
FindNodeRef(const char*, int32, node_ref*) const
|
|
|
|
where the data is sought at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param ref The object into which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::FindNodeRef(const char* name, int32 index,
|
|
|
|
node_ref* ref) const
|
|
|
|
\brief Find a reference to a node at the label \a name at an
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
This method looks for the data with the \c B_NODE_REF_TYPE, and copies
|
|
|
|
it into a provided buffer.
|
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param ref The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see FindNodeRef(const char*, node_ref*) const
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindMessage(const char* name,
|
|
|
|
BMessage* message) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a message at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindMessage(const char*, int32, BMessage*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param message The object in which the data should be copied.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindMessage(const char* name, int32 index,
|
|
|
|
BMessage* message) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a message at the label \a name at an \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
This method looks for the data with the \c B_MESSAGE_TYPE, and
|
|
|
|
copies it into a provided buffer.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be copied.
|
|
|
|
\param message The object in which the data should be copied.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindMessage(const char*, BMessage*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindFlat(const char* name,
|
|
|
|
BFlattenable* object) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Find a flattened object at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
This is an overloaded version of
|
2014-06-12 00:25:57 +04:00
|
|
|
FindFlat(const char*, int32, BFlattenable*) const
|
2011-08-10 01:46:13 +04:00
|
|
|
where the data is sought at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param object The object in which the data should be unflattened.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::FindFlat(const char* name, int32 index,
|
|
|
|
BFlattenable* object) const
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Find a flattened object at the label \a name at an
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
The type is determined by the type of the passed object. If that type is
|
|
|
|
available at the specified label, then the Unflatten() method of that
|
2013-03-19 04:02:05 +04:00
|
|
|
object will be called.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The label to which the data is associated.
|
|
|
|
\param index The index from which the data should be unflattened.
|
|
|
|
\param object The object in which the data should be unflattened.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_BAD_INDEX The \a index does not exist.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see FindFlat(const char*, BFlattenable*) const
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Replacing Data
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
Look at ReplaceData() for a general introduction to replacing data.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceData(const char* name, type_code type,
|
|
|
|
const void* data, ssize_t numBytes)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace the data at label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method that replaces the data at
|
|
|
|
\a index \c 0. See
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceData(const char*, type_code, int32, const void*, ssize_t).
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param type The type of the data.
|
2014-06-12 00:25:57 +04:00
|
|
|
\param data A pointer to the new data that needs to be copied into
|
|
|
|
the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
\param numBytes The size of the new data.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceData(const char* name, type_code type,
|
|
|
|
int32 index, const void* data, ssize_t numBytes)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace the data at label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
The conditions for replacing data are that the\a name is correct,
|
2014-06-12 00:25:57 +04:00
|
|
|
the \a type matches and the data entry at \a index exists.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
There is also a collection of convenience methods, that allow you to
|
|
|
|
efficiently replace rectanges (ReplaceRect()), booleans (ReplaceBool()),
|
|
|
|
and so on.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param type The type of the data.
|
|
|
|
\param index The index in the array to replace.
|
2014-06-12 00:25:57 +04:00
|
|
|
\param data A pointer to the new data that needs to be copied into
|
|
|
|
the message.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param numBytes The size of the new data.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_VALUE One of the input parameters are invalid. Check that
|
2014-06-12 00:25:57 +04:00
|
|
|
you did not pass \c NULL, and in case the field has fixed sized
|
|
|
|
data, check that \a numBytes is the same as the specified fixed
|
|
|
|
size.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_BAD_INDEX The \a index is out of range.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceAlignment(const char* name,
|
|
|
|
const BAlignment& alignment)
|
|
|
|
\brief Replace an alignment at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceAlignment(const char*, int32, const BAlignment&).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param alignment The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceAlignment(const char* name, int32 index,
|
|
|
|
const BAlignment& alignment)
|
|
|
|
\brief Replace an alignment at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_ALIGNMENT_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param alignment The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceAlignment(const char*, const BAlignment&)
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceRect(const char* name, BRect aRect)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a rectangle at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceRect(const char*, int32, BRect).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aRect The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceRect(const char* name, int32 index,
|
|
|
|
BRect aRect)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a rectangle at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_RECT_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aRect The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceRect(const char*, BRect)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplacePoint(const char* name, BPoint aPoint)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a point at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplacePoint(const char*, int32, BPoint).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aPoint The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplacePoint(const char* name, int32 index,
|
|
|
|
BPoint aPoint)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a point at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_POINT_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aPoint The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see ReplacePoint(const char*, BPoint)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceSize(const char* name, BSize aSize)
|
|
|
|
\brief Replace a size at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceSize(const char*, int32, BSize).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aSize The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The object now contains the requested data.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceSize(const char* name, int32 index,
|
|
|
|
BSize aSize)
|
|
|
|
\brief Replace a size at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_SIZE_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aSize The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceSize(const char*, BSize)
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceString(const char* name, const char* aString)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a string at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceString(const char*, int32, const char*).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aString The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceString(const char* name, int32 index,
|
|
|
|
const char* aString)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a string at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
The data at the specified \a name and \a index will be
|
|
|
|
replaced, if it matches the \c B_STRING_TYPE.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aString The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see ReplaceString(const char*, const char*)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceString(const char* name,
|
|
|
|
const BString& aString)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a string at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceString(const char*, int32, BString&).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aString The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R5
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceString(const char* name, int32 index,
|
|
|
|
const BString& aString)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a string at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_STRING_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aString The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see ReplaceString(const char*, BString&)
|
|
|
|
|
|
|
|
\since BeOS R5
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceInt8(const char* name, int8 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceInt8(const char*, int32, int8).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceInt8(const char* name, int32 index,
|
|
|
|
int8 value)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace an integer at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_INT8_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2013-03-19 04:02:05 +04:00
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceInt8(const char*, int8)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::ReplaceUInt8(const char* name, uint8 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2019-09-02 08:57:37 +03:00
|
|
|
ReplaceUInt8(const char*, int32, uint8).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::ReplaceUInt8(const char* name, int32 index,
|
|
|
|
uint8 value)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace an integer at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
2019-09-02 08:57:37 +03:00
|
|
|
matches the \c B_UINT8_TYPE.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2013-03-19 04:02:05 +04:00
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see ReplaceUInt8(const char*, uint8)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::ReplaceInt16(const char* name, int16 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2019-09-02 08:57:37 +03:00
|
|
|
ReplaceInt16(const char*, int32, int16).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::ReplaceInt16(const char* name, int32 index,
|
|
|
|
int16 value)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace an integer at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
2019-09-02 08:57:37 +03:00
|
|
|
matches the \c B_INT16_TYPE.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2019-09-02 08:57:37 +03:00
|
|
|
\param value Where to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\see ReplaceInt16(const char*, int16)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::ReplaceUInt16(const char* name, uint16 value)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace an integer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2019-09-02 08:57:37 +03:00
|
|
|
ReplaceUInt16(const char*, int32, uint16).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn status_t BMessage::ReplaceUInt16(const char* name, int32 index,
|
|
|
|
uint16 value)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace an integer at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
2019-09-02 08:57:37 +03:00
|
|
|
matches the \c B_UINT16_TYPE.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2019-09-02 08:57:37 +03:00
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceUInt16(const char*, uint16)
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceInt32(const char* name, int32 value)
|
|
|
|
\brief Replace an integer at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceInt32(const char*, int32, int32).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceInt32(const char* name, int32 index,
|
|
|
|
int32 value)
|
|
|
|
\brief Replace an integer at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_INT32_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param value The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceInt32(const char*, int32)
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceUInt32(const char* name, uint32 value)
|
|
|
|
\brief Replace an integer at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceUInt32(const char*, int32, uint32).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceUInt32(const char* name, int32 index,
|
|
|
|
uint32 value)
|
|
|
|
\brief Replace an integer at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_UINT32_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param value The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceUInt32(const char*, uint32)
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceInt64(const char* name, int64 value)
|
|
|
|
\brief Replace an integer at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceInt64(const char*, int32, int64).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceInt64(const char* name, int32 index,
|
|
|
|
int64 value)
|
|
|
|
\brief Replace an integer at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_INT64_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param value The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceInt64(const char*, int64)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceUInt64(const char* name, uint64 value)
|
|
|
|
\brief Replace an integer at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceUInt64(const char*, int32, uint64).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param value Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceUInt64(const char* name, int32 index,
|
|
|
|
uint64 value)
|
|
|
|
\brief Replace an integer at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_UINT64_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param value The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceUInt64(const char*, uint64)
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceBool(const char* name, bool aBoolean)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a boolean at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceBool(const char*, int32, bool).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aBoolean Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceBool(const char* name, int32 index,
|
|
|
|
bool aBoolean)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a boolean at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_BOOL_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2013-03-19 04:02:05 +04:00
|
|
|
\param aBoolean Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceBool(const char*, bool)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R5
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceFloat(const char* name, float aFloat)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a float at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceFloat(const char*, int32, float).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aFloat The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceFloat(const char* name, int32 index,
|
|
|
|
float aFloat)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a float at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_FLOAT_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aFloat The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceFloat(const char*, float)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceDouble(const char* name, double aDouble)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a double at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceDouble(const char*, int32, double).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aDouble Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceDouble(const char* name, int32 index,
|
|
|
|
double aDouble)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a double at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_DOUBLE_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2013-03-19 04:02:05 +04:00
|
|
|
\param aDouble Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceDouble(const char*, double)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
/*!
|
2016-04-27 21:02:23 +03:00
|
|
|
\fn status_t BMessage::ReplaceColor(const char* name, rgb_color aColor)
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
\brief Replace a color at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceColor(const char*, int32, rgb_color).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param aColor Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceColor(const char* name, int32 index,
|
|
|
|
rgb_color aColor)
|
|
|
|
\brief Replace a rgb_color at the label \a name at a specified
|
|
|
|
\a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_RGB_32_BIT_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param aColor Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceColor(const char*, rgb_color)
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplacePointer(const char* name,
|
|
|
|
const void* pointer)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a pointer at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplacePointer(const char*, int32, const void*).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param pointer Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplacePointer(const char* name, int32 index,
|
|
|
|
const void* pointer)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a pointer at the label \a name at a specified \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_POINTER_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
2013-03-19 04:02:05 +04:00
|
|
|
\param pointer Where to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see ReplacePointer(const char*, const void*)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceMessenger(const char* name,
|
|
|
|
BMessenger messenger)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a messenger at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceMessenger(const char*, int32, BMessenger).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param messenger The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceMessenger(const char* name, int32 index,
|
|
|
|
BMessenger messenger)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a messenger at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_MESSENGER_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param messenger The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
\see ReplaceMessenger(const char*, BMessenger)
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceRef(const char* name, const entry_ref* ref)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a reference to a file at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceRef(const char*, int32, entry_ref*).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param ref The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceRef(const char* name, int32 index,
|
|
|
|
const entry_ref* ref)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a reference to a file at the label \a name at a
|
|
|
|
specified \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_REF_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param ref The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see ReplaceRef(const char*, entry_ref*)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-08-30 04:39:38 +03:00
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceNodeRef(const char* name,
|
|
|
|
const node_ref* ref)
|
|
|
|
\brief Replace a reference to a node at the label \a name.
|
|
|
|
|
|
|
|
This method is an overloaded method of
|
|
|
|
ReplaceNodeRef(const char*, int32, node_ref*).
|
|
|
|
It replaces the data at \a index \c 0.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param ref The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::ReplaceNodeRef(const char* name, int32 index,
|
|
|
|
const node_ref* ref)
|
|
|
|
\brief Replace a reference to a node at the label \a name at a
|
|
|
|
specified \a index.
|
|
|
|
|
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_NODE_REF_TYPE.
|
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param ref The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
|
|
|
\see ReplaceNodeRef(const char*, node_ref*)
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceMessage(const char* name,
|
|
|
|
const BMessage* message)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a message at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceMessage(const char*, int32, BMessage*).
|
2011-08-10 01:46:13 +04:00
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param message The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceMessage(const char* name, int32 index,
|
|
|
|
const BMessage* message)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a message at the label \a name at a specified
|
2014-06-12 00:25:57 +04:00
|
|
|
\a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
The data at the specified \a name and \a index will be replaced, if it
|
|
|
|
matches the \c B_MESSAGE_TYPE.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param message The object to store in the message.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see ReplaceMessage(const char*, BMessage*)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceFlat(const char* name, BFlattenable* object)
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Replace a flattened object at the label \a name.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
This method is an overloaded method of
|
2014-06-12 00:25:57 +04:00
|
|
|
ReplaceFlat(const char*, int32, BFlattenable*).
|
2011-08-10 01:46:13 +04:00
|
|
|
|
|
|
|
It replaces the data at \a index \c 0.
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
\param name The name associated with the data to replace.
|
|
|
|
\param object The object to store in the message.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn status_t BMessage::ReplaceFlat(const char* name, int32 index,
|
|
|
|
BFlattenable* object)
|
2011-08-10 01:46:13 +04:00
|
|
|
\brief Replace a flattened object at the label \a name at a
|
2014-06-12 00:25:57 +04:00
|
|
|
specified \a index.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2011-08-10 01:46:13 +04:00
|
|
|
The data at the specified \a name and \a index will be
|
|
|
|
replaced, if it matches the type returned by your object. This method uses
|
2007-10-15 15:49:54 +04:00
|
|
|
BFlattenable::TypeCode() to determine the type of the object.
|
2013-02-07 06:05:00 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\param name The name associated with the data to replace.
|
2007-10-15 15:49:54 +04:00
|
|
|
\param index The index in the array to replace.
|
|
|
|
\param object The object to store in the message.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
\returns A status code, \c B_OK on success or an error code.
|
2007-10-15 15:49:54 +04:00
|
|
|
\retval B_OK The operation succeeded.
|
|
|
|
\retval B_BAD_INDEX The index was out of range.
|
2013-03-19 04:02:05 +04:00
|
|
|
\retval B_NAME_NOT_FOUND There is no field with this \a name.
|
2011-08-10 01:46:13 +04:00
|
|
|
|
2014-06-12 00:25:57 +04:00
|
|
|
\see ReplaceFlat(const char*, BFlattenable*)
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\name Message comparison
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasSameData(const BMessage& other,
|
|
|
|
bool ignoreFieldOrder = true, bool deep = false) const
|
|
|
|
\brief Experimental method to compare two messages
|
2014-06-12 00:25:57 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
This helper method will compare the data of this message to another
|
|
|
|
message. The name if the fields, and the contents of the fields are
|
|
|
|
compared. Metadata (like the delivery status) and the BMessage::what
|
|
|
|
field are not compared.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
The order of the fields is determined by the order that the fields are
|
|
|
|
added. You may use the \a ignoreFieldOrder argument to tweak whether you
|
|
|
|
care that not only the data is identical, but also the ordering of the
|
|
|
|
data.
|
|
|
|
|
|
|
|
When there are BMessages attached to this message, you might want to use
|
|
|
|
this algorithm to compare them as well (as to ignore non-data fields of the
|
|
|
|
\a other message or the ordering of fields during the comparison). Setting
|
|
|
|
the \a deep parameter will cause any data of the \c B_MESSAGE_TYPE to be
|
|
|
|
compared using this method, thus ignoring non-data differences. If you set
|
|
|
|
\a deep to \c false, the data will be compared on a byte by byte basis and
|
|
|
|
these differences in the non-data fields will not be ignored.
|
|
|
|
|
|
|
|
\param other The other message to compare to.
|
|
|
|
\param ignoreFieldOrder Whether you want to see if the field order is the
|
|
|
|
same.
|
|
|
|
\param deep Whether you want to recursively inspect BMessages embedded in
|
|
|
|
this message.
|
|
|
|
|
|
|
|
\returns \c true if the data is the same, \c false otherwise
|
|
|
|
|
|
|
|
\since Haiku R1
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\name Deprecated Methods
|
|
|
|
|
|
|
|
These methods are likely to disappear as they have been replaced by safer
|
|
|
|
and more powerful methods but are implemented for the purpose of binary
|
|
|
|
compatibility.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::HasAlignment(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\since Haiku R1
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasRect(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasPoint(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\since BeOS R3
|
2014-06-12 00:25:57 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn bool BMessage::HasSize(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasString(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2014-06-12 00:25:57 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn bool BMessage::HasInt8(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasUInt8(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasInt16(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasUInt16(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasInt32(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasUInt32(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasInt64(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\fn bool BMessage::HasUInt64(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasBool(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasFloat(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasDouble(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn bool BMessage::HasColor(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasPointer(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasMessenger(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasRef(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2020-08-30 04:39:38 +03:00
|
|
|
/*!
|
|
|
|
\fn bool BMessage::HasNodeRef(const char*, int32) const
|
|
|
|
\brief Deprecated.
|
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since Haiku R1.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasMessage(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasFlat(const char*, const BFlattenable*) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasFlat(const char*, int32, const BFlattenable*) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::HasData(const char*, type_code, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn BRect BMessage::FindRect(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn BPoint BMessage::FindPoint(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn const char* BMessage::FindString(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn int8 BMessage::FindInt8(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn int16 BMessage::FindInt16(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn int32 BMessage::FindInt32(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn int64 BMessage::FindInt64(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn bool BMessage::FindBool(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn float BMessage::FindFloat(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2014-06-12 00:25:57 +04:00
|
|
|
\fn double BMessage::FindDouble(const char*, int32) const
|
2007-10-15 15:49:54 +04:00
|
|
|
\brief Deprecated.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\warning This method is deprecated, do not use.
|
|
|
|
|
|
|
|
\since BeOS R3
|
2007-10-15 15:49:54 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2019-09-02 08:57:37 +03:00
|
|
|
\name Allocation Operators
|
|
|
|
*/
|
2013-03-19 04:02:05 +04:00
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
//! @{
|
2013-03-19 04:02:05 +04:00
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BMessage& BMessage::operator=(const BMessage& other)
|
|
|
|
\brief Copy one message into another.
|
|
|
|
|
|
|
|
See the copy constructor, BMessage(const BMessage& other), for details on
|
|
|
|
what is copied, and what isn't.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn void* BMessage::operator new(size_t size)
|
|
|
|
\brief Allocates \a size bytes of memory for a BMessage.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn void* BMessage::operator new(size_t, void* pointer)
|
|
|
|
\brief Allocates \a size bytes of memory for a BMessage.
|
|
|
|
|
|
|
|
\since BeOS R3
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn void* BMessage::operator new(size_t, const std::nothrow_t&)
|
|
|
|
\brief Allocates \a size bytes of memory for a BMessage.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn void BMessage::operator delete(void* pointer, size_t size)
|
|
|
|
\brief Frees memory allocated by new.
|
|
|
|
|
|
|
|
\since BeOS R5
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @}
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Finding Data Convenience Methods
|
|
|
|
|
|
|
|
These methods may be used as alternatives to the Find data methods above
|
|
|
|
which allow you to specify a default value to use if the value you are
|
|
|
|
looking for is not found and return the result instead of filling out an
|
|
|
|
out parameter and status code. If you are not interested in the status code
|
|
|
|
these methods allow for some code simplification.
|
|
|
|
|
|
|
|
For example, instead of writing:
|
|
|
|
|
|
|
|
\code
|
|
|
|
bool enabled;
|
2013-03-19 04:02:05 +04:00
|
|
|
if (FindBool("enabled", &enabled) != B_OK)
|
|
|
|
enabled = false;
|
|
|
|
\endcode
|
|
|
|
|
|
|
|
you can write the following:
|
|
|
|
|
|
|
|
\code
|
|
|
|
bool enabled = GetBool("enabled", false);
|
|
|
|
\endcode
|
|
|
|
|
|
|
|
reducing the example to a single line.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::GetBool(const char* name, bool defaultValue) const
|
|
|
|
\brief Return the boolean value from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn bool BMessage::GetBool(const char* name, int32 index,
|
|
|
|
bool defaultValue) const
|
|
|
|
\brief Return the boolean value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int8 BMessage::GetInt8(const char* name, int8 defaultValue) const
|
|
|
|
\brief Return the int8 value from message with \a name, or \a defaultValue
|
|
|
|
if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int8 BMessage::GetInt8(const char* name, int32 index,
|
|
|
|
int8 defaultValue) const
|
|
|
|
\brief Return the int8 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint8 BMessage::GetUInt8(const char* name, uint8 defaultValue) const
|
|
|
|
\brief Return the uint8 value from message with \a name, or \a defaultValue
|
|
|
|
if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint8 BMessage::GetUInt8(const char* name, int32 index,
|
|
|
|
uint8 defaultValue) const
|
|
|
|
\brief Return the uint8 message from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int16 BMessage::GetInt16(const char* name, int16 defaultValue) const
|
|
|
|
\brief Return the int16 value from message with \a name, or \a defaultValue
|
|
|
|
if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int16 BMessage::GetInt16(const char* name, int32 index,
|
|
|
|
int16 defaultValue) const
|
|
|
|
\brief Return the int16 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint16 BMessage::GetUInt16(const char* name, uint16 defaultValue) const
|
|
|
|
\brief Return the uint16 value from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint16 BMessage::GetUInt16(const char* name, int32 index,
|
|
|
|
uint16 defaultValue) const
|
|
|
|
\brief Return the uint16 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int32 BMessage::GetInt32(const char* name, int32 defaultValue) const
|
|
|
|
\brief Return the int32 value from message with \a name, or \a defaultValue
|
|
|
|
if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int32 BMessage::GetInt32(const char* name, int32 index,
|
|
|
|
int32 defaultValue) const
|
|
|
|
\brief Return the int32 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint32 BMessage::GetUInt32(const char* name, uint32 defaultValue) const
|
|
|
|
\brief Return the uint32 value from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint32 BMessage::GetUInt32(const char* name, int32 index,
|
|
|
|
uint32 defaultValue) const
|
|
|
|
\brief Return the uint32 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int64 BMessage::GetInt64(const char* name, int64 defaultValue) const
|
|
|
|
\brief Return the int64 value from message with \a name, or \a defaultValue
|
|
|
|
if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn int64 BMessage::GetInt64(const char* name, int32 index,
|
|
|
|
int64 defaultValue) const
|
|
|
|
\brief Return the int64 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint64 BMessage::GetUInt64(const char* name, uint64 defaultValue) const
|
|
|
|
\brief Return the uint64 value from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn uint64 BMessage::GetUInt64(const char* name, int32 index,
|
|
|
|
uint64 defaultValue) const
|
|
|
|
\brief Return the uint64 value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn float BMessage::GetFloat(const char* name, float defaultValue) const
|
|
|
|
\brief Return the float value from message with \a name, or \a defaultValue
|
|
|
|
if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn float BMessage::GetFloat(const char* name, int32 index,
|
|
|
|
float defaultValue) const
|
|
|
|
\brief Return the float value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn double BMessage::GetDouble(const char* name, double defaultValue) const
|
|
|
|
\brief Return the double value from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn double BMessage::GetDouble(const char* name, int32 index,
|
|
|
|
double defaultValue) const
|
|
|
|
\brief Return the double value from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
/*!
|
2020-09-09 05:06:24 +03:00
|
|
|
\fn rgb_color BMessage::GetColor(const char* name,
|
|
|
|
rgb_color defaultValue) const
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
\brief Return the rgb_color value from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn rgb_color BMessage::GetColor(const char* name, int32 index,
|
2016-04-27 21:02:23 +03:00
|
|
|
rgb_color defaultValue) const
|
2020-09-09 05:06:24 +03:00
|
|
|
\brief Return the rgb_color value from message with \a name and \a index,
|
|
|
|
or \a defaultValue if not found.
|
Set*UIColor, etc.
The inseparable changes necessary to support live color updating across the
system in a sane, safe, and performant manner.
BView gains:
HasSystemColors()
HasDefaultColors()
AdoptSystemColors()
AdoptParentColors()
AdoptViewColor(BView*)
SetViewUIColor(color_which, float tint)
SetHighUIColor(...
SetLowUIColor(...
ViewUIColor(float* tint)
HighUIColor(...
LowUIColor(...
DelayedInvalidate()
BWindow gains a simple helper method:
IsOffscreenWindow()
BMessage gains:
AddColor()
FindColor()
GetColor()
HasColor() * allegedly this API is deprecated, but I implemented it anyway
ReplaceColor()
SetColor()
Previous private ColorTools methods are made public and moved into GraphicsDefs:
mix_color, blend_color, disable_color
These are fully compatible with BeOS dan0 R5.1 methods and are just code cleanup
of BeOS example code under the OpenTracker license.
In addition, four new colors are created:
B_LINK_TEXT_COLOR
B_LINK_HOVER_COLOR
B_LINK_ACTIVE_COLOR
B_LINK_VISITED_COLOR
These changes are documented in their proper user documentation files.
In addition, due to a history rewrite, B_FOLLOW_LEFT_TOP has been defined and
used in lieu of B_FOLLOW_TOP | B_FOLLOW_LEFT and is included in this commit.
On the app_server side, the following has changed:
Add DelayedMessage - a system by which messages can be sent at a scheduled time,
and can also be merged according to set rules. A single thread is used to service the
message queue and multiple recipients can be set for each message.
Desktop gains the ability to add message ports to a DelayedMessage so that
said messages can target either all applications or all windows, as needed.
Desktop maintains a BMessage which is used to queue up all pending color changes
and the delayed messaging system is used to enact these changes after a short
period of time has passed. This prevents abuse and allows the system to merge
repeated set_ui_color events into one event for client applications, improving
performance drastically.
In addition, B_COLORS_UPDATED is sent to the BApplication, which forwards the message
to each BWindow. This is done to improve performance over having the app_server
independently informing each window.
Decorator changes are live now, which required some reworking.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2015-12-10 21:52:48 +03:00
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
/*!
|
|
|
|
\fn const void* BMessage::GetPointer(const char* name,
|
|
|
|
const void* defaultValue = NULL) const
|
|
|
|
\brief Return the pointer type from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn rgb_color BMessage::GetPointer(const char* name, int32 index,
|
|
|
|
const void* defaultValue = NULL) const
|
|
|
|
\brief Return the pointer type from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2013-03-19 04:02:05 +04:00
|
|
|
/*!
|
|
|
|
\fn const char* BMessage::GetString(const char* name,
|
|
|
|
const char* defaultValue) const
|
|
|
|
\brief Return the string from message with \a name, or \a defaultValue if
|
|
|
|
not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn const char* BMessage::GetString(const char* name, int32 index,
|
|
|
|
const char* defaultValue) const
|
|
|
|
\brief Return the string from message with \a name and \a index, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BAlignment BMessage::GetAlignment(const char* name,
|
|
|
|
const BAlignment& defaultValue) const
|
|
|
|
\brief Return the BAlignment object from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BAlignment BMessage::GetAlignment(const char* name, int32 index,
|
|
|
|
const BAlignment& defaultValue) const
|
|
|
|
\brief Return the BAlignment object from message with \a name and \a index,
|
|
|
|
or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
2020-09-09 05:06:24 +03:00
|
|
|
\fn BRect BMessage::GetRect(const char* name,
|
|
|
|
const BRect& defaultValue) const
|
2013-03-19 04:02:05 +04:00
|
|
|
\brief Return the BRect object from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BRect BMessage::GetRect(const char* name, int32 index,
|
|
|
|
const BRect& defaultValue) const
|
|
|
|
\brief Return the BRect object from message with \a name and \a index,
|
|
|
|
or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BPoint BMessage::GetPoint(const char* name,
|
|
|
|
const BPoint& defaultValue) const
|
|
|
|
\brief Return the BPoint object from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BPoint BMessage::GetPoint(const char* name, int32 index,
|
|
|
|
const BPoint& defaultValue) const
|
|
|
|
\brief Return the BPoint object from message with \a name and \a index,
|
|
|
|
or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BMessage::GetSize(const char* name,
|
|
|
|
const BSize& defaultValue) const
|
|
|
|
\brief Return the BSize object from message with \a name, or
|
|
|
|
\a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn BSize BMessage::GetSize(const char* name, int32 index,
|
|
|
|
const BSize& defaultValue) const
|
|
|
|
\brief Return the BSize object from message with \a name and \a index,
|
|
|
|
or \a defaultValue if not found.
|
|
|
|
|
|
|
|
\param name The name of the item to retrieve.
|
|
|
|
\param index The index of the item to retrieve if there is more than one.
|
|
|
|
\param defaultValue The value to use if the item specified by \a name
|
|
|
|
is not found.
|
|
|
|
|
|
|
|
\return The item with \a name, or \a defaultValue if not found.
|
2014-06-12 00:25:57 +04:00
|
|
|
|
|
|
|
\since Haiku R1
|
2013-03-19 04:02:05 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2019-09-02 08:57:37 +03:00
|
|
|
//! @}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\name Setting Data Convenience Methods
|
|
|
|
|
|
|
|
These methods may be used as alternatives to the Add data methods above.
|
|
|
|
Using them, will set the data stored at index 0 to the value that you pass
|
|
|
|
to the method. If the data already exists, then it is overwritten.
|
|
|
|
|
|
|
|
For example, calling the SetBool(const char *, bool) method is like calling
|
|
|
|
AddBool(const char*, bool) in case the item does not exist yet, and
|
|
|
|
ReplaceBool(const char*, bool) in case it does.
|
|
|
|
|
|
|
|
Note that this call will fail if there already is data for that label, with
|
|
|
|
a different type. If that might be the case, you will be better of using a
|
|
|
|
combination of RemoveName(const char*) and the Add methods. Also note that
|
|
|
|
this method will always work on the first element of the data (at index 0).
|
|
|
|
In case there are more values stored, the other ones will not be altered.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
//! @{
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetBool(const char* name, bool value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddBool(const char*, bool) in case the item does not
|
|
|
|
exist yet, and ReplaceBool(const char*, bool) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetInt8(const char* name, int8 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddInt8(const char*, int8) in case the item does not
|
|
|
|
exist yet, and ReplaceInt8(const char*, int8) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetUInt8(const char* name, uint8 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddUInt8(const char*, uint8) in case the item does not
|
|
|
|
exist yet, and ReplaceUInt8(const char*, uint8) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetInt16(const char* name, int16 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddInt16(const char*, int16) in case the item does not
|
|
|
|
exist yet, and ReplaceInt16(const char*, int16) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetUInt16(const char* name, uint16 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
2020-09-09 05:06:24 +03:00
|
|
|
This function calls AddUInt16(const char*, uint16) in case the item does
|
|
|
|
not exist yet, and ReplaceUInt16(const char*, uint16) in case it does.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetInt32(const char* name, int32 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddInt32(const char*, int32) in case the item does not
|
|
|
|
exist yet, and ReplaceInt32(const char*, int32) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetUInt32(const char* name, uint32 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddUInt32(const char*, uint32) in case the item does not
|
|
|
|
exist yet, and ReplaceUInt32(const char*, uint32) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetInt64(const char* name, int64 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddInt64(const char*, int64) in case the item does not
|
|
|
|
exist yet, and ReplaceInt64(const char*, int64) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetUInt64(const char* name, uint64 value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
2020-09-09 05:06:24 +03:00
|
|
|
This function calls AddUInt64(const char*, uint64) in case the item does
|
|
|
|
not exist yet, and ReplaceUInt64(const char*, uint64) in case it does.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetColor(const char* name, rgb_color value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
2020-09-09 05:06:24 +03:00
|
|
|
This function calls AddColor(const char*, rgb_color) in case the item does
|
|
|
|
not exist yet, and ReplaceColor(const char*, rgb_color) in case it does.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetPointer(const char* name, const void* value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
2020-09-09 05:06:24 +03:00
|
|
|
This function calls AddPointer(const char*, const void*) in case the item
|
|
|
|
does not exist yet, and ReplacePointer(const char*, const void*) in case
|
|
|
|
it does.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetString(const char* name, const char* string)
|
|
|
|
\brief Set the string with at the label \a name to \a string.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param string The value to set the item to.
|
|
|
|
|
2020-09-09 05:06:24 +03:00
|
|
|
This function calls AddString(const char*, const char*) in case the item
|
|
|
|
does not exist yet, and ReplaceString(const char*, const char*) in case
|
|
|
|
it does.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetString(const char* name, const BString& string)
|
|
|
|
\brief Set the string with at the label \a name to \a string.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param string The value to set the item to.
|
|
|
|
|
2020-09-09 05:06:24 +03:00
|
|
|
This function calls AddString(const char*, const BString&) in case the item
|
|
|
|
does not exist yet, and ReplaceString(const char*, const BString&) in case
|
|
|
|
it does.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetFloat(const char* name, float value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddFloat(const char*, float) in case the item does not
|
|
|
|
exist yet, and ReplaceFloat(const char*, float) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetDouble(const char* name, double value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddDouble(const char*, double) in case the item does not
|
|
|
|
exist yet, and ReplaceDouble(const char*, double) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetAlignment(const char* name,
|
|
|
|
const BAlignment& value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddAlignment(const char*, const BAlignment &) in case
|
|
|
|
the item does not exist yet, and
|
|
|
|
ReplaceAlignment(const char*, const BAlignment &) in case it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetPoint(const char* name, const BPoint& value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddPoint(const char*, const BPoint &) in case the item
|
|
|
|
does not exist yet, and ReplacePoint(const char*, const BPoint &) in case
|
|
|
|
it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetRect(const char* name, const BRrect& value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddRect(const char*, const BRect &) in case the item
|
|
|
|
does not exist yet, and ReplaceRect(const char*, const BRect &) in case
|
|
|
|
it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetSize(const char* name, const BSize& value)
|
|
|
|
\brief Set the data with at the label \a name to \a value.
|
|
|
|
|
|
|
|
\param name The name of the item.
|
|
|
|
\param value The value to set the item to.
|
|
|
|
|
|
|
|
This function calls AddSize(const char*, const BSize &) in case the item
|
|
|
|
does not exist yet, and ReplaceSize(const char*, const BSize &) in case
|
|
|
|
it does.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\fn status_t BMessage::SetData(const char* name, type_code type,
|
|
|
|
const void* data, ssize_t numBytes, bool fixedSize = true,
|
|
|
|
int count = 1)
|
|
|
|
\brief Low level function to set data to a certain value.
|
|
|
|
|
|
|
|
This method is used internally. Use the Set* methods above.
|
|
|
|
|
|
|
|
\returns A status code, \c B_OK in case of success and \c B_BAD_TYPE in
|
2020-09-09 05:06:24 +03:00
|
|
|
case the item already exists with a different data type.
|
2019-09-02 08:57:37 +03:00
|
|
|
|
|
|
|
\since Haiku R1
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2007-10-15 15:49:54 +04:00
|
|
|
//! @}
|