Xrandr.h revision 8bd17e5f
1b042e37fSmrg/* 2b042e37fSmrg * Copyright © 2000 Compaq Computer Corporation, Inc. 3b042e37fSmrg * Copyright © 2002 Hewlett-Packard Company, Inc. 4b042e37fSmrg * Copyright © 2006 Intel Corporation 58c4a8e55Smrg * Copyright © 2008 Red Hat, Inc. 6b042e37fSmrg * 7b042e37fSmrg * Permission to use, copy, modify, distribute, and sell this software and its 8b042e37fSmrg * documentation for any purpose is hereby granted without fee, provided that 9b042e37fSmrg * the above copyright notice appear in all copies and that both that copyright 10b042e37fSmrg * notice and this permission notice appear in supporting documentation, and 11b042e37fSmrg * that the name of the copyright holders not be used in advertising or 12b042e37fSmrg * publicity pertaining to distribution of the software without specific, 13b042e37fSmrg * written prior permission. The copyright holders make no representations 14b042e37fSmrg * about the suitability of this software for any purpose. It is provided "as 15b042e37fSmrg * is" without express or implied warranty. 16b042e37fSmrg * 17b042e37fSmrg * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 18b042e37fSmrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 19b042e37fSmrg * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 20b042e37fSmrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21b042e37fSmrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 22b042e37fSmrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 23b042e37fSmrg * OF THIS SOFTWARE. 24b042e37fSmrg * 25b042e37fSmrg * Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc. 26b042e37fSmrg * Keith Packard, Intel Corporation 27b042e37fSmrg */ 28b042e37fSmrg 29b042e37fSmrg#ifndef _XRANDR_H_ 30b042e37fSmrg#define _XRANDR_H_ 31b042e37fSmrg 32b042e37fSmrg#include <X11/extensions/randr.h> 338c4a8e55Smrg#include <X11/extensions/Xrender.h> 34b042e37fSmrg 35b042e37fSmrg#include <X11/Xfuncproto.h> 36b042e37fSmrg 37b042e37fSmrg_XFUNCPROTOBEGIN 38b042e37fSmrg 39b042e37fSmrgtypedef XID RROutput; 40b042e37fSmrgtypedef XID RRCrtc; 41b042e37fSmrgtypedef XID RRMode; 420597fb56Smrgtypedef XID RRProvider; 43b042e37fSmrg 44b042e37fSmrgtypedef struct { 45b042e37fSmrg int width, height; 46b042e37fSmrg int mwidth, mheight; 47b042e37fSmrg} XRRScreenSize; 48b042e37fSmrg 49b042e37fSmrg/* 50b042e37fSmrg * Events. 51b042e37fSmrg */ 52b042e37fSmrg 53b042e37fSmrgtypedef struct { 54b042e37fSmrg int type; /* event base */ 55b042e37fSmrg unsigned long serial; /* # of last request processed by server */ 56b042e37fSmrg Bool send_event; /* true if this came from a SendEvent request */ 57b042e37fSmrg Display *display; /* Display the event was read from */ 58b042e37fSmrg Window window; /* window which selected for this event */ 59b042e37fSmrg Window root; /* Root window for changed screen */ 60b042e37fSmrg Time timestamp; /* when the screen change occurred */ 61b042e37fSmrg Time config_timestamp; /* when the last configuration change */ 62b042e37fSmrg SizeID size_index; 63b042e37fSmrg SubpixelOrder subpixel_order; 64b042e37fSmrg Rotation rotation; 65b042e37fSmrg int width; 66b042e37fSmrg int height; 67b042e37fSmrg int mwidth; 68b042e37fSmrg int mheight; 69b042e37fSmrg} XRRScreenChangeNotifyEvent; 70b042e37fSmrg 71b042e37fSmrgtypedef struct { 72b042e37fSmrg int type; /* event base */ 73b042e37fSmrg unsigned long serial; /* # of last request processed by server */ 74b042e37fSmrg Bool send_event; /* true if this came from a SendEvent request */ 75b042e37fSmrg Display *display; /* Display the event was read from */ 76b042e37fSmrg Window window; /* window which selected for this event */ 77b042e37fSmrg int subtype; /* RRNotify_ subtype */ 78b042e37fSmrg} XRRNotifyEvent; 79b042e37fSmrg 80b042e37fSmrgtypedef struct { 81b042e37fSmrg int type; /* event base */ 82b042e37fSmrg unsigned long serial; /* # of last request processed by server */ 83b042e37fSmrg Bool send_event; /* true if this came from a SendEvent request */ 84b042e37fSmrg Display *display; /* Display the event was read from */ 85b042e37fSmrg Window window; /* window which selected for this event */ 86b042e37fSmrg int subtype; /* RRNotify_OutputChange */ 87b042e37fSmrg RROutput output; /* affected output */ 88b042e37fSmrg RRCrtc crtc; /* current crtc (or None) */ 89b042e37fSmrg RRMode mode; /* current mode (or None) */ 90b042e37fSmrg Rotation rotation; /* current rotation of associated crtc */ 91b042e37fSmrg Connection connection; /* current connection status */ 92b042e37fSmrg SubpixelOrder subpixel_order; 93b042e37fSmrg} XRROutputChangeNotifyEvent; 94b042e37fSmrg 95b042e37fSmrgtypedef struct { 96b042e37fSmrg int type; /* event base */ 97b042e37fSmrg unsigned long serial; /* # of last request processed by server */ 98b042e37fSmrg Bool send_event; /* true if this came from a SendEvent request */ 99b042e37fSmrg Display *display; /* Display the event was read from */ 100b042e37fSmrg Window window; /* window which selected for this event */ 101b042e37fSmrg int subtype; /* RRNotify_CrtcChange */ 102b042e37fSmrg RRCrtc crtc; /* current crtc (or None) */ 103b042e37fSmrg RRMode mode; /* current mode (or None) */ 104b042e37fSmrg Rotation rotation; /* current rotation of associated crtc */ 105b042e37fSmrg int x, y; /* position */ 106b042e37fSmrg unsigned int width, height; /* size */ 107b042e37fSmrg} XRRCrtcChangeNotifyEvent; 108b042e37fSmrg 109b042e37fSmrgtypedef struct { 110b042e37fSmrg int type; /* event base */ 111b042e37fSmrg unsigned long serial; /* # of last request processed by server */ 112b042e37fSmrg Bool send_event; /* true if this came from a SendEvent request */ 113b042e37fSmrg Display *display; /* Display the event was read from */ 114b042e37fSmrg Window window; /* window which selected for this event */ 115b042e37fSmrg int subtype; /* RRNotify_OutputProperty */ 116b042e37fSmrg RROutput output; /* related output */ 117b042e37fSmrg Atom property; /* changed property */ 118b042e37fSmrg Time timestamp; /* time of change */ 119b042e37fSmrg int state; /* NewValue, Deleted */ 120b042e37fSmrg} XRROutputPropertyNotifyEvent; 121b042e37fSmrg 1220597fb56Smrgtypedef struct { 1230597fb56Smrg int type; /* event base */ 1240597fb56Smrg unsigned long serial; /* # of last request processed by server */ 1250597fb56Smrg Bool send_event; /* true if this came from a SendEvent request */ 1260597fb56Smrg Display *display; /* Display the event was read from */ 1270597fb56Smrg Window window; /* window which selected for this event */ 1280597fb56Smrg int subtype; /* RRNotify_ProviderChange */ 1290597fb56Smrg RRProvider provider; /* current provider (or None) */ 1300597fb56Smrg Time timestamp; /* time of change */ 1310597fb56Smrg unsigned int current_role; 1320597fb56Smrg} XRRProviderChangeNotifyEvent; 1330597fb56Smrg 1340597fb56Smrgtypedef struct { 1350597fb56Smrg int type; /* event base */ 1360597fb56Smrg unsigned long serial; /* # of last request processed by server */ 1370597fb56Smrg Bool send_event; /* true if this came from a SendEvent request */ 1380597fb56Smrg Display *display; /* Display the event was read from */ 1390597fb56Smrg Window window; /* window which selected for this event */ 1400597fb56Smrg int subtype; /* RRNotify_ProviderProperty */ 1410597fb56Smrg RRProvider provider; /* related provider */ 1420597fb56Smrg Atom property; /* changed property */ 1430597fb56Smrg Time timestamp; /* time of change */ 1440597fb56Smrg int state; /* NewValue, Deleted */ 1450597fb56Smrg} XRRProviderPropertyNotifyEvent; 1460597fb56Smrg 1470597fb56Smrgtypedef struct { 1480597fb56Smrg int type; /* event base */ 1490597fb56Smrg unsigned long serial; /* # of last request processed by server */ 1500597fb56Smrg Bool send_event; /* true if this came from a SendEvent request */ 1510597fb56Smrg Display *display; /* Display the event was read from */ 1520597fb56Smrg Window window; /* window which selected for this event */ 1530597fb56Smrg int subtype; /* RRNotify_ResourceChange */ 1540597fb56Smrg Time timestamp; /* time of change */ 1550597fb56Smrg} XRRResourceChangeNotifyEvent; 1560597fb56Smrg 157b042e37fSmrg/* internal representation is private to the library */ 1580597fb56Smrgtypedef struct _XRRScreenConfiguration XRRScreenConfiguration; 159b042e37fSmrg 1608c4a8e55SmrgBool XRRQueryExtension (Display *dpy, 1618c4a8e55Smrg int *event_base_return, 1628c4a8e55Smrg int *error_base_return); 163b042e37fSmrgStatus XRRQueryVersion (Display *dpy, 1648c4a8e55Smrg int *major_version_return, 1658c4a8e55Smrg int *minor_version_return); 166b042e37fSmrg 167b042e37fSmrgXRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, 168b042e37fSmrg Window window); 1690597fb56Smrg 170b042e37fSmrgvoid XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); 171b042e37fSmrg 1720597fb56Smrg/* 173b042e37fSmrg * Note that screen configuration changes are only permitted if the client can 174b042e37fSmrg * prove it has up to date configuration information. We are trying to 175b042e37fSmrg * insist that it become possible for screens to change dynamically, so 176b042e37fSmrg * we want to ensure the client knows what it is talking about when requesting 177b042e37fSmrg * changes. 178b042e37fSmrg */ 1790597fb56SmrgStatus XRRSetScreenConfig (Display *dpy, 180b042e37fSmrg XRRScreenConfiguration *config, 181b042e37fSmrg Drawable draw, 182b042e37fSmrg int size_index, 183b042e37fSmrg Rotation rotation, 184b042e37fSmrg Time timestamp); 185b042e37fSmrg 186b042e37fSmrg/* added in v1.1, sorry for the lame name */ 1870597fb56SmrgStatus XRRSetScreenConfigAndRate (Display *dpy, 188b042e37fSmrg XRRScreenConfiguration *config, 189b042e37fSmrg Drawable draw, 190b042e37fSmrg int size_index, 191b042e37fSmrg Rotation rotation, 192b042e37fSmrg short rate, 193b042e37fSmrg Time timestamp); 194b042e37fSmrg 195b042e37fSmrg 196b042e37fSmrgRotation XRRConfigRotations(XRRScreenConfiguration *config, Rotation *current_rotation); 197b042e37fSmrg 198b042e37fSmrgTime XRRConfigTimes (XRRScreenConfiguration *config, Time *config_timestamp); 199b042e37fSmrg 200b042e37fSmrgXRRScreenSize *XRRConfigSizes(XRRScreenConfiguration *config, int *nsizes); 201b042e37fSmrg 202b042e37fSmrgshort *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates); 203b042e37fSmrg 2040597fb56SmrgSizeID XRRConfigCurrentConfiguration (XRRScreenConfiguration *config, 205b042e37fSmrg Rotation *rotation); 2060597fb56Smrg 207b042e37fSmrgshort XRRConfigCurrentRate (XRRScreenConfiguration *config); 208b042e37fSmrg 209b042e37fSmrgint XRRRootToScreen(Display *dpy, Window root); 210b042e37fSmrg 2110597fb56Smrg/* 212b042e37fSmrg * returns the screen configuration for the specified screen; does a lazy 213b042e37fSmrg * evalution to delay getting the information, and caches the result. 214b042e37fSmrg * These routines should be used in preference to XRRGetScreenInfo 215b042e37fSmrg * to avoid unneeded round trips to the X server. These are new 216b042e37fSmrg * in protocol version 0.1. 217b042e37fSmrg */ 218b042e37fSmrg 219b042e37fSmrg 220b042e37fSmrgvoid XRRSelectInput(Display *dpy, Window window, int mask); 221b042e37fSmrg 2220597fb56Smrg/* 2230597fb56Smrg * the following are always safe to call, even if RandR is not implemented 2240597fb56Smrg * on a screen 225b042e37fSmrg */ 226b042e37fSmrg 227b042e37fSmrg 228b042e37fSmrgRotation XRRRotations(Display *dpy, int screen, Rotation *current_rotation); 229b042e37fSmrgXRRScreenSize *XRRSizes(Display *dpy, int screen, int *nsizes); 230b042e37fSmrgshort *XRRRates (Display *dpy, int screen, int sizeID, int *nrates); 231b042e37fSmrgTime XRRTimes (Display *dpy, int screen, Time *config_timestamp); 232b042e37fSmrg 233b042e37fSmrg 234b042e37fSmrg/* Version 1.2 additions */ 235b042e37fSmrg 236706b6b52Smrg/* despite returning a Status, this returns 1 for success */ 237b042e37fSmrgStatus 238b042e37fSmrgXRRGetScreenSizeRange (Display *dpy, Window window, 239b042e37fSmrg int *minWidth, int *minHeight, 240b042e37fSmrg int *maxWidth, int *maxHeight); 241b042e37fSmrg 242b042e37fSmrgvoid 243b042e37fSmrgXRRSetScreenSize (Display *dpy, Window window, 244b042e37fSmrg int width, int height, 245b042e37fSmrg int mmWidth, int mmHeight); 246b042e37fSmrg 247b042e37fSmrgtypedef unsigned long XRRModeFlags; 248b042e37fSmrg 249b042e37fSmrgtypedef struct _XRRModeInfo { 250b042e37fSmrg RRMode id; 251b042e37fSmrg unsigned int width; 252b042e37fSmrg unsigned int height; 253b042e37fSmrg unsigned long dotClock; 254b042e37fSmrg unsigned int hSyncStart; 255b042e37fSmrg unsigned int hSyncEnd; 256b042e37fSmrg unsigned int hTotal; 257b042e37fSmrg unsigned int hSkew; 258b042e37fSmrg unsigned int vSyncStart; 259b042e37fSmrg unsigned int vSyncEnd; 260b042e37fSmrg unsigned int vTotal; 261b042e37fSmrg char *name; 262b042e37fSmrg unsigned int nameLength; 263b042e37fSmrg XRRModeFlags modeFlags; 264b042e37fSmrg} XRRModeInfo; 265b042e37fSmrg 266b042e37fSmrgtypedef struct _XRRScreenResources { 267b042e37fSmrg Time timestamp; 268b042e37fSmrg Time configTimestamp; 269b042e37fSmrg int ncrtc; 270b042e37fSmrg RRCrtc *crtcs; 271b042e37fSmrg int noutput; 272b042e37fSmrg RROutput *outputs; 273b042e37fSmrg int nmode; 274b042e37fSmrg XRRModeInfo *modes; 275b042e37fSmrg} XRRScreenResources; 2760597fb56Smrg 277b042e37fSmrgXRRScreenResources * 278b042e37fSmrgXRRGetScreenResources (Display *dpy, Window window); 279b042e37fSmrg 280b042e37fSmrgvoid 281b042e37fSmrgXRRFreeScreenResources (XRRScreenResources *resources); 282b042e37fSmrg 283b042e37fSmrgtypedef struct _XRROutputInfo { 284b042e37fSmrg Time timestamp; 285b042e37fSmrg RRCrtc crtc; 286b042e37fSmrg char *name; 287b042e37fSmrg int nameLen; 288b042e37fSmrg unsigned long mm_width; 289b042e37fSmrg unsigned long mm_height; 290b042e37fSmrg Connection connection; 291b042e37fSmrg SubpixelOrder subpixel_order; 292b042e37fSmrg int ncrtc; 293b042e37fSmrg RRCrtc *crtcs; 294b042e37fSmrg int nclone; 295b042e37fSmrg RROutput *clones; 296b042e37fSmrg int nmode; 297b042e37fSmrg int npreferred; 298b042e37fSmrg RRMode *modes; 299b042e37fSmrg} XRROutputInfo; 300b042e37fSmrg 301b042e37fSmrgXRROutputInfo * 302b042e37fSmrgXRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output); 303b042e37fSmrg 304b042e37fSmrgvoid 305b042e37fSmrgXRRFreeOutputInfo (XRROutputInfo *outputInfo); 306b042e37fSmrg 307b042e37fSmrgAtom * 308b042e37fSmrgXRRListOutputProperties (Display *dpy, RROutput output, int *nprop); 309b042e37fSmrg 310b042e37fSmrgtypedef struct { 311b042e37fSmrg Bool pending; 312b042e37fSmrg Bool range; 313b042e37fSmrg Bool immutable; 314b042e37fSmrg int num_values; 315b042e37fSmrg long *values; 316b042e37fSmrg} XRRPropertyInfo; 317b042e37fSmrg 318b042e37fSmrgXRRPropertyInfo * 319b042e37fSmrgXRRQueryOutputProperty (Display *dpy, RROutput output, Atom property); 320b042e37fSmrg 321b042e37fSmrgvoid 322b042e37fSmrgXRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property, 323b042e37fSmrg Bool pending, Bool range, int num_values, 324b042e37fSmrg long *values); 3250597fb56Smrg 326b042e37fSmrgvoid 327b042e37fSmrgXRRChangeOutputProperty (Display *dpy, RROutput output, 328b042e37fSmrg Atom property, Atom type, 329b042e37fSmrg int format, int mode, 330b042e37fSmrg _Xconst unsigned char *data, int nelements); 331b042e37fSmrg 332b042e37fSmrgvoid 333b042e37fSmrgXRRDeleteOutputProperty (Display *dpy, RROutput output, Atom property); 334b042e37fSmrg 335b042e37fSmrgint 336b042e37fSmrgXRRGetOutputProperty (Display *dpy, RROutput output, 337b042e37fSmrg Atom property, long offset, long length, 338b042e37fSmrg Bool _delete, Bool pending, Atom req_type, 339b042e37fSmrg Atom *actual_type, int *actual_format, 340b042e37fSmrg unsigned long *nitems, unsigned long *bytes_after, 341b042e37fSmrg unsigned char **prop); 342b042e37fSmrg 343b042e37fSmrgXRRModeInfo * 3448bd17e5fSmrgXRRAllocModeInfo (_Xconst char *name, int nameLength); 345b042e37fSmrg 346b042e37fSmrgRRMode 347b042e37fSmrgXRRCreateMode (Display *dpy, Window window, XRRModeInfo *modeInfo); 348b042e37fSmrg 349b042e37fSmrgvoid 350b042e37fSmrgXRRDestroyMode (Display *dpy, RRMode mode); 351b042e37fSmrg 352b042e37fSmrgvoid 353b042e37fSmrgXRRAddOutputMode (Display *dpy, RROutput output, RRMode mode); 354b042e37fSmrg 355b042e37fSmrgvoid 356b042e37fSmrgXRRDeleteOutputMode (Display *dpy, RROutput output, RRMode mode); 357b042e37fSmrg 358b042e37fSmrgvoid 359b042e37fSmrgXRRFreeModeInfo (XRRModeInfo *modeInfo); 3600597fb56Smrg 361b042e37fSmrgtypedef struct _XRRCrtcInfo { 362b042e37fSmrg Time timestamp; 363b042e37fSmrg int x, y; 364b042e37fSmrg unsigned int width, height; 365b042e37fSmrg RRMode mode; 366b042e37fSmrg Rotation rotation; 367b042e37fSmrg int noutput; 368b042e37fSmrg RROutput *outputs; 369b042e37fSmrg Rotation rotations; 370b042e37fSmrg int npossible; 371b042e37fSmrg RROutput *possible; 372b042e37fSmrg} XRRCrtcInfo; 373b042e37fSmrg 374b042e37fSmrgXRRCrtcInfo * 375b042e37fSmrgXRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc); 376b042e37fSmrg 377b042e37fSmrgvoid 378b042e37fSmrgXRRFreeCrtcInfo (XRRCrtcInfo *crtcInfo); 379b042e37fSmrg 380b042e37fSmrgStatus 381b042e37fSmrgXRRSetCrtcConfig (Display *dpy, 382b042e37fSmrg XRRScreenResources *resources, 383b042e37fSmrg RRCrtc crtc, 384b042e37fSmrg Time timestamp, 385b042e37fSmrg int x, int y, 386b042e37fSmrg RRMode mode, 387b042e37fSmrg Rotation rotation, 388b042e37fSmrg RROutput *outputs, 389b042e37fSmrg int noutputs); 390b042e37fSmrg 391b042e37fSmrgint 392b042e37fSmrgXRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc); 393b042e37fSmrg 394b042e37fSmrgtypedef struct _XRRCrtcGamma { 395b042e37fSmrg int size; 396b042e37fSmrg unsigned short *red; 397b042e37fSmrg unsigned short *green; 398b042e37fSmrg unsigned short *blue; 399b042e37fSmrg} XRRCrtcGamma; 400b042e37fSmrg 401b042e37fSmrgXRRCrtcGamma * 402b042e37fSmrgXRRGetCrtcGamma (Display *dpy, RRCrtc crtc); 403b042e37fSmrg 404b042e37fSmrgXRRCrtcGamma * 405b042e37fSmrgXRRAllocGamma (int size); 406b042e37fSmrg 407b042e37fSmrgvoid 408b042e37fSmrgXRRSetCrtcGamma (Display *dpy, RRCrtc crtc, XRRCrtcGamma *gamma); 409b042e37fSmrg 410b042e37fSmrgvoid 411b042e37fSmrgXRRFreeGamma (XRRCrtcGamma *gamma); 412b042e37fSmrg 4138c4a8e55Smrg/* Version 1.3 additions */ 4148c4a8e55Smrg 4158c4a8e55SmrgXRRScreenResources * 4168c4a8e55SmrgXRRGetScreenResourcesCurrent (Display *dpy, Window window); 4178c4a8e55Smrg 4188c4a8e55Smrgvoid 4198c4a8e55SmrgXRRSetCrtcTransform (Display *dpy, 4200597fb56Smrg RRCrtc crtc, 4218c4a8e55Smrg XTransform *transform, 4228bd17e5fSmrg _Xconst char *filter, 4238c4a8e55Smrg XFixed *params, 4248c4a8e55Smrg int nparams); 4258c4a8e55Smrg 4268c4a8e55Smrgtypedef struct _XRRCrtcTransformAttributes { 4278c4a8e55Smrg XTransform pendingTransform; 4288c4a8e55Smrg char *pendingFilter; 4298c4a8e55Smrg int pendingNparams; 4308c4a8e55Smrg XFixed *pendingParams; 4318c4a8e55Smrg XTransform currentTransform; 4328c4a8e55Smrg char *currentFilter; 4338c4a8e55Smrg int currentNparams; 4348c4a8e55Smrg XFixed *currentParams; 4358c4a8e55Smrg} XRRCrtcTransformAttributes; 4368c4a8e55Smrg 4378c4a8e55Smrg/* 4388c4a8e55Smrg * Get current crtc transforms and filters. 4398c4a8e55Smrg * Pass *attributes to XFree to free 4408c4a8e55Smrg */ 4418c4a8e55SmrgStatus 4428c4a8e55SmrgXRRGetCrtcTransform (Display *dpy, 4438c4a8e55Smrg RRCrtc crtc, 4448c4a8e55Smrg XRRCrtcTransformAttributes **attributes); 4458c4a8e55Smrg 4468c4a8e55Smrg/* 4470597fb56Smrg * intended to take RRScreenChangeNotify, or 448b042e37fSmrg * ConfigureNotify (on the root window) 449b042e37fSmrg * returns 1 if it is an event type it understands, 0 if not 450b042e37fSmrg */ 451b042e37fSmrgint XRRUpdateConfiguration(XEvent *event); 452b042e37fSmrg 4538c4a8e55Smrgtypedef struct _XRRPanning { 4548c4a8e55Smrg Time timestamp; 4558c4a8e55Smrg unsigned int left; 4568c4a8e55Smrg unsigned int top; 4578c4a8e55Smrg unsigned int width; 4588c4a8e55Smrg unsigned int height; 4598c4a8e55Smrg unsigned int track_left; 4608c4a8e55Smrg unsigned int track_top; 4618c4a8e55Smrg unsigned int track_width; 4628c4a8e55Smrg unsigned int track_height; 4638c4a8e55Smrg int border_left; 4648c4a8e55Smrg int border_top; 4658c4a8e55Smrg int border_right; 4668c4a8e55Smrg int border_bottom; 4678c4a8e55Smrg} XRRPanning; 4688c4a8e55Smrg 4698c4a8e55SmrgXRRPanning * 4708c4a8e55SmrgXRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc); 4718c4a8e55Smrg 4728c4a8e55Smrgvoid 4738c4a8e55SmrgXRRFreePanning (XRRPanning *panning); 4748c4a8e55Smrg 4758c4a8e55SmrgStatus 4768c4a8e55SmrgXRRSetPanning (Display *dpy, 4778c4a8e55Smrg XRRScreenResources *resources, 4788c4a8e55Smrg RRCrtc crtc, 4798c4a8e55Smrg XRRPanning *panning); 4808c4a8e55Smrg 4818c4a8e55Smrgvoid 4828c4a8e55SmrgXRRSetOutputPrimary(Display *dpy, 4838c4a8e55Smrg Window window, 4848c4a8e55Smrg RROutput output); 4858c4a8e55Smrg 4868c4a8e55SmrgRROutput 4878c4a8e55SmrgXRRGetOutputPrimary(Display *dpy, 4888c4a8e55Smrg Window window); 4898c4a8e55Smrg 4900597fb56Smrgtypedef struct _XRRProviderResources { 4910597fb56Smrg Time timestamp; 4920597fb56Smrg int nproviders; 4930597fb56Smrg RRProvider *providers; 4940597fb56Smrg} XRRProviderResources; 4950597fb56Smrg 4960597fb56SmrgXRRProviderResources * 4970597fb56SmrgXRRGetProviderResources(Display *dpy, Window window); 4980597fb56Smrg 4990597fb56Smrgvoid 5000597fb56SmrgXRRFreeProviderResources(XRRProviderResources *resources); 5010597fb56Smrg 5020597fb56Smrgtypedef struct _XRRProviderInfo { 5030597fb56Smrg unsigned int capabilities; 5040597fb56Smrg int ncrtcs; 5050597fb56Smrg RRCrtc *crtcs; 5060597fb56Smrg int noutputs; 5070597fb56Smrg RROutput *outputs; 5080597fb56Smrg char *name; 5090597fb56Smrg int nassociatedproviders; 5100597fb56Smrg RRProvider *associated_providers; 5110597fb56Smrg unsigned int *associated_capability; 5120597fb56Smrg int nameLen; 5130597fb56Smrg} XRRProviderInfo; 5140597fb56Smrg 5150597fb56SmrgXRRProviderInfo * 5160597fb56SmrgXRRGetProviderInfo(Display *dpy, XRRScreenResources *resources, RRProvider provider); 5170597fb56Smrg 5180597fb56Smrgvoid 5190597fb56SmrgXRRFreeProviderInfo(XRRProviderInfo *provider); 5200597fb56Smrg 5210597fb56Smrgint 5220597fb56SmrgXRRSetProviderOutputSource(Display *dpy, XID provider, XID source_provider); 5230597fb56Smrg 5240597fb56Smrgint 5250597fb56SmrgXRRSetProviderOffloadSink(Display *dpy, XID provider, XID sink_provider); 5260597fb56Smrg 5270597fb56SmrgAtom * 5280597fb56SmrgXRRListProviderProperties (Display *dpy, RRProvider provider, int *nprop); 5290597fb56Smrg 5300597fb56SmrgXRRPropertyInfo * 5310597fb56SmrgXRRQueryProviderProperty (Display *dpy, RRProvider provider, Atom property); 5320597fb56Smrg 5330597fb56Smrgvoid 5340597fb56SmrgXRRConfigureProviderProperty (Display *dpy, RRProvider provider, Atom property, 5350597fb56Smrg Bool pending, Bool range, int num_values, 5360597fb56Smrg long *values); 5370597fb56Smrg 5380597fb56Smrgvoid 5390597fb56SmrgXRRChangeProviderProperty (Display *dpy, RRProvider provider, 5400597fb56Smrg Atom property, Atom type, 5410597fb56Smrg int format, int mode, 5420597fb56Smrg _Xconst unsigned char *data, int nelements); 5430597fb56Smrg 5440597fb56Smrgvoid 5450597fb56SmrgXRRDeleteProviderProperty (Display *dpy, RRProvider provider, Atom property); 5460597fb56Smrg 5470597fb56Smrgint 5480597fb56SmrgXRRGetProviderProperty (Display *dpy, RRProvider provider, 5490597fb56Smrg Atom property, long offset, long length, 5500597fb56Smrg Bool _delete, Bool pending, Atom req_type, 5510597fb56Smrg Atom *actual_type, int *actual_format, 5520597fb56Smrg unsigned long *nitems, unsigned long *bytes_after, 5530597fb56Smrg unsigned char **prop); 5540597fb56Smrg 555b042e37fSmrg_XFUNCPROTOEND 556b042e37fSmrg 557b042e37fSmrg#endif /* _XRANDR_H_ */ 558