xref: /haiku/src/servers/app/drawing/BitmapHWInterface.h (revision d3d8b26997fac34a84981e6d2b649521de2cc45a)
1 /*
2  * Copyright 2005, 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(frame_buffer_config& config);
34 
35 	virtual status_t			GetModeList(display_mode **mode_list,
36 									uint32 *count);
37 	virtual status_t			GetPixelClockLimits(display_mode *mode,
38 									uint32 *low, uint32 *high);
39 	virtual status_t			GetTimingConstraints(display_timing_constraints *dtc);
40 	virtual status_t			ProposeMode(display_mode *candidate,
41 									const display_mode *low,
42 									const display_mode *high);
43 
44 	virtual sem_id				RetraceSemaphore();
45 	virtual status_t			WaitForRetrace(bigtime_t timeout = B_INFINITE_TIMEOUT);
46 
47 	virtual status_t			SetDPMSMode(const uint32 &state);
48 	virtual uint32				DPMSMode();
49 	virtual uint32				DPMSCapabilities();
50 
51 	// frame buffer access
52 	virtual	RenderingBuffer*	FrontBuffer() const;
53 	virtual	RenderingBuffer*	BackBuffer() const;
54 	virtual	bool				IsDoubleBuffered() const;
55 
56 private:
57 		BBitmapBuffer*			fBackBuffer;
58 		BitmapBuffer*			fFrontBuffer;
59 };
60 
61 #endif // BITMAP_HW_INTERFACE_H
62