2 * Copyright © 2000 Compaq Computer Corporation
3 * Copyright © 2002 Hewlett-Packard Company
4 * Copyright © 2006 Intel Corporation
5 * Copyright © 2008 Red Hat, Inc.
7 * Permission to use, copy, modify, distribute, and sell this software and its
8 * documentation for any purpose is hereby granted without fee, provided that
9 * the above copyright notice appear in all copies and that both that copyright
10 * notice and this permission notice appear in supporting documentation, and
11 * that the name of the copyright holders not be used in advertising or
12 * publicity pertaining to distribution of the software without specific,
13 * written prior permission. The copyright holders make no representations
14 * about the suitability of this software for any purpose. It is provided "as
15 * is" without express or implied warranty.
17 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
18 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
19 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
20 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
25 * Author: Jim Gettys, Hewlett-Packard Company, Inc.
26 * Keith Packard, Intel Corporation
29 /* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */
30 /* V1.0 removes depth switching from the protocol */
34 #include <X11/extensions/randr.h>
35 #include <X11/extensions/renderproto.h>
38 #define Drawable CARD32
42 #define Colormap CARD32
43 #define GContext CARD32
48 #define RROutput CARD32
51 #define RRProvider CARD32
52 #define RRModeFlags CARD32
54 #define Rotation CARD16
56 #define SubpixelOrder CARD16
63 CARD16 widthInPixels B16;
64 CARD16 heightInPixels B16;
65 CARD16 widthInMillimeters B16;
66 CARD16 heightInMillimeters B16;
68 #define sz_xScreenSizes 8
71 * requests and replies
78 CARD32 majorVersion B32;
79 CARD32 minorVersion B32;
81 #define sz_xRRQueryVersionReq 12
84 BYTE type; /* X_Reply */
86 CARD16 sequenceNumber B16;
88 CARD32 majorVersion B32;
89 CARD32 minorVersion B32;
94 } xRRQueryVersionReply;
95 #define sz_xRRQueryVersionReply 32
102 } xRRGetScreenInfoReq;
103 #define sz_xRRGetScreenInfoReq 8
106 * the xRRScreenInfoReply structure is followed by:
108 * the size information
113 BYTE type; /* X_Reply */
115 CARD16 sequenceNumber B16;
119 Time configTimestamp B32;
122 Rotation rotation B16;
124 CARD16 nrateEnts B16;
126 } xRRGetScreenInfoReply;
127 #define sz_xRRGetScreenInfoReply 32
133 Drawable drawable B32;
135 Time configTimestamp B32;
137 Rotation rotation B16;
138 } xRR1_0SetScreenConfigReq;
139 #define sz_xRR1_0SetScreenConfigReq 20
145 Drawable drawable B32;
147 Time configTimestamp B32;
149 Rotation rotation B16;
152 } xRRSetScreenConfigReq;
153 #define sz_xRRSetScreenConfigReq 24
156 BYTE type; /* X_Reply */
158 CARD16 sequenceNumber B16;
160 Time newTimestamp B32;
161 Time newConfigTimestamp B32;
163 CARD16 subpixelOrder B16;
167 } xRRSetScreenConfigReply;
168 #define sz_xRRSetScreenConfigReply 32
178 #define sz_xRRSelectInputReq 12
181 * Additions for version 1.2
184 typedef struct _xRRModeInfo {
189 CARD16 hSyncStart B16;
193 CARD16 vSyncStart B16;
196 CARD16 nameLength B16;
197 RRModeFlags modeFlags B32;
199 #define sz_xRRModeInfo 32
206 } xRRGetScreenSizeRangeReq;
207 #define sz_xRRGetScreenSizeRangeReq 8
210 BYTE type; /* X_Reply */
212 CARD16 sequenceNumber B16;
215 CARD16 minHeight B16;
217 CARD16 maxHeight B16;
222 } xRRGetScreenSizeRangeReply;
223 #define sz_xRRGetScreenSizeRangeReply 32
232 CARD32 widthInMillimeters B32;
233 CARD32 heightInMillimeters B32;
234 } xRRSetScreenSizeReq;
235 #define sz_xRRSetScreenSizeReq 20
242 } xRRGetScreenResourcesReq;
243 #define sz_xRRGetScreenResourcesReq 8
248 CARD16 sequenceNumber B16;
251 Time configTimestamp B32;
255 CARD16 nbytesNames B16;
258 } xRRGetScreenResourcesReply;
259 #define sz_xRRGetScreenResourcesReply 32
266 Time configTimestamp B32;
267 } xRRGetOutputInfoReq;
268 #define sz_xRRGetOutputInfoReq 12
273 CARD16 sequenceNumber B16;
283 CARD16 nPreferred B16;
285 CARD16 nameLength B16;
286 } xRRGetOutputInfoReply;
287 #define sz_xRRGetOutputInfoReply 36
294 } xRRListOutputPropertiesReq;
295 #define sz_xRRListOutputPropertiesReq 8
300 CARD16 sequenceNumber B16;
309 } xRRListOutputPropertiesReply;
310 #define sz_xRRListOutputPropertiesReply 32
318 } xRRQueryOutputPropertyReq;
319 #define sz_xRRQueryOutputPropertyReq 12
324 CARD16 sequenceNumber B16;
335 } xRRQueryOutputPropertyReply;
336 #define sz_xRRQueryOutputPropertyReply 32
347 } xRRConfigureOutputPropertyReq;
348 #define sz_xRRConfigureOutputPropertyReq 16
361 } xRRChangeOutputPropertyReq;
362 #define sz_xRRChangeOutputPropertyReq 24
370 } xRRDeleteOutputPropertyReq;
371 #define sz_xRRDeleteOutputPropertyReq 12
380 CARD32 longOffset B32;
381 CARD32 longLength B32;
389 } xRRGetOutputPropertyReq;
390 #define sz_xRRGetOutputPropertyReq 28
395 CARD16 sequenceNumber B16;
397 Atom propertyType B32;
398 CARD32 bytesAfter B32;
403 } xRRGetOutputPropertyReply;
404 #define sz_xRRGetOutputPropertyReply 32
411 xRRModeInfo modeInfo;
413 #define sz_xRRCreateModeReq 40
418 CARD16 sequenceNumber B16;
426 } xRRCreateModeReply;
427 #define sz_xRRCreateModeReply 32
435 #define sz_xRRDestroyModeReq 8
443 } xRRAddOutputModeReq;
444 #define sz_xRRAddOutputModeReq 12
452 } xRRDeleteOutputModeReq;
453 #define sz_xRRDeleteOutputModeReq 12
460 Time configTimestamp B32;
462 #define sz_xRRGetCrtcInfoReq 12
467 CARD16 sequenceNumber B16;
475 Rotation rotation B16;
476 Rotation rotations B16;
478 CARD16 nPossibleOutput B16;
479 } xRRGetCrtcInfoReply;
480 #define sz_xRRGetCrtcInfoReply 32
488 Time configTimestamp B32;
492 Rotation rotation B16;
494 } xRRSetCrtcConfigReq;
495 #define sz_xRRSetCrtcConfigReq 28
500 CARD16 sequenceNumber B16;
502 Time newTimestamp B32;
508 } xRRSetCrtcConfigReply;
509 #define sz_xRRSetCrtcConfigReply 32
516 } xRRGetCrtcGammaSizeReq;
517 #define sz_xRRGetCrtcGammaSizeReq 8
522 CARD16 sequenceNumber B16;
531 } xRRGetCrtcGammaSizeReply;
532 #define sz_xRRGetCrtcGammaSizeReply 32
539 } xRRGetCrtcGammaReq;
540 #define sz_xRRGetCrtcGammaReq 8
545 CARD16 sequenceNumber B16;
554 } xRRGetCrtcGammaReply;
555 #define sz_xRRGetCrtcGammaReply 32
564 } xRRSetCrtcGammaReq;
565 #define sz_xRRSetCrtcGammaReq 12
571 typedef xRRGetScreenResourcesReq xRRGetScreenResourcesCurrentReq;
573 #define sz_xRRGetScreenResourcesCurrentReq sz_xRRGetScreenResourcesReq
575 typedef xRRGetScreenResourcesReply xRRGetScreenResourcesCurrentReply;
576 #define sz_xRRGetScreenResourcesCurrentReply sz_xRRGetScreenResourcesReply
583 xRenderTransform transform;
584 CARD16 nbytesFilter; /* number of bytes in filter name */
586 } xRRSetCrtcTransformReq;
588 #define sz_xRRSetCrtcTransformReq 48
595 } xRRGetCrtcTransformReq;
597 #define sz_xRRGetCrtcTransformReq 8
602 CARD16 sequenceNumber B16;
604 xRenderTransform pendingTransform;
608 xRenderTransform currentTransform;
610 CARD16 pendingNbytesFilter B16; /* number of bytes in filter name */
611 CARD16 pendingNparamsFilter B16; /* number of filter params */
612 CARD16 currentNbytesFilter B16; /* number of bytes in filter name */
613 CARD16 currentNparamsFilter B16; /* number of filter params */
614 } xRRGetCrtcTransformReply;
616 #define sz_xRRGetCrtcTransformReply 96
624 } xRRSetOutputPrimaryReq;
625 #define sz_xRRSetOutputPrimaryReq 12
632 } xRRGetOutputPrimaryReq;
633 #define sz_xRRGetOutputPrimaryReq 8
638 CARD16 sequenceNumber B16;
646 } xRRGetOutputPrimaryReply;
647 #define sz_xRRGetOutputPrimaryReply 32
658 } xRRGetProvidersReq;
659 #define sz_xRRGetProvidersReq 8
664 CARD16 sequenceNumber B16;
673 } xRRGetProvidersReply;
674 #define sz_xRRGetProvidersReply 32
680 RRProvider provider B32;
681 Time configTimestamp B32;
682 } xRRGetProviderInfoReq;
683 #define sz_xRRGetProviderInfoReq 12
688 CARD16 sequenceNumber B16;
691 CARD32 capabilities B32;
694 CARD16 nAssociatedProviders B16;
695 CARD16 nameLength B16;
698 } xRRGetProviderInfoReply;
699 #define sz_xRRGetProviderInfoReply 32
705 RRProvider provider B32;
706 RRProvider source_provider B32;
707 Time configTimestamp B32;
708 } xRRSetProviderOutputSourceReq;
709 #define sz_xRRSetProviderOutputSourceReq 16
715 RRProvider provider B32;
716 RRProvider sink_provider B32;
717 Time configTimestamp B32;
718 } xRRSetProviderOffloadSinkReq;
719 #define sz_xRRSetProviderOffloadSinkReq 16
725 RRProvider provider B32;
726 } xRRListProviderPropertiesReq;
727 #define sz_xRRListProviderPropertiesReq 8
732 CARD16 sequenceNumber B16;
741 } xRRListProviderPropertiesReply;
742 #define sz_xRRListProviderPropertiesReply 32
748 RRProvider provider B32;
750 } xRRQueryProviderPropertyReq;
751 #define sz_xRRQueryProviderPropertyReq 12
756 CARD16 sequenceNumber B16;
767 } xRRQueryProviderPropertyReply;
768 #define sz_xRRQueryProviderPropertyReply 32
774 RRProvider provider B32;
779 } xRRConfigureProviderPropertyReq;
780 #define sz_xRRConfigureProviderPropertyReq 16
786 RRProvider provider B32;
793 } xRRChangeProviderPropertyReq;
794 #define sz_xRRChangeProviderPropertyReq 24
800 RRProvider provider B32;
802 } xRRDeleteProviderPropertyReq;
803 #define sz_xRRDeleteProviderPropertyReq 12
809 RRProvider provider B32;
812 CARD32 longOffset B32;
813 CARD32 longLength B32;
821 } xRRGetProviderPropertyReq;
822 #define sz_xRRGetProviderPropertyReq 28
827 CARD16 sequenceNumber B16;
829 Atom propertyType B32;
830 CARD32 bytesAfter B32;
835 } xRRGetProviderPropertyReply;
836 #define sz_xRRGetProviderPropertyReply 32
842 CARD8 type; /* always evBase + ScreenChangeNotify */
843 CARD8 rotation; /* new rotation */
844 CARD16 sequenceNumber B16;
845 Time timestamp B32; /* time screen was changed */
846 Time configTimestamp B32; /* time config data was changed */
847 Window root B32; /* root window */
848 Window window B32; /* window requesting notification */
849 SizeID sizeID B16; /* new size ID */
850 CARD16 subpixelOrder B16; /* subpixel order */
851 CARD16 widthInPixels B16; /* new size */
852 CARD16 heightInPixels B16;
853 CARD16 widthInMillimeters B16;
854 CARD16 heightInMillimeters B16;
855 } xRRScreenChangeNotifyEvent;
856 #define sz_xRRScreenChangeNotifyEvent 32
859 CARD8 type; /* always evBase + RRNotify */
860 CARD8 subCode; /* RRNotify_CrtcChange */
861 CARD16 sequenceNumber B16;
862 Time timestamp B32; /* time crtc was changed */
863 Window window B32; /* window requesting notification */
864 RRCrtc crtc B32; /* affected CRTC */
865 RRMode mode B32; /* current mode */
866 CARD16 rotation B16; /* rotation and reflection */
867 CARD16 pad1 B16; /* unused */
868 INT16 x B16; /* new location */
870 CARD16 width B16; /* new size */
872 } xRRCrtcChangeNotifyEvent;
873 #define sz_xRRCrtcChangeNotifyEvent 32
876 CARD8 type; /* always evBase + RRNotify */
877 CARD8 subCode; /* RRNotify_OutputChange */
878 CARD16 sequenceNumber B16;
879 Time timestamp B32; /* time output was changed */
880 Time configTimestamp B32; /* time config was changed */
881 Window window B32; /* window requesting notification */
882 RROutput output B32; /* affected output */
883 RRCrtc crtc B32; /* current crtc */
884 RRMode mode B32; /* current mode */
885 CARD16 rotation B16; /* rotation and reflection */
886 CARD8 connection; /* connection status */
887 CARD8 subpixelOrder; /* subpixel order */
888 } xRROutputChangeNotifyEvent;
889 #define sz_xRROutputChangeNotifyEvent 32
892 CARD8 type; /* always evBase + RRNotify */
893 CARD8 subCode; /* RRNotify_OutputProperty */
894 CARD16 sequenceNumber B16;
895 Window window B32; /* window requesting notification */
896 RROutput output B32; /* affected output */
897 Atom atom B32; /* property name */
898 Time timestamp B32; /* time crtc was changed */
899 CARD8 state; /* NewValue or Deleted */
904 } xRROutputPropertyNotifyEvent;
905 #define sz_xRROutputPropertyNotifyEvent 32
908 CARD8 type; /* always evBase + RRNotify */
909 CARD8 subCode; /* RRNotify_ProviderChange */
910 CARD16 sequenceNumber B16;
911 Time timestamp B32; /* time provider was changed */
912 Window window B32; /* window requesting notification */
913 RRProvider provider B32; /* affected provider */
918 } xRRProviderChangeNotifyEvent;
919 #define sz_xRRProviderChangeNotifyEvent 32
922 CARD8 type; /* always evBase + RRNotify */
923 CARD8 subCode; /* RRNotify_ProviderProperty */
924 CARD16 sequenceNumber B16;
925 Window window B32; /* window requesting notification */
926 RRProvider provider B32; /* affected provider */
927 Atom atom B32; /* property name */
928 Time timestamp B32; /* time provider was changed */
929 CARD8 state; /* NewValue or Deleted */
934 } xRRProviderPropertyNotifyEvent;
935 #define sz_xRRProviderPropertyNotifyEvent 32
938 CARD8 type; /* always evBase + RRNotify */
939 CARD8 subCode; /* RRNotify_ResourceChange */
940 CARD16 sequenceNumber B16;
941 Time timestamp B32; /* time resource was changed */
942 Window window B32; /* window requesting notification */
948 } xRRResourceChangeNotifyEvent;
949 #define sz_xRRResourceChangeNotifyEvent 32
957 #define sz_xRRGetPanningReq 8
962 CARD16 sequenceNumber B16;
969 CARD16 track_left B16;
970 CARD16 track_top B16;
971 CARD16 track_width B16;
972 CARD16 track_height B16;
973 INT16 border_left B16;
974 INT16 border_top B16;
975 INT16 border_right B16;
976 INT16 border_bottom B16;
977 } xRRGetPanningReply;
978 #define sz_xRRGetPanningReply 36
990 CARD16 track_left B16;
991 CARD16 track_top B16;
992 CARD16 track_width B16;
993 CARD16 track_height B16;
994 INT16 border_left B16;
995 INT16 border_top B16;
996 INT16 border_right B16;
997 INT16 border_bottom B16;
999 #define sz_xRRSetPanningReq 36
1004 CARD16 sequenceNumber B16;
1006 Time newTimestamp B32;
1012 } xRRSetPanningReply;
1013 #define sz_xRRSetPanningReply 32
1035 #undef SubpixelOrder
1037 #endif /* _XRANDRP_H_ */