Changeset 22576
- Timestamp:
- 10/15/07 15:56:05 (13 months ago)
- Files:
-
- 1 modified
-
haiku/trunk/docs/user/app/_app_messaging.dox (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
haiku/trunk/docs/user/app/_app_messaging.dox
r22350 r22576 14 14 framework is the basis for the efficient multithreaded Haiku applications, 15 15 because it solves one of the fundamental issues of multithreading: it 16 allows you to easily and securely communicate between threads. But the 17 framework goes even further: it allows inter-application communication! 16 allows you to easily and securely communicate between threads. The 17 framework allows inter-application messaging as well as 18 intra-application messaging, and it will always use the most effective 19 mechanism for the communication automatically. 18 20 19 21 This page will introduce you to the subject of messaging. It is meant as a … … 40 42 keeps track of different sorts of data. BMessage provides many convenient 41 43 Add*() methods, for example BMessage::AddBool(). With the corresponding 42 Find*() method (in this example, FindBook()) you can retrieve the data. 44 Find*() method (in this example, 45 \link BMessage::FindBool(const char *, int32, bool *) const FindBool() \endlink) 46 you can retrieve the data. 43 47 44 48 BMessage itself is generic, its syntax and semantics are determined by the … … 51 55 Objects of the BLooper type are objects that run message loops. Every 52 56 object runs in its own thread. The BLooper objects continually check for 53 incoming messages , and they try to find a BHandler to actually handle the54 messages within their thread context. Message handling within a thread is55 synchronous.57 incoming messages. To process the messages, the looper looks for message 58 handlers that handle the messages within the thread's context. Message 59 handling within a looper is synchronous. 56 60 57 61 BLooper inherits BHandler, the base class for message handling. However, it … … 102 106 the parent class. 103 107 104 \warning Don't forget to actuall call 105 <em>baseclass</em>::MessageReceived(). Failing to do this will mean106 that the message chain will not completely be followed, which can lead107 to unhandled messages. There might be some internal system messages108 that the Haiku API classes handle, and not actually handling these109 messages could lead toinconsistent internal behavior.108 \warning Don't forget to actuall call the MessageReceived() method of the 109 base class. Failing to do this will mean that the message chain will 110 not completely be followed, which can lead to unhandled messages. There 111 might be some internal system messages that the Haiku API classes 112 handle, and not actually handling these messages could lead to 113 inconsistent internal behavior. 110 114 111 115 \subsection app_messaging_overview_bmessenger BMessenger … … 139 143 to BLoopers to filter all incoming messages, or to BHandlers to filter 140 144 messages that could be handled by that object. The filter object can be 141 subclassed and extended by overriding the Filter() method. 145 subclassed and extended by overriding the \link BMessageFilter::Filter() 146 Filter() \endlink method. 142 147 143 148 \section app-messaging-receiving Receiving Messages
