xref: /haiku/src/servers/app/DirectWindowInfo.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
1 /*
2  * Copyright 2008-2009, Haiku. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  */
6 #ifndef DIRECT_WINDOW_INFO_H
7 #define DIRECT_WINDOW_INFO_H
8 
9 
10 #include <Autolock.h>
11 #include <DirectWindow.h>
12 
13 #include <DirectWindowPrivate.h>
14 
15 class RenderingBuffer;
16 
17 
18 class DirectWindowInfo {
19 public:
20 								DirectWindowInfo();
21 								~DirectWindowInfo();
22 
23 			status_t			InitCheck() const;
24 
25 			status_t			GetSyncData(
26 									direct_window_sync_data& data) const;
27 
28 			status_t			SetState(direct_buffer_state bufferState,
29 									direct_driver_state driverState,
30 									RenderingBuffer* renderingBuffer,
31 									const BRect& windowFrame,
32 									const BRegion& clipRegion);
33 
34 			void				EnableFullScreen(const BRect& frame,
35 									window_feel feel);
36 			void				DisableFullScreen();
37 
38 			bool				IsFullScreen() const { return fFullScreen; }
39 			const BRect&		OriginalFrame() const { return fOriginalFrame; }
40 			window_feel			OriginalFeel() const { return fOriginalFeel; }
41 
42 private:
43 			status_t			_SyncronizeWithClient();
44 
45 			direct_buffer_info*	fBufferInfo;
46 			sem_id				fSem;
47 			sem_id				fAcknowledgeSem;
48 			area_id				fBufferArea;
49 
50 			BRect				fOriginalFrame;
51 			window_feel			fOriginalFeel;
52 			bool				fFullScreen;
53 };
54 
55 
56 #endif	// DIRECT_WINDOW_INFO_H
57