1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $ 7 * 8 * Copyright © 2000 Compaq Computer Corporation, Inc. 9 * Copyright © 2002 Hewlett-Packard Company, Inc. 10 * 11 * Permission to use, copy, modify, distribute, and sell this software and its 12 * documentation for any purpose is hereby granted without fee, provided that 13 * the above copyright notice appear in all copies and that both that 14 * copyright notice and this permission notice appear in supporting 15 * documentation, and that the name of Compaq not be used in advertising or 16 * publicity pertaining to distribution of the software without specific, 17 * written prior permission. HP makes no representations about the 18 * suitability of this software for any purpose. It is provided "as is" 19 * without express or implied warranty. 20 * 21 * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ 23 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 24 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 25 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 26 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 27 * 28 * Author: Jim Gettys, HP Labs, HP. 29 */ 49 */ 50 51 typedef struct { 52 int type; /* event base */ 53 unsigned long serial; /* # of last request processed by server */ 54 Bool send_event; /* true if this came from a SendEvent request */ 55 Display *display; /* Display the event was read from */ 56 Window window; /* window which selected for this event */ 57 Window root; /* Root window for changed screen */ 58 Time timestamp; /* when the screen change occurred */ 59 Time config_timestamp; /* when the last configuration change */ 60 SizeID size_index; 61 SubpixelOrder subpixel_order; 62 Rotation rotation; 63 int width; 64 int height; 65 int mwidth; 66 int mheight; 67 } XRRScreenChangeNotifyEvent; 68 69 70 /* internal representation is private to the library */ 71 typedef struct _XRRScreenConfiguration XRRScreenConfiguration; 72 73 Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep); 74 Status XRRQueryVersion (Display *dpy, 75 int *major_versionp, 76 int *minor_versionp); 77 78 XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, 79 Drawable draw); 80 81 void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); 82 83 /* 84 * Note that screen configuration changes are only permitted if the client can 85 * prove it has up to date configuration information. We are trying to 86 * insist that it become possible for screens to change dynamically, so 87 * we want to ensure the client knows what it is talking about when requesting 88 * changes. | 1 /* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5 /* 6 * $XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $ 7 * 8 * Copyright � 2000 Compaq Computer Corporation, Inc. 9 * Copyright � 2002 Hewlett-Packard Company, Inc. 10 * 11 * Permission to use, copy, modify, distribute, and sell this software and its 12 * documentation for any purpose is hereby granted without fee, provided that 13 * the above copyright notice appear in all copies and that both that 14 * copyright notice and this permission notice appear in supporting 15 * documentation, and that the name of Compaq not be used in advertising or 16 * publicity pertaining to distribution of the software without specific, 17 * written prior permission. HP makes no representations about the 18 * suitability of this software for any purpose. It is provided "as is" 19 * without express or implied warranty. 20 * 21 * HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ 23 * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 24 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 25 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 26 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 27 * 28 * Author: Jim Gettys, HP Labs, HP. 29 */ 49 */ 50 51 typedef struct { 52 int type; /* event base */ 53 unsigned long serial; /* # of last request processed by server */ 54 Bool send_event; /* true if this came from a SendEvent request */ 55 Display *display; /* Display the event was read from */ 56 Window window; /* window which selected for this event */ 57 Window root; /* Root window for changed screen */ 58 Time timestamp; /* when the screen change occurred */ 59 Time config_timestamp; /* when the last configuration change */ 60 SizeID size_index; 61 SubpixelOrder subpixel_order; 62 Rotation rotation; 63 int width; 64 int height; 65 int mwidth; 66 int mheight; 67 } XRRScreenChangeNotifyEvent; 68 69 typedef XID RROutput; 70 typedef XID RRCrtc; 71 typedef XID RRMode; 72 73 typedef unsigned long XRRModeFlags; 74 75 typedef struct { 76 RRMode id; 77 unsigned int width; 78 unsigned int height; 79 unsigned long dotClock; 80 unsigned int hSyncStart; 81 unsigned int hSyncEnd; 82 unsigned int hTotal; 83 unsigned int hSkew; 84 unsigned int vSyncStart; 85 unsigned int vSyncEnd; 86 unsigned int vTotal; 87 char *name; 88 unsigned int nameLength; 89 XRRModeFlags modeFlags; 90 } XRRModeInfo; 91 92 typedef struct { 93 Time timestamp; 94 Time configTimestamp; 95 int ncrtc; 96 RRCrtc *crtcs; 97 int noutput; 98 RROutput *outputs; 99 int nmode; 100 XRRModeInfo *modes; 101 } XRRScreenResources; 102 103 typedef struct { 104 Time timestamp; 105 RRCrtc crtc; 106 char *name; 107 int nameLen; 108 unsigned long mm_width; 109 unsigned long mm_height; 110 Connection connection; 111 SubpixelOrder subpixel_order; 112 int ncrtc; 113 RRCrtc *crtcs; 114 int nclone; 115 RROutput *clones; 116 int nmode; 117 int npreferred; 118 RRMode *modes; 119 } XRROutputInfo; 120 121 XRRScreenResources *XRRGetScreenResources (Display *dpy, Window window); 122 123 void XRRFreeScreenResources (XRRScreenResources *resources); 124 125 XRROutputInfo * XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, 126 RROutput output); 127 void XRRFreeOutputInfo (XRROutputInfo *outputInfo); 128 129 /* internal representation is private to the library */ 130 typedef struct _XRRScreenConfiguration XRRScreenConfiguration; 131 132 Bool XRRQueryExtension (Display *dpy, int *event_basep, int *error_basep); 133 Status XRRQueryVersion (Display *dpy, 134 int *major_versionp, 135 int *minor_versionp); 136 137 XRRScreenConfiguration *XRRGetScreenInfo (Display *dpy, 138 Drawable draw); 139 140 void XRRFreeScreenConfigInfo (XRRScreenConfiguration *config); 141 142 /* 143 * Note that screen configuration changes are only permitted if the client can 144 * prove it has up to date configuration information. We are trying to 145 * insist that it become possible for screens to change dynamically, so 146 * we want to ensure the client knows what it is talking about when requesting 147 * changes. |