1 | /*
|
---|
2 | * Copyright © 2000 Compaq Computer Corporation
|
---|
3 | * Copyright © 2002 Hewlett-Packard Company
|
---|
4 | * Copyright © 2006 Intel Corporation
|
---|
5 | * Copyright © 2008 Red Hat, Inc.
|
---|
6 | *
|
---|
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.
|
---|
16 | *
|
---|
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
|
---|
23 | * OF THIS SOFTWARE.
|
---|
24 | *
|
---|
25 | * Author: Jim Gettys, Hewlett-Packard Company, Inc.
|
---|
26 | * Keith Packard, Intel Corporation
|
---|
27 | */
|
---|
28 |
|
---|
29 | #ifdef HAVE_DIX_CONFIG_H
|
---|
30 | #include <dix-config.h>
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | #ifndef _RANDRSTR_H_
|
---|
34 | #define _RANDRSTR_H_
|
---|
35 |
|
---|
36 | #include <X11/X.h>
|
---|
37 | #include <X11/Xproto.h>
|
---|
38 | #include "misc.h"
|
---|
39 | #include "os.h"
|
---|
40 | #include "dixstruct.h"
|
---|
41 | #include "resource.h"
|
---|
42 | #include "scrnintstr.h"
|
---|
43 | #include "windowstr.h"
|
---|
44 | #include "pixmapstr.h"
|
---|
45 | #include "extnsionst.h"
|
---|
46 | #include "servermd.h"
|
---|
47 | #include "rrtransform.h"
|
---|
48 | #include <X11/extensions/randr.h>
|
---|
49 | #include <X11/extensions/randrproto.h>
|
---|
50 | #include <X11/extensions/render.h> /* we share subpixel order information */
|
---|
51 | #include "picturestr.h"
|
---|
52 | #include <X11/Xfuncproto.h>
|
---|
53 |
|
---|
54 | /* required for ABI compatibility for now */
|
---|
55 | #define RANDR_10_INTERFACE 1
|
---|
56 | #define RANDR_12_INTERFACE 1
|
---|
57 | #define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
|
---|
58 | #define RANDR_14_INTERFACE 1 /* requires RANDR_13_INTERFACE */
|
---|
59 | #define RANDR_GET_CRTC_INTERFACE 1
|
---|
60 |
|
---|
61 | #define RANDR_INTERFACE_VERSION 0x0104
|
---|
62 |
|
---|
63 | typedef XID RRMode;
|
---|
64 | typedef XID RROutput;
|
---|
65 | typedef XID RRCrtc;
|
---|
66 |
|
---|
67 | extern _X_EXPORT int RREventBase, RRErrorBase;
|
---|
68 |
|
---|
69 | extern _X_EXPORT int (*ProcRandrVector[RRNumberRequests])(ClientPtr);
|
---|
70 | extern _X_EXPORT int (*SProcRandrVector[RRNumberRequests])(ClientPtr);
|
---|
71 |
|
---|
72 | /*
|
---|
73 | * Modeline for a monitor. Name follows directly after this struct
|
---|
74 | */
|
---|
75 |
|
---|
76 | #define RRModeName(pMode) ((char *) (pMode + 1))
|
---|
77 | typedef struct _rrMode RRModeRec, *RRModePtr;
|
---|
78 | typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr;
|
---|
79 | typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr;
|
---|
80 | typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr;
|
---|
81 | typedef struct _rrScreenConfig RRScreenConfigRec, *RRScreenConfigPtr;
|
---|
82 | typedef struct _rrCrtcConfig RRCrtcConfigRec, *RRCrtcConfigPtr;
|
---|
83 | typedef struct _rrOutput RROutputRec, *RROutputPtr;
|
---|
84 |
|
---|
85 | struct _rrMode {
|
---|
86 | int refcnt;
|
---|
87 | xRRModeInfo mode;
|
---|
88 | char *name;
|
---|
89 | ScreenPtr userScreen;
|
---|
90 | };
|
---|
91 |
|
---|
92 | struct _rrPropertyValue {
|
---|
93 | Atom type; /* ignored by server */
|
---|
94 | short format; /* format of data for swapping - 8,16,32 */
|
---|
95 | long size; /* size of data in (format/8) bytes */
|
---|
96 | pointer data; /* private to client */
|
---|
97 | };
|
---|
98 |
|
---|
99 | struct _rrProperty {
|
---|
100 | RRPropertyPtr next;
|
---|
101 | ATOM propertyName;
|
---|
102 | Bool is_pending;
|
---|
103 | Bool range;
|
---|
104 | Bool immutable;
|
---|
105 | int num_valid;
|
---|
106 | INT32 *valid_values;
|
---|
107 | RRPropertyValueRec current, pending;
|
---|
108 | };
|
---|
109 |
|
---|
110 | struct _rrCrtc {
|
---|
111 | RRCrtc id;
|
---|
112 | ScreenPtr pScreen;
|
---|
113 | RRModePtr mode;
|
---|
114 | int x, y;
|
---|
115 | Rotation rotation;
|
---|
116 | Rotation rotations;
|
---|
117 | Bool changed;
|
---|
118 | int numOutputs;
|
---|
119 | RROutputPtr *outputs;
|
---|
120 | int gammaSize;
|
---|
121 | CARD16 *gammaRed;
|
---|
122 | CARD16 *gammaBlue;
|
---|
123 | CARD16 *gammaGreen;
|
---|
124 | void *devPrivate;
|
---|
125 | Bool transforms;
|
---|
126 | PixmapPtr scanoutPixmap;
|
---|
127 | RRTransformRec client_pending_transform;
|
---|
128 | RRTransformRec client_current_transform;
|
---|
129 | PictTransform client_sprite_position_transform;
|
---|
130 | PictTransform client_sprite_image_transform;
|
---|
131 | struct pict_f_transform client_sprite_f_position_transform;
|
---|
132 | struct pict_f_transform client_sprite_f_image_transform;
|
---|
133 |
|
---|
134 | PictTransform transform;
|
---|
135 | struct pict_f_transform f_transform;
|
---|
136 | struct pict_f_transform f_inverse;
|
---|
137 | struct pict_f_transform f_sprite_position; /* crtc from screen */
|
---|
138 | struct pict_f_transform f_sprite_image_inverse; /* image from crtc */
|
---|
139 | };
|
---|
140 |
|
---|
141 | struct _rrScreenConfig {
|
---|
142 | CARD16 screen_pixmap_width;
|
---|
143 | CARD16 screen_pixmap_height;
|
---|
144 | CARD16 screen_width;
|
---|
145 | CARD16 screen_height;
|
---|
146 | CARD32 mm_width;
|
---|
147 | CARD32 mm_height;
|
---|
148 | };
|
---|
149 |
|
---|
150 | struct _rrCrtcConfig {
|
---|
151 | RRCrtcPtr crtc;
|
---|
152 | int x, y;
|
---|
153 | RRModePtr mode;
|
---|
154 | Rotation rotation;
|
---|
155 | int numOutputs;
|
---|
156 | RROutputPtr *outputs;
|
---|
157 | PictTransform sprite_position_transform;
|
---|
158 | PictTransform sprite_image_transform;
|
---|
159 | struct pict_f_transform sprite_position_f_transform;
|
---|
160 | struct pict_f_transform sprite_image_f_transform;
|
---|
161 | PixmapPtr pixmap;
|
---|
162 | int pixmap_x, pixmap_y;
|
---|
163 | };
|
---|
164 |
|
---|
165 | struct _rrOutput {
|
---|
166 | RROutput id;
|
---|
167 | ScreenPtr pScreen;
|
---|
168 | char *name;
|
---|
169 | int nameLength;
|
---|
170 | CARD8 connection;
|
---|
171 | CARD8 subpixelOrder;
|
---|
172 | int mmWidth;
|
---|
173 | int mmHeight;
|
---|
174 | RRCrtcPtr crtc;
|
---|
175 | int numCrtcs;
|
---|
176 | RRCrtcPtr *crtcs;
|
---|
177 | int numClones;
|
---|
178 | RROutputPtr *clones;
|
---|
179 | int numModes;
|
---|
180 | int numPreferred;
|
---|
181 | RRModePtr *modes;
|
---|
182 | int numUserModes;
|
---|
183 | RRModePtr *userModes;
|
---|
184 | Bool changed;
|
---|
185 | RRPropertyPtr properties;
|
---|
186 | Bool pendingProperties;
|
---|
187 | void *devPrivate;
|
---|
188 | };
|
---|
189 |
|
---|
190 | #if RANDR_12_INTERFACE
|
---|
191 | typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
|
---|
192 | CARD16 width,
|
---|
193 | CARD16 height,
|
---|
194 | CARD16 pixWidth,
|
---|
195 | CARD16 pixHeight,
|
---|
196 | CARD32 mmWidth,
|
---|
197 | CARD32 mmHeight);
|
---|
198 |
|
---|
199 | typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
|
---|
200 | RRCrtcPtr crtc,
|
---|
201 | RRModePtr mode,
|
---|
202 | int x,
|
---|
203 | int y,
|
---|
204 | Rotation rotation,
|
---|
205 | int numOutputs,
|
---|
206 | RROutputPtr *outputs,
|
---|
207 | PixmapPtr scanout_pixmap);
|
---|
208 |
|
---|
209 | typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen,
|
---|
210 | RRCrtcPtr crtc);
|
---|
211 |
|
---|
212 | typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen,
|
---|
213 | RRCrtcPtr crtc);
|
---|
214 |
|
---|
215 | typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen,
|
---|
216 | RROutputPtr output,
|
---|
217 | Atom property,
|
---|
218 | RRPropertyValuePtr value);
|
---|
219 |
|
---|
220 | typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr pScreen,
|
---|
221 | RROutputPtr output,
|
---|
222 | RRModePtr mode);
|
---|
223 |
|
---|
224 | typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen,
|
---|
225 | RRModePtr mode);
|
---|
226 |
|
---|
227 | #endif
|
---|
228 |
|
---|
229 | #if RANDR_13_INTERFACE
|
---|
230 | typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen,
|
---|
231 | RROutputPtr output,
|
---|
232 | Atom property);
|
---|
233 | typedef Bool (*RRGetPanningProcPtr) (ScreenPtr pScrn,
|
---|
234 | RRCrtcPtr crtc,
|
---|
235 | BoxPtr totalArea,
|
---|
236 | BoxPtr trackingArea,
|
---|
237 | INT16 *border);
|
---|
238 | typedef Bool (*RRSetPanningProcPtr) (ScreenPtr pScrn,
|
---|
239 | RRCrtcPtr crtc,
|
---|
240 | BoxPtr totalArea,
|
---|
241 | BoxPtr trackingArea,
|
---|
242 | INT16 *border);
|
---|
243 |
|
---|
244 | #endif /* RANDR_13_INTERFACE */
|
---|
245 |
|
---|
246 | typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations);
|
---|
247 | typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
|
---|
248 |
|
---|
249 | /* These are for 1.0 compatibility */
|
---|
250 |
|
---|
251 | typedef struct _rrRefresh {
|
---|
252 | CARD16 rate;
|
---|
253 | RRModePtr mode;
|
---|
254 | } RRScreenRate, *RRScreenRatePtr;
|
---|
255 |
|
---|
256 | typedef struct _rrScreenSize {
|
---|
257 | int id;
|
---|
258 | short width, height;
|
---|
259 | short mmWidth, mmHeight;
|
---|
260 | int nRates;
|
---|
261 | RRScreenRatePtr pRates;
|
---|
262 | } RRScreenSize, *RRScreenSizePtr;
|
---|
263 |
|
---|
264 | #ifdef RANDR_10_INTERFACE
|
---|
265 |
|
---|
266 | typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
|
---|
267 | Rotation rotation,
|
---|
268 | int rate,
|
---|
269 | RRScreenSizePtr pSize);
|
---|
270 |
|
---|
271 | #endif
|
---|
272 |
|
---|
273 | typedef struct {
|
---|
274 | PictFormatPtr format;
|
---|
275 | int maxWidth, maxHeight;
|
---|
276 | int depth;
|
---|
277 | Rotation rotations;
|
---|
278 | } RRScanoutPixmapInfo;
|
---|
279 |
|
---|
280 | typedef RRScanoutPixmapInfo *(*RRQueryScanoutPixmapsPtr) (ScreenPtr pScreen,
|
---|
281 | int *num_info);
|
---|
282 |
|
---|
283 | typedef PixmapPtr (*RRCreateScanoutPixmapPtr) (ScreenPtr pScreen,
|
---|
284 | int width, int height, int depth,
|
---|
285 | Rotation rotations,
|
---|
286 | PictFormatPtr format);
|
---|
287 |
|
---|
288 | typedef void (*RRSetCrtcSpriteTransformPtr) (ScreenPtr pScreen,
|
---|
289 | RRCrtcPtr randr_crtc,
|
---|
290 | struct pict_f_transform *position_transform,
|
---|
291 | struct pict_f_transform *image_transform);
|
---|
292 |
|
---|
293 | typedef void (*RRGetCrtcSpriteTransformPtr) (ScreenPtr pScreen,
|
---|
294 | RRCrtcPtr randr_crtc,
|
---|
295 | struct pict_f_transform *position_transform,
|
---|
296 | struct pict_f_transform *image_transform);
|
---|
297 |
|
---|
298 | typedef Bool (*RRSetCrtcConfigsPtr) (ScreenPtr screen,
|
---|
299 | RRScreenConfigPtr screen_config,
|
---|
300 | RRCrtcConfigPtr crtc_configs,
|
---|
301 | int num_configs);
|
---|
302 |
|
---|
303 | typedef struct _rrScrPriv {
|
---|
304 | /*
|
---|
305 | * 'public' part of the structure; DDXen fill this in
|
---|
306 | * as they initialize
|
---|
307 | */
|
---|
308 | #if RANDR_10_INTERFACE
|
---|
309 | RRSetConfigProcPtr rrSetConfig;
|
---|
310 | #endif
|
---|
311 | RRGetInfoProcPtr rrGetInfo;
|
---|
312 | #if RANDR_12_INTERFACE
|
---|
313 | RRScreenSetSizeProcPtr rrScreenSetSize;
|
---|
314 | RRCrtcSetProcPtr rrCrtcSet;
|
---|
315 | RRCrtcSetGammaProcPtr rrCrtcSetGamma;
|
---|
316 | RRCrtcGetGammaProcPtr rrCrtcGetGamma;
|
---|
317 | RROutputSetPropertyProcPtr rrOutputSetProperty;
|
---|
318 | RROutputValidateModeProcPtr rrOutputValidateMode;
|
---|
319 | RRModeDestroyProcPtr rrModeDestroy;
|
---|
320 | #endif
|
---|
321 | #if RANDR_13_INTERFACE
|
---|
322 | RROutputGetPropertyProcPtr rrOutputGetProperty;
|
---|
323 | RRGetPanningProcPtr rrGetPanning;
|
---|
324 | RRSetPanningProcPtr rrSetPanning;
|
---|
325 | #endif
|
---|
326 | RRQueryScanoutPixmapsPtr rrQueryScanoutPixmaps;
|
---|
327 | RRCreateScanoutPixmapPtr rrCreateScanoutPixmap;
|
---|
328 | RRSetCrtcSpriteTransformPtr rrSetCrtcSpriteTransform;
|
---|
329 | RRGetCrtcSpriteTransformPtr rrGetCrtcSpriteTransform;
|
---|
330 | RRSetCrtcConfigsPtr rrSetCrtcConfigs;
|
---|
331 |
|
---|
332 | /*
|
---|
333 | * Private part of the structure; not considered part of the ABI
|
---|
334 | */
|
---|
335 | TimeStamp lastSetTime; /* last changed by client */
|
---|
336 | TimeStamp lastConfigTime; /* possible configs changed */
|
---|
337 | RRCloseScreenProcPtr CloseScreen;
|
---|
338 |
|
---|
339 | Bool changed; /* some config changed */
|
---|
340 | Bool configChanged; /* configuration changed */
|
---|
341 | Bool layoutChanged; /* screen layout changed */
|
---|
342 |
|
---|
343 | CARD16 minWidth, minHeight;
|
---|
344 | CARD16 maxWidth, maxHeight;
|
---|
345 | CARD16 width, height; /* last known screen size */
|
---|
346 | CARD16 mmWidth, mmHeight; /* last known screen size */
|
---|
347 |
|
---|
348 | int numOutputs;
|
---|
349 | RROutputPtr *outputs;
|
---|
350 | RROutputPtr primaryOutput;
|
---|
351 |
|
---|
352 | int numCrtcs;
|
---|
353 | RRCrtcPtr *crtcs;
|
---|
354 |
|
---|
355 | /* Last known pointer position */
|
---|
356 | RRCrtcPtr pointerCrtc;
|
---|
357 |
|
---|
358 | RRScanoutPixmapInfo *scanout_info;
|
---|
359 | int n_scanout_info;
|
---|
360 | #ifdef RANDR_10_INTERFACE
|
---|
361 | /*
|
---|
362 | * Configuration information
|
---|
363 | */
|
---|
364 | Rotation rotations;
|
---|
365 | CARD16 reqWidth, reqHeight;
|
---|
366 |
|
---|
367 | int nSizes;
|
---|
368 | RRScreenSizePtr pSizes;
|
---|
369 |
|
---|
370 | Rotation rotation;
|
---|
371 | int rate;
|
---|
372 | int size;
|
---|
373 | #endif
|
---|
374 |
|
---|
375 | } rrScrPrivRec, *rrScrPrivPtr;
|
---|
376 |
|
---|
377 | extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
|
---|
378 | #define rrPrivKey (&rrPrivKeyRec)
|
---|
379 |
|
---|
380 | #define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
|
---|
381 | #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
|
---|
382 | #define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p)
|
---|
383 |
|
---|
384 | /*
|
---|
385 | * each window has a list of clients requesting
|
---|
386 | * RRNotify events. Each client has a resource
|
---|
387 | * for each window it selects RRNotify input for,
|
---|
388 | * this resource is used to delete the RRNotifyRec
|
---|
389 | * entry from the per-window queue.
|
---|
390 | */
|
---|
391 |
|
---|
392 | typedef struct _RREvent *RREventPtr;
|
---|
393 |
|
---|
394 | typedef struct _RREvent {
|
---|
395 | RREventPtr next;
|
---|
396 | ClientPtr client;
|
---|
397 | WindowPtr window;
|
---|
398 | XID clientResource;
|
---|
399 | int mask;
|
---|
400 | } RREventRec;
|
---|
401 |
|
---|
402 | typedef struct _RRTimes {
|
---|
403 | TimeStamp setTime;
|
---|
404 | TimeStamp configTime;
|
---|
405 | } RRTimesRec, *RRTimesPtr;
|
---|
406 |
|
---|
407 | typedef struct _RRClient {
|
---|
408 | int major_version;
|
---|
409 | int minor_version;
|
---|
410 | /* RRTimesRec times[0]; */
|
---|
411 | } RRClientRec, *RRClientPtr;
|
---|
412 |
|
---|
413 | extern _X_EXPORT RESTYPE RRClientType, RREventType; /* resource types for event masks */
|
---|
414 | extern _X_EXPORT DevPrivateKeyRec RRClientPrivateKeyRec;
|
---|
415 | #define RRClientPrivateKey (&RRClientPrivateKeyRec)
|
---|
416 | extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType;
|
---|
417 |
|
---|
418 | #define VERIFY_RR_OUTPUT(id, ptr, a)\
|
---|
419 | {\
|
---|
420 | int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
|
---|
421 | RROutputType, client, a);\
|
---|
422 | if (rc != Success) {\
|
---|
423 | client->errorValue = id;\
|
---|
424 | return rc;\
|
---|
425 | }\
|
---|
426 | }
|
---|
427 |
|
---|
428 | #define VERIFY_RR_CRTC(id, ptr, a)\
|
---|
429 | {\
|
---|
430 | int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
|
---|
431 | RRCrtcType, client, a);\
|
---|
432 | if (rc != Success) {\
|
---|
433 | client->errorValue = id;\
|
---|
434 | return rc;\
|
---|
435 | }\
|
---|
436 | }
|
---|
437 |
|
---|
438 | #define VERIFY_RR_MODE(id, ptr, a)\
|
---|
439 | {\
|
---|
440 | int rc = dixLookupResourceByType((pointer *)&(ptr), id,\
|
---|
441 | RRModeType, client, a);\
|
---|
442 | if (rc != Success) {\
|
---|
443 | client->errorValue = id;\
|
---|
444 | return rc;\
|
---|
445 | }\
|
---|
446 | }
|
---|
447 |
|
---|
448 | #define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
|
---|
449 | #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
|
---|
450 |
|
---|
451 | /* Initialize the extension */
|
---|
452 | extern _X_EXPORT void
|
---|
453 | RRExtensionInit (void);
|
---|
454 |
|
---|
455 | #ifdef RANDR_12_INTERFACE
|
---|
456 | /*
|
---|
457 | * Set the range of sizes for the screen
|
---|
458 | */
|
---|
459 | extern _X_EXPORT void
|
---|
460 | RRScreenSetSizeRange (ScreenPtr pScreen,
|
---|
461 | CARD16 minWidth,
|
---|
462 | CARD16 minHeight,
|
---|
463 | CARD16 maxWidth,
|
---|
464 | CARD16 maxHeight);
|
---|
465 | #endif
|
---|
466 |
|
---|
467 | /* rrscreen.c */
|
---|
468 | /*
|
---|
469 | * Notify the extension that the screen size has been changed.
|
---|
470 | * The driver is responsible for calling this whenever it has changed
|
---|
471 | * the size of the screen
|
---|
472 | */
|
---|
473 | extern _X_EXPORT void
|
---|
474 | RRScreenSizeNotify (ScreenPtr pScreen);
|
---|
475 |
|
---|
476 | /*
|
---|
477 | * Request that the screen be resized
|
---|
478 | */
|
---|
479 | extern _X_EXPORT Bool
|
---|
480 | RRScreenSizeSet (ScreenPtr pScreen,
|
---|
481 | CARD16 width,
|
---|
482 | CARD16 height,
|
---|
483 | CARD16 pixWidth,
|
---|
484 | CARD16 pixHeight,
|
---|
485 | CARD32 mmWidth,
|
---|
486 | CARD32 mmHeight);
|
---|
487 |
|
---|
488 | extern _X_EXPORT void
|
---|
489 | RRScreenCurrentConfig(ScreenPtr screen,
|
---|
490 | RRScreenConfigPtr screen_config);
|
---|
491 |
|
---|
492 | /*
|
---|
493 | * Send ConfigureNotify event to root window when 'something' happens
|
---|
494 | */
|
---|
495 | extern _X_EXPORT void
|
---|
496 | RRSendConfigNotify (ScreenPtr pScreen);
|
---|
497 |
|
---|
498 | /*
|
---|
499 | * screen dispatch
|
---|
500 | */
|
---|
501 | extern _X_EXPORT int
|
---|
502 | ProcRRGetScreenSizeRange (ClientPtr client);
|
---|
503 |
|
---|
504 | extern _X_EXPORT int
|
---|
505 | ProcRRSetScreenSize (ClientPtr client);
|
---|
506 |
|
---|
507 | extern _X_EXPORT int
|
---|
508 | ProcRRGetScreenResources (ClientPtr client);
|
---|
509 |
|
---|
510 | extern _X_EXPORT int
|
---|
511 | ProcRRGetScreenResourcesCurrent (ClientPtr client);
|
---|
512 |
|
---|
513 | extern _X_EXPORT int
|
---|
514 | ProcRRSetScreenConfig (ClientPtr client);
|
---|
515 |
|
---|
516 | extern _X_EXPORT int
|
---|
517 | ProcRRGetScreenInfo (ClientPtr client);
|
---|
518 |
|
---|
519 | /*
|
---|
520 | * Deliver a ScreenNotify event
|
---|
521 | */
|
---|
522 | extern _X_EXPORT void
|
---|
523 | RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
|
---|
524 |
|
---|
525 | /* randr.c */
|
---|
526 | /*
|
---|
527 | * Send all pending events
|
---|
528 | */
|
---|
529 | extern _X_EXPORT void
|
---|
530 | RRTellChanged (ScreenPtr pScreen);
|
---|
531 |
|
---|
532 | /*
|
---|
533 | * Poll the driver for changed information
|
---|
534 | */
|
---|
535 | extern _X_EXPORT Bool
|
---|
536 | RRGetInfo (ScreenPtr pScreen, Bool force_query);
|
---|
537 |
|
---|
538 | extern _X_EXPORT Bool RRInit (void);
|
---|
539 |
|
---|
540 | extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
|
---|
541 |
|
---|
542 | extern _X_EXPORT RROutputPtr
|
---|
543 | RRFirstOutput (ScreenPtr pScreen);
|
---|
544 |
|
---|
545 | extern _X_EXPORT Rotation
|
---|
546 | RRGetRotation (ScreenPtr pScreen);
|
---|
547 |
|
---|
548 | extern _X_EXPORT CARD16
|
---|
549 | RRVerticalRefresh (xRRModeInfo *mode);
|
---|
550 |
|
---|
551 | extern _X_EXPORT RRScanoutPixmapInfo *
|
---|
552 | RRQueryScanoutPixmapInfo(ScreenPtr screen, int *n_info);
|
---|
553 |
|
---|
554 | #ifdef RANDR_10_INTERFACE
|
---|
555 | /*
|
---|
556 | * This is the old interface, deprecated but left
|
---|
557 | * around for compatibility
|
---|
558 | */
|
---|
559 |
|
---|
560 | /*
|
---|
561 | * Then, register the specific size with the screen
|
---|
562 | */
|
---|
563 |
|
---|
564 | extern _X_EXPORT RRScreenSizePtr
|
---|
565 | RRRegisterSize (ScreenPtr pScreen,
|
---|
566 | short width,
|
---|
567 | short height,
|
---|
568 | short mmWidth,
|
---|
569 | short mmHeight);
|
---|
570 |
|
---|
571 | extern _X_EXPORT Bool
|
---|
572 | RRRegisterRate (ScreenPtr pScreen,
|
---|
573 | RRScreenSizePtr pSize,
|
---|
574 | int rate);
|
---|
575 |
|
---|
576 | /*
|
---|
577 | * Finally, set the current configuration of the screen
|
---|
578 | */
|
---|
579 |
|
---|
580 | extern _X_EXPORT void
|
---|
581 | RRSetCurrentConfig (ScreenPtr pScreen,
|
---|
582 | Rotation rotation,
|
---|
583 | int rate,
|
---|
584 | RRScreenSizePtr pSize);
|
---|
585 |
|
---|
586 | extern _X_EXPORT Bool RRScreenInit (ScreenPtr pScreen);
|
---|
587 |
|
---|
588 | extern _X_EXPORT Rotation
|
---|
589 | RRGetRotation (ScreenPtr pScreen);
|
---|
590 |
|
---|
591 | #endif
|
---|
592 |
|
---|
593 | /* rrcrtc.c */
|
---|
594 |
|
---|
595 | /*
|
---|
596 | * Notify the CRTC of some change; layoutChanged indicates that
|
---|
597 | * some position or size element changed
|
---|
598 | */
|
---|
599 | extern _X_EXPORT void
|
---|
600 | RRCrtcChanged (RRCrtcPtr crtc, Bool layoutChanged);
|
---|
601 |
|
---|
602 | /*
|
---|
603 | * Create a CRTC
|
---|
604 | */
|
---|
605 | extern _X_EXPORT RRCrtcPtr
|
---|
606 | RRCrtcCreate (ScreenPtr pScreen, void *devPrivate);
|
---|
607 |
|
---|
608 | /*
|
---|
609 | * Set the allowed rotations on a CRTC
|
---|
610 | */
|
---|
611 | extern _X_EXPORT void
|
---|
612 | RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations);
|
---|
613 |
|
---|
614 | /*
|
---|
615 | * Set whether transforms are allowed on a CRTC
|
---|
616 | */
|
---|
617 | extern _X_EXPORT void
|
---|
618 | RRCrtcSetTransformSupport (RRCrtcPtr crtc, Bool transforms);
|
---|
619 |
|
---|
620 | /*
|
---|
621 | * Notify the extension that the Crtc has been reconfigured,
|
---|
622 | * the driver calls this whenever it has updated the mode
|
---|
623 | */
|
---|
624 | extern _X_EXPORT Bool
|
---|
625 | RRCrtcNotify (RRCrtcPtr crtc,
|
---|
626 | RRModePtr mode,
|
---|
627 | int x,
|
---|
628 | int y,
|
---|
629 | Rotation rotation,
|
---|
630 | RRTransformPtr transform,
|
---|
631 | int numOutputs,
|
---|
632 | RROutputPtr *outputs,
|
---|
633 | PixmapPtr scanoutPixmap);
|
---|
634 |
|
---|
635 | extern _X_EXPORT void
|
---|
636 | RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
|
---|
637 |
|
---|
638 | /*
|
---|
639 | * Request that the Crtc be reconfigured
|
---|
640 | */
|
---|
641 | extern _X_EXPORT Bool
|
---|
642 | RRCrtcSet (RRCrtcPtr crtc,
|
---|
643 | RRModePtr mode,
|
---|
644 | int x,
|
---|
645 | int y,
|
---|
646 | Rotation rotation,
|
---|
647 | int numOutput,
|
---|
648 | RROutputPtr *outputs,
|
---|
649 | PixmapPtr scanout_pixmap);
|
---|
650 |
|
---|
651 | /*
|
---|
652 | * Request that the Crtc gamma be changed
|
---|
653 | */
|
---|
654 |
|
---|
655 | extern _X_EXPORT Bool
|
---|
656 | RRCrtcGammaSet (RRCrtcPtr crtc,
|
---|
657 | CARD16 *red,
|
---|
658 | CARD16 *green,
|
---|
659 | CARD16 *blue);
|
---|
660 |
|
---|
661 | /*
|
---|
662 | * Request current gamma back from the DDX (if possible).
|
---|
663 | * This includes gamma size.
|
---|
664 | */
|
---|
665 |
|
---|
666 | extern _X_EXPORT Bool
|
---|
667 | RRCrtcGammaGet(RRCrtcPtr crtc);
|
---|
668 |
|
---|
669 | /*
|
---|
670 | * Notify the extension that the Crtc gamma has been changed
|
---|
671 | * The driver calls this whenever it has changed the gamma values
|
---|
672 | * in the RRCrtcRec
|
---|
673 | */
|
---|
674 |
|
---|
675 | extern _X_EXPORT Bool
|
---|
676 | RRCrtcGammaNotify (RRCrtcPtr crtc);
|
---|
677 |
|
---|
678 | void
|
---|
679 | RRModeGetScanoutSize (RRModePtr mode, struct pixman_f_transform *transform,
|
---|
680 | int *width, int *height);
|
---|
681 |
|
---|
682 | /*
|
---|
683 | * Set the size of the gamma table at server startup time
|
---|
684 | */
|
---|
685 |
|
---|
686 | extern _X_EXPORT Bool
|
---|
687 | RRCrtcGammaSetSize (RRCrtcPtr crtc,
|
---|
688 | int size);
|
---|
689 |
|
---|
690 | /*
|
---|
691 | * Return the area of the frame buffer scanned out by the crtc,
|
---|
692 | * taking into account the current mode and rotation
|
---|
693 | */
|
---|
694 |
|
---|
695 | extern _X_EXPORT void
|
---|
696 | RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
|
---|
697 |
|
---|
698 | /*
|
---|
699 | * Return crtc transform
|
---|
700 | */
|
---|
701 | extern _X_EXPORT RRTransformPtr
|
---|
702 | RRCrtcGetTransform (RRCrtcPtr crtc);
|
---|
703 |
|
---|
704 | /*
|
---|
705 | * Check whether the pending and current transforms are the same
|
---|
706 | */
|
---|
707 | extern _X_EXPORT Bool
|
---|
708 | RRCrtcPendingTransform (RRCrtcPtr crtc);
|
---|
709 |
|
---|
710 | /*
|
---|
711 | * Destroy a Crtc at shutdown
|
---|
712 | */
|
---|
713 | extern _X_EXPORT void
|
---|
714 | RRCrtcDestroy (RRCrtcPtr crtc);
|
---|
715 |
|
---|
716 |
|
---|
717 | /*
|
---|
718 | * Set the pending CRTC transformation
|
---|
719 | */
|
---|
720 |
|
---|
721 | extern _X_EXPORT int
|
---|
722 | RRCrtcTransformSet (RRCrtcPtr crtc,
|
---|
723 | PictTransformPtr transform,
|
---|
724 | struct pict_f_transform *f_transform,
|
---|
725 | struct pict_f_transform *f_inverse,
|
---|
726 | char *filter,
|
---|
727 | int filter_len,
|
---|
728 | xFixed *params,
|
---|
729 | int nparams);
|
---|
730 |
|
---|
731 | /*
|
---|
732 | * Initialize crtc type
|
---|
733 | */
|
---|
734 | extern _X_EXPORT Bool
|
---|
735 | RRCrtcInit (void);
|
---|
736 |
|
---|
737 | /*
|
---|
738 | * Initialize crtc type error value
|
---|
739 | */
|
---|
740 | extern _X_EXPORT void
|
---|
741 | RRCrtcInitErrorValue (void);
|
---|
742 |
|
---|
743 | /*
|
---|
744 | * Free a set of crtc configs and their attached output arrays
|
---|
745 | */
|
---|
746 | void
|
---|
747 | RRFreeCrtcConfigs(RRCrtcConfigPtr configs, int num_configs);
|
---|
748 |
|
---|
749 | /*
|
---|
750 | * Convert the current crtc configuration into an RRCrtcConfig
|
---|
751 | */
|
---|
752 | extern _X_EXPORT Bool
|
---|
753 | RRCrtcCurrentConfig(RRCrtcPtr crtc,
|
---|
754 | RRCrtcConfigPtr crtc_config);
|
---|
755 |
|
---|
756 | /*
|
---|
757 | * Figure out whether the specific crtc_config can fit
|
---|
758 | * within the screen_config
|
---|
759 | */
|
---|
760 | Bool
|
---|
761 | RRScreenCoversCrtc(RRScreenConfigPtr screen_config,
|
---|
762 | RRCrtcConfigPtr crtc_config,
|
---|
763 | RRTransformPtr client_transform,
|
---|
764 | XID *errorValue);
|
---|
765 |
|
---|
766 | /*
|
---|
767 | * Set a screen and set of crtc configurations in one operation
|
---|
768 | */
|
---|
769 | Bool
|
---|
770 | RRSetCrtcConfigs(ScreenPtr screen,
|
---|
771 | RRScreenConfigPtr screen_config,
|
---|
772 | RRCrtcConfigPtr crtc_configs,
|
---|
773 | int num_configs);
|
---|
774 |
|
---|
775 | /*
|
---|
776 | * Crtc dispatch
|
---|
777 | */
|
---|
778 |
|
---|
779 | extern _X_EXPORT int
|
---|
780 | ProcRRGetCrtcInfo (ClientPtr client);
|
---|
781 |
|
---|
782 | extern _X_EXPORT int
|
---|
783 | ProcRRSetCrtcConfig (ClientPtr client);
|
---|
784 |
|
---|
785 | extern _X_EXPORT int
|
---|
786 | ProcRRGetCrtcGammaSize (ClientPtr client);
|
---|
787 |
|
---|
788 | extern _X_EXPORT int
|
---|
789 | ProcRRGetCrtcGamma (ClientPtr client);
|
---|
790 |
|
---|
791 | extern _X_EXPORT int
|
---|
792 | ProcRRSetCrtcGamma (ClientPtr client);
|
---|
793 |
|
---|
794 | extern _X_EXPORT int
|
---|
795 | ProcRRSetCrtcTransform (ClientPtr client);
|
---|
796 |
|
---|
797 | extern _X_EXPORT int
|
---|
798 | ProcRRGetCrtcTransform (ClientPtr client);
|
---|
799 |
|
---|
800 | extern _X_EXPORT int
|
---|
801 | ProcRRSetCrtcConfigs (ClientPtr client);
|
---|
802 |
|
---|
803 | int
|
---|
804 | ProcRRGetPanning (ClientPtr client);
|
---|
805 |
|
---|
806 | int
|
---|
807 | ProcRRSetPanning (ClientPtr client);
|
---|
808 |
|
---|
809 | void
|
---|
810 | RRCrtcSpriteTransformSet(RRCrtcPtr crtc,
|
---|
811 | PictTransform *position_transform,
|
---|
812 | PictTransform *image_transform,
|
---|
813 | struct pict_f_transform *f_position_transform,
|
---|
814 | struct pict_f_transform *f_image_transform);
|
---|
815 |
|
---|
816 | int
|
---|
817 | ProcRRQueryScanoutPixmaps (ClientPtr client);
|
---|
818 |
|
---|
819 | int
|
---|
820 | ProcRRCreateScanoutPixmap (ClientPtr client);
|
---|
821 |
|
---|
822 | int
|
---|
823 | ProcRRSetCrtcPixmapConfig (ClientPtr client);
|
---|
824 |
|
---|
825 | int
|
---|
826 | ProcRRSetCrtcSpriteTransform (ClientPtr client);
|
---|
827 |
|
---|
828 | int
|
---|
829 | ProcRRGetCrtcSpriteTransform (ClientPtr client);
|
---|
830 |
|
---|
831 | int
|
---|
832 | ProcRRSetCrtcConfigs (ClientPtr client);
|
---|
833 |
|
---|
834 | /* rrdispatch.c */
|
---|
835 | extern _X_EXPORT Bool
|
---|
836 | RRClientKnowsRates (ClientPtr pClient);
|
---|
837 |
|
---|
838 | /* rrmode.c */
|
---|
839 | /*
|
---|
840 | * Find, and if necessary, create a mode
|
---|
841 | */
|
---|
842 |
|
---|
843 | extern _X_EXPORT RRModePtr
|
---|
844 | RRModeGet (xRRModeInfo *modeInfo,
|
---|
845 | const char *name);
|
---|
846 |
|
---|
847 | /*
|
---|
848 | * Destroy a mode.
|
---|
849 | */
|
---|
850 |
|
---|
851 | extern _X_EXPORT void
|
---|
852 | RRModeDestroy (RRModePtr mode);
|
---|
853 |
|
---|
854 | /*
|
---|
855 | * Return a list of modes that are valid for some output in pScreen
|
---|
856 | */
|
---|
857 | extern _X_EXPORT RRModePtr *
|
---|
858 | RRModesForScreen (ScreenPtr pScreen, int *num_ret);
|
---|
859 |
|
---|
860 | /*
|
---|
861 | * Initialize mode type
|
---|
862 | */
|
---|
863 | extern _X_EXPORT Bool
|
---|
864 | RRModeInit (void);
|
---|
865 |
|
---|
866 | /*
|
---|
867 | * Initialize mode type error value
|
---|
868 | */
|
---|
869 | extern _X_EXPORT void
|
---|
870 | RRModeInitErrorValue (void);
|
---|
871 |
|
---|
872 | extern _X_EXPORT int
|
---|
873 | ProcRRCreateMode (ClientPtr client);
|
---|
874 |
|
---|
875 | extern _X_EXPORT int
|
---|
876 | ProcRRDestroyMode (ClientPtr client);
|
---|
877 |
|
---|
878 | extern _X_EXPORT int
|
---|
879 | ProcRRAddOutputMode (ClientPtr client);
|
---|
880 |
|
---|
881 | extern _X_EXPORT int
|
---|
882 | ProcRRDeleteOutputMode (ClientPtr client);
|
---|
883 |
|
---|
884 | /* rroutput.c */
|
---|
885 |
|
---|
886 | /*
|
---|
887 | * Notify the output of some change. configChanged indicates whether
|
---|
888 | * any external configuration (mode list, clones, connected status)
|
---|
889 | * has changed, or whether the change was strictly internal
|
---|
890 | * (which crtc is in use)
|
---|
891 | */
|
---|
892 | extern _X_EXPORT void
|
---|
893 | RROutputChanged (RROutputPtr output, Bool configChanged);
|
---|
894 |
|
---|
895 | /*
|
---|
896 | * Create an output
|
---|
897 | */
|
---|
898 |
|
---|
899 | extern _X_EXPORT RROutputPtr
|
---|
900 | RROutputCreate (ScreenPtr pScreen,
|
---|
901 | const char *name,
|
---|
902 | int nameLength,
|
---|
903 | void *devPrivate);
|
---|
904 |
|
---|
905 | /*
|
---|
906 | * Notify extension that output parameters have been changed
|
---|
907 | */
|
---|
908 | extern _X_EXPORT Bool
|
---|
909 | RROutputSetClones (RROutputPtr output,
|
---|
910 | RROutputPtr *clones,
|
---|
911 | int numClones);
|
---|
912 |
|
---|
913 | extern _X_EXPORT Bool
|
---|
914 | RROutputSetModes (RROutputPtr output,
|
---|
915 | RRModePtr *modes,
|
---|
916 | int numModes,
|
---|
917 | int numPreferred);
|
---|
918 |
|
---|
919 | extern _X_EXPORT int
|
---|
920 | RROutputAddUserMode (RROutputPtr output,
|
---|
921 | RRModePtr mode);
|
---|
922 |
|
---|
923 | extern _X_EXPORT int
|
---|
924 | RROutputDeleteUserMode (RROutputPtr output,
|
---|
925 | RRModePtr mode);
|
---|
926 |
|
---|
927 | extern _X_EXPORT Bool
|
---|
928 | RROutputSetCrtcs (RROutputPtr output,
|
---|
929 | RRCrtcPtr *crtcs,
|
---|
930 | int numCrtcs);
|
---|
931 |
|
---|
932 | extern _X_EXPORT Bool
|
---|
933 | RROutputSetConnection (RROutputPtr output,
|
---|
934 | CARD8 connection);
|
---|
935 |
|
---|
936 | extern _X_EXPORT Bool
|
---|
937 | RROutputSetSubpixelOrder (RROutputPtr output,
|
---|
938 | int subpixelOrder);
|
---|
939 |
|
---|
940 | extern _X_EXPORT Bool
|
---|
941 | RROutputSetPhysicalSize (RROutputPtr output,
|
---|
942 | int mmWidth,
|
---|
943 | int mmHeight);
|
---|
944 |
|
---|
945 | extern _X_EXPORT void
|
---|
946 | RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
|
---|
947 |
|
---|
948 | extern _X_EXPORT void
|
---|
949 | RROutputDestroy (RROutputPtr output);
|
---|
950 |
|
---|
951 | extern _X_EXPORT int
|
---|
952 | ProcRRGetOutputInfo (ClientPtr client);
|
---|
953 |
|
---|
954 | extern _X_EXPORT int
|
---|
955 | ProcRRSetOutputPrimary (ClientPtr client);
|
---|
956 |
|
---|
957 | extern _X_EXPORT int
|
---|
958 | ProcRRGetOutputPrimary (ClientPtr client);
|
---|
959 |
|
---|
960 | /*
|
---|
961 | * Initialize output type
|
---|
962 | */
|
---|
963 | extern _X_EXPORT Bool
|
---|
964 | RROutputInit (void);
|
---|
965 |
|
---|
966 | /*
|
---|
967 | * Initialize output type error value
|
---|
968 | */
|
---|
969 | extern _X_EXPORT void
|
---|
970 | RROutputInitErrorValue (void);
|
---|
971 |
|
---|
972 | /* rrpointer.c */
|
---|
973 | extern _X_EXPORT void
|
---|
974 | RRPointerMoved (ScreenPtr pScreen, int x, int y);
|
---|
975 |
|
---|
976 | extern _X_EXPORT void
|
---|
977 | RRPointerScreenConfigured (ScreenPtr pScreen);
|
---|
978 |
|
---|
979 | /* rrproperty.c */
|
---|
980 |
|
---|
981 | extern _X_EXPORT void
|
---|
982 | RRDeleteAllOutputProperties (RROutputPtr output);
|
---|
983 |
|
---|
984 | extern _X_EXPORT RRPropertyValuePtr
|
---|
985 | RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending);
|
---|
986 |
|
---|
987 | extern _X_EXPORT RRPropertyPtr
|
---|
988 | RRQueryOutputProperty (RROutputPtr output, Atom property);
|
---|
989 |
|
---|
990 | extern _X_EXPORT void
|
---|
991 | RRDeleteOutputProperty (RROutputPtr output, Atom property);
|
---|
992 |
|
---|
993 | extern _X_EXPORT Bool
|
---|
994 | RRPostPendingProperties (RROutputPtr output);
|
---|
995 |
|
---|
996 | extern _X_EXPORT int
|
---|
997 | RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
|
---|
998 | int format, int mode, unsigned long len,
|
---|
999 | pointer value, Bool sendevent, Bool pending);
|
---|
1000 |
|
---|
1001 | extern _X_EXPORT int
|
---|
1002 | RRConfigureOutputProperty (RROutputPtr output, Atom property,
|
---|
1003 | Bool pending, Bool range, Bool immutable,
|
---|
1004 | int num_values, INT32 *values);
|
---|
1005 | extern _X_EXPORT int
|
---|
1006 | ProcRRChangeOutputProperty (ClientPtr client);
|
---|
1007 |
|
---|
1008 | extern _X_EXPORT int
|
---|
1009 | ProcRRGetOutputProperty (ClientPtr client);
|
---|
1010 |
|
---|
1011 | extern _X_EXPORT int
|
---|
1012 | ProcRRListOutputProperties (ClientPtr client);
|
---|
1013 |
|
---|
1014 | extern _X_EXPORT int
|
---|
1015 | ProcRRQueryOutputProperty (ClientPtr client);
|
---|
1016 |
|
---|
1017 | extern _X_EXPORT int
|
---|
1018 | ProcRRConfigureOutputProperty (ClientPtr client);
|
---|
1019 |
|
---|
1020 | extern _X_EXPORT int
|
---|
1021 | ProcRRDeleteOutputProperty (ClientPtr client);
|
---|
1022 |
|
---|
1023 | /* rrsprite.c */
|
---|
1024 | extern _X_EXPORT int
|
---|
1025 | ProcRRSetCrtcSpriteTransform (ClientPtr client);
|
---|
1026 |
|
---|
1027 | extern _X_EXPORT int
|
---|
1028 | ProcRRGetCrtcSpriteTransform (ClientPtr client);
|
---|
1029 |
|
---|
1030 | /* rrxinerama.c */
|
---|
1031 | #ifdef XINERAMA
|
---|
1032 | extern _X_EXPORT void
|
---|
1033 | RRXineramaExtensionInit(void);
|
---|
1034 | #endif
|
---|
1035 |
|
---|
1036 | /* mirrcrtc.c */
|
---|
1037 | Bool
|
---|
1038 | miRRSetScreenConfig(ScreenPtr screen,
|
---|
1039 | RRScreenConfigPtr screen_config);
|
---|
1040 |
|
---|
1041 | Bool
|
---|
1042 | miRRSetCrtcConfig(RRCrtcConfigPtr crtc_config);
|
---|
1043 |
|
---|
1044 | Bool
|
---|
1045 | miRRDisableCrtc(RRCrtcPtr crtc);
|
---|
1046 |
|
---|
1047 | Bool
|
---|
1048 | miRRCheckDisableCrtc(RRScreenConfigPtr new_screen_config,
|
---|
1049 | RRCrtcConfigPtr old_crtc_config);
|
---|
1050 |
|
---|
1051 | Bool
|
---|
1052 | miRRSetCrtcConfigs(ScreenPtr screen,
|
---|
1053 | RRScreenConfigPtr screen_config,
|
---|
1054 | RRCrtcConfigPtr crtc_configs,
|
---|
1055 | int num_configs);
|
---|
1056 |
|
---|
1057 | #endif /* _RANDRSTR_H_ */
|
---|
1058 |
|
---|
1059 | /*
|
---|
1060 |
|
---|
1061 | randr extension implementation structure
|
---|
1062 |
|
---|
1063 | Query state:
|
---|
1064 | ProcRRGetScreenInfo/ProcRRGetScreenResources
|
---|
1065 | RRGetInfo
|
---|
1066 |
|
---|
1067 | • Request configuration from driver, either 1.0 or 1.2 style
|
---|
1068 | • These functions only record state changes, all
|
---|
1069 | other actions are pended until RRTellChanged is called
|
---|
1070 |
|
---|
1071 | ->rrGetInfo
|
---|
1072 | 1.0:
|
---|
1073 | RRRegisterSize
|
---|
1074 | RRRegisterRate
|
---|
1075 | RRSetCurrentConfig
|
---|
1076 | 1.2:
|
---|
1077 | RRScreenSetSizeRange
|
---|
1078 | RROutputSetCrtcs
|
---|
1079 | RRModeGet
|
---|
1080 | RROutputSetModes
|
---|
1081 | RROutputSetConnection
|
---|
1082 | RROutputSetSubpixelOrder
|
---|
1083 | RROutputSetClones
|
---|
1084 | RRCrtcNotify
|
---|
1085 |
|
---|
1086 | • Must delay scanning configuration until after ->rrGetInfo returns
|
---|
1087 | because some drivers will call SetCurrentConfig in the middle
|
---|
1088 | of the ->rrGetInfo operation.
|
---|
1089 |
|
---|
1090 | 1.0:
|
---|
1091 |
|
---|
1092 | • Scan old configuration, mirror to new structures
|
---|
1093 |
|
---|
1094 | RRScanOldConfig
|
---|
1095 | RRCrtcCreate
|
---|
1096 | RROutputCreate
|
---|
1097 | RROutputSetCrtcs
|
---|
1098 | RROutputSetConnection
|
---|
1099 | RROutputSetSubpixelOrder
|
---|
1100 | RROldModeAdd • This adds modes one-at-a-time
|
---|
1101 | RRModeGet
|
---|
1102 | RRCrtcNotify
|
---|
1103 |
|
---|
1104 | • send events, reset pointer if necessary
|
---|
1105 |
|
---|
1106 | RRTellChanged
|
---|
1107 | WalkTree (sending events)
|
---|
1108 |
|
---|
1109 | • when layout has changed:
|
---|
1110 | RRPointerScreenConfigured
|
---|
1111 | RRSendConfigNotify
|
---|
1112 |
|
---|
1113 | Asynchronous state setting (1.2 only)
|
---|
1114 | When setting state asynchronously, the driver invokes the
|
---|
1115 | ->rrGetInfo function and then calls RRTellChanged to flush
|
---|
1116 | the changes to the clients and reset pointer if necessary
|
---|
1117 |
|
---|
1118 | Set state
|
---|
1119 |
|
---|
1120 | ProcRRSetScreenConfig
|
---|
1121 | RRCrtcSet
|
---|
1122 | 1.2:
|
---|
1123 | ->rrCrtcSet
|
---|
1124 | RRCrtcNotify
|
---|
1125 | 1.0:
|
---|
1126 | ->rrSetConfig
|
---|
1127 | RRCrtcNotify
|
---|
1128 | RRTellChanged
|
---|
1129 | */
|
---|