xref: /haiku/src/servers/app/drawing/BitmapHWInterface.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2005-2009, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Stephan Aßmus <superstippi@gmx.de>
7  */
8 #ifndef BITMAP_HW_INTERFACE_H
9 #define BITMAP_HW_INTERFACE_H
10 
11 
12 #include "HWInterface.h"
13 
14 class BitmapBuffer;
15 class MallocBuffer;
16 class ServerBitmap;
17 class BBitmapBuffer;
18 
19 
20 class BitmapHWInterface : public HWInterface {
21 public:
22 								BitmapHWInterface(ServerBitmap* bitmap);
23 	virtual						~BitmapHWInterface();
24 
25 	virtual	status_t			Initialize();
26 	virtual	status_t			Shutdown();
27 
28 	// overwrite all the meaningless functions with empty code
29 	virtual	status_t			SetMode(const display_mode& mode);
30 	virtual	void				GetMode(display_mode* mode);
31 
32 	virtual status_t			GetDeviceInfo(accelerant_device_info* info);
33 	virtual status_t			GetFrameBufferConfig(
34 									frame_buffer_config& config);
35 
36 	virtual status_t			GetModeList(display_mode** _modeList,
37 									uint32* _count);
38 	virtual status_t			GetPixelClockLimits(display_mode* mode,
39 									uint32* _low, uint32* _high);
40 	virtual status_t			GetTimingConstraints(display_timing_constraints*
41 									constraints);
42 	virtual status_t			ProposeMode(display_mode* candidate,
43 									const display_mode* low,
44 									const display_mode* high);
45 
46 	virtual sem_id				RetraceSemaphore();
47 	virtual status_t			WaitForRetrace(
48 									bigtime_t timeout = B_INFINITE_TIMEOUT);
49 
50 	virtual status_t			SetDPMSMode(uint32 state);
51 	virtual uint32				DPMSMode();
52 	virtual uint32				DPMSCapabilities();
53 
54 	virtual status_t			SetBrightness(float);
55 	virtual status_t			GetBrightness(float*);
56 
57 	// frame buffer access
58 	virtual	RenderingBuffer*	FrontBuffer() const;
59 	virtual	RenderingBuffer*	BackBuffer() const;
60 	virtual	bool				IsDoubleBuffered() const;
61 
62 private:
63 			BBitmapBuffer*		fBackBuffer;
64 			BitmapBuffer*		fFrontBuffer;
65 };
66 
67 #endif // BITMAP_HW_INTERFACE_H
68