VirtualBox

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

最後變更 在這個檔案從61386是 45134,由 vboxsync 提交於 12 年 前

Additions/X11: build vboxvideo_drv.so for X.Org Server 1.14.

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

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