diff options
author | Keith Packard <keithp@keithp.com> | 2010-12-04 19:22:11 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-12-06 20:08:43 -0800 |
commit | d94a035ea9eb3167fc4f35b2d9f0d53f8807014c (patch) | |
tree | 2fb8a7dd45aab259a5570a17155cd5bc9d69d850 /randr/randrstr.h | |
parent | 66294afcab7b7a82f7dd897767e46c48a94b8ee8 (diff) |
randr: Implement RRSetCrtcConfigs
This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'randr/randrstr.h')
-rw-r--r-- | randr/randrstr.h | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/randr/randrstr.h b/randr/randrstr.h index 5e2a3518c..2fe960234 100644 --- a/randr/randrstr.h +++ b/randr/randrstr.h @@ -78,6 +78,8 @@ typedef struct _rrMode RRModeRec, *RRModePtr; typedef struct _rrPropertyValue RRPropertyValueRec, *RRPropertyValuePtr; typedef struct _rrProperty RRPropertyRec, *RRPropertyPtr; typedef struct _rrCrtc RRCrtcRec, *RRCrtcPtr; +typedef struct _rrScreenConfig RRScreenConfigRec, *RRScreenConfigPtr; +typedef struct _rrCrtcConfig RRCrtcConfigRec, *RRCrtcConfigPtr; typedef struct _rrOutput RROutputRec, *RROutputPtr; struct _rrMode { @@ -135,6 +137,28 @@ struct _rrCrtc { struct pict_f_transform f_sprite_image_inverse; /* image from crtc */ }; +struct _rrScreenConfig { + CARD16 screen_pixmap_width; + CARD16 screen_pixmap_height; + CARD16 screen_width; + CARD16 screen_height; + CARD32 mm_width; + CARD32 mm_height; +}; + +struct _rrCrtcConfig { + RRCrtcPtr crtc; + int x, y; + RRModePtr mode; + Rotation rotation; + int numOutputs; + RROutputPtr *outputs; + struct pict_f_transform sprite_position_transform; + struct pict_f_transform sprite_image_transform; + PixmapPtr pixmap; + int pixmap_x, pixmap_y; +}; + struct _rrOutput { RROutput id; ScreenPtr pScreen; @@ -251,6 +275,11 @@ typedef void (*RRGetCrtcSpriteTransformPtr) (ScreenPtr pScreen, struct pict_f_transform *position_transform, struct pict_f_transform *image_transform); +typedef Bool (*RRSetCrtcConfigsPtr) (ScreenPtr screen, + RRScreenConfigPtr screen_config, + RRCrtcConfigPtr crtc_configs, + int num_configs); + typedef struct _rrScrPriv { /* * 'public' part of the structure; DDXen fill this in @@ -276,6 +305,7 @@ typedef struct _rrScrPriv { #endif RRSetCrtcSpriteTransformPtr rrSetCrtcSpriteTransform; RRGetCrtcSpriteTransformPtr rrGetCrtcSpriteTransform; + RRSetCrtcConfigsPtr rrSetCrtcConfigs; /* * Private part of the structure; not considered part of the ABI @@ -428,6 +458,10 @@ RRScreenSizeSet (ScreenPtr pScreen, CARD32 mmWidth, CARD32 mmHeight); +extern _X_EXPORT void +RRScreenCurrentConfig(ScreenPtr screen, + RRScreenConfigPtr screen_config); + /* * Send ConfigureNotify event to root window when 'something' happens */ @@ -671,6 +705,38 @@ extern _X_EXPORT void RRCrtcInitErrorValue (void); /* + * Free a set of crtc configs and their attached output arrays + */ +void +RRFreeCrtcConfigs(RRCrtcConfigPtr configs, int num_configs); + +/* + * Convert the current crtc configuration into an RRCrtcConfig + */ +extern _X_EXPORT Bool +RRCrtcCurrentConfig(RRCrtcPtr crtc, + RRCrtcConfigPtr crtc_config); + +/* + * Figure out whether the specific crtc_config can fit + * within the screen_config + */ +Bool +RRScreenCoversCrtc(RRScreenConfigPtr screen_config, + RRCrtcConfigPtr crtc_config, + RRTransformPtr client_transform, + XID *errorValue); + +/* + * Set a screen and set of crtc configurations in one operation + */ +Bool +RRSetCrtcConfigs(ScreenPtr screen, + RRScreenConfigPtr screen_config, + RRCrtcConfigPtr crtc_configs, + int num_configs); + +/* * Crtc dispatch */ @@ -695,6 +761,9 @@ ProcRRSetCrtcTransform (ClientPtr client); extern _X_EXPORT int ProcRRGetCrtcTransform (ClientPtr client); +extern _X_EXPORT int +ProcRRSetCrtcConfigs (ClientPtr client); + int ProcRRGetPanning (ClientPtr client); @@ -916,6 +985,27 @@ extern _X_EXPORT void RRXineramaExtensionInit(void); #endif +/* mirrcrtc.c */ +Bool +miRRSetScreenConfig(ScreenPtr screen, + RRScreenConfigPtr screen_config); + +Bool +miRRSetCrtcConfig(RRCrtcConfigPtr crtc_config); + +Bool +miRRDisableCrtc(RRCrtcPtr crtc); + +Bool +miRRCheckDisableCrtc(RRScreenConfigPtr new_screen_config, + RRCrtcConfigPtr old_crtc_config); + +Bool +miRRSetCrtcConfigs(ScreenPtr screen, + RRScreenConfigPtr screen_config, + RRCrtcConfigPtr crtc_configs, + int num_configs); + #endif /* _RANDRSTR_H_ */ /* |