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 #include <AutoDeleter.h> 15 16 class BitmapBuffer; 17 class MallocBuffer; 18 class ServerBitmap; 19 class BBitmapBuffer; 20 21 22 class BitmapHWInterface : public HWInterface { 23 public: 24 BitmapHWInterface(ServerBitmap* bitmap); 25 virtual ~BitmapHWInterface(); 26 27 virtual status_t Initialize(); 28 virtual status_t Shutdown(); 29 30 // overwrite all the meaningless functions with empty code 31 virtual status_t SetMode(const display_mode& mode); 32 virtual void GetMode(display_mode* mode); 33 34 virtual status_t GetDeviceInfo(accelerant_device_info* info); 35 virtual status_t GetFrameBufferConfig( 36 frame_buffer_config& config); 37 38 virtual status_t GetModeList(display_mode** _modeList, 39 uint32* _count); 40 virtual status_t GetPixelClockLimits(display_mode* mode, 41 uint32* _low, uint32* _high); 42 virtual status_t GetTimingConstraints(display_timing_constraints* 43 constraints); 44 virtual status_t ProposeMode(display_mode* candidate, 45 const display_mode* low, 46 const display_mode* high); 47 48 virtual sem_id RetraceSemaphore(); 49 virtual status_t WaitForRetrace( 50 bigtime_t timeout = B_INFINITE_TIMEOUT); 51 52 virtual status_t SetDPMSMode(uint32 state); 53 virtual uint32 DPMSMode(); 54 virtual uint32 DPMSCapabilities(); 55 56 virtual status_t SetBrightness(float); 57 virtual status_t GetBrightness(float*); 58 59 // frame buffer access 60 virtual RenderingBuffer* FrontBuffer() const; 61 virtual RenderingBuffer* BackBuffer() const; 62 virtual bool IsDoubleBuffered() const; 63 64 private: 65 ObjectDeleter<BBitmapBuffer> 66 fBackBuffer; 67 ObjectDeleter<BitmapBuffer> 68 fFrontBuffer; 69 }; 70 71 #endif // BITMAP_HW_INTERFACE_H 72