xref: /haiku/src/servers/app/drawing/interface/remote/RemoteEventStream.h (revision 17889a8c70dbb3d59c1412f6431968753c767bab)
1 /*
2  * Copyright 2009, Haiku, Inc.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Michael Lotz <mmlr@mlotz.ch>
7  */
8 #ifndef REMOTE_EVENT_STREAM_H
9 #define REMOTE_EVENT_STREAM_H
10 
11 #include "EventStream.h"
12 
13 #include <Locker.h>
14 #include <ObjectList.h>
15 
16 class RemoteMessage;
17 
18 class RemoteEventStream : public EventStream {
19 public:
20 								RemoteEventStream();
21 virtual							~RemoteEventStream();
22 
23 virtual	bool					IsValid() { return true; }
24 virtual	void					SendQuit() {}
25 
26 virtual	void					UpdateScreenBounds(BRect bounds);
27 virtual	bool					GetNextEvent(BMessage** _event);
28 virtual	status_t				InsertEvent(BMessage* event);
29 virtual	BMessage*				PeekLatestMouseMoved();
30 
31 		bool					EventReceived(RemoteMessage& message);
32 
33 private:
34 		BObjectList<BMessage>	fEventList;
35 		BLocker					fEventListLocker;
36 		sem_id					fEventNotification;
37 		bool					fWaitingOnEvent;
38 		BMessage*				fLatestMouseMovedEvent;
39 
40 		BPoint					fMousePosition;
41 		uint32					fMouseButtons;
42 		uint32					fModifiers;
43 };
44 
45 #endif // REMOTE_EVENT_STREAM_H
46