VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.11.0/randrstr.h@ 38889

Last change on this file since 38889 was 38824, checked in by vboxsync, 13 years ago

Additions/x11: header files for building X.Org Server 1.11 modules

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette