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, HP Labs, Hewlett-Packard, Inc.
26 * Keith Packard, Intel Corporation
32 typedef unsigned short Rotation;
33 typedef unsigned short SizeID;
34 typedef unsigned short SubpixelOrder;
35 typedef unsigned short Connection;
36 typedef unsigned short XRandrRotation;
37 typedef unsigned short XRandrSizeID;
38 typedef unsigned short XRandrSubpixelOrder;
39 typedef unsigned long XRandrModeFlags;
41 #define RANDR_NAME "RANDR"
45 #define RRNumberErrors 4
46 #define RRNumberEvents 2
47 #define RRNumberRequests 42
49 #define X_RRQueryVersion 0
50 /* we skip 1 to make old clients fail pretty immediately */
51 #define X_RROldGetScreenInfo 1
52 #define X_RR1_0SetScreenConfig 2
53 /* V1.0 apps share the same set screen config request id */
54 #define X_RRSetScreenConfig 2
55 #define X_RROldScreenChangeSelectInput 3
56 /* 3 used to be ScreenChangeSelectInput; deprecated */
57 #define X_RRSelectInput 4
58 #define X_RRGetScreenInfo 5
61 #define X_RRGetScreenSizeRange 6
62 #define X_RRSetScreenSize 7
63 #define X_RRGetScreenResources 8
64 #define X_RRGetOutputInfo 9
65 #define X_RRListOutputProperties 10
66 #define X_RRQueryOutputProperty 11
67 #define X_RRConfigureOutputProperty 12
68 #define X_RRChangeOutputProperty 13
69 #define X_RRDeleteOutputProperty 14
70 #define X_RRGetOutputProperty 15
71 #define X_RRCreateMode 16
72 #define X_RRDestroyMode 17
73 #define X_RRAddOutputMode 18
74 #define X_RRDeleteOutputMode 19
75 #define X_RRGetCrtcInfo 20
76 #define X_RRSetCrtcConfig 21
77 #define X_RRGetCrtcGammaSize 22
78 #define X_RRGetCrtcGamma 23
79 #define X_RRSetCrtcGamma 24
82 #define X_RRGetScreenResourcesCurrent 25
83 #define X_RRSetCrtcTransform 26
84 #define X_RRGetCrtcTransform 27
85 #define X_RRGetPanning 28
86 #define X_RRSetPanning 29
87 #define X_RRSetOutputPrimary 30
88 #define X_RRGetOutputPrimary 31
90 #define RRTransformUnit (1L << 0)
91 #define RRTransformScaleUp (1L << 1)
92 #define RRTransformScaleDown (1L << 2)
93 #define RRTransformProjective (1L << 3)
96 #define X_RRGetProviders 32
97 #define X_RRGetProviderInfo 33
98 #define X_RRSetProviderOffloadSink 34
99 #define X_RRSetProviderOutputSource 35
100 #define X_RRListProviderProperties 36
101 #define X_RRQueryProviderProperty 37
102 #define X_RRConfigureProviderProperty 38
103 #define X_RRChangeProviderProperty 39
104 #define X_RRDeleteProviderProperty 40
105 #define X_RRGetProviderProperty 41
107 /* Event selection bits */
108 #define RRScreenChangeNotifyMask (1L << 0)
110 #define RRCrtcChangeNotifyMask (1L << 1)
111 #define RROutputChangeNotifyMask (1L << 2)
112 #define RROutputPropertyNotifyMask (1L << 3)
114 #define RRProviderChangeNotifyMask (1L << 4)
115 #define RRProviderPropertyNotifyMask (1L << 5)
116 #define RRResourceChangeNotifyMask (1L << 6)
119 #define RRScreenChangeNotify 0
122 /* RRNotify Subcodes */
123 #define RRNotify_CrtcChange 0
124 #define RRNotify_OutputChange 1
125 #define RRNotify_OutputProperty 2
126 #define RRNotify_ProviderChange 3
127 #define RRNotify_ProviderProperty 4
128 #define RRNotify_ResourceChange 5
129 /* used in the rotation field; rotation and reflection in 0.1 proto. */
130 #define RR_Rotate_0 1
131 #define RR_Rotate_90 2
132 #define RR_Rotate_180 4
133 #define RR_Rotate_270 8
135 /* new in 1.0 protocol, to allow reflection of screen */
137 #define RR_Reflect_X 16
138 #define RR_Reflect_Y 32
140 #define RRSetConfigSuccess 0
141 #define RRSetConfigInvalidConfigTime 1
142 #define RRSetConfigInvalidTime 2
143 #define RRSetConfigFailed 3
145 /* new in 1.2 protocol */
147 #define RR_HSyncPositive 0x00000001
148 #define RR_HSyncNegative 0x00000002
149 #define RR_VSyncPositive 0x00000004
150 #define RR_VSyncNegative 0x00000008
151 #define RR_Interlace 0x00000010
152 #define RR_DoubleScan 0x00000020
153 #define RR_CSync 0x00000040
154 #define RR_CSyncPositive 0x00000080
155 #define RR_CSyncNegative 0x00000100
156 #define RR_HSkewPresent 0x00000200
157 #define RR_BCast 0x00000400
158 #define RR_PixelMultiplex 0x00000800
159 #define RR_DoubleClock 0x00001000
160 #define RR_ClockDivideBy2 0x00002000
162 #define RR_Connected 0
163 #define RR_Disconnected 1
164 #define RR_UnknownConnection 2
166 #define BadRROutput 0
169 #define BadRRProvider 3
171 /* Conventional RandR output properties */
173 #define RR_PROPERTY_BACKLIGHT "Backlight"
174 #define RR_PROPERTY_RANDR_EDID "EDID"
175 #define RR_PROPERTY_SIGNAL_FORMAT "SignalFormat"
176 #define RR_PROPERTY_SIGNAL_PROPERTIES "SignalProperties"
177 #define RR_PROPERTY_CONNECTOR_TYPE "ConnectorType"
178 #define RR_PROPERTY_CONNECTOR_NUMBER "ConnectorNumber"
179 #define RR_PROPERTY_COMPATIBILITY_LIST "CompatibilityList"
180 #define RR_PROPERTY_CLONE_LIST "CloneList"
181 #define RR_PROPERTY_BORDER "Border"
182 #define RR_PROPERTY_BORDER_DIMENSIONS "BorderDimensions"
184 /* roles this device can carry out */
185 #define RR_Capability_None 0
186 #define RR_Capability_SourceOutput 1
187 #define RR_Capability_SinkOutput 2
188 #define RR_Capability_SourceOffload 4
189 #define RR_Capability_SinkOffload 8
191 #endif /* _RANDR_H_ */