* reverted Adi's premature changes to BWindow and restored _DetermineTarget() and

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
This commit is contained in:
Axel Dörfler
2005-11-20 16:24:23 +00:00
parent 26e09e5870
commit 4ceb1e519c
29 changed files with 752 additions and 647 deletions
+10 -10
View File
@@ -9,7 +9,10 @@
#ifndef _MESSAGE_H
#define _MESSAGE_H
#define USING_MESSAGE4 1
// this should be defined in your UserBuildConfig only
#ifndef USING_MESSAGE4
# define USING_MESSAGE4 1
#endif
#include <BeBuild.h>
#include <DataIO.h>
@@ -39,8 +42,7 @@ extern "C" int _delete_message_();
#define B_FIELD_NAME_LENGTH 255
#define B_PROPERTY_NAME_LENGTH 255
enum
{
enum {
B_NO_SPECIFIER = 0,
B_DIRECT_SPECIFIER = 1,
B_INDEX_SPECIFIER,
@@ -304,15 +306,13 @@ virtual void _ReservedMessage1();
virtual void _ReservedMessage2();
virtual void _ReservedMessage3();
status_t _SendMessage(port_id port, int32 token, bool preferred,
bigtime_t timeout, bool replyRequired,
BMessenger &replyTo) const;
status_t _SendMessage(port_id port, int32 token, bigtime_t timeout,
bool replyRequired, BMessenger &replyTo) const;
status_t _SendMessage(port_id port, team_id portOwner,
int32 token, bool preferred, BMessage *reply,
bigtime_t sendTimeout, bigtime_t replyTimeout) const;
int32 token, BMessage *reply, bigtime_t sendTimeout,
bigtime_t replyTimeout) const;
static status_t _SendFlattenedMessage(void *data, int32 size,
port_id port, int32 token, bool preferred,
bigtime_t timeout);
port_id port, int32 token, bigtime_t timeout);
static void _StaticInit();
static void _StaticCleanup();