xref: /haiku/src/servers/app/drawing/interface/virtual/DWindowBuffer.h (revision 4a55cc230cf7566cadcbb23b1928eefff8aea9a2)
1 #ifndef D_WINDOW_BUFFER_H
2 #define D_WINDOW_BUFFER_H
3 
4 
5 #include "RenderingBuffer.h"
6 
7 #include <Accelerant.h>
8 #include <DirectWindow.h>
9 
10 
11 class DWindowBuffer : public RenderingBuffer {
12 public:
13 								DWindowBuffer();
14 	virtual						~DWindowBuffer();
15 
16 	virtual	status_t			InitCheck() const;
17 
18 	virtual	color_space			ColorSpace() const;
19 	virtual	void*				Bits() const;
20 	virtual	uint32				BytesPerRow() const;
21 	virtual	uint32				Width() const;
22 	virtual	uint32				Height() const;
23 
24 	virtual	bool				IsGraphicsMemory() const { return true; /* TODO! */ }
25 
26 			void				SetTo(direct_buffer_info* info);
27 
28 			void				SetTo(frame_buffer_config* config,
29 									  uint32 x, uint32 y,
30 									  uint32 width, uint32 height,
31 									  color_space format);
32 
33 			BRegion&			WindowClipping()
34 									{ return fWindowClipping; }
35 private:
36 			uint8*				fBits;
37 			uint32				fWidth;
38 			uint32				fHeight;
39 			uint32				fBytesPerRow;
40 			color_space			fFormat;
41 
42 			BRegion				fWindowClipping;
43 };
44 
45 #endif // D_WINDOW_BUFFER_H
46