VirtualBox

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

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

Additions/x11: added headers for X.Org Server 1.13.

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

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