2 * Copyright © 2006 Keith Packard
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that copyright
7 * notice and this permission notice appear in supporting documentation, and
8 * that the name of the copyright holders not be used in advertising or
9 * publicity pertaining to distribution of the software without specific,
10 * written prior permission. The copyright holders make no representations
11 * about the suitability of this software for any purpose. It is provided "as
12 * is" without express or implied warranty.
14 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
26 SProcRRQueryVersion (ClientPtr client
)
29 REQUEST(xRRQueryVersionReq
);
31 swaps(&stuff
->length
, n
);
32 swapl(&stuff
->majorVersion
, n
);
33 swapl(&stuff
->minorVersion
, n
);
34 return (*ProcRandrVector
[stuff
->randrReqType
]) (client
);
38 SProcRRGetScreenInfo (ClientPtr client
)
41 REQUEST(xRRGetScreenInfoReq
);
43 swaps(&stuff
->length
, n
);
44 swapl(&stuff
->window
, n
);
45 return (*ProcRandrVector
[stuff
->randrReqType
]) (client
);
49 SProcRRSetScreenConfig (ClientPtr client
)
52 REQUEST(xRRSetScreenConfigReq
);
54 if (RRClientKnowsRates (client
))
56 REQUEST_SIZE_MATCH (xRRSetScreenConfigReq
);
57 swaps (&stuff
->rate
, n
);
61 REQUEST_SIZE_MATCH (xRR1_0SetScreenConfigReq
);
64 swaps(&stuff
->length
, n
);
65 swapl(&stuff
->drawable
, n
);
66 swapl(&stuff
->timestamp
, n
);
67 swaps(&stuff
->sizeID
, n
);
68 swaps(&stuff
->rotation
, n
);
69 return (*ProcRandrVector
[stuff
->randrReqType
]) (client
);
73 SProcRRSelectInput (ClientPtr client
)
76 REQUEST(xRRSelectInputReq
);
78 swaps(&stuff
->length
, n
);
79 swapl(&stuff
->window
, n
);
80 swaps(&stuff
->enable
, n
);
81 return (*ProcRandrVector
[stuff
->randrReqType
]) (client
);
85 SProcRRGetScreenSizeRange (ClientPtr client
)
87 REQUEST(xRRGetScreenSizeRangeReq
);
89 REQUEST_SIZE_MATCH(xRRGetScreenSizeRangeReq
);
91 return BadImplementation
;
95 SProcRRSetScreenSize (ClientPtr client
)
97 REQUEST(xRRSetScreenSizeReq
);
99 REQUEST_SIZE_MATCH(xRRSetScreenSizeReq
);
101 return BadImplementation
;
105 SProcRRGetScreenResources (ClientPtr client
)
107 REQUEST(xRRGetScreenResourcesReq
);
109 REQUEST_SIZE_MATCH(xRRGetScreenResourcesReq
);
111 return BadImplementation
;
115 SProcRRGetOutputInfo (ClientPtr client
)
117 REQUEST(xRRGetOutputInfoReq
);;
119 REQUEST_SIZE_MATCH(xRRGetOutputInfoReq
);
121 return BadImplementation
;
125 SProcRRListOutputProperties (ClientPtr client
)
127 REQUEST(xRRListOutputPropertiesReq
);
129 REQUEST_SIZE_MATCH(xRRListOutputPropertiesReq
);
131 return BadImplementation
;
135 SProcRRQueryOutputProperty (ClientPtr client
)
137 REQUEST(xRRQueryOutputPropertyReq
);
139 REQUEST_SIZE_MATCH(xRRQueryOutputPropertyReq
);
141 return BadImplementation
;
145 SProcRRConfigureOutputProperty (ClientPtr client
)
147 REQUEST(xRRConfigureOutputPropertyReq
);
149 REQUEST_SIZE_MATCH(xRRConfigureOutputPropertyReq
);
151 return BadImplementation
;
155 SProcRRChangeOutputProperty (ClientPtr client
)
157 REQUEST(xRRChangeOutputPropertyReq
);
159 REQUEST_SIZE_MATCH(xRRChangeOutputPropertyReq
);
161 return BadImplementation
;
165 SProcRRDeleteOutputProperty (ClientPtr client
)
167 REQUEST(xRRDeleteOutputPropertyReq
);
169 REQUEST_SIZE_MATCH(xRRDeleteOutputPropertyReq
);
171 return BadImplementation
;
175 SProcRRGetOutputProperty (ClientPtr client
)
177 REQUEST(xRRGetOutputPropertyReq
);
179 REQUEST_SIZE_MATCH(xRRGetOutputPropertyReq
);
181 return BadImplementation
;
185 SProcRRCreateMode (ClientPtr client
)
187 REQUEST(xRRCreateModeReq
);
189 REQUEST_SIZE_MATCH(xRRCreateModeReq
);
191 return BadImplementation
;
195 SProcRRDestroyMode (ClientPtr client
)
197 REQUEST(xRRDestroyModeReq
);
199 REQUEST_SIZE_MATCH(xRRDestroyModeReq
);
201 return BadImplementation
;
205 SProcRRAddOutputMode (ClientPtr client
)
207 REQUEST(xRRAddOutputModeReq
);
209 REQUEST_SIZE_MATCH(xRRAddOutputModeReq
);
211 return BadImplementation
;
215 SProcRRDeleteOutputMode (ClientPtr client
)
217 REQUEST(xRRDeleteOutputModeReq
);
219 REQUEST_SIZE_MATCH(xRRDeleteOutputModeReq
);
221 return BadImplementation
;
225 SProcRRGetCrtcInfo (ClientPtr client
)
227 REQUEST(xRRGetCrtcInfoReq
);
229 REQUEST_SIZE_MATCH(xRRGetCrtcInfoReq
);
231 return BadImplementation
;
235 SProcRRSetCrtcConfig (ClientPtr client
)
237 REQUEST(xRRSetCrtcConfigReq
);
239 REQUEST_SIZE_MATCH(xRRSetCrtcConfigReq
);
241 return BadImplementation
;
245 SProcRRGetCrtcGammaSize (ClientPtr client
)
247 REQUEST(xRRGetCrtcGammaSizeReq
);
249 REQUEST_SIZE_MATCH(xRRGetCrtcGammaSizeReq
);
251 return BadImplementation
;
255 SProcRRGetCrtcGamma (ClientPtr client
)
257 REQUEST(xRRGetCrtcGammaReq
);
259 REQUEST_SIZE_MATCH(xRRGetCrtcGammaReq
);
261 return BadImplementation
;
265 SProcRRSetCrtcGamma (ClientPtr client
)
267 REQUEST(xRRSetCrtcGammaReq
);
269 REQUEST_SIZE_MATCH(xRRSetCrtcGammaReq
);
271 return BadImplementation
;
274 int (*SProcRandrVector
[RRNumberRequests
])(ClientPtr
) = {
275 SProcRRQueryVersion
, /* 0 */
276 /* we skip 1 to make old clients fail pretty immediately */
277 NULL
, /* 1 SProcRandrOldGetScreenInfo */
278 /* V1.0 apps share the same set screen config request id */
279 SProcRRSetScreenConfig
, /* 2 */
280 NULL
, /* 3 SProcRandrOldScreenChangeSelectInput */
281 /* 3 used to be ScreenChangeSelectInput; deprecated */
282 SProcRRSelectInput
, /* 4 */
283 SProcRRGetScreenInfo
, /* 5 */
285 SProcRRGetScreenSizeRange
, /* 6 */
286 SProcRRSetScreenSize
, /* 7 */
287 SProcRRGetScreenResources
, /* 8 */
288 SProcRRGetOutputInfo
, /* 9 */
289 SProcRRListOutputProperties
,/* 10 */
290 SProcRRQueryOutputProperty
, /* 11 */
291 SProcRRConfigureOutputProperty
, /* 12 */
292 SProcRRChangeOutputProperty
,/* 13 */
293 SProcRRDeleteOutputProperty
,/* 14 */
294 SProcRRGetOutputProperty
, /* 15 */
295 SProcRRCreateMode
, /* 16 */
296 SProcRRDestroyMode
, /* 17 */
297 SProcRRAddOutputMode
, /* 18 */
298 SProcRRDeleteOutputMode
, /* 19 */
299 SProcRRGetCrtcInfo
, /* 20 */
300 SProcRRSetCrtcConfig
, /* 21 */
301 SProcRRGetCrtcGammaSize
, /* 22 */
302 SProcRRGetCrtcGamma
, /* 23 */
303 SProcRRSetCrtcGamma
, /* 24 */