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
16class RemoteMessage;
17
18class RemoteEventStream : public EventStream {
19public:
20								RemoteEventStream();
21virtual							~RemoteEventStream();
22
23virtual	bool					IsValid() { return true; }
24virtual	void					SendQuit() {}
25
26virtual	void					UpdateScreenBounds(BRect bounds);
27virtual	bool					GetNextEvent(BMessage** _event);
28virtual	status_t				InsertEvent(BMessage* event);
29virtual	BMessage*				PeekLatestMouseMoved();
30
31		bool					EventReceived(RemoteMessage& message);
32
33private:
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