comparison src/video/Xext/extensions/xf86dgastr.h @ 1895:c121d94672cb

SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 10 Jul 2006 21:04:37 +0000
parents 19418e4422cb
children
comparison
equal deleted inserted replaced
1894:c69cee13dd76 1895:c121d94672cb
11 11
12 #include "xf86dga1str.h" 12 #include "xf86dga1str.h"
13 13
14 #define XF86DGANAME "XFree86-DGA" 14 #define XF86DGANAME "XFree86-DGA"
15 15
16 #define XDGA_MAJOR_VERSION 2 /* current version numbers */ 16 #define XDGA_MAJOR_VERSION 2 /* current version numbers */
17 #define XDGA_MINOR_VERSION 0 17 #define XDGA_MINOR_VERSION 0
18 18
19 19
20 typedef struct _XDGAQueryVersion { 20 typedef struct _XDGAQueryVersion
21 CARD8 reqType; /* always DGAReqCode */ 21 {
22 CARD8 dgaReqType; /* always X_DGAQueryVersion */ 22 CARD8 reqType; /* always DGAReqCode */
23 CARD16 length B16; 23 CARD8 dgaReqType; /* always X_DGAQueryVersion */
24 CARD16 length B16;
24 } xXDGAQueryVersionReq; 25 } xXDGAQueryVersionReq;
25 #define sz_xXDGAQueryVersionReq 4 26 #define sz_xXDGAQueryVersionReq 4
26 27
27 typedef struct { 28 typedef struct
28 BYTE type; /* X_Reply */ 29 {
29 BOOL pad1; 30 BYTE type; /* X_Reply */
30 CARD16 sequenceNumber B16; 31 BOOL pad1;
31 CARD32 length B32; 32 CARD16 sequenceNumber B16;
32 CARD16 majorVersion B16; /* major version of DGA protocol */ 33 CARD32 length B32;
33 CARD16 minorVersion B16; /* minor version of DGA protocol */ 34 CARD16 majorVersion B16; /* major version of DGA protocol */
34 CARD32 pad2 B32; 35 CARD16 minorVersion B16; /* minor version of DGA protocol */
35 CARD32 pad3 B32; 36 CARD32 pad2 B32;
36 CARD32 pad4 B32; 37 CARD32 pad3 B32;
37 CARD32 pad5 B32; 38 CARD32 pad4 B32;
38 CARD32 pad6 B32; 39 CARD32 pad5 B32;
40 CARD32 pad6 B32;
39 } xXDGAQueryVersionReply; 41 } xXDGAQueryVersionReply;
40 #define sz_xXDGAQueryVersionReply 32 42 #define sz_xXDGAQueryVersionReply 32
41 43
42 typedef struct _XDGAQueryModes { 44 typedef struct _XDGAQueryModes
43 CARD8 reqType; 45 {
44 CARD8 dgaReqType; 46 CARD8 reqType;
45 CARD16 length B16; 47 CARD8 dgaReqType;
46 CARD32 screen B32; 48 CARD16 length B16;
49 CARD32 screen B32;
47 } xXDGAQueryModesReq; 50 } xXDGAQueryModesReq;
48 #define sz_xXDGAQueryModesReq 8 51 #define sz_xXDGAQueryModesReq 8
49 52
50 typedef struct { 53 typedef struct
51 BYTE type; /* X_Reply */ 54 {
52 BOOL pad1; 55 BYTE type; /* X_Reply */
53 CARD16 sequenceNumber B16; 56 BOOL pad1;
54 CARD32 length B32; 57 CARD16 sequenceNumber B16;
55 CARD32 number B32; /* number of modes available */ 58 CARD32 length B32;
56 CARD32 pad2 B32; 59 CARD32 number B32; /* number of modes available */
57 CARD32 pad3 B32; 60 CARD32 pad2 B32;
58 CARD32 pad4 B32; 61 CARD32 pad3 B32;
59 CARD32 pad5 B32; 62 CARD32 pad4 B32;
60 CARD32 pad6 B32; 63 CARD32 pad5 B32;
64 CARD32 pad6 B32;
61 } xXDGAQueryModesReply; 65 } xXDGAQueryModesReply;
62 #define sz_xXDGAQueryModesReply 32 66 #define sz_xXDGAQueryModesReply 32
63 67
64 68
65 typedef struct _XDGASetMode { 69 typedef struct _XDGASetMode
66 CARD8 reqType; 70 {
67 CARD8 dgaReqType; 71 CARD8 reqType;
68 CARD16 length B16; 72 CARD8 dgaReqType;
69 CARD32 screen B32; 73 CARD16 length B16;
70 CARD32 mode B32; /* mode number to init */ 74 CARD32 screen B32;
71 CARD32 pid B32; /* Pixmap descriptor */ 75 CARD32 mode B32; /* mode number to init */
76 CARD32 pid B32; /* Pixmap descriptor */
72 } xXDGASetModeReq; 77 } xXDGASetModeReq;
73 #define sz_xXDGASetModeReq 16 78 #define sz_xXDGASetModeReq 16
74 79
75 typedef struct { 80 typedef struct
76 BYTE type; /* X_Reply */ 81 {
77 BOOL pad1; 82 BYTE type; /* X_Reply */
78 CARD16 sequenceNumber B16; 83 BOOL pad1;
79 CARD32 length B32; 84 CARD16 sequenceNumber B16;
80 CARD32 offset B32; /* offset into framebuffer map */ 85 CARD32 length B32;
81 CARD32 flags B32; 86 CARD32 offset B32; /* offset into framebuffer map */
82 CARD32 pad2 B32; 87 CARD32 flags B32;
83 CARD32 pad3 B32; 88 CARD32 pad2 B32;
84 CARD32 pad4 B32; 89 CARD32 pad3 B32;
85 CARD32 pad5 B32; 90 CARD32 pad4 B32;
91 CARD32 pad5 B32;
86 } xXDGASetModeReply; 92 } xXDGASetModeReply;
87 #define sz_xXDGASetModeReply 32 93 #define sz_xXDGASetModeReply 32
88 94
89 typedef struct { 95 typedef struct
90 CARD8 byte_order; 96 {
91 CARD8 depth; 97 CARD8 byte_order;
92 CARD16 num B16; 98 CARD8 depth;
93 CARD16 bpp B16; 99 CARD16 num B16;
94 CARD16 name_size B16; 100 CARD16 bpp B16;
95 CARD32 vsync_num B32; 101 CARD16 name_size B16;
96 CARD32 vsync_den B32; 102 CARD32 vsync_num B32;
97 CARD32 flags B32; 103 CARD32 vsync_den B32;
98 CARD16 image_width B16; 104 CARD32 flags B32;
99 CARD16 image_height B16; 105 CARD16 image_width B16;
100 CARD16 pixmap_width B16; 106 CARD16 image_height B16;
101 CARD16 pixmap_height B16; 107 CARD16 pixmap_width B16;
102 CARD32 bytes_per_scanline B32; 108 CARD16 pixmap_height B16;
103 CARD32 red_mask B32; 109 CARD32 bytes_per_scanline B32;
104 CARD32 green_mask B32; 110 CARD32 red_mask B32;
105 CARD32 blue_mask B32; 111 CARD32 green_mask B32;
106 CARD16 visual_class B16; 112 CARD32 blue_mask B32;
107 CARD16 pad1 B16; 113 CARD16 visual_class B16;
108 CARD16 viewport_width B16; 114 CARD16 pad1 B16;
109 CARD16 viewport_height B16; 115 CARD16 viewport_width B16;
110 CARD16 viewport_xstep B16; 116 CARD16 viewport_height B16;
111 CARD16 viewport_ystep B16; 117 CARD16 viewport_xstep B16;
112 CARD16 viewport_xmax B16; 118 CARD16 viewport_ystep B16;
113 CARD16 viewport_ymax B16; 119 CARD16 viewport_xmax B16;
114 CARD32 viewport_flags B32; 120 CARD16 viewport_ymax B16;
115 CARD32 reserved1 B32; 121 CARD32 viewport_flags B32;
116 CARD32 reserved2 B32; 122 CARD32 reserved1 B32;
123 CARD32 reserved2 B32;
117 } xXDGAModeInfo; 124 } xXDGAModeInfo;
118 #define sz_xXDGAModeInfo 72 125 #define sz_xXDGAModeInfo 72
119 126
120 typedef struct _XDGAOpenFramebuffer { 127 typedef struct _XDGAOpenFramebuffer
121 CARD8 reqType; 128 {
122 CARD8 dgaReqType; 129 CARD8 reqType;
123 CARD16 length B16; 130 CARD8 dgaReqType;
124 CARD32 screen B32; 131 CARD16 length B16;
132 CARD32 screen B32;
125 } xXDGAOpenFramebufferReq; 133 } xXDGAOpenFramebufferReq;
126 #define sz_xXDGAOpenFramebufferReq 8 134 #define sz_xXDGAOpenFramebufferReq 8
127 135
128 typedef struct { 136 typedef struct
129 BYTE type; /* X_Reply */ 137 {
130 BOOL pad1; 138 BYTE type; /* X_Reply */
131 CARD16 sequenceNumber B16; 139 BOOL pad1;
132 CARD32 length B32; /* device name size if there is one */ 140 CARD16 sequenceNumber B16;
133 CARD32 mem1 B32; /* physical memory */ 141 CARD32 length B32; /* device name size if there is one */
134 CARD32 mem2 B32; /* spillover for _alpha_ */ 142 CARD32 mem1 B32; /* physical memory */
135 CARD32 size B32; /* size of map in bytes */ 143 CARD32 mem2 B32; /* spillover for _alpha_ */
136 CARD32 offset B32; /* optional offset into device */ 144 CARD32 size B32; /* size of map in bytes */
137 CARD32 extra B32; /* extra info associated with the map */ 145 CARD32 offset B32; /* optional offset into device */
138 CARD32 pad2 B32; 146 CARD32 extra B32; /* extra info associated with the map */
147 CARD32 pad2 B32;
139 } xXDGAOpenFramebufferReply; 148 } xXDGAOpenFramebufferReply;
140 #define sz_xXDGAOpenFramebufferReply 32 149 #define sz_xXDGAOpenFramebufferReply 32
141 150
142 151
143 typedef struct _XDGACloseFramebuffer { 152 typedef struct _XDGACloseFramebuffer
144 CARD8 reqType; 153 {
145 CARD8 dgaReqType; 154 CARD8 reqType;
146 CARD16 length B16; 155 CARD8 dgaReqType;
147 CARD32 screen B32; 156 CARD16 length B16;
157 CARD32 screen B32;
148 } xXDGACloseFramebufferReq; 158 } xXDGACloseFramebufferReq;
149 #define sz_xXDGACloseFramebufferReq 8 159 #define sz_xXDGACloseFramebufferReq 8
150 160
151 161
152 typedef struct _XDGASetViewport { 162 typedef struct _XDGASetViewport
153 CARD8 reqType; 163 {
154 CARD8 dgaReqType; 164 CARD8 reqType;
155 CARD16 length B16; 165 CARD8 dgaReqType;
156 CARD32 screen B32; 166 CARD16 length B16;
157 CARD16 x B16; 167 CARD32 screen B32;
158 CARD16 y B16; 168 CARD16 x B16;
159 CARD32 flags B32; 169 CARD16 y B16;
170 CARD32 flags B32;
160 } xXDGASetViewportReq; 171 } xXDGASetViewportReq;
161 #define sz_xXDGASetViewportReq 16 172 #define sz_xXDGASetViewportReq 16
162 173
163 174
164 typedef struct _XDGAInstallColormap { 175 typedef struct _XDGAInstallColormap
165 CARD8 reqType; 176 {
166 CARD8 dgaReqType; 177 CARD8 reqType;
167 CARD16 length B16; 178 CARD8 dgaReqType;
168 CARD32 screen B32; 179 CARD16 length B16;
169 CARD32 cmap B32; 180 CARD32 screen B32;
181 CARD32 cmap B32;
170 } xXDGAInstallColormapReq; 182 } xXDGAInstallColormapReq;
171 #define sz_xXDGAInstallColormapReq 12 183 #define sz_xXDGAInstallColormapReq 12
172 184
173 typedef struct _XDGASelectInput { 185 typedef struct _XDGASelectInput
174 CARD8 reqType; 186 {
175 CARD8 dgaReqType; 187 CARD8 reqType;
176 CARD16 length B16; 188 CARD8 dgaReqType;
177 CARD32 screen B32; 189 CARD16 length B16;
178 CARD32 mask B32; 190 CARD32 screen B32;
191 CARD32 mask B32;
179 } xXDGASelectInputReq; 192 } xXDGASelectInputReq;
180 #define sz_xXDGASelectInputReq 12 193 #define sz_xXDGASelectInputReq 12
181 194
182 typedef struct _XDGAFillRectangle { 195 typedef struct _XDGAFillRectangle
183 CARD8 reqType; 196 {
184 CARD8 dgaReqType; 197 CARD8 reqType;
185 CARD16 length B16; 198 CARD8 dgaReqType;
186 CARD32 screen B32; 199 CARD16 length B16;
187 CARD16 x B16; 200 CARD32 screen B32;
188 CARD16 y B16; 201 CARD16 x B16;
189 CARD16 width B16; 202 CARD16 y B16;
190 CARD16 height B16; 203 CARD16 width B16;
191 CARD32 color B32; 204 CARD16 height B16;
205 CARD32 color B32;
192 } xXDGAFillRectangleReq; 206 } xXDGAFillRectangleReq;
193 #define sz_xXDGAFillRectangleReq 20 207 #define sz_xXDGAFillRectangleReq 20
194 208
195 209
196 typedef struct _XDGACopyArea { 210 typedef struct _XDGACopyArea
197 CARD8 reqType; 211 {
198 CARD8 dgaReqType; 212 CARD8 reqType;
199 CARD16 length B16; 213 CARD8 dgaReqType;
200 CARD32 screen B32; 214 CARD16 length B16;
201 CARD16 srcx B16; 215 CARD32 screen B32;
202 CARD16 srcy B16; 216 CARD16 srcx B16;
203 CARD16 width B16; 217 CARD16 srcy B16;
204 CARD16 height B16; 218 CARD16 width B16;
205 CARD16 dstx B16; 219 CARD16 height B16;
206 CARD16 dsty B16; 220 CARD16 dstx B16;
221 CARD16 dsty B16;
207 } xXDGACopyAreaReq; 222 } xXDGACopyAreaReq;
208 #define sz_xXDGACopyAreaReq 20 223 #define sz_xXDGACopyAreaReq 20
209 224
210 typedef struct _XDGACopyTransparentArea { 225 typedef struct _XDGACopyTransparentArea
211 CARD8 reqType; 226 {
212 CARD8 dgaReqType; 227 CARD8 reqType;
213 CARD16 length B16; 228 CARD8 dgaReqType;
214 CARD32 screen B32; 229 CARD16 length B16;
215 CARD16 srcx B16; 230 CARD32 screen B32;
216 CARD16 srcy B16; 231 CARD16 srcx B16;
217 CARD16 width B16; 232 CARD16 srcy B16;
218 CARD16 height B16; 233 CARD16 width B16;
219 CARD16 dstx B16; 234 CARD16 height B16;
220 CARD16 dsty B16; 235 CARD16 dstx B16;
221 CARD32 key B32; 236 CARD16 dsty B16;
237 CARD32 key B32;
222 } xXDGACopyTransparentAreaReq; 238 } xXDGACopyTransparentAreaReq;
223 #define sz_xXDGACopyTransparentAreaReq 24 239 #define sz_xXDGACopyTransparentAreaReq 24
224 240
225 241
226 typedef struct _XDGAGetViewportStatus { 242 typedef struct _XDGAGetViewportStatus
227 CARD8 reqType; 243 {
228 CARD8 dgaReqType; 244 CARD8 reqType;
229 CARD16 length B16; 245 CARD8 dgaReqType;
230 CARD32 screen B32; 246 CARD16 length B16;
247 CARD32 screen B32;
231 } xXDGAGetViewportStatusReq; 248 } xXDGAGetViewportStatusReq;
232 #define sz_xXDGAGetViewportStatusReq 8 249 #define sz_xXDGAGetViewportStatusReq 8
233 250
234 typedef struct { 251 typedef struct
235 BYTE type; 252 {
236 BOOL pad1; 253 BYTE type;
237 CARD16 sequenceNumber B16; 254 BOOL pad1;
238 CARD32 length B32; 255 CARD16 sequenceNumber B16;
239 CARD32 status B32; 256 CARD32 length B32;
240 CARD32 pad2 B32; 257 CARD32 status B32;
241 CARD32 pad3 B32; 258 CARD32 pad2 B32;
242 CARD32 pad4 B32; 259 CARD32 pad3 B32;
243 CARD32 pad5 B32; 260 CARD32 pad4 B32;
244 CARD32 pad6 B32; 261 CARD32 pad5 B32;
262 CARD32 pad6 B32;
245 } xXDGAGetViewportStatusReply; 263 } xXDGAGetViewportStatusReply;
246 #define sz_xXDGAGetViewportStatusReply 32 264 #define sz_xXDGAGetViewportStatusReply 32
247 265
248 typedef struct _XDGASync { 266 typedef struct _XDGASync
249 CARD8 reqType; 267 {
250 CARD8 dgaReqType; 268 CARD8 reqType;
251 CARD16 length B16; 269 CARD8 dgaReqType;
252 CARD32 screen B32; 270 CARD16 length B16;
271 CARD32 screen B32;
253 } xXDGASyncReq; 272 } xXDGASyncReq;
254 #define sz_xXDGASyncReq 8 273 #define sz_xXDGASyncReq 8
255 274
256 typedef struct { 275 typedef struct
257 BYTE type; 276 {
258 BOOL pad1; 277 BYTE type;
259 CARD16 sequenceNumber B16; 278 BOOL pad1;
260 CARD32 length B32; 279 CARD16 sequenceNumber B16;
261 CARD32 pad2 B32; 280 CARD32 length B32;
262 CARD32 pad3 B32; 281 CARD32 pad2 B32;
263 CARD32 pad4 B32; 282 CARD32 pad3 B32;
264 CARD32 pad5 B32; 283 CARD32 pad4 B32;
265 CARD32 pad6 B32; 284 CARD32 pad5 B32;
266 CARD32 pad7 B32; 285 CARD32 pad6 B32;
286 CARD32 pad7 B32;
267 } xXDGASyncReply; 287 } xXDGASyncReply;
268 #define sz_xXDGASyncReply 32 288 #define sz_xXDGASyncReply 32
269 289
270 typedef struct _XDGASetClientVersion { 290 typedef struct _XDGASetClientVersion
271 CARD8 reqType; 291 {
272 CARD8 dgaReqType; 292 CARD8 reqType;
273 CARD16 length B16; 293 CARD8 dgaReqType;
274 CARD16 major B16; 294 CARD16 length B16;
275 CARD16 minor B16; 295 CARD16 major B16;
296 CARD16 minor B16;
276 } xXDGASetClientVersionReq; 297 } xXDGASetClientVersionReq;
277 #define sz_xXDGASetClientVersionReq 8 298 #define sz_xXDGASetClientVersionReq 8
278 299
279 300
280 typedef struct { 301 typedef struct
281 CARD8 reqType; 302 {
282 CARD8 dgaReqType; 303 CARD8 reqType;
283 CARD16 length B16; 304 CARD8 dgaReqType;
284 CARD32 screen B32; 305 CARD16 length B16;
285 CARD16 x B16; 306 CARD32 screen B32;
286 CARD16 y B16; 307 CARD16 x B16;
287 CARD32 flags B32; 308 CARD16 y B16;
309 CARD32 flags B32;
288 } xXDGAChangePixmapModeReq; 310 } xXDGAChangePixmapModeReq;
289 #define sz_xXDGAChangePixmapModeReq 16 311 #define sz_xXDGAChangePixmapModeReq 16
290 312
291 typedef struct { 313 typedef struct
292 BYTE type; 314 {
293 BOOL pad1; 315 BYTE type;
294 CARD16 sequenceNumber B16; 316 BOOL pad1;
295 CARD32 length B32; 317 CARD16 sequenceNumber B16;
296 CARD16 x B16; 318 CARD32 length B32;
297 CARD16 y B16; 319 CARD16 x B16;
298 CARD32 pad3 B32; 320 CARD16 y B16;
299 CARD32 pad4 B32; 321 CARD32 pad3 B32;
300 CARD32 pad5 B32; 322 CARD32 pad4 B32;
301 CARD32 pad6 B32; 323 CARD32 pad5 B32;
302 CARD32 pad7 B32; 324 CARD32 pad6 B32;
325 CARD32 pad7 B32;
303 } xXDGAChangePixmapModeReply; 326 } xXDGAChangePixmapModeReply;
304 #define sz_xXDGAChangePixmapModeReply 32 327 #define sz_xXDGAChangePixmapModeReply 32
305 328
306 typedef struct _XDGACreateColormap { 329 typedef struct _XDGACreateColormap
307 CARD8 reqType; 330 {
308 CARD8 dgaReqType; 331 CARD8 reqType;
309 CARD16 length B16; 332 CARD8 dgaReqType;
310 CARD32 screen B32; 333 CARD16 length B16;
311 CARD32 id B32; 334 CARD32 screen B32;
312 CARD32 mode B32; 335 CARD32 id B32;
313 CARD8 alloc; 336 CARD32 mode B32;
314 CARD8 pad1; 337 CARD8 alloc;
315 CARD16 pad2; 338 CARD8 pad1;
339 CARD16 pad2;
316 } xXDGACreateColormapReq; 340 } xXDGACreateColormapReq;
317 #define sz_xXDGACreateColormapReq 20 341 #define sz_xXDGACreateColormapReq 20
318 342
319 343
320 typedef struct { 344 typedef struct
321 union { 345 {
322 struct { 346 union
323 BYTE type; 347 {
324 BYTE detail; 348 struct
325 CARD16 sequenceNumber B16; 349 {
350 BYTE type;
351 BYTE detail;
352 CARD16 sequenceNumber B16;
353 } u;
354 struct
355 {
356 CARD32 pad0 B32;
357 CARD32 time B32;
358 INT16 dx B16;
359 INT16 dy B16;
360 INT16 screen B16;
361 CARD16 state B16;
362 CARD32 pad1 B32;
363 CARD32 pad2 B32;
364 CARD32 pad3 B32;
365 CARD32 pad4 B32;
366 } event;
326 } u; 367 } u;
327 struct {
328 CARD32 pad0 B32;
329 CARD32 time B32;
330 INT16 dx B16;
331 INT16 dy B16;
332 INT16 screen B16;
333 CARD16 state B16;
334 CARD32 pad1 B32;
335 CARD32 pad2 B32;
336 CARD32 pad3 B32;
337 CARD32 pad4 B32;
338 } event;
339 } u;
340 } dgaEvent; 368 } dgaEvent;
341 369
342 370
343 #endif /* _XF86DGASTR_H_ */ 371 #endif /* _XF86DGASTR_H_ */
344 372 /* vi: set ts=4 sw=4 expandtab: */