2006-11-26 11:13:41 -07:00
|
|
|
/*
|
|
|
|
* Copyright © 2000 Compaq Computer Corporation
|
2007-11-24 10:55:21 -07:00
|
|
|
* Copyright © 2002 Hewlett-Packard Company
|
|
|
|
* Copyright © 2006 Intel Corporation
|
2009-09-06 13:44:18 -06:00
|
|
|
* Copyright © 2008 Red Hat, Inc.
|
2006-11-26 11:13:41 -07:00
|
|
|
*
|
|
|
|
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
* documentation for any purpose is hereby granted without fee, provided that
|
2007-11-24 10:55:21 -07:00
|
|
|
* the above copyright notice appear in all copies and that both that copyright
|
|
|
|
* notice and this permission notice appear in supporting documentation, and
|
|
|
|
* that the name of the copyright holders not be used in advertising or
|
|
|
|
* publicity pertaining to distribution of the software without specific,
|
|
|
|
* written prior permission. The copyright holders make no representations
|
|
|
|
* about the suitability of this software for any purpose. It is provided "as
|
|
|
|
* is" without express or implied warranty.
|
2006-11-26 11:13:41 -07:00
|
|
|
*
|
2007-11-24 10:55:21 -07:00
|
|
|
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
2006-11-26 11:13:41 -07:00
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
2007-11-24 10:55:21 -07:00
|
|
|
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
2006-11-26 11:13:41 -07:00
|
|
|
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
|
|
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
2007-11-24 10:55:21 -07:00
|
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
|
|
|
|
* OF THIS SOFTWARE.
|
|
|
|
*
|
|
|
|
* Author: Jim Gettys, Hewlett-Packard Company, Inc.
|
|
|
|
* Keith Packard, Intel Corporation
|
2006-11-26 11:13:41 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_DIX_CONFIG_H
|
|
|
|
#include <dix-config.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _RANDRSTR_H_
|
|
|
|
#define _RANDRSTR_H_
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
#include <X11/X.h>
|
|
|
|
#include <X11/Xproto.h>
|
|
|
|
#include "misc.h"
|
|
|
|
#include "os.h"
|
|
|
|
#include "dixstruct.h"
|
|
|
|
#include "resource.h"
|
|
|
|
#include "scrnintstr.h"
|
|
|
|
#include "windowstr.h"
|
|
|
|
#include "pixmapstr.h"
|
|
|
|
#include "extnsionst.h"
|
|
|
|
#include "servermd.h"
|
2009-09-06 13:44:18 -06:00
|
|
|
#include "rrtransform.h"
|
2006-11-26 11:13:41 -07:00
|
|
|
#include <X11/extensions/randr.h>
|
2007-11-24 10:55:21 -07:00
|
|
|
#include <X11/extensions/randrproto.h>
|
2012-06-10 07:21:05 -06:00
|
|
|
#include <X11/extensions/render.h> /* we share subpixel order information */
|
2007-11-24 10:55:21 -07:00
|
|
|
#include "picturestr.h"
|
|
|
|
#include <X11/Xfuncproto.h>
|
|
|
|
|
|
|
|
/* required for ABI compatibility for now */
|
|
|
|
#define RANDR_10_INTERFACE 1
|
|
|
|
#define RANDR_12_INTERFACE 1
|
2012-06-10 07:21:05 -06:00
|
|
|
#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
|
2009-09-06 13:44:18 -06:00
|
|
|
#define RANDR_GET_CRTC_INTERFACE 1
|
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
#define RANDR_INTERFACE_VERSION 0x0104
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
typedef XID RRMode;
|
|
|
|
typedef XID RROutput;
|
|
|
|
typedef XID RRCrtc;
|
2013-06-07 11:28:45 -06:00
|
|
|
typedef XID RRProvider;
|
2019-07-27 01:57:06 -06:00
|
|
|
typedef XID RRLease;
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2016-05-29 06:02:34 -06:00
|
|
|
extern int RREventBase, RRErrorBase;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2016-05-29 06:02:34 -06:00
|
|
|
extern int (*ProcRandrVector[RRNumberRequests]) (ClientPtr);
|
|
|
|
extern int (*SProcRandrVector[RRNumberRequests]) (ClientPtr);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Modeline for a monitor. Name follows directly after this struct
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define RRModeName(pMode) ((char *) (pMode + 1))
|
2012-06-10 07:21:05 -06:00
|
|
|
typedef struct _rrMode RRModeRec, *RRModePtr;
|
|
|
|
typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr;
|
|
|
|
typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr;
|
|
|
|
typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr;
|
|
|
|
typedef struct _rrOutput RROutputRec, *RROutputPtr;
|
2013-06-07 11:28:45 -06:00
|
|
|
typedef struct _rrProvider RRProviderRec, *RRProviderPtr;
|
2016-05-29 06:02:34 -06:00
|
|
|
typedef struct _rrMonitor RRMonitorRec, *RRMonitorPtr;
|
2019-07-27 01:57:06 -06:00
|
|
|
typedef struct _rrLease RRLeaseRec, *RRLeasePtr;
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
struct _rrMode {
|
2012-06-10 07:21:05 -06:00
|
|
|
int refcnt;
|
|
|
|
xRRModeInfo mode;
|
|
|
|
char *name;
|
|
|
|
ScreenPtr userScreen;
|
2007-11-24 10:55:21 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _rrPropertyValue {
|
2012-06-10 07:21:05 -06:00
|
|
|
Atom type; /* ignored by server */
|
|
|
|
short format; /* format of data for swapping - 8,16,32 */
|
|
|
|
long size; /* size of data in (format/8) bytes */
|
2014-09-27 11:52:59 -06:00
|
|
|
void *data; /* private to client */
|
2007-11-24 10:55:21 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _rrProperty {
|
2012-06-10 07:21:05 -06:00
|
|
|
RRPropertyPtr next;
|
|
|
|
ATOM propertyName;
|
|
|
|
Bool is_pending;
|
|
|
|
Bool range;
|
|
|
|
Bool immutable;
|
|
|
|
int num_valid;
|
|
|
|
INT32 *valid_values;
|
|
|
|
RRPropertyValueRec current, pending;
|
2007-11-24 10:55:21 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _rrCrtc {
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtc id;
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
RRModePtr mode;
|
|
|
|
int x, y;
|
|
|
|
Rotation rotation;
|
|
|
|
Rotation rotations;
|
|
|
|
Bool changed;
|
|
|
|
int numOutputs;
|
|
|
|
RROutputPtr *outputs;
|
|
|
|
int gammaSize;
|
|
|
|
CARD16 *gammaRed;
|
|
|
|
CARD16 *gammaBlue;
|
|
|
|
CARD16 *gammaGreen;
|
|
|
|
void *devPrivate;
|
|
|
|
Bool transforms;
|
|
|
|
RRTransformRec client_pending_transform;
|
|
|
|
RRTransformRec client_current_transform;
|
|
|
|
PictTransform transform;
|
2009-09-06 13:44:18 -06:00
|
|
|
struct pict_f_transform f_transform;
|
|
|
|
struct pict_f_transform f_inverse;
|
2013-06-07 11:28:45 -06:00
|
|
|
|
|
|
|
PixmapPtr scanout_pixmap;
|
2017-12-08 08:01:59 -07:00
|
|
|
PixmapPtr scanout_pixmap_back;
|
2007-11-24 10:55:21 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _rrOutput {
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutput id;
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
char *name;
|
|
|
|
int nameLength;
|
|
|
|
CARD8 connection;
|
|
|
|
CARD8 subpixelOrder;
|
|
|
|
int mmWidth;
|
|
|
|
int mmHeight;
|
|
|
|
RRCrtcPtr crtc;
|
|
|
|
int numCrtcs;
|
|
|
|
RRCrtcPtr *crtcs;
|
|
|
|
int numClones;
|
|
|
|
RROutputPtr *clones;
|
|
|
|
int numModes;
|
|
|
|
int numPreferred;
|
|
|
|
RRModePtr *modes;
|
|
|
|
int numUserModes;
|
|
|
|
RRModePtr *userModes;
|
|
|
|
Bool changed;
|
2019-07-27 01:57:06 -06:00
|
|
|
Bool nonDesktop;
|
2012-06-10 07:21:05 -06:00
|
|
|
RRPropertyPtr properties;
|
|
|
|
Bool pendingProperties;
|
|
|
|
void *devPrivate;
|
2007-11-24 10:55:21 -07:00
|
|
|
};
|
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
struct _rrProvider {
|
|
|
|
RRProvider id;
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
uint32_t capabilities;
|
|
|
|
char *name;
|
|
|
|
int nameLength;
|
|
|
|
RRPropertyPtr properties;
|
|
|
|
Bool pendingProperties;
|
2014-05-02 13:27:46 -06:00
|
|
|
Bool changed;
|
2013-06-07 11:28:45 -06:00
|
|
|
struct _rrProvider *offload_sink;
|
|
|
|
struct _rrProvider *output_source;
|
|
|
|
};
|
|
|
|
|
2016-05-29 06:02:34 -06:00
|
|
|
typedef struct _rrMonitorGeometry {
|
|
|
|
BoxRec box;
|
|
|
|
CARD32 mmWidth;
|
|
|
|
CARD32 mmHeight;
|
|
|
|
} RRMonitorGeometryRec, *RRMonitorGeometryPtr;
|
|
|
|
|
|
|
|
struct _rrMonitor {
|
|
|
|
Atom name;
|
|
|
|
ScreenPtr pScreen;
|
|
|
|
int numOutputs;
|
|
|
|
RROutput *outputs;
|
|
|
|
Bool primary;
|
|
|
|
Bool automatic;
|
|
|
|
RRMonitorGeometryRec geometry;
|
|
|
|
};
|
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
typedef enum _rrLeaseState { RRLeaseCreating, RRLeaseRunning, RRLeaseTerminating } RRLeaseState;
|
|
|
|
|
|
|
|
struct _rrLease {
|
|
|
|
struct xorg_list list;
|
|
|
|
ScreenPtr screen;
|
|
|
|
RRLease id;
|
|
|
|
RRLeaseState state;
|
|
|
|
void *devPrivate;
|
|
|
|
int numCrtcs;
|
|
|
|
RRCrtcPtr *crtcs;
|
|
|
|
int numOutputs;
|
|
|
|
RROutputPtr *outputs;
|
|
|
|
};
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
#if RANDR_12_INTERFACE
|
2012-06-10 07:21:05 -06:00
|
|
|
typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
|
|
|
|
CARD16 width,
|
|
|
|
CARD16 height,
|
|
|
|
CARD32 mmWidth, CARD32 mmHeight);
|
|
|
|
|
|
|
|
typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
|
|
|
|
RRCrtcPtr crtc,
|
|
|
|
RRModePtr mode,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
Rotation rotation,
|
|
|
|
int numOutputs, RROutputPtr * outputs);
|
|
|
|
|
|
|
|
typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
|
|
|
|
|
|
|
|
typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
|
|
|
|
|
|
|
|
typedef Bool (*RROutputSetPropertyProcPtr) (ScreenPtr pScreen,
|
|
|
|
RROutputPtr output,
|
|
|
|
Atom property,
|
|
|
|
RRPropertyValuePtr value);
|
|
|
|
|
|
|
|
typedef Bool (*RROutputValidateModeProcPtr) (ScreenPtr pScreen,
|
|
|
|
RROutputPtr output,
|
|
|
|
RRModePtr mode);
|
|
|
|
|
|
|
|
typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen, RRModePtr mode);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2009-09-06 13:44:18 -06:00
|
|
|
#if RANDR_13_INTERFACE
|
2012-06-10 07:21:05 -06:00
|
|
|
typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen,
|
|
|
|
RROutputPtr output, Atom property);
|
|
|
|
typedef Bool (*RRGetPanningProcPtr) (ScreenPtr pScrn,
|
|
|
|
RRCrtcPtr crtc,
|
|
|
|
BoxPtr totalArea,
|
|
|
|
BoxPtr trackingArea, INT16 *border);
|
|
|
|
typedef Bool (*RRSetPanningProcPtr) (ScreenPtr pScrn,
|
|
|
|
RRCrtcPtr crtc,
|
|
|
|
BoxPtr totalArea,
|
|
|
|
BoxPtr trackingArea, INT16 *border);
|
|
|
|
|
|
|
|
#endif /* RANDR_13_INTERFACE */
|
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
typedef Bool (*RRProviderGetPropertyProcPtr) (ScreenPtr pScreen,
|
|
|
|
RRProviderPtr provider, Atom property);
|
|
|
|
typedef Bool (*RRProviderSetPropertyProcPtr) (ScreenPtr pScreen,
|
|
|
|
RRProviderPtr provider,
|
|
|
|
Atom property,
|
|
|
|
RRPropertyValuePtr value);
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation * rotations);
|
2013-06-07 11:28:45 -06:00
|
|
|
typedef Bool (*RRCloseScreenProcPtr) (ScreenPtr pscreen);
|
|
|
|
|
|
|
|
typedef Bool (*RRProviderSetOutputSourceProcPtr)(ScreenPtr pScreen,
|
|
|
|
RRProviderPtr provider,
|
|
|
|
RRProviderPtr output_source);
|
|
|
|
|
|
|
|
typedef Bool (*RRProviderSetOffloadSinkProcPtr)(ScreenPtr pScreen,
|
|
|
|
RRProviderPtr provider,
|
|
|
|
RRProviderPtr offload_sink);
|
|
|
|
|
|
|
|
|
|
|
|
typedef void (*RRProviderDestroyProcPtr)(ScreenPtr pScreen,
|
|
|
|
RRProviderPtr provider);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
/* Additions for 1.6 */
|
|
|
|
|
|
|
|
typedef int (*RRCreateLeaseProcPtr)(ScreenPtr screen,
|
|
|
|
RRLeasePtr lease,
|
|
|
|
int *fd);
|
|
|
|
|
|
|
|
typedef void (*RRTerminateLeaseProcPtr)(ScreenPtr screen,
|
|
|
|
RRLeasePtr lease);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/* These are for 1.0 compatibility */
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
typedef struct _rrRefresh {
|
2012-06-10 07:21:05 -06:00
|
|
|
CARD16 rate;
|
|
|
|
RRModePtr mode;
|
2006-11-26 11:13:41 -07:00
|
|
|
} RRScreenRate, *RRScreenRatePtr;
|
|
|
|
|
|
|
|
typedef struct _rrScreenSize {
|
2012-06-10 07:21:05 -06:00
|
|
|
int id;
|
|
|
|
short width, height;
|
|
|
|
short mmWidth, mmHeight;
|
|
|
|
int nRates;
|
2007-11-24 10:55:21 -07:00
|
|
|
RRScreenRatePtr pRates;
|
2006-11-26 11:13:41 -07:00
|
|
|
} RRScreenSize, *RRScreenSizePtr;
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
#ifdef RANDR_10_INTERFACE
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
typedef Bool (*RRSetConfigProcPtr) (ScreenPtr pScreen,
|
|
|
|
Rotation rotation,
|
|
|
|
int rate, RRScreenSizePtr pSize);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
#endif
|
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
typedef Bool (*RRCrtcSetScanoutPixmapProcPtr)(RRCrtcPtr crtc, PixmapPtr pixmap);
|
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
typedef Bool (*RRStartFlippingPixmapTrackingProcPtr)(RRCrtcPtr, DrawablePtr,
|
2017-12-08 08:01:59 -07:00
|
|
|
PixmapPtr, PixmapPtr,
|
|
|
|
int x, int y,
|
|
|
|
int dst_x, int dst_y,
|
|
|
|
Rotation rotation);
|
|
|
|
|
|
|
|
typedef Bool (*RREnableSharedPixmapFlippingProcPtr)(RRCrtcPtr,
|
|
|
|
PixmapPtr front,
|
|
|
|
PixmapPtr back);
|
|
|
|
|
|
|
|
typedef void (*RRDisableSharedPixmapFlippingProcPtr)(RRCrtcPtr);
|
|
|
|
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
typedef struct _rrScrPriv {
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* 'public' part of the structure; DDXen fill this in
|
|
|
|
* as they initialize
|
|
|
|
*/
|
|
|
|
#if RANDR_10_INTERFACE
|
2012-06-10 07:21:05 -06:00
|
|
|
RRSetConfigProcPtr rrSetConfig;
|
2007-11-24 10:55:21 -07:00
|
|
|
#endif
|
2012-06-10 07:21:05 -06:00
|
|
|
RRGetInfoProcPtr rrGetInfo;
|
2007-11-24 10:55:21 -07:00
|
|
|
#if RANDR_12_INTERFACE
|
2012-06-10 07:21:05 -06:00
|
|
|
RRScreenSetSizeProcPtr rrScreenSetSize;
|
|
|
|
RRCrtcSetProcPtr rrCrtcSet;
|
|
|
|
RRCrtcSetGammaProcPtr rrCrtcSetGamma;
|
|
|
|
RRCrtcGetGammaProcPtr rrCrtcGetGamma;
|
|
|
|
RROutputSetPropertyProcPtr rrOutputSetProperty;
|
|
|
|
RROutputValidateModeProcPtr rrOutputValidateMode;
|
|
|
|
RRModeDestroyProcPtr rrModeDestroy;
|
2007-11-24 10:55:21 -07:00
|
|
|
#endif
|
2009-09-06 13:44:18 -06:00
|
|
|
#if RANDR_13_INTERFACE
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputGetPropertyProcPtr rrOutputGetProperty;
|
|
|
|
RRGetPanningProcPtr rrGetPanning;
|
|
|
|
RRSetPanningProcPtr rrSetPanning;
|
2009-09-06 13:44:18 -06:00
|
|
|
#endif
|
2013-06-07 11:28:45 -06:00
|
|
|
/* TODO #if RANDR_15_INTERFACE */
|
|
|
|
RRCrtcSetScanoutPixmapProcPtr rrCrtcSetScanoutPixmap;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2017-12-08 08:01:59 -07:00
|
|
|
RRStartFlippingPixmapTrackingProcPtr rrStartFlippingPixmapTracking;
|
|
|
|
RREnableSharedPixmapFlippingProcPtr rrEnableSharedPixmapFlipping;
|
|
|
|
RRDisableSharedPixmapFlippingProcPtr rrDisableSharedPixmapFlipping;
|
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
RRProviderSetOutputSourceProcPtr rrProviderSetOutputSource;
|
|
|
|
RRProviderSetOffloadSinkProcPtr rrProviderSetOffloadSink;
|
|
|
|
RRProviderGetPropertyProcPtr rrProviderGetProperty;
|
|
|
|
RRProviderSetPropertyProcPtr rrProviderSetProperty;
|
2019-07-27 01:57:06 -06:00
|
|
|
|
|
|
|
RRCreateLeaseProcPtr rrCreateLease;
|
|
|
|
RRTerminateLeaseProcPtr rrTerminateLease;
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Private part of the structure; not considered part of the ABI
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
TimeStamp lastSetTime; /* last changed by client */
|
|
|
|
TimeStamp lastConfigTime; /* possible configs changed */
|
|
|
|
RRCloseScreenProcPtr CloseScreen;
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
Bool changed; /* some config changed */
|
|
|
|
Bool configChanged; /* configuration changed */
|
|
|
|
Bool layoutChanged; /* screen layout changed */
|
2014-05-02 13:27:46 -06:00
|
|
|
Bool resourcesChanged; /* screen resources change */
|
2019-07-27 01:57:06 -06:00
|
|
|
Bool leasesChanged; /* leases change */
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
CARD16 minWidth, minHeight;
|
|
|
|
CARD16 maxWidth, maxHeight;
|
|
|
|
CARD16 width, height; /* last known screen size */
|
|
|
|
CARD16 mmWidth, mmHeight; /* last known screen size */
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int numOutputs;
|
|
|
|
RROutputPtr *outputs;
|
|
|
|
RROutputPtr primaryOutput;
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
int numCrtcs;
|
|
|
|
RRCrtcPtr *crtcs;
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/* Last known pointer position */
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcPtr pointerCrtc;
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
#ifdef RANDR_10_INTERFACE
|
2006-11-26 11:13:41 -07:00
|
|
|
/*
|
|
|
|
* Configuration information
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
Rotation rotations;
|
|
|
|
CARD16 reqWidth, reqHeight;
|
|
|
|
|
|
|
|
int nSizes;
|
|
|
|
RRScreenSizePtr pSizes;
|
|
|
|
|
|
|
|
Rotation rotation;
|
|
|
|
int rate;
|
|
|
|
int size;
|
2007-11-24 10:55:21 -07:00
|
|
|
#endif
|
2012-06-10 07:21:05 -06:00
|
|
|
Bool discontiguous;
|
2013-06-07 11:28:45 -06:00
|
|
|
|
|
|
|
RRProviderPtr provider;
|
|
|
|
|
|
|
|
RRProviderDestroyProcPtr rrProviderDestroy;
|
|
|
|
|
2016-05-29 06:02:34 -06:00
|
|
|
int numMonitors;
|
|
|
|
RRMonitorPtr *monitors;
|
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
struct xorg_list leases;
|
2006-11-26 11:13:41 -07:00
|
|
|
} rrScrPrivRec, *rrScrPrivPtr;
|
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
#define rrPrivKey (&rrPrivKeyRec)
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
#define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey))
|
2006-11-26 11:13:41 -07:00
|
|
|
#define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr)
|
2008-11-02 08:26:08 -07:00
|
|
|
#define SetRRScreen(s,p) dixSetPrivate(&(s)->devPrivates, rrPrivKey, p)
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* each window has a list of clients requesting
|
|
|
|
* RRNotify events. Each client has a resource
|
|
|
|
* for each window it selects RRNotify input for,
|
|
|
|
* this resource is used to delete the RRNotifyRec
|
|
|
|
* entry from the per-window queue.
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct _RREvent *RREventPtr;
|
|
|
|
|
|
|
|
typedef struct _RREvent {
|
2012-06-10 07:21:05 -06:00
|
|
|
RREventPtr next;
|
|
|
|
ClientPtr client;
|
|
|
|
WindowPtr window;
|
|
|
|
XID clientResource;
|
|
|
|
int mask;
|
2007-11-24 10:55:21 -07:00
|
|
|
} RREventRec;
|
|
|
|
|
|
|
|
typedef struct _RRTimes {
|
2012-06-10 07:21:05 -06:00
|
|
|
TimeStamp setTime;
|
|
|
|
TimeStamp configTime;
|
2007-11-24 10:55:21 -07:00
|
|
|
} RRTimesRec, *RRTimesPtr;
|
|
|
|
|
|
|
|
typedef struct _RRClient {
|
2012-06-10 07:21:05 -06:00
|
|
|
int major_version;
|
|
|
|
int minor_version;
|
2007-11-24 10:55:21 -07:00
|
|
|
/* RRTimesRec times[0]; */
|
|
|
|
} RRClientRec, *RRClientPtr;
|
|
|
|
|
2016-05-29 06:02:34 -06:00
|
|
|
extern RESTYPE RRClientType, RREventType; /* resource types for event masks */
|
|
|
|
extern DevPrivateKeyRec RRClientPrivateKeyRec;
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
#define RRClientPrivateKey (&RRClientPrivateKeyRec)
|
2019-07-27 01:57:06 -06:00
|
|
|
extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType, RRProviderType, RRLeaseType;
|
2010-07-27 13:02:24 -06:00
|
|
|
|
|
|
|
#define VERIFY_RR_OUTPUT(id, ptr, a)\
|
|
|
|
{\
|
2014-09-27 11:52:59 -06:00
|
|
|
int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
2010-07-27 13:02:24 -06:00
|
|
|
RROutputType, client, a);\
|
|
|
|
if (rc != Success) {\
|
|
|
|
client->errorValue = id;\
|
2010-12-05 08:36:02 -07:00
|
|
|
return rc;\
|
2010-07-27 13:02:24 -06:00
|
|
|
}\
|
|
|
|
}
|
|
|
|
|
|
|
|
#define VERIFY_RR_CRTC(id, ptr, a)\
|
|
|
|
{\
|
2014-09-27 11:52:59 -06:00
|
|
|
int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
2010-07-27 13:02:24 -06:00
|
|
|
RRCrtcType, client, a);\
|
|
|
|
if (rc != Success) {\
|
|
|
|
client->errorValue = id;\
|
2010-12-05 08:36:02 -07:00
|
|
|
return rc;\
|
2010-07-27 13:02:24 -06:00
|
|
|
}\
|
|
|
|
}
|
|
|
|
|
|
|
|
#define VERIFY_RR_MODE(id, ptr, a)\
|
|
|
|
{\
|
2014-09-27 11:52:59 -06:00
|
|
|
int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
2010-07-27 13:02:24 -06:00
|
|
|
RRModeType, client, a);\
|
|
|
|
if (rc != Success) {\
|
|
|
|
client->errorValue = id;\
|
2010-12-05 08:36:02 -07:00
|
|
|
return rc;\
|
2010-07-27 13:02:24 -06:00
|
|
|
}\
|
|
|
|
}
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
#define VERIFY_RR_PROVIDER(id, ptr, a)\
|
|
|
|
{\
|
2014-09-27 11:52:59 -06:00
|
|
|
int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
2013-06-07 11:28:45 -06:00
|
|
|
RRProviderType, client, a);\
|
|
|
|
if (rc != Success) {\
|
|
|
|
client->errorValue = id;\
|
|
|
|
return rc;\
|
|
|
|
}\
|
|
|
|
}
|
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
#define VERIFY_RR_LEASE(id, ptr, a)\
|
|
|
|
{\
|
|
|
|
int rc = dixLookupResourceByType((void **)&(ptr), id,\
|
|
|
|
RRLeaseType, client, a);\
|
|
|
|
if (rc != Success) {\
|
|
|
|
client->errorValue = id;\
|
|
|
|
return rc;\
|
|
|
|
}\
|
|
|
|
}
|
|
|
|
|
2008-11-02 08:26:08 -07:00
|
|
|
#define GetRRClient(pClient) ((RRClientPtr)dixLookupPrivate(&(pClient)->devPrivates, RRClientPrivateKey))
|
2007-11-24 10:55:21 -07:00
|
|
|
#define rrClientPriv(pClient) RRClientPtr pRRClient = GetRRClient(pClient)
|
|
|
|
|
|
|
|
#ifdef RANDR_12_INTERFACE
|
|
|
|
/*
|
|
|
|
* Set the range of sizes for the screen
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRScreenSetSizeRange(ScreenPtr pScreen,
|
|
|
|
CARD16 minWidth,
|
|
|
|
CARD16 minHeight, CARD16 maxWidth, CARD16 maxHeight);
|
2007-11-24 10:55:21 -07:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* rrscreen.c */
|
|
|
|
/*
|
|
|
|
* Notify the extension that the screen size has been changed.
|
|
|
|
* The driver is responsible for calling this whenever it has changed
|
|
|
|
* the size of the screen
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRScreenSizeNotify(ScreenPtr pScreen);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Request that the screen be resized
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRScreenSizeSet(ScreenPtr pScreen,
|
|
|
|
CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Send ConfigureNotify event to root window when 'something' happens
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRSendConfigNotify(ScreenPtr pScreen);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* screen dispatch
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetScreenSizeRange(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetScreenSize(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetScreenResources(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetScreenResourcesCurrent(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetScreenConfig(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetScreenInfo(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Deliver a ScreenNotify event
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen);
|
|
|
|
|
2013-12-28 07:40:01 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
RRResourcesChanged(ScreenPtr pScreen);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/* randr.c */
|
2013-12-28 07:40:01 -07:00
|
|
|
/* set a screen change on the primary screen */
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRSetChanged(ScreenPtr pScreen);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Send all pending events
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRTellChanged(ScreenPtr pScreen);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Poll the driver for changed information
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRGetInfo(ScreenPtr pScreen, Bool force_query);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT Bool RRInit(void);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool RRScreenInit(ScreenPtr pScreen);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT RROutputPtr RRFirstOutput(ScreenPtr pScreen);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
extern _X_EXPORT Bool RROutputSetNonDesktop(RROutputPtr output, Bool non_desktop);
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT CARD16
|
2012-06-10 07:21:05 -06:00
|
|
|
RRVerticalRefresh(xRRModeInfo * mode);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
#ifdef RANDR_10_INTERFACE
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* This is the old interface, deprecated but left
|
|
|
|
* around for compatibility
|
|
|
|
*/
|
|
|
|
|
2006-11-26 11:13:41 -07:00
|
|
|
/*
|
|
|
|
* Then, register the specific size with the screen
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT RRScreenSizePtr
|
2012-06-10 07:21:05 -06:00
|
|
|
RRRegisterSize(ScreenPtr pScreen,
|
|
|
|
short width, short height, short mmWidth, short mmHeight);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRRegisterRate(ScreenPtr pScreen, RRScreenSizePtr pSize, int rate);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Finally, set the current configuration of the screen
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
RRSetCurrentConfig(ScreenPtr pScreen,
|
|
|
|
Rotation rotation, int rate, RRScreenSizePtr pSize);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT Rotation RRGetRotation(ScreenPtr pScreen);
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
#endif
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/* rrcrtc.c */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Notify the CRTC of some change; layoutChanged indicates that
|
|
|
|
* some position or size element changed
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create a CRTC
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT RRCrtcPtr RRCrtcCreate(ScreenPtr pScreen, void *devPrivate);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set the allowed rotations on a CRTC
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcSetRotations(RRCrtcPtr crtc, Rotation rotations);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2009-09-06 13:44:18 -06:00
|
|
|
/*
|
|
|
|
* Set whether transforms are allowed on a CRTC
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcSetTransformSupport(RRCrtcPtr crtc, Bool transforms);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Notify the extension that the Crtc has been reconfigured,
|
|
|
|
* the driver calls this whenever it has updated the mode
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRCrtcNotify(RRCrtcPtr crtc,
|
|
|
|
RRModePtr mode,
|
|
|
|
int x,
|
|
|
|
int y,
|
|
|
|
Rotation rotation,
|
|
|
|
RRTransformPtr transform, int numOutputs, RROutputPtr * outputs);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRDeliverCrtcEvent(ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Request that the Crtc be reconfigured
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRCrtcSet(RRCrtcPtr crtc,
|
|
|
|
RRModePtr mode,
|
|
|
|
int x,
|
|
|
|
int y, Rotation rotation, int numOutput, RROutputPtr * outputs);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Request that the Crtc gamma be changed
|
|
|
|
*/
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcGammaSet(RRCrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
/*
|
|
|
|
* Request current gamma back from the DDX (if possible).
|
|
|
|
* This includes gamma size.
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcGammaGet(RRCrtcPtr crtc);
|
2010-07-27 13:02:24 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Notify the extension that the Crtc gamma has been changed
|
|
|
|
* The driver calls this whenever it has changed the gamma values
|
|
|
|
* in the RRCrtcRec
|
|
|
|
*/
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcGammaNotify(RRCrtcPtr crtc);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set the size of the gamma table at server startup time
|
|
|
|
*/
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcGammaSetSize(RRCrtcPtr crtc, int size);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return the area of the frame buffer scanned out by the crtc,
|
|
|
|
* taking into account the current mode and rotation
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcGetScanoutSize(RRCrtcPtr crtc, int *width, int *height);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2009-09-06 13:44:18 -06:00
|
|
|
/*
|
|
|
|
* Return crtc transform
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT RRTransformPtr RRCrtcGetTransform(RRCrtcPtr crtc);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Check whether the pending and current transforms are the same
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcPendingTransform(RRCrtcPtr crtc);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Destroy a Crtc at shutdown
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcDestroy(RRCrtcPtr crtc);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Set the pending CRTC transformation
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRCrtcTransformSet(RRCrtcPtr crtc,
|
|
|
|
PictTransformPtr transform,
|
|
|
|
struct pict_f_transform *f_transform,
|
|
|
|
struct pict_f_transform *f_inverse,
|
|
|
|
char *filter, int filter_len, xFixed * params, int nparams);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Initialize crtc type
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcInit(void);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-12-05 08:36:02 -07:00
|
|
|
/*
|
|
|
|
* Initialize crtc type error value
|
|
|
|
*/
|
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRCrtcInitErrorValue(void);
|
2010-12-05 08:36:02 -07:00
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
/*
|
|
|
|
* Detach and free a scanout pixmap
|
|
|
|
*/
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc);
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RRReplaceScanoutPixmap(DrawablePtr pDrawable, PixmapPtr pPixmap, Bool enable);
|
|
|
|
|
2017-12-08 08:01:59 -07:00
|
|
|
/*
|
|
|
|
* Return if the screen has any scanout_pixmap's attached
|
|
|
|
*/
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RRHasScanoutPixmap(ScreenPtr pScreen);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Crtc dispatch
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetCrtcInfo(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetCrtcConfig(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetCrtcGammaSize(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetCrtcGamma(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetCrtcGamma(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetCrtcTransform(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetCrtcTransform(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
|
|
|
int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetPanning(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
|
|
|
int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetPanning(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2011-11-05 07:32:40 -06:00
|
|
|
void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRConstrainCursorHarder(DeviceIntPtr, ScreenPtr, int, int *, int *);
|
2011-11-05 07:32:40 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/* rrdispatch.c */
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRClientKnowsRates(ClientPtr pClient);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
/* rrlease.c */
|
|
|
|
void
|
|
|
|
RRDeliverLeaseEvent(ClientPtr client, WindowPtr window);
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRLeaseTerminated(RRLeasePtr lease);
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRLeaseFree(RRLeasePtr lease);
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RRCrtcIsLeased(RRCrtcPtr crtc);
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RROutputIsLeased(RROutputPtr output);
|
|
|
|
|
|
|
|
void
|
|
|
|
RRTerminateLease(RRLeasePtr lease);
|
|
|
|
|
|
|
|
Bool
|
|
|
|
RRLeaseInit(void);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/* rrmode.c */
|
|
|
|
/*
|
|
|
|
* Find, and if necessary, create a mode
|
|
|
|
*/
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT RRModePtr RRModeGet(xRRModeInfo * modeInfo, const char *name);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Destroy a mode.
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRModeDestroy(RRModePtr mode);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return a list of modes that are valid for some output in pScreen
|
|
|
|
*/
|
2012-06-10 07:21:05 -06:00
|
|
|
extern _X_EXPORT RRModePtr *RRModesForScreen(ScreenPtr pScreen, int *num_ret);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Initialize mode type
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRModeInit(void);
|
2010-12-05 08:36:02 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize mode type error value
|
|
|
|
*/
|
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRModeInitErrorValue(void);
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRCreateMode(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRDestroyMode(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRAddOutputMode(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRDeleteOutputMode(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/* rroutput.c */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Notify the output of some change. configChanged indicates whether
|
|
|
|
* any external configuration (mode list, clones, connected status)
|
|
|
|
* has changed, or whether the change was strictly internal
|
|
|
|
* (which crtc is in use)
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputChanged(RROutputPtr output, Bool configChanged);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Create an output
|
|
|
|
*/
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT RROutputPtr
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputCreate(ScreenPtr pScreen,
|
|
|
|
const char *name, int nameLength, void *devPrivate);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Notify extension that output parameters have been changed
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputSetClones(RROutputPtr output, RROutputPtr * clones, int numClones);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RROutputSetModes(RROutputPtr output,
|
|
|
|
RRModePtr * modes, int numModes, int numPreferred);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputAddUserMode(RROutputPtr output, RRModePtr mode);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputDeleteUserMode(RROutputPtr output, RRModePtr mode);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputSetCrtcs(RROutputPtr output, RRCrtcPtr * crtcs, int numCrtcs);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputSetConnection(RROutputPtr output, CARD8 connection);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputSetSubpixelOrder(RROutputPtr output, int subpixelOrder);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputSetPhysicalSize(RROutputPtr output, int mmWidth, int mmHeight);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputDestroy(RROutputPtr output);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetOutputInfo(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRSetOutputPrimary(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetOutputPrimary(ClientPtr client);
|
2009-09-06 13:44:18 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/*
|
|
|
|
* Initialize output type
|
|
|
|
*/
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputInit(void);
|
2010-12-05 08:36:02 -07:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize output type error value
|
|
|
|
*/
|
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RROutputInitErrorValue(void);
|
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
/* rrpointer.c */
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRPointerMoved(ScreenPtr pScreen, int x, int y);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRPointerScreenConfigured(ScreenPtr pScreen);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/* rrproperty.c */
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRDeleteAllOutputProperties(RROutputPtr output);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT RRPropertyValuePtr
|
2012-06-10 07:21:05 -06:00
|
|
|
RRGetOutputProperty(RROutputPtr output, Atom property, Bool pending);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT RRPropertyPtr
|
2012-06-10 07:21:05 -06:00
|
|
|
RRQueryOutputProperty(RROutputPtr output, Atom property);
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRDeleteOutputProperty(RROutputPtr output, Atom property);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT Bool
|
2012-06-10 07:21:05 -06:00
|
|
|
RRPostPendingProperties(RROutputPtr output);
|
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRChangeOutputProperty(RROutputPtr output, Atom property, Atom type,
|
|
|
|
int format, int mode, unsigned long len,
|
2019-07-27 01:57:06 -06:00
|
|
|
const void *value, Bool sendevent, Bool pending);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
|
|
|
|
RRConfigureOutputProperty(RROutputPtr output, Atom property,
|
|
|
|
Bool pending, Bool range, Bool immutable,
|
2019-07-27 01:57:06 -06:00
|
|
|
int num_values, const INT32 *values);
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRChangeOutputProperty(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRGetOutputProperty(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRListOutputProperties(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRQueryOutputProperty(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRConfigureOutputProperty(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2010-07-27 13:02:24 -06:00
|
|
|
extern _X_EXPORT int
|
2012-06-10 07:21:05 -06:00
|
|
|
ProcRRDeleteOutputProperty(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
/* rrprovider.c */
|
2017-12-08 08:01:59 -07:00
|
|
|
#define PRIME_SYNC_PROP "PRIME Synchronization"
|
2013-06-07 11:28:45 -06:00
|
|
|
extern _X_EXPORT void
|
|
|
|
RRProviderInitErrorValue(void);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRGetProviders(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRGetProviderInfo(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRSetProviderOutputSource(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRSetProviderOffloadSink(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RRProviderInit(void);
|
|
|
|
|
|
|
|
extern _X_EXPORT RRProviderPtr
|
|
|
|
RRProviderCreate(ScreenPtr pScreen, const char *name,
|
|
|
|
int nameLength);
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRProviderDestroy (RRProviderPtr provider);
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRProviderSetCapabilities(RRProviderPtr provider, uint32_t capabilities);
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RRProviderLookup(XID id, RRProviderPtr *provider_p);
|
|
|
|
|
2013-12-28 07:40:01 -07:00
|
|
|
extern _X_EXPORT void
|
|
|
|
RRDeliverProviderEvent(ClientPtr client, WindowPtr pWin, RRProviderPtr provider);
|
|
|
|
|
2013-06-07 11:28:45 -06:00
|
|
|
/* rrproviderproperty.c */
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRDeleteAllProviderProperties(RRProviderPtr provider);
|
|
|
|
|
|
|
|
extern _X_EXPORT RRPropertyValuePtr
|
|
|
|
RRGetProviderProperty(RRProviderPtr provider, Atom property, Bool pending);
|
|
|
|
|
|
|
|
extern _X_EXPORT RRPropertyPtr
|
|
|
|
RRQueryProviderProperty(RRProviderPtr provider, Atom property);
|
|
|
|
|
|
|
|
extern _X_EXPORT void
|
|
|
|
RRDeleteProviderProperty(RRProviderPtr provider, Atom property);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
RRChangeProviderProperty(RRProviderPtr provider, Atom property, Atom type,
|
|
|
|
int format, int mode, unsigned long len,
|
2014-09-27 11:52:59 -06:00
|
|
|
void *value, Bool sendevent, Bool pending);
|
2013-06-07 11:28:45 -06:00
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
RRConfigureProviderProperty(RRProviderPtr provider, Atom property,
|
|
|
|
Bool pending, Bool range, Bool immutable,
|
|
|
|
int num_values, INT32 *values);
|
|
|
|
|
|
|
|
extern _X_EXPORT Bool
|
|
|
|
RRPostProviderPendingProperties(RRProviderPtr provider);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRGetProviderProperty(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRListProviderProperties(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRQueryProviderProperty(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRConfigureProviderProperty(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRChangeProviderProperty(ClientPtr client);
|
|
|
|
|
|
|
|
extern _X_EXPORT int
|
|
|
|
ProcRRDeleteProviderProperty(ClientPtr client);
|
2007-11-24 10:55:21 -07:00
|
|
|
/* rrxinerama.c */
|
2010-07-27 13:02:24 -06:00
|
|
|
#ifdef XINERAMA
|
|
|
|
extern _X_EXPORT void
|
2012-06-10 07:21:05 -06:00
|
|
|
RRXineramaExtensionInit(void);
|
2010-07-27 13:02:24 -06:00
|
|
|
#endif
|
2006-11-26 11:13:41 -07:00
|
|
|
|
2016-05-29 06:02:34 -06:00
|
|
|
void
|
|
|
|
RRMonitorInit(ScreenPtr screen);
|
|
|
|
|
|
|
|
Bool
|
|
|
|
RRMonitorMakeList(ScreenPtr screen, Bool get_active, RRMonitorPtr *monitors_ret, int *nmon_ret);
|
|
|
|
|
|
|
|
int
|
|
|
|
RRMonitorCountList(ScreenPtr screen);
|
|
|
|
|
|
|
|
void
|
|
|
|
RRMonitorFreeList(RRMonitorPtr monitors, int nmon);
|
|
|
|
|
|
|
|
void
|
|
|
|
RRMonitorClose(ScreenPtr screen);
|
|
|
|
|
|
|
|
RRMonitorPtr
|
|
|
|
RRMonitorAlloc(int noutput);
|
|
|
|
|
|
|
|
int
|
|
|
|
RRMonitorAdd(ClientPtr client, ScreenPtr screen, RRMonitorPtr monitor);
|
|
|
|
|
|
|
|
void
|
|
|
|
RRMonitorFree(RRMonitorPtr monitor);
|
|
|
|
|
|
|
|
int
|
|
|
|
ProcRRGetMonitors(ClientPtr client);
|
|
|
|
|
|
|
|
int
|
|
|
|
ProcRRSetMonitor(ClientPtr client);
|
|
|
|
|
|
|
|
int
|
|
|
|
ProcRRDeleteMonitor(ClientPtr client);
|
|
|
|
|
2019-07-27 01:57:06 -06:00
|
|
|
int
|
|
|
|
ProcRRCreateLease(ClientPtr client);
|
|
|
|
|
|
|
|
int
|
|
|
|
ProcRRFreeLease(ClientPtr client);
|
|
|
|
|
2012-06-10 07:21:05 -06:00
|
|
|
#endif /* _RANDRSTR_H_ */
|
2007-11-24 10:55:21 -07:00
|
|
|
|
|
|
|
/*
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
randr extension implementation structure
|
|
|
|
|
|
|
|
Query state:
|
|
|
|
ProcRRGetScreenInfo/ProcRRGetScreenResources
|
|
|
|
RRGetInfo
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
• Request configuration from driver, either 1.0 or 1.2 style
|
|
|
|
• These functions only record state changes, all
|
|
|
|
other actions are pended until RRTellChanged is called
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
->rrGetInfo
|
|
|
|
1.0:
|
|
|
|
RRRegisterSize
|
|
|
|
RRRegisterRate
|
|
|
|
RRSetCurrentConfig
|
|
|
|
1.2:
|
|
|
|
RRScreenSetSizeRange
|
|
|
|
RROutputSetCrtcs
|
|
|
|
RRModeGet
|
|
|
|
RROutputSetModes
|
|
|
|
RROutputSetConnection
|
|
|
|
RROutputSetSubpixelOrder
|
|
|
|
RROutputSetClones
|
|
|
|
RRCrtcNotify
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
• Must delay scanning configuration until after ->rrGetInfo returns
|
|
|
|
because some drivers will call SetCurrentConfig in the middle
|
|
|
|
of the ->rrGetInfo operation.
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
1.0:
|
|
|
|
|
|
|
|
• Scan old configuration, mirror to new structures
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
RRScanOldConfig
|
|
|
|
RRCrtcCreate
|
|
|
|
RROutputCreate
|
|
|
|
RROutputSetCrtcs
|
|
|
|
RROutputSetConnection
|
|
|
|
RROutputSetSubpixelOrder
|
|
|
|
RROldModeAdd • This adds modes one-at-a-time
|
|
|
|
RRModeGet
|
|
|
|
RRCrtcNotify
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
• send events, reset pointer if necessary
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
RRTellChanged
|
|
|
|
WalkTree (sending events)
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
• when layout has changed:
|
|
|
|
RRPointerScreenConfigured
|
|
|
|
RRSendConfigNotify
|
2015-09-16 13:10:19 -06:00
|
|
|
|
2007-11-24 10:55:21 -07:00
|
|
|
Asynchronous state setting (1.2 only)
|
|
|
|
When setting state asynchronously, the driver invokes the
|
|
|
|
->rrGetInfo function and then calls RRTellChanged to flush
|
|
|
|
the changes to the clients and reset pointer if necessary
|
|
|
|
|
|
|
|
Set state
|
|
|
|
|
|
|
|
ProcRRSetScreenConfig
|
|
|
|
RRCrtcSet
|
|
|
|
1.2:
|
|
|
|
->rrCrtcSet
|
|
|
|
RRCrtcNotify
|
|
|
|
1.0:
|
|
|
|
->rrSetConfig
|
|
|
|
RRCrtcNotify
|
|
|
|
RRTellChanged
|
|
|
|
*/
|