2 * Copyright 2007-2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
9 #include <Accelerant.h>
10 #include <GraphicsDefs.h>
25 BScreen(screen_id id
= B_MAIN_SCREEN_ID
);
26 BScreen(BWindow
* window
);
32 color_space
ColorSpace();
36 status_t
WaitForRetrace();
37 status_t
WaitForRetrace(bigtime_t timeout
);
39 uint8
IndexForColor(rgb_color color
);
40 uint8
IndexForColor(uint8 red
, uint8 green
,
41 uint8 blue
, uint8 alpha
= 255);
42 rgb_color
ColorForIndex(uint8 index
);
43 uint8
InvertIndex(uint8 index
);
45 const color_map
* ColorMap();
47 status_t
GetBitmap(BBitmap
** _bitmap
,
48 bool drawCursor
= true,
50 status_t
ReadBitmap(BBitmap
* bitmap
,
51 bool drawCursor
= true,
54 rgb_color
DesktopColor();
55 rgb_color
DesktopColor(uint32 workspace
);
56 void SetDesktopColor(rgb_color color
,
58 void SetDesktopColor(rgb_color color
,
59 uint32 workspace
, bool stick
= true);
61 status_t
ProposeMode(display_mode
* target
,
62 const display_mode
* low
,
63 const display_mode
* high
);
64 status_t
GetModeList(display_mode
** _modeList
,
66 status_t
GetMode(display_mode
* mode
);
67 status_t
GetMode(uint32 workspace
,
69 status_t
SetMode(display_mode
* mode
,
70 bool makeDefault
= false);
71 status_t
SetMode(uint32 workspace
,
73 bool makeDefault
= false);
74 status_t
GetDeviceInfo(accelerant_device_info
* info
);
75 status_t
GetMonitorInfo(monitor_info
* info
);
76 status_t
GetPixelClockLimits(display_mode
* mode
,
77 uint32
* _low
, uint32
* _high
);
78 status_t
GetTimingConstraints(
79 display_timing_constraints
*
81 status_t
SetDPMS(uint32 state
);
83 uint32
DPMSCapabilites();
85 status_t
GetBrightness(float* brightness
);
86 status_t
SetBrightness(float brightness
);
89 // Forbidden and deprecated methods
90 BScreen(const BScreen
& other
);
91 BScreen
& operator=(const BScreen
& other
);
93 BPrivate::BPrivateScreen
* private_screen();
94 status_t
ProposeDisplayMode(display_mode
* target
,
95 const display_mode
* low
,
96 const display_mode
* high
);
101 BPrivate::BPrivateScreen
* fScreen
;
106 BScreen::IndexForColor(rgb_color color
)
108 return IndexForColor(color
.red
, color
.green
, color
.blue
, color
.alpha
);