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_GET_CRTC_INTERFACE 1
|
---|
59 |
|
---|
60 | #define RANDR_INTERFACE_VERSION 0x0104
|
---|
61 |
|
---|
62 | typedef XID RRMode;
|
---|
63 | typedef XID RROutput;
|
---|
64 | typedef XID RRCrtc;
|
---|
65 | typedef XID RRProvider;
|
---|
66 |
|
---|
67 | extern int RREventBase, RRErrorBase;
|
---|
68 |
|
---|
69 | extern int (*ProcRandrVector[RRNumberRequests]) (ClientPtr);
|
---|
70 | extern 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 _rrOutput RROutputRec, *RROutputPtr;
|
---|
82 | typedef struct _rrProvider RRProviderRec, *RRProviderPtr;
|
---|
83 | typedef struct _rrMonitor RRMonitorRec, *RRMonitorPtr;
|
---|
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 | void *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 | RRTransformRec client_pending_transform;
|
---|
127 | RRTransformRec client_current_transform;
|
---|
128 | PictTransform transform;
|
---|
129 | struct pict_f_transform f_transform;
|
---|
130 | struct pict_f_transform f_inverse;
|
---|
131 |
|
---|
132 | PixmapPtr scanout_pixmap;
|
---|
133 | };
|
---|
134 |
|
---|
135 | struct _rrOutput {
|
---|
136 | RROutput id;
|
---|
137 | ScreenPtr pScreen;
|
---|
138 | char *name;
|
---|
139 | int nameLength;
|
---|
140 | CARD8 connection;
|
---|
141 | CARD8 subpixelOrder;
|
---|
142 | int mmWidth;
|
---|
143 | int mmHeight;
|
---|
144 | RRCrtcPtr crtc;
|
---|
145 | int numCrtcs;
|
---|
146 | RRCrtcPtr *crtcs;
|
---|
147 | int numClones;
|
---|
148 | RROutputPtr *clones;
|
---|
149 | int numModes;
|
---|
150 | int numPreferred;
|
---|
151 | RRModePtr *modes;
|
---|
152 | int numUserModes;
|
---|
153 | RRModePtr *userModes;
|
---|
154 | Bool changed;
|
---|
155 | RRPropertyPtr properties;
|
---|
156 | Bool pendingProperties;
|
---|
157 | void *devPrivate;
|
---|
158 | };
|
---|
159 |
|
---|
160 | struct _rrProvider {
|
---|
161 | RRProvider id;
|
---|
162 | ScreenPtr pScreen;
|
---|
163 | uint32_t capabilities;
|
---|
164 | char *name;
|
---|
165 | int nameLength;
|
---|
166 | RRPropertyPtr properties;
|
---|
167 | Bool pendingProperties;
|
---|
168 | Bool changed;
|
---|
169 | struct _rrProvider *offload_sink;
|
---|
170 | struct _rrProvider *output_source;
|
---|
171 | };
|
---|
172 |
|
---|
173 | typedef struct _rrMonitorGeometry {
|
---|
174 | BoxRec box;
|
---|
175 | CARD32 mmWidth;
|
---|
176 | CARD32 mmHeight;
|
---|
177 | } RRMonitorGeometryRec, *RRMonitorGeometryPtr;
|
---|
178 |
|
---|
179 | struct _rrMonitor {
|
---|
180 | Atom name;
|
---|
181 | ScreenPtr pScreen;
|
---|
182 | int numOutputs;
|
---|
183 | RROutput *outputs;
|
---|
184 | Bool primary;
|
---|
185 | Bool automatic;
|
---|
186 | RRMonitorGeometryRec geometry;
|
---|
187 | };
|
---|
188 |
|
---|
189 | #if RANDR_12_INTERFACE
|
---|
190 | typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
|
---|
191 | CARD16 width,
|
---|
192 | CARD16 height,
|
---|
193 | CARD32 mmWidth, CARD32 mmHeight);
|
---|
194 |
|
---|
195 | typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
|
---|
196 | RRCrtcPtr crtc,
|
---|
197 | RRModePtr mode,
|
---|
198 | int x,
|
---|
199 | int y,
|
---|
200 | Rotation rotation,
|
---|
201 | int numOutputs, RROutputPtr * outputs);
|
---|
202 |
|
---|
203 | typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
|
---|
204 |
|
---|
205 | typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
|
---|
206 |
|
---|
207 | typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen,
|
---|
208 | RROutputPtr output,
|
---|
209 | Atom property,
|
---|
210 | RRPropertyValuePtr value);
|
---|
211 |
|
---|
212 | typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr pScreen,
|
---|
213 | RROutputPtr output,
|
---|
214 | RRModePtr mode);
|
---|
215 |
|
---|
216 | typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen, RRModePtr mode);
|
---|
217 |
|
---|
218 | #endif
|
---|
219 |
|
---|
220 | #if RANDR_13_INTERFACE
|
---|
221 | typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen,
|
---|
222 | RROutputPtr output, Atom property);
|
---|
223 | typedef Bool (*RRGetPanningProcPtr) (ScreenPtr pScrn,
|
---|
224 | RRCrtcPtr crtc,
|
---|
225 | BoxPtr totalArea,
|
---|
226 | BoxPtr trackingArea, INT16 *border);
|
---|
227 | typedef Bool (*RRSetPanningProcPtr) (ScreenPtr pScrn,
|
---|
228 | RRCrtcPtr crtc,
|
---|
229 | BoxPtr totalArea,
|
---|
230 | BoxPtr trackingArea, INT16 *border);
|
---|
231 |
|
---|
232 | #endif /* RANDR_13_INTERFACE */
|
---|
233 |
|
---|
234 | typedef Bool (*RRProviderGetPropertyProcPtr) (ScreenPtr pScreen,
|
---|
235 | RRProviderPtr provider, Atom property);
|
---|
236 | typedef Bool (*RRProviderSetPropertyProcPtr) (ScreenPtr pScreen,
|
---|
237 | RRProviderPtr provider,
|
---|
238 | Atom property,
|
---|
239 | RRPropertyValuePtr value);
|
---|
240 |
|
---|
241 | typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation * rotations);
|
---|
242 | typedef Bool (*RRCloseScreenProcPtr) (ScreenPtr pscreen);
|
---|
243 |
|
---|
244 | typedef Bool (*RRProviderSetOutputSourceProcPtr)(ScreenPtr pScreen,
|
---|
245 | RRProviderPtr provider,
|
---|
246 | RRProviderPtr output_source);
|
---|
247 |
|
---|
248 | typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen,
|
---|
249 | RRProviderPtr provider,
|
---|
250 | RRProviderPtr offload_sink);
|
---|
251 |
|
---|
252 |
|
---|
253 | typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen,
|
---|
254 | RRProviderPtr provider);
|
---|
255 |
|
---|
256 | /* These are for 1.0 compatibility */
|
---|
257 |
|
---|
258 | typedef struct _rrRefresh {
|
---|
259 | CARD16 rate;
|
---|
260 | RRModePtr mode;
|
---|
261 | } RRScreenRate, *RRScreenRatePtr;
|
---|
262 |
|
---|
263 | typedef struct _rrScreenSize {
|
---|
264 | int id;
|
---|
265 | short width, height;
|
---|
266 | short mmWidth, mmHeight;
|
---|
267 | int nRates;
|
---|
268 | RRScreenRatePtr pRates;
|
---|
269 | } RRScreenSize, *RRScreenSizePtr;
|
---|
270 |
|
---|
271 | #ifdef RANDR_10_INTERFACE
|
---|
272 |
|
---|
273 | typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
|
---|
274 | Rotation rotation,
|
---|
275 | int rate, RRScreenSizePtr pSize);
|
---|
276 |
|
---|
277 | #endif
|
---|
278 |
|
---|
279 | typedef Bool (*RRCrtcSetScanoutPixmapProcPtr)(RRCrtcPtr crtc, PixmapPtr pixmap);
|
---|
280 |
|
---|
281 | typedef struct _rrScrPriv {
|
---|
282 | /*
|
---|
283 | * 'public' part of the structure; DDXen fill this in
|
---|
284 | * as they initialize
|
---|
285 | */
|
---|
286 | #if RANDR_10_INTERFACE
|
---|
287 | RRSetConfigProcPtr rrSetConfig;
|
---|
288 | #endif
|
---|
289 | RRGetInfoProcPtr rrGetInfo;
|
---|
290 | #if RANDR_12_INTERFACE
|
---|
291 | RRScreenSetSizeProcPtr rrScreenSetSize;
|
---|
292 | RRCrtcSetProcPtr rrCrtcSet;
|
---|
293 | RRCrtcSetGammaProcPtr rrCrtcSetGamma;
|
---|
294 | RRCrtcGetGammaProcPtr rrCrtcGetGamma;
|
---|
295 | RROutputSetPropertyProcPtr rrOutputSetProperty;
|
---|
296 | RROutputValidateModeProcPtr rrOutputValidateMode;
|
---|
297 | RRModeDestroyProcPtr rrModeDestroy;
|
---|
298 | #endif
|
---|
299 | #if RANDR_13_INTERFACE
|
---|
300 | RROutputGetPropertyProcPtr rrOutputGetProperty;
|
---|
301 | RRGetPanningProcPtr rrGetPanning;
|
---|
302 | RRSetPanningProcPtr rrSetPanning;
|
---|
303 | #endif
|
---|
304 | /* TODO #if RANDR_15_INTERFACE */
|
---|
305 | RRCrtcSetScanoutPixmapProcPtr rrCrtcSetScanoutPixmap;
|
---|
306 |
|
---|
307 | RRProviderSetOutputSourceProcPtr rrProviderSetOutputSource;
|
---|
308 | RRProviderSetOffloadSinkProcPtr rrProviderSetOffloadSink;
|
---|
309 | RRProviderGetPropertyProcPtr rrProviderGetProperty;
|
---|
310 | RRProviderSetPropertyProcPtr rrProviderSetProperty;
|
---|
311 | /*
|
---|
312 | * Private part of the structure; not considered part of the ABI
|
---|
313 | */
|
---|
314 | TimeStamp lastSetTime; /* last changed by client */
|
---|
315 | TimeStamp lastConfigTime; /* possible configs changed */
|
---|
316 | RRCloseScreenProcPtr CloseScreen;
|
---|
317 |
|
---|
318 | Bool changed; /* some config changed */
|
---|
319 | Bool configChanged; /* configuration changed */
|
---|
320 | Bool layoutChanged; /* screen layout changed */
|
---|
321 | Bool resourcesChanged; /* screen resources change */
|
---|
322 |
|
---|
323 | CARD16 minWidth, minHeight;
|
---|
324 | CARD16 maxWidth, maxHeight;
|
---|
325 | CARD16 width, height; /* last known screen size */
|
---|
326 | CARD16 mmWidth, mmHeight; /* last known screen size */
|
---|
327 |
|
---|
328 | int numOutputs;
|
---|
329 | RROutputPtr *outputs;
|
---|
330 | RROutputPtr primaryOutput;
|
---|
331 |
|
---|
332 | int numCrtcs;
|
---|
333 | RRCrtcPtr *crtcs;
|
---|
334 |
|
---|
335 | /* Last known pointer position */
|
---|
336 | RRCrtcPtr pointerCrtc;
|
---|
337 |
|
---|
338 | #ifdef RANDR_10_INTERFACE
|
---|
339 | /*
|
---|
340 | * Configuration information
|
---|
341 | */
|
---|
342 | Rotation rotations;
|
---|
343 | CARD16 reqWidth, reqHeight;
|
---|
344 |
|
---|
345 | int nSizes;
|
---|
346 | RRScreenSizePtr pSizes;
|
---|
347 |
|
---|
348 | Rotation rotation;
|
---|
349 | int rate;
|
---|
350 | int size;
|
---|
351 | #endif
|
---|
352 | Bool discontiguous;
|
---|
353 |
|
---|
354 | RRProviderPtr provider;
|
---|
355 |
|
---|
356 | RRProviderDestroyProcPtr rrProviderDestroy;
|
---|
357 |
|
---|
358 | int numMonitors;
|
---|
359 | RRMonitorPtr *monitors;
|
---|
360 |
|
---|
361 | } rrScrPrivRec, *rrScrPrivPtr;
|
---|
362 |
|
---|
363 | extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
|
---|
364 |
|
---|
365 | #define rrPrivKey (&rrPrivKeyRec)
|
---|
366 |
|
---|
367 | #define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
|
---|
368 | #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
|
---|
369 | #define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p)
|
---|
370 |
|
---|
371 | /*
|
---|
372 | * each window has a list of clients requesting
|
---|
373 | * RRNotify events. Each client has a resource
|
---|
374 | * for each window it selects RRNotify input for,
|
---|
375 | * this resource is used to delete the RRNotifyRec
|
---|
376 | * entry from the per-window queue.
|
---|
377 | */
|
---|
378 |
|
---|
379 | typedef struct _RREvent *RREventPtr;
|
---|
380 |
|
---|
381 | typedef struct _RREvent {
|
---|
382 | RREventPtr next;
|
---|
383 | ClientPtr client;
|
---|
384 | WindowPtr window;
|
---|
385 | XID clientResource;
|
---|
386 | int mask;
|
---|
387 | } RREventRec;
|
---|
388 |
|
---|
389 | typedef struct _RRTimes {
|
---|
390 | TimeStamp setTime;
|
---|
391 | TimeStamp configTime;
|
---|
392 | } RRTimesRec, *RRTimesPtr;
|
---|
393 |
|
---|
394 | typedef struct _RRClient {
|
---|
395 | int major_version;
|
---|
396 | int minor_version;
|
---|
397 | /* RRTimesRec times[0]; */
|
---|
398 | } RRClientRec, *RRClientPtr;
|
---|
399 |
|
---|
400 | extern RESTYPE RRClientType, RREventType; /* resource types for event masks */
|
---|
401 | extern DevPrivateKeyRec RRClientPrivateKeyRec;
|
---|
402 |
|
---|
403 | #define RRClientPrivateKey (&RRClientPrivateKeyRec)
|
---|
404 | extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType;
|
---|
405 |
|
---|
406 | #define VERIFY_RR_OUTPUT(id, ptr, a)\
|
---|
407 | {\
|
---|
408 | int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
---|
409 | RROutputType, client, a);\
|
---|
410 | if (rc != Success) {\
|
---|
411 | client->errorValue = id;\
|
---|
412 | return rc;\
|
---|
413 | }\
|
---|
414 | }
|
---|
415 |
|
---|
416 | #define VERIFY_RR_CRTC(id, ptr, a)\
|
---|
417 | {\
|
---|
418 | int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
---|
419 | RRCrtcType, client, a);\
|
---|
420 | if (rc != Success) {\
|
---|
421 | client->errorValue = id;\
|
---|
422 | return rc;\
|
---|
423 | }\
|
---|
424 | }
|
---|
425 |
|
---|
426 | #define VERIFY_RR_MODE(id, ptr, a)\
|
---|
427 | {\
|
---|
428 | int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
---|
429 | RRModeType, client, a);\
|
---|
430 | if (rc != Success) {\
|
---|
431 | client->errorValue = id;\
|
---|
432 | return rc;\
|
---|
433 | }\
|
---|
434 | }
|
---|
435 |
|
---|
436 | #define VERIFY_RR_PROVIDER(id, ptr, a)\
|
---|
437 | {\
|
---|
438 | int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
---|
439 | RRProviderType, client, a);\
|
---|
440 | if (rc != Success) {\
|
---|
441 | client->errorValue = id;\
|
---|
442 | return rc;\
|
---|
443 | }\
|
---|
444 | }
|
---|
445 |
|
---|
446 | #define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
|
---|
447 | #define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
|
---|
448 |
|
---|
449 | #ifdef RANDR_12_INTERFACE
|
---|
450 | /*
|
---|
451 | * Set the range of sizes for the screen
|
---|
452 | */
|
---|
453 | extern _X_EXPORT void
|
---|
454 |
|
---|
455 | RRScreenSetSizeRange(ScreenPtr pScreen,
|
---|
456 | CARD16 minWidth,
|
---|
457 | CARD16 minHeight, CARD16 maxWidth, CARD16 maxHeight);
|
---|
458 | #endif
|
---|
459 |
|
---|
460 | /* rrscreen.c */
|
---|
461 | /*
|
---|
462 | * Notify the extension that the screen size has been changed.
|
---|
463 | * The driver is responsible for calling this whenever it has changed
|
---|
464 | * the size of the screen
|
---|
465 | */
|
---|
466 | extern _X_EXPORT void
|
---|
467 | RRScreenSizeNotify(ScreenPtr pScreen);
|
---|
468 |
|
---|
469 | /*
|
---|
470 | * Request that the screen be resized
|
---|
471 | */
|
---|
472 | extern _X_EXPORT Bool
|
---|
473 |
|
---|
474 | RRScreenSizeSet(ScreenPtr pScreen,
|
---|
475 | CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight);
|
---|
476 |
|
---|
477 | /*
|
---|
478 | * Send ConfigureNotify event to root window when 'something' happens
|
---|
479 | */
|
---|
480 | extern _X_EXPORT void
|
---|
481 | RRSendConfigNotify(ScreenPtr pScreen);
|
---|
482 |
|
---|
483 | /*
|
---|
484 | * screen dispatch
|
---|
485 | */
|
---|
486 | extern _X_EXPORT int
|
---|
487 | ProcRRGetScreenSizeRange(ClientPtr client);
|
---|
488 |
|
---|
489 | extern _X_EXPORT int
|
---|
490 | ProcRRSetScreenSize(ClientPtr client);
|
---|
491 |
|
---|
492 | extern _X_EXPORT int
|
---|
493 | ProcRRGetScreenResources(ClientPtr client);
|
---|
494 |
|
---|
495 | extern _X_EXPORT int
|
---|
496 | ProcRRGetScreenResourcesCurrent(ClientPtr client);
|
---|
497 |
|
---|
498 | extern _X_EXPORT int
|
---|
499 | ProcRRSetScreenConfig(ClientPtr client);
|
---|
500 |
|
---|
501 | extern _X_EXPORT int
|
---|
502 | ProcRRGetScreenInfo(ClientPtr client);
|
---|
503 |
|
---|
504 | /*
|
---|
505 | * Deliver a ScreenNotify event
|
---|
506 | */
|
---|
507 | extern _X_EXPORT void
|
---|
508 | RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
|
---|
509 |
|
---|
510 | extern _X_EXPORT void
|
---|
511 | RRResourcesChanged(ScreenPtr pScreen);
|
---|
512 |
|
---|
513 | /* randr.c */
|
---|
514 | /* set a screen change on the primary screen */
|
---|
515 | extern _X_EXPORT void
|
---|
516 | RRSetChanged(ScreenPtr pScreen);
|
---|
517 |
|
---|
518 | /*
|
---|
519 | * Send all pending events
|
---|
520 | */
|
---|
521 | extern _X_EXPORT void
|
---|
522 | RRTellChanged(ScreenPtr pScreen);
|
---|
523 |
|
---|
524 | /*
|
---|
525 | * Poll the driver for changed information
|
---|
526 | */
|
---|
527 | extern _X_EXPORT Bool
|
---|
528 | RRGetInfo(ScreenPtr pScreen, Bool force_query);
|
---|
529 |
|
---|
530 | extern _X_EXPORT Bool RRInit(void);
|
---|
531 |
|
---|
532 | extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
|
---|
533 |
|
---|
534 | extern _X_EXPORT RROutputPtr RRFirstOutput(ScreenPtr pScreen);
|
---|
535 |
|
---|
536 | extern _X_EXPORT CARD16
|
---|
537 | RRVerticalRefresh(xRRModeInfo * mode);
|
---|
538 |
|
---|
539 | #ifdef RANDR_10_INTERFACE
|
---|
540 | /*
|
---|
541 | * This is the old interface, deprecated but left
|
---|
542 | * around for compatibility
|
---|
543 | */
|
---|
544 |
|
---|
545 | /*
|
---|
546 | * Then, register the specific size with the screen
|
---|
547 | */
|
---|
548 |
|
---|
549 | extern _X_EXPORT RRScreenSizePtr
|
---|
550 | RRRegisterSize(ScreenPtr pScreen,
|
---|
551 | short width, short height, short mmWidth, short mmHeight);
|
---|
552 |
|
---|
553 | extern _X_EXPORT Bool
|
---|
554 | RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate);
|
---|
555 |
|
---|
556 | /*
|
---|
557 | * Finally, set the current configuration of the screen
|
---|
558 | */
|
---|
559 |
|
---|
560 | extern _X_EXPORT void
|
---|
561 |
|
---|
562 | RRSetCurrentConfig(ScreenPtr pScreen,
|
---|
563 | Rotation rotation, int rate, RRScreenSizePtr pSize);
|
---|
564 |
|
---|
565 | extern _X_EXPORT Rotation RRGetRotation(ScreenPtr pScreen);
|
---|
566 |
|
---|
567 | #endif
|
---|
568 |
|
---|
569 | /* rrcrtc.c */
|
---|
570 |
|
---|
571 | /*
|
---|
572 | * Notify the CRTC of some change; layoutChanged indicates that
|
---|
573 | * some position or size element changed
|
---|
574 | */
|
---|
575 | extern _X_EXPORT void
|
---|
576 | RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged);
|
---|
577 |
|
---|
578 | /*
|
---|
579 | * Create a CRTC
|
---|
580 | */
|
---|
581 | extern _X_EXPORT RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate);
|
---|
582 |
|
---|
583 | /*
|
---|
584 | * Set the allowed rotations on a CRTC
|
---|
585 | */
|
---|
586 | extern _X_EXPORT void
|
---|
587 | RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations);
|
---|
588 |
|
---|
589 | /*
|
---|
590 | * Set whether transforms are allowed on a CRTC
|
---|
591 | */
|
---|
592 | extern _X_EXPORT void
|
---|
593 | RRCrtcSetTransformSupport(RRCrtcPtr crtc, Bool transforms);
|
---|
594 |
|
---|
595 | /*
|
---|
596 | * Notify the extension that the Crtc has been reconfigured,
|
---|
597 | * the driver calls this whenever it has updated the mode
|
---|
598 | */
|
---|
599 | extern _X_EXPORT Bool
|
---|
600 |
|
---|
601 | RRCrtcNotify(RRCrtcPtr crtc,
|
---|
602 | RRModePtr mode,
|
---|
603 | int x,
|
---|
604 | int y,
|
---|
605 | Rotation rotation,
|
---|
606 | RRTransformPtr transform, int numOutputs, RROutputPtr * outputs);
|
---|
607 |
|
---|
608 | extern _X_EXPORT void
|
---|
609 | RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
|
---|
610 |
|
---|
611 | /*
|
---|
612 | * Request that the Crtc be reconfigured
|
---|
613 | */
|
---|
614 | extern _X_EXPORT Bool
|
---|
615 |
|
---|
616 | RRCrtcSet(RRCrtcPtr crtc,
|
---|
617 | RRModePtr mode,
|
---|
618 | int x,
|
---|
619 | int y, Rotation rotation, int numOutput, RROutputPtr * outputs);
|
---|
620 |
|
---|
621 | /*
|
---|
622 | * Request that the Crtc gamma be changed
|
---|
623 | */
|
---|
624 |
|
---|
625 | extern _X_EXPORT Bool
|
---|
626 | RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue);
|
---|
627 |
|
---|
628 | /*
|
---|
629 | * Request current gamma back from the DDX (if possible).
|
---|
630 | * This includes gamma size.
|
---|
631 | */
|
---|
632 |
|
---|
633 | extern _X_EXPORT Bool
|
---|
634 | RRCrtcGammaGet(RRCrtcPtr crtc);
|
---|
635 |
|
---|
636 | /*
|
---|
637 | * Notify the extension that the Crtc gamma has been changed
|
---|
638 | * The driver calls this whenever it has changed the gamma values
|
---|
639 | * in the RRCrtcRec
|
---|
640 | */
|
---|
641 |
|
---|
642 | extern _X_EXPORT Bool
|
---|
643 | RRCrtcGammaNotify(RRCrtcPtr crtc);
|
---|
644 |
|
---|
645 | /*
|
---|
646 | * Set the size of the gamma table at server startup time
|
---|
647 | */
|
---|
648 |
|
---|
649 | extern _X_EXPORT Bool
|
---|
650 | RRCrtcGammaSetSize(RRCrtcPtr crtc, int size);
|
---|
651 |
|
---|
652 | /*
|
---|
653 | * Return the area of the frame buffer scanned out by the crtc,
|
---|
654 | * taking into account the current mode and rotation
|
---|
655 | */
|
---|
656 |
|
---|
657 | extern _X_EXPORT void
|
---|
658 | RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
|
---|
659 |
|
---|
660 | /*
|
---|
661 | * Return crtc transform
|
---|
662 | */
|
---|
663 | extern _X_EXPORT RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc);
|
---|
664 |
|
---|
665 | /*
|
---|
666 | * Check whether the pending and current transforms are the same
|
---|
667 | */
|
---|
668 | extern _X_EXPORT Bool
|
---|
669 | RRCrtcPendingTransform(RRCrtcPtr crtc);
|
---|
670 |
|
---|
671 | /*
|
---|
672 | * Destroy a Crtc at shutdown
|
---|
673 | */
|
---|
674 | extern _X_EXPORT void
|
---|
675 | RRCrtcDestroy(RRCrtcPtr crtc);
|
---|
676 |
|
---|
677 | /*
|
---|
678 | * Set the pending CRTC transformation
|
---|
679 | */
|
---|
680 |
|
---|
681 | extern _X_EXPORT int
|
---|
682 |
|
---|
683 | RRCrtcTransformSet(RRCrtcPtr crtc,
|
---|
684 | PictTransformPtr transform,
|
---|
685 | struct pict_f_transform *f_transform,
|
---|
686 | struct pict_f_transform *f_inverse,
|
---|
687 | char *filter, int filter_len, xFixed * params, int nparams);
|
---|
688 |
|
---|
689 | /*
|
---|
690 | * Initialize crtc type
|
---|
691 | */
|
---|
692 | extern _X_EXPORT Bool
|
---|
693 | RRCrtcInit(void);
|
---|
694 |
|
---|
695 | /*
|
---|
696 | * Initialize crtc type error value
|
---|
697 | */
|
---|
698 | extern _X_EXPORT void
|
---|
699 | RRCrtcInitErrorValue(void);
|
---|
700 |
|
---|
701 | /*
|
---|
702 | * Detach and free a scanout pixmap
|
---|
703 | */
|
---|
704 | extern _X_EXPORT void
|
---|
705 | RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc);
|
---|
706 |
|
---|
707 | extern _X_EXPORT Bool
|
---|
708 | RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable);
|
---|
709 |
|
---|
710 | /*
|
---|
711 | * Crtc dispatch
|
---|
712 | */
|
---|
713 |
|
---|
714 | extern _X_EXPORT int
|
---|
715 | ProcRRGetCrtcInfo(ClientPtr client);
|
---|
716 |
|
---|
717 | extern _X_EXPORT int
|
---|
718 | ProcRRSetCrtcConfig(ClientPtr client);
|
---|
719 |
|
---|
720 | extern _X_EXPORT int
|
---|
721 | ProcRRGetCrtcGammaSize(ClientPtr client);
|
---|
722 |
|
---|
723 | extern _X_EXPORT int
|
---|
724 | ProcRRGetCrtcGamma(ClientPtr client);
|
---|
725 |
|
---|
726 | extern _X_EXPORT int
|
---|
727 | ProcRRSetCrtcGamma(ClientPtr client);
|
---|
728 |
|
---|
729 | extern _X_EXPORT int
|
---|
730 | ProcRRSetCrtcTransform(ClientPtr client);
|
---|
731 |
|
---|
732 | extern _X_EXPORT int
|
---|
733 | ProcRRGetCrtcTransform(ClientPtr client);
|
---|
734 |
|
---|
735 | int
|
---|
736 | ProcRRGetPanning(ClientPtr client);
|
---|
737 |
|
---|
738 | int
|
---|
739 | ProcRRSetPanning(ClientPtr client);
|
---|
740 |
|
---|
741 | void
|
---|
742 | RRConstrainCursorHarder(DeviceIntPtr, ScreenPtr, int, int *, int *);
|
---|
743 |
|
---|
744 | /* rrdispatch.c */
|
---|
745 | extern _X_EXPORT Bool
|
---|
746 | RRClientKnowsRates(ClientPtr pClient);
|
---|
747 |
|
---|
748 | /* rrmode.c */
|
---|
749 | /*
|
---|
750 | * Find, and if necessary, create a mode
|
---|
751 | */
|
---|
752 |
|
---|
753 | extern _X_EXPORT RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name);
|
---|
754 |
|
---|
755 | /*
|
---|
756 | * Destroy a mode.
|
---|
757 | */
|
---|
758 |
|
---|
759 | extern _X_EXPORT void
|
---|
760 | RRModeDestroy(RRModePtr mode);
|
---|
761 |
|
---|
762 | /*
|
---|
763 | * Return a list of modes that are valid for some output in pScreen
|
---|
764 | */
|
---|
765 | extern _X_EXPORT RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret);
|
---|
766 |
|
---|
767 | /*
|
---|
768 | * Initialize mode type
|
---|
769 | */
|
---|
770 | extern _X_EXPORT Bool
|
---|
771 | RRModeInit(void);
|
---|
772 |
|
---|
773 | /*
|
---|
774 | * Initialize mode type error value
|
---|
775 | */
|
---|
776 | extern _X_EXPORT void
|
---|
777 | RRModeInitErrorValue(void);
|
---|
778 |
|
---|
779 | extern _X_EXPORT int
|
---|
780 | ProcRRCreateMode(ClientPtr client);
|
---|
781 |
|
---|
782 | extern _X_EXPORT int
|
---|
783 | ProcRRDestroyMode(ClientPtr client);
|
---|
784 |
|
---|
785 | extern _X_EXPORT int
|
---|
786 | ProcRRAddOutputMode(ClientPtr client);
|
---|
787 |
|
---|
788 | extern _X_EXPORT int
|
---|
789 | ProcRRDeleteOutputMode(ClientPtr client);
|
---|
790 |
|
---|
791 | /* rroutput.c */
|
---|
792 |
|
---|
793 | /*
|
---|
794 | * Notify the output of some change. configChanged indicates whether
|
---|
795 | * any external configuration (mode list, clones, connected status)
|
---|
796 | * has changed, or whether the change was strictly internal
|
---|
797 | * (which crtc is in use)
|
---|
798 | */
|
---|
799 | extern _X_EXPORT void
|
---|
800 | RROutputChanged(RROutputPtr output, Bool configChanged);
|
---|
801 |
|
---|
802 | /*
|
---|
803 | * Create an output
|
---|
804 | */
|
---|
805 |
|
---|
806 | extern _X_EXPORT RROutputPtr
|
---|
807 | RROutputCreate(ScreenPtr pScreen,
|
---|
808 | const char *name, int nameLength, void *devPrivate);
|
---|
809 |
|
---|
810 | /*
|
---|
811 | * Notify extension that output parameters have been changed
|
---|
812 | */
|
---|
813 | extern _X_EXPORT Bool
|
---|
814 | RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones);
|
---|
815 |
|
---|
816 | extern _X_EXPORT Bool
|
---|
817 |
|
---|
818 | RROutputSetModes(RROutputPtr output,
|
---|
819 | RRModePtr * modes, int numModes, int numPreferred);
|
---|
820 |
|
---|
821 | extern _X_EXPORT int
|
---|
822 | RROutputAddUserMode(RROutputPtr output, RRModePtr mode);
|
---|
823 |
|
---|
824 | extern _X_EXPORT int
|
---|
825 | RROutputDeleteUserMode(RROutputPtr output, RRModePtr mode);
|
---|
826 |
|
---|
827 | extern _X_EXPORT Bool
|
---|
828 | RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs);
|
---|
829 |
|
---|
830 | extern _X_EXPORT Bool
|
---|
831 | RROutputSetConnection(RROutputPtr output, CARD8 connection);
|
---|
832 |
|
---|
833 | extern _X_EXPORT Bool
|
---|
834 | RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder);
|
---|
835 |
|
---|
836 | extern _X_EXPORT Bool
|
---|
837 | RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight);
|
---|
838 |
|
---|
839 | extern _X_EXPORT void
|
---|
840 | RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
|
---|
841 |
|
---|
842 | extern _X_EXPORT void
|
---|
843 | RROutputDestroy(RROutputPtr output);
|
---|
844 |
|
---|
845 | extern _X_EXPORT int
|
---|
846 | ProcRRGetOutputInfo(ClientPtr client);
|
---|
847 |
|
---|
848 | extern _X_EXPORT int
|
---|
849 | ProcRRSetOutputPrimary(ClientPtr client);
|
---|
850 |
|
---|
851 | extern _X_EXPORT int
|
---|
852 | ProcRRGetOutputPrimary(ClientPtr client);
|
---|
853 |
|
---|
854 | /*
|
---|
855 | * Initialize output type
|
---|
856 | */
|
---|
857 | extern _X_EXPORT Bool
|
---|
858 | RROutputInit(void);
|
---|
859 |
|
---|
860 | /*
|
---|
861 | * Initialize output type error value
|
---|
862 | */
|
---|
863 | extern _X_EXPORT void
|
---|
864 | RROutputInitErrorValue(void);
|
---|
865 |
|
---|
866 | /* rrpointer.c */
|
---|
867 | extern _X_EXPORT void
|
---|
868 | RRPointerMoved(ScreenPtr pScreen, int x, int y);
|
---|
869 |
|
---|
870 | extern _X_EXPORT void
|
---|
871 | RRPointerScreenConfigured(ScreenPtr pScreen);
|
---|
872 |
|
---|
873 | /* rrproperty.c */
|
---|
874 |
|
---|
875 | extern _X_EXPORT void
|
---|
876 | RRDeleteAllOutputProperties(RROutputPtr output);
|
---|
877 |
|
---|
878 | extern _X_EXPORT RRPropertyValuePtr
|
---|
879 | RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending);
|
---|
880 |
|
---|
881 | extern _X_EXPORT RRPropertyPtr
|
---|
882 | RRQueryOutputProperty(RROutputPtr output, Atom property);
|
---|
883 |
|
---|
884 | extern _X_EXPORT void
|
---|
885 | RRDeleteOutputProperty(RROutputPtr output, Atom property);
|
---|
886 |
|
---|
887 | extern _X_EXPORT Bool
|
---|
888 | RRPostPendingProperties(RROutputPtr output);
|
---|
889 |
|
---|
890 | extern _X_EXPORT int
|
---|
891 |
|
---|
892 | RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
---|
893 | int format, int mode, unsigned long len,
|
---|
894 | void *value, Bool sendevent, Bool pending);
|
---|
895 |
|
---|
896 | extern _X_EXPORT int
|
---|
897 |
|
---|
898 | RRConfigureOutputProperty(RROutputPtr output, Atom property,
|
---|
899 | Bool pending, Bool range, Bool immutable,
|
---|
900 | int num_values, INT32 *values);
|
---|
901 | extern _X_EXPORT int
|
---|
902 | ProcRRChangeOutputProperty(ClientPtr client);
|
---|
903 |
|
---|
904 | extern _X_EXPORT int
|
---|
905 | ProcRRGetOutputProperty(ClientPtr client);
|
---|
906 |
|
---|
907 | extern _X_EXPORT int
|
---|
908 | ProcRRListOutputProperties(ClientPtr client);
|
---|
909 |
|
---|
910 | extern _X_EXPORT int
|
---|
911 | ProcRRQueryOutputProperty(ClientPtr client);
|
---|
912 |
|
---|
913 | extern _X_EXPORT int
|
---|
914 | ProcRRConfigureOutputProperty(ClientPtr client);
|
---|
915 |
|
---|
916 | extern _X_EXPORT int
|
---|
917 | ProcRRDeleteOutputProperty(ClientPtr client);
|
---|
918 |
|
---|
919 | /* rrprovider.c */
|
---|
920 | extern _X_EXPORT void
|
---|
921 | RRProviderInitErrorValue(void);
|
---|
922 |
|
---|
923 | extern _X_EXPORT int
|
---|
924 | ProcRRGetProviders(ClientPtr client);
|
---|
925 |
|
---|
926 | extern _X_EXPORT int
|
---|
927 | ProcRRGetProviderInfo(ClientPtr client);
|
---|
928 |
|
---|
929 | extern _X_EXPORT int
|
---|
930 | ProcRRSetProviderOutputSource(ClientPtr client);
|
---|
931 |
|
---|
932 | extern _X_EXPORT int
|
---|
933 | ProcRRSetProviderOffloadSink(ClientPtr client);
|
---|
934 |
|
---|
935 | extern _X_EXPORT Bool
|
---|
936 | RRProviderInit(void);
|
---|
937 |
|
---|
938 | extern _X_EXPORT RRProviderPtr
|
---|
939 | RRProviderCreate(ScreenPtr pScreen, const char *name,
|
---|
940 | int nameLength);
|
---|
941 |
|
---|
942 | extern _X_EXPORT void
|
---|
943 | RRProviderDestroy (RRProviderPtr provider);
|
---|
944 |
|
---|
945 | extern _X_EXPORT void
|
---|
946 | RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities);
|
---|
947 |
|
---|
948 | extern _X_EXPORT Bool
|
---|
949 | RRProviderLookup(XID id, RRProviderPtr *provider_p);
|
---|
950 |
|
---|
951 | extern _X_EXPORT void
|
---|
952 | RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
|
---|
953 |
|
---|
954 | /* rrproviderproperty.c */
|
---|
955 |
|
---|
956 | extern _X_EXPORT void
|
---|
957 | RRDeleteAllProviderProperties(RRProviderPtr provider);
|
---|
958 |
|
---|
959 | extern _X_EXPORT RRPropertyValuePtr
|
---|
960 | RRGetProviderProperty(RRProviderPtr provider, Atom property, Bool pending);
|
---|
961 |
|
---|
962 | extern _X_EXPORT RRPropertyPtr
|
---|
963 | RRQueryProviderProperty(RRProviderPtr provider, Atom property);
|
---|
964 |
|
---|
965 | extern _X_EXPORT void
|
---|
966 | RRDeleteProviderProperty(RRProviderPtr provider, Atom property);
|
---|
967 |
|
---|
968 | extern _X_EXPORT int
|
---|
969 | RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
|
---|
970 | int format, int mode, unsigned long len,
|
---|
971 | void *value, Bool sendevent, Bool pending);
|
---|
972 |
|
---|
973 | extern _X_EXPORT int
|
---|
974 | RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
|
---|
975 | Bool pending, Bool range, Bool immutable,
|
---|
976 | int num_values, INT32 *values);
|
---|
977 |
|
---|
978 | extern _X_EXPORT Bool
|
---|
979 | RRPostProviderPendingProperties(RRProviderPtr provider);
|
---|
980 |
|
---|
981 | extern _X_EXPORT int
|
---|
982 | ProcRRGetProviderProperty(ClientPtr client);
|
---|
983 |
|
---|
984 | extern _X_EXPORT int
|
---|
985 | ProcRRListProviderProperties(ClientPtr client);
|
---|
986 |
|
---|
987 | extern _X_EXPORT int
|
---|
988 | ProcRRQueryProviderProperty(ClientPtr client);
|
---|
989 |
|
---|
990 | extern _X_EXPORT int
|
---|
991 | ProcRRConfigureProviderProperty(ClientPtr client);
|
---|
992 |
|
---|
993 | extern _X_EXPORT int
|
---|
994 | ProcRRChangeProviderProperty(ClientPtr client);
|
---|
995 |
|
---|
996 | extern _X_EXPORT int
|
---|
997 | ProcRRDeleteProviderProperty(ClientPtr client);
|
---|
998 | /* rrxinerama.c */
|
---|
999 | #ifdef XINERAMA
|
---|
1000 | extern _X_EXPORT void
|
---|
1001 | RRXineramaExtensionInit(void);
|
---|
1002 | #endif
|
---|
1003 |
|
---|
1004 | void
|
---|
1005 | RRMonitorInit(ScreenPtr screen);
|
---|
1006 |
|
---|
1007 | Bool
|
---|
1008 | RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret);
|
---|
1009 |
|
---|
1010 | int
|
---|
1011 | RRMonitorCountList(ScreenPtr screen);
|
---|
1012 |
|
---|
1013 | void
|
---|
1014 | RRMonitorFreeList(RRMonitorPtr monitors, int nmon);
|
---|
1015 |
|
---|
1016 | void
|
---|
1017 | RRMonitorClose(ScreenPtr screen);
|
---|
1018 |
|
---|
1019 | RRMonitorPtr
|
---|
1020 | RRMonitorAlloc(int noutput);
|
---|
1021 |
|
---|
1022 | int
|
---|
1023 | RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor);
|
---|
1024 |
|
---|
1025 | void
|
---|
1026 | RRMonitorFree(RRMonitorPtr monitor);
|
---|
1027 |
|
---|
1028 | int
|
---|
1029 | ProcRRGetMonitors(ClientPtr client);
|
---|
1030 |
|
---|
1031 | int
|
---|
1032 | ProcRRSetMonitor(ClientPtr client);
|
---|
1033 |
|
---|
1034 | int
|
---|
1035 | ProcRRDeleteMonitor(ClientPtr client);
|
---|
1036 |
|
---|
1037 | #endif /* _RANDRSTR_H_ */
|
---|
1038 |
|
---|
1039 | /*
|
---|
1040 |
|
---|
1041 | randr extension implementation structure
|
---|
1042 |
|
---|
1043 | Query state:
|
---|
1044 | ProcRRGetScreenInfo/ProcRRGetScreenResources
|
---|
1045 | RRGetInfo
|
---|
1046 |
|
---|
1047 | • Request configuration from driver, either 1.0 or 1.2 style
|
---|
1048 | • These functions only record state changes, all
|
---|
1049 | other actions are pended until RRTellChanged is called
|
---|
1050 |
|
---|
1051 | ->rrGetInfo
|
---|
1052 | 1.0:
|
---|
1053 | RRRegisterSize
|
---|
1054 | RRRegisterRate
|
---|
1055 | RRSetCurrentConfig
|
---|
1056 | 1.2:
|
---|
1057 | RRScreenSetSizeRange
|
---|
1058 | RROutputSetCrtcs
|
---|
1059 | RRModeGet
|
---|
1060 | RROutputSetModes
|
---|
1061 | RROutputSetConnection
|
---|
1062 | RROutputSetSubpixelOrder
|
---|
1063 | RROutputSetClones
|
---|
1064 | RRCrtcNotify
|
---|
1065 |
|
---|
1066 | • Must delay scanning configuration until after ->rrGetInfo returns
|
---|
1067 | because some drivers will call SetCurrentConfig in the middle
|
---|
1068 | of the ->rrGetInfo operation.
|
---|
1069 |
|
---|
1070 | 1.0:
|
---|
1071 |
|
---|
1072 | • Scan old configuration, mirror to new structures
|
---|
1073 |
|
---|
1074 | RRScanOldConfig
|
---|
1075 | RRCrtcCreate
|
---|
1076 | RROutputCreate
|
---|
1077 | RROutputSetCrtcs
|
---|
1078 | RROutputSetConnection
|
---|
1079 | RROutputSetSubpixelOrder
|
---|
1080 | RROldModeAdd • This adds modes one-at-a-time
|
---|
1081 | RRModeGet
|
---|
1082 | RRCrtcNotify
|
---|
1083 |
|
---|
1084 | • send events, reset pointer if necessary
|
---|
1085 |
|
---|
1086 | RRTellChanged
|
---|
1087 | WalkTree (sending events)
|
---|
1088 |
|
---|
1089 | • when layout has changed:
|
---|
1090 | RRPointerScreenConfigured
|
---|
1091 | RRSendConfigNotify
|
---|
1092 |
|
---|
1093 | Asynchronous state setting (1.2 only)
|
---|
1094 | When setting state asynchronously, the driver invokes the
|
---|
1095 | ->rrGetInfo function and then calls RRTellChanged to flush
|
---|
1096 | the changes to the clients and reset pointer if necessary
|
---|
1097 |
|
---|
1098 | Set state
|
---|
1099 |
|
---|
1100 | ProcRRSetScreenConfig
|
---|
1101 | RRCrtcSet
|
---|
1102 | 1.2:
|
---|
1103 | ->rrCrtcSet
|
---|
1104 | RRCrtcNotify
|
---|
1105 | 1.0:
|
---|
1106 | ->rrSetConfig
|
---|
1107 | RRCrtcNotify
|
---|
1108 | RRTellChanged
|
---|
1109 | */
|
---|