VirtualBox

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

Last change on this file since 78293 was 58634, checked in by vboxsync, 9 years ago

Additions/x11: added header files for building X.Org video driver against X.Org Server 1.18.

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