+ Added XRandr from Nikolay Nikolov

git-svn-id: trunk@1884 -
This commit is contained in:
michael 2005-12-05 19:07:05 +00:00
parent 5769739834
commit 9301b6f9a2
5 changed files with 316 additions and 59 deletions

2
.gitattributes vendored
View File

@ -3309,6 +3309,7 @@ packages/extra/x11/cursorfont.pp svneol=native#text/plain
packages/extra/x11/fpmake.inc svneol=native#text/plain
packages/extra/x11/fpmake.pp svneol=native#text/plain
packages/extra/x11/keysym.pp svneol=native#text/plain
packages/extra/x11/randr.inc svneol=native#text/plain
packages/extra/x11/x.pp svneol=native#text/plain
packages/extra/x11/xatom.pp svneol=native#text/plain
packages/extra/x11/xcms.pp svneol=native#text/plain
@ -3320,6 +3321,7 @@ packages/extra/x11/xinerama.pp svneol=native#text/plain
packages/extra/x11/xkb.pp svneol=native#text/plain
packages/extra/x11/xkblib.pp svneol=native#text/plain
packages/extra/x11/xlib.pp svneol=native#text/plain
packages/extra/x11/xrandr.pp svneol=native#text/plain
packages/extra/x11/xrender.pp svneol=native#text/plain
packages/extra/x11/xresource.pp svneol=native#text/plain
packages/extra/x11/xshm.pp svneol=native#text/plain

View File

@ -1,8 +1,8 @@
#
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/12/04]
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2005/09/25]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince powerpc64-linux
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-emx i386-watcom i386-netwlibc i386-wince m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos powerpc-linux powerpc-netbsd powerpc-macos powerpc-darwin powerpc-morphos sparc-linux sparc-netbsd sparc-solaris x86_64-linux x86_64-freebsd x86_64-win64 arm-linux arm-wince
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom
@ -233,115 +233,112 @@ PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/ext
override PACKAGE_NAME=x11
override PACKAGE_VERSION=2.0.0
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-go32v2)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-win32)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-os2)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-freebsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-solaris)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-qnx)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-netware)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-openbsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-wdosx)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-emx)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-watcom)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-netwlibc)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),i386-wince)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-freebsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-netbsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-amiga)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-atari)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-openbsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),m68k-palmos)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),powerpc-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),powerpc-netbsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),powerpc-macos)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),powerpc-darwin)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),powerpc-morphos)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),sparc-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),sparc-netbsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),sparc-solaris)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),x86_64-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),x86_64-freebsd)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),x86_64-win64)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),arm-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
override TARGET_UNITS+=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
endif
override INSTALL_FPCPACKAGE=y
ifdef REQUIRE_UNITSDIR
@ -546,11 +543,6 @@ GCCLIBDIR:=$(shell dirname `gcc -m32 -print-libgcc-file-name`)
endif
endif
endif
ifeq ($(CPU_TARGET),powerpc64)
ifeq ($(BINUTILSPREFIX),)
GCCLIBDIR:=$(shell dirname `gcc -m64 -print-libgcc-file-name`)
endif
endif
endif
ifndef GCCLIBDIR
CROSSGCC=$(strip $(wildcard $(addsuffix /$(BINUTILSPREFIX)gcc$(SRCEXEEXT),$(SEARCHPATH))))
@ -1212,9 +1204,6 @@ endif
ifeq ($(FULL_TARGET),arm-wince)
REQUIRE_PACKAGES_RTL=1
endif
ifeq ($(FULL_TARGET),powerpc64-linux)
REQUIRE_PACKAGES_RTL=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)
@ -1285,7 +1274,7 @@ ifeq ($(CPU_TARGET),i386)
FPCCPUOPT:=-OG2p3
else
ifeq ($(CPU_TARGET),powerpc)
FPCCPUOPT:=-O1r
FPCCPUOPT:=-O1
else
FPCCPUOPT:=
endif
@ -1368,14 +1357,6 @@ override FPCEXTCMD:=$(FPCOPT)
override FPCOPT:=!FPCEXTCMD
export FPCEXTCMD
endif
override AFULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
override AFULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
ifneq ($(AFULL_TARGET),$(AFULL_SOURCE))
override ACROSSCOMPILE=1
endif
ifdef ACROSSCOMPILE
override FPCOPT+=$(CROSSOPT)
endif
override COMPILER:=$(FPC) $(FPCOPT)
ifeq (,$(findstring -s ,$(COMPILER)))
EXECPPAS=

View File

@ -7,7 +7,7 @@ name=x11
version=2.0.0
[target]
units=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont
units=x xlib xutil xresource xcms xshm xrender keysym xi xkb xkblib xatom xinerama xv xvlib cursorfont xrandr
[require]
libc=y

View File

@ -0,0 +1,74 @@
{*
* $XFree86: xc/include/extensions/randr.h,v 1.4 2001/11/24 07:24:58 keithp Exp $
*
* Copyright (C) 2000, Compaq Computer Corporation,
* Copyright (C) 2002, Hewlett Packard, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* 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 Compaq or HP not be used in advertising
* or publicity pertaining to distribution of the software without specific,
* written prior permission. HP makes no representations about the
* suitability of this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
* HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL HP
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Jim Gettys, HP Labs, Hewlett-Packard, Inc.
*}
type
PRotation = ^TRotation;
TRotation = cushort;
PSizeID = ^TSizeID;
TSizeID = cushort;
PSubpixelOrder = ^TSubpixelOrder;
TSubpixelOrder = cushort;
const
RANDR_NAME = 'RANDR';
RANDR_MAJOR = 1;
RANDR_MINOR = 1;
RRNumberErrors = 0;
RRNumberEvents = 1;
X_RRQueryVersion = 0;
{ we skip 1 to make old clients fail pretty immediately }
X_RROldGetScreenInfo = 1;
X_RR1_0SetScreenConfig = 2;
{ V1.0 apps share the same set screen config request id }
X_RRSetScreenConfig = 2;
X_RROldScreenChangeSelectInput = 3;
{ 3 used to be ScreenChangeSelectInput; deprecated }
X_RRSelectInput = 4;
X_RRGetScreenInfo = 5;
{ used in XRRSelectInput }
RRScreenChangeNotifyMask = 1 shl 0;
RRScreenChangeNotify = 0;
{ used in the rotation field; rotation and reflection in 0.1 proto. }
RR_Rotate_0 = 1;
RR_Rotate_90 = 2;
RR_Rotate_180 = 4;
RR_Rotate_270 = 8;
{ new in 1.0 protocol, to allow reflection of screen }
RR_Reflect_X = 16;
RR_Reflect_Y = 32;
RRSetConfigSuccess = 0;
RRSetConfigInvalidConfigTime = 1;
RRSetConfigInvalidTime = 2;
RRSetConfigFailed = 3;

View File

@ -0,0 +1,200 @@
{
$XFree86: xc/lib/Xrandr/Xrandr.h,v 1.9 2002/09/29 23:39:44 keithp Exp $
Copyright (C) 2000 Compaq Computer Corporation, Inc.
Copyright (C) 2002 Hewlett-Packard Company, Inc.
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
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 Compaq not be used in advertising or
publicity pertaining to distribution of the software without specific,
written prior permission. HP makes no representations about the
suitability of this software for any purpose. It is provided "as is"
without express or implied warranty.
HP DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL COMPAQ
BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Author: Jim Gettys, HP Labs, HP.
}
unit xrandr;
interface
{$PACKRECORDS c}
uses
ctypes, x, xlib;
const
libXrandr = 'Xrandr';
{$I randr.inc}
type
PXRRScreenSize = ^TXRRScreenSize;
TXRRScreenSize = record
width, height : cint;
mwidth, mheight : cint;
end;
{
Events.
}
TXRRScreenChangeNotifyEvent = record
_type : cint; { event base }
serial : culong; { # of last request processed by server }
send_event : TBool; { true if this came from a SendEvent request }
display : PDisplay; { Display the event was read from }
window : TWindow; { window which selected for this event }
root : TWindow; { Root window for changed screen }
timestamp : TTime; { when the screen change occurred }
config_timestamp : TTime; { when the last configuration change }
size_index : TSizeID;
subpixel_order : TSubpixelOrder;
rotation : TRotation;
width : cint;
height : cint;
mwidth : cint;
mheight : cint;
end;
{ internal representation is private to the library }
PXRRScreenConfiguration = ^TXRRScreenConfiguration;
TXRRScreenConfiguration = record end;
function XRRQueryExtension(
dpy : PDisplay;
event_basep,
error_basep : Pcint) : TBool; cdecl; external libXrandr;
function XRRQueryVersion(
dpy : PDisplay;
major_versionp : Pcint;
minor_versionp : Pcint) : TStatus; cdecl; external libXrandr;
function XRRGetScreenInfo(
dpy : PDisplay;
draw : TDrawable) : PXRRScreenConfiguration; cdecl; external libXrandr;
procedure XRRFreeScreenConfigInfo(
config : PXRRScreenConfiguration); cdecl; external libXrandr;
{
Note that screen configuration changes are only permitted if the client can
prove it has up to date configuration information. We are trying to
insist that it become possible for screens to change dynamically, so
we want to ensure the client knows what it is talking about when requesting
changes.
}
function XRRSetScreenConfig(
dpy : PDisplay;
config : PXRRScreenConfiguration;
draw : TDrawable;
size_index : cint;
rotation : TRotation;
timestamp : TTime) : TStatus; cdecl; external libXrandr;
{ added in v1.1, sorry for the lame name }
function XRRSetScreenConfigAndRate(
dpy : PDisplay;
config : PXRRScreenConfiguration;
draw : TDrawable;
size_index : cint;
rotation : TRotation;
rate : cshort;
timestamp : TTime) : TStatus; cdecl; external libXrandr;
function XRRConfigRotations(
config : PXRRScreenConfiguration;
current_rotation : PRotation) : TRotation; cdecl; external libXrandr;
function XRRConfigTimes(
config : PXRRScreenConfiguration;
config_timestamp : PTime) : TTime; cdecl; external libXrandr;
function XRRConfigSizes(
config : PXRRScreenConfiguration;
nsizes : Pcint) : PXRRScreenSize; cdecl; external libXrandr;
function XRRConfigRates(
config : PXRRScreenConfiguration;
sizeID : cint;
nrates : Pcint) : Pcshort; cdecl; external libXrandr;
function XRRConfigCurrentConfiguration(
config : PXRRScreenConfiguration;
rotation : PRotation) : TSizeID; cdecl; external libXrandr;
function XRRConfigCurrentRate(
config : PXRRScreenConfiguration) : cshort; cdecl; external libXrandr;
function XRRRootToScreen(
dpy : PDisplay;
root : TWindow) : cint; cdecl; external libXrandr;
{
returns the screen configuration for the specified screen; does a lazy
evalution to delay getting the information, and caches the result.
These routines should be used in preference to XRRGetScreenInfo
to avoid unneeded round trips to the X server. These are new
in protocol version 0.1.
}
function XRRScreenConfig(
dpy : PDisplay;
screen : cint) : PXRRScreenConfiguration; cdecl; external libXrandr;
function XRRConfig(
screen : PScreen) : PXRRScreenConfiguration; cdecl; external libXrandr;
procedure XRRSelectInput(
dpy : PDisplay;
window : TWindow;
mask : cint); cdecl; external libXrandr;
{
the following are always safe to call, even if RandR is not implemented
on a screen
}
function XRRRotations(
dpy : PDisplay;
screen : cint;
current_rotation : PRotation) : TRotation; cdecl; external libXrandr;
function XRRSizes(
dpy : PDisplay;
screen : cint;
nsizes : Pcint) : PXRRScreenSize; cdecl; external libXrandr;
function XRRRates(
dpy : PDisplay;
screen : cint;
sizeID : cint;
nrates : Pcint) : Pcshort; cdecl; external libXrandr;
function XRRTimes(
dpy : PDisplay;
screen : cint;
config_timestamp : PTime) : TTime; cdecl; external libXrandr;
{
intended to take RRScreenChangeNotify, or
ConfigureNotify (on the root window)
returns 1 if it is an event type it understands, 0 if not
}
function XRRUpdateConfiguration(
event : PXEvent) : cint; cdecl; external libXrandr;
implementation
end.