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