2
* Copyright © 2000 Compaq Computer Corporation
3
* Copyright © 2002 Hewlett-Packard Company
4
* Copyright © 2006 Intel Corporation
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.
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
24
* Author: Jim Gettys, Hewlett-Packard Company, Inc.
25
* Keith Packard, Intel Corporation
28
/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */
29
/* V1.0 removes depth switching from the protocol */
33
#include <X11/extensions/randr.h>
36
#define Drawable CARD32
40
#define Colormap CARD32
41
#define GContext CARD32
46
#define RROutput CARD32
49
#define RRModeFlags CARD32
51
#define Rotation CARD16
53
#define SubpixelOrder CARD16
60
CARD16 widthInPixels B16;
61
CARD16 heightInPixels B16;
62
CARD16 widthInMillimeters B16;
63
CARD16 heightInMillimeters B16;
65
#define sz_xScreenSizes 8
68
* requests and replies
75
CARD32 majorVersion B32;
76
CARD32 minorVersion B32;
78
#define sz_xRRQueryVersionReq 12
81
BYTE type; /* X_Reply */
83
CARD16 sequenceNumber B16;
85
CARD32 majorVersion B32;
86
CARD32 minorVersion B32;
91
} xRRQueryVersionReply;
92
#define sz_xRRQueryVersionReply 32
99
} xRRGetScreenInfoReq;
100
#define sz_xRRGetScreenInfoReq 8
103
* the xRRScreenInfoReply structure is followed by:
105
* the size information
110
BYTE type; /* X_Reply */
112
CARD16 sequenceNumber B16;
116
Time configTimestamp B32;
119
Rotation rotation B16;
121
CARD16 nrateEnts B16;
123
} xRRGetScreenInfoReply;
124
#define sz_xRRGetScreenInfoReply 32
130
Drawable drawable B32;
132
Time configTimestamp B32;
134
Rotation rotation B16;
135
} xRR1_0SetScreenConfigReq;
136
#define sz_xRR1_0SetScreenConfigReq 20
142
Drawable drawable B32;
144
Time configTimestamp B32;
146
Rotation rotation B16;
149
} xRRSetScreenConfigReq;
150
#define sz_xRRSetScreenConfigReq 24
153
BYTE type; /* X_Reply */
155
CARD16 sequenceNumber B16;
157
Time newTimestamp B32;
158
Time newConfigTimestamp B32;
160
CARD16 subpixelOrder B16;
164
} xRRSetScreenConfigReply;
165
#define sz_xRRSetScreenConfigReply 32
175
#define sz_xRRSelectInputReq 12
178
* Additions for version 1.2
181
typedef struct _xRRModeInfo {
186
CARD16 hSyncStart B16;
190
CARD16 vSyncStart B16;
193
CARD16 nameLength B16;
194
RRModeFlags modeFlags B32;
196
#define sz_xRRModeInfo 32
203
} xRRGetScreenSizeRangeReq;
204
#define sz_xRRGetScreenSizeRangeReq 8
207
BYTE type; /* X_Reply */
209
CARD16 sequenceNumber B16;
212
CARD16 minHeight B16;
214
CARD16 maxHeight B16;
219
} xRRGetScreenSizeRangeReply;
220
#define sz_xRRGetScreenSizeRangeReply 32
229
CARD32 widthInMillimeters B32;
230
CARD32 heightInMillimeters B32;
231
} xRRSetScreenSizeReq;
232
#define sz_xRRSetScreenSizeReq 20
239
} xRRGetScreenResourcesReq;
240
#define sz_xRRGetScreenResourcesReq 8
245
CARD16 sequenceNumber B16;
248
Time configTimestamp B32;
252
CARD16 nbytesNames B16;
255
} xRRGetScreenResourcesReply;
256
#define sz_xRRGetScreenResourcesReply 32
263
Time configTimestamp B32;
264
} xRRGetOutputInfoReq;
265
#define sz_xRRGetOutputInfoReq 12
270
CARD16 sequenceNumber B16;
280
CARD16 nPreferred B16;
282
CARD16 nameLength B16;
283
} xRRGetOutputInfoReply;
284
#define sz_xRRGetOutputInfoReply 36
291
} xRRListOutputPropertiesReq;
292
#define sz_xRRListOutputPropertiesReq 8
297
CARD16 sequenceNumber B16;
306
} xRRListOutputPropertiesReply;
307
#define sz_xRRListOutputPropertiesReply 32
315
} xRRQueryOutputPropertyReq;
316
#define sz_xRRQueryOutputPropertyReq 12
321
CARD16 sequenceNumber B16;
332
} xRRQueryOutputPropertyReply;
333
#define sz_xRRQueryOutputPropertyReply 32
344
} xRRConfigureOutputPropertyReq;
345
#define sz_xRRConfigureOutputPropertyReq 16
358
} xRRChangeOutputPropertyReq;
359
#define sz_xRRChangeOutputPropertyReq 24
367
} xRRDeleteOutputPropertyReq;
368
#define sz_xRRDeleteOutputPropertyReq 12
377
CARD32 longOffset B32;
378
CARD32 longLength B32;
382
} xRRGetOutputPropertyReq;
383
#define sz_xRRGetOutputPropertyReq 28
388
CARD16 sequenceNumber B16;
390
Atom propertyType B32;
391
CARD32 bytesAfter B32;
396
} xRRGetOutputPropertyReply;
397
#define sz_xRRGetOutputPropertyReply 32
404
xRRModeInfo modeInfo;
406
#define sz_xRRCreateModeReq 40
411
CARD16 sequenceNumber B16;
419
} xRRCreateModeReply;
420
#define sz_xRRCreateModeReply 32
428
#define sz_xRRDestroyModeReq 8
436
} xRRAddOutputModeReq;
437
#define sz_xRRAddOutputModeReq 12
445
} xRRDeleteOutputModeReq;
446
#define sz_xRRDeleteOutputModeReq 12
453
Time configTimestamp B32;
455
#define sz_xRRGetCrtcInfoReq 12
460
CARD16 sequenceNumber B16;
468
Rotation rotation B16;
469
Rotation rotations B16;
471
CARD16 nPossibleOutput B16;
472
} xRRGetCrtcInfoReply;
473
#define sz_xRRGetCrtcInfoReply 32
481
Time configTimestamp B32;
485
Rotation rotation B16;
487
} xRRSetCrtcConfigReq;
488
#define sz_xRRSetCrtcConfigReq 28
493
CARD16 sequenceNumber B16;
495
Time newTimestamp B32;
501
} xRRSetCrtcConfigReply;
502
#define sz_xRRSetCrtcConfigReply 32
509
} xRRGetCrtcGammaSizeReq;
510
#define sz_xRRGetCrtcGammaSizeReq 8
515
CARD16 sequenceNumber B16;
524
} xRRGetCrtcGammaSizeReply;
525
#define sz_xRRGetCrtcGammaSizeReply 32
532
} xRRGetCrtcGammaReq;
533
#define sz_xRRGetCrtcGammaReq 8
538
CARD16 sequenceNumber B16;
547
} xRRGetCrtcGammaReply;
548
#define sz_xRRGetCrtcGammaReply 32
557
} xRRSetCrtcGammaReq;
558
#define sz_xRRSetCrtcGammaReq 12
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
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 */
592
CARD16 width B16; /* new size */
594
} xRRCrtcChangeNotifyEvent;
595
#define sz_xRRCrtcChangeNotifyEvent 32
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
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 */
626
} xRROutputPropertyNotifyEvent;
627
#define sz_xRROutputPropertyNotifyEvent 32
650
#endif /* _XRANDRP_H_ */