2
$XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
4
Copyright (C) 2000 Compaq Computer Corporation, Inc.
5
Copyright (C) 2002 Hewlett-Packard Company, Inc.
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
10
copyright notice and this permission notice appear in supporting
11
documentation, and that the name of Compaq not be used in advertising or
12
publicity pertaining to distribution of the software without specific,
13
written prior permission. HP makes no representations about the
14
suitability of this software for any purpose. It is provided "as is"
15
without express or implied warranty.
17
HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
18
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
19
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
21
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
22
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24
Author: Jim Gettys, HP Labs, HP.
42
PXRRScreenSize = ^TXRRScreenSize;
43
TXRRScreenSize = record
45
mwidth, mheight : cint;
52
TXRRScreenChangeNotifyEvent = record
53
_type : cint; { event base }
54
serial : culong; { # of last request processed by server }
55
send_event : TBool; { true if this came from a SendEvent request }
56
display : PDisplay; { Display the event was read from }
57
window : TWindow; { window which selected for this event }
58
root : TWindow; { Root window for changed screen }
59
timestamp : TTime; { when the screen change occurred }
60
config_timestamp : TTime; { when the last configuration change }
62
subpixel_order : TSubpixelOrder;
71
{ internal representation is private to the library }
72
PXRRScreenConfiguration = ^TXRRScreenConfiguration;
73
TXRRScreenConfiguration = record end;
75
function XRRQueryExtension(
78
error_basep : Pcint) : TBool; cdecl; external libXrandr;
80
function XRRQueryVersion(
82
major_versionp : Pcint;
83
minor_versionp : Pcint) : TStatus; cdecl; external libXrandr;
85
function XRRGetScreenInfo(
87
draw : TDrawable) : PXRRScreenConfiguration; cdecl; external libXrandr;
89
procedure XRRFreeScreenConfigInfo(
90
config : PXRRScreenConfiguration); cdecl; external libXrandr;
93
Note that screen configuration changes are only permitted if the client can
94
prove it has up to date configuration information. We are trying to
95
insist that it become possible for screens to change dynamically, so
96
we want to ensure the client knows what it is talking about when requesting
99
function XRRSetScreenConfig(
101
config : PXRRScreenConfiguration;
104
rotation : TRotation;
105
timestamp : TTime) : TStatus; cdecl; external libXrandr;
107
{ added in v1.1, sorry for the lame name }
108
function XRRSetScreenConfigAndRate(
110
config : PXRRScreenConfiguration;
113
rotation : TRotation;
115
timestamp : TTime) : TStatus; cdecl; external libXrandr;
118
function XRRConfigRotations(
119
config : PXRRScreenConfiguration;
120
current_rotation : PRotation) : TRotation; cdecl; external libXrandr;
122
function XRRConfigTimes(
123
config : PXRRScreenConfiguration;
124
config_timestamp : PTime) : TTime; cdecl; external libXrandr;
126
function XRRConfigSizes(
127
config : PXRRScreenConfiguration;
128
nsizes : Pcint) : PXRRScreenSize; cdecl; external libXrandr;
130
function XRRConfigRates(
131
config : PXRRScreenConfiguration;
133
nrates : Pcint) : Pcshort; cdecl; external libXrandr;
135
function XRRConfigCurrentConfiguration(
136
config : PXRRScreenConfiguration;
137
rotation : PRotation) : TSizeID; cdecl; external libXrandr;
139
function XRRConfigCurrentRate(
140
config : PXRRScreenConfiguration) : cshort; cdecl; external libXrandr;
142
function XRRRootToScreen(
144
root : TWindow) : cint; cdecl; external libXrandr;
147
returns the screen configuration for the specified screen; does a lazy
148
evalution to delay getting the information, and caches the result.
149
These routines should be used in preference to XRRGetScreenInfo
150
to avoid unneeded round trips to the X server. These are new
151
in protocol version 0.1.
155
function XRRScreenConfig(
157
screen : cint) : PXRRScreenConfiguration; cdecl; external libXrandr;
159
screen : PScreen) : PXRRScreenConfiguration; cdecl; external libXrandr;
160
procedure XRRSelectInput(
163
mask : cint); cdecl; external libXrandr;
166
the following are always safe to call, even if RandR is not implemented
171
function XRRRotations(
174
current_rotation : PRotation) : TRotation; cdecl; external libXrandr;
178
nsizes : Pcint) : PXRRScreenSize; cdecl; external libXrandr;
183
nrates : Pcint) : Pcshort; cdecl; external libXrandr;
187
config_timestamp : PTime) : TTime; cdecl; external libXrandr;
191
intended to take RRScreenChangeNotify, or
192
ConfigureNotify (on the root window)
193
returns 1 if it is an event type it understands, 0 if not
195
function XRRUpdateConfiguration(
196
event : PXEvent) : cint; cdecl; external libXrandr;