VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/1.4/X11/extensions/randrproto.h@ 29743

Last change on this file since 29743 was 17236, checked in by vboxsync, 16 years ago

Additions/x11/x11include: blast! Reverted r43555 and r43556

  • Property svn:eol-style set to native
File size: 15.5 KB
Line 
1/*
2 * Copyright © 2000 Compaq Computer Corporation
3 * Copyright © 2002 Hewlett-Packard Company
4 * Copyright © 2006 Intel Corporation
5 *
6 * Permission to use, copy, modify, distribute, and sell this software and its
7 * documentation for any purpose is hereby granted without fee, provided that
8 * the above copyright notice appear in all copies and that both that copyright
9 * notice and this permission notice appear in supporting documentation, and
10 * that the name of the copyright holders not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. The copyright holders make no representations
13 * about the suitability of this software for any purpose. It is provided "as
14 * is" without express or implied warranty.
15 *
16 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
22 * OF THIS SOFTWARE.
23 *
24 * Author: Jim Gettys, Hewlett-Packard Company, Inc.
25 * Keith Packard, Intel Corporation
26 */
27
28/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */
29/* V1.0 removes depth switching from the protocol */
30#ifndef _XRANDRP_H_
31#define _XRANDRP_H_
32
33#include <X11/extensions/randr.h>
34
35#define Window CARD32
36#define Drawable CARD32
37#define Font CARD32
38#define Pixmap CARD32
39#define Cursor CARD32
40#define Colormap CARD32
41#define GContext CARD32
42#define Atom CARD32
43#define Time CARD32
44#define KeyCode CARD8
45#define KeySym CARD32
46#define RROutput CARD32
47#define RRMode CARD32
48#define RRCrtc CARD32
49#define RRModeFlags CARD32
50
51#define Rotation CARD16
52#define SizeID CARD16
53#define SubpixelOrder CARD16
54
55/*
56 * data structures
57 */
58
59typedef struct {
60 CARD16 widthInPixels B16;
61 CARD16 heightInPixels B16;
62 CARD16 widthInMillimeters B16;
63 CARD16 heightInMillimeters B16;
64} xScreenSizes;
65#define sz_xScreenSizes 8
66
67/*
68 * requests and replies
69 */
70
71typedef struct {
72 CARD8 reqType;
73 CARD8 randrReqType;
74 CARD16 length B16;
75 CARD32 majorVersion B32;
76 CARD32 minorVersion B32;
77} xRRQueryVersionReq;
78#define sz_xRRQueryVersionReq 12
79
80typedef struct {
81 BYTE type; /* X_Reply */
82 BYTE pad1;
83 CARD16 sequenceNumber B16;
84 CARD32 length B32;
85 CARD32 majorVersion B32;
86 CARD32 minorVersion B32;
87 CARD32 pad2 B32;
88 CARD32 pad3 B32;
89 CARD32 pad4 B32;
90 CARD32 pad5 B32;
91} xRRQueryVersionReply;
92#define sz_xRRQueryVersionReply 32
93
94typedef struct {
95 CARD8 reqType;
96 CARD8 randrReqType;
97 CARD16 length B16;
98 Window window B32;
99} xRRGetScreenInfoReq;
100#define sz_xRRGetScreenInfoReq 8
101
102/*
103 * the xRRScreenInfoReply structure is followed by:
104 *
105 * the size information
106 */
107
108
109typedef struct {
110 BYTE type; /* X_Reply */
111 BYTE setOfRotations;
112 CARD16 sequenceNumber B16;
113 CARD32 length B32;
114 Window root B32;
115 Time timestamp B32;
116 Time configTimestamp B32;
117 CARD16 nSizes B16;
118 SizeID sizeID B16;
119 Rotation rotation B16;
120 CARD16 rate B16;
121 CARD16 nrateEnts B16;
122 CARD16 pad B16;
123} xRRGetScreenInfoReply;
124#define sz_xRRGetScreenInfoReply 32
125
126typedef struct {
127 CARD8 reqType;
128 CARD8 randrReqType;
129 CARD16 length B16;
130 Drawable drawable B32;
131 Time timestamp B32;
132 Time configTimestamp B32;
133 SizeID sizeID B16;
134 Rotation rotation B16;
135} xRR1_0SetScreenConfigReq;
136#define sz_xRR1_0SetScreenConfigReq 20
137
138typedef struct {
139 CARD8 reqType;
140 CARD8 randrReqType;
141 CARD16 length B16;
142 Drawable drawable B32;
143 Time timestamp B32;
144 Time configTimestamp B32;
145 SizeID sizeID B16;
146 Rotation rotation B16;
147 CARD16 rate B16;
148 CARD16 pad B16;
149} xRRSetScreenConfigReq;
150#define sz_xRRSetScreenConfigReq 24
151
152typedef struct {
153 BYTE type; /* X_Reply */
154 CARD8 status;
155 CARD16 sequenceNumber B16;
156 CARD32 length B32;
157 Time newTimestamp B32;
158 Time newConfigTimestamp B32;
159 Window root;
160 CARD16 subpixelOrder B16;
161 CARD16 pad4 B16;
162 CARD32 pad5 B32;
163 CARD32 pad6 B32;
164} xRRSetScreenConfigReply;
165#define sz_xRRSetScreenConfigReply 32
166
167typedef struct {
168 CARD8 reqType;
169 CARD8 randrReqType;
170 CARD16 length B16;
171 Window window B32;
172 CARD16 enable B16;
173 CARD16 pad2 B16;
174} xRRSelectInputReq;
175#define sz_xRRSelectInputReq 12
176
177/*
178 * Additions for version 1.2
179 */
180
181typedef struct _xRRModeInfo {
182 RRMode id B32;
183 CARD16 width B16;
184 CARD16 height B16;
185 CARD32 dotClock B32;
186 CARD16 hSyncStart B16;
187 CARD16 hSyncEnd B16;
188 CARD16 hTotal B16;
189 CARD16 hSkew B16;
190 CARD16 vSyncStart B16;
191 CARD16 vSyncEnd B16;
192 CARD16 vTotal B16;
193 CARD16 nameLength B16;
194 RRModeFlags modeFlags B32;
195} xRRModeInfo;
196#define sz_xRRModeInfo 32
197
198typedef struct {
199 CARD8 reqType;
200 CARD8 randrReqType;
201 CARD16 length B16;
202 Window window B32;
203} xRRGetScreenSizeRangeReq;
204#define sz_xRRGetScreenSizeRangeReq 8
205
206typedef struct {
207 BYTE type; /* X_Reply */
208 CARD8 pad;
209 CARD16 sequenceNumber B16;
210 CARD32 length B32;
211 CARD16 minWidth B16;
212 CARD16 minHeight B16;
213 CARD16 maxWidth B16;
214 CARD16 maxHeight B16;
215 CARD32 pad0 B32;
216 CARD32 pad1 B32;
217 CARD32 pad2 B32;
218 CARD32 pad3 B32;
219} xRRGetScreenSizeRangeReply;
220#define sz_xRRGetScreenSizeRangeReply 32
221
222typedef struct {
223 CARD8 reqType;
224 CARD8 randrReqType;
225 CARD16 length B16;
226 Window window B32;
227 CARD16 width B16;
228 CARD16 height B16;
229 CARD32 widthInMillimeters B32;
230 CARD32 heightInMillimeters B32;
231} xRRSetScreenSizeReq;
232#define sz_xRRSetScreenSizeReq 20
233
234typedef struct {
235 CARD8 reqType;
236 CARD8 randrReqType;
237 CARD16 length B16;
238 Window window B32;
239} xRRGetScreenResourcesReq;
240#define sz_xRRGetScreenResourcesReq 8
241
242typedef struct {
243 BYTE type;
244 CARD8 pad;
245 CARD16 sequenceNumber B16;
246 CARD32 length B32;
247 Time timestamp B32;
248 Time configTimestamp B32;
249 CARD16 nCrtcs B16;
250 CARD16 nOutputs B16;
251 CARD16 nModes B16;
252 CARD16 nbytesNames B16;
253 CARD32 pad1 B32;
254 CARD32 pad2 B32;
255} xRRGetScreenResourcesReply;
256#define sz_xRRGetScreenResourcesReply 32
257
258typedef struct {
259 CARD8 reqType;
260 CARD8 randrReqType;
261 CARD16 length B16;
262 RROutput output B32;
263 Time configTimestamp B32;
264} xRRGetOutputInfoReq;
265#define sz_xRRGetOutputInfoReq 12
266
267typedef struct {
268 BYTE type;
269 CARD8 status;
270 CARD16 sequenceNumber B16;
271 CARD32 length B32;
272 Time timestamp B32;
273 RRCrtc crtc B32;
274 CARD32 mmWidth B32;
275 CARD32 mmHeight B32;
276 CARD8 connection;
277 CARD8 subpixelOrder;
278 CARD16 nCrtcs B16;
279 CARD16 nModes B16;
280 CARD16 nPreferred B16;
281 CARD16 nClones B16;
282 CARD16 nameLength B16;
283} xRRGetOutputInfoReply;
284#define sz_xRRGetOutputInfoReply 36
285
286typedef struct {
287 CARD8 reqType;
288 CARD8 randrReqType;
289 CARD16 length B16;
290 RROutput output B32;
291} xRRListOutputPropertiesReq;
292#define sz_xRRListOutputPropertiesReq 8
293
294typedef struct {
295 BYTE type;
296 CARD8 pad0;
297 CARD16 sequenceNumber B16;
298 CARD32 length B32;
299 CARD16 nAtoms B16;
300 CARD16 pad1 B16;
301 CARD32 pad2 B32;
302 CARD32 pad3 B32;
303 CARD32 pad4 B32;
304 CARD32 pad5 B32;
305 CARD32 pad6 B32;
306} xRRListOutputPropertiesReply;
307#define sz_xRRListOutputPropertiesReply 32
308
309typedef struct {
310 CARD8 reqType;
311 CARD8 randrReqType;
312 CARD16 length B16;
313 RROutput output B32;
314 Atom property B32;
315} xRRQueryOutputPropertyReq;
316#define sz_xRRQueryOutputPropertyReq 12
317
318typedef struct {
319 BYTE type;
320 BYTE pad0;
321 CARD16 sequenceNumber B16;
322 CARD32 length B32;
323 BOOL pending;
324 BOOL range;
325 BOOL immutable;
326 BYTE pad1;
327 CARD32 pad2 B32;
328 CARD32 pad3 B32;
329 CARD32 pad4 B32;
330 CARD32 pad5 B32;
331 CARD32 pad6 B32;
332} xRRQueryOutputPropertyReply;
333#define sz_xRRQueryOutputPropertyReply 32
334
335typedef struct {
336 CARD8 reqType;
337 CARD8 randrReqType;
338 CARD16 length B16;
339 RROutput output B32;
340 Atom property B32;
341 BOOL pending;
342 BOOL range;
343 CARD16 pad B16;
344} xRRConfigureOutputPropertyReq;
345#define sz_xRRConfigureOutputPropertyReq 16
346
347typedef struct {
348 CARD8 reqType;
349 CARD8 randrReqType;
350 CARD16 length B16;
351 RROutput output B32;
352 Atom property B32;
353 Atom type B32;
354 CARD8 format;
355 CARD8 mode;
356 CARD16 pad;
357 CARD32 nUnits B32;
358} xRRChangeOutputPropertyReq;
359#define sz_xRRChangeOutputPropertyReq 24
360
361typedef struct {
362 CARD8 reqType;
363 CARD8 randrReqType;
364 CARD16 length B16;
365 RROutput output B32;
366 Atom property B32;
367} xRRDeleteOutputPropertyReq;
368#define sz_xRRDeleteOutputPropertyReq 12
369
370typedef struct {
371 CARD8 reqType;
372 CARD8 randrReqType;
373 CARD16 length B16;
374 RROutput output B32;
375 Atom property B32;
376 Atom type B32;
377 CARD32 longOffset B32;
378 CARD32 longLength B32;
379 BOOL delete;
380 BOOL pending;
381 CARD16 pad1 B16;
382} xRRGetOutputPropertyReq;
383#define sz_xRRGetOutputPropertyReq 28
384
385typedef struct {
386 BYTE type;
387 CARD8 format;
388 CARD16 sequenceNumber B16;
389 CARD32 length B32;
390 Atom propertyType B32;
391 CARD32 bytesAfter B32;
392 CARD32 nItems B32;
393 CARD32 pad1 B32;
394 CARD32 pad2 B32;
395 CARD32 pad3 B32;
396} xRRGetOutputPropertyReply;
397#define sz_xRRGetOutputPropertyReply 32
398
399typedef struct {
400 CARD8 reqType;
401 CARD8 randrReqType;
402 CARD16 length B16;
403 Window window B32;
404 xRRModeInfo modeInfo;
405} xRRCreateModeReq;
406#define sz_xRRCreateModeReq 40
407
408typedef struct {
409 BYTE type;
410 CARD8 pad0;
411 CARD16 sequenceNumber B16;
412 CARD32 length B32;
413 RRMode mode B32;
414 CARD32 pad1 B32;
415 CARD32 pad2 B32;
416 CARD32 pad3 B32;
417 CARD32 pad4 B32;
418 CARD32 pad5 B32;
419} xRRCreateModeReply;
420#define sz_xRRCreateModeReply 32
421
422typedef struct {
423 CARD8 reqType;
424 CARD8 randrReqType;
425 CARD16 length B16;
426 RRMode mode B32;
427} xRRDestroyModeReq;
428#define sz_xRRDestroyModeReq 8
429
430typedef struct {
431 CARD8 reqType;
432 CARD8 randrReqType;
433 CARD16 length B16;
434 RROutput output B32;
435 RRMode mode B32;
436} xRRAddOutputModeReq;
437#define sz_xRRAddOutputModeReq 12
438
439typedef struct {
440 CARD8 reqType;
441 CARD8 randrReqType;
442 CARD16 length B16;
443 RROutput output B32;
444 RRMode mode B32;
445} xRRDeleteOutputModeReq;
446#define sz_xRRDeleteOutputModeReq 12
447
448typedef struct {
449 CARD8 reqType;
450 CARD8 randrReqType;
451 CARD16 length B16;
452 RRCrtc crtc B32;
453 Time configTimestamp B32;
454} xRRGetCrtcInfoReq;
455#define sz_xRRGetCrtcInfoReq 12
456
457typedef struct {
458 BYTE type;
459 CARD8 status;
460 CARD16 sequenceNumber B16;
461 CARD32 length B32;
462 Time timestamp B32;
463 INT16 x B16;
464 INT16 y B16;
465 CARD16 width B16;
466 CARD16 height B16;
467 RRMode mode B32;
468 Rotation rotation B16;
469 Rotation rotations B16;
470 CARD16 nOutput B16;
471 CARD16 nPossibleOutput B16;
472} xRRGetCrtcInfoReply;
473#define sz_xRRGetCrtcInfoReply 32
474
475typedef struct {
476 CARD8 reqType;
477 CARD8 randrReqType;
478 CARD16 length B16;
479 RRCrtc crtc B32;
480 Time timestamp B32;
481 Time configTimestamp B32;
482 INT16 x B16;
483 INT16 y B16;
484 RRMode mode B32;
485 Rotation rotation B16;
486 CARD16 pad B16;
487} xRRSetCrtcConfigReq;
488#define sz_xRRSetCrtcConfigReq 28
489
490typedef struct {
491 BYTE type;
492 CARD8 status;
493 CARD16 sequenceNumber B16;
494 CARD32 length B32;
495 Time newTimestamp B32;
496 CARD32 pad1 B32;
497 CARD32 pad2 B16;
498 CARD32 pad3 B32;
499 CARD32 pad4 B32;
500 CARD32 pad5 B32;
501} xRRSetCrtcConfigReply;
502#define sz_xRRSetCrtcConfigReply 32
503
504typedef struct {
505 CARD8 reqType;
506 CARD8 randrReqType;
507 CARD16 length B16;
508 RRCrtc crtc B32;
509} xRRGetCrtcGammaSizeReq;
510#define sz_xRRGetCrtcGammaSizeReq 8
511
512typedef struct {
513 BYTE type;
514 CARD8 status;
515 CARD16 sequenceNumber B16;
516 CARD32 length B32;
517 CARD16 size B16;
518 CARD16 pad1 B16;
519 CARD32 pad2 B32;
520 CARD32 pad3 B32;
521 CARD32 pad4 B32;
522 CARD32 pad5 B32;
523 CARD32 pad6 B32;
524} xRRGetCrtcGammaSizeReply;
525#define sz_xRRGetCrtcGammaSizeReply 32
526
527typedef struct {
528 CARD8 reqType;
529 CARD8 randrReqType;
530 CARD16 length B16;
531 RRCrtc crtc B32;
532} xRRGetCrtcGammaReq;
533#define sz_xRRGetCrtcGammaReq 8
534
535typedef struct {
536 BYTE type;
537 CARD8 status;
538 CARD16 sequenceNumber B16;
539 CARD32 length B32;
540 CARD16 size B16;
541 CARD16 pad1 B16;
542 CARD32 pad2 B32;
543 CARD32 pad3 B32;
544 CARD32 pad4 B32;
545 CARD32 pad5 B32;
546 CARD32 pad6 B32;
547} xRRGetCrtcGammaReply;
548#define sz_xRRGetCrtcGammaReply 32
549
550typedef struct {
551 CARD8 reqType;
552 CARD8 randrReqType;
553 CARD16 length B16;
554 RRCrtc crtc B32;
555 CARD16 size B16;
556 CARD16 pad1 B16;
557} xRRSetCrtcGammaReq;
558#define sz_xRRSetCrtcGammaReq 12
559
560/*
561 * event
562 */
563typedef struct {
564 CARD8 type; /* always evBase + ScreenChangeNotify */
565 CARD8 rotation; /* new rotation */
566 CARD16 sequenceNumber B16;
567 Time timestamp B32; /* time screen was changed */
568 Time configTimestamp B32; /* time config data was changed */
569 Window root B32; /* root window */
570 Window window B32; /* window requesting notification */
571 SizeID sizeID B16; /* new size ID */
572 CARD16 subpixelOrder B16; /* subpixel order */
573 CARD16 widthInPixels B16; /* new size */
574 CARD16 heightInPixels B16;
575 CARD16 widthInMillimeters B16;
576 CARD16 heightInMillimeters B16;
577} xRRScreenChangeNotifyEvent;
578#define sz_xRRScreenChangeNotifyEvent 32
579
580typedef struct {
581 CARD8 type; /* always evBase + RRNotify */
582 CARD8 subCode; /* RRNotify_CrtcChange */
583 CARD16 sequenceNumber B16;
584 Time timestamp B32; /* time crtc was changed */
585 Window window B32; /* window requesting notification */
586 RRCrtc crtc B32; /* affected CRTC */
587 RRMode mode B32; /* current mode */
588 CARD16 rotation B16; /* rotation and reflection */
589 CARD16 pad1 B16; /* unused */
590 INT16 x B16; /* new location */
591 INT16 y B16;
592 CARD16 width B16; /* new size */
593 CARD16 height B16;
594} xRRCrtcChangeNotifyEvent;
595#define sz_xRRCrtcChangeNotifyEvent 32
596
597typedef struct {
598 CARD8 type; /* always evBase + RRNotify */
599 CARD8 subCode; /* RRNotify_OutputChange */
600 CARD16 sequenceNumber B16;
601 Time timestamp B32; /* time crtc was changed */
602 Time configTimestamp B32; /* time crtc was changed */
603 Window window B32; /* window requesting notification */
604 RROutput output B32; /* affected output */
605 RRCrtc crtc B32; /* current crtc */
606 RRMode mode B32; /* current mode */
607 CARD16 rotation B16; /* rotation and reflection */
608 CARD8 connection; /* connection status */
609 CARD8 subpixelOrder; /* subpixel order */
610} xRROutputChangeNotifyEvent;
611#define sz_xRROutputChangeNotifyEvent 32
612
613typedef struct {
614 CARD8 type; /* always evBase + RRNotify */
615 CARD8 subCode; /* RRNotify_OutputProperty */
616 CARD16 sequenceNumber B16;
617 Window window B32; /* window requesting notification */
618 RROutput output B32; /* affected output */
619 Atom atom B32; /* property name */
620 Time timestamp B32; /* time crtc was changed */
621 CARD8 state; /* NewValue or Deleted */
622 CARD8 pad1;
623 CARD16 pad2 B16;
624 CARD32 pad3 B32;
625 CARD32 pad4 B32;
626} xRROutputPropertyNotifyEvent;
627#define sz_xRROutputPropertyNotifyEvent 32
628
629#undef RRModeFlags
630#undef RRCrtc
631#undef RRMode
632#undef RROutput
633#undef RRMode
634#undef RRCrtc
635#undef Drawable
636#undef Window
637#undef Font
638#undef Pixmap
639#undef Cursor
640#undef Colormap
641#undef GContext
642#undef Atom
643#undef Time
644#undef KeyCode
645#undef KeySym
646#undef Rotation
647#undef SizeID
648#undef SubpixelOrder
649
650#endif /* _XRANDRP_H_ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette