xref: /haiku/docs/user/graphics/Accelerant.dox (revision ed24eb5ff12640d052171c6a7feba37fab8a75d1)
1/*
2 * Copyright 2019 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		Adam Fowler, adamfowleruk@gmail.com
7 *
8 * Corresponds to:
9 *		headers/os/add-ins/graphics/Accelerant.h	rev 53658
10 */
11
12
13/*!
14	\file Accelerant.h
15	\ingroup graphics
16	\ingroup libbe
17	\brief Defines the structures used by an Accelerant (and \c BScreen).
18*/
19
20/*!
21	\name Display mode structs and constants
22*/
23
24//! @{
25
26/*!
27	\enum display_timing_flags
28	\ingroup graphics
29	\brief Constants for \c display_timing::flags
30
31	\since BeOS R5
32*/
33
34/*!
35	\var display_timing_flags B_BLANK_PEDESTAL
36
37	Specifies the blank pedestal flag.
38
39	\since BeOS R5
40*/
41
42/*!
43	\var display_timing_flags B_TIMING_INTERLACED
44
45	Interlaced mode enabled.
46
47	\since BeOS R5
48*/
49
50/*!
51	\var display_timing_flags B_POSITIVE_HSYNC
52
53	Specifies a positive horizontal sync polarity.
54
55	\since BeOS R5
56*/
57
58/*!
59	\var display_timing_flags B_POSITIVE_VSYNC
60
61	Specifies a positive vertical sync polarity.
62
63	\since BeOS R5
64*/
65
66/*!
67	\var display_timing_flags B_SYNC_ON_GREEN
68
69	Specifies that sync on green is used (sometimes called SOG or RGsB)
70
71	\since BeOS R5
72*/
73
74
75/*!
76	\struct display_timing
77	\brief Provides timing information about a display mode
78			supported by a graphics card.
79
80	This provides information about the display resolution as well as the
81	video timings, allowing to compute the refresh rate in a precise way.
82
83	The timings are specified in term of horizontal and vertical pixels.
84
85	The "display" area corresponds to what's actually visible. But there is
86	some extra delay between two consecutive lines or two consecutive frames,
87	which is taked into account by the "total" values. In that area, there is
88	also the display sycnhronization signals, which start and end at specific
89	pixel numbers as well.
90*/
91
92/*!
93	\var uint32 display_timing::pixel_clock
94
95	Pixel clock in kHz.
96
97	The pixel clock is the frequency at which the display hardware moves from
98	one pixel to the next.
99
100	\since BeOS R5
101*/
102
103/*!
104	\var uint16 display_timing::h_display
105
106	Horizontal display width in pixels.
107
108	\since BeOS R5
109*/
110
111/*!
112	\var uint16 display_timing::h_sync_start
113
114	Horizontal sync start in pixels.
115
116	\since BeOS R5
117*/
118
119/*!
120	\var uint display_timing::h_sync_end
121
122	Horizontal sync end in pixels.
123
124	\since BeOS R5
125*/
126
127/*!
128	\var uint16 display_timing::h_total
129
130	Horizontal total in pixels.
131
132	\since BeOS R5
133*/
134
135/*!
136	\var uint16 display_timing::v_display
137
138	Vertical display height in pixels.
139
140	\since BeOS R5
141*/
142
143/*!
144	\var uint16 display:timing::v_sync_start
145
146	Vertical sync start line.
147
148	\since BeOS R5
149*/
150
151/*!
152	\var uint16 display_timing::v_sync_end
153
154	Vertical sync end line.
155
156	\since BeOS R5
157*/
158
159/*!
160	\var uint16 display_timing::v_total
161
162	Total number of vertical lines.
163
164	\since BeOS R5
165*/
166
167/*!
168	\var uint21 display_timing::flags
169
170	Timing flags, for sync polarity, interlaced, double scan etc.
171
172	\since BeOS R5
173*/
174
175
176/*!
177	\enum  display_mode_flags
178	\ingroup graphics
179	\brief Constants for \c display_mode:flags
180
181	\since BeOS R5
182*/
183
184/*!
185	\var display_mode_flags B_SCROLL
186
187	Specifies scroll supported. Set when the display uses a virtual screen.
188
189	\since BeOS R5
190*/
191
192/*!
193	\var display_mode_flags B_8_BIT_DAC
194
195	Specifies that the DAC is in 8-bit mode.
196
197	\since BeOS R5
198*/
199
200/*!
201	\var display_mode_flags B_HARDWARE_CURSOR
202
203	Specifies that a hardware cursor is supported.
204
205	\since BeOS R5
206*/
207
208/*!
209	\var display_mode_flags B_PARALLEL_ACCESS
210
211	Specifies that parallel access to the framebuffer is allowed.
212
213	\since BeOS R5
214*/
215
216/*!
217	\var display_mode_flags B_DPMS
218
219	Specifies that the Display Power Management System is supported. The screen
220	can be shut down when the computer is idle to save power.
221
222	\since beOS R5
223*/
224
225/*!
226	\var display_mode_flags B_IO_FB_NA
227
228	Indicates that the video framebuffer is not directly mapped into memory.
229	The driver will handle sending the data to the video card, and applications
230	should not try to write directly to the buffer.
231
232	This is used only in legacy modes and hardware where a linear framebuffer
233	isn't available.
234
235	\since BeOS R5
236*/
237
238
239/*!
240	\struct	display_mode
241	\brief Provides information about a display mode supported
242			by a graphics card.
243
244	The display resolution may be set larger than the actual display resolution.
245	In which case, not all pixels are visible at the same time, and scrolling
246	can be used to move around the larger virtual space. This is indicated
247	by the B_SCROLL flag.
248
249	When the virtual and physical resolutions match, B_SCROLL is not set, and
250	both display_start settings must be set to 0.
251*/
252
253/*!
254	\var display_timing display_mode::timing
255
256	The display timing of this mode.
257
258	\since BeOS R5
259*/
260
261/*!
262	\var uint32 display_mode::space
263
264	Color space to use (usually B_CMAP8, B_RGB16, or B_RGB32, but other modes
265	are possible depending on the hardware)
266
267	\since BeOS R5
268*/
269
270/*!
271	\var uint16 display_mode::virtual_width
272
273	Width of this mode in pixels.
274
275	\since BeOS R5
276*/
277
278/*!
279	\var uint16 display_mode::virtual_height
280
281	Height of this mode in pixels.
282
283	\since BeOS R5
284*/
285
286/*!
287	\var uint16 display_mode::h_display_start
288
289	The left position to start displaying from, used for scrolling
290	in the virtual space.
291
292	\since BeOS R5
293*/
294
295/*!
296	\var uint16 display_mode::v_display_start
297
298	The top position to start displaying from, used for scrolling in the virtual
299	space.
300
301	\since BeOS R5
302*/
303
304/*!
305	\var uint32 display_mode::flags
306
307	\brief The flags of this mode.
308
309	Currently no public flags are defined at this level.
310	Some drivers use this for dual head related options.
311	Reserved for future use.
312
313	\since BeOS R5
314*/
315
316// @}
317