task_looper() again. * removed BMessenger::fPreferred - whenever you had to specify "usePreferred" separately, you don't have to do that anymore - use B_PREFERRED_TOKEN instead. * fixed BTokenSpace::GetToken() semantics: it will no longer touch the "object" argument in case of failure. * Introduced a BWindow::_DistributeMessage() that will be part of the event dispatcher counterpart to the app_server (the other will be _DetermineTarget()). * Made it easier to use Michael's Message4 implementation: just add the following line to your UserBuildConfig: AppendToConfigVar DEFINES : HAIKU_TOP src : USING_MESSAGE4 : global ; * Introduced ServerWindow::HandlerMessenger() and FocusMessenger() - the first will target the client handler, while the other will target the preferred handler of the client looper (usually the view having focus). * Fixed dano message unflattening in the Message4 code. * Changed BMessage::PrintToStream() to no longer use macros in the Message4 implementation. * I hope that's all - it's a huge change, but it's all connected. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15046 a95241bf-73f2-0310-859d-f6bbb57e9c96
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
#ifndef USING_MESSAGE4
|
|
//------------------------------------------------------------------------------
|
|
// MessageField.cpp
|
|
//
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Standard Includes -----------------------------------------------------------
|
|
|
|
// System Includes -------------------------------------------------------------
|
|
#include <ByteOrder.h>
|
|
|
|
// Project Includes ------------------------------------------------------------
|
|
#include "MessageField.h"
|
|
|
|
// Local Includes --------------------------------------------------------------
|
|
|
|
// Local Defines ---------------------------------------------------------------
|
|
|
|
// Globals ---------------------------------------------------------------------
|
|
|
|
namespace BPrivate {
|
|
|
|
const char* BMessageField::sNullData = "\0\0\0\0\0\0\0\0";
|
|
|
|
//------------------------------------------------------------------------------
|
|
void BMessageField::PrintToStream(const char* name) const
|
|
{
|
|
int32 type = B_BENDIAN_TO_HOST_INT32(Type());
|
|
printf(" entry %14s, type='%.4s', c=%2ld, ",
|
|
name, (char*)&type, CountItems());
|
|
|
|
for (int32 i = 0; i < CountItems(); ++i)
|
|
{
|
|
if (i)
|
|
{
|
|
printf(" ");
|
|
}
|
|
PrintDataItem(i);
|
|
}
|
|
}
|
|
//------------------------------------------------------------------------------
|
|
|
|
} // namespace BPrivate
|
|
|
|
#endif // USING_MESSAGE4
|