VirtualBox

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

最後變更 在這個檔案從40349是 40349,由 vboxsync 提交於 13 年 前

Additions/xorg: support X.Org Server 1.12.

  • 屬性 svn:eol-style 設為 native
檔案大小: 23.0 KB
 
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 CARD16
466RRVerticalRefresh (xRRModeInfo *mode);
467
468#ifdef RANDR_10_INTERFACE
469/*
470 * This is the old interface, deprecated but left
471 * around for compatibility
472 */
473
474/*
475 * Then, register the specific size with the screen
476 */
477
478extern _X_EXPORT RRScreenSizePtr
479RRRegisterSize (ScreenPtr pScreen,
480 short width,
481 short height,
482 short mmWidth,
483 short mmHeight);
484
485extern _X_EXPORT Bool
486RRRegisterRate (ScreenPtr pScreen,
487 RRScreenSizePtr pSize,
488 int rate);
489
490/*
491 * Finally, set the current configuration of the screen
492 */
493
494extern _X_EXPORT void
495RRSetCurrentConfig (ScreenPtr pScreen,
496 Rotation rotation,
497 int rate,
498 RRScreenSizePtr pSize);
499
500extern _X_EXPORT Rotation
501RRGetRotation (ScreenPtr pScreen);
502
503#endif
504
505/* rrcrtc.c */
506
507/*
508 * Notify the CRTC of some change; layoutChanged indicates that
509 * some position or size element changed
510 */
511extern _X_EXPORT void
512RRCrtcChanged (RRCrtcPtr crtc, Bool layoutChanged);
513
514/*
515 * Create a CRTC
516 */
517extern _X_EXPORT RRCrtcPtr
518RRCrtcCreate (ScreenPtr pScreen, void *devPrivate);
519
520/*
521 * Set the allowed rotations on a CRTC
522 */
523extern _X_EXPORT void
524RRCrtcSetRotations (RRCrtcPtr crtc, Rotation rotations);
525
526/*
527 * Set whether transforms are allowed on a CRTC
528 */
529extern _X_EXPORT void
530RRCrtcSetTransformSupport (RRCrtcPtr crtc, Bool transforms);
531
532/*
533 * Notify the extension that the Crtc has been reconfigured,
534 * the driver calls this whenever it has updated the mode
535 */
536extern _X_EXPORT Bool
537RRCrtcNotify (RRCrtcPtr crtc,
538 RRModePtr mode,
539 int x,
540 int y,
541 Rotation rotation,
542 RRTransformPtr transform,
543 int numOutputs,
544 RROutputPtr *outputs);
545
546extern _X_EXPORT void
547RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
548
549/*
550 * Request that the Crtc be reconfigured
551 */
552extern _X_EXPORT Bool
553RRCrtcSet (RRCrtcPtr crtc,
554 RRModePtr mode,
555 int x,
556 int y,
557 Rotation rotation,
558 int numOutput,
559 RROutputPtr *outputs);
560
561/*
562 * Request that the Crtc gamma be changed
563 */
564
565extern _X_EXPORT Bool
566RRCrtcGammaSet (RRCrtcPtr crtc,
567 CARD16 *red,
568 CARD16 *green,
569 CARD16 *blue);
570
571/*
572 * Request current gamma back from the DDX (if possible).
573 * This includes gamma size.
574 */
575
576extern _X_EXPORT Bool
577RRCrtcGammaGet(RRCrtcPtr crtc);
578
579/*
580 * Notify the extension that the Crtc gamma has been changed
581 * The driver calls this whenever it has changed the gamma values
582 * in the RRCrtcRec
583 */
584
585extern _X_EXPORT Bool
586RRCrtcGammaNotify (RRCrtcPtr crtc);
587
588/*
589 * Set the size of the gamma table at server startup time
590 */
591
592extern _X_EXPORT Bool
593RRCrtcGammaSetSize (RRCrtcPtr crtc,
594 int size);
595
596/*
597 * Return the area of the frame buffer scanned out by the crtc,
598 * taking into account the current mode and rotation
599 */
600
601extern _X_EXPORT void
602RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
603
604/*
605 * Compute the complete transformation matrix including
606 * client-specified transform, rotation/reflection values and the crtc
607 * offset.
608 *
609 * Return TRUE if the resulting transform is not a simple translation.
610 */
611extern _X_EXPORT Bool
612RRTransformCompute (int x,
613 int y,
614 int width,
615 int height,
616 Rotation rotation,
617 RRTransformPtr rr_transform,
618
619 PictTransformPtr transform,
620 struct pict_f_transform *f_transform,
621 struct pict_f_transform *f_inverse);
622
623/*
624 * Return crtc transform
625 */
626extern _X_EXPORT RRTransformPtr
627RRCrtcGetTransform (RRCrtcPtr crtc);
628
629/*
630 * Check whether the pending and current transforms are the same
631 */
632extern _X_EXPORT Bool
633RRCrtcPendingTransform (RRCrtcPtr crtc);
634
635/*
636 * Destroy a Crtc at shutdown
637 */
638extern _X_EXPORT void
639RRCrtcDestroy (RRCrtcPtr crtc);
640
641
642/*
643 * Set the pending CRTC transformation
644 */
645
646extern _X_EXPORT int
647RRCrtcTransformSet (RRCrtcPtr crtc,
648 PictTransformPtr transform,
649 struct pict_f_transform *f_transform,
650 struct pict_f_transform *f_inverse,
651 char *filter,
652 int filter_len,
653 xFixed *params,
654 int nparams);
655
656/*
657 * Initialize crtc type
658 */
659extern _X_EXPORT Bool
660RRCrtcInit (void);
661
662/*
663 * Initialize crtc type error value
664 */
665extern _X_EXPORT void
666RRCrtcInitErrorValue (void);
667
668/*
669 * Crtc dispatch
670 */
671
672extern _X_EXPORT int
673ProcRRGetCrtcInfo (ClientPtr client);
674
675extern _X_EXPORT int
676ProcRRSetCrtcConfig (ClientPtr client);
677
678extern _X_EXPORT int
679ProcRRGetCrtcGammaSize (ClientPtr client);
680
681extern _X_EXPORT int
682ProcRRGetCrtcGamma (ClientPtr client);
683
684extern _X_EXPORT int
685ProcRRSetCrtcGamma (ClientPtr client);
686
687extern _X_EXPORT int
688ProcRRSetCrtcTransform (ClientPtr client);
689
690extern _X_EXPORT int
691ProcRRGetCrtcTransform (ClientPtr client);
692
693int
694ProcRRGetPanning (ClientPtr client);
695
696int
697ProcRRSetPanning (ClientPtr client);
698
699void
700RRConstrainCursorHarder (DeviceIntPtr, ScreenPtr, int, int *, int *);
701
702/* rrdispatch.c */
703extern _X_EXPORT Bool
704RRClientKnowsRates (ClientPtr pClient);
705
706/* rrmode.c */
707/*
708 * Find, and if necessary, create a mode
709 */
710
711extern _X_EXPORT RRModePtr
712RRModeGet (xRRModeInfo *modeInfo,
713 const char *name);
714
715/*
716 * Destroy a mode.
717 */
718
719extern _X_EXPORT void
720RRModeDestroy (RRModePtr mode);
721
722/*
723 * Return a list of modes that are valid for some output in pScreen
724 */
725extern _X_EXPORT RRModePtr *
726RRModesForScreen (ScreenPtr pScreen, int *num_ret);
727
728/*
729 * Initialize mode type
730 */
731extern _X_EXPORT Bool
732RRModeInit (void);
733
734/*
735 * Initialize mode type error value
736 */
737extern _X_EXPORT void
738RRModeInitErrorValue (void);
739
740extern _X_EXPORT int
741ProcRRCreateMode (ClientPtr client);
742
743extern _X_EXPORT int
744ProcRRDestroyMode (ClientPtr client);
745
746extern _X_EXPORT int
747ProcRRAddOutputMode (ClientPtr client);
748
749extern _X_EXPORT int
750ProcRRDeleteOutputMode (ClientPtr client);
751
752/* rroutput.c */
753
754/*
755 * Notify the output of some change. configChanged indicates whether
756 * any external configuration (mode list, clones, connected status)
757 * has changed, or whether the change was strictly internal
758 * (which crtc is in use)
759 */
760extern _X_EXPORT void
761RROutputChanged (RROutputPtr output, Bool configChanged);
762
763/*
764 * Create an output
765 */
766
767extern _X_EXPORT RROutputPtr
768RROutputCreate (ScreenPtr pScreen,
769 const char *name,
770 int nameLength,
771 void *devPrivate);
772
773/*
774 * Notify extension that output parameters have been changed
775 */
776extern _X_EXPORT Bool
777RROutputSetClones (RROutputPtr output,
778 RROutputPtr *clones,
779 int numClones);
780
781extern _X_EXPORT Bool
782RROutputSetModes (RROutputPtr output,
783 RRModePtr *modes,
784 int numModes,
785 int numPreferred);
786
787extern _X_EXPORT int
788RROutputAddUserMode (RROutputPtr output,
789 RRModePtr mode);
790
791extern _X_EXPORT int
792RROutputDeleteUserMode (RROutputPtr output,
793 RRModePtr mode);
794
795extern _X_EXPORT Bool
796RROutputSetCrtcs (RROutputPtr output,
797 RRCrtcPtr *crtcs,
798 int numCrtcs);
799
800extern _X_EXPORT Bool
801RROutputSetConnection (RROutputPtr output,
802 CARD8 connection);
803
804extern _X_EXPORT Bool
805RROutputSetSubpixelOrder (RROutputPtr output,
806 int subpixelOrder);
807
808extern _X_EXPORT Bool
809RROutputSetPhysicalSize (RROutputPtr output,
810 int mmWidth,
811 int mmHeight);
812
813extern _X_EXPORT void
814RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
815
816extern _X_EXPORT void
817RROutputDestroy (RROutputPtr output);
818
819extern _X_EXPORT int
820ProcRRGetOutputInfo (ClientPtr client);
821
822extern _X_EXPORT int
823ProcRRSetOutputPrimary (ClientPtr client);
824
825extern _X_EXPORT int
826ProcRRGetOutputPrimary (ClientPtr client);
827
828/*
829 * Initialize output type
830 */
831extern _X_EXPORT Bool
832RROutputInit (void);
833
834/*
835 * Initialize output type error value
836 */
837extern _X_EXPORT void
838RROutputInitErrorValue (void);
839
840/* rrpointer.c */
841extern _X_EXPORT void
842RRPointerMoved (ScreenPtr pScreen, int x, int y);
843
844extern _X_EXPORT void
845RRPointerScreenConfigured (ScreenPtr pScreen);
846
847/* rrproperty.c */
848
849extern _X_EXPORT void
850RRDeleteAllOutputProperties (RROutputPtr output);
851
852extern _X_EXPORT RRPropertyValuePtr
853RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending);
854
855extern _X_EXPORT RRPropertyPtr
856RRQueryOutputProperty (RROutputPtr output, Atom property);
857
858extern _X_EXPORT void
859RRDeleteOutputProperty (RROutputPtr output, Atom property);
860
861extern _X_EXPORT Bool
862RRPostPendingProperties (RROutputPtr output);
863
864extern _X_EXPORT int
865RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type,
866 int format, int mode, unsigned long len,
867 pointer value, Bool sendevent, Bool pending);
868
869extern _X_EXPORT int
870RRConfigureOutputProperty (RROutputPtr output, Atom property,
871 Bool pending, Bool range, Bool immutable,
872 int num_values, INT32 *values);
873extern _X_EXPORT int
874ProcRRChangeOutputProperty (ClientPtr client);
875
876extern _X_EXPORT int
877ProcRRGetOutputProperty (ClientPtr client);
878
879extern _X_EXPORT int
880ProcRRListOutputProperties (ClientPtr client);
881
882extern _X_EXPORT int
883ProcRRQueryOutputProperty (ClientPtr client);
884
885extern _X_EXPORT int
886ProcRRConfigureOutputProperty (ClientPtr client);
887
888extern _X_EXPORT int
889ProcRRDeleteOutputProperty (ClientPtr client);
890
891/* rrxinerama.c */
892#ifdef XINERAMA
893extern _X_EXPORT void
894RRXineramaExtensionInit(void);
895#endif
896
897#endif /* _RANDRSTR_H_ */
898
899/*
900
901randr extension implementation structure
902
903Query state:
904 ProcRRGetScreenInfo/ProcRRGetScreenResources
905 RRGetInfo
906
907 • Request configuration from driver, either 1.0 or 1.2 style
908 • These functions only record state changes, all
909 other actions are pended until RRTellChanged is called
910
911 ->rrGetInfo
912 1.0:
913 RRRegisterSize
914 RRRegisterRate
915 RRSetCurrentConfig
916 1.2:
917 RRScreenSetSizeRange
918 RROutputSetCrtcs
919 RRModeGet
920 RROutputSetModes
921 RROutputSetConnection
922 RROutputSetSubpixelOrder
923 RROutputSetClones
924 RRCrtcNotify
925
926 • Must delay scanning configuration until after ->rrGetInfo returns
927 because some drivers will call SetCurrentConfig in the middle
928 of the ->rrGetInfo operation.
929
930 1.0:
931
932 • Scan old configuration, mirror to new structures
933
934 RRScanOldConfig
935 RRCrtcCreate
936 RROutputCreate
937 RROutputSetCrtcs
938 RROutputSetConnection
939 RROutputSetSubpixelOrder
940 RROldModeAdd • This adds modes one-at-a-time
941 RRModeGet
942 RRCrtcNotify
943
944 • send events, reset pointer if necessary
945
946 RRTellChanged
947 WalkTree (sending events)
948
949 • when layout has changed:
950 RRPointerScreenConfigured
951 RRSendConfigNotify
952
953Asynchronous state setting (1.2 only)
954 When setting state asynchronously, the driver invokes the
955 ->rrGetInfo function and then calls RRTellChanged to flush
956 the changes to the clients and reset pointer if necessary
957
958Set state
959
960 ProcRRSetScreenConfig
961 RRCrtcSet
962 1.2:
963 ->rrCrtcSet
964 RRCrtcNotify
965 1.0:
966 ->rrSetConfig
967 RRCrtcNotify
968 RRTellChanged
969 */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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