From 3562e78743202e43aec8727005182a2558117eca Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 28 Jun 2009 22:07:26 +0000 Subject: Checked in the following released items: xkeyboard-config-1.4.tar.gz ttf-bitstream-vera-1.10.tar.gz font-alias-1.0.1.tar.gz font-sun-misc-1.0.0.tar.gz font-sun-misc-1.0.0.tar.gz font-sony-misc-1.0.0.tar.gz font-schumacher-misc-1.0.0.tar.gz font-mutt-misc-1.0.0.tar.gz font-misc-misc-1.0.0.tar.gz font-misc-meltho-1.0.0.tar.gz font-micro-misc-1.0.0.tar.gz font-jis-misc-1.0.0.tar.gz font-isas-misc-1.0.0.tar.gz font-dec-misc-1.0.0.tar.gz font-daewoo-misc-1.0.0.tar.gz font-cursor-misc-1.0.0.tar.gz font-arabic-misc-1.0.0.tar.gz font-winitzki-cyrillic-1.0.0.tar.gz font-misc-cyrillic-1.0.0.tar.gz font-cronyx-cyrillic-1.0.0.tar.gz font-screen-cyrillic-1.0.1.tar.gz font-xfree86-type1-1.0.1.tar.gz font-adobe-utopia-type1-1.0.1.tar.gz font-ibm-type1-1.0.0.tar.gz font-bitstream-type1-1.0.0.tar.gz font-bitstream-speedo-1.0.0.tar.gz font-bh-ttf-1.0.0.tar.gz font-bh-type1-1.0.0.tar.gz font-bitstream-100dpi-1.0.0.tar.gz font-bh-lucidatypewriter-100dpi-1.0.0.tar.gz font-bh-100dpi-1.0.0.tar.gz font-adobe-utopia-100dpi-1.0.1.tar.gz font-adobe-100dpi-1.0.0.tar.gz font-util-1.0.1.tar.gz font-bitstream-75dpi-1.0.0.tar.gz font-bh-lucidatypewriter-75dpi-1.0.0.tar.gz font-adobe-utopia-75dpi-1.0.1.tar.gz font-bh-75dpi-1.0.0.tar.gz bdftopcf-1.0.1.tar.gz font-adobe-75dpi-1.0.0.tar.gz mkfontscale-1.0.6.tar.gz openssl-0.9.8k.tar.gz bigreqsproto-1.0.2.tar.gz xtrans-1.2.2.tar.gz resourceproto-1.0.2.tar.gz inputproto-1.4.4.tar.gz compositeproto-0.4.tar.gz damageproto-1.1.0.tar.gz zlib-1.2.3.tar.gz xkbcomp-1.0.5.tar.gz freetype-2.3.9.tar.gz pthreads-w32-2-8-0-release.tar.gz pixman-0.12.0.tar.gz kbproto-1.0.3.tar.gz evieext-1.0.2.tar.gz fixesproto-4.0.tar.gz recordproto-1.13.2.tar.gz randrproto-1.2.2.tar.gz scrnsaverproto-1.1.0.tar.gz renderproto-0.9.3.tar.gz xcmiscproto-1.1.2.tar.gz fontsproto-2.0.2.tar.gz xextproto-7.0.3.tar.gz xproto-7.0.14.tar.gz libXdmcp-1.0.2.tar.gz libxkbfile-1.0.5.tar.gz libfontenc-1.0.4.tar.gz libXfont-1.3.4.tar.gz libX11-1.1.5.tar.gz libXau-1.0.4.tar.gz libxcb-1.1.tar.gz xorg-server-1.5.3.tar.gz --- X11/extensions/AUTHORS | 2 + X11/extensions/COPYING | 179 ++ X11/extensions/ChangeLog | 185 ++ X11/extensions/INSTALL | 8 + X11/extensions/MITMisc.h | 66 + X11/extensions/Makefile.am | 55 + X11/extensions/Makefile.in | 530 ++++++ X11/extensions/NEWS | 2 + X11/extensions/README | 10 + X11/extensions/XEVI.h | 64 + X11/extensions/XEVIstr.h | 98 ++ X11/extensions/XI.h | 288 ++++ X11/extensions/XInput.h | 1200 +++++++++++++ X11/extensions/XIproto.h | 1617 ++++++++++++++++++ X11/extensions/XKB.h | 788 +++++++++ X11/extensions/XKBbells.h | 143 ++ X11/extensions/XKBconfig.h | 280 ++++ X11/extensions/XKBfile.h | 494 ++++++ X11/extensions/XKBgeom.h | 659 ++++++++ X11/extensions/XKBproto.h | 1282 ++++++++++++++ X11/extensions/XKBrules.h | 201 +++ X11/extensions/XKBsrv.h | 1187 +++++++++++++ X11/extensions/XKBstr.h | 614 +++++++ X11/extensions/XKM.h | 70 + X11/extensions/XKMformat.h | 301 ++++ X11/extensions/XLbx.h | 155 ++ X11/extensions/XResproto.h | 130 ++ X11/extensions/XShm.h | 161 ++ X11/extensions/XTest.h | 164 ++ X11/extensions/Xag.h | 114 ++ X11/extensions/Xagstr.h | 182 ++ X11/extensions/Xcup.h | 69 + X11/extensions/Xcupstr.h | 109 ++ X11/extensions/Xdbe.h | 136 ++ X11/extensions/Xdbeproto.h | 277 +++ X11/extensions/Xeviestr.h | 165 ++ X11/extensions/Xext.h | 57 + X11/extensions/Xge.h | 54 + X11/extensions/aclocal.m4 | 612 +++++++ X11/extensions/autogen.sh | 12 + X11/extensions/bigreqsproto.pc.in | 9 + X11/extensions/bigreqstr.h | 69 + X11/extensions/composite.h | 71 + X11/extensions/compositeproto.h | 191 +++ X11/extensions/compositeproto.pc.in | 9 + X11/extensions/compositeproto.txt | 339 ++++ X11/extensions/configure | 3164 +++++++++++++++++++++++++++++++++++ X11/extensions/configure.ac | 8 + X11/extensions/damageproto.h | 160 ++ X11/extensions/damageproto.pc.in | 9 + X11/extensions/damageproto.txt | 221 +++ X11/extensions/damagewire.h | 58 + X11/extensions/dpms.h | 67 + X11/extensions/dpmsstr.h | 186 ++ X11/extensions/evieproto.pc.in | 9 + X11/extensions/extutil.h | 192 +++ X11/extensions/fixesproto.pc.in | 9 + X11/extensions/ge.h | 62 + X11/extensions/geproto.h | 85 + X11/extensions/inputproto.pc.in | 9 + X11/extensions/install-sh | 325 ++++ X11/extensions/kbproto.pc.in | 9 + X11/extensions/lbxbuf.h | 51 + X11/extensions/lbxbufstr.h | 45 + X11/extensions/lbxdeltastr.h | 105 ++ X11/extensions/lbximage.h | 151 ++ X11/extensions/lbxopts.h | 133 ++ X11/extensions/lbxstr.h | 935 +++++++++++ X11/extensions/lbxzlib.h | 64 + X11/extensions/missing | 360 ++++ X11/extensions/mitmiscstr.h | 70 + X11/extensions/mkinstalldirs | 111 ++ X11/extensions/multibuf.h | 317 ++++ X11/extensions/multibufst.h | 609 +++++++ X11/extensions/randr.h | 141 ++ X11/extensions/randrproto.h | 654 ++++++++ X11/extensions/randrproto.pc.in | 9 + X11/extensions/randrproto.txt | 1767 +++++++++++++++++++ X11/extensions/record.h | 211 +++ X11/extensions/recordproto.pc.in | 9 + X11/extensions/recordstr.h | 322 ++++ X11/extensions/render.h | 189 +++ X11/extensions/renderproto.h | 663 ++++++++ X11/extensions/renderproto.pc.in | 9 + X11/extensions/renderproto.txt | 1253 ++++++++++++++ X11/extensions/resourceproto.pc.in | 9 + X11/extensions/saver.h | 54 + X11/extensions/saverproto.h | 178 ++ X11/extensions/scrnsaver.h | 136 ++ X11/extensions/scrnsaverproto.pc.in | 9 + X11/extensions/security.h | 111 ++ X11/extensions/securstr.h | 116 ++ X11/extensions/shape.h | 180 ++ X11/extensions/shapestr.h | 234 +++ X11/extensions/shmstr.h | 217 +++ X11/extensions/sync.h | 469 ++++++ X11/extensions/syncstr.h | 494 ++++++ X11/extensions/xcmiscproto.pc.in | 9 + X11/extensions/xcmiscstr.h | 112 ++ X11/extensions/xextproto.pc.in | 9 + X11/extensions/xfixesproto.h | 520 ++++++ X11/extensions/xfixeswire.h | 127 ++ X11/extensions/xtestext1.h | 326 ++++ X11/extensions/xteststr.h | 120 ++ 104 files changed, 29589 insertions(+) create mode 100644 X11/extensions/AUTHORS create mode 100644 X11/extensions/COPYING create mode 100644 X11/extensions/ChangeLog create mode 100644 X11/extensions/INSTALL create mode 100644 X11/extensions/MITMisc.h create mode 100644 X11/extensions/Makefile.am create mode 100644 X11/extensions/Makefile.in create mode 100644 X11/extensions/NEWS create mode 100644 X11/extensions/README create mode 100644 X11/extensions/XEVI.h create mode 100644 X11/extensions/XEVIstr.h create mode 100644 X11/extensions/XI.h create mode 100644 X11/extensions/XInput.h create mode 100644 X11/extensions/XIproto.h create mode 100644 X11/extensions/XKB.h create mode 100644 X11/extensions/XKBbells.h create mode 100644 X11/extensions/XKBconfig.h create mode 100644 X11/extensions/XKBfile.h create mode 100644 X11/extensions/XKBgeom.h create mode 100644 X11/extensions/XKBproto.h create mode 100644 X11/extensions/XKBrules.h create mode 100644 X11/extensions/XKBsrv.h create mode 100644 X11/extensions/XKBstr.h create mode 100644 X11/extensions/XKM.h create mode 100644 X11/extensions/XKMformat.h create mode 100644 X11/extensions/XLbx.h create mode 100644 X11/extensions/XResproto.h create mode 100644 X11/extensions/XShm.h create mode 100644 X11/extensions/XTest.h create mode 100644 X11/extensions/Xag.h create mode 100644 X11/extensions/Xagstr.h create mode 100644 X11/extensions/Xcup.h create mode 100644 X11/extensions/Xcupstr.h create mode 100644 X11/extensions/Xdbe.h create mode 100644 X11/extensions/Xdbeproto.h create mode 100644 X11/extensions/Xeviestr.h create mode 100644 X11/extensions/Xext.h create mode 100644 X11/extensions/Xge.h create mode 100644 X11/extensions/aclocal.m4 create mode 100644 X11/extensions/autogen.sh create mode 100644 X11/extensions/bigreqsproto.pc.in create mode 100644 X11/extensions/bigreqstr.h create mode 100644 X11/extensions/composite.h create mode 100644 X11/extensions/compositeproto.h create mode 100644 X11/extensions/compositeproto.pc.in create mode 100644 X11/extensions/compositeproto.txt create mode 100644 X11/extensions/configure create mode 100644 X11/extensions/configure.ac create mode 100644 X11/extensions/damageproto.h create mode 100644 X11/extensions/damageproto.pc.in create mode 100644 X11/extensions/damageproto.txt create mode 100644 X11/extensions/damagewire.h create mode 100644 X11/extensions/dpms.h create mode 100644 X11/extensions/dpmsstr.h create mode 100644 X11/extensions/evieproto.pc.in create mode 100644 X11/extensions/extutil.h create mode 100644 X11/extensions/fixesproto.pc.in create mode 100644 X11/extensions/ge.h create mode 100644 X11/extensions/geproto.h create mode 100644 X11/extensions/inputproto.pc.in create mode 100644 X11/extensions/install-sh create mode 100644 X11/extensions/kbproto.pc.in create mode 100644 X11/extensions/lbxbuf.h create mode 100644 X11/extensions/lbxbufstr.h create mode 100644 X11/extensions/lbxdeltastr.h create mode 100644 X11/extensions/lbximage.h create mode 100644 X11/extensions/lbxopts.h create mode 100644 X11/extensions/lbxstr.h create mode 100644 X11/extensions/lbxzlib.h create mode 100644 X11/extensions/missing create mode 100644 X11/extensions/mitmiscstr.h create mode 100644 X11/extensions/mkinstalldirs create mode 100644 X11/extensions/multibuf.h create mode 100644 X11/extensions/multibufst.h create mode 100644 X11/extensions/randr.h create mode 100644 X11/extensions/randrproto.h create mode 100644 X11/extensions/randrproto.pc.in create mode 100644 X11/extensions/randrproto.txt create mode 100644 X11/extensions/record.h create mode 100644 X11/extensions/recordproto.pc.in create mode 100644 X11/extensions/recordstr.h create mode 100644 X11/extensions/render.h create mode 100644 X11/extensions/renderproto.h create mode 100644 X11/extensions/renderproto.pc.in create mode 100644 X11/extensions/renderproto.txt create mode 100644 X11/extensions/resourceproto.pc.in create mode 100644 X11/extensions/saver.h create mode 100644 X11/extensions/saverproto.h create mode 100644 X11/extensions/scrnsaver.h create mode 100644 X11/extensions/scrnsaverproto.pc.in create mode 100644 X11/extensions/security.h create mode 100644 X11/extensions/securstr.h create mode 100644 X11/extensions/shape.h create mode 100644 X11/extensions/shapestr.h create mode 100644 X11/extensions/shmstr.h create mode 100644 X11/extensions/sync.h create mode 100644 X11/extensions/syncstr.h create mode 100644 X11/extensions/xcmiscproto.pc.in create mode 100644 X11/extensions/xcmiscstr.h create mode 100644 X11/extensions/xextproto.pc.in create mode 100644 X11/extensions/xfixesproto.h create mode 100644 X11/extensions/xfixeswire.h create mode 100644 X11/extensions/xtestext1.h create mode 100644 X11/extensions/xteststr.h (limited to 'X11/extensions') diff --git a/X11/extensions/AUTHORS b/X11/extensions/AUTHORS new file mode 100644 index 000000000..78b329f13 --- /dev/null +++ b/X11/extensions/AUTHORS @@ -0,0 +1,2 @@ +Keith Packard, HP +Eric Anholt, Intel diff --git a/X11/extensions/COPYING b/X11/extensions/COPYING new file mode 100644 index 000000000..a32b353d6 --- /dev/null +++ b/X11/extensions/COPYING @@ -0,0 +1,179 @@ +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. + + +Copyright 1992 Network Computing Devices + +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 NCD. not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. NCD. makes no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. +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. + + +Copyright (c) 1994, 1995 Hewlett-Packard Company + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the Hewlett-Packard +Company shall not be used in advertising or otherwise to promote the +sale, use or other dealings in this Software without prior written +authorization from the Hewlett-Packard Company. + + +Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + + +Copyright 1988, 1989, 1990, 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be +used in advertising or publicity pertaining to distribution of this +software without specific, written prior permission. + +THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., +DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT +LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK +COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, +DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND +REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + + +Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, +and Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 names of Digital or Olivetti +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THEY 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. + + +Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Hewlett-Packard not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +Hewlett-Packard makes no representations about the +suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +This software is not subject to any license of the American +Telephone and Telegraph Company or of the Regents of the +University of California. diff --git a/X11/extensions/ChangeLog b/X11/extensions/ChangeLog new file mode 100644 index 000000000..d6b7bcfb1 --- /dev/null +++ b/X11/extensions/ChangeLog @@ -0,0 +1,185 @@ +commit db08133016b421ef12c65db9c4a2819078f01b06 +Author: Peter Hutterer +Date: Wed May 28 17:18:14 2008 +0930 + + Bump to 7.0.3. + +commit 801650f0d15b4497c63d056559ad98a8ca82f271 +Author: Peter Hutterer +Date: Mon May 12 17:26:02 2008 +0930 + + Xge: replace copyrights with standard format from xserver COPYING. + +commit 9dc48efe2b3136756613ae00afd706f9a52d6f10 +Merge: 69356e4... a07a30f... +Author: Peter Hutterer +Date: Mon May 12 17:22:14 2008 +0930 + + Merge branch 'master' into xge + +commit a07a30f9922e9768e2cf00cc2e479978242c58a8 +Author: James Cloos +Date: Thu Dec 6 16:39:10 2007 -0500 + + Replace static ChangeLog with dist-hook to generate from git log + +commit 087c2ccc7e348e530422a578059173c959aa5a78 +Author: James Cloos +Date: Mon Sep 3 05:54:25 2007 -0400 + + Add *~ to .gitignore to skip patch/emacs droppings + +commit 69356e4165f11f3ed4b377d29df038549191a91e +Author: Peter Hutterer +Date: Thu May 17 19:40:15 2007 +0930 + + Add XGE header files and protocol description. + +commit 88c24404b44def76a56f52a216a8cf2e0991c3e6 +Author: Alan Coopersmith +Date: Fri Jul 14 18:56:41 2006 -0700 + + renamed: .cvsignore -> .gitignore + +commit a63b4a9d7ebc5929ce9172b10743396cd36addb8 +Author: Alan Coopersmith +Date: Tue Jun 27 16:25:22 2006 +0000 + + Remove Xserver API for appgroup extension [Will break Xorg server builds + prior to 2006-06-21 / git commit + 77c947b900faf34f425eef1549d8210c475e093b] + +commit 7bcd3400a8043dee6399680ddc6592747b30f599 +Author: Alan Coopersmith +Date: Wed Jun 21 21:20:22 2006 +0000 + + Remove Xserver API for security extension (#ifdef _SECURITY_SERVER) [Will + break Xorg server builds prior to 2006-06-20 / git commit + d44b2a0a57fb89741173c31676af0ccc822387dc] + +commit cb67dc36362b018f3a9faa5c4558ce99dbfb2334 +Author: Kevin E Martin +Date: Thu Dec 15 00:24:39 2005 +0000 + + Update package version number for final X11R7 release candidate. + +commit 9f8dd222022cfafe3ca6467e02232af7d4d7934b +Author: Kevin E Martin +Date: Wed Oct 19 02:48:15 2005 +0000 + + Update package version number for RC1 release. + +commit cba4432f0d088517f2475881e93cf4dda96a7f94 +Author: Eric Anholt +Date: Tue Aug 2 19:19:40 2005 +0000 + + Add basic .cvsignore files for proto modules. + +commit 790de7da644c6f9114a715b99789253a9c79b0a5 +Author: Kevin E Martin +Date: Fri Jul 29 21:22:57 2005 +0000 + + Various changes preparing packages for RC0: + - Verify and update package version numbers as needed + - Implement versioning scheme + - Change bug address to point to bugzilla bug entry form + - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to + reenable it) + - Fix makedepend to use pkgconfig and pass distcheck + - Update build script to build macros first + - Update modular Xorg version + +commit cf67142f46ec2f754f2b3347b21139b66b7167cf +Author: Adam Jackson +Date: Fri Jun 10 04:01:14 2005 +0000 + + Bug #2799: Input shape. (Keith Packard) + +commit b855e49cf845cf814fa1d8a9abcd65cb14356644 +Author: Adam Jackson +Date: Thu May 19 00:22:40 2005 +0000 + + revert last change, didn't do right thing at all, sorry for the noise + +commit 1e1659043f908d2e648d0ee73f7f33f5fc79813b +Author: Adam Jackson +Date: Thu May 19 00:10:19 2005 +0000 + + Require automake 1.7 in AM_INIT_AUTOMAKE + +commit 1d316d39381cf0981b2f9687cd2f0200c92961ea +Author: Josh Triplett +Date: Wed May 18 08:09:13 2005 +0000 + + Add COPYING file for XExt. Note that there are several similar but + subtly-different licenses included; in particular, there are some + copyright holders with multiple slightly-different licenses included. + +commit f3c7759e6dc671ab6db160e739d00133e9996296 +Author: Søren Sandmann Pedersen +Date: Mon May 9 18:20:06 2005 +0000 + + Change all the protonames from Ext to Proto. + +commit 474a31667a8addb29a0f115790df2910400c4081 +Author: Kevin E Martin +Date: Fri May 6 01:46:32 2005 +0000 + + Initial build system files for proto module. + +commit be09530f849ec00001fc0575816030b7a5dde05c +Author: Roland Mainz +Date: Tue Dec 7 23:37:37 2004 +0000 + + //bugs.freedesktop.org/show_bug.cgi?id=830): Get DPMS header file + (include/extensions/dpms.h) working with C++ applications. Patch by + Kevin DeKorte and Roland Mainz + . + +commit da24110547ed45c08d707dbffb2972f043dbc1b1 +Author: Egbert Eich +Date: Fri Apr 23 18:43:06 2004 +0000 + + Merging XORG-CURRENT into trunk + +commit 8fc2a0fd8ac1b777a35b01d65934ee100b304d20 +Author: Egbert Eich +Date: Sun Mar 14 08:31:36 2004 +0000 + + Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 + +commit e7af2a9e4c47a46b3a68a2efebb171dc7872c341 +Author: Egbert Eich +Date: Wed Mar 3 12:10:54 2004 +0000 + + Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 + +commit abb02cac08ca1d7d3a64b361df5d1be6f15c6440 +Author: Egbert Eich +Date: Thu Feb 26 13:35:14 2004 +0000 + + readding XFree86's cvs IDs + +commit c9d6200d559e57f4ca67291213cd282c7437c3c7 +Author: Egbert Eich +Date: Thu Feb 26 09:22:28 2004 +0000 + + Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 + +commit 023a09fe640f876478157e5b4cd9cfec1452da4b +Author: Kaleb Keithley +Date: Tue Nov 25 19:28:02 2003 +0000 + + XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks + +commit 343e78e15048e6a25791449bfc7566c07ccddf28 +Author: Kaleb Keithley +Date: Fri Nov 14 16:48:43 2003 +0000 + + XFree86 4.3.0.1 + +commit 9a41c9c6452753ac1911a585e59982e8e5186c6b +Author: Kaleb Keithley +Date: Fri Nov 14 15:54:35 2003 +0000 + + R6.6 is the Xorg base-line diff --git a/X11/extensions/INSTALL b/X11/extensions/INSTALL new file mode 100644 index 000000000..05868b6d6 --- /dev/null +++ b/X11/extensions/INSTALL @@ -0,0 +1,8 @@ +Damage is built with the traditional configure script: + + $ ./configure --prefix=/usr/X11R6 + +This should generate valid Makefiles, then: + + $ make + $ make install diff --git a/X11/extensions/MITMisc.h b/X11/extensions/MITMisc.h new file mode 100644 index 000000000..975700e01 --- /dev/null +++ b/X11/extensions/MITMisc.h @@ -0,0 +1,66 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ + +/* $Xorg: MITMisc.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ + +#ifndef _XMITMISC_H_ +#define _XMITMISC_H_ + +#include + +#define X_MITSetBugMode 0 +#define X_MITGetBugMode 1 + +#define MITMiscNumberEvents 0 + +#define MITMiscNumberErrors 0 + +#ifndef _MITMISC_SERVER_ + +_XFUNCPROTOBEGIN + +Bool XMITMiscQueryExtension( + Display* /* dpy */, + int* /* event_basep */, + int* /* error_basep */ +); + +Status XMITMiscSetBugMode( + Display* /* dpy */, + Bool /* onOff */ +); + +Bool XMITMiscGetBugMode( + Display* /* dpy */ +); + +_XFUNCPROTOEND + +#endif + +#endif diff --git a/X11/extensions/Makefile.am b/X11/extensions/Makefile.am new file mode 100644 index 000000000..fe47e2578 --- /dev/null +++ b/X11/extensions/Makefile.am @@ -0,0 +1,55 @@ +xextdir = $(includedir)/X11/extensions +xext_HEADERS = \ + dpms.h \ + dpmsstr.h \ + extutil.h \ + ge.h \ + geproto.h \ + Xge.h \ + lbxbuf.h \ + lbxbufstr.h \ + lbxdeltastr.h \ + lbximage.h \ + lbxopts.h \ + lbxstr.h \ + lbxzlib.h \ + MITMisc.h \ + mitmiscstr.h \ + multibuf.h \ + multibufst.h \ + security.h \ + securstr.h \ + shape.h \ + shapestr.h \ + shmstr.h \ + sync.h \ + syncstr.h \ + Xag.h \ + Xagstr.h \ + Xcup.h \ + Xcupstr.h \ + Xdbe.h \ + Xdbeproto.h \ + XEVI.h \ + XEVIstr.h \ + Xext.h \ + XLbx.h \ + XShm.h \ + xtestext1.h \ + XTest.h \ + xteststr.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xextproto.pc + +EXTRA_DIST = autogen.sh xextproto.pc.in + +EXTRA_DIST += ChangeLog +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + +dist-hook: ChangeLog diff --git a/X11/extensions/Makefile.in b/X11/extensions/Makefile.in new file mode 100644 index 000000000..d3029ac0b --- /dev/null +++ b/X11/extensions/Makefile.in @@ -0,0 +1,530 @@ +# Makefile.in generated by automake 1.8.5 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = . +DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/xextproto.pc.in \ + $(top_srcdir)/configure $(xext_HEADERS) COPYING ChangeLog \ + install-sh missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(mkdir_p) +CONFIG_CLEAN_FILES = xextproto.pc +SOURCES = +DIST_SOURCES = +am__installdirs = "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xextdir)" +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +xextHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(xext_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +am__leading_dot = @am__leading_dot@ +bindir = @bindir@ +build_alias = @build_alias@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +xextdir = $(includedir)/X11/extensions +xext_HEADERS = \ + dpms.h \ + dpmsstr.h \ + extutil.h \ + ge.h \ + geproto.h \ + Xge.h \ + lbxbuf.h \ + lbxbufstr.h \ + lbxdeltastr.h \ + lbximage.h \ + lbxopts.h \ + lbxstr.h \ + lbxzlib.h \ + MITMisc.h \ + mitmiscstr.h \ + multibuf.h \ + multibufst.h \ + security.h \ + securstr.h \ + shape.h \ + shapestr.h \ + shmstr.h \ + sync.h \ + syncstr.h \ + Xag.h \ + Xagstr.h \ + Xcup.h \ + Xcupstr.h \ + Xdbe.h \ + Xdbeproto.h \ + XEVI.h \ + XEVIstr.h \ + Xext.h \ + XLbx.h \ + XShm.h \ + xtestext1.h \ + XTest.h \ + xteststr.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = xextproto.pc +EXTRA_DIST = autogen.sh xextproto.pc.in ChangeLog +MAINTAINERCLEANFILES = ChangeLog +all: all-am + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +xextproto.pc: $(top_builddir)/config.status $(srcdir)/xextproto.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +uninstall-info-am: +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-xextHEADERS: $(xext_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(xextdir)" || $(mkdir_p) "$(DESTDIR)$(xextdir)" + @list='$(xext_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(xextHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(xextdir)/$$f'"; \ + $(xextHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(xextdir)/$$f"; \ + done + +uninstall-xextHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(xext_HEADERS)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f '$(DESTDIR)$(xextdir)/$$f'"; \ + rm -f "$(DESTDIR)$(xextdir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/. + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-am +all-am: Makefile $(DATA) $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xextdir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-pkgconfigDATA install-xextHEADERS + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-pkgconfigDATA \ + uninstall-xextHEADERS + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ + clean-generic ctags dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-tags distcleancheck distdir \ + distuninstallcheck dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-pkgconfigDATA install-strip install-xextHEADERS \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags uninstall uninstall-am uninstall-info-am \ + uninstall-pkgconfigDATA uninstall-xextHEADERS + + +.PHONY: ChangeLog + +ChangeLog: + (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + +dist-hook: ChangeLog +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/X11/extensions/NEWS b/X11/extensions/NEWS new file mode 100644 index 000000000..29b8edd86 --- /dev/null +++ b/X11/extensions/NEWS @@ -0,0 +1,2 @@ +2004-01-05: Version 1.0 released. +2007-01-09: Version 1.1 released, adding the DamageAdd request. \ No newline at end of file diff --git a/X11/extensions/README b/X11/extensions/README new file mode 100644 index 000000000..6f1ad4bfc --- /dev/null +++ b/X11/extensions/README @@ -0,0 +1,10 @@ + Damage + X Damage Extension + Version 1.1 + 2007-01-08 + +This package contains header files and documentation for the X Damage +extension. Library and server implementations are separate. + +Keith Packard +keithp@keithp.com diff --git a/X11/extensions/XEVI.h b/X11/extensions/XEVI.h new file mode 100644 index 000000000..d8e37ff4f --- /dev/null +++ b/X11/extensions/XEVI.h @@ -0,0 +1,64 @@ +/* $Xorg: XEVI.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/************************************************************ +Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. +********************************************************/ +/* $XFree86$ */ + +#ifndef _XEVI_H_ +#define _XEVI_H_ +#include +#define X_EVIQueryVersion 0 +#define X_EVIGetVisualInfo 1 +#define XEVI_TRANSPARENCY_NONE 0 +#define XEVI_TRANSPARENCY_PIXEL 1 +#define XEVI_TRANSPARENCY_MASK 2 +#ifndef _XEVI_SERVER_ +typedef struct { + VisualID core_visual_id; + int screen; + int level; + unsigned int transparency_type; + unsigned int transparency_value; + unsigned int min_hw_colormaps; + unsigned int max_hw_colormaps; + unsigned int num_colormap_conflicts; + VisualID* colormap_conflicts; +} ExtendedVisualInfo; +_XFUNCPROTOBEGIN +Bool XeviQueryExtension( + Display* /* dpy */ +); +Status XeviQueryVersion( + Display* /* dpy */, + int* /* majorVersion */, + int* /* minorVersion */ +); +Status XeviGetVisualInfo( + Display* /* dpy */, + VisualID* /* visual_query */, + int /* nVisual_query */, + ExtendedVisualInfo** /* extendedVisualInfo_return */, + int* /* nInfo_return */ +); +_XFUNCPROTOEND +#endif +#endif diff --git a/X11/extensions/XEVIstr.h b/X11/extensions/XEVIstr.h new file mode 100644 index 000000000..388ef4bcf --- /dev/null +++ b/X11/extensions/XEVIstr.h @@ -0,0 +1,98 @@ +/* $Xorg: XEVIstr.h,v 1.3 2000/08/18 04:05:44 coskrey Exp $ */ +/************************************************************ +Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc. +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. +********************************************************/ +/* $XFree86$ */ + +#ifndef _EVISTR_H_ +#define _EVISTR_H_ + +#include + +#define VisualID CARD32 +#define EVINAME "Extended-Visual-Information" +#define XEVI_MAJOR_VERSION 1 /* current version numbers */ +#define XEVI_MINOR_VERSION 0 + +typedef CARD32 VisualID32; +#define sz_VisualID32 4 + +typedef struct _xExtendedVisualInfo { + VisualID core_visual_id B32; + INT8 screen; + INT8 level; + CARD8 transparency_type; + CARD8 pad0; + CARD32 transparency_value B32; + CARD8 min_hw_colormaps; + CARD8 max_hw_colormaps; + CARD16 num_colormap_conflicts B16; +} xExtendedVisualInfo; +#define sz_xExtendedVisualInfo 16 + +typedef struct _XEVIQueryVersion { + CARD8 reqType; /* always XEVIReqCode */ + CARD8 xeviReqType; /* always X_EVIQueryVersion */ + CARD16 length B16; +} xEVIQueryVersionReq; +#define sz_xEVIQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of EVI protocol */ + CARD16 minorVersion B16; /* minor version of EVI protocol */ + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xEVIQueryVersionReply; +#define sz_xEVIQueryVersionReply 32 + +typedef struct _XEVIGetVisualInfoReq { + CARD8 reqType; /* always XEVIReqCode */ + CARD8 xeviReqType; /* always X_EVIGetVisualInfo */ + CARD16 length B16; + CARD32 n_visual B32; +} xEVIGetVisualInfoReq; +#define sz_xEVIGetVisualInfoReq 8 + +typedef struct _XEVIGetVisualInfoReply { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 n_info B32; + CARD32 n_conflicts B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xEVIGetVisualInfoReply; +#define sz_xEVIGetVisualInfoReply 32 + +#undef VisualID + +#endif /* _EVISTR_H_ */ diff --git a/X11/extensions/XI.h b/X11/extensions/XI.h new file mode 100644 index 000000000..51a417514 --- /dev/null +++ b/X11/extensions/XI.h @@ -0,0 +1,288 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD 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. + +********************************************************/ + +/* Definitions used by the server, library and client */ + +#ifndef _XI_H_ +#define _XI_H_ + +#define sz_xGetExtensionVersionReq 8 +#define sz_xGetExtensionVersionReply 32 +#define sz_xListInputDevicesReq 4 +#define sz_xListInputDevicesReply 32 +#define sz_xOpenDeviceReq 8 +#define sz_xOpenDeviceReply 32 +#define sz_xCloseDeviceReq 8 +#define sz_xSetDeviceModeReq 8 +#define sz_xSetDeviceModeReply 32 +#define sz_xSelectExtensionEventReq 12 +#define sz_xGetSelectedExtensionEventsReq 8 +#define sz_xGetSelectedExtensionEventsReply 32 +#define sz_xChangeDeviceDontPropagateListReq 12 +#define sz_xGetDeviceDontPropagateListReq 8 +#define sz_xGetDeviceDontPropagateListReply 32 +#define sz_xGetDeviceMotionEventsReq 16 +#define sz_xGetDeviceMotionEventsReply 32 +#define sz_xChangeKeyboardDeviceReq 8 +#define sz_xChangeKeyboardDeviceReply 32 +#define sz_xChangePointerDeviceReq 8 +#define sz_xChangePointerDeviceReply 32 +#define sz_xGrabDeviceReq 20 +#define sz_xGrabDeviceReply 32 +#define sz_xUngrabDeviceReq 12 +#define sz_xGrabDeviceKeyReq 20 +#define sz_xGrabDeviceKeyReply 32 +#define sz_xUngrabDeviceKeyReq 16 +#define sz_xGrabDeviceButtonReq 20 +#define sz_xGrabDeviceButtonReply 32 +#define sz_xUngrabDeviceButtonReq 16 +#define sz_xAllowDeviceEventsReq 12 +#define sz_xGetDeviceFocusReq 8 +#define sz_xGetDeviceFocusReply 32 +#define sz_xSetDeviceFocusReq 16 +#define sz_xGetFeedbackControlReq 8 +#define sz_xGetFeedbackControlReply 32 +#define sz_xChangeFeedbackControlReq 12 +#define sz_xGetDeviceKeyMappingReq 8 +#define sz_xGetDeviceKeyMappingReply 32 +#define sz_xChangeDeviceKeyMappingReq 8 +#define sz_xGetDeviceModifierMappingReq 8 +#define sz_xSetDeviceModifierMappingReq 8 +#define sz_xSetDeviceModifierMappingReply 32 +#define sz_xGetDeviceButtonMappingReq 8 +#define sz_xGetDeviceButtonMappingReply 32 +#define sz_xSetDeviceButtonMappingReq 8 +#define sz_xSetDeviceButtonMappingReply 32 +#define sz_xQueryDeviceStateReq 8 +#define sz_xQueryDeviceStateReply 32 +#define sz_xSendExtensionEventReq 16 +#define sz_xDeviceBellReq 8 +#define sz_xSetDeviceValuatorsReq 8 +#define sz_xSetDeviceValuatorsReply 32 +#define sz_xGetDeviceControlReq 8 +#define sz_xGetDeviceControlReply 32 +#define sz_xChangeDeviceControlReq 8 +#define sz_xChangeDeviceControlReply 32 + +#define INAME "XInputExtension" + +#define XI_KEYBOARD "KEYBOARD" +#define XI_MOUSE "MOUSE" +#define XI_TABLET "TABLET" +#define XI_TOUCHSCREEN "TOUCHSCREEN" +#define XI_TOUCHPAD "TOUCHPAD" +#define XI_BARCODE "BARCODE" +#define XI_BUTTONBOX "BUTTONBOX" +#define XI_KNOB_BOX "KNOB_BOX" +#define XI_ONE_KNOB "ONE_KNOB" +#define XI_NINE_KNOB "NINE_KNOB" +#define XI_TRACKBALL "TRACKBALL" +#define XI_QUADRATURE "QUADRATURE" +#define XI_ID_MODULE "ID_MODULE" +#define XI_SPACEBALL "SPACEBALL" +#define XI_DATAGLOVE "DATAGLOVE" +#define XI_EYETRACKER "EYETRACKER" +#define XI_CURSORKEYS "CURSORKEYS" +#define XI_FOOTMOUSE "FOOTMOUSE" + +#define Dont_Check 0 +#define XInput_Initial_Release 1 +#define XInput_Add_XDeviceBell 2 +#define XInput_Add_XSetDeviceValuators 3 +#define XInput_Add_XChangeDeviceControl 4 +#define XInput_Add_DevicePresenceNotify 5 + +#define XI_Absent 0 +#define XI_Present 1 + +#define XI_Initial_Release_Major 1 +#define XI_Initial_Release_Minor 0 + +#define XI_Add_XDeviceBell_Major 1 +#define XI_Add_XDeviceBell_Minor 1 + +#define XI_Add_XSetDeviceValuators_Major 1 +#define XI_Add_XSetDeviceValuators_Minor 2 + +#define XI_Add_XChangeDeviceControl_Major 1 +#define XI_Add_XChangeDeviceControl_Minor 3 + +#define XI_Add_DevicePresenceNotify_Major 1 +#define XI_Add_DevicePresenceNotify_Minor 4 + +#define DEVICE_RESOLUTION 1 +#define DEVICE_ABS_CALIB 2 +#define DEVICE_CORE 3 +#define DEVICE_ENABLE 4 +#define DEVICE_ABS_AREA 5 + +#define NoSuchExtension 1 + +#define COUNT 0 +#define CREATE 1 + +#define NewPointer 0 +#define NewKeyboard 1 + +#define XPOINTER 0 +#define XKEYBOARD 1 + +#define UseXKeyboard 0xFF + +#define IsXPointer 0 +#define IsXKeyboard 1 +#define IsXExtensionDevice 2 +#define IsXExtensionKeyboard 3 +#define IsXExtensionPointer 4 + +#define AsyncThisDevice 0 +#define SyncThisDevice 1 +#define ReplayThisDevice 2 +#define AsyncOtherDevices 3 +#define AsyncAll 4 +#define SyncAll 5 + +#define FollowKeyboard 3 +#ifndef RevertToFollowKeyboard +#define RevertToFollowKeyboard 3 +#endif + +#define DvAccelNum (1L << 0) +#define DvAccelDenom (1L << 1) +#define DvThreshold (1L << 2) + +#define DvKeyClickPercent (1L<<0) +#define DvPercent (1L<<1) +#define DvPitch (1L<<2) +#define DvDuration (1L<<3) +#define DvLed (1L<<4) +#define DvLedMode (1L<<5) +#define DvKey (1L<<6) +#define DvAutoRepeatMode (1L<<7) + +#define DvString (1L << 0) + +#define DvInteger (1L << 0) + +#define DeviceMode (1L << 0) +#define Relative 0 +#define Absolute 1 + +#define ProximityState (1L << 1) +#define InProximity (0L << 1) +#define OutOfProximity (1L << 1) + +#define AddToList 0 +#define DeleteFromList 1 + +#define KeyClass 0 +#define ButtonClass 1 +#define ValuatorClass 2 +#define FeedbackClass 3 +#define ProximityClass 4 +#define FocusClass 5 +#define OtherClass 6 + +#define KbdFeedbackClass 0 +#define PtrFeedbackClass 1 +#define StringFeedbackClass 2 +#define IntegerFeedbackClass 3 +#define LedFeedbackClass 4 +#define BellFeedbackClass 5 + +#define _devicePointerMotionHint 0 +#define _deviceButton1Motion 1 +#define _deviceButton2Motion 2 +#define _deviceButton3Motion 3 +#define _deviceButton4Motion 4 +#define _deviceButton5Motion 5 +#define _deviceButtonMotion 6 +#define _deviceButtonGrab 7 +#define _deviceOwnerGrabButton 8 +#define _noExtensionEvent 9 + +#define _devicePresence 0 + +#define DeviceAdded 0 +#define DeviceRemoved 1 +#define DeviceEnabled 2 +#define DeviceDisabled 3 +#define DeviceUnrecoverable 4 +#define DeviceControlChanged 5 + +#define XI_BadDevice 0 +#define XI_BadEvent 1 +#define XI_BadMode 2 +#define XI_DeviceBusy 3 +#define XI_BadClass 4 + +/* + * Make XEventClass be a CARD32 for 64 bit servers. Don't affect client + * definition of XEventClass since that would be a library interface change. + * See the top of X.h for more _XSERVER64 magic. + * + * But, don't actually use the CARD32 type. We can't get it defined here + * without polluting the namespace. + */ +#ifdef _XSERVER64 +typedef unsigned int XEventClass; +#else +typedef unsigned long XEventClass; +#endif + +/******************************************************************* + * + * Extension version structure. + * + */ + +typedef struct { + int present; + short major_version; + short minor_version; +} XExtensionVersion; + +#endif /* _XI_H_ */ diff --git a/X11/extensions/XInput.h b/X11/extensions/XInput.h new file mode 100644 index 000000000..e3585b4f9 --- /dev/null +++ b/X11/extensions/XInput.h @@ -0,0 +1,1200 @@ +/* $Xorg: XInput.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $ */ + +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD 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. + +********************************************************/ +/* $XFree86: xc/include/extensions/XInput.h,v 1.3 2001/12/14 19:53:28 dawes Exp $ */ + +/* Definitions used by the library and client */ + +#ifndef _XINPUT_H_ +#define _XINPUT_H_ + +#include +#include + +#define _deviceKeyPress 0 +#define _deviceKeyRelease 1 + +#define _deviceButtonPress 0 +#define _deviceButtonRelease 1 + +#define _deviceMotionNotify 0 + +#define _deviceFocusIn 0 +#define _deviceFocusOut 1 + +#define _proximityIn 0 +#define _proximityOut 1 + +#define _deviceStateNotify 0 +#define _deviceMappingNotify 1 +#define _changeDeviceNotify 2 + +#define FindTypeAndClass(d,type,_class,classid,offset) \ + { int _i; XInputClassInfo *_ip; \ + type = 0; _class = 0; \ + for (_i=0, _ip= ((XDevice *) d)->classes; \ + _i< ((XDevice *) d)->num_classes; \ + _i++, _ip++) \ + if (_ip->input_class == classid) \ + {type = _ip->event_type_base + offset; \ + _class = ((XDevice *) d)->device_id << 8 | type;}} + +#define DeviceKeyPress(d,type,_class) \ + FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyPress) + +#define DeviceKeyRelease(d,type,_class) \ + FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyRelease) + +#define DeviceButtonPress(d,type,_class) \ + FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonPress) + +#define DeviceButtonRelease(d,type,_class) \ + FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonRelease) + +#define DeviceMotionNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, ValuatorClass, _deviceMotionNotify) + +#define DeviceFocusIn(d,type,_class) \ + FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusIn) + +#define DeviceFocusOut(d,type,_class) \ + FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusOut) + +#define ProximityIn(d,type,_class) \ + FindTypeAndClass(d, type, _class, ProximityClass, _proximityIn) + +#define ProximityOut(d,type,_class) \ + FindTypeAndClass(d, type, _class, ProximityClass, _proximityOut) + +#define DeviceStateNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, OtherClass, _deviceStateNotify) + +#define DeviceMappingNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, OtherClass, _deviceMappingNotify) + +#define ChangeDeviceNotify(d,type,_class) \ + FindTypeAndClass(d, type, _class, OtherClass, _changeDeviceNotify) + +#define DevicePointerMotionHint(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _devicePointerMotionHint;} + +#define DeviceButton1Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton1Motion;} + +#define DeviceButton2Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton2Motion;} + +#define DeviceButton3Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton3Motion;} + +#define DeviceButton4Motion(d,type, _class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton4Motion;} + +#define DeviceButton5Motion(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButton5Motion;} + +#define DeviceButtonMotion(d,type, _class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonMotion;} + +#define DeviceOwnerGrabButton(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceOwnerGrabButton;} + +#define DeviceButtonPressGrab(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonGrab;} + +#define NoExtensionEvent(d,type,_class) \ + { _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;} + +#define DevicePresence(dpy, type, _class) \ + { \ + extern int _XiGetDevicePresenceNotifyEvent(Display *); \ + type = _XiGetDevicePresenceNotifyEvent(dpy); \ + _class = (0x10000 | _devicePresence); \ + } + +#define BadDevice(dpy,error) _xibaddevice(dpy, &error) + +#define BadClass(dpy,error) _xibadclass(dpy, &error) + +#define BadEvent(dpy,error) _xibadevent(dpy, &error) + +#define BadMode(dpy,error) _xibadmode(dpy, &error) + +#define DeviceBusy(dpy,error) _xidevicebusy(dpy, &error) + +/*************************************************************** + * + * DeviceKey events. These events are sent by input devices that + * support input class Keys. + * The location of the X pointer is reported in the coordinate + * fields of the x,y and x_root,y_root fields. + * + */ + +typedef struct + { + int type; /* of event */ + unsigned long serial; /* # of last request processed */ + Bool send_event; /* true if from SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + Window root; /* root window event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* x, y coordinates in event window */ + int x_root; /* coordinates relative to root */ + int y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + unsigned int keycode; /* detail */ + Bool same_screen; /* same screen flag */ + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XDeviceKeyEvent; + +typedef XDeviceKeyEvent XDeviceKeyPressedEvent; +typedef XDeviceKeyEvent XDeviceKeyReleasedEvent; + +/******************************************************************* + * + * DeviceButton events. These events are sent by extension devices + * that support input class Buttons. + * + */ + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* x, y coordinates in event window */ + int x_root; /* coordinates relative to root */ + int y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + unsigned int button; /* detail */ + Bool same_screen; /* same screen flag */ + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XDeviceButtonEvent; + +typedef XDeviceButtonEvent XDeviceButtonPressedEvent; +typedef XDeviceButtonEvent XDeviceButtonReleasedEvent; + +/******************************************************************* + * + * DeviceMotionNotify event. These events are sent by extension devices + * that support input class Valuators. + * + */ + +typedef struct + { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + Window root; /* root window that the event occured on */ + Window subwindow; /* child window */ + Time time; /* milliseconds */ + int x, y; /* x, y coordinates in event window */ + int x_root; /* coordinates relative to root */ + int y_root; /* coordinates relative to root */ + unsigned int state; /* key or button mask */ + char is_hint; /* detail */ + Bool same_screen; /* same screen flag */ + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XDeviceMotionEvent; + +/******************************************************************* + * + * DeviceFocusChange events. These events are sent when the focus + * of an extension device that can be focused is changed. + * + */ + +typedef struct + { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* "event" window reported relative to */ + XID deviceid; + int mode; /* NotifyNormal, NotifyGrab, NotifyUngrab */ + int detail; + /* + * NotifyAncestor, NotifyVirtual, NotifyInferior, + * NotifyNonLinear,NotifyNonLinearVirtual, NotifyPointer, + * NotifyPointerRoot, NotifyDetailNone + */ + Time time; + } XDeviceFocusChangeEvent; + +typedef XDeviceFocusChangeEvent XDeviceFocusInEvent; +typedef XDeviceFocusChangeEvent XDeviceFocusOutEvent; + +/******************************************************************* + * + * ProximityNotify events. These events are sent by those absolute + * positioning devices that are capable of generating proximity information. + * + */ + +typedef struct + { + int type; /* ProximityIn or ProximityOut */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + XID deviceid; + Window root; + Window subwindow; + Time time; + int x, y; + int x_root, y_root; + unsigned int state; + Bool same_screen; + unsigned int device_state; /* device key or button mask */ + unsigned char axes_count; + unsigned char first_axis; + int axis_data[6]; + } XProximityNotifyEvent; +typedef XProximityNotifyEvent XProximityInEvent; +typedef XProximityNotifyEvent XProximityOutEvent; + +/******************************************************************* + * + * DeviceStateNotify events are generated on EnterWindow and FocusIn + * for those clients who have selected DeviceState. + * + */ + +typedef struct + { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + } XInputClass; + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; + XID deviceid; + Time time; + int num_classes; + char data[64]; +} XDeviceStateNotifyEvent; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + unsigned char num_valuators; + unsigned char mode; + int valuators[6]; +} XValuatorStatus; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_keys; + char keys[32]; +} XKeyStatus; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_buttons; + char buttons[32]; +} XButtonStatus; + +/******************************************************************* + * + * DeviceMappingNotify event. This event is sent when the key mapping, + * modifier mapping, or button mapping of an extension device is changed. + * + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + XID deviceid; + Time time; + int request; /* one of MappingModifier, MappingKeyboard, + MappingPointer */ + int first_keycode;/* first keycode */ + int count; /* defines range of change w. first_keycode*/ +} XDeviceMappingEvent; + +/******************************************************************* + * + * ChangeDeviceNotify event. This event is sent when an + * XChangeKeyboard or XChangePointer request is made. + * + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + XID deviceid; + Time time; + int request; /* NewPointer or NewKeyboard */ +} XChangeDeviceNotifyEvent; + +/******************************************************************* + * + * DevicePresenceNotify event. This event is sent when the list of + * input devices changes, in which case devchange will be false, and + * no information about the change will be contained in the event; + * the client should use XListInputDevices() to learn what has changed. + * + * If devchange is true, an attribute that the server believes is + * important has changed on a device, and the client should use + * XGetDeviceControl to examine the device. If control is non-zero, + * then that control has changed meaningfully. + */ + +typedef struct { + int type; + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* unused */ + Time time; + Bool devchange; + XID deviceid; + XID control; +} XDevicePresenceNotifyEvent; + +/******************************************************************* + * + * Control structures for input devices that support input class + * Feedback. These are used by the XGetFeedbackControl and + * XChangeFeedbackControl functions. + * + */ + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; +} XFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int click; + int percent; + int pitch; + int duration; + int led_mask; + int global_auto_repeat; + char auto_repeats[32]; +} XKbdFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int accelNum; + int accelDenom; + int threshold; +} XPtrFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int resolution; + int minVal; + int maxVal; +} XIntegerFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int max_symbols; + int num_syms_supported; + KeySym *syms_supported; +} XStringFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int percent; + int pitch; + int duration; +} XBellFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int led_values; + int led_mask; +} XLedFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; +} XFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int accelNum; + int accelDenom; + int threshold; +} XPtrFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int click; + int percent; + int pitch; + int duration; + int led_mask; + int led_value; + int key; + int auto_repeat_mode; +} XKbdFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int num_keysyms; + KeySym *syms_to_display; +} XStringFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int int_to_display; +} XIntegerFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int percent; + int pitch; + int duration; +} XBellFeedbackControl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + XID id; + int led_mask; + int led_values; +} XLedFeedbackControl; + +/******************************************************************* + * + * Device control structures. + * + */ + +typedef struct { + XID control; + int length; +} XDeviceControl; + +typedef struct { + XID control; + int length; + int first_valuator; + int num_valuators; + int *resolutions; +} XDeviceResolutionControl; + +typedef struct { + XID control; + int length; + int num_valuators; + int *resolutions; + int *min_resolutions; + int *max_resolutions; +} XDeviceResolutionState; + +typedef struct { + XID control; + int length; + int min_x; + int max_x; + int min_y; + int max_y; + int flip_x; + int flip_y; + int rotation; + int button_threshold; +} XDeviceAbsCalibControl, XDeviceAbsCalibState; + +typedef struct { + XID control; + int length; + int offset_x; + int offset_y; + int width; + int height; + int screen; + XID following; +} XDeviceAbsAreaControl, XDeviceAbsAreaState; + +typedef struct { + XID control; + int length; + int status; +} XDeviceCoreControl; + +typedef struct { + XID control; + int length; + int status; + int iscore; +} XDeviceCoreState; + +typedef struct { + XID control; + int length; + int enable; +} XDeviceEnableControl, XDeviceEnableState; + +/******************************************************************* + * + * An array of XDeviceList structures is returned by the + * XListInputDevices function. Each entry contains information + * about one input device. Among that information is an array of + * pointers to structures that describe the characteristics of + * the input device. + * + */ + +typedef struct _XAnyClassinfo *XAnyClassPtr; + +typedef struct _XAnyClassinfo { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + } XAnyClassInfo; + +typedef struct _XDeviceInfo *XDeviceInfoPtr; + +typedef struct _XDeviceInfo + { + XID id; + Atom type; + char *name; + int num_classes; + int use; + XAnyClassPtr inputclassinfo; + } XDeviceInfo; + +typedef struct _XKeyInfo *XKeyInfoPtr; + +typedef struct _XKeyInfo + { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + unsigned short min_keycode; + unsigned short max_keycode; + unsigned short num_keys; + } XKeyInfo; + +typedef struct _XButtonInfo *XButtonInfoPtr; + +typedef struct _XButtonInfo { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + short num_buttons; + } XButtonInfo; + +typedef struct _XAxisInfo *XAxisInfoPtr; + +typedef struct _XAxisInfo { + int resolution; + int min_value; + int max_value; + } XAxisInfo; + +typedef struct _XValuatorInfo *XValuatorInfoPtr; + +typedef struct _XValuatorInfo + { +#if defined(__cplusplus) || defined(c_plusplus) + XID c_class; +#else + XID class; +#endif + int length; + unsigned char num_axes; + unsigned char mode; + unsigned long motion_buffer; + XAxisInfoPtr axes; + } XValuatorInfo; + + +/******************************************************************* + * + * An XDevice structure is returned by the XOpenDevice function. + * It contains an array of pointers to XInputClassInfo structures. + * Each contains information about a class of input supported by the + * device, including a pointer to an array of data for each type of event + * the device reports. + * + */ + + +typedef struct { + unsigned char input_class; + unsigned char event_type_base; +} XInputClassInfo; + +typedef struct { + XID device_id; + int num_classes; + XInputClassInfo *classes; +} XDevice; + + +/******************************************************************* + * + * The following structure is used to return information for the + * XGetSelectedExtensionEvents function. + * + */ + +typedef struct { + XEventClass event_type; + XID device; +} XEventList; + +/******************************************************************* + * + * The following structure is used to return motion history data from + * an input device that supports the input class Valuators. + * This information is returned by the XGetDeviceMotionEvents function. + * + */ + +typedef struct { + Time time; + int *data; +} XDeviceTimeCoord; + + +/******************************************************************* + * + * Device state structure. + * This is returned by the XQueryDeviceState request. + * + */ + +typedef struct { + XID device_id; + int num_classes; + XInputClass *data; +} XDeviceState; + +/******************************************************************* + * + * Note that the mode field is a bitfield that reports the Proximity + * status of the device as well as the mode. The mode field should + * be OR'd with the mask DeviceMode and compared with the values + * Absolute and Relative to determine the mode, and should be OR'd + * with the mask ProximityState and compared with the values InProximity + * and OutOfProximity to determine the proximity state. + * + */ + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + unsigned char num_valuators; + unsigned char mode; + int *valuators; +} XValuatorState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_keys; + char keys[32]; +} XKeyState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + unsigned char c_class; +#else + unsigned char class; +#endif + unsigned char length; + short num_buttons; + char buttons[32]; +} XButtonState; + +/******************************************************************* + * + * Function definitions. + * + */ + +_XFUNCPROTOBEGIN + +extern int XChangeKeyboardDevice( + Display* /* display */, + XDevice* /* device */ +); + +extern int XChangePointerDevice( + Display* /* display */, + XDevice* /* device */, + int /* xaxis */, + int /* yaxis */ +); + +extern int XGrabDevice( + Display* /* display */, + XDevice* /* device */, + Window /* grab_window */, + Bool /* ownerEvents */, + int /* event count */, + XEventClass* /* event_list */, + int /* this_device_mode */, + int /* other_devices_mode */, + Time /* time */ +); + +extern int XUngrabDevice( + Display* /* display */, + XDevice* /* device */, + Time /* time */ +); + +extern int XGrabDeviceKey( + Display* /* display */, + XDevice* /* device */, + unsigned int /* key */, + unsigned int /* modifiers */, + XDevice* /* modifier_device */, + Window /* grab_window */, + Bool /* owner_events */, + unsigned int /* event_count */, + XEventClass* /* event_list */, + int /* this_device_mode */, + int /* other_devices_mode */ +); + +extern int XUngrabDeviceKey( + Display* /* display */, + XDevice* /* device */, + unsigned int /* key */, + unsigned int /* modifiers */, + XDevice* /* modifier_dev */, + Window /* grab_window */ +); + +extern int XGrabDeviceButton( + Display* /* display */, + XDevice* /* device */, + unsigned int /* button */, + unsigned int /* modifiers */, + XDevice* /* modifier_device */, + Window /* grab_window */, + Bool /* owner_events */, + unsigned int /* event_count */, + XEventClass* /* event_list */, + int /* this_device_mode */, + int /* other_devices_mode */ +); + +extern int XUngrabDeviceButton( + Display* /* display */, + XDevice* /* device */, + unsigned int /* button */, + unsigned int /* modifiers */, + XDevice* /* modifier_dev */, + Window /* grab_window */ +); + +extern int XAllowDeviceEvents( + Display* /* display */, + XDevice* /* device */, + int /* event_mode */, + Time /* time */ +); + +extern int XGetDeviceFocus( + Display* /* display */, + XDevice* /* device */, + Window* /* focus */, + int* /* revert_to */, + Time* /* time */ +); + +extern int XSetDeviceFocus( + Display* /* display */, + XDevice* /* device */, + Window /* focus */, + int /* revert_to */, + Time /* time */ +); + +extern XFeedbackState *XGetFeedbackControl( + Display* /* display */, + XDevice* /* device */, + int* /* num_feedbacks */ +); + +extern void XFreeFeedbackList( + XFeedbackState* /* list */ +); + +extern int XChangeFeedbackControl( + Display* /* display */, + XDevice* /* device */, + unsigned long /* mask */, + XFeedbackControl* /* f */ +); + +extern int XDeviceBell( + Display* /* display */, + XDevice* /* device */, + XID /* feedbackclass */, + XID /* feedbackid */, + int /* percent */ +); + +extern KeySym *XGetDeviceKeyMapping( + Display* /* display */, + XDevice* /* device */, +#if NeedWidePrototypes + unsigned int /* first */, +#else + KeyCode /* first */, +#endif + int /* keycount */, + int* /* syms_per_code */ +); + +extern int XChangeDeviceKeyMapping( + Display* /* display */, + XDevice* /* device */, + int /* first */, + int /* syms_per_code */, + KeySym* /* keysyms */, + int /* count */ +); + +extern XModifierKeymap *XGetDeviceModifierMapping( + Display* /* display */, + XDevice* /* device */ +); + +extern int XSetDeviceModifierMapping( + Display* /* display */, + XDevice* /* device */, + XModifierKeymap* /* modmap */ +); + +extern int XSetDeviceButtonMapping( + Display* /* display */, + XDevice* /* device */, + unsigned char* /* map[] */, + int /* nmap */ +); + +extern int XGetDeviceButtonMapping( + Display* /* display */, + XDevice* /* device */, + unsigned char* /* map[] */, + unsigned int /* nmap */ +); + +extern XDeviceState *XQueryDeviceState( + Display* /* display */, + XDevice* /* device */ +); + +extern void XFreeDeviceState( + XDeviceState* /* list */ +); + +extern XExtensionVersion *XGetExtensionVersion( + Display* /* display */, + _Xconst char* /* name */ +); + +extern XDeviceInfo *XListInputDevices( + Display* /* display */, + int* /* ndevices */ +); + +extern void XFreeDeviceList( + XDeviceInfo* /* list */ +); + +extern XDevice *XOpenDevice( + Display* /* display */, + XID /* id */ +); + +extern int XCloseDevice( + Display* /* display */, + XDevice* /* device */ +); + +extern int XSetDeviceMode( + Display* /* display */, + XDevice* /* device */, + int /* mode */ +); + +extern int XSetDeviceValuators( + Display* /* display */, + XDevice* /* device */, + int* /* valuators */, + int /* first_valuator */, + int /* num_valuators */ +); + +extern XDeviceControl *XGetDeviceControl( + Display* /* display */, + XDevice* /* device */, + int /* control */ +); + +extern int XChangeDeviceControl( + Display* /* display */, + XDevice* /* device */, + int /* control */, + XDeviceControl* /* d */ +); + +extern int XSelectExtensionEvent( + Display* /* display */, + Window /* w */, + XEventClass* /* event_list */, + int /* count */ +); + +extern int XGetSelectedExtensionEvents( + Display* /* display */, + Window /* w */, + int* /* this_client_count */, + XEventClass** /* this_client_list */, + int* /* all_clients_count */, + XEventClass** /* all_clients_list */ +); + +extern int XChangeDeviceDontPropagateList( + Display* /* display */, + Window /* window */, + int /* count */, + XEventClass* /* events */, + int /* mode */ +); + +extern XEventClass *XGetDeviceDontPropagateList( + Display* /* display */, + Window /* window */, + int* /* count */ +); + +extern Status XSendExtensionEvent( + Display* /* display */, + XDevice* /* device */, + Window /* dest */, + Bool /* prop */, + int /* count */, + XEventClass* /* list */, + XEvent* /* event */ +); + +extern XDeviceTimeCoord *XGetDeviceMotionEvents( + Display* /* display */, + XDevice* /* device */, + Time /* start */, + Time /* stop */, + int* /* nEvents */, + int* /* mode */, + int* /* axis_count */ +); + +extern void XFreeDeviceMotionEvents( + XDeviceTimeCoord* /* events */ +); + +extern void XFreeDeviceControl( + XDeviceControl* /* control */ +); + +_XFUNCPROTOEND + +#endif /* _XINPUT_H_ */ diff --git a/X11/extensions/XIproto.h b/X11/extensions/XIproto.h new file mode 100644 index 000000000..6d4bf64b2 --- /dev/null +++ b/X11/extensions/XIproto.h @@ -0,0 +1,1617 @@ +/* $Xorg: XIproto.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ + +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +Copyright 1989 by Hewlett-Packard Company, Palo Alto, California. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 Hewlett-Packard not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +HEWLETT-PACKARD 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. + +********************************************************/ +/* $XFree86: xc/include/extensions/XIproto.h,v 1.4 2001/01/17 17:53:17 dawes Exp $ */ + +#ifndef _XIPROTO_H +#define _XIPROTO_H + +#include +#include + +/* make sure types have right sizes for protocol structures. */ +#define Window CARD32 +#define Time CARD32 +#define KeyCode CARD8 + +/********************************************************* + * + * number of events, errors, and extension name. + * + */ + +#define MORE_EVENTS 0x80 +#define DEVICE_BITS 0x7F + +#define InputClassBits 0x3F /* bits in mode field for input classes */ +#define ModeBitsShift 6 /* amount to shift the remaining bits */ + +#define numInputClasses 7 + +#define IEVENTS 16 +#define IERRORS 5 + +#define CLIENT_REQ 1 + +typedef struct _XExtEventInfo + { + Mask mask; + BYTE type; + BYTE word; + } XExtEventInfo; + +typedef unsigned char *Pointer; + +struct tmask + { + Mask mask; + Pointer dev; + }; + +/********************************************************* + * + * Event constants used by library. + * + */ + +#define XI_DeviceValuator 0 +#define XI_DeviceKeyPress 1 +#define XI_DeviceKeyRelease 2 +#define XI_DeviceButtonPress 3 +#define XI_DeviceButtonRelease 4 +#define XI_DeviceMotionNotify 5 +#define XI_DeviceFocusIn 6 +#define XI_DeviceFocusOut 7 +#define XI_ProximityIn 8 +#define XI_ProximityOut 9 +#define XI_DeviceStateNotify 10 +#define XI_DeviceMappingNotify 11 +#define XI_ChangeDeviceNotify 12 +#define XI_DeviceKeystateNotify 13 +#define XI_DeviceButtonstateNotify 14 +#define XI_DevicePresenceNotify 15 + +/********************************************************* + * + * Protocol request constants + * + */ + +#define X_GetExtensionVersion 1 +#define X_ListInputDevices 2 +#define X_OpenDevice 3 +#define X_CloseDevice 4 +#define X_SetDeviceMode 5 +#define X_SelectExtensionEvent 6 +#define X_GetSelectedExtensionEvents 7 +#define X_ChangeDeviceDontPropagateList 8 +#define X_GetDeviceDontPropagateList 9 +#define X_GetDeviceMotionEvents 10 +#define X_ChangeKeyboardDevice 11 +#define X_ChangePointerDevice 12 +#define X_GrabDevice 13 +#define X_UngrabDevice 14 +#define X_GrabDeviceKey 15 +#define X_UngrabDeviceKey 16 +#define X_GrabDeviceButton 17 +#define X_UngrabDeviceButton 18 +#define X_AllowDeviceEvents 19 +#define X_GetDeviceFocus 20 +#define X_SetDeviceFocus 21 +#define X_GetFeedbackControl 22 +#define X_ChangeFeedbackControl 23 +#define X_GetDeviceKeyMapping 24 +#define X_ChangeDeviceKeyMapping 25 +#define X_GetDeviceModifierMapping 26 +#define X_SetDeviceModifierMapping 27 +#define X_GetDeviceButtonMapping 28 +#define X_SetDeviceButtonMapping 29 +#define X_QueryDeviceState 30 +#define X_SendExtensionEvent 31 +#define X_DeviceBell 32 +#define X_SetDeviceValuators 33 +#define X_GetDeviceControl 34 +#define X_ChangeDeviceControl 35 + +/********************************************************* + * + * Protocol request and reply structures. + * + * GetExtensionVersion. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GetExtensionVersion */ + CARD16 length B16; + CARD16 nbytes B16; + CARD8 pad1, pad2; +} xGetExtensionVersionReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetExtensionVersion */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 major_version B16; + CARD16 minor_version B16; + BOOL present; + CARD8 pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; +} xGetExtensionVersionReply; + +/********************************************************* + * + * ListInputDevices. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_ListInputDevices */ + CARD16 length B16; +} xListInputDevicesReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_ListInputDevices */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 ndevices; + CARD8 pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xListInputDevicesReply; + +typedef struct _xDeviceInfo *xDeviceInfoPtr; + +typedef struct _xAnyClassinfo *xAnyClassPtr; + +typedef struct _xAnyClassinfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + } xAnyClassInfo; + +typedef struct _xDeviceInfo { + CARD32 type B32; + CARD8 id; + CARD8 num_classes; + CARD8 use; + CARD8 pad1; + } xDeviceInfo; + +typedef struct _xKeyInfo *xKeyInfoPtr; + +typedef struct _xKeyInfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + KeyCode min_keycode; + KeyCode max_keycode; + CARD16 num_keys B16; + CARD8 pad1,pad2; + } xKeyInfo; + +typedef struct _xButtonInfo *xButtonInfoPtr; + +typedef struct _xButtonInfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + CARD16 num_buttons B16; + } xButtonInfo; + +typedef struct _xValuatorInfo *xValuatorInfoPtr; + +typedef struct _xValuatorInfo { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + CARD8 num_axes; + CARD8 mode; + CARD32 motion_buffer_size B32; + } xValuatorInfo; + +typedef struct _xAxisInfo *xAxisInfoPtr; + +typedef struct _xAxisInfo { + CARD32 resolution B32; + CARD32 min_value B32; + CARD32 max_value B32; + } xAxisInfo; + +/********************************************************* + * + * OpenDevice. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_OpenDevice */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xOpenDeviceReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_OpenDevice */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 num_classes; + BYTE pad1, pad2, pad3; + CARD32 pad00 B32; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + } xOpenDeviceReply; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 event_type_base; + } xInputClassInfo; + +/********************************************************* + * + * CloseDevice. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_CloseDevice */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xCloseDeviceReq; + +/********************************************************* + * + * SetDeviceMode. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_SetDeviceMode */ + CARD16 length B16; + CARD8 deviceid; + CARD8 mode; + BYTE pad1, pad2; +} xSetDeviceModeReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_SetDeviceMode */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xSetDeviceModeReply; + +/********************************************************* + * + * SelectExtensionEvent. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_SelectExtensionEvent */ + CARD16 length B16; + Window window B32; + CARD16 count B16; + CARD16 pad00 B16; +} xSelectExtensionEventReq; + +/********************************************************* + * + * GetSelectedExtensionEvent. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_GetSelectedExtensionEvents */ + CARD16 length B16; + Window window B32; +} xGetSelectedExtensionEventsReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* GetSelectedExtensionEvents */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 this_client_count B16; + CARD16 all_clients_count B16; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xGetSelectedExtensionEventsReply; + +/********************************************************* + * + * ChangeDeviceDontPropagateList. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_ChangeDeviceDontPropagateList */ + CARD16 length B16; + Window window B32; + CARD16 count B16; + CARD8 mode; + BYTE pad; +} xChangeDeviceDontPropagateListReq; + +/********************************************************* + * + * GetDeviceDontPropagateList. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_GetDeviceDontPropagateList */ + CARD16 length B16; + Window window B32; +} xGetDeviceDontPropagateListReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* GetDeviceDontPropagateList */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 count B16; + CARD16 pad00 B16; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + } xGetDeviceDontPropagateListReply; + +/********************************************************* + * + * GetDeviceMotionEvents. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GetDeviceMotionEvents*/ + CARD16 length B16; + Time start B32; + Time stop B32; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xGetDeviceMotionEventsReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetDeviceMotionEvents */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 nEvents B32; + CARD8 axes; + CARD8 mode; + BYTE pad1, pad2; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; +} xGetDeviceMotionEventsReply; + +/********************************************************* + * + * ChangeKeyboardDevice. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_ChangeKeyboardDevice */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xChangeKeyboardDeviceReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_ChangeKeyboardDevice*/ + CARD16 sequenceNumber B16; + CARD32 length B32; /* 0 */ + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + } xChangeKeyboardDeviceReply; + +/********************************************************* + * + * ChangePointerDevice. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_ChangePointerDevice */ + CARD16 length B16; + CARD8 xaxis; + CARD8 yaxis; + CARD8 deviceid; + BYTE pad1; +} xChangePointerDeviceReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_ChangePointerDevice */ + CARD16 sequenceNumber B16; + CARD32 length B32; /* 0 */ + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + } xChangePointerDeviceReply; + +/********************************************************* + * + * GrabDevice. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GrabDevice */ + CARD16 length B16; + Window grabWindow B32; + Time time B32; + CARD16 event_count B16; + CARD8 this_device_mode; + CARD8 other_devices_mode; + BOOL ownerEvents; + CARD8 deviceid; + CARD16 pad01 B16; +} xGrabDeviceReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GrabDevice */ + CARD16 sequenceNumber B16; + CARD32 length B32; /* 0 */ + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + } xGrabDeviceReply; + +/********************************************************* + * + * UngrabDevice. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_UnGrabDevice */ + CARD16 length B16; + Time time B32; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xUngrabDeviceReq; + +/********************************************************* + * + * GrabDeviceKey. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GrabDeviceKey */ + CARD16 length B16; + Window grabWindow B32; + CARD16 event_count B16; + CARD16 modifiers B16; + CARD8 modifier_device; + CARD8 grabbed_device; + CARD8 key; + BYTE this_device_mode; + BYTE other_devices_mode; + BOOL ownerEvents; + BYTE pad1, pad2; +} xGrabDeviceKeyReq; + +/********************************************************* + * + * UngrabDeviceKey. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_UngrabDeviceKey */ + CARD16 length B16; + Window grabWindow B32; + CARD16 modifiers B16; + CARD8 modifier_device; + CARD8 key; + CARD8 grabbed_device; + BYTE pad1, pad2, pad3; +} xUngrabDeviceKeyReq; + +/********************************************************* + * + * GrabDeviceButton. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GrabDeviceButton */ + CARD16 length B16; + Window grabWindow B32; + CARD8 grabbed_device; + CARD8 modifier_device; + CARD16 event_count B16; + CARD16 modifiers B16; + BYTE this_device_mode; + BYTE other_devices_mode; + CARD8 button; + BOOL ownerEvents; + BYTE pad1, pad2; +} xGrabDeviceButtonReq; + +/********************************************************* + * + * UngrabDeviceButton. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_UngrabDeviceButton */ + CARD16 length B16; + Window grabWindow B32; + CARD16 modifiers B16; + CARD8 modifier_device; + CARD8 button; + CARD8 grabbed_device; + BYTE pad1, pad2, pad3; +} xUngrabDeviceButtonReq; + +/********************************************************* + * + * AllowDeviceEvents. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_AllowDeviceEvents */ + CARD16 length B16; + Time time B32; + CARD8 mode; + CARD8 deviceid; + BYTE pad1, pad2; +} xAllowDeviceEventsReq; + +/********************************************************* + * + * GetDeviceFocus. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GetDeviceFocus */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xGetDeviceFocusReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetDeviceFocus */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 focus B32; + Time time B32; + CARD8 revertTo; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + } xGetDeviceFocusReply; + +/********************************************************* + * + * SetDeviceFocus. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_SetDeviceFocus */ + CARD16 length B16; + Window focus B32; + Time time B32; + CARD8 revertTo; + CARD8 device; + CARD16 pad01 B16; +} xSetDeviceFocusReq; + +/********************************************************* + * + * GetFeedbackControl. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_GetFeedbackControl */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xGetFeedbackControlReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetFeedbackControl */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 num_feedbacks B16; + CARD16 pad01 B16; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + CARD32 pad06 B32; +} xGetFeedbackControlReply; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class */ +#else + CARD8 class; /* feedback class */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ +} xFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 id; + CARD16 length B16; + CARD16 pitch B16; + CARD16 duration B16; + CARD32 led_mask B32; + CARD32 led_values B32; + BOOL global_auto_repeat; + CARD8 click; + CARD8 percent; + BYTE pad; + BYTE auto_repeats[32]; +} xKbdFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 id; + CARD16 length B16; + CARD8 pad1,pad2; + CARD16 accelNum B16; + CARD16 accelDenom B16; + CARD16 threshold B16; +} xPtrFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; + CARD16 length B16; /* feedback length */ + CARD32 resolution B32; + INT32 min_value B32; + INT32 max_value B32; +} xIntegerFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; + CARD16 length B16; /* feedback length */ + CARD16 max_symbols B16; + CARD16 num_syms_supported B16; +} xStringFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; + CARD16 length B16; /* feedback length */ + CARD8 percent; + BYTE pad1, pad2, pad3; + CARD16 pitch B16; + CARD16 duration B16; +} xBellFeedbackState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; + CARD16 length B16; /* feedback length */ + CARD32 led_mask B32; + CARD32 led_values B32; +} xLedFeedbackState; + +/********************************************************* + * + * ChangeFeedbackControl. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_ChangeFeedbackControl */ + CARD16 length B16; + CARD32 mask B32; + CARD8 deviceid; + CARD8 feedbackid; + BYTE pad1, pad2; +} xChangeFeedbackControlReq; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ +} xFeedbackCtl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback length */ + CARD16 length B16; /* feedback length */ + KeyCode key; + CARD8 auto_repeat_mode; + INT8 click; + INT8 percent; + INT16 pitch B16; + INT16 duration B16; + CARD32 led_mask B32; + CARD32 led_values B32; +} xKbdFeedbackCtl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ + CARD8 pad1,pad2; + INT16 num B16; + INT16 denom B16; + INT16 thresh B16; +} xPtrFeedbackCtl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ + INT32 int_to_display B32; +} xIntegerFeedbackCtl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ + CARD8 pad1,pad2; + CARD16 num_keysyms B16; +} xStringFeedbackCtl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ + INT8 percent; + BYTE pad1, pad2, pad3; + INT16 pitch B16; + INT16 duration B16; +} xBellFeedbackCtl; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; /* feedback class id */ +#else + CARD8 class; /* feedback class id */ +#endif + CARD8 id; /* feedback id */ + CARD16 length B16; /* feedback length */ + CARD32 led_mask B32; + CARD32 led_values B32; +} xLedFeedbackCtl; + +/********************************************************* + * + * GetDeviceKeyMapping. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GetDeviceKeyMapping */ + CARD16 length B16; + CARD8 deviceid; + KeyCode firstKeyCode; + CARD8 count; + BYTE pad1; +} xGetDeviceKeyMappingReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetDeviceKeyMapping */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 keySymsPerKeyCode; + CARD8 pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGetDeviceKeyMappingReply; + +/********************************************************* + * + * ChangeDeviceKeyMapping. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_ChangeDeviceKeyMapping */ + CARD16 length B16; + CARD8 deviceid; + KeyCode firstKeyCode; + CARD8 keySymsPerKeyCode; + CARD8 keyCodes; +} xChangeDeviceKeyMappingReq; + +/********************************************************* + * + * GetDeviceModifierMapping. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GetDeviceModifierMapping */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xGetDeviceModifierMappingReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetDeviceModifierMapping */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 numKeyPerModifier; + CARD8 pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGetDeviceModifierMappingReply; + +/********************************************************* + * + * SetDeviceModifierMapping. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_SetDeviceModifierMapping */ + CARD16 length B16; + CARD8 deviceid; + CARD8 numKeyPerModifier; + CARD16 pad1 B16; +} xSetDeviceModifierMappingReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_SetDeviceModifierMapping */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 success; + CARD8 pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xSetDeviceModifierMappingReply; + +/********************************************************* + * + * GetDeviceButtonMapping. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_GetDeviceButtonMapping */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xGetDeviceButtonMappingReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetDeviceButtonMapping */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 nElts; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xGetDeviceButtonMappingReply; + +/********************************************************* + * + * SetDeviceButtonMapping. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* X_SetDeviceButtonMapping */ + CARD16 length B16; + CARD8 deviceid; + CARD8 map_length; + BYTE pad1, pad2; +} xSetDeviceButtonMappingReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_SetDeviceButtonMapping */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 status; + BYTE pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xSetDeviceButtonMappingReply; + +/********************************************************* + * + * QueryDeviceState. + * + */ + +typedef struct { + CARD8 reqType; + CARD8 ReqType; /* always X_QueryDeviceState */ + CARD16 length B16; + CARD8 deviceid; + BYTE pad1, pad2, pad3; +} xQueryDeviceStateReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_QueryDeviceState */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 num_classes; + BYTE pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xQueryDeviceStateReply; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + CARD8 num_keys; + BYTE pad1; + CARD8 keys[32]; +} xKeyState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + CARD8 num_buttons; + BYTE pad1; + CARD8 buttons[32]; +} xButtonState; + +typedef struct { +#if defined(__cplusplus) || defined(c_plusplus) + CARD8 c_class; +#else + CARD8 class; +#endif + CARD8 length; + CARD8 num_valuators; + CARD8 mode; +} xValuatorState; + +/********************************************************* + * + * SendExtensionEvent. + * THIS REQUEST MUST BE KEPT A MULTIPLE OF 8 BYTES IN LENGTH! + * MORE EVENTS MAY FOLLOW AND THEY MUST BE QUAD-ALIGNED! + * + */ + +typedef struct { + CARD8 reqType; + CARD8 ReqType; /* always X_SendExtensionEvent */ + CARD16 length B16; + Window destination B32; + CARD8 deviceid; + BOOL propagate; + CARD16 count B16; + CARD8 num_events; + BYTE pad1,pad2,pad3; +} xSendExtensionEventReq; + +/********************************************************* + * + * DeviceBell. + * + */ + +typedef struct { + CARD8 reqType; + CARD8 ReqType; /* always X_DeviceBell */ + CARD16 length B16; + CARD8 deviceid; + CARD8 feedbackid; + CARD8 feedbackclass; + INT8 percent; +} xDeviceBellReq; + +/********************************************************* + * + * SetDeviceValuators. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_SetDeviceValuators */ + CARD16 length B16; + CARD8 deviceid; + CARD8 first_valuator; + CARD8 num_valuators; + BYTE pad1; +} xSetDeviceValuatorsReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_SetDeviceValuators */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xSetDeviceValuatorsReply; + +/********************************************************* + * + * GetDeviceControl. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GetDeviceControl */ + CARD16 length B16; + CARD16 control B16; + CARD8 deviceid; + BYTE pad2; +} xGetDeviceControlReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GetDeviceControl */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xGetDeviceControlReply; + +typedef struct { + CARD16 control B16; /* control type */ + CARD16 length B16; /* control length */ +} xDeviceState; + +typedef struct { + CARD16 control B16; /* control type */ + CARD16 length B16; /* control length */ + CARD32 num_valuators B32; /* number of valuators */ +} xDeviceResolutionState; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + INT32 min_x B32; + INT32 max_x B32; + INT32 min_y B32; + INT32 max_y B32; + CARD32 flip_x B32; + CARD32 flip_y B32; + CARD32 rotation B32; + CARD32 button_threshold B32; +} xDeviceAbsCalibState; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD32 offset_x B32; + CARD32 offset_y B32; + CARD32 width B32; + CARD32 height B32; + CARD32 screen B32; + CARD32 following B32; +} xDeviceAbsAreaState; + +typedef struct { + CARD16 control B16; /* control type */ + CARD16 length B16; /* control length */ + CARD8 status; + CARD8 iscore; + CARD16 pad1 B16; +} xDeviceCoreState; + +typedef struct { + CARD16 control B16; /* control type */ + CARD16 length B16; /* control length */ + CARD8 enable; + CARD8 pad0; + CARD16 pad1 B16; +} xDeviceEnableState; + +/********************************************************* + * + * ChangeDeviceControl. + * + */ + +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_ChangeDeviceControl */ + CARD16 length B16; + CARD16 control B16; + CARD8 deviceid; + BYTE pad0; +} xChangeDeviceControlReq; + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_ChangeDeviceControl */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 status; + BYTE pad1, pad2, pad3; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; +} xChangeDeviceControlReply; + +typedef struct { + CARD16 control B16; /* control type */ + CARD16 length B16; /* control length */ +} xDeviceCtl; + +typedef struct { + CARD16 control B16; /* control type */ + CARD16 length B16; /* control length */ + CARD8 first_valuator; /* first valuator to change */ + CARD8 num_valuators; /* number of valuators to change*/ + CARD8 pad1,pad2; +} xDeviceResolutionCtl; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + INT32 min_x; + INT32 max_x; + INT32 min_y; + INT32 max_y; + CARD32 flip_x; + CARD32 flip_y; + CARD32 rotation; + CARD32 button_threshold; +} xDeviceAbsCalibCtl; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD32 offset_x; + CARD32 offset_y; + INT32 width; + INT32 height; + INT32 screen; + CARD32 following; +} xDeviceAbsAreaCtl; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD8 status; + CARD8 pad0; + CARD16 pad1 B16; +} xDeviceCoreCtl; + +typedef struct { + CARD16 control B16; + CARD16 length B16; + CARD8 enable; + CARD8 pad0; + CARD16 pad1 B16; +} xDeviceEnableCtl; + +/********************************************************** + * + * Input extension events. + * + * DeviceValuator + * + */ + +typedef struct + { + BYTE type; + CARD8 deviceid; + CARD16 sequenceNumber B16; + KeyButMask device_state B16; + CARD8 num_valuators; + CARD8 first_valuator; + INT32 valuator0 B32; + INT32 valuator1 B32; + INT32 valuator2 B32; + INT32 valuator3 B32; + INT32 valuator4 B32; + INT32 valuator5 B32; + } deviceValuator; + +/********************************************************** + * + * DeviceKeyButtonPointer. + * + * Used for: DeviceKeyPress, DeviceKeyRelease, + * DeviceButtonPress, DeviceButtonRelease, + * ProximityIn, ProximityOut + * DeviceMotionNotify, + * + */ + +typedef struct + { + BYTE type; + BYTE detail; + CARD16 sequenceNumber B16; + Time time B32; + Window root B32; + Window event B32; + Window child B32; + INT16 root_x B16; + INT16 root_y B16; + INT16 event_x B16; + INT16 event_y B16; + KeyButMask state B16; + BOOL same_screen; + CARD8 deviceid; + } deviceKeyButtonPointer; + +/********************************************************** + * + * DeviceFocus. + * + */ + +typedef struct + { + BYTE type; + BYTE detail; + CARD16 sequenceNumber B16; + Time time B32; + Window window B32; + BYTE mode; + CARD8 deviceid; + BYTE pad1, pad2; + CARD32 pad00 B32; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + } deviceFocus; + +/********************************************************** + * + * DeviceStateNotify. + * + * Note that the two high-order bits in the classes_reported + * field are the proximity state (InProximity or OutOfProximity), + * and the device mode (Absolute or Relative), respectively. + * + */ + +typedef struct + { + BYTE type; + BYTE deviceid; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 num_keys; + CARD8 num_buttons; + CARD8 num_valuators; + CARD8 classes_reported; + CARD8 buttons[4]; + CARD8 keys[4]; + INT32 valuator0 B32; + INT32 valuator1 B32; + INT32 valuator2 B32; + } deviceStateNotify; + +/********************************************************** + * + * DeviceKeyStateNotify. + * + */ + +typedef struct + { + BYTE type; + BYTE deviceid; + CARD16 sequenceNumber B16; + CARD8 keys[28]; + } deviceKeyStateNotify; + +/********************************************************** + * + * DeviceButtonStateNotify. + * + */ + +typedef struct + { + BYTE type; + BYTE deviceid; + CARD16 sequenceNumber B16; + CARD8 buttons[28]; + } deviceButtonStateNotify; + +/********************************************************** + * + * DeviceMappingNotify. + * Fields must be kept in sync with core mappingnotify event. + * + */ + +typedef struct + { + BYTE type; + BYTE deviceid; + CARD16 sequenceNumber B16; + CARD8 request; + KeyCode firstKeyCode; + CARD8 count; + BYTE pad1; + Time time B32; + CARD32 pad00 B32; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + } deviceMappingNotify; + +/********************************************************** + * + * ChangeDeviceNotify. + * + */ + +typedef struct + { + BYTE type; + BYTE deviceid; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 request; + BYTE pad1, pad2, pad3; + CARD32 pad00 B32; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + } changeDeviceNotify; + +/********************************************************** + * + * devicePresenceNotify. + * + */ + +typedef struct + { + BYTE type; + BYTE pad00; + CARD16 sequenceNumber B16; + Time time B32; + BYTE devchange; /* Device{Added|Removed|Enabled|Disabled|ControlChanged} */ + BYTE deviceid; + CARD16 control B16; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + CARD32 pad06 B32; + } devicePresenceNotify; + +#undef Window +#undef Time +#undef KeyCode + +#endif diff --git a/X11/extensions/XKB.h b/X11/extensions/XKB.h new file mode 100644 index 000000000..a91531719 --- /dev/null +++ b/X11/extensions/XKB.h @@ -0,0 +1,788 @@ +/* $Xorg: XKB.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. + +********************************************************/ +/* $XFree86: xc/include/extensions/XKB.h,v 1.5tsi Exp $ */ + +#ifndef _XKB_H_ +#define _XKB_H_ + + /* + * XKB request codes, used in: + * - xkbReqType field of all requests + * - requestMinor field of some events + */ +#define X_kbUseExtension 0 +#define X_kbSelectEvents 1 +#define X_kbBell 3 +#define X_kbGetState 4 +#define X_kbLatchLockState 5 +#define X_kbGetControls 6 +#define X_kbSetControls 7 +#define X_kbGetMap 8 +#define X_kbSetMap 9 +#define X_kbGetCompatMap 10 +#define X_kbSetCompatMap 11 +#define X_kbGetIndicatorState 12 +#define X_kbGetIndicatorMap 13 +#define X_kbSetIndicatorMap 14 +#define X_kbGetNamedIndicator 15 +#define X_kbSetNamedIndicator 16 +#define X_kbGetNames 17 +#define X_kbSetNames 18 +#define X_kbGetGeometry 19 +#define X_kbSetGeometry 20 +#define X_kbPerClientFlags 21 +#define X_kbListComponents 22 +#define X_kbGetKbdByName 23 +#define X_kbGetDeviceInfo 24 +#define X_kbSetDeviceInfo 25 +#define X_kbSetDebuggingFlags 101 + + /* + * In the X sense, XKB reports only one event. + * The type field of all XKB events is XkbEventCode + */ +#define XkbEventCode 0 +#define XkbNumberEvents (XkbEventCode+1) + + /* + * XKB has a minor event code so it can use one X event code for + * multiple purposes. + * - reported in the xkbType field of all XKB events. + * - XkbSelectEventDetails: Indicates the event for which event details + * are being changed + */ +#define XkbNewKeyboardNotify 0 +#define XkbMapNotify 1 +#define XkbStateNotify 2 +#define XkbControlsNotify 3 +#define XkbIndicatorStateNotify 4 +#define XkbIndicatorMapNotify 5 +#define XkbNamesNotify 6 +#define XkbCompatMapNotify 7 +#define XkbBellNotify 8 +#define XkbActionMessage 9 +#define XkbAccessXNotify 10 +#define XkbExtensionDeviceNotify 11 + + /* + * Event Mask: + * - XkbSelectEvents: Specifies event interest. + */ +#define XkbNewKeyboardNotifyMask (1L << 0) +#define XkbMapNotifyMask (1L << 1) +#define XkbStateNotifyMask (1L << 2) +#define XkbControlsNotifyMask (1L << 3) +#define XkbIndicatorStateNotifyMask (1L << 4) +#define XkbIndicatorMapNotifyMask (1L << 5) +#define XkbNamesNotifyMask (1L << 6) +#define XkbCompatMapNotifyMask (1L << 7) +#define XkbBellNotifyMask (1L << 8) +#define XkbActionMessageMask (1L << 9) +#define XkbAccessXNotifyMask (1L << 10) +#define XkbExtensionDeviceNotifyMask (1L << 11) +#define XkbAllEventsMask (0xFFF) + + /* + * NewKeyboardNotify event details: + */ +#define XkbNKN_KeycodesMask (1L << 0) +#define XkbNKN_GeometryMask (1L << 1) +#define XkbNKN_DeviceIDMask (1L << 2) +#define XkbAllNewKeyboardEventsMask (0x7) + + /* + * AccessXNotify event types: + * - The 'what' field of AccessXNotify events reports the + * reason that the event was generated. + */ +#define XkbAXN_SKPress 0 +#define XkbAXN_SKAccept 1 +#define XkbAXN_SKReject 2 +#define XkbAXN_SKRelease 3 +#define XkbAXN_BKAccept 4 +#define XkbAXN_BKReject 5 +#define XkbAXN_AXKWarning 6 + + /* + * AccessXNotify details: + * - Used as an event detail mask to limit the conditions under which + * AccessXNotify events are reported + */ +#define XkbAXN_SKPressMask (1L << 0) +#define XkbAXN_SKAcceptMask (1L << 1) +#define XkbAXN_SKRejectMask (1L << 2) +#define XkbAXN_SKReleaseMask (1L << 3) +#define XkbAXN_BKAcceptMask (1L << 4) +#define XkbAXN_BKRejectMask (1L << 5) +#define XkbAXN_AXKWarningMask (1L << 6) +#define XkbAllAccessXEventsMask (0xf) + + /* + * Miscellaneous event details: + * - event detail masks for assorted events that don't reall + * have any details. + */ +#define XkbAllStateEventsMask XkbAllStateComponentsMask +#define XkbAllMapEventsMask XkbAllMapComponentsMask +#define XkbAllControlEventsMask XkbAllControlsMask +#define XkbAllIndicatorEventsMask XkbAllIndicatorsMask +#define XkbAllNameEventsMask XkbAllNamesMask +#define XkbAllCompatMapEventsMask XkbAllCompatMask +#define XkbAllBellEventsMask (1L << 0) +#define XkbAllActionMessagesMask (1L << 0) + + /* + * XKB reports one error: BadKeyboard + * A further reason for the error is encoded into to most significant + * byte of the resourceID for the error: + * XkbErr_BadDevice - the device in question was not found + * XkbErr_BadClass - the device was found but it doesn't belong to + * the appropriate class. + * XkbErr_BadId - the device was found and belongs to the right + * class, but not feedback with a matching id was + * found. + * The low byte of the resourceID for this error contains the device + * id, class specifier or feedback id that failed. + */ +#define XkbKeyboard 0 +#define XkbNumberErrors 1 + +#define XkbErr_BadDevice 0xff +#define XkbErr_BadClass 0xfe +#define XkbErr_BadId 0xfd + + /* + * Keyboard Components Mask: + * - Specifies the components that follow a GetKeyboardByNameReply + */ +#define XkbClientMapMask (1L << 0) +#define XkbServerMapMask (1L << 1) +#define XkbCompatMapMask (1L << 2) +#define XkbIndicatorMapMask (1L << 3) +#define XkbNamesMask (1L << 4) +#define XkbGeometryMask (1L << 5) +#define XkbControlsMask (1L << 6) +#define XkbAllComponentsMask (0x7f) + + /* + * State detail mask: + * - The 'changed' field of StateNotify events reports which of + * the keyboard state components have changed. + * - Used as an event detail mask to limit the conditions under + * which StateNotify events are reported. + */ +#define XkbModifierStateMask (1L << 0) +#define XkbModifierBaseMask (1L << 1) +#define XkbModifierLatchMask (1L << 2) +#define XkbModifierLockMask (1L << 3) +#define XkbGroupStateMask (1L << 4) +#define XkbGroupBaseMask (1L << 5) +#define XkbGroupLatchMask (1L << 6) +#define XkbGroupLockMask (1L << 7) +#define XkbCompatStateMask (1L << 8) +#define XkbGrabModsMask (1L << 9) +#define XkbCompatGrabModsMask (1L << 10) +#define XkbLookupModsMask (1L << 11) +#define XkbCompatLookupModsMask (1L << 12) +#define XkbPointerButtonMask (1L << 13) +#define XkbAllStateComponentsMask (0x3fff) + + /* + * Controls detail masks: + * The controls specified in XkbAllControlsMask: + * - The 'changed' field of ControlsNotify events reports which of + * the keyboard controls have changed. + * - The 'changeControls' field of the SetControls request specifies + * the controls for which values are to be changed. + * - Used as an event detail mask to limit the conditions under + * which ControlsNotify events are reported. + * + * The controls specified in the XkbAllBooleanCtrlsMask: + * - The 'enabledControls' field of ControlsNotify events reports the + * current status of the boolean controls. + * - The 'enabledControlsChanges' field of ControlsNotify events reports + * any boolean controls that have been turned on or off. + * - The 'affectEnabledControls' and 'enabledControls' fields of the + * kbSetControls request change the set of enabled controls. + * - The 'accessXTimeoutMask' and 'accessXTimeoutValues' fields of + * an XkbControlsRec specify the controls to be changed if the keyboard + * times out and the values to which they should be changed. + * - The 'autoCtrls' and 'autoCtrlsValues' fields of the PerClientFlags + * request specifies the specify the controls to be reset when the + * client exits and the values to which they should be reset. + * - The 'ctrls' field of an indicator map specifies the controls + * that drive the indicator. + * - Specifies the boolean controls affected by the SetControls and + * LockControls key actions. + */ +#define XkbRepeatKeysMask (1L << 0) +#define XkbSlowKeysMask (1L << 1) +#define XkbBounceKeysMask (1L << 2) +#define XkbStickyKeysMask (1L << 3) +#define XkbMouseKeysMask (1L << 4) +#define XkbMouseKeysAccelMask (1L << 5) +#define XkbAccessXKeysMask (1L << 6) +#define XkbAccessXTimeoutMask (1L << 7) +#define XkbAccessXFeedbackMask (1L << 8) +#define XkbAudibleBellMask (1L << 9) +#define XkbOverlay1Mask (1L << 10) +#define XkbOverlay2Mask (1L << 11) +#define XkbIgnoreGroupLockMask (1L << 12) +#define XkbGroupsWrapMask (1L << 27) +#define XkbInternalModsMask (1L << 28) +#define XkbIgnoreLockModsMask (1L << 29) +#define XkbPerKeyRepeatMask (1L << 30) +#define XkbControlsEnabledMask (1L << 31) + +#define XkbAccessXOptionsMask (XkbStickyKeysMask|XkbAccessXFeedbackMask) + +#define XkbAllBooleanCtrlsMask (0x00001FFF) +#define XkbAllControlsMask (0xF8001FFF) +#define XkbAllControlEventsMask XkbAllControlsMask + + /* + * AccessX Options Mask + * - The 'accessXOptions' field of an XkbControlsRec specifies the + * AccessX options that are currently in effect. + * - The 'accessXTimeoutOptionsMask' and 'accessXTimeoutOptionsValues' + * fields of an XkbControlsRec specify the Access X options to be + * changed if the keyboard times out and the values to which they + * should be changed. + */ +#define XkbAX_SKPressFBMask (1L << 0) +#define XkbAX_SKAcceptFBMask (1L << 1) +#define XkbAX_FeatureFBMask (1L << 2) +#define XkbAX_SlowWarnFBMask (1L << 3) +#define XkbAX_IndicatorFBMask (1L << 4) +#define XkbAX_StickyKeysFBMask (1L << 5) +#define XkbAX_TwoKeysMask (1L << 6) +#define XkbAX_LatchToLockMask (1L << 7) +#define XkbAX_SKReleaseFBMask (1L << 8) +#define XkbAX_SKRejectFBMask (1L << 9) +#define XkbAX_BKRejectFBMask (1L << 10) +#define XkbAX_DumbBellFBMask (1L << 11) +#define XkbAX_FBOptionsMask (0xF3F) +#define XkbAX_SKOptionsMask (0x0C0) +#define XkbAX_AllOptionsMask (0xFFF) + + /* + * XkbUseCoreKbd is used to specify the core keyboard without having + * to look up its X input extension identifier. + * XkbUseCorePtr is used to specify the core pointer without having + * to look up its X input extension identifier. + * XkbDfltXIClass is used to specify "don't care" any place that the + * XKB protocol is looking for an X Input Extension + * device class. + * XkbDfltXIId is used to specify "don't care" any place that the + * XKB protocol is looking for an X Input Extension + * feedback identifier. + * XkbAllXIClasses is used to get information about all device indicators, + * whether they're part of the indicator feedback class + * or the keyboard feedback class. + * XkbAllXIIds is used to get information about all device indicator + * feedbacks without having to list them. + * XkbXINone is used to indicate that no class or id has been specified. + * XkbLegalXILedClass(c) True if 'c' specifies a legal class with LEDs + * XkbLegalXIBellClass(c) True if 'c' specifies a legal class with bells + * XkbExplicitXIDevice(d) True if 'd' explicitly specifies a device + * XkbExplicitXIClass(c) True if 'c' explicitly specifies a device class + * XkbExplicitXIId(c) True if 'i' explicitly specifies a device id + * XkbSingleXIClass(c) True if 'c' specifies exactly one device class, + * including the default. + * XkbSingleXIId(i) True if 'i' specifies exactly one device + * identifier, including the default. + */ +#define XkbUseCoreKbd 0x0100 +#define XkbUseCorePtr 0x0200 +#define XkbDfltXIClass 0x0300 +#define XkbDfltXIId 0x0400 +#define XkbAllXIClasses 0x0500 +#define XkbAllXIIds 0x0600 +#define XkbXINone 0xff00 + +#define XkbLegalXILedClass(c) (((c)==KbdFeedbackClass)||\ + ((c)==LedFeedbackClass)||\ + ((c)==XkbDfltXIClass)||\ + ((c)==XkbAllXIClasses)) +#define XkbLegalXIBellClass(c) (((c)==KbdFeedbackClass)||\ + ((c)==BellFeedbackClass)||\ + ((c)==XkbDfltXIClass)||\ + ((c)==XkbAllXIClasses)) +#define XkbExplicitXIDevice(c) (((c)&(~0xff))==0) +#define XkbExplicitXIClass(c) (((c)&(~0xff))==0) +#define XkbExplicitXIId(c) (((c)&(~0xff))==0) +#define XkbSingleXIClass(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIClass)) +#define XkbSingleXIId(c) ((((c)&(~0xff))==0)||((c)==XkbDfltXIId)) + +#define XkbNoModifier 0xff +#define XkbNoShiftLevel 0xff +#define XkbNoShape 0xff +#define XkbNoIndicator 0xff + +#define XkbNoModifierMask 0 +#define XkbAllModifiersMask 0xff +#define XkbAllVirtualModsMask 0xffff + +#define XkbNumKbdGroups 4 +#define XkbMaxKbdGroup (XkbNumKbdGroups-1) + +#define XkbMaxMouseKeysBtn 4 + + /* + * Group Index and Mask: + * - Indices into the kt_index array of a key type. + * - Mask specifies types to be changed for XkbChangeTypesOfKey + */ +#define XkbGroup1Index 0 +#define XkbGroup2Index 1 +#define XkbGroup3Index 2 +#define XkbGroup4Index 3 +#define XkbAnyGroup 254 +#define XkbAllGroups 255 + +#define XkbGroup1Mask (1<<0) +#define XkbGroup2Mask (1<<1) +#define XkbGroup3Mask (1<<2) +#define XkbGroup4Mask (1<<3) +#define XkbAnyGroupMask (1<<7) +#define XkbAllGroupsMask (0xf) + + /* + * BuildCoreState: Given a keyboard group and a modifier state, + * construct the value to be reported an event. + * GroupForCoreState: Given the state reported in an event, + * determine the keyboard group. + * IsLegalGroup: Returns TRUE if 'g' is a valid group index. + */ +#define XkbBuildCoreState(m,g) ((((g)&0x3)<<13)|((m)&0xff)) +#define XkbGroupForCoreState(s) (((s)>>13)&0x3) +#define XkbIsLegalGroup(g) (((g)>=0)&&((g)type>=Xkb_SASetMods)&&((a)->type<=XkbSA_LockMods)) +#define XkbIsGroupAction(a) (((a)->type>=XkbSA_SetGroup)&&((a)->type<=XkbSA_LockGroup)) +#define XkbIsPtrAction(a) (((a)->type>=XkbSA_MovePtr)&&((a)->type<=XkbSA_SetPtrDflt)) + + + /* + * Key Behavior Qualifier: + * KB_Permanent indicates that the behavior describes an unalterable + * characteristic of the keyboard, not an XKB software-simulation of + * the listed behavior. + * Key Behavior Types: + * Specifies the behavior of the underlying key. + */ +#define XkbKB_Permanent 0x80 +#define XkbKB_OpMask 0x7f + +#define XkbKB_Default 0x00 +#define XkbKB_Lock 0x01 +#define XkbKB_RadioGroup 0x02 +#define XkbKB_Overlay1 0x03 +#define XkbKB_Overlay2 0x04 + +#define XkbKB_RGAllowNone 0x80 + + /* + * Various macros which describe the range of legal keycodes. + */ +#define XkbMinLegalKeyCode 8 +#define XkbMaxLegalKeyCode 255 +#define XkbMaxKeyCount (XkbMaxLegalKeyCode-XkbMinLegalKeyCode+1) +#define XkbPerKeyBitArraySize ((XkbMaxLegalKeyCode+1)/8) +/* Seems kinda silly to check that an unsigned char is <= 255... */ +#define XkbIsLegalKeycode(k) ((k)>=XkbMinLegalKeyCode) + + /* + * Assorted constants and limits. + */ +#define XkbNumModifiers 8 +#define XkbNumVirtualMods 16 +#define XkbNumIndicators 32 +#define XkbAllIndicatorsMask (0xffffffff) +#define XkbMaxRadioGroups 32 +#define XkbAllRadioGroupsMask (0xffffffff) +#define XkbMaxShiftLevel 63 +#define XkbMaxSymsPerKey (XkbMaxShiftLevel*XkbNumKbdGroups) +#define XkbRGMaxMembers 12 +#define XkbActionMessageLength 6 +#define XkbKeyNameLength 4 +#define XkbMaxRedirectCount 8 + +#define XkbGeomPtsPerMM 10 +#define XkbGeomMaxColors 32 +#define XkbGeomMaxLabelColors 3 +#define XkbGeomMaxPriority 255 + + /* + * Key Type index and mask for the four standard key types. + */ +#define XkbOneLevelIndex 0 +#define XkbTwoLevelIndex 1 +#define XkbAlphabeticIndex 2 +#define XkbKeypadIndex 3 +#define XkbLastRequiredType XkbKeypadIndex +#define XkbNumRequiredTypes (XkbLastRequiredType+1) +#define XkbMaxKeyTypes 255 + +#define XkbOneLevelMask (1<<0) +#define XkbTwoLevelMask (1<<1) +#define XkbAlphabeticMask (1<<2) +#define XkbKeypadMask (1<<3) +#define XkbAllRequiredTypes (0xf) + +#define XkbShiftLevel(n) ((n)-1) +#define XkbShiftLevelMask(n) (1<<((n)-1)) + + /* + * Extension name and version information + */ +#define XkbName "XKEYBOARD" +#define XkbMajorVersion 1 +#define XkbMinorVersion 0 + + /* + * Explicit map components: + * - Used in the 'explicit' field of an XkbServerMap. Specifies + * the keyboard components that should _not_ be updated automatically + * in response to core protocol keyboard mapping requests. + */ +#define XkbExplicitKeyTypesMask (0x0f) +#define XkbExplicitKeyType1Mask (1<<0) +#define XkbExplicitKeyType2Mask (1<<1) +#define XkbExplicitKeyType3Mask (1<<2) +#define XkbExplicitKeyType4Mask (1<<3) +#define XkbExplicitInterpretMask (1<<4) +#define XkbExplicitAutoRepeatMask (1<<5) +#define XkbExplicitBehaviorMask (1<<6) +#define XkbExplicitVModMapMask (1<<7) +#define XkbAllExplicitMask (0xff) + + /* + * Map components masks: + * Those in AllMapComponentsMask: + * - Specifies the individual fields to be loaded or changed for the + * GetMap and SetMap requests. + * Those in ClientInfoMask: + * - Specifies the components to be allocated by XkbAllocClientMap. + * Those in ServerInfoMask: + * - Specifies the components to be allocated by XkbAllocServerMap. + */ +#define XkbKeyTypesMask (1<<0) +#define XkbKeySymsMask (1<<1) +#define XkbModifierMapMask (1<<2) +#define XkbExplicitComponentsMask (1<<3) +#define XkbKeyActionsMask (1<<4) +#define XkbKeyBehaviorsMask (1<<5) +#define XkbVirtualModsMask (1<<6) +#define XkbVirtualModMapMask (1<<7) + +#define XkbAllClientInfoMask (XkbKeyTypesMask|XkbKeySymsMask|XkbModifierMapMask) +#define XkbAllServerInfoMask (XkbExplicitComponentsMask|XkbKeyActionsMask|XkbKeyBehaviorsMask|XkbVirtualModsMask|XkbVirtualModMapMask) +#define XkbAllMapComponentsMask (XkbAllClientInfoMask|XkbAllServerInfoMask) + + /* + * Symbol interpretations flags: + * - Used in the flags field of a symbol interpretation + */ +#define XkbSI_AutoRepeat (1<<0) +#define XkbSI_LockingKey (1<<1) + + /* + * Symbol interpretations match specification: + * - Used in the match field of a symbol interpretation to specify + * the conditions under which an interpretation is used. + */ +#define XkbSI_LevelOneOnly (0x80) +#define XkbSI_OpMask (0x7f) +#define XkbSI_NoneOf (0) +#define XkbSI_AnyOfOrNone (1) +#define XkbSI_AnyOf (2) +#define XkbSI_AllOf (3) +#define XkbSI_Exactly (4) + + /* + * Indicator map flags: + * - Used in the flags field of an indicator map to indicate the + * conditions under which and indicator can be changed and the + * effects of changing the indicator. + */ +#define XkbIM_NoExplicit (1L << 7) +#define XkbIM_NoAutomatic (1L << 6) +#define XkbIM_LEDDrivesKB (1L << 5) + + /* + * Indicator map component specifications: + * - Used by the 'which_groups' and 'which_mods' fields of an indicator + * map to specify which keyboard components should be used to drive + * the indicator. + */ +#define XkbIM_UseBase (1L << 0) +#define XkbIM_UseLatched (1L << 1) +#define XkbIM_UseLocked (1L << 2) +#define XkbIM_UseEffective (1L << 3) +#define XkbIM_UseCompat (1L << 4) + +#define XkbIM_UseNone 0 +#define XkbIM_UseAnyGroup (XkbIM_UseBase|XkbIM_UseLatched|XkbIM_UseLocked\ + |XkbIM_UseEffective) +#define XkbIM_UseAnyMods (XkbIM_UseAnyGroup|XkbIM_UseCompat) + + /* + * Compatibility Map Compontents: + * - Specifies the components to be allocated in XkbAllocCompatMap. + */ +#define XkbSymInterpMask (1<<0) +#define XkbGroupCompatMask (1<<1) +#define XkbAllCompatMask (0x3) + + /* + * Names component mask: + * - Specifies the names to be loaded or changed for the GetNames and + * SetNames requests. + * - Specifies the names that have changed in a NamesNotify event. + * - Specifies the names components to be allocated by XkbAllocNames. + */ +#define XkbKeycodesNameMask (1<<0) +#define XkbGeometryNameMask (1<<1) +#define XkbSymbolsNameMask (1<<2) +#define XkbPhysSymbolsNameMask (1<<3) +#define XkbTypesNameMask (1<<4) +#define XkbCompatNameMask (1<<5) +#define XkbKeyTypeNamesMask (1<<6) +#define XkbKTLevelNamesMask (1<<7) +#define XkbIndicatorNamesMask (1<<8) +#define XkbKeyNamesMask (1<<9) +#define XkbKeyAliasesMask (1<<10) +#define XkbVirtualModNamesMask (1<<11) +#define XkbGroupNamesMask (1<<12) +#define XkbRGNamesMask (1<<13) +#define XkbComponentNamesMask (0x3f) +#define XkbAllNamesMask (0x3fff) + + /* + * GetByName components: + * - Specifies desired or necessary components to GetKbdByName request. + * - Reports the components that were found in a GetKbdByNameReply + */ +#define XkbGBN_TypesMask (1L << 0) +#define XkbGBN_CompatMapMask (1L << 1) +#define XkbGBN_ClientSymbolsMask (1L << 2) +#define XkbGBN_ServerSymbolsMask (1L << 3) +#define XkbGBN_SymbolsMask (XkbGBN_ClientSymbolsMask|XkbGBN_ServerSymbolsMask) +#define XkbGBN_IndicatorMapMask (1L << 4) +#define XkbGBN_KeyNamesMask (1L << 5) +#define XkbGBN_GeometryMask (1L << 6) +#define XkbGBN_OtherNamesMask (1L << 7) +#define XkbGBN_AllComponentsMask (0xff) + + /* + * ListComponents flags + */ +#define XkbLC_Hidden (1L << 0) +#define XkbLC_Default (1L << 1) +#define XkbLC_Partial (1L << 2) + +#define XkbLC_AlphanumericKeys (1L << 8) +#define XkbLC_ModifierKeys (1L << 9) +#define XkbLC_KeypadKeys (1L << 10) +#define XkbLC_FunctionKeys (1L << 11) +#define XkbLC_AlternateGroup (1L << 12) + + /* + * X Input Extension Interactions + * - Specifies the possible interactions between XKB and the X input + * extension + * - Used to request (XkbGetDeviceInfo) or change (XKbSetDeviceInfo) + * XKB information about an extension device. + * - Reports the list of supported optional features in the reply to + * XkbGetDeviceInfo or in an XkbExtensionDeviceNotify event. + * XkbXI_UnsupportedFeature is reported in XkbExtensionDeviceNotify + * events to indicate an attempt to use an unsupported feature. + */ +#define XkbXI_KeyboardsMask (1L << 0) +#define XkbXI_ButtonActionsMask (1L << 1) +#define XkbXI_IndicatorNamesMask (1L << 2) +#define XkbXI_IndicatorMapsMask (1L << 3) +#define XkbXI_IndicatorStateMask (1L << 4) +#define XkbXI_UnsupportedFeatureMask (1L << 15) +#define XkbXI_AllFeaturesMask (0x001f) +#define XkbXI_AllDeviceFeaturesMask (0x001e) + +#define XkbXI_IndicatorsMask (0x001c) +#define XkbAllExtensionDeviceEventsMask (0x801f) + + /* + * Per-Client Flags: + * - Specifies flags to be changed by the PerClientFlags request. + */ +#define XkbPCF_DetectableAutoRepeatMask (1L << 0) +#define XkbPCF_GrabsUseXKBStateMask (1L << 1) +#define XkbPCF_AutoResetControlsMask (1L << 2) +#define XkbPCF_LookupStateWhenGrabbed (1L << 3) +#define XkbPCF_SendEventUsesXKBState (1L << 4) +#define XkbPCF_AllFlagsMask (0x1F) + + /* + * Debugging flags and controls + */ +#define XkbDF_DisableLocks (1<<0) + +#endif /* _XKB_H_ */ diff --git a/X11/extensions/XKBbells.h b/X11/extensions/XKBbells.h new file mode 100644 index 000000000..16a9275ea --- /dev/null +++ b/X11/extensions/XKBbells.h @@ -0,0 +1,143 @@ +#ifndef _XKBBELLS_H_ +#define _XKBBELLS_H_ 1 + +/* $Xorg: XKBbells.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, 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 Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS 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. + + ********************************************************/ +/* $XFree86$ */ + +#define XkbBN_Info "Info" +#define XkbBN_Warning "Warning" +#define XkbBN_MinorError "MinorError" +#define XkbBN_MajorError "MajorError" +#define XkbBN_BadValue "BadValue" +#define XkbBN_InvalidLocation "InvalidLocation" +#define XkbBN_Question "Question" +#define XkbBN_Start "Start" +#define XkbBN_End "End" +#define XkbBN_Success "Success" +#define XkbBN_Failure "Failure" +#define XkbBN_Wait "Wait" +#define XkbBN_Proceed "Proceed" +#define XkbBN_Ignore "Ignore" +#define XkbBN_Iconify "Iconify" +#define XkbBN_Deiconify "Deconify" +#define XkbBN_Open "Open" +#define XkbBN_Close "Close" +#define XkbBN_TerminalBell "TerminalBell" +#define XkbBN_MarginBell "MarginBell" +#define XkbBN_CursorStuck "CursorStuck" +#define XkbBN_NewMail "NewMail" +#define XkbBN_LaunchApp "LaunchApp" +#define XkbBN_AppDeath "AppDeath" +#define XkbBN_ImAlive "ImAlive" +#define XkbBN_ClockChimeHour "ClockChimeHour" +#define XkbBN_ClockChimeHalf "ClockChimeHalf" +#define XkbBN_ClockChimeQuarter "ClockChimeQuarter" +#define XkbBN_RepeatingLastBell "RepeatingLastBell" +#define XkbBN_ComposeFail "ComposeFail" +#define XkbBN_AX_FeatureOn "AX_FeatureOn" +#define XkbBN_AX_FeatureOff "AX_FeatureOff" +#define XkbBN_AX_FeatureChange "AX_FeatureChange" +#define XkbBN_AX_IndicatorOn "AX_IndicatorOn" +#define XkbBN_AX_IndicatorOff "AX_IndicatorOff" +#define XkbBN_AX_IndicatorChange "AX_IndicatorChange" +#define XkbBN_AX_SlowKeysWarning "AX_SlowKeysWarning" +#define XkbBN_AX_SlowKeyPress "AX_SlowKeyPress" +#define XkbBN_AX_SlowKeyAccept "AX_SlowKeyAccept" +#define XkbBN_AX_SlowKeyReject "AX_SlowKeyReject" +#define XkbBN_AX_SlowKeyRelease "AX_SlowKeyRelease" +#define XkbBN_AX_BounceKeyReject "AX_BounceKeyReject" +#define XkbBN_AX_StickyLatch "AX_StickyLatch" +#define XkbBN_AX_StickyLock "AX_StickyLock" +#define XkbBN_AX_StickyUnlock "AX_StickyUnlock" + +#define XkbBI_Info 0 +#define XkbBI_Warning 1 +#define XkbBI_MinorError 2 +#define XkbBI_MajorError 3 +#define XkbBI_BadValue 4 +#define XkbBI_InvalidLocation 5 +#define XkbBI_Question 6 +#define XkbBI_Start 7 +#define XkbBI_End 8 +#define XkbBI_Success 9 +#define XkbBI_Failure 10 +#define XkbBI_Wait 11 +#define XkbBI_Proceed 12 +#define XkbBI_Ignore 13 +#define XkbBI_Iconify 14 +#define XkbBI_Deiconify 15 +#define XkbBI_Open 16 +#define XkbBI_Close 17 +#define XkbBI_TerminalBell 18 +#define XkbBI_MarginBell 19 +#define XkbBI_CursorStuck 20 +#define XkbBI_NewMail 21 +#define XkbBI_LaunchApp 22 +#define XkbBI_AppDeath 23 +#define XkbBI_ImAlive 24 +#define XkbBI_ClockChimeHour 25 +#define XkbBI_ClockChimeHalf 26 +#define XkbBI_ClockChimeQuarter 27 +#define XkbBI_RepeatingLastBell 28 +#define XkbBI_ComposeFail 29 +#define XkbBI_AX_FeatureOn 30 +#define XkbBI_AX_FeatureOff 31 +#define XkbBI_AX_FeatureChange 32 +#define XkbBI_AX_IndicatorOn 33 +#define XkbBI_AX_IndicatorOff 34 +#define XkbBI_AX_IndicatorChange 35 +#define XkbBI_AX_SlowKeysWarning 36 +#define XkbBI_AX_SlowKeyPress 37 +#define XkbBI_AX_SlowKeyAccept 38 +#define XkbBI_AX_SlowKeyReject 39 +#define XkbBI_AX_SlowKeyRelease 40 +#define XkbBI_AX_BounceKeyReject 41 +#define XkbBI_AX_StickyLatch 42 +#define XkbBI_AX_StickyLock 43 +#define XkbBI_AX_StickyUnlock 44 +#define XkbBI_NumBells 45 + +_XFUNCPROTOBEGIN + +extern Bool XkbStdBell( + Display * /* dpy */, + Window /* win */, + int /* percent */, + int /* bellDef */ +); + +extern Bool XkbStdBellEvent( + Display * /* dpy */, + Window /* win */, + int /* percent */, + int /* bellDef */ +); + +_XFUNCPROTOEND + +#endif /* _XKBBELLS_H_ */ diff --git a/X11/extensions/XKBconfig.h b/X11/extensions/XKBconfig.h new file mode 100644 index 000000000..fbc6a600e --- /dev/null +++ b/X11/extensions/XKBconfig.h @@ -0,0 +1,280 @@ +#ifndef _XKBCONFIG_H_ +#define _XKBCONFIG_H_ 1 + +/* $Xorg: XKBconfig.h,v 1.3 2000/08/17 19:46:42 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, 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 Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS 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. + + ********************************************************/ +/* $XFree86: xc/lib/xkbfile/XKBconfig.h,v 3.5 2001/01/17 19:43:39 dawes Exp $ */ + + +typedef struct _XkbConfigRtrn *XkbConfigRtrnPtr; +typedef struct _XkbConfigField *XkbConfigFieldPtr; +typedef struct _XkbConfigFields *XkbConfigFieldsPtr; + +typedef Bool (*XkbConfigParseFunc)( + FILE * /* file */, + XkbConfigFieldsPtr /* fields */, + XkbConfigFieldPtr /* field */, + XkbDescPtr /* xkb */, + XkbConfigRtrnPtr /* rtrn */ +); + +#define XkbCF_Check 0 +#define XkbCF_Apply 1 +#define XkbCF_CleanUp 2 +#define XkbCF_Destroy 3 + +typedef Bool (*XkbConfigFinishFunc)( + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */, + XkbConfigRtrnPtr /* rtrn */, + int /* what */ +); + +typedef struct _XkbConfigRtrnPriv { + int cfg_id; + XPointer priv; + struct _XkbConfigRtrnPriv * next; +} XkbConfigRtrnPrivRec,*XkbConfigRtrnPrivPtr; + +typedef struct _XkbConfigModInfo { + Bool replace; + unsigned char mods; + unsigned char mods_clear; + unsigned short vmods; + unsigned short vmods_clear; +} XkbConfigModInfoRec,*XkbConfigModInfoPtr; + +typedef struct _XkbConfigUnboundMod { + unsigned char what; + unsigned char mods; + unsigned short vmods; + short merge; + char * name; +} XkbConfigUnboundModRec,*XkbConfigUnboundModPtr; + +#define XkbCF_MergeSet 0 +#define XkbCF_MergeAdd 1 +#define XkbCF_MergeRemove 2 + +#define XkbCF_InitialMods (1L<<0) +#define XkbCF_InternalMods (1L<<1) +#define XkbCF_IgnoreLockMods (1L<<2) +#define XkbCF_InitialCtrls (1L<<3) +#define XkbCF_AccessXTimeout (1L<<4) +#define XkbCF_AccessXTimeoutCtrlsOn (1L<<5) +#define XkbCF_AccessXTimeoutCtrlsOff (1L<<6) +#define XkbCF_AccessXTimeoutOptsOn (1L<<7) +#define XkbCF_AccessXTimeoutOptsOff (1L<<8) +#define XkbCF_GroupsWrap (1L<<9) +#define XkbCF_InitialOpts (1L<<10) + +typedef struct _XkbConfigRtrn { + unsigned defined; + int error; + int line; + + int click_volume; + int bell_volume; + int bell_pitch; + int bell_duration; + int repeat_delay; + int repeat_interval; + + char * rules_file; + char * model; + char * layout; + char * variant; + char * options; + + char * keymap; + char * keycodes; + char * geometry; + char * phys_symbols; + char * symbols; + char * types; + char * compat; + + Bool replace_initial_ctrls; + unsigned long initial_ctrls; + unsigned long initial_ctrls_clear; + + Bool replace_initial_opts; + unsigned short initial_opts; + unsigned short initial_opts_clear; + + XkbConfigModInfoRec initial_mods; + XkbConfigModInfoRec internal_mods; + XkbConfigModInfoRec ignore_lock_mods; + + short num_unbound_mods; + short sz_unbound_mods; + XkbConfigUnboundModPtr unbound_mods; + + int groups_wrap; + int slow_keys_delay; + int debounce_delay; + int mk_delay; + int mk_interval; + int mk_time_to_max; + int mk_max_speed; + int mk_curve; + int ax_timeout; + + Bool replace_axt_ctrls_on; + Bool replace_axt_ctrls_off; + unsigned long axt_ctrls_on; + unsigned long axt_ctrls_off; + unsigned long axt_ctrls_ignore; + + Bool replace_axt_opts_off; + Bool replace_axt_opts_on; + unsigned short axt_opts_off; + unsigned short axt_opts_on; + unsigned short axt_opts_ignore; + XkbConfigRtrnPrivPtr priv; +} XkbConfigRtrnRec; + +typedef struct _XkbConfigField { + char * field; + unsigned char field_id; +} XkbConfigFieldRec; + +typedef struct _XkbConfigFields { + unsigned short cfg_id; + unsigned short num_fields; + XkbConfigFieldPtr fields; + XkbConfigParseFunc parser; + XkbConfigFinishFunc finish; + XPointer priv; + struct _XkbConfigFields *next; +} XkbConfigFieldsRec; + +#define XkbCF_EOF -1 +#define XkbCF_Unknown 0 +#define XkbCF_EOL 1 +#define XkbCF_Semi 2 +#define XkbCF_Equals 3 +#define XkbCF_PlusEquals 4 +#define XkbCF_MinusEquals 5 +#define XkbCF_Plus 6 +#define XkbCF_Minus 7 +#define XkbCF_String 10 +#define XkbCF_Ident 11 +#define XkbCF_Integer 12 + +#define XkbCF_UnterminatedString 100 +#define XkbCF_BadAlloc 101 +#define XkbCF_MissingIdent 102 +#define XkbCF_MissingEquals 103 +#define XkbCF_ExpectedEOS 104 +#define XkbCF_ExpectedBoolean 105 +#define XkbCF_ExpectedInteger 106 +#define XkbCF_ExpectedString 107 +#define XkbCF_ExpectedModifier 108 +#define XkbCF_ExpectedControl 109 +#define XkbCF_ExpectedAXOption 110 +#define XkbCF_ExpectedOperator 111 +#define XkbCF_ExpectedOORGroupBehavior 112 + +typedef union { + int ival; + char * str; +} XkbCFScanResultRec,*XkbCFScanResultPtr; + +extern XkbConfigFieldsPtr XkbCFDflts; + +_XFUNCPROTOBEGIN + +extern int XkbCFScan( + FILE * /* file */, + XkbCFScanResultPtr /* val_rtrn */, + XkbConfigRtrnPtr /* rtrn */ +); + +extern XkbConfigFieldsPtr XkbCFDup( + XkbConfigFieldsPtr /* fields */ +); + +extern XkbConfigFieldsPtr XkbCFFree( + XkbConfigFieldsPtr /* fields */, + Bool /* all */ +); + +extern XkbConfigUnboundModPtr XkbCFAddModByName( + XkbConfigRtrnPtr /* rtrn */, + int /* what */, + char * /* name */, + Bool /* merge */, + XkbConfigUnboundModPtr /* last */ +); + +extern Bool XkbCFBindMods( + XkbConfigRtrnPtr /* rtrn */, + XkbDescPtr /* xkb */ +); + +extern Bool XkbCFApplyMods( + XkbConfigRtrnPtr /* rtrn */, + int /* what */, + XkbConfigModInfoPtr /* info */ +); + +extern Bool XkbCFApplyRtrnValues( + XkbConfigRtrnPtr /* rtrn */, + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */ +); + +extern XkbConfigRtrnPrivPtr XkbCFAddPrivate( + XkbConfigRtrnPtr /* rtrn */, + XkbConfigFieldsPtr /* fields */, + XPointer /* ptr */ +); + +extern void XkbCFFreeRtrn( + XkbConfigRtrnPtr /* rtrn */, + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */ +); + +extern Bool XkbCFParse( + FILE * /* file */, + XkbConfigFieldsPtr /* fields */, + XkbDescPtr /* xkb */, + XkbConfigRtrnPtr /* rtrn */ +); + +extern void XkbCFReportError( + FILE * /* file */, + char * /* name */, + int /* error */, + int /* line */ +); + +_XFUNCPROTOEND + +#endif /* _XKBCONFIG_H_ */ diff --git a/X11/extensions/XKBfile.h b/X11/extensions/XKBfile.h new file mode 100644 index 000000000..bbd7e6fcd --- /dev/null +++ b/X11/extensions/XKBfile.h @@ -0,0 +1,494 @@ +/* $XFree86: xc/lib/xkbfile/XKBfile.h,v 3.6 2003/10/24 16:33:09 tsi Exp $ */ + +#ifndef _XKBFILE_H_ +#define _XKBFILE_H_ 1 + +/* $Xorg: XKBfile.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, 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 Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS 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. + + ********************************************************/ + +/***====================================================================***/ + +#define XkbXKMFile 0 +#define XkbCFile 1 +#define XkbXKBFile 2 +#define XkbMessage 3 + +#define XkbMapDefined (1<<0) +#define XkbStateDefined (1<<1) + +typedef struct _XkbFileInfo { + unsigned type; + unsigned defined; + XkbDescPtr xkb; +} XkbFileInfo,*XkbFileInfoPtr; + +typedef void (*XkbFileAddOnFunc)( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + int /* fileSection */, + void * /* priv */ +); + +/***====================================================================***/ + +#define _XkbSuccess 0 +#define _XkbErrMissingNames 1 +#define _XkbErrMissingTypes 2 +#define _XkbErrMissingReqTypes 3 +#define _XkbErrMissingSymbols 4 +#define _XkbErrMissingVMods 5 +#define _XkbErrMissingIndicators 6 +#define _XkbErrMissingCompatMap 7 +#define _XkbErrMissingSymInterps 8 +#define _XkbErrMissingGeometry 9 +#define _XkbErrIllegalDoodad 10 +#define _XkbErrIllegalTOCType 11 +#define _XkbErrIllegalContents 12 +#define _XkbErrEmptyFile 13 +#define _XkbErrFileNotFound 14 +#define _XkbErrFileCannotOpen 15 +#define _XkbErrBadValue 16 +#define _XkbErrBadMatch 17 +#define _XkbErrBadTypeName 18 +#define _XkbErrBadTypeWidth 19 +#define _XkbErrBadFileType 20 +#define _XkbErrBadFileVersion 21 +#define _XkbErrBadFileFormat 22 +#define _XkbErrBadAlloc 23 +#define _XkbErrBadLength 24 +#define _XkbErrXReqFailure 25 +#define _XkbErrBadImplementation 26 + +extern char * _XkbErrMessages[]; +extern unsigned _XkbErrCode; +extern char * _XkbErrLocation; +extern unsigned _XkbErrData; + +/***====================================================================***/ + +_XFUNCPROTOBEGIN + +extern char * XkbIndentText( + unsigned /* size */ +); + +extern char * XkbAtomText( + Display * /* dpy */, + Atom /* atm */, + unsigned /* format */ +); + +extern char * XkbKeysymText( + KeySym /* sym */, + unsigned /* format */ +); + +extern char * XkbStringText( + char * /* str */, + unsigned /* format */ +); + +extern char * XkbKeyNameText( + char * /* name */, + unsigned /* format */ +); + +extern char * +XkbModIndexText( + unsigned /* ndx */, + unsigned /* format */ +); + +extern char * +XkbModMaskText( + unsigned /* mask */, + unsigned /* format */ +); + +extern char * XkbVModIndexText( + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* ndx */, + unsigned /* format */ +); + +extern char * XkbVModMaskText( + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* modMask */, + unsigned /* mask */, + unsigned /* format */ +); + +extern char * XkbConfigText( + unsigned /* config */, + unsigned /* format */ +); + +extern char * XkbSIMatchText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbIMWhichStateMaskText( + unsigned /* use_which */, + unsigned /* format */ +); + +extern char * XkbAccessXDetailText( + unsigned /* state */, + unsigned /* format */ +); + +extern char * XkbNKNDetailMaskText( + unsigned /* detail */, + unsigned /* format */ +); + +extern char * XkbControlsMaskText( + unsigned /* ctrls */, + unsigned /* format */ +); + +extern char * XkbGeomFPText( + int /* val */, + unsigned /* format */ +); + +extern char * XkbDoodadTypeText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbActionTypeText( + unsigned /* type */, + unsigned /* format */ +); + +extern char * XkbActionText( + Display * /* dpy */, + XkbDescPtr /* xkb */, + XkbAction * /* action */, + unsigned /* format */ +); + +extern char * XkbBehaviorText( + XkbDescPtr /* xkb */, + XkbBehavior * /* behavior */, + unsigned /* format */ +); + +/***====================================================================***/ + +#define _XkbKSLower (1<<0) +#define _XkbKSUpper (1<<1) + +#define XkbKSIsLower(k) (_XkbKSCheckCase(k)&_XkbKSLower) +#define XkbKSIsUpper(k) (_XkbKSCheckCase(k)&_XkbKSUpper) +#define XkbKSIsKeypad(k) (((k)>=XK_KP_Space)&&((k)<=XK_KP_Equal)) +#define XkbKSIsDeadKey(k) \ + (((k)>=XK_dead_grave)&&((k)<=XK_dead_semivoiced_sound)) + +extern unsigned _XkbKSCheckCase( + KeySym /* sym */ +); + +extern int XkbFindKeycodeByName( + XkbDescPtr /* xkb */, + char * /* name */, + Bool /* use_aliases */ +); + +extern Bool XkbLookupGroupAndLevel( + XkbDescPtr /* xkb */, + int /* key */, + int * /* mods_inout */, + int * /* grp_inout */, + int * /* lvl_rtrn */ +); + +/***====================================================================***/ + +#ifndef XKB_IN_SERVER + +extern Bool XkbLookupCanonicalRGBColor( + char * /* def */, + XColor * /* color */ +); + +#endif + +/***====================================================================***/ + +extern char * XkbAtomGetString( + Display * /* dpy */, + Atom /* atm */ +); + +extern Atom XkbInternAtom( + Display * /* dpy */, + char * /* name */, + Bool /* onlyIfExists */ +); + +extern Status XkbChangeKbdDisplay( + Display * /* newDpy */, + XkbFileInfo * /* result */ +); + +extern Atom XkbChangeAtomDisplay( + Display * /* oldDpy */, + Display * /* newDpy */, + Atom /* atm */ +); + +extern void XkbInitAtoms( + Display * /* dpy */ +); + +/***====================================================================***/ + +#ifdef _XKBGEOM_H_ + +#define XkbDW_Unknown 0 +#define XkbDW_Doodad 1 +#define XkbDW_Section 2 +typedef struct _XkbDrawable { + int type; + int priority; + union { + XkbDoodadPtr doodad; + XkbSectionPtr section; + } u; + struct _XkbDrawable * next; +} XkbDrawableRec,*XkbDrawablePtr; + +extern XkbDrawablePtr +XkbGetOrderedDrawables( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +); + +extern void +XkbFreeOrderedDrawables( + XkbDrawablePtr /* draw */ +); + +#endif + +/***====================================================================***/ + +extern unsigned XkbConvertGetByNameComponents( + Bool /* toXkm */, + unsigned /* orig */ +); + +extern unsigned XkbConvertXkbComponents( + Bool /* toXkm */, + unsigned /* orig */ +); + +extern Bool XkbDetermineFileType( + XkbFileInfo * /* xkb */, + int /* format */, + int * /* opts_missing */ +); + +extern Bool XkbNameMatchesPattern( + char * /* name */, + char * /* pattern */ +); + +/***====================================================================***/ + +extern Bool XkbWriteXKBKeycodes( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBKeyTypes( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBCompatMap( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBSymbols( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBGeometry( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBSemantics( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBLayout( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBKeymap( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* topLevel */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteXKBFile( + FILE * /* file */, + XkbFileInfo * /* result */, + Bool /* showImplicit */, + XkbFileAddOnFunc /* addOn */, + void * /* priv */ +); + +extern Bool XkbWriteCFile( + FILE * /* file */, + char * /* name */, + XkbFileInfo * /* info */ +); + +extern Bool XkbWriteXKMFile( + FILE * /* file */, + XkbFileInfo * /* result */ +); + +extern Bool XkbWriteToServer( + XkbFileInfo * /* result */ +); + +extern void XkbEnsureSafeMapName( + char * /* name */ +); + +extern Bool XkbWriteXKBKeymapForNames( + FILE * /* file */, + XkbComponentNamesPtr /* names */, + Display * /* dpy */, + XkbDescPtr /* xkb */, + unsigned /* want */, + unsigned /* need */ +); + +extern Status XkbMergeFile( + XkbDescPtr /* xkb */, + XkbFileInfo /* finfo */ +); + +/***====================================================================***/ + +extern Bool XkmProbe( + FILE * /* file */ +); + +extern unsigned XkbReadFromServer( + Display * /* dpy */, + unsigned /* need */, + unsigned /* want */, + XkbFileInfo * /* result */ +); + +extern unsigned XkmReadFile( + FILE * /* file */, + unsigned /* need */, + unsigned /* want */, + XkbFileInfo * /* result */ +); + +#ifdef _XKMFORMAT_H_ + +extern Bool XkmReadTOC( + FILE * /* file */, + xkmFileInfo * /* file_info */, + int /* max_toc */, + xkmSectionInfo * /* toc */ +); + +extern xkmSectionInfo *XkmFindTOCEntry( + xkmFileInfo * /* finfo */, + xkmSectionInfo * /* toc */, + unsigned /* type */ +); + +extern Bool XkmReadFileSection( + FILE * /* file */, + xkmSectionInfo * /* toc */, + XkbFileInfo * /* result */, + unsigned * /* loaded_rtrn */ +); + +extern char * XkmReadFileSectionName( + FILE * /* file */, + xkmSectionInfo * /* toc */ +); + +#endif /* _XKMFORMAT_H */ + +_XFUNCPROTOEND + +#endif /* _XKBFILE_H_ */ diff --git a/X11/extensions/XKBgeom.h b/X11/extensions/XKBgeom.h new file mode 100644 index 000000000..89f902fba --- /dev/null +++ b/X11/extensions/XKBgeom.h @@ -0,0 +1,659 @@ +/* $Xorg: XKBgeom.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. + +********************************************************/ +/* $XFree86: xc/include/extensions/XKBgeom.h,v 3.9 2002/09/18 17:11:40 tsi Exp $ */ + +#ifndef _XKBGEOM_H_ +#define _XKBGEOM_H_ + +#include + +#ifdef XKB_IN_SERVER +#define XkbAddGeomKeyAlias SrvXkbAddGeomKeyAlias +#define XkbAddGeomColor SrvXkbAddGeomColor +#define XkbAddGeomDoodad SrvXkbAddGeomDoodad +#define XkbAddGeomKey SrvXkbAddGeomKey +#define XkbAddGeomOutline SrvXkbAddGeomOutline +#define XkbAddGeomOverlay SrvXkbAddGeomOverlay +#define XkbAddGeomOverlayRow SrvXkbAddGeomOverlayRow +#define XkbAddGeomOverlayKey SrvXkbAddGeomOverlayKey +#define XkbAddGeomProperty SrvXkbAddGeomProperty +#define XkbAddGeomRow SrvXkbAddGeomRow +#define XkbAddGeomSection SrvXkbAddGeomSection +#define XkbAddGeomShape SrvXkbAddGeomShape +#define XkbAllocGeomKeyAliases SrvXkbAllocGeomKeyAliases +#define XkbAllocGeomColors SrvXkbAllocGeomColors +#define XkbAllocGeomDoodads SrvXkbAllocGeomDoodads +#define XkbAllocGeomKeys SrvXkbAllocGeomKeys +#define XkbAllocGeomOutlines SrvXkbAllocGeomOutlines +#define XkbAllocGeomPoints SrvXkbAllocGeomPoints +#define XkbAllocGeomProps SrvXkbAllocGeomProps +#define XkbAllocGeomRows SrvXkbAllocGeomRows +#define XkbAllocGeomSectionDoodads SrvXkbAllocGeomSectionDoodads +#define XkbAllocGeomSections SrvXkbAllocGeomSections +#define XkbAllocGeomOverlays SrvXkbAllocGeomOverlays +#define XkbAllocGeomOverlayRows SrvXkbAllocGeomOverlayRows +#define XkbAllocGeomOverlayKeys SrvXkbAllocGeomOverlayKeys +#define XkbAllocGeomShapes SrvXkbAllocGeomShapes +#define XkbAllocGeometry SrvXkbAllocGeometry +#define XkbFreeGeomKeyAliases SrvXkbFreeGeomKeyAliases +#define XkbFreeGeomColors SrvXkbFreeGeomColors +#define XkbFreeGeomDoodads SrvXkbFreeGeomDoodads +#define XkbFreeGeomProperties SrvXkbFreeGeomProperties +#define XkbFreeGeomOverlayKeys SrvXkbFreeGeomOverlayKeys +#define XkbFreeGeomOverlayRows SrvXkbFreeGeomOverlayRows +#define XkbFreeGeomOverlays SrvXkbFreeGeomOverlays +#define XkbFreeGeomKeys SrvXkbFreeGeomKeys +#define XkbFreeGeomRows SrvXkbFreeGeomRows +#define XkbFreeGeomSections SrvXkbFreeGeomSections +#define XkbFreeGeomPoints SrvXkbFreeGeomPoints +#define XkbFreeGeomOutlines SrvXkbFreeGeomOutlines +#define XkbFreeGeomShapes SrvXkbFreeGeomShapes +#define XkbFreeGeometry SrvXkbFreeGeometry +#endif + +typedef struct _XkbProperty { + char *name; + char *value; +} XkbPropertyRec,*XkbPropertyPtr; + +typedef struct _XkbColor { + unsigned int pixel; + char * spec; +} XkbColorRec,*XkbColorPtr; + +typedef struct _XkbPoint { + short x; + short y; +} XkbPointRec, *XkbPointPtr; + +typedef struct _XkbBounds { + short x1,y1; + short x2,y2; +} XkbBoundsRec, *XkbBoundsPtr; +#define XkbBoundsWidth(b) (((b)->x2)-((b)->x1)) +#define XkbBoundsHeight(b) (((b)->y2)-((b)->y1)) + +typedef struct _XkbOutline { + unsigned short num_points; + unsigned short sz_points; + unsigned short corner_radius; + XkbPointPtr points; +} XkbOutlineRec, *XkbOutlinePtr; + +typedef struct _XkbShape { + Atom name; + unsigned short num_outlines; + unsigned short sz_outlines; + XkbOutlinePtr outlines; + XkbOutlinePtr approx; + XkbOutlinePtr primary; + XkbBoundsRec bounds; +} XkbShapeRec, *XkbShapePtr; +#define XkbOutlineIndex(s,o) ((int)((o)-&(s)->outlines[0])) + +typedef struct _XkbShapeDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short color_ndx; + unsigned short shape_ndx; +} XkbShapeDoodadRec, *XkbShapeDoodadPtr; +#define XkbShapeDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbShapeDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbSetShapeDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) +#define XkbSetShapeDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbTextDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + short width; + short height; + unsigned short color_ndx; + char * text; + char * font; +} XkbTextDoodadRec, *XkbTextDoodadPtr; +#define XkbTextDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbSetTextDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) + +typedef struct _XkbIndicatorDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short shape_ndx; + unsigned short on_color_ndx; + unsigned short off_color_ndx; +} XkbIndicatorDoodadRec, *XkbIndicatorDoodadPtr; +#define XkbIndicatorDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbIndicatorDoodadOnColor(g,d) (&(g)->colors[(d)->on_color_ndx]) +#define XkbIndicatorDoodadOffColor(g,d) (&(g)->colors[(d)->off_color_ndx]) +#define XkbSetIndicatorDoodadOnColor(g,d,c) \ + ((d)->on_color_ndx= (c)-&(g)->colors[0]) +#define XkbSetIndicatorDoodadOffColor(g,d,c) \ + ((d)->off_color_ndx= (c)-&(g)->colors[0]) +#define XkbSetIndicatorDoodadShape(g,d,s) \ + ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbLogoDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; + unsigned short color_ndx; + unsigned short shape_ndx; + char * logo_name; +} XkbLogoDoodadRec, *XkbLogoDoodadPtr; +#define XkbLogoDoodadColor(g,d) (&(g)->colors[(d)->color_ndx]) +#define XkbLogoDoodadShape(g,d) (&(g)->shapes[(d)->shape_ndx]) +#define XkbSetLogoDoodadColor(g,d,c) ((d)->color_ndx= (c)-&(g)->colors[0]) +#define XkbSetLogoDoodadShape(g,d,s) ((d)->shape_ndx= (s)-&(g)->shapes[0]) + +typedef struct _XkbAnyDoodad { + Atom name; + unsigned char type; + unsigned char priority; + short top; + short left; + short angle; +} XkbAnyDoodadRec, *XkbAnyDoodadPtr; + +typedef union _XkbDoodad { + XkbAnyDoodadRec any; + XkbShapeDoodadRec shape; + XkbTextDoodadRec text; + XkbIndicatorDoodadRec indicator; + XkbLogoDoodadRec logo; +} XkbDoodadRec, *XkbDoodadPtr; + +#define XkbUnknownDoodad 0 +#define XkbOutlineDoodad 1 +#define XkbSolidDoodad 2 +#define XkbTextDoodad 3 +#define XkbIndicatorDoodad 4 +#define XkbLogoDoodad 5 + +typedef struct _XkbKey { + XkbKeyNameRec name; + short gap; + unsigned char shape_ndx; + unsigned char color_ndx; +} XkbKeyRec, *XkbKeyPtr; +#define XkbKeyShape(g,k) (&(g)->shapes[(k)->shape_ndx]) +#define XkbKeyColor(g,k) (&(g)->colors[(k)->color_ndx]) +#define XkbSetKeyShape(g,k,s) ((k)->shape_ndx= (s)-&(g)->shapes[0]) +#define XkbSetKeyColor(g,k,c) ((k)->color_ndx= (c)-&(g)->colors[0]) + +typedef struct _XkbRow { + short top; + short left; + unsigned short num_keys; + unsigned short sz_keys; + int vertical; + XkbKeyPtr keys; + XkbBoundsRec bounds; +} XkbRowRec, *XkbRowPtr; + +typedef struct _XkbSection { + Atom name; + unsigned char priority; + short top; + short left; + unsigned short width; + unsigned short height; + short angle; + unsigned short num_rows; + unsigned short num_doodads; + unsigned short num_overlays; + unsigned short sz_rows; + unsigned short sz_doodads; + unsigned short sz_overlays; + XkbRowPtr rows; + XkbDoodadPtr doodads; + XkbBoundsRec bounds; + struct _XkbOverlay *overlays; +} XkbSectionRec, *XkbSectionPtr; + +typedef struct _XkbOverlayKey { + XkbKeyNameRec over; + XkbKeyNameRec under; +} XkbOverlayKeyRec,*XkbOverlayKeyPtr; + +typedef struct _XkbOverlayRow { + unsigned short row_under; + unsigned short num_keys; + unsigned short sz_keys; + XkbOverlayKeyPtr keys; +} XkbOverlayRowRec,*XkbOverlayRowPtr; + +typedef struct _XkbOverlay { + Atom name; + XkbSectionPtr section_under; + unsigned short num_rows; + unsigned short sz_rows; + XkbOverlayRowPtr rows; + XkbBoundsPtr bounds; +} XkbOverlayRec,*XkbOverlayPtr; + +typedef struct _XkbGeometry { + Atom name; + unsigned short width_mm; + unsigned short height_mm; + char * label_font; + XkbColorPtr label_color; + XkbColorPtr base_color; + unsigned short sz_properties; + unsigned short sz_colors; + unsigned short sz_shapes; + unsigned short sz_sections; + unsigned short sz_doodads; + unsigned short sz_key_aliases; + unsigned short num_properties; + unsigned short num_colors; + unsigned short num_shapes; + unsigned short num_sections; + unsigned short num_doodads; + unsigned short num_key_aliases; + XkbPropertyPtr properties; + XkbColorPtr colors; + XkbShapePtr shapes; + XkbSectionPtr sections; + XkbDoodadPtr doodads; + XkbKeyAliasPtr key_aliases; +} XkbGeometryRec; +#define XkbGeomColorIndex(g,c) ((int)((c)-&(g)->colors[0])) + +#define XkbGeomPropertiesMask (1<<0) +#define XkbGeomColorsMask (1<<1) +#define XkbGeomShapesMask (1<<2) +#define XkbGeomSectionsMask (1<<3) +#define XkbGeomDoodadsMask (1<<4) +#define XkbGeomKeyAliasesMask (1<<5) +#define XkbGeomAllMask (0x3f) + +typedef struct _XkbGeometrySizes { + unsigned int which; + unsigned short num_properties; + unsigned short num_colors; + unsigned short num_shapes; + unsigned short num_sections; + unsigned short num_doodads; + unsigned short num_key_aliases; +} XkbGeometrySizesRec,*XkbGeometrySizesPtr; + +_XFUNCPROTOBEGIN + +extern XkbPropertyPtr +XkbAddGeomProperty( + XkbGeometryPtr /* geom */, + char * /* name */, + char * /* value */ +); + +extern XkbKeyAliasPtr +XkbAddGeomKeyAlias( + XkbGeometryPtr /* geom */, + char * /* alias */, + char * /* real */ +); + +extern XkbColorPtr +XkbAddGeomColor( + XkbGeometryPtr /* geom */, + char * /* spec */, + unsigned int /* pixel */ +); + +extern XkbOutlinePtr +XkbAddGeomOutline( + XkbShapePtr /* shape */, + int /* sz_points */ +); + +extern XkbShapePtr +XkbAddGeomShape( + XkbGeometryPtr /* geom */, + Atom /* name */, + int /* sz_outlines */ +); + +extern XkbKeyPtr +XkbAddGeomKey( + XkbRowPtr /* row */ +); + +extern XkbRowPtr +XkbAddGeomRow( + XkbSectionPtr /* section */, + int /* sz_keys */ +); + +extern XkbSectionPtr +XkbAddGeomSection( + XkbGeometryPtr /* geom */, + Atom /* name */, + int /* sz_rows */, + int /* sz_doodads */, + int /* sz_overlays */ +); + +extern XkbOverlayPtr +XkbAddGeomOverlay( + XkbSectionPtr /* section */, + Atom /* name */, + int /* sz_rows */ +); + +extern XkbOverlayRowPtr +XkbAddGeomOverlayRow( + XkbOverlayPtr /* overlay */, + int /* row_under */, + int /* sz_keys */ +); + +extern XkbOverlayKeyPtr +XkbAddGeomOverlayKey( + XkbOverlayPtr /* overlay */, + XkbOverlayRowPtr /* row */, + char * /* over */, + char * /* under */ +); + +extern XkbDoodadPtr +XkbAddGeomDoodad( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */, + Atom /* name */ +); + + +extern void +XkbFreeGeomKeyAliases( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomColors( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomDoodads( + XkbDoodadPtr /* doodads */, + int /* nDoodads */, + Bool /* freeAll */ +); + + +extern void +XkbFreeGeomProperties( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlayKeys( + XkbOverlayRowPtr /* row */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlayRows( + XkbOverlayPtr /* overlay */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOverlays( + XkbSectionPtr /* section */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomKeys( + XkbRowPtr /* row */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomRows( + XkbSectionPtr /* section */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomSections( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + + +extern void +XkbFreeGeomPoints( + XkbOutlinePtr /* outline */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomOutlines( + XkbShapePtr /* shape */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeomShapes( + XkbGeometryPtr /* geom */, + int /* first */, + int /* count */, + Bool /* freeAll */ +); + +extern void +XkbFreeGeometry( + XkbGeometryPtr /* geom */, + unsigned int /* which */, + Bool /* freeMap */ +); + +extern Status +XkbAllocGeomProps( + XkbGeometryPtr /* geom */, + int /* nProps */ +); + +extern Status +XkbAllocGeomKeyAliases( + XkbGeometryPtr /* geom */, + int /* nAliases */ +); + +extern Status +XkbAllocGeomColors( + XkbGeometryPtr /* geom */, + int /* nColors */ +); + +extern Status +XkbAllocGeomShapes( + XkbGeometryPtr /* geom */, + int /* nShapes */ +); + +extern Status +XkbAllocGeomSections( + XkbGeometryPtr /* geom */, + int /* nSections */ +); + +extern Status +XkbAllocGeomOverlays( + XkbSectionPtr /* section */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomOverlayRows( + XkbOverlayPtr /* overlay */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomOverlayKeys( + XkbOverlayRowPtr /* row */, + int /* num_needed */ +); + +extern Status +XkbAllocGeomDoodads( + XkbGeometryPtr /* geom */, + int /* nDoodads */ +); + +extern Status +XkbAllocGeomSectionDoodads( + XkbSectionPtr /* section */, + int /* nDoodads */ +); + +extern Status +XkbAllocGeomOutlines( + XkbShapePtr /* shape */, + int /* nOL */ +); + +extern Status +XkbAllocGeomRows( + XkbSectionPtr /* section */, + int /* nRows */ +); + +extern Status +XkbAllocGeomPoints( + XkbOutlinePtr /* ol */, + int /* nPts */ +); + +extern Status +XkbAllocGeomKeys( + XkbRowPtr /* row */, + int /* nKeys */ +); + +extern Status +XkbAllocGeometry( + XkbDescPtr /* xkb */, + XkbGeometrySizesPtr /* sizes */ +); + +extern Status +XkbSetGeometry( + Display * /* dpy */, + unsigned /* deviceSpec */, + XkbGeometryPtr /* geom */ +); + +extern Bool +XkbComputeShapeTop( + XkbShapePtr /* shape */, + XkbBoundsPtr /* bounds */ +); + +extern Bool +XkbComputeShapeBounds( + XkbShapePtr /* shape */ +); + +extern Bool +XkbComputeRowBounds( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */, + XkbRowPtr /* row */ +); + +extern Bool +XkbComputeSectionBounds( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* section */ +); + +extern char * +XkbFindOverlayForKey( + XkbGeometryPtr /* geom */, + XkbSectionPtr /* wanted */, + char * /* under */ +); + +extern Status +XkbGetGeometry( + Display * /* dpy */, + XkbDescPtr /* xkb */ +); + +extern Status +XkbGetNamedGeometry( + Display * /* dpy */, + XkbDescPtr /* xkb */, + Atom /* name */ +); + +_XFUNCPROTOEND + +#endif /* _XKBSTR_H_ */ diff --git a/X11/extensions/XKBproto.h b/X11/extensions/XKBproto.h new file mode 100644 index 000000000..97dd4d262 --- /dev/null +++ b/X11/extensions/XKBproto.h @@ -0,0 +1,1282 @@ +/* $Xorg: XKBproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. + +********************************************************/ + +#ifndef _XKBPROTO_H_ +#define _XKBPROTO_H_ + +#include +#include + +#define Window CARD32 +#define Atom CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +#define XkbPaddedSize(n) ((((unsigned int)(n)+3) >> 2) << 2) + +typedef struct _xkbUseExtension { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBUseExtension */ + CARD16 length B16; + CARD16 wantedMajor B16; + CARD16 wantedMinor B16; +} xkbUseExtensionReq; +#define sz_xkbUseExtensionReq 8 + +typedef struct _xkbUseExtensionReply { + BYTE type; /* X_Reply */ + BOOL supported; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 serverMajor B16; + CARD16 serverMinor B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xkbUseExtensionReply; +#define sz_xkbUseExtensionReply 32 + +typedef struct _xkbSelectEvents { + CARD8 reqType; + CARD8 xkbReqType; /* X_KBSelectEvents */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 affectWhich B16; + CARD16 clear B16; + CARD16 selectAll B16; + CARD16 affectMap B16; + CARD16 map B16; +} xkbSelectEventsReq; +#define sz_xkbSelectEventsReq 16 + +typedef struct _xkbBell { + CARD8 reqType; + CARD8 xkbReqType; /* X_KBBell */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 bellClass B16; + CARD16 bellID B16; + INT8 percent; + BOOL forceSound; + BOOL eventOnly; + CARD8 pad1; + INT16 pitch B16; + INT16 duration B16; + CARD16 pad2 B16; + Atom name B32; + Window window B32; +} xkbBellReq; +#define sz_xkbBellReq 28 + +typedef struct _xkbGetState { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetState */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad B16; +} xkbGetStateReq; +#define sz_xkbGetStateReq 8 + +typedef struct _xkbGetStateReply { + BYTE type; + BYTE deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 mods; + CARD8 baseMods; + CARD8 latchedMods; + CARD8 lockedMods; + CARD8 group; + CARD8 lockedGroup; + INT16 baseGroup B16; + INT16 latchedGroup B16; + CARD8 compatState; + CARD8 grabMods; + CARD8 compatGrabMods; + CARD8 lookupMods; + CARD8 compatLookupMods; + CARD8 pad1; + CARD16 ptrBtnState B16; + CARD16 pad2 B16; + CARD32 pad3 B32; +} xkbGetStateReply; +#define sz_xkbGetStateReply 32 + +typedef struct _xkbLatchLockState { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBLatchLockState */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD8 affectModLocks; + CARD8 modLocks; + BOOL lockGroup; + CARD8 groupLock; + CARD8 affectModLatches; + CARD8 modLatches; + CARD8 pad; + BOOL latchGroup; + INT16 groupLatch B16; +} xkbLatchLockStateReq; +#define sz_xkbLatchLockStateReq 16 + +typedef struct _xkbGetControls { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetControls */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad B16; +} xkbGetControlsReq; +#define sz_xkbGetControlsReq 8 + +typedef struct _xkbGetControlsReply { + BYTE type; /* X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 mkDfltBtn; + CARD8 numGroups; + CARD8 groupsWrap; + CARD8 internalMods; + CARD8 ignoreLockMods; + CARD8 internalRealMods; + CARD8 ignoreLockRealMods; + CARD8 pad1; + CARD16 internalVMods B16; + CARD16 ignoreLockVMods B16; + CARD16 repeatDelay B16; + CARD16 repeatInterval B16; + CARD16 slowKeysDelay B16; + CARD16 debounceDelay B16; + CARD16 mkDelay B16; + CARD16 mkInterval B16; + CARD16 mkTimeToMax B16; + CARD16 mkMaxSpeed B16; + INT16 mkCurve B16; + CARD16 axOptions B16; + CARD16 axTimeout B16; + CARD16 axtOptsMask B16; + CARD16 axtOptsValues B16; + CARD16 pad2 B16; + CARD32 axtCtrlsMask B32; + CARD32 axtCtrlsValues B32; + CARD32 enabledCtrls B32; + BYTE perKeyRepeat[XkbPerKeyBitArraySize]; +} xkbGetControlsReply; +#define sz_xkbGetControlsReply 92 + +typedef struct _xkbSetControls { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetControls */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD8 affectInternalMods; + CARD8 internalMods; + CARD8 affectIgnoreLockMods; + CARD8 ignoreLockMods; + CARD16 affectInternalVMods B16; + CARD16 internalVMods B16; + CARD16 affectIgnoreLockVMods B16; + CARD16 ignoreLockVMods B16; + CARD8 mkDfltBtn; + CARD8 groupsWrap; + CARD16 axOptions B16; + CARD16 pad1 B16; + CARD32 affectEnabledCtrls B32; + CARD32 enabledCtrls B32; + CARD32 changeCtrls B32; + CARD16 repeatDelay B16; + CARD16 repeatInterval B16; + CARD16 slowKeysDelay B16; + CARD16 debounceDelay B16; + CARD16 mkDelay B16; + CARD16 mkInterval B16; + CARD16 mkTimeToMax B16; + CARD16 mkMaxSpeed B16; + INT16 mkCurve B16; + CARD16 axTimeout B16; + CARD32 axtCtrlsMask B32; + CARD32 axtCtrlsValues B32; + CARD16 axtOptsMask B16; + CARD16 axtOptsValues B16; + BYTE perKeyRepeat[XkbPerKeyBitArraySize]; +} xkbSetControlsReq; +#define sz_xkbSetControlsReq 100 + +typedef struct _xkbKTMapEntryWireDesc { + BOOL active; + CARD8 mask; + CARD8 level; + CARD8 realMods; + CARD16 virtualMods B16; + CARD16 pad B16; +} xkbKTMapEntryWireDesc; +#define sz_xkbKTMapEntryWireDesc 8 + +typedef struct _xkbKTSetMapEntryWireDesc { + CARD8 level; + CARD8 realMods; + CARD16 virtualMods B16; +} xkbKTSetMapEntryWireDesc; +#define sz_xkbKTSetMapEntryWireDesc 4 + +typedef struct _xkbModsWireDesc { + CARD8 mask; /* GetMap only */ + CARD8 realMods; + CARD16 virtualMods B16; +} xkbModsWireDesc; +#define sz_xkbModsWireDesc 4 + +typedef struct _xkbKeyTypeWireDesc { + CARD8 mask; + CARD8 realMods; + CARD16 virtualMods B16; + CARD8 numLevels; + CARD8 nMapEntries; + BOOL preserve; + CARD8 pad; +} xkbKeyTypeWireDesc; +#define sz_xkbKeyTypeWireDesc 8 + +typedef struct _xkbSymMapWireDesc { + CARD8 ktIndex[XkbNumKbdGroups]; + CARD8 groupInfo; + CARD8 width; + CARD16 nSyms B16; +} xkbSymMapWireDesc; +#define sz_xkbSymMapWireDesc 8 + +typedef struct _xkbVModMapWireDesc { + KeyCode key; + CARD8 pad; + CARD16 vmods B16; +} xkbVModMapWireDesc; +#define sz_xkbVModMapWireDesc 4 + +typedef struct _xkbBehaviorWireDesc { + CARD8 key; + CARD8 type; + CARD8 data; + CARD8 pad; +} xkbBehaviorWireDesc; +#define sz_xkbBehaviorWireDesc 4 + +typedef struct _xkbActionWireDesc { + CARD8 type; + CARD8 data[7]; +} xkbActionWireDesc; +#define sz_xkbActionWireDesc 8 + +typedef struct _xkbGetMap { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetMap */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 full B16; + CARD16 partial B16; + CARD8 firstType; + CARD8 nTypes; + KeyCode firstKeySym; + CARD8 nKeySyms; + KeyCode firstKeyAct; + CARD8 nKeyActs; + KeyCode firstKeyBehavior; + CARD8 nKeyBehaviors; + CARD16 virtualMods B16; + KeyCode firstKeyExplicit; + CARD8 nKeyExplicit; + KeyCode firstModMapKey; + CARD8 nModMapKeys; + KeyCode firstVModMapKey; + CARD8 nVModMapKeys; + CARD16 pad1 B16; +} xkbGetMapReq; +#define sz_xkbGetMapReq 28 + +typedef struct _xkbGetMapReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 pad1 B16; + KeyCode minKeyCode; + KeyCode maxKeyCode; + CARD16 present B16; + CARD8 firstType; + CARD8 nTypes; + CARD8 totalTypes; + KeyCode firstKeySym; + CARD16 totalSyms B16; + CARD8 nKeySyms; + KeyCode firstKeyAct; + CARD16 totalActs B16; + CARD8 nKeyActs; + KeyCode firstKeyBehavior; + CARD8 nKeyBehaviors; + CARD8 totalKeyBehaviors; + KeyCode firstKeyExplicit; + CARD8 nKeyExplicit; + CARD8 totalKeyExplicit; + KeyCode firstModMapKey; + CARD8 nModMapKeys; + CARD8 totalModMapKeys; + KeyCode firstVModMapKey; + CARD8 nVModMapKeys; + CARD8 totalVModMapKeys; + CARD8 pad2; + CARD16 virtualMods B16; +} xkbGetMapReply; +#define sz_xkbGetMapReply 40 + +#define XkbSetMapResizeTypes (1L<<0) +#define XkbSetMapRecomputeActions (1L<<1) +#define XkbSetMapAllFlags (0x3) + +typedef struct _xkbSetMap { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetMap */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 present B16; + CARD16 flags B16; + KeyCode minKeyCode; + KeyCode maxKeyCode; + CARD8 firstType; + CARD8 nTypes; + KeyCode firstKeySym; + CARD8 nKeySyms; + CARD16 totalSyms B16; + KeyCode firstKeyAct; + CARD8 nKeyActs; + CARD16 totalActs B16; + KeyCode firstKeyBehavior; + CARD8 nKeyBehaviors; + CARD8 totalKeyBehaviors; + KeyCode firstKeyExplicit; + CARD8 nKeyExplicit; + CARD8 totalKeyExplicit; + KeyCode firstModMapKey; + CARD8 nModMapKeys; + CARD8 totalModMapKeys; + KeyCode firstVModMapKey; + CARD8 nVModMapKeys; + CARD8 totalVModMapKeys; + CARD16 virtualMods B16; +} xkbSetMapReq; +#define sz_xkbSetMapReq 36 + +typedef struct _xkbSymInterpretWireDesc { + CARD32 sym B32; + CARD8 mods; + CARD8 match; + CARD8 virtualMod; + CARD8 flags; + xkbActionWireDesc act; +} xkbSymInterpretWireDesc; +#define sz_xkbSymInterpretWireDesc 16 + +typedef struct _xkbGetCompatMap { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetCompatMap */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD8 groups; + BOOL getAllSI; + CARD16 firstSI B16; + CARD16 nSI B16; +} xkbGetCompatMapReq; +#define sz_xkbGetCompatMapReq 12 + +typedef struct _xkbGetCompatMapReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 groups; + CARD8 pad1; + CARD16 firstSI B16; + CARD16 nSI B16; + CARD16 nTotalSI B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xkbGetCompatMapReply; +#define sz_xkbGetCompatMapReply 32 + +typedef struct _xkbSetCompatMap { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetCompatMap */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD8 pad1; + BOOL recomputeActions; + BOOL truncateSI; + CARD8 groups; + CARD16 firstSI B16; + CARD16 nSI B16; + CARD16 pad2 B16; +} xkbSetCompatMapReq; +#define sz_xkbSetCompatMapReq 16 + +typedef struct _xkbGetIndicatorState { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetIndicatorState */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad1 B16; +} xkbGetIndicatorStateReq; +#define sz_xkbGetIndicatorStateReq 8 + +typedef struct _xkbGetIndicatorStateReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 state B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xkbGetIndicatorStateReply; +#define sz_xkbGetIndicatorStateReply 32 + +typedef struct _xkbGetIndicatorMap { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetIndicatorMap */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad B16; + CARD32 which B32; +} xkbGetIndicatorMapReq; +#define sz_xkbGetIndicatorMapReq 12 + +typedef struct _xkbGetIndicatorMapReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 which B32; + CARD32 realIndicators B32; + CARD8 nIndicators; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xkbGetIndicatorMapReply; +#define sz_xkbGetIndicatorMapReply 32 + +typedef struct _xkbIndicatorMapWireDesc { + CARD8 flags; + CARD8 whichGroups; + CARD8 groups; + CARD8 whichMods; + CARD8 mods; + CARD8 realMods; + CARD16 virtualMods B16; + CARD32 ctrls B32; +} xkbIndicatorMapWireDesc; +#define sz_xkbIndicatorMapWireDesc 12 + +typedef struct _xkbSetIndicatorMap { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetIndicatorMap */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad1 B16; + CARD32 which B32; +} xkbSetIndicatorMapReq; +#define sz_xkbSetIndicatorMapReq 12 + +typedef struct _xkbGetNamedIndicator { + CARD8 reqType; + CARD8 xkbReqType; /* X_KBGetNamedIndicator */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 ledClass B16; + CARD16 ledID B16; + CARD16 pad1 B16; + Atom indicator B32; +} xkbGetNamedIndicatorReq; +#define sz_xkbGetNamedIndicatorReq 16 + +typedef struct _xkbGetNamedIndicatorReply { + BYTE type; + BYTE deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom indicator B32; + BOOL found; + BOOL on; + BOOL realIndicator; + CARD8 ndx; + CARD8 flags; + CARD8 whichGroups; + CARD8 groups; + CARD8 whichMods; + CARD8 mods; + CARD8 realMods; + CARD16 virtualMods B16; + CARD32 ctrls B32; + BOOL supported; + CARD8 pad1; + CARD16 pad2 B16; +} xkbGetNamedIndicatorReply; +#define sz_xkbGetNamedIndicatorReply 32 + +typedef struct _xkbSetNamedIndicator { + CARD8 reqType; + CARD8 xkbReqType; /* X_KBSetNamedIndicator */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 ledClass B16; + CARD16 ledID B16; + CARD16 pad1 B16; + Atom indicator B32; + BOOL setState; + BOOL on; + BOOL setMap; + BOOL createMap; + CARD8 pad2; + CARD8 flags; + CARD8 whichGroups; + CARD8 groups; + CARD8 whichMods; + CARD8 realMods; + CARD16 virtualMods B16; + CARD32 ctrls B32; +} xkbSetNamedIndicatorReq; +#define sz_xkbSetNamedIndicatorReq 32 + +typedef struct _xkbGetNames { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetNames */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad B16; + CARD32 which B32; +} xkbGetNamesReq; +#define sz_xkbGetNamesReq 12 + +typedef struct _xkbGetNamesReply { + BYTE type; + BYTE deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 which B32; + KeyCode minKeyCode; + KeyCode maxKeyCode; + CARD8 nTypes; + CARD8 groupNames; + CARD16 virtualMods B16; + KeyCode firstKey; + CARD8 nKeys; + CARD32 indicators B32; + CARD8 nRadioGroups; + CARD8 nKeyAliases; + CARD16 nKTLevels B16; + CARD32 pad3 B32; +} xkbGetNamesReply; +#define sz_xkbGetNamesReply 32 + +typedef struct _xkbSetNames { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetNames */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 virtualMods B16; + CARD32 which B32; + CARD8 firstType; + CARD8 nTypes; + CARD8 firstKTLevel; + CARD8 nKTLevels; + CARD32 indicators B32; + CARD8 groupNames; + CARD8 nRadioGroups; + KeyCode firstKey; + CARD8 nKeys; + CARD8 nKeyAliases; + CARD8 pad1; + CARD16 totalKTLevelNames B16; +} xkbSetNamesReq; +#define sz_xkbSetNamesReq 28 + +typedef struct _xkbPointWireDesc { + INT16 x B16; + INT16 y B16; +} xkbPointWireDesc; +#define sz_xkbPointWireDesc 4 + +typedef struct _xkbOutlineWireDesc { + CARD8 nPoints; + CARD8 cornerRadius; + CARD16 pad B16; +} xkbOutlineWireDesc; +#define sz_xkbOutlineWireDesc 4 + +typedef struct _xkbShapeWireDesc { + Atom name B32; + CARD8 nOutlines; + CARD8 primaryNdx; + CARD8 approxNdx; + CARD8 pad; +} xkbShapeWireDesc; +#define sz_xkbShapeWireDesc 8 + +typedef struct _xkbSectionWireDesc { + Atom name B32; + INT16 top B16; + INT16 left B16; + CARD16 width B16; + CARD16 height B16; + INT16 angle B16; + CARD8 priority; + CARD8 nRows; + CARD8 nDoodads; + CARD8 nOverlays; + CARD16 pad B16; +} xkbSectionWireDesc; +#define sz_xkbSectionWireDesc 20 + +typedef struct _xkbRowWireDesc { + INT16 top B16; + INT16 left B16; + CARD8 nKeys; + BOOL vertical; + CARD16 pad B16; +} xkbRowWireDesc; +#define sz_xkbRowWireDesc 8 + +typedef struct _xkbKeyWireDesc { + CARD8 name[XkbKeyNameLength]; + INT16 gap B16; + CARD8 shapeNdx; + CARD8 colorNdx; +} xkbKeyWireDesc; +#define sz_xkbKeyWireDesc 8 + +typedef struct _xkbOverlayWireDesc { + Atom name B32; + CARD8 nRows; + CARD8 pad1; + CARD16 pad2 B16; +} xkbOverlayWireDesc; +#define sz_xkbOverlayWireDesc 8 + +typedef struct _xkbOverlayRowWireDesc { + CARD8 rowUnder; + CARD8 nKeys; + CARD16 pad1 B16; +} xkbOverlayRowWireDesc; +#define sz_xkbOverlayRowWireDesc 4 + +typedef struct _xkbOverlayKeyWireDesc { + CARD8 over[XkbKeyNameLength]; + CARD8 under[XkbKeyNameLength]; +} xkbOverlayKeyWireDesc; +#define sz_xkbOverlayKeyWireDesc 8 + +typedef struct _xkbShapeDoodadWireDesc { + Atom name B32; + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 colorNdx; + CARD8 shapeNdx; + CARD16 pad1 B16; + CARD32 pad2 B32; +} xkbShapeDoodadWireDesc; +#define sz_xkbShapeDoodadWireDesc 20 + +typedef struct _xkbTextDoodadWireDesc { + Atom name B32; + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD16 width B16; + CARD16 height B16; + CARD8 colorNdx; + CARD8 pad1; + CARD16 pad2 B16; +} xkbTextDoodadWireDesc; +#define sz_xkbTextDoodadWireDesc 20 + +typedef struct _xkbIndicatorDoodadWireDesc { + Atom name B32; + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 shapeNdx; + CARD8 onColorNdx; + CARD8 offColorNdx; + CARD8 pad1; + CARD32 pad2 B32; +} xkbIndicatorDoodadWireDesc; +#define sz_xkbIndicatorDoodadWireDesc 20 + +typedef struct _xkbLogoDoodadWireDesc { + Atom name B32; + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 colorNdx; + CARD8 shapeNdx; + CARD16 pad1 B16; + CARD32 pad2 B32; +} xkbLogoDoodadWireDesc; +#define sz_xkbLogoDoodadWireDesc 20 + +typedef struct _xkbAnyDoodadWireDesc { + Atom name B32; + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xkbAnyDoodadWireDesc; +#define sz_xkbAnyDoodadWireDesc 20 + +typedef union _xkbDoodadWireDesc { + xkbAnyDoodadWireDesc any; + xkbShapeDoodadWireDesc shape; + xkbTextDoodadWireDesc text; + xkbIndicatorDoodadWireDesc indicator; + xkbLogoDoodadWireDesc logo; +} xkbDoodadWireDesc; +#define sz_xkbDoodadWireDesc 20 + +typedef struct _xkbGetGeometry { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetGeometry */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad B16; + Atom name B32; +} xkbGetGeometryReq; +#define sz_xkbGetGeometryReq 12 + +typedef struct _xkbGetGeometryReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom name B32; + BOOL found; + CARD8 pad; + CARD16 widthMM B16; + CARD16 heightMM B16; + CARD16 nProperties B16; + CARD16 nColors B16; + CARD16 nShapes B16; + CARD16 nSections B16; + CARD16 nDoodads B16; + CARD16 nKeyAliases B16; + CARD8 baseColorNdx; + CARD8 labelColorNdx; +} xkbGetGeometryReply; +#define sz_xkbGetGeometryReply 32 + +typedef struct _xkbSetGeometry { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetGeometry */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD8 nShapes; + CARD8 nSections; + Atom name B32; + CARD16 widthMM B16; + CARD16 heightMM B16; + CARD16 nProperties B16; + CARD16 nColors B16; + CARD16 nDoodads B16; + CARD16 nKeyAliases B16; + CARD8 baseColorNdx; + CARD8 labelColorNdx; + CARD16 pad B16; +} xkbSetGeometryReq; +#define sz_xkbSetGeometryReq 28 + +typedef struct _xkbPerClientFlags { + CARD8 reqType; + CARD8 xkbReqType;/* always X_KBPerClientFlags */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 pad1 B16; + CARD32 change B32; + CARD32 value B32; + CARD32 ctrlsToChange B32; + CARD32 autoCtrls B32; + CARD32 autoCtrlValues B32; +} xkbPerClientFlagsReq; +#define sz_xkbPerClientFlagsReq 28 + +typedef struct _xkbPerClientFlagsReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 supported B32; + CARD32 value B32; + CARD32 autoCtrls B32; + CARD32 autoCtrlValues B32; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xkbPerClientFlagsReply; +#define sz_xkbPerClientFlagsReply 32 + +typedef struct _xkbListComponents { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBListComponents */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 maxNames B16; +} xkbListComponentsReq; +#define sz_xkbListComponentsReq 8 + +typedef struct _xkbListComponentsReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 nKeymaps B16; + CARD16 nKeycodes B16; + CARD16 nTypes B16; + CARD16 nCompatMaps B16; + CARD16 nSymbols B16; + CARD16 nGeometries B16; + CARD16 extra B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xkbListComponentsReply; +#define sz_xkbListComponentsReply 32 + +typedef struct _xkbGetKbdByName { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetKbdByName */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 need B16; /* combination of XkbGBN_* */ + CARD16 want B16; /* combination of XkbGBN_* */ + BOOL load; + CARD8 pad; +} xkbGetKbdByNameReq; +#define sz_xkbGetKbdByNameReq 12 + +typedef struct _xkbGetKbdByNameReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + KeyCode minKeyCode; + KeyCode maxKeyCode; + BOOL loaded; + BOOL newKeyboard; + CARD16 found B16; /* combination of XkbGBN_* */ + CARD16 reported B16; /* combination of XkbAllComponents */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xkbGetKbdByNameReply; +#define sz_xkbGetKbdByNameReply 32 + +typedef struct _xkbDeviceLedsWireDesc { + CARD16 ledClass B16; + CARD16 ledID B16; + CARD32 namesPresent B32; + CARD32 mapsPresent B32; + CARD32 physIndicators B32; + CARD32 state B32; +} xkbDeviceLedsWireDesc; +#define sz_xkbDeviceLedsWireDesc 20 + +typedef struct _xkbGetDeviceInfo { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBGetDeviceInfo */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD16 wanted B16; + BOOL allBtns; + CARD8 firstBtn; + CARD8 nBtns; + CARD8 pad; + CARD16 ledClass B16; + CARD16 ledID B16; +} xkbGetDeviceInfoReq; +#define sz_xkbGetDeviceInfoReq 16 + +typedef struct _xkbGetDeviceInfoReply { + CARD8 type; /* always X_Reply */ + CARD8 deviceID; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 present B16; + CARD16 supported B16; + CARD16 unsupported B16; + CARD16 nDeviceLedFBs B16; + CARD8 firstBtnWanted; + CARD8 nBtnsWanted; + CARD8 firstBtnRtrn; + CARD8 nBtnsRtrn; + CARD8 totalBtns; + BOOL hasOwnState; + CARD16 dfltKbdFB B16; + CARD16 dfltLedFB B16; + CARD16 pad B16; + Atom devType B32; +} xkbGetDeviceInfoReply; +#define sz_xkbGetDeviceInfoReply 32 + +typedef struct _xkbSetDeviceInfo { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetDeviceInfo */ + CARD16 length B16; + CARD16 deviceSpec B16; + CARD8 firstBtn; + CARD8 nBtns; + CARD16 change B16; + CARD16 nDeviceLedFBs B16; +} xkbSetDeviceInfoReq; +#define sz_xkbSetDeviceInfoReq 12 + +typedef struct _xkbSetDebuggingFlags { + CARD8 reqType; + CARD8 xkbReqType; /* always X_KBSetDebuggingFlags */ + CARD16 length B16; + CARD16 msgLength B16; + CARD16 pad B16; + CARD32 affectFlags B32; + CARD32 flags B32; + CARD32 affectCtrls B32; + CARD32 ctrls B32; +} xkbSetDebuggingFlagsReq; +#define sz_xkbSetDebuggingFlagsReq 24 + +typedef struct _xkbSetDebuggingFlagsReply { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 currentFlags B32; + CARD32 currentCtrls B32; + CARD32 supportedFlags B32; + CARD32 supportedCtrls B32; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xkbSetDebuggingFlagsReply; +#define sz_xkbSetDebuggingFlagsReply 32 + + /* + * X KEYBOARD EXTENSION EVENT STRUCTURES + */ + +typedef struct _xkbAnyEvent { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xkbAnyEvent; +#define sz_xkbAnyEvent 32 + +typedef struct _xkbNewKeyboardNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 oldDeviceID; + KeyCode minKeyCode; + KeyCode maxKeyCode; + KeyCode oldMinKeyCode; + KeyCode oldMaxKeyCode; + CARD8 requestMajor; + CARD8 requestMinor; + CARD16 changed B16; + CARD8 detail; + CARD8 pad1; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xkbNewKeyboardNotify; +#define sz_xkbNewKeyboardNotify 32 + +typedef struct _xkbMapNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 ptrBtnActions; + CARD16 changed B16; + KeyCode minKeyCode; + KeyCode maxKeyCode; + CARD8 firstType; + CARD8 nTypes; + KeyCode firstKeySym; + CARD8 nKeySyms; + KeyCode firstKeyAct; + CARD8 nKeyActs; + KeyCode firstKeyBehavior; + CARD8 nKeyBehaviors; + KeyCode firstKeyExplicit; + CARD8 nKeyExplicit; + KeyCode firstModMapKey; + CARD8 nModMapKeys; + KeyCode firstVModMapKey; + CARD8 nVModMapKeys; + CARD16 virtualMods B16; + CARD16 pad1 B16; +} xkbMapNotify; +#define sz_xkbMapNotify 32 + +typedef struct _xkbStateNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 mods; + CARD8 baseMods; + CARD8 latchedMods; + CARD8 lockedMods; + CARD8 group; + INT16 baseGroup B16; + INT16 latchedGroup B16; + CARD8 lockedGroup; + CARD8 compatState; + CARD8 grabMods; + CARD8 compatGrabMods; + CARD8 lookupMods; + CARD8 compatLookupMods; + CARD16 ptrBtnState B16; + CARD16 changed B16; + KeyCode keycode; + CARD8 eventType; + CARD8 requestMajor; + CARD8 requestMinor; +} xkbStateNotify; +#define sz_xkbStateNotify 32 + +typedef struct _xkbControlsNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 numGroups; + CARD16 pad1 B16; + CARD32 changedControls B32; + CARD32 enabledControls B32; + CARD32 enabledControlChanges B32; + KeyCode keycode; + CARD8 eventType; + CARD8 requestMajor; + CARD8 requestMinor; + CARD32 pad2 B32; +} xkbControlsNotify; +#define sz_xkbControlsNotify 32 + +typedef struct _xkbIndicatorNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 state B32; + CARD32 changed B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xkbIndicatorNotify; +#define sz_xkbIndicatorNotify 32 + +typedef struct _xkbNamesNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 pad1; + CARD16 changed B16; + CARD8 firstType; + CARD8 nTypes; + CARD8 firstLevelName; + CARD8 nLevelNames; + CARD8 pad2; + CARD8 nRadioGroups; + CARD8 nAliases; + CARD8 changedGroupNames; + CARD16 changedVirtualMods B16; + CARD8 firstKey; + CARD8 nKeys; + CARD32 changedIndicators B32; + CARD32 pad3 B32; +} xkbNamesNotify; +#define sz_xkbNamesNotify 32 + +typedef struct _xkbCompatMapNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 changedGroups; + CARD16 firstSI B16; + CARD16 nSI B16; + CARD16 nTotalSI B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xkbCompatMapNotify; +#define sz_xkbCompatMapNotify 32 + +typedef struct _xkbBellNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 bellClass; + CARD8 bellID; + CARD8 percent; + CARD16 pitch B16; + CARD16 duration B16; + Atom name B32; + Window window B32; + BOOL eventOnly; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; +} xkbBellNotify; +#define sz_xkbBellNotify 32 + +typedef struct _xkbActionMessage { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + KeyCode keycode; + BOOL press; + BOOL keyEventFollows; + CARD8 mods; + CARD8 group; + CARD8 message[8]; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xkbActionMessage; +#define sz_xkbActionMessage 32 + +typedef struct _xkbAccessXNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + KeyCode keycode; + CARD16 detail B16; + CARD16 slowKeysDelay B16; + CARD16 debounceDelay B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xkbAccessXNotify; +#define sz_xkbAccessXNotify 32 + +typedef struct _xkbExtensionDeviceNotify { + BYTE type; + BYTE xkbType; + CARD16 sequenceNumber B16; + Time time B32; + CARD8 deviceID; + CARD8 pad1; + CARD16 reason B16; + CARD16 ledClass B16; + CARD16 ledID B16; + CARD32 ledsDefined B32; + CARD32 ledState B32; + CARD8 firstBtn; + CARD8 nBtns; + CARD16 supported B16; + CARD16 unsupported B16; + CARD16 pad3 B16; +} xkbExtensionDeviceNotify; +#define sz_xkbExtensionDeviceNotify 32 + +typedef struct _xkbEvent { + union { + xkbAnyEvent any; + xkbNewKeyboardNotify new_kbd; + xkbMapNotify map; + xkbStateNotify state; + xkbControlsNotify ctrls; + xkbIndicatorNotify indicators; + xkbNamesNotify names; + xkbCompatMapNotify compat; + xkbBellNotify bell; + xkbActionMessage message; + xkbAccessXNotify accessx; + xkbExtensionDeviceNotify device; + } u; +} xkbEvent; +#define sz_xkbEvent 32 + +#undef Window +#undef Atom +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _XKBPROTO_H_ */ diff --git a/X11/extensions/XKBrules.h b/X11/extensions/XKBrules.h new file mode 100644 index 000000000..0d77ca323 --- /dev/null +++ b/X11/extensions/XKBrules.h @@ -0,0 +1,201 @@ +#ifndef _XKBRULES_H_ +#define _XKBRULES_H_ 1 + +/* $Xorg: XKBrules.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1996 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, 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 Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS 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. + + ********************************************************/ +/* $XFree86: xc/lib/xkbfile/XKBrules.h,v 3.5 2002/11/26 01:43:25 dawes Exp $ */ + +/***====================================================================***/ + +typedef struct _XkbRF_VarDefs { + char * model; + char * layout; + char * variant; + char * options; + unsigned short sz_extra; + unsigned short num_extra; + char * extra_names; + char ** extra_values; +} XkbRF_VarDefsRec,*XkbRF_VarDefsPtr; + +typedef struct _XkbRF_VarDesc { + char * name; + char * desc; +} XkbRF_VarDescRec, *XkbRF_VarDescPtr; + +typedef struct _XkbRF_DescribeVars { + int sz_desc; + int num_desc; + XkbRF_VarDescPtr desc; +} XkbRF_DescribeVarsRec,*XkbRF_DescribeVarsPtr; + +typedef struct _XkbRF_Rule { + int number; + int layout_num; + int variant_num; + char * model; + char * layout; + char * variant; + char * option; + /* yields */ + char * keycodes; + char * symbols; + char * types; + char * compat; + char * geometry; + char * keymap; + unsigned flags; +} XkbRF_RuleRec,*XkbRF_RulePtr; + +typedef struct _XkbRF_Group { + int number; + char * name; + char * words; +} XkbRF_GroupRec, *XkbRF_GroupPtr; + +#define XkbRF_PendingMatch (1L<<1) +#define XkbRF_Option (1L<<2) +#define XkbRF_Append (1L<<3) +#define XkbRF_Normal (1L<<4) +#define XkbRF_Invalid (1L<<5) + +typedef struct _XkbRF_Rules { + XkbRF_DescribeVarsRec models; + XkbRF_DescribeVarsRec layouts; + XkbRF_DescribeVarsRec variants; + XkbRF_DescribeVarsRec options; + unsigned short sz_extra; + unsigned short num_extra; + char ** extra_names; + XkbRF_DescribeVarsPtr extra; + + unsigned short sz_rules; + unsigned short num_rules; + XkbRF_RulePtr rules; + unsigned short sz_groups; + unsigned short num_groups; + XkbRF_GroupPtr groups; +} XkbRF_RulesRec, *XkbRF_RulesPtr; + +/***====================================================================***/ + +_XFUNCPROTOBEGIN + +extern Bool XkbRF_GetComponents( + XkbRF_RulesPtr /* rules */, + XkbRF_VarDefsPtr /* var_defs */, + XkbComponentNamesPtr /* names */ +); + +extern XkbRF_RulePtr XkbRF_AddRule( + XkbRF_RulesPtr /* rules */ +); + +extern XkbRF_GroupPtr XkbRF_AddGroup(XkbRF_RulesPtr rules); + +extern Bool XkbRF_LoadRules( + FILE * /* file */, + XkbRF_RulesPtr /* rules */ +); + +extern Bool XkbRF_LoadRulesByName( + char * /* base */, + char * /* locale */, + XkbRF_RulesPtr /* rules */ +); + +/***====================================================================***/ + +extern XkbRF_VarDescPtr XkbRF_AddVarDesc( + XkbRF_DescribeVarsPtr /* vars */ +); + +extern XkbRF_VarDescPtr XkbRF_AddVarDescCopy( + XkbRF_DescribeVarsPtr /* vars */, + XkbRF_VarDescPtr /* copy_from */ +); + +extern XkbRF_DescribeVarsPtr XkbRF_AddVarToDescribe( + XkbRF_RulesPtr /* rules */, + char * /* name */ +); + +extern Bool XkbRF_LoadDescriptions( + FILE * /* file */, + XkbRF_RulesPtr /* rules */ +); + +extern Bool XkbRF_LoadDescriptionsByName( + char * /* base */, + char * /* locale */, + XkbRF_RulesPtr /* rules */ +); + +extern XkbRF_RulesPtr XkbRF_Load( + char * /* base */, + char * /* locale */, + Bool /* wantDesc */, + Bool /* wantRules */ +); + +extern XkbRF_RulesPtr XkbRF_Create( + int /* sz_rules */, + int /* sz_extra */ +); + +/***====================================================================***/ + +extern void XkbRF_Free( + XkbRF_RulesPtr /* rules */, + Bool /* freeRules */ +); + + +/***====================================================================***/ + +#define _XKB_RF_NAMES_PROP_ATOM "_XKB_RULES_NAMES" +#define _XKB_RF_NAMES_PROP_MAXLEN 1024 + +#ifndef XKB_IN_SERVER + +extern Bool XkbRF_GetNamesProp( + Display * /* dpy */, + char ** /* rules_file_rtrn */, + XkbRF_VarDefsPtr /* var_defs_rtrn */ +); + +extern Bool XkbRF_SetNamesProp( + Display * /* dpy */, + char * /* rules_file */, + XkbRF_VarDefsPtr /* var_defs */ +); + +#endif + +_XFUNCPROTOEND + +#endif /* _XKBRULES_H_ */ diff --git a/X11/extensions/XKBsrv.h b/X11/extensions/XKBsrv.h new file mode 100644 index 000000000..49630af1d --- /dev/null +++ b/X11/extensions/XKBsrv.h @@ -0,0 +1,1187 @@ +/* $Xorg: XKBsrv.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* $XdotOrg: $ */ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. + +********************************************************/ +/* $XFree86: xc/include/extensions/XKBsrv.h,v 3.22 2002/11/20 04:49:01 dawes Exp $ */ + +#ifndef _XKBSRV_H_ +#define _XKBSRV_H_ + +#ifdef XKB_IN_SERVER +#define XkbAllocClientMap SrvXkbAllocClientMap +#define XkbAllocServerMap SrvXkbAllocServerMap +#define XkbChangeTypesOfKey SrvXkbChangeTypesOfKey +#define XkbAddKeyType SrvXkbAddKeyType +#define XkbCopyKeyType SrvXkbCopyKeyType +#define XkbCopyKeyTypes SrvXkbCopyKeyTypes +#define XkbFreeClientMap SrvXkbFreeClientMap +#define XkbFreeServerMap SrvXkbFreeServerMap +#define XkbInitCanonicalKeyTypes SrvXkbInitCanonicalKeyTypes +#define XkbKeyTypesForCoreSymbols SrvXkbKeyTypesForCoreSymbols +#define XkbApplyCompatMapToKey SrvXkbApplyCompatMapToKey +#define XkbUpdateMapFromCore SrvXkbUpdateMapFromCore +#define XkbResizeKeyActions SrvXkbResizeKeyActions +#define XkbResizeKeySyms SrvXkbResizeKeySyms +#define XkbResizeKeyType SrvXkbResizeKeyType +#define XkbAllocCompatMap SrvXkbAllocCompatMap +#define XkbAllocControls SrvXkbAllocControls +#define XkbAllocIndicatorMaps SrvXkbAllocIndicatorMaps +#define XkbAllocKeyboard SrvXkbAllocKeyboard +#define XkbAllocNames SrvXkbAllocNames +#define XkbFreeCompatMap SrvXkbFreeCompatMap +#define XkbFreeControls SrvXkbFreeControls +#define XkbFreeIndicatorMaps SrvXkbFreeIndicatorMaps +#define XkbFreeKeyboard SrvXkbFreeKeyboard +#define XkbFreeNames SrvXkbFreeNames +#define XkbAddDeviceLedInfo SrvXkbAddDeviceLedInfo +#define XkbAllocDeviceInfo SrvXkbAllocDeviceInfo +#define XkbFreeDeviceInfo SrvXkbFreeDeviceInfo +#define XkbResizeDeviceButtonActions SrvXkbResizeDeviceButtonActions +#define XkbLatchModifiers SrvXkbLatchModifiers +#define XkbLatchGroup SrvXkbLatchGroup +#define XkbVirtualModsToReal SrvXkbVirtualModsToReal +#define XkbChangeKeycodeRange SrvXkbChangeKeycodeRange +#define XkbApplyVirtualModChanges SrvXkbApplyVirtualModChanges +#define XkbUpdateActionVirtualMods SrvXkbUpdateActionVirtualMods +#define XkbUpdateKeyTypeVirtualMods SrvXkbUpdateKeyTypeVirtualMods +#endif + +#include +#include +#include "inputstr.h" + +typedef struct _XkbInterest { + DeviceIntPtr dev; + ClientPtr client; + XID resource; + struct _XkbInterest * next; + CARD16 extDevNotifyMask; + CARD16 stateNotifyMask; + CARD16 namesNotifyMask; + CARD32 ctrlsNotifyMask; + CARD8 compatNotifyMask; + BOOL bellNotifyMask; + BOOL actionMessageMask; + CARD16 accessXNotifyMask; + CARD32 iStateNotifyMask; + CARD32 iMapNotifyMask; + CARD16 altSymsNotifyMask; + CARD32 autoCtrls; + CARD32 autoCtrlValues; +} XkbInterestRec,*XkbInterestPtr; + +typedef struct _XkbRadioGroup { + CARD8 flags; + CARD8 nMembers; + CARD8 dfltDown; + CARD8 currentDown; + CARD8 members[XkbRGMaxMembers]; +} XkbRadioGroupRec, *XkbRadioGroupPtr; + +typedef struct _XkbEventCause { + CARD8 kc; + CARD8 event; + CARD8 mjr; + CARD8 mnr; + ClientPtr client; +} XkbEventCauseRec,*XkbEventCausePtr; +#define XkbSetCauseKey(c,k,e) { (c)->kc= (k),(c)->event= (e),\ + (c)->mjr= (c)->mnr= 0; \ + (c)->client= NULL; } +#define XkbSetCauseReq(c,j,n,cl) { (c)->kc= (c)->event= 0,\ + (c)->mjr= (j),(c)->mnr= (n);\ + (c)->client= (cl); } +#define XkbSetCauseCoreReq(c,e,cl) XkbSetCauseReq(c,e,0,cl) +#define XkbSetCauseXkbReq(c,e,cl) XkbSetCauseReq(c,XkbReqCode,e,cl) +#define XkbSetCauseUnknown(c) XkbSetCauseKey(c,0,0) + +#define _OFF_TIMER 0 +#define _KRG_WARN_TIMER 1 +#define _KRG_TIMER 2 +#define _SK_TIMEOUT_TIMER 3 +#define _ALL_TIMEOUT_TIMER 4 + +#define _BEEP_NONE 0 +#define _BEEP_FEATURE_ON 1 +#define _BEEP_FEATURE_OFF 2 +#define _BEEP_FEATURE_CHANGE 3 +#define _BEEP_SLOW_WARN 4 +#define _BEEP_SLOW_PRESS 5 +#define _BEEP_SLOW_ACCEPT 6 +#define _BEEP_SLOW_REJECT 7 +#define _BEEP_SLOW_RELEASE 8 +#define _BEEP_STICKY_LATCH 9 +#define _BEEP_STICKY_LOCK 10 +#define _BEEP_STICKY_UNLOCK 11 +#define _BEEP_LED_ON 12 +#define _BEEP_LED_OFF 13 +#define _BEEP_LED_CHANGE 14 +#define _BEEP_BOUNCE_REJECT 15 + +typedef struct _XkbSrvInfo { + XkbStateRec prev_state; + XkbStateRec state; + XkbDescPtr desc; + + DeviceIntPtr device; + KbdCtrlProcPtr kbdProc; + + XkbRadioGroupPtr radioGroups; + CARD8 nRadioGroups; + CARD8 clearMods; + CARD8 setMods; + INT16 groupChange; + + CARD16 dfltPtrDelta; + + double mouseKeysCurve; + double mouseKeysCurveFactor; + INT16 mouseKeysDX; + INT16 mouseKeysDY; + CARD8 mouseKeysFlags; + Bool mouseKeysAccel; + CARD8 mouseKeysCounter; + + CARD8 lockedPtrButtons; + CARD8 shiftKeyCount; + KeyCode mouseKey; + KeyCode inactiveKey; + KeyCode slowKey; + KeyCode repeatKey; + CARD8 krgTimerActive; + CARD8 beepType; + CARD8 beepCount; + + CARD32 flags; + CARD32 lastPtrEventTime; + CARD32 lastShiftEventTime; + OsTimerPtr beepTimer; + OsTimerPtr mouseKeyTimer; + OsTimerPtr slowKeysTimer; + OsTimerPtr bounceKeysTimer; + OsTimerPtr repeatKeyTimer; + OsTimerPtr krgTimer; +} XkbSrvInfoRec, *XkbSrvInfoPtr; + +#define XkbSLI_IsDefault (1L<<0) +#define XkbSLI_HasOwnState (1L<<1) + +typedef struct _XkbSrvLedInfo { + CARD16 flags; + CARD16 class; + CARD16 id; + union { + KbdFeedbackPtr kf; + LedFeedbackPtr lf; + } fb; + + CARD32 physIndicators; + CARD32 autoState; + CARD32 explicitState; + CARD32 effectiveState; + + CARD32 mapsPresent; + CARD32 namesPresent; + XkbIndicatorMapPtr maps; + Atom * names; + + CARD32 usesBase; + CARD32 usesLatched; + CARD32 usesLocked; + CARD32 usesEffective; + CARD32 usesCompat; + CARD32 usesControls; + + CARD32 usedComponents; +} XkbSrvLedInfoRec, *XkbSrvLedInfoPtr; + +/* + * Settings for xkbClientFlags field (used by DIX) + * These flags _must_ not overlap with XkbPCF_* + */ +#define _XkbClientInitialized (1<<15) + +#define _XkbWantsDetectableAutoRepeat(c)\ + ((c)->xkbClientFlags&XkbPCF_DetectableAutoRepeatMask) + +/* + * Settings for flags field + */ +#define _XkbStateNotifyInProgress (1<<0) + +typedef struct +{ + ProcessInputProc processInputProc; + ProcessInputProc realInputProc; + DeviceUnwrapProc unwrapProc; +} xkbDeviceInfoRec, *xkbDeviceInfoPtr; + +#define WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \ + device->public.processInputProc = proc; \ + oldprocs->processInputProc = \ + oldprocs->realInputProc = device->public.realInputProc; \ + device->public.realInputProc = proc; \ + oldprocs->unwrapProc = device->unwrapProc; \ + device->unwrapProc = unwrapproc; + +#define COND_WRAP_PROCESS_INPUT_PROC(device, oldprocs, proc, unwrapproc) \ + if (device->public.processInputProc == device->public.realInputProc)\ + device->public.processInputProc = proc; \ + oldprocs->processInputProc = \ + oldprocs->realInputProc = device->public.realInputProc; \ + device->public.realInputProc = proc; \ + oldprocs->unwrapProc = device->unwrapProc; \ + device->unwrapProc = unwrapproc; + +#define UNWRAP_PROCESS_INPUT_PROC(device, oldprocs) \ + device->public.processInputProc = oldprocs->processInputProc; \ + device->public.realInputProc = oldprocs->realInputProc; \ + device->unwrapProc = oldprocs->unwrapProc; + +#define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr) (dev)->devPrivates[xkbDevicePrivateIndex].ptr) + +/***====================================================================***/ + + +/***====================================================================***/ + +#define XkbAX_KRGMask (XkbSlowKeysMask|XkbBounceKeysMask) +#define XkbAllFilteredEventsMask \ + (XkbAccessXKeysMask|XkbRepeatKeysMask|XkbMouseKeysAccelMask|XkbAX_KRGMask) + +/***====================================================================***/ + +extern int XkbReqCode; +extern int XkbEventBase; +extern int XkbKeyboardErrorCode; +extern int XkbDisableLockActions; +extern char * XkbBaseDirectory; +extern char * XkbBinDirectory; +extern char * XkbInitialMap; +extern int _XkbClientMajor; +extern int _XkbClientMinor; +extern unsigned int XkbXIUnsupported; + +extern char * XkbModelUsed,*XkbLayoutUsed,*XkbVariantUsed,*XkbOptionsUsed; +extern Bool noXkbExtension; +extern Bool XkbWantRulesProp; + +extern pointer XkbLastRepeatEvent; + +extern CARD32 xkbDebugFlags; +extern CARD32 xkbDebugCtrls; + +#define _XkbAlloc(s) xalloc((s)) +#define _XkbCalloc(n,s) Xcalloc((n)*(s)) +#define _XkbRealloc(o,s) Xrealloc((o),(s)) +#define _XkbTypedAlloc(t) ((t *)xalloc(sizeof(t))) +#define _XkbTypedCalloc(n,t) ((t *)Xcalloc((n)*sizeof(t))) +#define _XkbTypedRealloc(o,n,t) \ + ((o)?(t *)Xrealloc((o),(n)*sizeof(t)):_XkbTypedCalloc(n,t)) +#define _XkbClearElems(a,f,l,t) bzero(&(a)[f],((l)-(f)+1)*sizeof(t)) +#define _XkbFree(p) Xfree(p) + +#define _XkbLibError(c,l,d) \ + { _XkbErrCode= (c); _XkbErrLocation= (l); _XkbErrData= (d); } +#define _XkbErrCode2(a,b) ((XID)((((unsigned int)(a))<<24)|((b)&0xffffff))) +#define _XkbErrCode3(a,b,c) _XkbErrCode2(a,(((unsigned int)(b))<<16)|(c)) +#define _XkbErrCode4(a,b,c,d) _XkbErrCode3(a,b,((((unsigned int)(c))<<8)|(d))) + +extern int DeviceKeyPress,DeviceKeyRelease; +extern int DeviceButtonPress,DeviceButtonRelease; + +#ifdef XINPUT +#define _XkbIsPressEvent(t) (((t)==KeyPress)||((t)==DeviceKeyPress)) +#define _XkbIsReleaseEvent(t) (((t)==KeyRelease)||((t)==DeviceKeyRelease)) +#else +#define _XkbIsPressEvent(t) ((t)==KeyPress) +#define _XkbIsReleaseEvent(t) ((t)==KeyRelease) +#endif + +#define _XkbCoreKeycodeInRange(c,k) (((k)>=(c)->curKeySyms.minKeyCode)&&\ + ((k)<=(c)->curKeySyms.maxKeyCode)) +#define _XkbCoreNumKeys(c) ((c)->curKeySyms.maxKeyCode-\ + (c)->curKeySyms.minKeyCode+1) + +#define XConvertCase(s,l,u) XkbConvertCase(s,l,u) +#undef IsKeypadKey +#define IsKeypadKey(s) XkbKSIsKeypad(s) + +#define Status int +#define XPointer pointer +#define Display struct _XDisplay + +#ifndef True +#define True 1 +#define False 0 +#endif + +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else +#define PATH_MAX 1024 +#endif +#endif + +_XFUNCPROTOBEGIN + +extern void XkbUseMsg( + void +); + +extern int XkbProcessArguments( + int /* argc */, + char ** /* argv */, + int /* i */ +); + +extern void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc); + +extern void XkbFreeCompatMap( + XkbDescPtr /* xkb */, + unsigned int /* which */, + Bool /* freeMap */ +); + +extern void XkbFreeNames( + XkbDescPtr /* xkb */, + unsigned int /* which */, + Bool /* freeMap */ +); + +extern DeviceIntPtr _XkbLookupAnyDevice( + int /* id */, + int * /* why_rtrn */ +); + +extern DeviceIntPtr _XkbLookupKeyboard( + int /* id */, + int * /* why_rtrn */ +); + +extern DeviceIntPtr _XkbLookupBellDevice( + int /* id */, + int * /* why_rtrn */ +); + +extern DeviceIntPtr _XkbLookupLedDevice( + int /* id */, + int * /* why_rtrn */ +); + +extern DeviceIntPtr _XkbLookupButtonDevice( + int /* id */, + int * /* why_rtrn */ +); + +extern XkbDescPtr XkbAllocKeyboard( + void +); + +extern Status XkbAllocClientMap( + XkbDescPtr /* xkb */, + unsigned int /* which */, + unsigned int /* nTypes */ +); + +extern Status XkbAllocServerMap( + XkbDescPtr /* xkb */, + unsigned int /* which */, + unsigned int /* nNewActions */ +); + +extern void XkbFreeClientMap( + XkbDescPtr /* xkb */, + unsigned int /* what */, + Bool /* freeMap */ +); + +extern void XkbFreeServerMap( + XkbDescPtr /* xkb */, + unsigned int /* what */, + Bool /* freeMap */ +); + +extern Status XkbAllocIndicatorMaps( + XkbDescPtr /* xkb */ +); + +extern Status XkbAllocCompatMap( + XkbDescPtr /* xkb */, + unsigned int /* which */, + unsigned int /* nInterpret */ +); + +extern Status XkbAllocNames( + XkbDescPtr /* xkb */, + unsigned int /* which */, + int /* nTotalRG */, + int /* nTotalAliases */ +); + +extern Status XkbAllocControls( + XkbDescPtr /* xkb */, + unsigned int /* which*/ +); + +extern Status XkbCopyKeyType( + XkbKeyTypePtr /* from */, + XkbKeyTypePtr /* into */ +); + +extern Status XkbCopyKeyTypes( + XkbKeyTypePtr /* from */, + XkbKeyTypePtr /* into */, + int /* num_types */ +); + +extern Status XkbResizeKeyType( + XkbDescPtr /* xkb */, + int /* type_ndx */, + int /* map_count */, + Bool /* want_preserve */, + int /* new_num_lvls */ +); + +extern void XkbFreeKeyboard( + XkbDescPtr /* xkb */, + unsigned int /* which */, + Bool /* freeDesc */ +); + +extern void XkbSetActionKeyMods( + XkbDescPtr /* xkb */, + XkbAction * /* act */, + unsigned int /* mods */ +); + +extern Bool XkbCheckActionVMods( + XkbDescPtr /* xkb */, + XkbAction * /* act */, + unsigned int /* changed */ +); + +extern Bool XkbApplyVModChanges( + XkbSrvInfoPtr /* xkbi */, + unsigned int /* changed */, + XkbChangesPtr /* pChanges */, + unsigned int * /* needChecksRtrn */, + XkbEventCausePtr /* cause */ +); + +extern void XkbApplyVModChangesToAllDevices( + DeviceIntPtr /* dev */, + XkbDescPtr /* xkb */, + unsigned int /* changed */, + XkbEventCausePtr /* cause */ +); + +extern unsigned int XkbMaskForVMask( + XkbDescPtr /* xkb */, + unsigned int /* vmask */ +); + +extern Bool XkbVirtualModsToReal( + XkbDescPtr /* xkb */, + unsigned int /* virtua_mask */, + unsigned int * /* mask_rtrn */ +); + +extern unsigned int XkbAdjustGroup( + int /* group */, + XkbControlsPtr /* ctrls */ +); + +extern KeySym *XkbResizeKeySyms( + XkbDescPtr /* xkb */, + int /* key */, + int /* needed */ +); + +extern XkbAction *XkbResizeKeyActions( + XkbDescPtr /* xkb */, + int /* key */, + int /* needed */ +); + +extern void XkbUpdateKeyTypesFromCore( + DeviceIntPtr /* pXDev */, + KeyCode /* first */, + CARD8 /* num */, + XkbChangesPtr /* pChanges */ +); + +extern void XkbUpdateDescActions( + XkbDescPtr /* xkb */, + KeyCode /* first */, + CARD8 /* num */, + XkbChangesPtr /* changes */ +); + +extern void XkbUpdateActions( + DeviceIntPtr /* pXDev */, + KeyCode /* first */, + CARD8 /* num */, + XkbChangesPtr /* pChanges */, + unsigned int * /* needChecksRtrn */, + XkbEventCausePtr /* cause */ +); + +extern void XkbUpdateCoreDescription( + DeviceIntPtr /* keybd */, + Bool /* resize */ +); + +extern void XkbApplyMappingChange( + DeviceIntPtr /* pXDev */, + CARD8 /* request */, + KeyCode /* firstKey */, + CARD8 /* num */, + ClientPtr /* client */ +); + +extern void XkbSetIndicators( + DeviceIntPtr /* pXDev */, + CARD32 /* affect */, + CARD32 /* values */, + XkbEventCausePtr /* cause */ +); + +extern void XkbUpdateIndicators( + DeviceIntPtr /* keybd */, + CARD32 /* changed */, + Bool /* check_edevs */, + XkbChangesPtr /* pChanges */, + XkbEventCausePtr /* cause */ +); + +extern XkbSrvLedInfoPtr XkbAllocSrvLedInfo( + DeviceIntPtr /* dev */, + KbdFeedbackPtr /* kf */, + LedFeedbackPtr /* lf */, + unsigned int /* needed_parts */ +); + +extern XkbSrvLedInfoPtr XkbFindSrvLedInfo( + DeviceIntPtr /* dev */, + unsigned int /* class */, + unsigned int /* id */, + unsigned int /* needed_parts */ +); + +extern void XkbApplyLedNameChanges( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* sli */, + unsigned int /* changed_names */, + xkbExtensionDeviceNotify * /* ed */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void XkbApplyLedMapChanges( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* sli */, + unsigned int /* changed_maps */, + xkbExtensionDeviceNotify * /* ed */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void XkbApplyLedStateChanges( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* sli */, + unsigned int /* changed_leds */, + xkbExtensionDeviceNotify * /* ed */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void XkbUpdateLedAutoState( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* sli */, + unsigned int /* maps_to_check */, + xkbExtensionDeviceNotify * /* ed */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void XkbFlushLedEvents( + DeviceIntPtr /* dev */, + DeviceIntPtr /* kbd */, + XkbSrvLedInfoPtr /* sli */, + xkbExtensionDeviceNotify * /* ed */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void XkbUpdateAllDeviceIndicators( + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern unsigned int XkbIndicatorsToUpdate( + DeviceIntPtr /* dev */, + unsigned long /* state_changes */, + Bool /* enabled_ctrl_changes */ +); + +extern void XkbComputeDerivedState( + XkbSrvInfoPtr /* xkbi */ +); + +extern void XkbCheckSecondaryEffects( + XkbSrvInfoPtr /* xkbi */, + unsigned int /* which */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void XkbCheckIndicatorMaps( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* sli */, + unsigned int /* which */ +); + +extern unsigned int XkbStateChangedFlags( + XkbStatePtr /* old */, + XkbStatePtr /* new */ +); + +extern void XkbSendStateNotify( + DeviceIntPtr /* kbd */, + xkbStateNotify * /* pSN */ +); + +extern void XkbSendMapNotify( + DeviceIntPtr /* kbd */, + xkbMapNotify * /* ev */ +); + +extern int XkbComputeControlsNotify( + DeviceIntPtr /* kbd */, + XkbControlsPtr /* old */, + XkbControlsPtr /* new */, + xkbControlsNotify * /* pCN */, + Bool /* forceCtrlProc */ +); + +extern void XkbSendControlsNotify( + DeviceIntPtr /* kbd */, + xkbControlsNotify * /* ev */ +); + +extern void XkbSendCompatMapNotify( + DeviceIntPtr /* kbd */, + xkbCompatMapNotify * /* ev */ +); + +extern void XkbSendIndicatorNotify( + DeviceIntPtr /* kbd */, + int /* xkbType */, + xkbIndicatorNotify * /* ev */ +); + +extern void XkbHandleBell( + BOOL /* force */, + BOOL /* eventOnly */, + DeviceIntPtr /* kbd */, + CARD8 /* percent */, + pointer /* ctrl */, + CARD8 /* class */, + Atom /* name */, + WindowPtr /* pWin */, + ClientPtr /* pClient */ +); + +extern void XkbSendAccessXNotify( + DeviceIntPtr /* kbd */, + xkbAccessXNotify * /* pEv */ +); + +extern void XkbSendNamesNotify( + DeviceIntPtr /* kbd */, + xkbNamesNotify * /* ev */ +); + +extern void XkbSendCompatNotify( + DeviceIntPtr /* kbd */, + xkbCompatMapNotify * /* ev */ +); + +extern void XkbSendActionMessage( + DeviceIntPtr /* kbd */, + xkbActionMessage * /* ev */ +); + +extern void XkbSendExtensionDeviceNotify( + DeviceIntPtr /* kbd */, + ClientPtr /* client */, + xkbExtensionDeviceNotify * /* ev */ +); + +extern void XkbSendNotification( + DeviceIntPtr /* kbd */, + XkbChangesPtr /* pChanges */, + XkbEventCausePtr /* cause */ +); + +extern void XkbProcessKeyboardEvent( + struct _xEvent * /* xE */, + DeviceIntPtr /* keybd */, + int /* count */ +); + +extern void XkbProcessOtherEvent( + struct _xEvent * /* xE */, + DeviceIntPtr /* keybd */, + int /* count */ +); + +extern void XkbHandleActions( + DeviceIntPtr /* dev */, + DeviceIntPtr /* kbd */, + struct _xEvent * /* xE */, + int /* count */ +); + +extern Bool XkbEnableDisableControls( + XkbSrvInfoPtr /* xkbi */, + unsigned long /* change */, + unsigned long /* newValues */, + XkbChangesPtr /* changes */, + XkbEventCausePtr /* cause */ +); + +extern void AccessXInit( + DeviceIntPtr /* dev */ +); + +extern Bool AccessXFilterPressEvent( + register struct _xEvent * /* xE */, + register DeviceIntPtr /* keybd */, + int /* count */ +); + +extern Bool AccessXFilterReleaseEvent( + register struct _xEvent * /* xE */, + register DeviceIntPtr /* keybd */, + int /* count */ +); + +extern void AccessXCancelRepeatKey( + XkbSrvInfoPtr /* xkbi */, + KeyCode /* key */ +); + +extern void AccessXComputeCurveFactor( + XkbSrvInfoPtr /* xkbi */, + XkbControlsPtr /* ctrls */ +); + +extern XkbDeviceLedInfoPtr XkbAddDeviceLedInfo( + XkbDeviceInfoPtr /* devi */, + unsigned int /* ledClass */, + unsigned int /* ledId */ +); + +extern XkbDeviceInfoPtr XkbAllocDeviceInfo( + unsigned int /* deviceSpec */, + unsigned int /* nButtons */, + unsigned int /* szLeds */ +); + +extern void XkbFreeDeviceInfo( + XkbDeviceInfoPtr /* devi */, + unsigned int /* which */, + Bool /* freeDevI */ +); + +extern Status XkbResizeDeviceButtonActions( + XkbDeviceInfoPtr /* devi */, + unsigned int /* newTotal */ +); + +extern XkbInterestPtr XkbFindClientResource( + DevicePtr /* inDev */, + ClientPtr /* client */ +); + +extern XkbInterestPtr XkbAddClientResource( + DevicePtr /* inDev */, + ClientPtr /* client */, + XID /* id */ +); + +extern int XkbRemoveClient( + DevicePtr /* inDev */, + ClientPtr /* client */ +); + +extern int XkbRemoveResourceClient( + DevicePtr /* inDev */, + XID /* id */ +); + +extern int XkbDDXInitDevice( + DeviceIntPtr /* dev */ +); + +extern int XkbDDXAccessXBeep( + DeviceIntPtr /* dev */, + unsigned int /* what */, + unsigned int /* which */ +); + +extern void XkbDDXKeyClick( + DeviceIntPtr /* dev */, + int /* keycode */, + int /* synthetic */ +); + +extern int XkbDDXUsesSoftRepeat( + DeviceIntPtr /* dev */ +); + +extern void XkbDDXKeybdCtrlProc( + DeviceIntPtr /* dev */, + KeybdCtrl * /* ctrl */ +); + +extern void XkbDDXChangeControls( + DeviceIntPtr /* dev */, + XkbControlsPtr /* old */, + XkbControlsPtr /* new */ +); + +extern void XkbDDXUpdateIndicators( + DeviceIntPtr /* keybd */, + CARD32 /* newState */ +); + +extern void XkbDDXUpdateDeviceIndicators( + DeviceIntPtr /* dev */, + XkbSrvLedInfoPtr /* sli */, + CARD32 /* newState */ +); + +extern void XkbDDXFakePointerButton( + int /* event */, + int /* button */ +); + +extern void XkbDDXFakePointerMotion( + unsigned int /* flags */, + int /* x */, + int /* y */ +); + +extern void XkbDDXFakeDeviceButton( + DeviceIntPtr /* dev */, + Bool /* press */, + int /* button */ +); + +extern int XkbDDXTerminateServer( + DeviceIntPtr /* dev */, + KeyCode /* key */, + XkbAction * /* act */ +); + +extern int XkbDDXSwitchScreen( + DeviceIntPtr /* dev */, + KeyCode /* key */, + XkbAction * /* act */ +); + +extern int XkbDDXPrivate( + DeviceIntPtr /* dev */, + KeyCode /* key */, + XkbAction * /* act */ +); + +extern void XkbDisableComputedAutoRepeats( + DeviceIntPtr /* pXDev */, + unsigned int /* key */ +); + +extern void XkbSetRepeatKeys( + DeviceIntPtr /* pXDev */, + int /* key */, + int /* onoff */ +); + +extern int XkbLatchModifiers( + DeviceIntPtr /* pXDev */, + CARD8 /* mask */, + CARD8 /* latches */ +); + +extern int XkbLatchGroup( + DeviceIntPtr /* pXDev */, + int /* group */ +); + +extern void XkbClearAllLatchesAndLocks( + DeviceIntPtr /* dev */, + XkbSrvInfoPtr /* xkbi */, + Bool /* genEv */, + XkbEventCausePtr /* cause */ +); + +extern void XkbSetRulesDflts( + char * /* rulesFile */, + char * /* model */, + char * /* layout */, + char * /* variant */, + char * /* options */ +); + +extern void XkbInitDevice( + DeviceIntPtr /* pXDev */ +); + +extern Bool XkbInitKeyboardDeviceStruct( + DeviceIntPtr /* pXDev */, + XkbComponentNamesPtr /* pNames */, + KeySymsPtr /* pSyms */, + CARD8 /* pMods */[], + BellProcPtr /* bellProc */, + KbdCtrlProcPtr /* ctrlProc */ +); + +extern int SProcXkbDispatch( + ClientPtr /* client */ +); + +extern XkbGeometryPtr XkbLookupNamedGeometry( + DeviceIntPtr /* dev */, + Atom /* name */, + Bool * /* shouldFree */ +); + +extern char * _XkbDupString( + char * /* str */ +); + +extern void XkbConvertCase( + KeySym /* sym */, + KeySym * /* lower */, + KeySym * /* upper */ +); + +extern Status XkbChangeKeycodeRange( + XkbDescPtr /* xkb */, + int /* minKC */, + int /* maxKC */, + XkbChangesPtr /* changes */ +); + +extern int XkbFinishDeviceInit( + DeviceIntPtr /* pXDev */ +); + +extern void XkbFreeSrvLedInfo( + XkbSrvLedInfoPtr /* sli */ +); + +extern void XkbFreeInfo( + XkbSrvInfoPtr /* xkbi */ +); + +extern Status XkbChangeTypesOfKey( + XkbDescPtr /* xkb */, + int /* key */, + int /* nGroups */, + unsigned int /* groups */, + int * /* newTypesIn */, + XkbMapChangesPtr /* changes */ +); + +extern XkbKeyTypePtr XkbAddKeyType( + XkbDescPtr /* xkb */, + Atom /* name */, + int /* map_count */, + Bool /* want_preserve */, + int /* num_lvls */ +); + +extern Status XkbInitCanonicalKeyTypes( + XkbDescPtr /* xkb */, + unsigned int /* which */, + int /* keypadVMod */ +); + +extern int XkbKeyTypesForCoreSymbols( + XkbDescPtr /* xkb */, + int /* map_width */, + KeySym * /* core_syms */, + unsigned int /* protected */, + int * /* types_inout */, + KeySym * /* xkb_syms_rtrn */ +); + +extern Bool XkbApplyCompatMapToKey( + XkbDescPtr /* xkb */, + KeyCode /* key */, + XkbChangesPtr /* changes */ +); + +extern Bool XkbUpdateMapFromCore( + XkbDescPtr /* xkb */, + KeyCode /* first_key */, + int /* num_keys */, + int /* map_width */, + KeySym * /* core_keysyms */, + XkbChangesPtr /* changes */ +); + +extern void XkbFreeControls( + XkbDescPtr /* xkb */, + unsigned int /* which */, + Bool /* freeMap */ +); + +extern void XkbFreeIndicatorMaps( + XkbDescPtr /* xkb */ +); + +extern Bool XkbApplyVirtualModChanges( + XkbDescPtr /* xkb */, + unsigned int /* changed */, + XkbChangesPtr /* changes */ +); + +extern Bool XkbUpdateActionVirtualMods( + XkbDescPtr /* xkb */, + XkbAction * /* act */, + unsigned int /* changed */ +); + +extern void XkbUpdateKeyTypeVirtualMods( + XkbDescPtr /* xkb */, + XkbKeyTypePtr /* type */, + unsigned int /* changed */, + XkbChangesPtr /* changes */ +); + +extern void XkbSendNewKeyboardNotify( + DeviceIntPtr /* kbd */, + xkbNewKeyboardNotify * /* pNKN */ +); + +#ifdef XKBSRV_NEED_FILE_FUNCS + +#include +#include +#include + +#define _XkbListKeymaps 0 +#define _XkbListKeycodes 1 +#define _XkbListTypes 2 +#define _XkbListCompat 3 +#define _XkbListSymbols 4 +#define _XkbListGeometry 5 +#define _XkbListNumComponents 6 + +typedef struct _XkbSrvListInfo { + int szPool; + int nPool; + char * pool; + + int maxRtrn; + int nTotal; + + char * pattern[_XkbListNumComponents]; + int nFound[_XkbListNumComponents]; +} XkbSrvListInfoRec,*XkbSrvListInfoPtr; + +char * +XkbGetRulesDflts( + XkbRF_VarDefsPtr /* defs */ +); + +extern void XkbSetRulesUsed( + XkbRF_VarDefsPtr /* defs */ +); + + +extern Status XkbDDXList( + DeviceIntPtr /* dev */, + XkbSrvListInfoPtr /* listing */, + ClientPtr /* client */ +); + +extern unsigned int XkbDDXLoadKeymapByNames( + DeviceIntPtr /* keybd */, + XkbComponentNamesPtr /* names */, + unsigned int /* want */, + unsigned int /* need */, + XkbFileInfoPtr /* finfoRtrn */, + char * /* keymapNameRtrn */, + int /* keymapNameRtrnLen */ +); + +extern Bool XkbDDXNamesFromRules( + DeviceIntPtr /* keybd */, + char * /* rules */, + XkbRF_VarDefsPtr /* defs */, + XkbComponentNamesPtr /* names */ +); + +extern FILE *XkbDDXOpenConfigFile( + char * /* mapName */, + char * /* fileNameRtrn */, + int /* fileNameRtrnLen */ +); + +extern Bool XkbDDXApplyConfig( + XPointer /* cfg_in */, + XkbSrvInfoPtr /* xkbi */ +); + +extern XPointer XkbDDXPreloadConfig( + char ** /* rulesFileRtrn */, + XkbRF_VarDefsPtr /* defs */, + XkbComponentNamesPtr /* names */, + DeviceIntPtr /* dev */ +); + +extern int _XkbStrCaseCmp( + char * /* str1 */, + char * /* str2 */ +); + +#endif /* XKBSRV_NEED_FILE_FUNCS */ + + +_XFUNCPROTOEND + +#define XkbAtomGetString(d,s) NameForAtom(s) + +#endif /* _XKBSRV_H_ */ + + diff --git a/X11/extensions/XKBstr.h b/X11/extensions/XKBstr.h new file mode 100644 index 000000000..bc63f4923 --- /dev/null +++ b/X11/extensions/XKBstr.h @@ -0,0 +1,614 @@ +/* $Xorg: XKBstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/************************************************************ +Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Silicon Graphics not be +used in advertising or publicity pertaining to distribution +of the software without specific prior written permission. +Silicon Graphics makes no representation about the suitability +of this software for any purpose. It is provided "as is" +without any express or implied warranty. + +SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON +GRAPHICS 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. + +********************************************************/ + +#ifndef _XKBSTR_H_ +#define _XKBSTR_H_ + +#include + +#define XkbCharToInt(v) ((v)&0x80?(int)((v)|(~0xff)):(int)((v)&0x7f)) +#define XkbIntTo2Chars(i,h,l) (((h)=((i>>8)&0xff)),((l)=((i)&0xff))) + +#if defined(WORD64) && defined(UNSIGNEDBITFIELDS) +#define Xkb2CharsToInt(h,l) ((h)&0x80?(int)(((h)<<8)|(l)|(~0xffff)):\ + (int)(((h)<<8)|(l)&0x7fff)) +#else +#define Xkb2CharsToInt(h,l) ((short)(((h)<<8)|(l))) +#endif + + /* + * Common data structures and access macros + */ + +typedef struct _XkbStateRec { + unsigned char group; + unsigned char locked_group; + unsigned short base_group; + unsigned short latched_group; + unsigned char mods; + unsigned char base_mods; + unsigned char latched_mods; + unsigned char locked_mods; + unsigned char compat_state; + unsigned char grab_mods; + unsigned char compat_grab_mods; + unsigned char lookup_mods; + unsigned char compat_lookup_mods; + unsigned short ptr_buttons; +} XkbStateRec,*XkbStatePtr; +#define XkbModLocks(s) ((s)->locked_mods) +#define XkbStateMods(s) ((s)->base_mods|(s)->latched_mods|XkbModLocks(s)) +#define XkbGroupLock(s) ((s)->locked_group) +#define XkbStateGroup(s) ((s)->base_group+(s)->latched_group+XkbGroupLock(s)) +#define XkbStateFieldFromRec(s) XkbBuildCoreState((s)->lookup_mods,(s)->group) +#define XkbGrabStateFromRec(s) XkbBuildCoreState((s)->grab_mods,(s)->group) + +typedef struct _XkbMods { + unsigned char mask; /* effective mods */ + unsigned char real_mods; + unsigned short vmods; +} XkbModsRec,*XkbModsPtr; + +typedef struct _XkbKTMapEntry { + Bool active; + unsigned char level; + XkbModsRec mods; +} XkbKTMapEntryRec,*XkbKTMapEntryPtr; + +typedef struct _XkbKeyType { + XkbModsRec mods; + unsigned char num_levels; + unsigned char map_count; + XkbKTMapEntryPtr map; + XkbModsPtr preserve; + Atom name; + Atom * level_names; +} XkbKeyTypeRec, *XkbKeyTypePtr; + +#define XkbNumGroups(g) ((g)&0x0f) +#define XkbOutOfRangeGroupInfo(g) ((g)&0xf0) +#define XkbOutOfRangeGroupAction(g) ((g)&0xc0) +#define XkbOutOfRangeGroupNumber(g) (((g)&0x30)>>4) +#define XkbSetGroupInfo(g,w,n) (((w)&0xc0)|(((n)&3)<<4)|((g)&0x0f)) +#define XkbSetNumGroups(g,n) (((g)&0xf0)|((n)&0x0f)) + + /* + * Structures and access macros used primarily by the server + */ + +typedef struct _XkbBehavior { + unsigned char type; + unsigned char data; +} XkbBehavior; + +#define XkbAnyActionDataSize 7 +typedef struct _XkbAnyAction { + unsigned char type; + unsigned char data[XkbAnyActionDataSize]; +} XkbAnyAction; + +typedef struct _XkbModAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + unsigned char vmods1; + unsigned char vmods2; +} XkbModAction; +#define XkbModActionVMods(a) \ + ((short)(((a)->vmods1<<8)|((a)->vmods2))) +#define XkbSetModActionVMods(a,v) \ + (((a)->vmods1=(((v)>>8)&0xff)),(a)->vmods2=((v)&0xff)) + +typedef struct _XkbGroupAction { + unsigned char type; + unsigned char flags; + char group_XXX; +} XkbGroupAction; +#define XkbSAGroup(a) (XkbCharToInt((a)->group_XXX)) +#define XkbSASetGroup(a,g) ((a)->group_XXX=(g)) + +typedef struct _XkbISOAction { + unsigned char type; + unsigned char flags; + unsigned char mask; + unsigned char real_mods; + char group_XXX; + unsigned char affect; + unsigned char vmods1; + unsigned char vmods2; +} XkbISOAction; + +typedef struct _XkbPtrAction { + unsigned char type; + unsigned char flags; + unsigned char high_XXX; + unsigned char low_XXX; + unsigned char high_YYY; + unsigned char low_YYY; +} XkbPtrAction; +#define XkbPtrActionX(a) (Xkb2CharsToInt((a)->high_XXX,(a)->low_XXX)) +#define XkbPtrActionY(a) (Xkb2CharsToInt((a)->high_YYY,(a)->low_YYY)) +#define XkbSetPtrActionX(a,x) (XkbIntTo2Chars(x,(a)->high_XXX,(a)->low_XXX)) +#define XkbSetPtrActionY(a,y) (XkbIntTo2Chars(y,(a)->high_YYY,(a)->low_YYY)) + +typedef struct _XkbPtrBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; +} XkbPtrBtnAction; + +typedef struct _XkbPtrDfltAction { + unsigned char type; + unsigned char flags; + unsigned char affect; + char valueXXX; +} XkbPtrDfltAction; +#define XkbSAPtrDfltValue(a) (XkbCharToInt((a)->valueXXX)) +#define XkbSASetPtrDfltValue(a,c) ((a)->valueXXX= ((c)&0xff)) + +typedef struct _XkbSwitchScreenAction { + unsigned char type; + unsigned char flags; + char screenXXX; +} XkbSwitchScreenAction; +#define XkbSAScreen(a) (XkbCharToInt((a)->screenXXX)) +#define XkbSASetScreen(a,s) ((a)->screenXXX= ((s)&0xff)) + +typedef struct _XkbCtrlsAction { + unsigned char type; + unsigned char flags; + unsigned char ctrls3; + unsigned char ctrls2; + unsigned char ctrls1; + unsigned char ctrls0; +} XkbCtrlsAction; +#define XkbActionSetCtrls(a,c) (((a)->ctrls3=(((c)>>24)&0xff)),\ + ((a)->ctrls2=(((c)>>16)&0xff)),\ + ((a)->ctrls1=(((c)>>8)&0xff)),\ + ((a)->ctrls0=((c)&0xff))) +#define XkbActionCtrls(a) ((((unsigned int)(a)->ctrls3)<<24)|\ + (((unsigned int)(a)->ctrls2)<<16)|\ + (((unsigned int)(a)->ctrls1)<<8)|\ + ((unsigned int)((a)->ctrls0))) + +typedef struct _XkbMessageAction { + unsigned char type; + unsigned char flags; + unsigned char message[6]; +} XkbMessageAction; + +typedef struct _XkbRedirectKeyAction { + unsigned char type; + unsigned char new_key; + unsigned char mods_mask; + unsigned char mods; + unsigned char vmods_mask0; + unsigned char vmods_mask1; + unsigned char vmods0; + unsigned char vmods1; +} XkbRedirectKeyAction; + +#define XkbSARedirectVMods(a) ((((unsigned int)(a)->vmods1)<<8)|\ + ((unsigned int)(a)->vmods0)) +#define XkbSARedirectSetVMods(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) +#define XkbSARedirectVModsMask(a) ((((unsigned int)(a)->vmods_mask1)<<8)|\ + ((unsigned int)(a)->vmods_mask0)) +#define XkbSARedirectSetVModsMask(a,m) (((a)->vmods_mask1=(((m)>>8)&0xff)),\ + ((a)->vmods_mask0=((m)&0xff))) + +typedef struct _XkbDeviceBtnAction { + unsigned char type; + unsigned char flags; + unsigned char count; + unsigned char button; + unsigned char device; +} XkbDeviceBtnAction; + +typedef struct _XkbDeviceValuatorAction { + unsigned char type; + unsigned char device; + unsigned char v1_what; + unsigned char v1_ndx; + unsigned char v1_value; + unsigned char v2_what; + unsigned char v2_ndx; + unsigned char v2_value; +} XkbDeviceValuatorAction; + +typedef union _XkbAction { + XkbAnyAction any; + XkbModAction mods; + XkbGroupAction group; + XkbISOAction iso; + XkbPtrAction ptr; + XkbPtrBtnAction btn; + XkbPtrDfltAction dflt; + XkbSwitchScreenAction screen; + XkbCtrlsAction ctrls; + XkbMessageAction msg; + XkbRedirectKeyAction redirect; + XkbDeviceBtnAction devbtn; + XkbDeviceValuatorAction devval; + unsigned char type; +} XkbAction; + +typedef struct _XkbControls { + unsigned char mk_dflt_btn; + unsigned char num_groups; + unsigned char groups_wrap; + XkbModsRec internal; + XkbModsRec ignore_lock; + unsigned int enabled_ctrls; + unsigned short repeat_delay; + unsigned short repeat_interval; + unsigned short slow_keys_delay; + unsigned short debounce_delay; + unsigned short mk_delay; + unsigned short mk_interval; + unsigned short mk_time_to_max; + unsigned short mk_max_speed; + short mk_curve; + unsigned short ax_options; + unsigned short ax_timeout; + unsigned short axt_opts_mask; + unsigned short axt_opts_values; + unsigned int axt_ctrls_mask; + unsigned int axt_ctrls_values; + unsigned char per_key_repeat[XkbPerKeyBitArraySize]; +} XkbControlsRec, *XkbControlsPtr; + +#define XkbAX_AnyFeedback(c) ((c)->enabled_ctrls&XkbAccessXFeedbackMask) +#define XkbAX_NeedOption(c,w) ((c)->ax_options&(w)) +#define XkbAX_NeedFeedback(c,w) (XkbAX_AnyFeedback(c)&&XkbAX_NeedOption(c,w)) + +typedef struct _XkbServerMapRec { + unsigned short num_acts; + unsigned short size_acts; + XkbAction *acts; + + XkbBehavior *behaviors; + unsigned short *key_acts; +#if defined(__cplusplus) || defined(c_plusplus) + /* explicit is a C++ reserved word */ + unsigned char *c_explicit; +#else + unsigned char *explicit; +#endif + unsigned char vmods[XkbNumVirtualMods]; + unsigned short *vmodmap; +} XkbServerMapRec, *XkbServerMapPtr; + +#define XkbSMKeyActionsPtr(m,k) (&(m)->acts[(m)->key_acts[k]]) + + /* + * Structures and access macros used primarily by clients + */ + +typedef struct _XkbSymMapRec { + unsigned char kt_index[XkbNumKbdGroups]; + unsigned char group_info; + unsigned char width; + unsigned short offset; +} XkbSymMapRec, *XkbSymMapPtr; + +typedef struct _XkbClientMapRec { + unsigned char size_types; + unsigned char num_types; + XkbKeyTypePtr types; + + unsigned short size_syms; + unsigned short num_syms; + KeySym *syms; + XkbSymMapPtr key_sym_map; + + unsigned char *modmap; +} XkbClientMapRec, *XkbClientMapPtr; + +#define XkbCMKeyGroupInfo(m,k) ((m)->key_sym_map[k].group_info) +#define XkbCMKeyNumGroups(m,k) (XkbNumGroups((m)->key_sym_map[k].group_info)) +#define XkbCMKeyGroupWidth(m,k,g) (XkbCMKeyType(m,k,g)->num_levels) +#define XkbCMKeyGroupsWidth(m,k) ((m)->key_sym_map[k].width) +#define XkbCMKeyTypeIndex(m,k,g) ((m)->key_sym_map[k].kt_index[g&0x3]) +#define XkbCMKeyType(m,k,g) (&(m)->types[XkbCMKeyTypeIndex(m,k,g)]) +#define XkbCMKeyNumSyms(m,k) (XkbCMKeyGroupsWidth(m,k)*XkbCMKeyNumGroups(m,k)) +#define XkbCMKeySymsOffset(m,k) ((m)->key_sym_map[k].offset) +#define XkbCMKeySymsPtr(m,k) (&(m)->syms[XkbCMKeySymsOffset(m,k)]) + + /* + * Compatibility structures and access macros + */ + +typedef struct _XkbSymInterpretRec { + KeySym sym; + unsigned char flags; + unsigned char match; + unsigned char mods; + unsigned char virtual_mod; + XkbAnyAction act; +} XkbSymInterpretRec,*XkbSymInterpretPtr; + +typedef struct _XkbCompatMapRec { + XkbSymInterpretPtr sym_interpret; + XkbModsRec groups[XkbNumKbdGroups]; + unsigned short num_si; + unsigned short size_si; +} XkbCompatMapRec, *XkbCompatMapPtr; + +typedef struct _XkbIndicatorMapRec { + unsigned char flags; + unsigned char which_groups; + unsigned char groups; + unsigned char which_mods; + XkbModsRec mods; + unsigned int ctrls; +} XkbIndicatorMapRec, *XkbIndicatorMapPtr; + +#define XkbIM_IsAuto(i) ((((i)->flags&XkbIM_NoAutomatic)==0)&&\ + (((i)->which_groups&&(i)->groups)||\ + ((i)->which_mods&&(i)->mods.mask)||\ + ((i)->ctrls))) +#define XkbIM_InUse(i) (((i)->flags)||((i)->which_groups)||\ + ((i)->which_mods)||((i)->ctrls)) + + +typedef struct _XkbIndicatorRec { + unsigned long phys_indicators; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbIndicatorRec,*XkbIndicatorPtr; + +typedef struct _XkbKeyNameRec { + char name[XkbKeyNameLength]; +} XkbKeyNameRec,*XkbKeyNamePtr; + +typedef struct _XkbKeyAliasRec { + char real[XkbKeyNameLength]; + char alias[XkbKeyNameLength]; +} XkbKeyAliasRec,*XkbKeyAliasPtr; + + /* + * Names for everything + */ +typedef struct _XkbNamesRec { + Atom keycodes; + Atom geometry; + Atom symbols; + Atom types; + Atom compat; + Atom vmods[XkbNumVirtualMods]; + Atom indicators[XkbNumIndicators]; + Atom groups[XkbNumKbdGroups]; + XkbKeyNamePtr keys; + XkbKeyAliasPtr key_aliases; + Atom *radio_groups; + Atom phys_symbols; + + unsigned char num_keys; + unsigned char num_key_aliases; + unsigned short num_rg; +} XkbNamesRec,*XkbNamesPtr; + +typedef struct _XkbGeometry *XkbGeometryPtr; + /* + * Tie it all together into one big keyboard description + */ +typedef struct _XkbDesc { + struct _XDisplay * dpy; + unsigned short flags; + unsigned short device_spec; + KeyCode min_key_code; + KeyCode max_key_code; + + XkbControlsPtr ctrls; + XkbServerMapPtr server; + XkbClientMapPtr map; + XkbIndicatorPtr indicators; + XkbNamesPtr names; + XkbCompatMapPtr compat; + XkbGeometryPtr geom; +} XkbDescRec, *XkbDescPtr; +#define XkbKeyKeyTypeIndex(d,k,g) (XkbCMKeyTypeIndex((d)->map,k,g)) +#define XkbKeyKeyType(d,k,g) (XkbCMKeyType((d)->map,k,g)) +#define XkbKeyGroupWidth(d,k,g) (XkbCMKeyGroupWidth((d)->map,k,g)) +#define XkbKeyGroupsWidth(d,k) (XkbCMKeyGroupsWidth((d)->map,k)) +#define XkbKeyGroupInfo(d,k) (XkbCMKeyGroupInfo((d)->map,(k))) +#define XkbKeyNumGroups(d,k) (XkbCMKeyNumGroups((d)->map,(k))) +#define XkbKeyNumSyms(d,k) (XkbCMKeyNumSyms((d)->map,(k))) +#define XkbKeySymsPtr(d,k) (XkbCMKeySymsPtr((d)->map,(k))) +#define XkbKeySym(d,k,n) (XkbKeySymsPtr(d,k)[n]) +#define XkbKeySymEntry(d,k,sl,g) \ + (XkbKeySym(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl)))) +#define XkbKeyAction(d,k,n) \ + (XkbKeyHasActions(d,k)?&XkbKeyActionsPtr(d,k)[n]:NULL) +#define XkbKeyActionEntry(d,k,sl,g) \ + (XkbKeyHasActions(d,k)?\ + XkbKeyAction(d,k,((XkbKeyGroupsWidth(d,k)*(g))+(sl))):NULL) + +#define XkbKeyHasActions(d,k) ((d)->server->key_acts[k]!=0) +#define XkbKeyNumActions(d,k) (XkbKeyHasActions(d,k)?XkbKeyNumSyms(d,k):1) +#define XkbKeyActionsPtr(d,k) (XkbSMKeyActionsPtr((d)->server,k)) +#define XkbKeycodeInRange(d,k) (((k)>=(d)->min_key_code)&&\ + ((k)<=(d)->max_key_code)) +#define XkbNumKeys(d) ((d)->max_key_code-(d)->min_key_code+1) + + + /* + * The following structures can be used to track changes + * to a keyboard device + */ +typedef struct _XkbMapChanges { + unsigned short changed; + KeyCode min_key_code; + KeyCode max_key_code; + unsigned char first_type; + unsigned char num_types; + KeyCode first_key_sym; + unsigned char num_key_syms; + KeyCode first_key_act; + unsigned char num_key_acts; + KeyCode first_key_behavior; + unsigned char num_key_behaviors; + KeyCode first_key_explicit; + unsigned char num_key_explicit; + KeyCode first_modmap_key; + unsigned char num_modmap_keys; + KeyCode first_vmodmap_key; + unsigned char num_vmodmap_keys; + unsigned char pad; + unsigned short vmods; +} XkbMapChangesRec,*XkbMapChangesPtr; + +typedef struct _XkbControlsChanges { + unsigned int changed_ctrls; + unsigned int enabled_ctrls_changes; + Bool num_groups_changed; +} XkbControlsChangesRec,*XkbControlsChangesPtr; + +typedef struct _XkbIndicatorChanges { + unsigned int state_changes; + unsigned int map_changes; +} XkbIndicatorChangesRec,*XkbIndicatorChangesPtr; + +typedef struct _XkbNameChanges { + unsigned int changed; + unsigned char first_type; + unsigned char num_types; + unsigned char first_lvl; + unsigned char num_lvls; + unsigned char num_aliases; + unsigned char num_rg; + unsigned char first_key; + unsigned char num_keys; + unsigned short changed_vmods; + unsigned long changed_indicators; + unsigned char changed_groups; +} XkbNameChangesRec,*XkbNameChangesPtr; + +typedef struct _XkbCompatChanges { + unsigned char changed_groups; + unsigned short first_si; + unsigned short num_si; +} XkbCompatChangesRec,*XkbCompatChangesPtr; + +typedef struct _XkbChanges { + unsigned short device_spec; + unsigned short state_changes; + XkbMapChangesRec map; + XkbControlsChangesRec ctrls; + XkbIndicatorChangesRec indicators; + XkbNameChangesRec names; + XkbCompatChangesRec compat; +} XkbChangesRec, *XkbChangesPtr; + + /* + * These data structures are used to construct a keymap from + * a set of components or to list components in the server + * database. + */ +typedef struct _XkbComponentNames { + char * keymap; + char * keycodes; + char * types; + char * compat; + char * symbols; + char * geometry; +} XkbComponentNamesRec, *XkbComponentNamesPtr; + +typedef struct _XkbComponentName { + unsigned short flags; + char * name; +} XkbComponentNameRec,*XkbComponentNamePtr; + +typedef struct _XkbComponentList { + int num_keymaps; + int num_keycodes; + int num_types; + int num_compat; + int num_symbols; + int num_geometry; + XkbComponentNamePtr keymaps; + XkbComponentNamePtr keycodes; + XkbComponentNamePtr types; + XkbComponentNamePtr compat; + XkbComponentNamePtr symbols; + XkbComponentNamePtr geometry; +} XkbComponentListRec, *XkbComponentListPtr; + + /* + * The following data structures describe and track changes to a + * non-keyboard extension device + */ +typedef struct _XkbDeviceLedInfo { + unsigned short led_class; + unsigned short led_id; + unsigned int phys_indicators; + unsigned int maps_present; + unsigned int names_present; + unsigned int state; + Atom names[XkbNumIndicators]; + XkbIndicatorMapRec maps[XkbNumIndicators]; +} XkbDeviceLedInfoRec,*XkbDeviceLedInfoPtr; + +typedef struct _XkbDeviceInfo { + char * name; + Atom type; + unsigned short device_spec; + Bool has_own_state; + unsigned short supported; + unsigned short unsupported; + + unsigned short num_btns; + XkbAction * btn_acts; + + unsigned short sz_leds; + unsigned short num_leds; + unsigned short dflt_kbd_fb; + unsigned short dflt_led_fb; + XkbDeviceLedInfoPtr leds; +} XkbDeviceInfoRec,*XkbDeviceInfoPtr; + +#define XkbXI_DevHasBtnActs(d) (((d)->num_btns>0)&&((d)->btn_acts!=NULL)) +#define XkbXI_LegalDevBtn(d,b) (XkbXI_DevHasBtnActs(d)&&((b)<(d)->num_btns)) +#define XkbXI_DevHasLeds(d) (((d)->num_leds>0)&&((d)->leds!=NULL)) + +typedef struct _XkbDeviceLedChanges { + unsigned short led_class; + unsigned short led_id; + unsigned int defined; /* names or maps changed */ + struct _XkbDeviceLedChanges *next; +} XkbDeviceLedChangesRec,*XkbDeviceLedChangesPtr; + +typedef struct _XkbDeviceChanges { + unsigned int changed; + unsigned short first_btn; + unsigned short num_btns; + XkbDeviceLedChangesRec leds; +} XkbDeviceChangesRec,*XkbDeviceChangesPtr; + +#endif /* _XKBSTR_H_ */ diff --git a/X11/extensions/XKM.h b/X11/extensions/XKM.h new file mode 100644 index 000000000..c6c9f5195 --- /dev/null +++ b/X11/extensions/XKM.h @@ -0,0 +1,70 @@ +/* $Xorg: XKM.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, 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 Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS 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. + + ********************************************************/ +#ifndef XKM_H +#define XKM_H 1 + +#define XkmFileVersion 15 + +#define XkmIllegalFile -1 +#define XkmSemanticsFile 20 +#define XkmLayoutFile 21 +#define XkmKeymapFile 22 +#define XkmGeometryFile 23 + +#define XkmTypesIndex 0 +#define XkmCompatMapIndex 1 +#define XkmSymbolsIndex 2 +#define XkmIndicatorsIndex 3 +#define XkmKeyNamesIndex 4 +#define XkmGeometryIndex 5 +#define XkmVirtualModsIndex 6 +#define XkmLastIndex XkmVirtualModsIndex + +#define XkmTypesMask (1<<0) +#define XkmCompatMapMask (1<<1) +#define XkmSymbolsMask (1<<2) +#define XkmIndicatorsMask (1<<3) +#define XkmKeyNamesMask (1<<4) +#define XkmGeometryMask (1<<5) +#define XkmVirtualModsMask (1<<6) +#define XkmLegalIndexMask (0x7f) +#define XkmAllIndicesMask (0x7f) + +#define XkmSemanticsRequired (XkmCompatMapMask) +#define XkmSemanticsOptional (XkmTypesMask|XkmVirtualModsMask|XkmIndicatorsMask) +#define XkmSemanticsLegal (XkmSemanticsRequired|XkmSemanticsOptional) +#define XkmLayoutRequired (XkmKeyNamesMask|XkmSymbolsMask|XkmTypesMask) +#define XkmLayoutOptional (XkmVirtualModsMask|XkmGeometryMask) +#define XkmLayoutLegal (XkmLayoutRequired|XkmLayoutOptional) +#define XkmKeymapRequired (XkmSemanticsRequired|XkmLayoutRequired) +#define XkmKeymapOptional ((XkmSemanticsOptional|XkmLayoutOptional)&(~XkmKeymapRequired)) +#define XkmKeymapLegal (XkmKeymapRequired|XkmKeymapOptional) + +#define XkmLegalSection(m) (((m)&(~XkmKeymapLegal))==0) +#define XkmSingleSection(m) (XkmLegalSection(m)&&(((m)&(~(m)+1))==(m))) + +#endif /* XKM_H */ diff --git a/X11/extensions/XKMformat.h b/X11/extensions/XKMformat.h new file mode 100644 index 000000000..154da5694 --- /dev/null +++ b/X11/extensions/XKMformat.h @@ -0,0 +1,301 @@ +/* $Xorg: XKMformat.h,v 1.3 2000/08/17 19:46:43 cpqbld Exp $ */ +/************************************************************ + Copyright (c) 1994 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, 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 Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS 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. + + ********************************************************/ +/* $XFree86$ */ + +#ifndef _XKMFORMAT_H_ +#define _XKMFORMAT_H_ 1 + +#include +#include +#include + +typedef struct _xkmFileInfo { + CARD8 type; + CARD8 min_kc; + CARD8 max_kc; + CARD8 num_toc; + CARD16 present B16; + CARD16 pad B16; +} xkmFileInfo; +#define sz_xkmFileInfo 8 + +typedef struct _xkmSectionInfo { + CARD16 type B16; + CARD16 format B16; + CARD16 size B16; + CARD16 offset B16; +} xkmSectionInfo; +#define sz_xkmSectionInfo 8 + +typedef struct _xkmKeyTypeDesc { + CARD8 realMods; + CARD8 numLevels; + CARD16 virtualMods B16; + CARD8 nMapEntries; + CARD8 nLevelNames; + CARD8 preserve; + CARD8 pad; +} xkmKeyTypeDesc; +#define sz_xkmKeyTypeDesc 8 + +typedef struct _xkmKTMapEntryDesc { + CARD8 level; + CARD8 realMods; + CARD16 virtualMods B16; +} xkmKTMapEntryDesc; +#define sz_xkmKTMapEntryDesc 4 + +typedef struct _xkmModsDesc { + CARD8 realMods; + CARD8 pad; + CARD16 virtualMods B16; +} xkmModsDesc; +#define sz_xkmModsDesc 4 + +typedef struct _xkmVModMapDesc { + CARD8 key; + CARD8 pad; + CARD16 vmods B16; +} xkmVModMapDesc; +#define sz_xkmVModMapDesc 4 + +typedef struct _xkmSymInterpretDesc { + CARD32 sym B32; + CARD8 mods; + CARD8 match; + CARD8 virtualMod; + CARD8 flags; + CARD8 actionType; + CARD8 actionData[7]; +} xkmSymInterpretDesc; +#define sz_xkmSymInterpretDesc 16 + +typedef struct _xkmBehaviorDesc { + CARD8 type; + CARD8 data; + CARD16 pad B16; +} xkmBehaviorDesc; +#define sz_xkmBehaviorDesc 4 + +typedef struct _xkmActionDesc { + CARD8 type; + CARD8 data[7]; +} xkmActionDesc; +#define sz_xkmActionDesc 8 + +#define XkmKeyHasTypes (0x0f) +#define XkmKeyHasGroup1Type (1<<0) +#define XkmKeyHasGroup2Type (1<<1) +#define XkmKeyHasGroup3Type (1<<2) +#define XkmKeyHasGroup4Type (1<<3) +#define XkmKeyHasActions (1<<4) +#define XkmKeyHasBehavior (1<<5) +#define XkmRepeatingKey (1<<6) +#define XkmNonRepeatingKey (1<<7) + +typedef struct _xkmKeySymMapDesc { + CARD8 width; + CARD8 num_groups; + CARD8 modifier_map; + CARD8 flags; +} xkmKeySymMapDesc; +#define sz_xkmKeySymMapDesc 4 + +typedef struct _xkmIndicatorMapDesc { + CARD8 indicator; + CARD8 flags; + CARD8 which_mods; + CARD8 real_mods; + CARD16 vmods B16; + CARD8 which_groups; + CARD8 groups; + CARD32 ctrls B32; +} xkmIndicatorMapDesc; +#define sz_xkmIndicatorMapDesc 12 + +typedef struct _xkmGeometryDesc { + CARD16 width_mm B16; + CARD16 height_mm B16; + CARD8 base_color_ndx; + CARD8 label_color_ndx; + CARD16 num_properties B16; + CARD16 num_colors B16; + CARD16 num_shapes B16; + CARD16 num_sections B16; + CARD16 num_doodads B16; + CARD16 num_key_aliases B16; + CARD16 pad1 B16; +} xkmGeometryDesc; +#define sz_xkmGeometryDesc 20 + +typedef struct _xkmPointDesc { + INT16 x B16; + INT16 y B16; +} xkmPointDesc; +#define sz_xkmPointDesc 4 + +typedef struct _xkmOutlineDesc { + CARD8 num_points; + CARD8 corner_radius; + CARD16 pad B16; +} xkmOutlineDesc; +#define sz_xkmOutlineDesc 4 + +typedef struct _xkmShapeDesc { + CARD8 num_outlines; + CARD8 primary_ndx; + CARD8 approx_ndx; + CARD8 pad; +} xkmShapeDesc; +#define sz_xkmShapeDesc 4 + +typedef struct _xkmSectionDesc { + INT16 top B16; + INT16 left B16; + CARD16 width B16; + CARD16 height B16; + INT16 angle B16; + CARD8 priority; + CARD8 num_rows; + CARD8 num_doodads; + CARD8 num_overlays; + CARD16 pad2 B16; +} xkmSectionDesc; +#define sz_xkmSectionDesc 16 + +typedef struct _xkmRowDesc { + INT16 top B16; + INT16 left B16; + CARD8 num_keys; + BOOL vertical; + CARD16 pad B16; +} xkmRowDesc; +#define sz_xkmRowDesc 8 + +typedef struct _xkmKeyDesc { + CARD8 name[XkbKeyNameLength]; + INT16 gap B16; + CARD8 shape_ndx; + CARD8 color_ndx; +} xkmKeyDesc; +#define sz_xkmKeyDesc 8 + +typedef struct _xkmOverlayDesc { + CARD8 num_rows; + CARD8 pad1; + CARD16 pad2 B16; +} xkmOverlayDesc; +#define sz_xkmOverlayDesc 4 + +typedef struct _xkmOverlayRowDesc { + CARD8 row_under; + CARD8 num_keys; + CARD16 pad B16; +} xkmOverlayRowDesc; +#define sz_xkmOverlayRowDesc 4 + +typedef struct _xkmOverlayKeyDesc { + char over[XkbKeyNameLength]; + char under[XkbKeyNameLength]; +} xkmOverlayKeyDesc; +#define sz_xkmOverlayKeyDesc 8 + +typedef struct _xkmShapeDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 color_ndx; + CARD8 shape_ndx; + CARD16 pad B16; + CARD32 pad1 B32; +} xkmShapeDoodadDesc; +#define sz_xkmShapeDoodadDesc 16 + +typedef struct _xkmTextDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD16 width B16; + CARD16 height B16; + CARD8 color_ndx; + CARD8 pad1; + CARD16 pad2 B16; +} xkmTextDoodadDesc; +#define sz_xkmTextDoodadDesc 16 + +typedef struct _xkmIndicatorDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + CARD8 shape_ndx; + CARD8 on_color_ndx; + CARD8 off_color_ndx; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; +} xkmIndicatorDoodadDesc; +#define sz_xkmIndicatorDoodadDesc 16 + +typedef struct _xkmLogoDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + INT16 angle B16; + CARD8 color_ndx; + CARD8 shape_ndx; + CARD16 pad B16; + CARD32 pad1 B32; +} xkmLogoDoodadDesc; +#define sz_xkmLogoDoodadDesc 16 + +typedef struct _xkmAnyDoodadDesc { + CARD8 type; + CARD8 priority; + INT16 top B16; + INT16 left B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xkmAnyDoodadDesc; +#define sz_xkmAnyDoodadDesc 16 + +typedef union _xkmDoodadDesc { + xkmAnyDoodadDesc any; + xkmShapeDoodadDesc shape; + xkmTextDoodadDesc text; + xkmIndicatorDoodadDesc indicator; + xkmLogoDoodadDesc logo; +} xkmDoodadDesc; +#define sz_xkmDoodadDesc 16 + +#endif /* _XKMFORMAT_H_ */ diff --git a/X11/extensions/XLbx.h b/X11/extensions/XLbx.h new file mode 100644 index 000000000..01d44f090 --- /dev/null +++ b/X11/extensions/XLbx.h @@ -0,0 +1,155 @@ +/* $Xorg: XLbx.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* + * Copyright 1992 Network Computing Devices + * + * 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 NCD. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. NCD. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. + * 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. + * + */ +/* $XFree86: xc/include/extensions/XLbx.h,v 1.3 2002/10/16 01:59:55 dawes Exp $ */ + +#ifndef _XLBX_H_ +#define _XLBX_H_ + +#include + +/* + * NOTE: any changes or additions to the opcodes needs to be reflected + * in the lbxCacheable array in Xserver/lbx/lbxmain.c + */ + +#define X_LbxQueryVersion 0 +#define X_LbxStartProxy 1 +#define X_LbxStopProxy 2 +#define X_LbxSwitch 3 +#define X_LbxNewClient 4 +#define X_LbxCloseClient 5 +#define X_LbxModifySequence 6 +#define X_LbxAllowMotion 7 +#define X_LbxIncrementPixel 8 +#define X_LbxDelta 9 +#define X_LbxGetModifierMapping 10 +#define X_LbxInvalidateTag 12 +#define X_LbxPolyPoint 13 +#define X_LbxPolyLine 14 +#define X_LbxPolySegment 15 +#define X_LbxPolyRectangle 16 +#define X_LbxPolyArc 17 +#define X_LbxFillPoly 18 +#define X_LbxPolyFillRectangle 19 +#define X_LbxPolyFillArc 20 +#define X_LbxGetKeyboardMapping 21 +#define X_LbxQueryFont 22 +#define X_LbxChangeProperty 23 +#define X_LbxGetProperty 24 +#define X_LbxTagData 25 + +#define X_LbxCopyArea 26 +#define X_LbxCopyPlane 27 +#define X_LbxPolyText8 28 +#define X_LbxPolyText16 29 +#define X_LbxImageText8 30 +#define X_LbxImageText16 31 + +#define X_LbxQueryExtension 32 +#define X_LbxPutImage 33 +#define X_LbxGetImage 34 + +#define X_LbxBeginLargeRequest 35 +#define X_LbxLargeRequestData 36 +#define X_LbxEndLargeRequest 37 + +#define X_LbxInternAtoms 38 +#define X_LbxGetWinAttrAndGeom 39 + +#define X_LbxGrabCmap 40 +#define X_LbxReleaseCmap 41 +#define X_LbxAllocColor 42 + +#define X_LbxSync 43 + +#define LbxNumberReqs 44 + + +#define LbxEvent 0 +#define LbxQuickMotionDeltaEvent 1 +#define LbxNumberEvents 2 + +/* This is always the master client */ +#define LbxMasterClientIndex 0 + +/* LbxEvent lbxType sub-fields */ +#define LbxSwitchEvent 0 +#define LbxCloseEvent 1 +#define LbxDeltaEvent 2 +#define LbxInvalidateTagEvent 3 +#define LbxSendTagDataEvent 4 +#define LbxListenToOne 5 +#define LbxListenToAll 6 +#define LbxMotionDeltaEvent 7 +#define LbxReleaseCmapEvent 8 +#define LbxFreeCellsEvent 9 + +/* + * Lbx image compression methods + * + * No compression is always assigned the value of 0. + * + * The rest of the compression method opcodes are assigned dynamically + * at option negotiation time. + */ + +#define LbxImageCompressNone 0 + + +#define BadLbxClient 0 +#define LbxNumberErrors (BadLbxClient + 1) + +/* tagged data types */ +#define LbxTagTypeModmap 1 +#define LbxTagTypeKeymap 2 +#define LbxTagTypeProperty 3 +#define LbxTagTypeFont 4 +#define LbxTagTypeConnInfo 5 + +#ifndef _XLBX_SERVER_ + +#include +#include + +_XFUNCPROTOBEGIN + +Bool XLbxQueryExtension( + Display* /* dpy */, + int* /* requestp */, + int* /* event_basep */, + int* /* error_basep */ +); + +Bool XLbxQueryVersion( + Display* /* dpy */, + int* /* majorVersion */, + int* /* minorVersion */ +); + +int XLbxGetEventBase(Display *dpy); + +_XFUNCPROTOEND + +#endif + +#endif diff --git a/X11/extensions/XResproto.h b/X11/extensions/XResproto.h new file mode 100644 index 000000000..2f5563bce --- /dev/null +++ b/X11/extensions/XResproto.h @@ -0,0 +1,130 @@ +/* + Copyright (c) 2002 XFree86 Inc +*/ +/* $XFree86: xc/include/extensions/XResproto.h,v 1.1 2002/03/04 19:31:35 mvojkovi Exp $ */ + +#ifndef _XRESPROTO_H +#define _XRESPROTO_H + +#define XRES_MAJOR_VERSION 1 +#define XRES_MINOR_VERSION 0 + +#define XRES_NAME "X-Resource" + +#define X_XResQueryVersion 0 +#define X_XResQueryClients 1 +#define X_XResQueryClientResources 2 +#define X_XResQueryClientPixmapBytes 3 + +typedef struct { + CARD32 resource_base; + CARD32 resource_mask; +} xXResClient; +#define sz_xXResClient 8 + +typedef struct { + CARD32 resource_type; + CARD32 count; +} xXResType; +#define sz_xXResType 8 + +/* XResQueryVersion */ + +typedef struct _XResQueryVersion { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; + CARD8 client_major; + CARD8 client_minor; + CARD16 unused B16; +} xXResQueryVersionReq; +#define sz_xXResQueryVersionReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 server_major B16; + CARD16 server_minor B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXResQueryVersionReply; +#define sz_xXResQueryVersionReply 32 + +/* XResQueryClients */ + +typedef struct _XResQueryClients { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; +} xXResQueryClientsReq; +#define sz_xXResQueryClientsReq 4 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num_clients B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXResQueryClientsReply; +#define sz_xXResQueryClientsReply 32 + +/* XResQueryClientResources */ + +typedef struct _XResQueryClientResources { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; + CARD32 xid B32; +} xXResQueryClientResourcesReq; +#define sz_xXResQueryClientResourcesReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 num_types B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXResQueryClientResourcesReply; +#define sz_xXResQueryClientResourcesReply 32 + +/* XResQueryClientPixmapBytes */ + +typedef struct _XResQueryClientPixmapBytes { + CARD8 reqType; + CARD8 XResReqType; + CARD16 length B16; + CARD32 xid B32; +} xXResQueryClientPixmapBytesReq; +#define sz_xXResQueryClientPixmapBytesReq 8 + +typedef struct { + CARD8 type; + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 bytes B32; + CARD32 bytes_overflow B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXResQueryClientPixmapBytesReply; +#define sz_xXResQueryClientPixmapBytesReply 32 + + +#endif /* _XRESPROTO_H */ diff --git a/X11/extensions/XShm.h b/X11/extensions/XShm.h new file mode 100644 index 000000000..4ae14ca8b --- /dev/null +++ b/X11/extensions/XShm.h @@ -0,0 +1,161 @@ +/* $XFree86: xc/include/extensions/XShm.h,v 1.11 2003/04/03 15:11:07 dawes Exp $ */ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ + +/* $Xorg: XShm.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#ifndef _XSHM_H_ +#define _XSHM_H_ + +#include + +#define X_ShmQueryVersion 0 +#define X_ShmAttach 1 +#define X_ShmDetach 2 +#define X_ShmPutImage 3 +#define X_ShmGetImage 4 +#define X_ShmCreatePixmap 5 + +#define ShmCompletion 0 +#define ShmNumberEvents (ShmCompletion + 1) + +#define BadShmSeg 0 +#define ShmNumberErrors (BadShmSeg + 1) + +typedef unsigned long ShmSeg; + +#ifndef _XSHM_SERVER_ +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Drawable drawable; /* drawable of request */ + int major_code; /* ShmReqCode */ + int minor_code; /* X_ShmPutImage */ + ShmSeg shmseg; /* the ShmSeg used in the request */ + unsigned long offset; /* the offset into ShmSeg used in the request */ +} XShmCompletionEvent; + +typedef struct { + ShmSeg shmseg; /* resource id */ + int shmid; /* kernel id */ + char *shmaddr; /* address in client */ + Bool readOnly; /* how the server should attach it */ +} XShmSegmentInfo; + +_XFUNCPROTOBEGIN + +Bool XShmQueryExtension( + Display* /* dpy */ +); + +int XShmGetEventBase( + Display* /* dpy */ +); + +Bool XShmQueryVersion( + Display* /* dpy */, + int* /* majorVersion */, + int* /* minorVersion */, + Bool* /* sharedPixmaps */ +); + +int XShmPixmapFormat( + Display* /* dpy */ +); + +Status XShmAttach( + Display* /* dpy */, + XShmSegmentInfo* /* shminfo */ +); + +Status XShmDetach( + Display* /* dpy */, + XShmSegmentInfo* /* shminfo */ +); + +Status XShmPutImage( + Display* /* dpy */, + Drawable /* d */, + GC /* gc */, + XImage* /* image */, + int /* src_x */, + int /* src_y */, + int /* dst_x */, + int /* dst_y */, + unsigned int /* src_width */, + unsigned int /* src_height */, + Bool /* send_event */ +); + +Status XShmGetImage( + Display* /* dpy */, + Drawable /* d */, + XImage* /* image */, + int /* x */, + int /* y */, + unsigned long /* plane_mask */ +); + +XImage *XShmCreateImage( + Display* /* dpy */, + Visual* /* visual */, + unsigned int /* depth */, + int /* format */, + char* /* data */, + XShmSegmentInfo* /* shminfo */, + unsigned int /* width */, + unsigned int /* height */ +); + +Pixmap XShmCreatePixmap( + Display* /* dpy */, + Drawable /* d */, + char* /* data */, + XShmSegmentInfo* /* shminfo */, + unsigned int /* width */, + unsigned int /* height */, + unsigned int /* depth */ +); + +_XFUNCPROTOEND + +#else /* _XSHM_SERVER_ */ + +#include "screenint.h" +#include "pixmap.h" +#include "gc.h" + +extern void ShmRegisterFbFuncs( + ScreenPtr /* pScreen */ +); + +#endif + +#endif diff --git a/X11/extensions/XTest.h b/X11/extensions/XTest.h new file mode 100644 index 000000000..afb1849c3 --- /dev/null +++ b/X11/extensions/XTest.h @@ -0,0 +1,164 @@ +/* $Xorg: XTest.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1992, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ +/* $XFree86: xc/include/extensions/XTest.h,v 3.3 2001/12/14 19:53:28 dawes Exp $ */ + +#ifndef _XTEST_H_ +#define _XTEST_H_ + +#include + +#define X_XTestGetVersion 0 +#define X_XTestCompareCursor 1 +#define X_XTestFakeInput 2 +#define X_XTestGrabControl 3 + +#define XTestNumberEvents 0 + +#define XTestNumberErrors 0 + +#define XTestMajorVersion 2 +#define XTestMinorVersion 2 + +#define XTestExtensionName "XTEST" + +#ifndef _XTEST_SERVER_ + +#include + +_XFUNCPROTOBEGIN + +Bool XTestQueryExtension( + Display* /* dpy */, + int* /* event_basep */, + int* /* error_basep */, + int* /* majorp */, + int* /* minorp */ +); + +Bool XTestCompareCursorWithWindow( + Display* /* dpy */, + Window /* window */, + Cursor /* cursor */ +); + +Bool XTestCompareCurrentCursorWithWindow( + Display* /* dpy */, + Window /* window */ +); + +extern int XTestFakeKeyEvent( + Display* /* dpy */, + unsigned int /* keycode */, + Bool /* is_press */, + unsigned long /* delay */ +); + +extern int XTestFakeButtonEvent( + Display* /* dpy */, + unsigned int /* button */, + Bool /* is_press */, + unsigned long /* delay */ +); + +extern int XTestFakeMotionEvent( + Display* /* dpy */, + int /* screen */, + int /* x */, + int /* y */, + unsigned long /* delay */ +); + +extern int XTestFakeRelativeMotionEvent( + Display* /* dpy */, + int /* x */, + int /* y */, + unsigned long /* delay */ +); + +extern int XTestFakeDeviceKeyEvent( + Display* /* dpy */, + XDevice* /* dev */, + unsigned int /* keycode */, + Bool /* is_press */, + int* /* axes */, + int /* n_axes */, + unsigned long /* delay */ +); + +extern int XTestFakeDeviceButtonEvent( + Display* /* dpy */, + XDevice* /* dev */, + unsigned int /* button */, + Bool /* is_press */, + int* /* axes */, + int /* n_axes */, + unsigned long /* delay */ +); + +extern int XTestFakeProximityEvent( + Display* /* dpy */, + XDevice* /* dev */, + Bool /* in_prox */, + int* /* axes */, + int /* n_axes */, + unsigned long /* delay */ +); + +extern int XTestFakeDeviceMotionEvent( + Display* /* dpy */, + XDevice* /* dev */, + Bool /* is_relative */, + int /* first_axis */, + int* /* axes */, + int /* n_axes */, + unsigned long /* delay */ +); + +extern int XTestGrabControl( + Display* /* dpy */, + Bool /* impervious */ +); + +void XTestSetGContextOfGC( + GC /* gc */, + GContext /* gid */ +); + +void XTestSetVisualIDOfVisual( + Visual* /* visual */, + VisualID /* visualid */ +); + +Status XTestDiscard( + Display* /* dpy */ +); + +_XFUNCPROTOEND + +#endif /* _XTEST_SERVER_ */ + +#endif diff --git a/X11/extensions/Xag.h b/X11/extensions/Xag.h new file mode 100644 index 000000000..815f2b9f9 --- /dev/null +++ b/X11/extensions/Xag.h @@ -0,0 +1,114 @@ +/* $XFree86: xc/include/extensions/Xag.h,v 1.5 2001/12/17 20:52:24 dawes Exp $ */ +/* +Copyright 1996, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. +*/ +/* $Xorg: Xag.h,v 1.5 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#ifndef _XAG_H_ +#define _XAG_H_ + +#include + +#define X_XagQueryVersion 0 +#define X_XagCreate 1 +#define X_XagDestroy 2 +#define X_XagGetAttr 3 +#define X_XagQuery 4 +#define X_XagCreateAssoc 5 +#define X_XagDestroyAssoc 6 + +#define XagBadAppGroup 0 +#define XagNumberErrors (XagBadAppGroup + 1) + +#define XagNsingleScreen 7 +#define XagNdefaultRoot 1 +#define XagNrootVisual 2 +#define XagNdefaultColormap 3 +#define XagNblackPixel 4 +#define XagNwhitePixel 5 +#define XagNappGroupLeader 6 + +#ifndef _XAG_SERVER_ + +#include + +_XFUNCPROTOBEGIN + +typedef XID XAppGroup; + +Bool XagQueryVersion( + Display* /* dpy */, + int* /* major_version */, + int* /* minor_version */ +); + +Status XagCreateEmbeddedApplicationGroup( + Display* /* dpy */, + VisualID /* root_visual */, + Colormap /* default_colormap */, + unsigned long /* black_pixel */, + unsigned long /* white_pixel */, + XAppGroup* /* app_group_return */ +); + +Status XagCreateNonembeddedApplicationGroup( + Display* /* dpy */, + XAppGroup* /* app_group_return */ +); + +Status XagDestroyApplicationGroup( + Display* /* dpy */, + XAppGroup /* app_group */ +); + +Status XagGetApplicationGroupAttributes( + Display* /* dpy */, + XAppGroup /* app_group */, + ... +); + +Status XagQueryApplicationGroup( + Display* /* dpy */, + XID /* resource_base */, + XAppGroup* /* app_group_ret */ +); + +Status XagCreateAssociation( + Display* /* dpy */, + Window* /* window_ret */, + void* /* system_window */ +); + +Status XagDestroyAssociation( + Display* /* dpy */, + Window /* window */ +); + +_XFUNCPROTOEND + +#endif /* _XAG_SERVER_ */ + +#endif /* _XAG_H_ */ + diff --git a/X11/extensions/Xagstr.h b/X11/extensions/Xagstr.h new file mode 100644 index 000000000..ffb5527a2 --- /dev/null +++ b/X11/extensions/Xagstr.h @@ -0,0 +1,182 @@ +/* $XFree86: xc/include/extensions/Xagstr.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ +/* +Copyright 1996, 1998, 2001 The Open Group + +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. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. +*/ +/* $Xorg: Xagstr.h,v 1.6 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#ifndef _XAGSTR_H_ /* { */ +#define _XAGSTR_H_ + +#include + +#define XAppGroup CARD32 + +#define XAGNAME "XC-APPGROUP" + +#define XAG_MAJOR_VERSION 1 /* current version numbers */ +#define XAG_MINOR_VERSION 0 + +#define XagWindowTypeX11 0 +#define XagWindowTypeMacintosh 1 +#define XagWindowTypeWin32 2 +#define XagWindowTypeWin16 3 + +/* +* Redefine some basic types used by structures defined herein. This allows +* both the library and server to view communicated data as 32-bit entities, +* thus preventing problems on 64-bit architectures where libXext sees this +* data as 64 bits and the server sees it as 32 bits. +*/ + +#define Colormap CARD32 +#define VisualID CARD32 +#define Window CARD32 + +typedef struct _XagQueryVersion { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagQueryVersion */ + CARD16 length B16; + CARD16 client_major_version B16; + CARD16 client_minor_version B16; +} xXagQueryVersionReq; +#define sz_xXagQueryVersionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD16 server_major_version B16; + CARD16 server_minor_version B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXagQueryVersionReply; +#define sz_xXagQueryVersionReply 32 + +/* Set AppGroup Attributes masks */ +#define XagSingleScreenMask 1 << 0 +#define XagDefaultRootMask 1 << XagNdefaultRoot +#define XagRootVisualMask 1 << XagNrootVisual +#define XagDefaultColormapMask 1 << XagNdefaultColormap +#define XagBlackPixelMask 1 << XagNblackPixel +#define XagWhitePixelMask 1 << XagNwhitePixel +#define XagAppGroupLeaderMask 1 << XagNappGroupLeader + +typedef struct _XagCreate { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagCreate */ + CARD16 length B16; + XAppGroup app_group B32; + CARD32 attrib_mask B32; /* LISTofVALUE follows */ +} xXagCreateReq; +#define sz_xXagCreateReq 12 + +typedef struct _XagDestroy { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagDestroy */ + CARD16 length B16; + XAppGroup app_group B32; +} xXagDestroyReq; +#define sz_xXagDestroyReq 8 + +typedef struct _XagGetAttr { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagGetAttr */ + CARD16 length B16; + XAppGroup app_group B32; +} xXagGetAttrReq; +#define sz_xXagGetAttrReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + Window default_root B32; + VisualID root_visual B32; + Colormap default_colormap B32; + CARD32 black_pixel B32; + CARD32 white_pixel B32; + BOOL single_screen; + BOOL app_group_leader; + CARD16 pad2 B16; +} xXagGetAttrReply; +#define sz_xXagGetAttrReply 32 + +typedef struct _XagQuery { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagQuery */ + CARD16 length B16; + CARD32 resource B32; +} xXagQueryReq; +#define sz_xXagQueryReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + XAppGroup app_group B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXagQueryReply; +#define sz_xXagQueryReply 32 + +typedef struct _XagCreateAssoc { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagCreateAssoc */ + CARD16 length B16; + Window window B32; + CARD16 window_type B16; + CARD16 system_window_len B16; /* LISTofCARD8 follows */ +} xXagCreateAssocReq; +#define sz_xXagCreateAssocReq 12 + +typedef struct _XagDestroyAssoc { + CARD8 reqType; /* always XagReqCode */ + CARD8 xagReqType; /* always X_XagDestroyAssoc */ + CARD16 length B16; + Window window B32; +} xXagDestroyAssocReq; +#define sz_xXagDestroyAssocReq 8 + +#undef XAppGroup +/* + * Cancel the previous redefinition of the basic types, thus restoring their + * X.h definitions. + */ + +#undef Window +#undef Colormap +#undef VisualID + +#endif /* } _XAGSTR_H_ */ + diff --git a/X11/extensions/Xcup.h b/X11/extensions/Xcup.h new file mode 100644 index 000000000..b1df039e6 --- /dev/null +++ b/X11/extensions/Xcup.h @@ -0,0 +1,69 @@ +/* $Xorg: Xcup.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1987, 1988, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ +/* $XFree86$ */ + +#ifndef _XCUP_H_ +#define _XCUP_H_ + +#include + +#define X_XcupQueryVersion 0 +#define X_XcupGetReservedColormapEntries 1 +#define X_XcupStoreColors 2 + +#define XcupNumberErrors 0 + +#ifndef _XCUP_SERVER_ + +_XFUNCPROTOBEGIN + +Bool XcupQueryVersion( + Display* /* dpy */, + int* /* major_version */, + int* /* minor_version */ +); + +Status XcupGetReservedColormapEntries( + Display* /* dpy */, + int /* screen */, + XColor** /* colors_out */, + int* /* ncolors */ +); + +Status XcupStoreColors( + Display* /* dpy */, + Colormap /* colormap */, + XColor* /* colors */, + int /* ncolors */ +); + +_XFUNCPROTOEND + +#endif /* _XCUP_SERVER_ */ + +#endif /* _XCUP_H_ */ + diff --git a/X11/extensions/Xcupstr.h b/X11/extensions/Xcupstr.h new file mode 100644 index 000000000..f521c333c --- /dev/null +++ b/X11/extensions/Xcupstr.h @@ -0,0 +1,109 @@ +/* $Xorg: Xcupstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +/* + +Copyright 1987, 1988, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ +/* $XFree86: xc/include/extensions/Xcupstr.h,v 3.5 2001/08/01 00:44:35 tsi Exp $ */ + +#ifndef _XCUPSTR_H_ /* { */ +#define _XCUPSTR_H_ + +#include + +#define XCUPNAME "TOG-CUP" + +#define XCUP_MAJOR_VERSION 1 /* current version numbers */ +#define XCUP_MINOR_VERSION 0 + +typedef struct _XcupQueryVersion { + CARD8 reqType; /* always XcupReqCode */ + CARD8 xcupReqType; /* always X_XcupQueryVersion */ + CARD16 length B16; + CARD16 client_major_version B16; + CARD16 client_minor_version B16; +} xXcupQueryVersionReq; +#define sz_xXcupQueryVersionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD16 server_major_version B16; + CARD16 server_minor_version B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXcupQueryVersionReply; +#define sz_xXcupQueryVersionReply 32 + +typedef struct _XcupGetReservedColormapEntries { + CARD8 reqType; /* always XcupReqCode */ + CARD8 xcupReqType; /* always X_XcupGetReservedColormapEntries */ + CARD16 length B16; + CARD32 screen B32; +} xXcupGetReservedColormapEntriesReq; +#define sz_xXcupGetReservedColormapEntriesReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXcupGetReservedColormapEntriesReply; +#define sz_xXcupGetReservedColormapEntriesReply 32 + +typedef struct _XcupStoreColors { + CARD8 reqType; /* always XcupReqCode */ + CARD8 xcupReqType; /* always X_XcupStoreColors */ + CARD16 length B16; + CARD32 cmap B32; +} xXcupStoreColorsReq; +#define sz_xXcupStoreColorsReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXcupStoreColorsReply; +#define sz_xXcupStoreColorsReply 32 + +#endif /* } _XCUPSTR_H_ */ + diff --git a/X11/extensions/Xdbe.h b/X11/extensions/Xdbe.h new file mode 100644 index 000000000..f9205a228 --- /dev/null +++ b/X11/extensions/Xdbe.h @@ -0,0 +1,136 @@ +/* $Xorg: Xdbe.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/****************************************************************************** + * + * Copyright (c) 1994, 1995 Hewlett-Packard Company + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the Hewlett-Packard + * Company shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the Hewlett-Packard Company. + * + * Header file for Xlib-related DBE + * + *****************************************************************************/ +/* $XFree86: xc/include/extensions/Xdbe.h,v 3.2 2001/08/01 00:44:35 tsi Exp $ */ + +#ifndef XDBE_H +#define XDBE_H + + +/* INCLUDES */ + +#include +#include + + +/* DEFINES */ + +/* Errors */ +#define XdbeBadBuffer 0 + + +/* TYPEDEFS */ + +typedef Drawable XdbeBackBuffer; + +typedef unsigned char XdbeSwapAction; + +typedef struct +{ + Window swap_window; /* window for which to swap buffers */ + XdbeSwapAction swap_action; /* swap action to use for swap_window */ +} +XdbeSwapInfo; + +typedef struct +{ + Window window; /* window that buffer belongs to */ +} +XdbeBackBufferAttributes; + +typedef struct +{ + int type; + Display *display; /* display the event was read from */ + XdbeBackBuffer buffer; /* resource id */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error base + XdbeBadBuffer */ + unsigned char request_code; /* major opcode of failed request */ + unsigned char minor_code; /* minor opcode of failed request */ +} +XdbeBufferError; + +/* _XFUNCPROTOBEGIN and _XFUNCPROTOEND are defined as noops + * (for non-C++ builds) in X11/Xfuncproto.h. + */ +_XFUNCPROTOBEGIN + +extern Status XdbeQueryExtension( + Display* /* dpy */, + int* /* major_version_return */, + int* /* minor_version_return */ +); + +extern XdbeBackBuffer XdbeAllocateBackBufferName( + Display* /* dpy */, + Window /* window */, + XdbeSwapAction /* swap_action */ +); + +extern Status XdbeDeallocateBackBufferName( + Display* /* dpy */, + XdbeBackBuffer /* buffer */ +); + +extern Status XdbeSwapBuffers( + Display* /* dpy */, + XdbeSwapInfo* /* swap_info */, + int /* num_windows */ +); + +extern Status XdbeBeginIdiom( + Display* /* dpy */ +); + +extern Status XdbeEndIdiom( + Display* /* dpy */ +); + +extern XdbeScreenVisualInfo *XdbeGetVisualInfo( + Display* /* dpy */, + Drawable* /* screen_specifiers */, + int* /* num_screens */ +); + +extern void XdbeFreeVisualInfo( + XdbeScreenVisualInfo* /* visual_info */ +); + +extern XdbeBackBufferAttributes *XdbeGetBackBufferAttributes( + Display* /* dpy */, + XdbeBackBuffer /* buffer */ +); + +_XFUNCPROTOEND + +#endif /* XDBE_H */ + diff --git a/X11/extensions/Xdbeproto.h b/X11/extensions/Xdbeproto.h new file mode 100644 index 000000000..8a8c55522 --- /dev/null +++ b/X11/extensions/Xdbeproto.h @@ -0,0 +1,277 @@ +/* $Xorg: Xdbeproto.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/****************************************************************************** + * + * Copyright (c) 1994, 1995 Hewlett-Packard Company + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL HEWLETT-PACKARD COMPANY BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name of the Hewlett-Packard + * Company shall not be used in advertising or otherwise to promote the + * sale, use or other dealings in this Software without prior written + * authorization from the Hewlett-Packard Company. + * + * Header file for Xlib-related DBE + * + *****************************************************************************/ + + +#ifndef XDBE_PROTO_H +#define XDBE_PROTO_H + +/* INCLUDES */ + + +/* DEFINES */ + +/* Values for swap_action field of XdbeSwapInfo structure */ +#define XdbeUndefined 0 +#define XdbeBackground 1 +#define XdbeUntouched 2 +#define XdbeCopied 3 + +#ifdef NEED_DBE_PROTOCOL + +#define DBE_PROTOCOL_NAME "DOUBLE-BUFFER" + +/* Current version numbers */ +#define DBE_MAJOR_VERSION 1 +#define DBE_MINOR_VERSION 0 + +/* Used when adding extension; also used in Xdbe macros */ +#define DbeNumberEvents 0 +#define DbeBadBuffer 0 +#define DbeNumberErrors (DbeBadBuffer + 1) + +/* Request values used in (S)ProcDbeDispatch() */ +#define X_DbeGetVersion 0 +#define X_DbeAllocateBackBufferName 1 +#define X_DbeDeallocateBackBufferName 2 +#define X_DbeSwapBuffers 3 +#define X_DbeBeginIdiom 4 +#define X_DbeEndIdiom 5 +#define X_DbeGetVisualInfo 6 +#define X_DbeGetBackBufferAttributes 7 + +typedef CARD8 xDbeSwapAction; +typedef CARD32 xDbeBackBuffer; + +#endif /* NEED_DBE_PROTOCOL */ + + +/* TYPEDEFS */ + +/* Client data types */ + +/* XdbeVisualInfo and XdbeScreenVisualInfo are defined in this file, + * "Xdbeproto.h", rather than "Xdbe.h" because the server uses these data + * types. + */ + +typedef struct +{ + VisualID visual; /* one visual ID that supports double-buffering */ + int depth; /* depth of visual in bits */ + int perflevel; /* performance level of visual */ +} +XdbeVisualInfo; + +typedef struct +{ + int count; /* number of items in visual_depth */ + XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */ +} +XdbeScreenVisualInfo; + +/* Protocol data types */ + +#ifdef NEED_DBE_PROTOCOL + +typedef struct +{ + CARD32 window B32; /* window */ + xDbeSwapAction swapAction; /* swap action */ + CARD8 pad1; /* unused */ + CARD16 pad2 B16; + +} xDbeSwapInfo; + +typedef struct +{ + CARD32 visualID B32; /* associated visual */ + CARD8 depth; /* depth of visual */ + CARD8 perfLevel; /* performance level hint */ + CARD16 pad1 B16; + +} xDbeVisInfo; +#define sz_xDbeVisInfo 8 + +typedef struct +{ + CARD32 n B32; /* number of visual info items in list */ + +} xDbeScreenVisInfo; /* followed by n xDbeVisInfo items */ + +typedef struct +{ + CARD32 window B32; /* window */ + +} xDbeBufferAttributes; + + +/* Requests and replies */ + +typedef struct +{ + CARD8 reqType; /* major-opcode: always codes->major_opcode */ + CARD8 dbeReqType; /* minor-opcode: always X_DbeGetVersion (0) */ + CARD16 length B16; /* request length: (2) */ + CARD8 majorVersion; /* client-major-version */ + CARD8 minorVersion; /* client-minor-version */ + CARD16 unused B16; /* unused */ + +} xDbeGetVersionReq; +#define sz_xDbeGetVersionReq 8 + +typedef struct +{ + BYTE type; /* Reply: X_Reply (1) */ + CARD8 unused; /* unused */ + CARD16 sequenceNumber B16; /* sequence number */ + CARD32 length B32; /* reply length: (0) */ + CARD8 majorVersion; /* server-major-version */ + CARD8 minorVersion; /* server-minor-version */ + CARD16 pad1 B16; /* unused */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + +} xDbeGetVersionReply; +#define sz_xDbeGetVersionReply 32 + +typedef struct +{ + CARD8 reqType; /* major-opcode: codes->major_opcode */ + CARD8 dbeReqType; /* X_DbeAllocateBackBufferName (1) */ + CARD16 length B16; /* request length: (4) */ + CARD32 window B32; /* window */ + xDbeBackBuffer buffer B32; /* back buffer name */ + xDbeSwapAction swapAction; /* swap action hint */ + CARD8 pad1; /* unused */ + CARD16 pad2 B16; + +} xDbeAllocateBackBufferNameReq; +#define sz_xDbeAllocateBackBufferNameReq 16 + +typedef struct +{ + CARD8 reqType; /* major-opcode: codes->major_opcode */ + CARD8 dbeReqType; /* X_DbeDeallocateBackBufferName (2) */ + CARD16 length B16; /* request length: (2) */ + xDbeBackBuffer buffer B32; /* back buffer name */ + +} xDbeDeallocateBackBufferNameReq; +#define sz_xDbeDeallocateBackBufferNameReq 8 + +typedef struct +{ + CARD8 reqType; /* major-opcode: always codes->major_opcode */ + CARD8 dbeReqType; /* minor-opcode: always X_DbeSwapBuffers (3) */ + CARD16 length B16; /* request length: (2+2n) */ + CARD32 n B32; /* n, number of window/swap action pairs */ + +} xDbeSwapBuffersReq; /* followed by n window/swap action pairs */ +#define sz_xDbeSwapBuffersReq 8 + +typedef struct +{ + CARD8 reqType; /* major-opcode: always codes->major_opcode */ + CARD8 dbeReqType; /* minor-opcode: always X_DbeBeginIdom (4) */ + CARD16 length B16; /* request length: (1) */ + +} xDbeBeginIdiomReq; +#define sz_xDbeBeginIdiomReq 4 + +typedef struct +{ + CARD8 reqType; /* major-opcode: always codes->major_opcode */ + CARD8 dbeReqType; /* minor-opcode: always X_DbeEndIdom (5) */ + CARD16 length B16; /* request length: (1) */ + +} xDbeEndIdiomReq; +#define sz_xDbeEndIdiomReq 4 + +typedef struct +{ + CARD8 reqType; /* always codes->major_opcode */ + CARD8 dbeReqType; /* always X_DbeGetVisualInfo (6) */ + CARD16 length B16; /* request length: (2+n) */ + CARD32 n B32; /* n, number of drawables in list */ + +} xDbeGetVisualInfoReq; /* followed by n drawables */ +#define sz_xDbeGetVisualInfoReq 8 + +typedef struct +{ + BYTE type; /* Reply: X_Reply (1) */ + CARD8 unused; /* unused */ + CARD16 sequenceNumber B16; /* sequence number */ + CARD32 length B32; /* reply length */ + CARD32 m; /* m, number of visual infos in list */ + CARD32 pad1 B32; /* unused */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + +} xDbeGetVisualInfoReply; /* followed by m visual infos */ +#define sz_xDbeGetVisualInfoReply 32 + +typedef struct +{ + CARD8 reqType; /* always codes->major_opcode */ + CARD8 dbeReqType; /* X_DbeGetBackBufferAttributes (7) */ + CARD16 length B16; /* request length: (2) */ + xDbeBackBuffer buffer B32; /* back buffer name */ + +} xDbeGetBackBufferAttributesReq; +#define sz_xDbeGetBackBufferAttributesReq 8 + +typedef struct +{ + BYTE type; /* Reply: X_Reply (1) */ + CARD8 unused; /* unused */ + CARD16 sequenceNumber B16; /* sequence number */ + CARD32 length B32; /* reply length: (0) */ + CARD32 attributes; /* attributes */ + CARD32 pad1 B32; /* unused */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + +} xDbeGetBackBufferAttributesReply; +#define sz_xDbeGetBackBufferAttributesReply 32 + +#endif /* NEED_DBE_PROTOCOL */ + +#endif /* XDBE_PROTO_H */ + diff --git a/X11/extensions/Xeviestr.h b/X11/extensions/Xeviestr.h new file mode 100644 index 000000000..e42eb4ed0 --- /dev/null +++ b/X11/extensions/Xeviestr.h @@ -0,0 +1,165 @@ +/* $XdotOrg: $ */ +/************************************************************ + +Copyright 2003 Sun Microsystems, Inc. + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +************************************************************/ + +#ifndef _XEVIESTR_H_ +#define _XEVIESTR_H_ + +#define XEVIENAME "XEVIE" + +#define XEVIE_MAJOR_VERSION 1 +#define XEVIE_MINOR_VERSION 0 + +#define X_XevieQueryVersion 0 +#define X_XevieStart 1 +#define X_XevieEnd 2 +#define X_XevieSend 3 +#define X_XevieSelectInput 4 + +#define XevieNumberErrors 0 + +typedef struct _XevieQueryVersion { + CARD8 reqType; + CARD8 xevieReqType; + CARD16 length B16; + CARD16 client_major_version B16; + CARD16 client_minor_version B16; +} xXevieQueryVersionReq; +#define sz_xXevieQueryVersionReq 8 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD16 server_major_version B16; + CARD16 server_minor_version B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXevieQueryVersionReply; +#define sz_xXevieQueryVersionReply 32 + +typedef struct _XevieStart { + CARD8 reqType; + CARD8 xevieReqType; + CARD16 length B16; + CARD32 screen B32; +} xXevieStartReq; +#define sz_xXevieStartReq 8 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXevieStartReply; +#define sz_xXevieStartReply 32 + +typedef struct _XevieEnd { + CARD8 reqType; + CARD8 xevieReqType; + CARD16 length B16; + CARD32 cmap B32; +} xXevieEndReq; +#define sz_xXevieEndReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXevieEndReply; +#define sz_xXevieEndReply 32 + +typedef struct _XevieSend { + CARD8 reqType; + CARD8 xevieReqType; + CARD16 length B16; + xEvent event; + CARD32 dataType B32; +} xXevieSendReq; +#define sz_xXevieSendReq 104 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXevieSendReply; +#define sz_xXevieSendReply 32 + +typedef struct _XevieSelectInput { + CARD8 reqType; + CARD8 xevieReqType; + CARD16 length B16; + CARD32 event_mask B32; +} xXevieSelectInputReq; +#define sz_xXevieSelectInputReq 8 + +typedef struct { + BYTE type; + BOOL pad1; + CARD16 sequence_number B16; + CARD32 length B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xXevieSelectInputReply; +#define sz_xXevieSelectInputReply 32 + +#endif /* } _XEVIESTR_H_ */ + diff --git a/X11/extensions/Xext.h b/X11/extensions/Xext.h new file mode 100644 index 000000000..5b62c8b2d --- /dev/null +++ b/X11/extensions/Xext.h @@ -0,0 +1,57 @@ +/* + * $Xorg: Xext.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ + * +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + */ +/* $XFree86: xc/include/extensions/Xext.h,v 1.4 2001/12/14 19:53:28 dawes Exp $ */ + +#ifndef _XEXT_H_ +#define _XEXT_H_ + +#include + +_XFUNCPROTOBEGIN + +extern int (*XSetExtensionErrorHandler( + int (*handler)( + Display *, + char *, + char * + ) +))( + Display *, + char *, + char * +); + +extern int XMissingExtension( + Display* /* dpy */, + _Xconst char* /* ext_name */ +); + +_XFUNCPROTOEND + +#define X_EXTENSION_UNKNOWN "unknown" +#define X_EXTENSION_MISSING "missing" + +#endif /* _XEXT_H_ */ diff --git a/X11/extensions/Xge.h b/X11/extensions/Xge.h new file mode 100644 index 000000000..84fa250da --- /dev/null +++ b/X11/extensions/Xge.h @@ -0,0 +1,54 @@ +/* + * Copyright 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer, University of South Australia, NICTA + * + */ + + +/* XGE Client interfaces */ + +#ifndef _XGE_H_ +#define _XGE_H_ + +#include +#include + +_XFUNCPROTOBEGIN + +/** + * Generic Event mask. + * To be used whenever a list of masks per extension has to be provided. + */ +typedef struct { + CARD8 extension; + CARD8 pad0; + CARD16 pad1; + CARD32 evmask; +} XGenericEventMask; + +Bool XGEQueryExtension(Display* dpy, int *event_basep, int *err_basep); +Bool XGEQueryVersion(Display* dpy, int *major, int* minor); + +_XFUNCPROTOEND + +#endif /* _XGE_H_ */ diff --git a/X11/extensions/aclocal.m4 b/X11/extensions/aclocal.m4 new file mode 100644 index 000000000..a12ebd67a --- /dev/null +++ b/X11/extensions/aclocal.m4 @@ -0,0 +1,612 @@ +# generated automatically by aclocal 1.8.5 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +dnl Copyright 2005 Red Hat, Inc +dnl +dnl Permission to use, copy, modify, distribute, and sell this software and its +dnl documentation for any purpose is hereby granted without fee, provided that +dnl the above copyright notice appear in all copies and that both that +dnl copyright notice and this permission notice appear in supporting +dnl documentation. +dnl +dnl The above copyright notice and this permission notice shall be included +dnl in all copies or substantial portions of the Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +dnl OTHER DEALINGS IN THE SOFTWARE. +dnl +dnl Except as contained in this notice, the name of the copyright holders shall +dnl not be used in advertising or otherwise to promote the sale, use or +dnl other dealings in this Software without prior written authorization +dnl from the copyright holders. +dnl + +# XORG_RELEASE_VERSION +# -------------------- +# Adds --with/without-release-string and changes the PACKAGE and +# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If +# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also +# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. + +AC_DEFUN([XORG_RELEASE_VERSION],[ + AC_ARG_WITH(release-version, + AC_HELP_STRING([--with-release-version=STRING], + [Use release version string in package name]), + [RELEASE_VERSION="$withval"], + [RELEASE_VERSION=""]) + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + AC_MSG_NOTICE([Building with package name set to $PACKAGE]) + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], + [`echo $PACKAGE_VERSION | cut -d . -f 1`], + [Major version of this package]) + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` + if test "x$PVM" = "x"; then + PVM="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], + [$PVM], + [Minor version of this package]) + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` + if test "x$PVP" = "x"; then + PVP="0" + fi + AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], + [$PVP], + [Patch version of this package]) +]) + +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.8.5])]) + +# AM_AUX_DIR_EXPAND + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# -*- Autoconf -*- + + +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + diff --git a/X11/extensions/autogen.sh b/X11/extensions/autogen.sh new file mode 100644 index 000000000..904cd6746 --- /dev/null +++ b/X11/extensions/autogen.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd $srcdir + +autoreconf -v --install || exit 1 +cd $ORIGDIR || exit $? + +$srcdir/configure --enable-maintainer-mode "$@" diff --git a/X11/extensions/bigreqsproto.pc.in b/X11/extensions/bigreqsproto.pc.in new file mode 100644 index 000000000..e3adbfdac --- /dev/null +++ b/X11/extensions/bigreqsproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: BigReqsProto +Description: BigReqs extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/bigreqstr.h b/X11/extensions/bigreqstr.h new file mode 100644 index 000000000..fc31eb8ae --- /dev/null +++ b/X11/extensions/bigreqstr.h @@ -0,0 +1,69 @@ +/* $Xorg: bigreqstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1992, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ +/* $XFree86$ */ + +#ifndef _BIGREQSTR_H_ +#define _BIGREQSTR_H_ + +#define X_BigReqEnable 0 + +#define XBigReqNumberEvents 0 + +#define XBigReqNumberErrors 0 + +#define XBigReqExtensionName "BIG-REQUESTS" + +typedef struct { + CARD8 reqType; /* always XBigReqCode */ + CARD8 brReqType; /* always X_BigReqEnable */ + CARD16 length B16; +} xBigReqEnableReq; +#define sz_xBigReqEnableReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 max_request_size B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xBigReqEnableReply; +#define sz_xBigReqEnableReply 32 + + +typedef struct { + CARD8 reqType; + CARD8 data; + CARD16 zero B16; + CARD32 length B32; +} xBigReq; + +#endif /* _BIGREQSTR_H_ */ diff --git a/X11/extensions/composite.h b/X11/extensions/composite.h new file mode 100644 index 000000000..30b190fde --- /dev/null +++ b/X11/extensions/composite.h @@ -0,0 +1,71 @@ +/* + * $Id: composite.h,v 1.4 2004/07/08 07:20:55 keithp Exp $ + * + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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. + * + * Copyright © 2003 Keith Packard + * + * 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _COMPOSITE_H_ +#define _COMPOSITE_H_ + +#include + +#define COMPOSITE_NAME "Composite" +#define COMPOSITE_MAJOR 0 +#define COMPOSITE_MINOR 4 + +#define CompositeRedirectAutomatic 0 +#define CompositeRedirectManual 1 + +#define X_CompositeQueryVersion 0 +#define X_CompositeRedirectWindow 1 +#define X_CompositeRedirectSubwindows 2 +#define X_CompositeUnredirectWindow 3 +#define X_CompositeUnredirectSubwindows 4 +#define X_CompositeCreateRegionFromBorderClip 5 +#define X_CompositeNameWindowPixmap 6 +#define X_CompositeGetOverlayWindow 7 +#define X_CompositeReleaseOverlayWindow 8 + +#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1) + +#define CompositeNumberEvents 0 + +#endif /* _COMPOSITE_H_ */ diff --git a/X11/extensions/compositeproto.h b/X11/extensions/compositeproto.h new file mode 100644 index 000000000..c57628c9d --- /dev/null +++ b/X11/extensions/compositeproto.h @@ -0,0 +1,191 @@ +/* + * $Id: compositeproto.h,v 1.4 2004/07/08 07:20:55 keithp Exp $ + * + * + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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. + * + * Copyright © 2003 Keith Packard + * + * 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _COMPOSITEPROTO_H_ +#define _COMPOSITEPROTO_H_ + +#include +#include + +#define Window CARD32 +#define Region CARD32 + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xCompositeQueryVersionReq; + +#define sz_xCompositeQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xCompositeQueryVersionReply; + +#define sz_xCompositeQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeRedirectWindowReq; + +#define sz_xCompositeRedirectWindowReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeRedirectSubwindowsReq; + +#define sz_xCompositeRedirectSubwindowsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeUnredirectWindowReq; + +#define sz_xCompositeUnredirectWindowReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeUnredirectSubwindowsReq; + +#define sz_xCompositeUnredirectSubwindowsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Region region B32; + Window window B32; +} xCompositeCreateRegionFromBorderClipReq; + +#define sz_xCompositeCreateRegionFromBorderClipReq 12 + +/* Version 0.2 additions */ + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length; + Window window B32; + Pixmap pixmap B32; +} xCompositeNameWindowPixmapReq; + +#define sz_xCompositeNameWindowPixmapReq 12 + +/* Version 0.3 additions */ + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; +} xCompositeGetOverlayWindowReq; + +#define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq) + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + Window overlayWin B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xCompositeGetOverlayWindowReply; + +#define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply) + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; +} xCompositeReleaseOverlayWindowReq; + +#define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq) + +#undef Window +#undef Region + +#endif /* _COMPOSITEPROTO_H_ */ diff --git a/X11/extensions/compositeproto.pc.in b/X11/extensions/compositeproto.pc.in new file mode 100644 index 000000000..634802232 --- /dev/null +++ b/X11/extensions/compositeproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: CompositeExt +Description: Composite extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/compositeproto.txt b/X11/extensions/compositeproto.txt new file mode 100644 index 000000000..4b86621fa --- /dev/null +++ b/X11/extensions/compositeproto.txt @@ -0,0 +1,339 @@ + Composite Extension + Version 0.4 + 2007-7-3 + Keith Packard + keithp@keithp.com + Deron Johnson + deron.johnson@sun.com + +1. Introduction + +Many user interface operations would benefit from having pixel contents of +window hierarchies available without respect to sibling and antecedent +clipping. In addition, placing control over the composition of these pixel +contents into a final screen image in an external application will enable +a flexible system for dynamic application content presentation. + +2. Acknowledgements + +This small extension has been brewing for several years, contributors to +both early prototypes and the final design include: + + + Bill Haneman for motivating the ability to magnify occluded windows + with his work on accessibility + + + Carsten Haitzler for Enlightenment, the original eye-candy window + manager which demonstrated that clever hacks are an awfully + close substitute for changes in the underlying system. + + + Jim Gettys for key insights into the relationship between damage + events and per-window pixmap usage + + + Mike Harris and Owen Taylor for figuring out what to call it. + + + Deron Johnson for the Looking Glass implementation and + a prototype of the coordinate transformation mechanism. + + + Ryan Lortie for helping figure out reasonable parent clipping + semantics in the presense of manual redirected children. + +3. Architecture + +The composite extension provides three related mechanisms: + + 1. Per-hierarchy storage. The rendering of an entire hierarchy of windows + is redirected to off-screen storage. The pixels of that hierarchy + are available whenever it is viewable. Storage is automatically + reallocated when the top level window changes size. Contents beyond + the geometry of the top window are not preserved. + + 2. Automatic shadow update. When a hierarchy is rendered off-screen, + the X server provides an automatic mechanism for presenting those + contents within the parent window. The implementation is free to + make this update lag behind actual rendering operations by an + unspecified amount of time. This automatic update mechanism may + be disabled so that the parent window contents can be completely + determined by an external application. + + 3. External parent - child pointer coordinate transformation. + When a hierarchy is under manual compositing, the relationship + of coordinates within the parent to those in the child may + not be known within the X server. This mechanism provides + for redirection of these transformations through a client. + +Per-hierarchy storage may be created for individual windows or for all +children of a window. Manual shadow update may be selected by only a single +application for each window; manual update may also be selected on a +per-window basis or for each child of a window. Detecting when to update +may be done with the Damage extension. + +The off-screen storage includes the window contents, its borders and the +contents of all descendants. + +3.1 NameWindowPixmap + +Version 0.2 of the protocol introduces a mechanism for associating an XID +with the off-screen pixmap used to store these contents. This can be used +to hold onto window contents after the window is unmapped (and hence animate +it's disappearance), and also to access the border of the window, which is +not reachable through the Window ID itself. A new pixmap is created each +time the window is mapped or resized; as these events are nicely signalled +with existing events, no additional notification is needed. The old pixmap +will remain allocated as long as the Pixmap ID is left valid, it is +important that the client use the FreePixmap request when it is done with +the contents and to create a new name for the newly allocated pixmap. + +In automatic update mode, the X server is itself responsible for presenting +the child window contents within the parent. It seems reasonable, then, for +rendering to the parent window to be clipped so as not to interfere with any +child window content. In an environment with a mixure of manual and +automatic updating windows, rendering to the parent in the area nominally +occupied by a manual update window should be able to affect parent pixel +values in those areas, but such rendering should be clipped to automatic +update windows, and presumably to other manual update windows managed by +other applications. In any of these cases, it should be easy to ensure that +rendering has no effect on any non-redirected windows. + +Instead of attempting to define new clipping modes for rendering, the +Composite extension instead defines ClipByChildren rendering to the parent +to exclude regions occupied by redirected windows (either automatic or +manual). The CreateRegionFromBorderClip request can be used along with +IncludeInferiors clipping modes to restrict manual shadow updates to the +apporpriate region of the screen. Bracketing operations with +GrabServer/UngrabServer will permit atomic sequences that can update the +screen without artifact. As all of these operations are asynchronous, +network latency should not adversely affect update latency. + +3.2 Composite Overlay Window + +Version 0.3 of the protocol adds the Composite Overlay Window, which +provides compositing managers with a surface on which to draw without +interference. This window is always above normal windows and is always +below the screen saver window. It is an InputOutput window whose width +and height are the screen dimensions. Its visual is the root visual +and its border width is zero. Attempts to redirect it using the +composite extension are ignored. This window does not appear in the +reply of the QueryTree request. It is also an override redirect window. +These last two features make it invisible to window managers and other X11 +clients. The only way to access the XID of this window is via the +CompositeGetOverlayWindow request. Initially, the Composite Overlay +Window is unmapped. + +CompositeGetOverlayWindow returns the XID of the Composite Overlay +Window. If the window has not yet been mapped, it is mapped by this +request. When all clients who have called this request have terminated +their X11 connections the window is unmapped. + +Composite managers may render directly to the Composite Overlay +Window, or they may reparent other windows to be children of this +window and render to these. Multiple clients may render to the +Composite Overlay Window, create child windows of it, reshape it, and +redefine its input region, but the specific arbitration rules followed +by these clients is not defined by this specification; these policies +should be defined by the clients themselves. + +3.3 Clipping semantics redefined + +Version 0.4 of the protocol changes the semantics of clipping in the +presense of manual redirect children. In version 0.3, a parent was always +clipped to child windows, independent of the kind of redirection going on. +With version 0.4, the parent is no longer clipped to child windows which are +manually redirected. This means the parent can draw in the child region without using +IncludeInferiors mode, and (perhaps more importantly), it will receive +expose events in those regions caused by other actions. This new behaviour +is not selectable. + +4. Errors + +The composite extension does not define any new errors. + +5. Types + + UPDATETYPE { Automatic, Manual } + + CompositeCoordinate + child: Window + x, y: CARD16 + +7. Extension Initialization + +The client must negotiate the version of the extension before executing +extension requests. Otherwise, the server will return BadRequest for any +operations other than QueryVersion. + + QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the client's responsibility to ensure that the server supports + a version which is compatible with its expectations. Servers + are encouraged to support multiple versions of the extension. + +8. Hierarchy Redirection + + RedirectWindow + + window: Window + update: UPDATETYPE + + errors: Window, Access, Match + + The hierarchy starting at 'window' is directed to off-screen + storage. 'update' specifies whether the contents are mirrored to + the parent window automatically or not. Only one client may specify + an update type of Manual, another attempt will result in an + Access error. When all clients enabling redirection terminate, + the redirection will automatically be disabled. + + The root window may not be redirected. Doing so results in a Match + error. + + RedirectSubwindows + + window: Window + update UPDATETYPE + + errors: Window, Access + + Hierarchies starting at all current and future children of window + will be redirected as in RedirectWindow. If update is Manual, + then painting of the window background during window manipulation + and ClearArea requests is inhibited. + + UnredirectWindow: + + window: Window + + errors: Window, Value + + Redirection of the specified window will be terminated. If + the specified window was not selected for redirection by the + current client, a 'Value' error results. + + UnredirectWindows: + + window: Window + + errors: Window, Value + + Redirection of all children of window will be terminated. If + the specified window was not selected for sub-redirection by the + current client, a 'Value' error results. + +9. Clip lists + + CreateRegionFromBorderClip + + region: Region + window: Window + + errors: Window, IDChoice + + This request creates a region containing the "usual" border clip + value; that is the area of the window clipped against siblings and + the parent. This region can be used to restrict rendering to + suitable areas while updating only a single window. The region + is copied at the moment the request is executed; future changes + to the window hierarchy will not be reflected in this region. + +10. Associating a Pixmap ID with the off-screen storage (0.2 and later) + + NameWindowPixmap + + window: Window + pixmap: Pixmap + + errors: Window, Match, IDChoice + + This request makes 'pixmap' a reference to the off-screen storage + for 'window'. This pixmap will remain allocated until freed, even + if 'window' is unmapped, reconfigured or destroyed. However, + 'window' will get a new pixmap allocated each time it is + mapped or resized, so this request will need to be reinvoked for + the client to continue to refer to the storage holding the current + window contents. Generates a 'Match' error if 'window' is not + redirected or is not visible. + +11. Composite Overlay Window (0.3 and later) + + CompositeGetOverlayWindow + + window: Window + + -> + + overlayWin: Window + + This request returns the XID of the Composite Overlay Window for + the screen specified by the argument 'window'. This request + indicates that the client wishes to use the Composite Overlay + Window of this screen. If this Composite Overlay Window has not + yet been mapped, it is mapped by this request. + + The Composite Overlay Window for a particular screen will be + unmapped when all clients who have invoked this request have + also invoked CompositeReleaseOverlayWindow for that screen. Also, + CompositeReleaseOverlayWindow for a screen will be implicitly + called when a client using the Composite Overlay Window on that + screen terminates its X11 connection. + + + CompositeReleaseOverlayWindow + + window: Window + + This request specifies that the client is no longer using the + Composite Overlay Window on the screen specified by the + argument 'window'. A screen's Composite Overlay Window is + unmapped when there are no longer any clients using it. + +12. External coordinate transformation (0.4 and later) + + RedirectCoordinate + + window: Window + redirect: BOOL + + errors: Window, Access + + If 'redirect' is TRUE, the requesting client is placed in charge of + coordinate transformations between 'window' and its children. If + 'redirect' is FALSE, any such redirection is disabled. Any + transformations needed by the server will be delivered to the + requesting client in TransformCoordinateNotify events and the + requesting client must reply with matching TransformCoordinate + requests for the server to continue with the operation. + + Generates an 'Access' error if another client has + redirected coordinates for 'window'. + + TransformCoordinate + + window: Window + serialNumber: CARD32 + x, y: INT16 + coordinates: LISTofCompositeCoordinate + + This provides the transformation data needed by the server for a + single TransformCoordinateNotify event. 'serialNumber' must match + the serial number delivered in the event. 'x' and 'y' represent the + coordinate from the event relative to the 'window'. 'coordinates' + represent the coordinate from the event relative to each child + listed. Any children not listed in 'coordinates' are given the + default transformation using the child window position within the + parent as a simple translation. + + The result of this is that any pointer data seen by means of + the protocol will appear to reflect the transformation + performed by this request. diff --git a/X11/extensions/configure b/X11/extensions/configure new file mode 100644 index 000000000..ca140185b --- /dev/null +++ b/X11/extensions/configure @@ -0,0 +1,3164 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.61 for XExtProto 7.0.3. +# +# Report bugs to . +# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no +fi + + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + case $as_dir in + /*) + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell autoconf@gnu.org about your system, + echo including any error possibly output before this + echo message +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + + +exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Identity of this package. +PACKAGE_NAME='XExtProto' +PACKAGE_TARNAME='xextproto' +PACKAGE_VERSION='7.0.3' +PACKAGE_STRING='XExtProto 7.0.3' +PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' + +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +AMTAR +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` + eval enable_$ac_feature=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=\$ac_optarg ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/[-.]/_/g'` + eval with_$ac_package=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute directory names. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$0" || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 + { (exit 1); exit 1; }; } + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures XExtProto 7.0.3 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/xextproto] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of XExtProto 7.0.3:";; + esac + cat <<\_ACEOF + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-release-version=STRING + Use release version string in package name + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +XExtProto configure 7.0.3 +generated by GNU Autoconf 2.61 + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by XExtProto $as_me 7.0.3, which was +generated by GNU Autoconf 2.61. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args '$ac_arg'" + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------------- ## +## File substitutions. ## +## ------------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -n "$CONFIG_SITE"; then + set x "$CONFIG_SITE" +elif test "x$prefix" != xNONE; then + set x "$prefix/share/config.site" "$prefix/etc/config.site" +else + set x "$ac_default_prefix/share/config.site" \ + "$ac_default_prefix/etc/config.site" +fi +shift +for ac_site_file +do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + + + + + + + + + + + + + + + + + + + + + + + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +am__api_version="1.8" +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done +IFS=$as_save_IFS + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +{ echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm -f conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } +set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + SET_MAKE= +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='xextproto' + VERSION='7.0.3' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6; } +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. + + + + + + +# Check whether --with-release-version was given. +if test "${with_release_version+set}" = set; then + withval=$with_release_version; RELEASE_VERSION="$withval" +else + RELEASE_VERSION="" +fi + + if test "x$RELEASE_VERSION" != "x"; then + PACKAGE="$PACKAGE-$RELEASE_VERSION" + PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" + { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 +echo "$as_me: Building with package name set to $PACKAGE" >&6;} + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1` +_ACEOF + + PVM=`echo $PACKAGE_VERSION | cut -d . -f 2` + if test "x$PVM" = "x"; then + PVM="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_MINOR $PVM +_ACEOF + + PVP=`echo $PACKAGE_VERSION | cut -d . -f 3` + if test "x$PVP" = "x"; then + PVP="0" + fi + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION_PATCHLEVEL $PVP +_ACEOF + + + +ac_config_files="$ac_config_files Makefile xextproto.pc" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { echo "$as_me:$LINENO: updating cache $cache_file" >&5 +echo "$as_me: updating cache $cache_file" >&6;} + cat confcache >$cache_file + else + { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +as_nl=' +' +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + +# Work around bugs in pre-3.0 UWIN ksh. +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir +fi +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 + +# Save the log message, to keep $[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by XExtProto $as_me 7.0.3, which was +generated by GNU Autoconf 2.61. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +XExtProto config.status 7.0.3 +configured by $0, generated by GNU Autoconf 2.61, + with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2006 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + CONFIG_SHELL=$SHELL + export CONFIG_SHELL + exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "xextproto.pc") CONFIG_FILES="$CONFIG_FILES xextproto.pc" ;; + + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +# +# Set up the sed scripts for CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "$CONFIG_FILES"; then + +_ACEOF + + + +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + cat >conf$$subs.sed <<_ACEOF +SHELL!$SHELL$ac_delim +PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim +PACKAGE_NAME!$PACKAGE_NAME$ac_delim +PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim +PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim +PACKAGE_STRING!$PACKAGE_STRING$ac_delim +PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim +exec_prefix!$exec_prefix$ac_delim +prefix!$prefix$ac_delim +program_transform_name!$program_transform_name$ac_delim +bindir!$bindir$ac_delim +sbindir!$sbindir$ac_delim +libexecdir!$libexecdir$ac_delim +datarootdir!$datarootdir$ac_delim +datadir!$datadir$ac_delim +sysconfdir!$sysconfdir$ac_delim +sharedstatedir!$sharedstatedir$ac_delim +localstatedir!$localstatedir$ac_delim +includedir!$includedir$ac_delim +oldincludedir!$oldincludedir$ac_delim +docdir!$docdir$ac_delim +infodir!$infodir$ac_delim +htmldir!$htmldir$ac_delim +dvidir!$dvidir$ac_delim +pdfdir!$pdfdir$ac_delim +psdir!$psdir$ac_delim +libdir!$libdir$ac_delim +localedir!$localedir$ac_delim +mandir!$mandir$ac_delim +DEFS!$DEFS$ac_delim +ECHO_C!$ECHO_C$ac_delim +ECHO_N!$ECHO_N$ac_delim +ECHO_T!$ECHO_T$ac_delim +LIBS!$LIBS$ac_delim +build_alias!$build_alias$ac_delim +host_alias!$host_alias$ac_delim +target_alias!$target_alias$ac_delim +INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim +INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim +INSTALL_DATA!$INSTALL_DATA$ac_delim +CYGPATH_W!$CYGPATH_W$ac_delim +PACKAGE!$PACKAGE$ac_delim +VERSION!$VERSION$ac_delim +ACLOCAL!$ACLOCAL$ac_delim +AUTOCONF!$AUTOCONF$ac_delim +AUTOMAKE!$AUTOMAKE$ac_delim +AUTOHEADER!$AUTOHEADER$ac_delim +MAKEINFO!$MAKEINFO$ac_delim +AMTAR!$AMTAR$ac_delim +install_sh!$install_sh$ac_delim +STRIP!$STRIP$ac_delim +INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim +mkdir_p!$mkdir_p$ac_delim +AWK!$AWK$ac_delim +SET_MAKE!$SET_MAKE$ac_delim +am__leading_dot!$am__leading_dot$ac_delim +LIBOBJS!$LIBOBJS$ac_delim +LTLIBOBJS!$LTLIBOBJS$ac_delim +_ACEOF + + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 58; then + break + elif $ac_last_try; then + { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` +if test -n "$ac_eof"; then + ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` + ac_eof=`expr $ac_eof + 1` +fi + +cat >>$CONFIG_STATUS <<_ACEOF +cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end +_ACEOF +sed ' +s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g +s/^/s,@/; s/!/@,|#_!!_#|/ +:n +t n +s/'"$ac_delim"'$/,g/; t +s/$/\\/; p +N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n +' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF +:end +s/|#_!!_#|//g +CEOF$ac_eof +_ACEOF + + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF +fi # test -n "$CONFIG_FILES" + + +for ac_tag in :F $CONFIG_FILES +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + ac_file_inputs="$ac_file_inputs $ac_f" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input="Generated from "`IFS=: + echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + fi + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin";; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +echo "$as_me: error: cannot create directory $as_dir" >&2;} + { (exit 1); exit 1; }; }; } + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +case `sed -n '/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' $ac_file_inputs` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s&@configure_input@&$configure_input&;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} + + rm -f "$tmp/stdin" + case $ac_file in + -) cat "$tmp/out"; rm -f "$tmp/out";; + *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; + esac + ;; + + + + esac + +done # for ac_tag + + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + diff --git a/X11/extensions/configure.ac b/X11/extensions/configure.ac new file mode 100644 index 000000000..8f0c24227 --- /dev/null +++ b/X11/extensions/configure.ac @@ -0,0 +1,8 @@ +AC_PREREQ([2.57]) +AC_INIT([XExtProto], [7.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) + +XORG_RELEASE_VERSION + +AC_OUTPUT([Makefile + xextproto.pc]) diff --git a/X11/extensions/damageproto.h b/X11/extensions/damageproto.h new file mode 100644 index 000000000..d3bb04529 --- /dev/null +++ b/X11/extensions/damageproto.h @@ -0,0 +1,160 @@ +/* + * $Id: damageproto.h,v 1.1 2003-10-24 06:16:46 keithp Exp $ + * + * Copyright © 2003 Keith Packard + * Copyright © 2007 Eric Anholt + * + * 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _DAMAGEPROTO_H_ +#define _DAMAGEPROTO_H_ + +#include +#include +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 +#define Region CARD32 +#define Damage CARD32 + +/************** Version 0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; +} xDamageReq; + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xDamageQueryVersionReq; + +#define sz_xDamageQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDamageQueryVersionReply; + +#define sz_xDamageQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Drawable drawable B32; + CARD8 level; + CARD8 pad1; + CARD16 pad2 B16; +} xDamageCreateReq; + +#define sz_xDamageCreateReq 16 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; +} xDamageDestroyReq; + +#define sz_xDamageDestroyReq 8 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Damage damage B32; + Region repair B32; + Region parts B32; +} xDamageSubtractReq; + +#define sz_xDamageSubtractReq 16 + +typedef struct { + CARD8 reqType; + CARD8 damageReqType; + CARD16 length B16; + Drawable drawable B32; + Region region B32; +} xDamageAddReq; + +#define sz_xDamageAddReq 12 + +/* Events */ + +#define DamageNotifyMore 0x80 + +typedef struct { + CARD8 type; + CARD8 level; + CARD16 sequenceNumber B16; + Drawable drawable B32; + Damage damage B32; + Time timestamp B32; + xRectangle area; + xRectangle geometry; +} xDamageNotifyEvent; + +#undef Damage +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _DAMAGEPROTO_H_ */ diff --git a/X11/extensions/damageproto.pc.in b/X11/extensions/damageproto.pc.in new file mode 100644 index 000000000..25476b94f --- /dev/null +++ b/X11/extensions/damageproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: DamageProto +Description: Damage extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/damageproto.txt b/X11/extensions/damageproto.txt new file mode 100644 index 000000000..54910adc5 --- /dev/null +++ b/X11/extensions/damageproto.txt @@ -0,0 +1,221 @@ + The DAMAGE Extension + Protocol Version 1.1 + Document Revision 1 + 2007-01-08 + + Keith Packard + keithp@keithp.com + + Eric Anholt + eric@anholt.net + Open Source Technology Center + Intel Corporation +1. Introduction + +Monitoring the regions affected by rendering has wide-spread use, from +VNC-like systems scraping the screen to screen magnifying applications +designed to aid users with limited visual acuity. The DAMAGE extension is +designed to make such applications reasonably efficient in the face of +server-client latency. + +2. Acknolwedgements + +As usual, the author had significant input from many people, in particular: + + + Havoc Pennington who designed and implemented a Damage extension + last year which was then lost to the mists of time. + + + Bill Haneman whose work on accessibility in the Gnome environment + is legendary. + + + Jim Gettys who found a way to avoid streaming damage rectangles + to the client in many cases. + + + Owen Taylor who suggested that streaming damage rectangles may + be warranted in some cases after all. + +3. Damage Model + +We call changes made to pixel contents of windows and pixmaps 'damage' +throughout this extension. Another notion of 'damage' are drawable regions +which are in need of redisplay to repair the effects of window manipulation +or other data loss. This extension doesn't deal with this second notion at +all; suggestions on a better term which isn't easily conflated with existing +notions are eagerly solicited. + +Damage accumulates as drawing occurs in the drawable. Each drawing operation +'damages' one or more rectangular areas within the drawable. The rectangles +are guaranteed to include the set of pixels modified by each operation, but +may include significantly more than just those pixels. The desire is for +the damage to strike a balance between the number of rectangles reported and +the extraneous area included. A reasonable goal is for each primitive +object drawn (line, string, rectangle) to be represented as a single +rectangle and for the damage area of the operation to be the union of these +rectangles. + +The DAMAGE extension allows applications to either receive the raw +rectangles as a stream of events, or to have them partially processed within +the X server to reduce the amount of data transmitted as well as reduce the +processing latency once the repaint operation has started. + +Damage to a window reflects both drawing within the window itself as well as +drawing within any inferior window that affects pixels seen by +IncludeInferiors rendering operations. To reduce the computational +complexity of this, the DAMAGE extension allows the server to monitor all +rendering operations within the physical target pixel storage that fall +within the bounds of the window. In a system with a single frame buffer +holding all windows, this means that damage will accumulate for all +rendering operations that lie within the visible part of the window. + +The precise reason for this architecture is to enable the Composite +extension which provides multiple pixel storage areas for the screen +contents. + +3.1 Additions in the 1.1 version of the protocol + +Damage is automatically computed by the X Server for X rendering operations, +but direct rendering extensions have allowed clients to perform rendering +outside of the control of the X Server. The 1.1 version of the protocol +added a request to allow direct rendering clients to report damage to a +drawable. Some direct rendering clients, due to architectural limitations, +always perform rendering to the root window, even in when it should be +performed to the backing pixmap in the Composite case. To provide +less-incorrect rendering in this cases, the direct rendering client should +translate its damage region to screen coordinates and report the damage against +the root window rather than the drawable. + +4. Data types + +The "Damage" object holds any accumulated damage region and reflects the +relationship between the drawable selected for damage notification and the +drawable for which damage is tracked. + +5. Errors + +Damage + A value for a DAMAGE argument does not name a defined DAMAGE. + +6. Types + + DAMAGE 32-bit value (top three bits guaranteed to be zero) + + DamageReportLevel { DamageReportRawRectangles, + DamageReportDeltaRectangles, + DamageReportBoundingBox, + DamageReportNonEmpty } + + DamageReportRawRectangles + + Delivers DamageNotify events each time the screen + is modified with rectangular bounds that circumscribe + the damaged area. No attempt to compress out overlapping + rectangles is made. + + DamageReportDeltaRectangles + + Delivers DamageNotify events each time damage occurs + which is not included in the damage region. The + reported rectangles include only the changes to that + area, not the raw damage data. + + DamageReportBoundingBox + + Delivers DamageNotify events each time the bounding + box enclosing the damage region increases in size. + The reported rectangle encloses the entire damage region, + not just the changes to that size. + + DamageReportNonEmpty + + Delivers a single DamageNotify event each time the + damage rectangle changes from empty to non-empty, and + also whenever the result of a DamageSubtract request + results in a non-empty region. + +7. Events + +DamageNotify + + level: DamageReportLevel + drawable: Drawable + damage: DAMAGE + more: Bool + timestamp: Timestamp + area: Rectangle + drawable-geometry: Rectangle + + 'more' indicates whether there are subsequent damage events + being delivered immediately as part of a larger damage region + +8. Extension Initialization + +The client must negotiate the version of the extension before executing +extension requests. Otherwise, the server will return BadRequest for any +operations other than QueryVersion. + +QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the clients responsibility to ensure that the server supports + a version which is compatible with its expectations. Servers + are encouraged to support multiple versions of the extension. + +9. Enable Monitoring + +DamageCreate + + damage: DAMAGE + drawable: Drawable + level: DamageReportLevel + + Creates a damage object to monitor changes to Drawable + +DamageDestroy + damage: DAMAGE + + Destroys damage. + +DamageSubtract + + damage: DAMAGE + repair: Region or None + parts: Region + + Synchronously modifies the regions in the following manner: + + If repair is None: + + 1) parts = damage + 2) damage = + + Otherwise: + + 1) parts = damage INTERSECT repair + 2) damage = damage - parts + 3) Generate DamageNotify for remaining damage areas + +DamageAdd + + drawable: Drawable + region: Region + + Reports damage of the region within the given drawable. This may be + used by direct rendering clients to report damage that the server would + otherwise be unaware of. The damage region is relative to the origin + of the drawable. + + Damage posted in this way will appear in DamageNotify events as normal, + and also in server internal damage tracking (for shadow framebuffer + updates, pixmap damage, and other uses). diff --git a/X11/extensions/damagewire.h b/X11/extensions/damagewire.h new file mode 100644 index 000000000..466f0d0e3 --- /dev/null +++ b/X11/extensions/damagewire.h @@ -0,0 +1,58 @@ +/* + * $Id: damagewire.h,v 1.1 2003-10-24 06:16:46 keithp Exp $ + * + * Copyright © 2003 Keith Packard + * + * 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _DAMAGEWIRE_H_ +#define _DAMAGEWIRE_H_ + +#define DAMAGE_NAME "DAMAGE" +#define DAMAGE_MAJOR 1 +#define DAMAGE_MINOR 1 + +/************* Version 1 ****************/ + +/* Constants */ +#define XDamageReportRawRectangles 0 +#define XDamageReportDeltaRectangles 1 +#define XDamageReportBoundingBox 2 +#define XDamageReportNonEmpty 3 + +/* Requests */ +#define X_DamageQueryVersion 0 +#define X_DamageCreate 1 +#define X_DamageDestroy 2 +#define X_DamageSubtract 3 +#define X_DamageAdd 4 + +#define XDamageNumberRequests (X_DamageAdd + 1) + +/* Events */ +#define XDamageNotify 0 + +#define XDamageNumberEvents (XDamageNotify + 1) + +/* Errors */ +#define BadDamage 0 +#define XDamageNumberErrors (BadDamage + 1) + +#endif /* _DAMAGEWIRE_H_ */ diff --git a/X11/extensions/dpms.h b/X11/extensions/dpms.h new file mode 100644 index 000000000..7555f4ab6 --- /dev/null +++ b/X11/extensions/dpms.h @@ -0,0 +1,67 @@ +/* $Xorg: dpms.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/***************************************************************** + +Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ +/* $XFree86: xc/include/extensions/dpms.h,v 3.4 2000/03/15 16:51:51 tsi Exp $ */ + +#ifndef _X11_EXTENSIONS_DPMS_H +#define _X11_EXTENSIONS_DPMS_H 1 + +/* + * HISTORY + */ +/* + * @(#)RCSfile: dpms.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:17 + */ + + +#define DPMSModeOn 0 +#define DPMSModeStandby 1 +#define DPMSModeSuspend 2 +#define DPMSModeOff 3 + +#ifndef DPMS_SERVER + +#include +#include + +_XFUNCPROTOBEGIN + +extern Bool DPMSQueryExtension(Display *, int *, int *); +extern Status DPMSGetVersion(Display *, int *, int *); +extern Bool DPMSCapable(Display *); +extern Status DPMSSetTimeouts(Display *, CARD16, CARD16, CARD16); +extern Bool DPMSGetTimeouts(Display *, CARD16 *, CARD16 *, CARD16 *); +extern Status DPMSEnable(Display *); +extern Status DPMSDisable(Display *); +extern Status DPMSForceLevel(Display *, CARD16); +extern Status DPMSInfo(Display *, CARD16 *, BOOL *); + +_XFUNCPROTOEND +#endif /* !DPMS_SERVER */ +#endif /* !_X11_EXTENSIONS_DPMS_H */ + diff --git a/X11/extensions/dpmsstr.h b/X11/extensions/dpmsstr.h new file mode 100644 index 000000000..9386d4a2c --- /dev/null +++ b/X11/extensions/dpmsstr.h @@ -0,0 +1,186 @@ +/* $Xorg: dpmsstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/***************************************************************** + +Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, +BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of Digital Equipment Corporation +shall not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from Digital +Equipment Corporation. + +******************************************************************/ +/* $XFree86$ */ + +/* + * HISTORY + */ +/* + * @(#)RCSfile: dpmsstr.h,v Revision: 1.1.4.2 (DEC) Date: 1995/11/21 19:34:19 + */ + +#ifndef _DPMSSTR_H_ +#define _DPMSSTR_H_ + +#define X_DPMSGetVersion 0 +#define X_DPMSCapable 1 +#define X_DPMSGetTimeouts 2 +#define X_DPMSSetTimeouts 3 +#define X_DPMSEnable 4 +#define X_DPMSDisable 5 +#define X_DPMSForceLevel 6 +#define X_DPMSInfo 7 + +#define DPMSNumberEvents 0 + +#define DPMSNumberErrors 0 + +#define DPMSMajorVersion 1 +#define DPMSMinorVersion 1 + +#define DPMSExtensionName "DPMS" + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSGetVersion */ + CARD16 length B16; + CARD16 majorVersion B16; + CARD16 minorVersion B16; +} xDPMSGetVersionReq; +#define sz_xDPMSGetVersionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; + CARD16 minorVersion B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDPMSGetVersionReply; +#define sz_xDPMSGetVersionReply 32 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSCapable */ + CARD16 length B16; +} xDPMSCapableReq; +#define sz_xDPMSCapableReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL capable; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xDPMSCapableReply; +#define sz_xDPMSCapableReply 32 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSGetTimeouts */ + CARD16 length B16; +} xDPMSGetTimeoutsReq; +#define sz_xDPMSGetTimeoutsReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 standby B16; + CARD16 suspend B16; + CARD16 off B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xDPMSGetTimeoutsReply; +#define sz_xDPMSGetTimeoutsReply 32 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSSetTimeouts */ + CARD16 length B16; + CARD16 standby B16; + CARD16 suspend B16; + CARD16 off B16; + CARD16 pad0 B16; +} xDPMSSetTimeoutsReq; +#define sz_xDPMSSetTimeoutsReq 12 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSEnable */ + CARD16 length B16; +} xDPMSEnableReq; +#define sz_xDPMSEnableReq 4 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSDisable */ + CARD16 length B16; +} xDPMSDisableReq; +#define sz_xDPMSDisableReq 4 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSForceLevel */ + CARD16 length B16; + CARD16 level B16; /* power level requested */ + CARD16 pad0 B16; +} xDPMSForceLevelReq; +#define sz_xDPMSForceLevelReq 8 + +typedef struct { + CARD8 reqType; /* always DPMSCode */ + CARD8 dpmsReqType; /* always X_DPMSInfo */ + CARD16 length B16; +} xDPMSInfoReq; +#define sz_xDPMSInfoReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 power_level B16; + BOOL state; + CARD8 pad1; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xDPMSInfoReply; +#define sz_xDPMSInfoReply 32 + +#endif /* _DPMSSTR_H_ */ diff --git a/X11/extensions/evieproto.pc.in b/X11/extensions/evieproto.pc.in new file mode 100644 index 000000000..795a1cddf --- /dev/null +++ b/X11/extensions/evieproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: EvIEExt +Description: EvIE extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/extutil.h b/X11/extensions/extutil.h new file mode 100644 index 000000000..825d81e93 --- /dev/null +++ b/X11/extensions/extutil.h @@ -0,0 +1,192 @@ +/* + * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ + * +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author: Jim Fulton, MIT The Open Group + * + * Xlib Extension-Writing Utilities + * + * This package contains utilities for writing the client API for various + * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND + * ARE SUBJECT TO CHANGE! + */ +/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */ + +#ifndef _EXTUTIL_H_ +#define _EXTUTIL_H_ + +#include + +/* + * We need to keep a list of open displays since the Xlib display list isn't + * public. We also have to per-display info in a separate block since it isn't + * stored directly in the Display structure. + */ +typedef struct _XExtDisplayInfo { + struct _XExtDisplayInfo *next; /* keep a linked list */ + Display *display; /* which display this is */ + XExtCodes *codes; /* the extension protocol codes */ + XPointer data; /* extra data for extension to use */ +} XExtDisplayInfo; + +typedef struct _XExtensionInfo { + XExtDisplayInfo *head; /* start of list */ + XExtDisplayInfo *cur; /* most recently used */ + int ndisplays; /* number of displays */ +} XExtensionInfo; + +typedef struct _XExtensionHooks { + int (*create_gc)( + Display* /* display */, + GC /* gc */, + XExtCodes* /* codes */ +); + int (*copy_gc)( + Display* /* display */, + GC /* gc */, + XExtCodes* /* codes */ +); + int (*flush_gc)( + Display* /* display */, + GC /* gc */, + XExtCodes* /* codes */ +); + int (*free_gc)( + Display* /* display */, + GC /* gc */, + XExtCodes* /* codes */ +); + int (*create_font)( + Display* /* display */, + XFontStruct* /* fs */, + XExtCodes* /* codes */ +); + int (*free_font)( + Display* /* display */, + XFontStruct* /* fs */, + XExtCodes* /* codes */ +); + int (*close_display)( + Display* /* display */, + XExtCodes* /* codes */ +); + Bool (*wire_to_event)( + Display* /* display */, + XEvent* /* re */, + xEvent* /* event */ +); + Status (*event_to_wire)( + Display* /* display */, + XEvent* /* re */, + xEvent* /* event */ +); + int (*error)( + Display* /* display */, + xError* /* err */, + XExtCodes* /* codes */, + int* /* ret_code */ +); + char *(*error_string)( + Display* /* display */, + int /* code */, + XExtCodes* /* codes */, + char* /* buffer */, + int /* nbytes */ +); +} XExtensionHooks; + +extern XExtensionInfo *XextCreateExtension( + void +); +extern void XextDestroyExtension( + XExtensionInfo* /* info */ +); +extern XExtDisplayInfo *XextAddDisplay( + XExtensionInfo* /* extinfo */, + Display* /* dpy */, + char* /* ext_name */, + XExtensionHooks* /* hooks */, + int /* nevents */, + XPointer /* data */ +); +extern int XextRemoveDisplay( + XExtensionInfo* /* extinfo */, + Display* /* dpy */ +); +extern XExtDisplayInfo *XextFindDisplay( + XExtensionInfo* /* extinfo */, + Display* /* dpy */ +); + +#define XextHasExtension(i) ((i) && ((i)->codes)) +#define XextCheckExtension(dpy,i,name,val) \ + if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; } +#define XextSimpleCheckExtension(dpy,i,name) \ + if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; } + + +/* + * helper macros to generate code that is common to all extensions; caller + * should prefix it with static if extension source is in one file; this + * could be a utility function, but have to stack 6 unused arguments for + * something that is called many, many times would be bad. + */ +#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \ +XExtDisplayInfo *proc (Display *dpy) \ +{ \ + XExtDisplayInfo *dpyinfo; \ + if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \ + if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \ + dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \ + return dpyinfo; \ +} + +#define XEXT_FIND_DISPLAY_PROTO(proc) \ + XExtDisplayInfo *proc(Display *dpy) + +#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \ +int proc (Display *dpy, XExtCodes *codes) \ +{ \ + return XextRemoveDisplay (extinfo, dpy); \ +} + +#define XEXT_CLOSE_DISPLAY_PROTO(proc) \ + int proc(Display *dpy, XExtCodes *codes) + +#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \ +char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \ +{ \ + code -= codes->first_error; \ + if (code >= 0 && code < nerr) { \ + char tmp[256]; \ + sprintf (tmp, "%s.%d", extname, code); \ + XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \ + return buf; \ + } \ + return (char *)0; \ +} + +#define XEXT_ERROR_STRING_PROTO(proc) \ + char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n) +#endif diff --git a/X11/extensions/fixesproto.pc.in b/X11/extensions/fixesproto.pc.in new file mode 100644 index 000000000..055dcbc64 --- /dev/null +++ b/X11/extensions/fixesproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: FixesProto +Description: Fixes extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/ge.h b/X11/extensions/ge.h new file mode 100644 index 000000000..6521698a9 --- /dev/null +++ b/X11/extensions/ge.h @@ -0,0 +1,62 @@ +/* + * Copyright © 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer, University of South Australia, NICTA + * + */ + +#ifndef _GE_H_ +#define _GE_H_ + +#define GE_NAME "Generic Event Extension" +#define GE_MAJOR 1 +#define GE_MINOR 0 + +/********************************************************* + * + * Requests + * + */ + +#define X_GEQueryVersion 0 + +#define GENumberRequests (X_GEQueryVersion + 1) + +/********************************************************* + * + * Events + * + */ + +#define X_GenericEvent 0 + +#define GENumberEvents (X_GenericEvent + 1) + +/********************************************************* + * + * Errors + * + */ + +#define GENumberErrors 0 + +#endif /* _GE_H_ */ diff --git a/X11/extensions/geproto.h b/X11/extensions/geproto.h new file mode 100644 index 000000000..54107df8f --- /dev/null +++ b/X11/extensions/geproto.h @@ -0,0 +1,85 @@ +/* + * Copyright © 2007-2008 Peter Hutterer + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Authors: Peter Hutterer, University of South Australia, NICTA + * + */ + +#ifndef _GEPROTO_H_ +#define _GEPROTO_H_ + +#include +#include +#include + + +/********************************************************* + * + * Protocol request constants + * + */ + +#define X_GEGetExtensionVersion 1 + +/********************************************************* + * + * XGE protocol requests/replies + * + */ + +/* generic request */ +typedef struct { + CARD8 reqType; + CARD8 ReqType; + CARD16 length B16; +} xGEReq; + + +/* QueryVersion */ +typedef struct { + CARD8 reqType; /* input extension major code */ + CARD8 ReqType; /* always X_GEQueryVersion */ + CARD16 length B16; + CARD16 majorVersion B16; + CARD16 minorVersion B16; +} xGEQueryVersionReq; + +#define sz_xGEQueryVersionReq 8 + +typedef struct { + CARD8 repType; /* X_Reply */ + CARD8 RepType; /* always X_GEQueryVersion */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; + CARD16 minorVersion B16; + CARD32 pad00 B32; + CARD32 pad01 B32; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; +} xGEQueryVersionReply; + +#define sz_xGEQueryVersionReply 32 + +#endif /* _GEPROTO_H_ */ + diff --git a/X11/extensions/inputproto.pc.in b/X11/extensions/inputproto.pc.in new file mode 100644 index 000000000..c499cda39 --- /dev/null +++ b/X11/extensions/inputproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: InputProto +Description: Input extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/install-sh b/X11/extensions/install-sh new file mode 100644 index 000000000..e4160c991 --- /dev/null +++ b/X11/extensions/install-sh @@ -0,0 +1,325 @@ +#!/bin/sh +# install - install a program, script, or datafile + +scriptversion=2004-04-01.17 + +# This originates from X11R5 (mit/util/scripts/install.sh), which was +# later released in X11R6 (xc/config/util/install.sh) with the +# following copyright and license. +# +# Copyright (C) 1994 X Consortium +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- +# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name of the X Consortium shall not +# be used in advertising or otherwise to promote the sale, use or other deal- +# ings in this Software without prior written authorization from the X Consor- +# tium. +# +# +# FSF changes to this file are in the public domain. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename= +transform_arg= +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd= +chgrpcmd= +stripcmd= +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src= +dst= +dir_arg= + +usage="Usage: $0 [OPTION]... SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 -d DIRECTORIES... + +In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default. +In the second, create the directory path DIR. + +Options: +-b=TRANSFORMBASENAME +-c copy source (using $cpprog) instead of moving (using $mvprog). +-d create directories instead of installing files. +-g GROUP $chgrp installed files to GROUP. +-m MODE $chmod installed files to MODE. +-o USER $chown installed files to USER. +-s strip installed files (using $stripprog). +-t=TRANSFORM +--help display this help and exit. +--version display version info and exit. + +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG +" + +while test -n "$1"; do + case $1 in + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + -c) instcmd=$cpprog + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + --help) echo "$usage"; exit 0;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -s) stripcmd=$stripprog + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + --version) echo "$0 $scriptversion"; exit 0;; + + *) # When -d is used, all remaining arguments are directories to create. + test -n "$dir_arg" && break + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dstarg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dstarg" + shift # fnord + fi + shift # arg + dstarg=$arg + done + break;; + esac +done + +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src ;; + esac + + if test -n "$dir_arg"; then + dst=$src + src= + + if test -d "$dst"; then + instcmd=: + chmodcmd= + else + instcmd=$mkdirprog + fi + else + # Waiting for this to be detected by the "$instcmd $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + dst=$dst/`basename "$src"` + fi + fi + + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + + # Make sure that the destination directory exists. + + # Skip lots of stat calls in the usual case. + if test ! -d "$dstdir"; then + defaultIFS=' + ' + IFS="${IFS-$defaultIFS}" + + oIFS=$IFS + # Some sh's can't handle IFS=/ for some reason. + IFS='%' + set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` + IFS=$oIFS + + pathcomp= + + while test $# -ne 0 ; do + pathcomp=$pathcomp$1 + shift + if test ! -d "$pathcomp"; then + $mkdirprog "$pathcomp" || lasterr=$? + # mkdir can fail with a `File exist' error in case several + # install-sh are creating the directory concurrently. This + # is OK. + test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; } + fi + pathcomp=$pathcomp/ + done + fi + + if test -n "$dir_arg"; then + $doit $instcmd "$dst" \ + && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } + + else + # If we're going to rename the final executable, determine the name now. + if test -z "$transformarg"; then + dstfile=`basename "$dst"` + else + dstfile=`basename "$dst" $transformbasename \ + | sed $transformarg`$transformbasename + fi + + # don't allow the sed command to completely eliminate the filename. + test -z "$dstfile" && dstfile=`basename "$dst"` + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 + trap '(exit $?); exit' 1 2 13 15 + + # Move or copy the file name to the temp name + $doit $instcmd "$src" "$dsttmp" && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $instcmd $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ + && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ + && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ + && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && + + # Now rename the file to the real destination. + { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ + || { + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + if test -f "$dstdir/$dstfile"; then + $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ + || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ + || { + echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 + (exit 1); exit + } + else + : + fi + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + } + } + fi || { (exit 1); exit; } +done + +# The final little trick to "correctly" pass the exit status to the exit trap. +{ + (exit 0); exit +} + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/X11/extensions/kbproto.pc.in b/X11/extensions/kbproto.pc.in new file mode 100644 index 000000000..02a6d4403 --- /dev/null +++ b/X11/extensions/kbproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: KBProto +Description: KB extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/lbxbuf.h b/X11/extensions/lbxbuf.h new file mode 100644 index 000000000..63983df16 --- /dev/null +++ b/X11/extensions/lbxbuf.h @@ -0,0 +1,51 @@ +/* $Xorg: lbxbuf.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* + * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be + * used in advertising or publicity pertaining to distribution of this + * software without specific, written prior permission. + * + * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT + * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK + * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING + * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, + * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND + * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + */ + +#ifndef _BUFFER_H_ +#define _BUFFER_H_ + +#define INBUFFER_SIZE (1 << 13) /* 8K */ +#define OUTBUFFER_SIZE (1 << 12) /* 4K */ + +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + +typedef struct _zlibbuffer *ZlibBufferPtr; + +#include + +_XFUNCPROTOBEGIN + +extern int InitZlibBuffer(ZlibBufferPtr b, int size); +extern void FreeZlibBuffer(ZlibBufferPtr b); +extern char *ReserveOutBuf(ZlibBufferPtr outbuf, int outlen); + +_XFUNCPROTOEND + +#endif /* _BUFFER_H_ */ diff --git a/X11/extensions/lbxbufstr.h b/X11/extensions/lbxbufstr.h new file mode 100644 index 000000000..e1a06f633 --- /dev/null +++ b/X11/extensions/lbxbufstr.h @@ -0,0 +1,45 @@ +/* $Xorg: lbxbufstr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* + * Copyright 1988, 1989, 1990, 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be + * used in advertising or publicity pertaining to distribution of this + * software without specific, written prior permission. + * + * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT + * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK + * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING + * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, + * DATA, OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND + * REGARDLESS OF WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, + * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + * + */ +/* $XFree86$ */ + +#ifndef _BUFFERSTR_H_ +#define _BUFFERSTR_H_ + +#include + +/* + * ZLIB Input/Output buffer + */ +typedef struct _zlibbuffer { + char *bufbase; + char *bufend; + char *bufptr; + int bufcnt; +} ZlibBuffer; + +#define BYTES_AVAIL(inbuf, len) \ + (((inbuf)->bufcnt >= (len)) ? (inbuf)->bufptr : NULL) + +#endif /* _BUFFERSTR_H_ */ diff --git a/X11/extensions/lbxdeltastr.h b/X11/extensions/lbxdeltastr.h new file mode 100644 index 000000000..a8e4cb3b0 --- /dev/null +++ b/X11/extensions/lbxdeltastr.h @@ -0,0 +1,105 @@ +/* $Xorg: lbxdeltastr.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* + * Copyright 1993 Network Computing Devices + * + * 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 NCD. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. NCD. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. + * 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. + * + */ + +#ifndef LBX_DELTA_STRUCT_H +#define LBX_DELTA_STRUCT_H + +#define MIN_CACHEABLE_LEN 8 + +#define DELTA_CACHEABLE(pcache, len) \ + ((len) > MIN_CACHEABLE_LEN && (len) <= (pcache)->maxDeltasize) + +/* + * An entry in the delta compactor cache + */ +typedef struct _LBXDeltaElem { + int length; + unsigned char *buf; +} LBXDeltaElemRec, *LBXDeltaElemPtr; + + +/* + * Delta compactor cache + */ +typedef struct _LBXDeltas { + unsigned short nDeltas; + unsigned short maxDeltasize; + LBXDeltaElemPtr deltas; + unsigned short nextDelta; + unsigned short activeDeltas; /* only needed for outgoing */ +} LBXDeltasRec, *LBXDeltasPtr; + + +/* + * Motion delta cache + */ + +typedef struct { + BYTE swapped; + BYTE detail; + CARD16 sequenceNumber B16; + Time time B32; + Window root B32, event B32, child B32; + INT16 rootX B16, rootY B16, eventX B16, eventY B16; + KeyButMask state B16; + BOOL sameScreen; +} lbxMotionCache; + + +/* + * Motion delta events + */ + +typedef struct { + BYTE type; /* always eventBase + LbxQuickMotionDeltaEvent */ + CARD8 deltaTime; + INT8 deltaX; + INT8 deltaY; +} lbxQuickMotionDeltaEvent; +#define sz_lbxQuickMotionDeltaEvent 4 + +typedef struct { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxMotionDeltaEvent */ + INT8 deltaX; + INT8 deltaY; + CARD16 deltaTime B16; + CARD16 deltaSequence B16; +} lbxMotionDeltaEvent; +#define sz_lbxMotionDeltaEvent 8 + +extern int LBXInitDeltaCache ( LBXDeltasPtr pcache, int nDeltas, + int maxDeltasize ); +extern void LBXFreeDeltaCache ( LBXDeltasPtr pcache ); +extern int LBXDeltaMinDiffs ( LBXDeltasPtr pcache, unsigned char *inmsg, + int inmsglen, int maxdiff, int *pindex ); +extern void LBXEncodeDelta ( LBXDeltasPtr pcache, unsigned char *inmsg, + int ndiff, int index, unsigned char *buf ); +extern int LBXDecodeDelta ( LBXDeltasPtr pcache, xLbxDiffItem *deltas, + int ndiff, int index, unsigned char **buf ); +extern void LBXAddDeltaOut ( LBXDeltasPtr pcache, unsigned char *inmsg, + int inmsglen ); +extern void LBXAddDeltaIn ( LBXDeltasPtr pcache, unsigned char *inmsg, + int inmsglen ); + +#endif /* LBX_DELTA_STRUCT_H */ diff --git a/X11/extensions/lbximage.h b/X11/extensions/lbximage.h new file mode 100644 index 000000000..10627cf29 --- /dev/null +++ b/X11/extensions/lbximage.h @@ -0,0 +1,151 @@ +/* $Xorg: lbximage.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +/****************************************************************************** + +Copyright 1994, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +******************************************************************************/ +/* $XFree86: xc/include/extensions/lbximage.h,v 1.4 2001/12/20 19:28:54 tsi Exp $ */ + +#ifndef _LBX_IMAGE_H_ +#define _LBX_IMAGE_H_ + +#include + +_XFUNCPROTOBEGIN + +typedef struct _LbxBitmapCompMethod { + + char *methodName; + int inited; + int methodOpCode; /* to be filled on reply from server */ + + int (*compInit)( + void + ); + + int (*compFunc)( + unsigned char * /* inbuf */, + unsigned char * /* outbuf */, + int /* outbufSize */, + int /* image_bytes */, + int /* pixels_per_line */, + int /* padded_bytes_per_scanline */, + int /* reverse_bits */, + int * /* bytesCompressed */ + ); + + int (*decompFunc)( + unsigned char * /* inbuf */, + unsigned char * /* outbuf */, + int /* image_bytes */, + int /* pixels_per_line */, + int /* padded_bytes_per_scanline */, + int /* reverse_bits */ + ); + +} LbxBitmapCompMethod; + + +#define LBX_MAX_DEPTHS 5 + +typedef struct _LbxPixmapCompMethod { + + char *methodName; + unsigned formatMask; + int depthCount; + int depths[LBX_MAX_DEPTHS]; + int inited; + int methodOpCode; /* to be filled on reply from server */ + + int (*compInit)( + void + ); + + int (*compFunc)( + char * /* inbuf */, + char * /* outbuf */, + int /* outbufSize */, + int /* format */, + int /* depth */, + int /* num_scan_lines */, + int /* scan_line_size */, + int * /* bytesCompressed */ + ); + + int (*decompFunc)( + char * /* inbuf */, + char * /* outbuf */, + int /* num_scan_lines */, + int /* scan_line_size */ + ); + +} LbxPixmapCompMethod; + + +extern int LbxImageEncodePackBits ( +char * /* inbuf */, +char * /* outbuf */, +int /* outbufSize */, +int /* format */, +int /* depth */, +int /* num_scan_lines */, +int /* scan_line_size */, +int * /* bytesCompressed */ +); + +extern int LbxImageEncodeFaxG42D ( +unsigned char * /* inbuf */, +unsigned char * /* outbuf */, +int /* outbufSize */, +int /* image_bytes */, +int /* pixels_per_line */, +int /* padded_bytes_per_scanline */, +int /* reverse_bits */, +int * /* bytesCompressed */ +); + +extern int LbxImageDecodePackBits ( +char * /* inbuf */, +char * /* outbuf */, +int /* num_scan_lines */, +int /* scan_line_size */ +); + +extern int LbxImageDecodeFaxG42D ( +unsigned char * /* inbuf */, +unsigned char * /* outbuf */, +int /* image_bytes */, +int /* pixels_per_line */, +int /* padded_bytes_per_scanline */, +int /* reverse_bits */ +); + +_XFUNCPROTOEND + +#define LBX_IMAGE_COMPRESS_SUCCESS 0 +#define LBX_IMAGE_COMPRESS_NO_SUPPORT 1 +#define LBX_IMAGE_COMPRESS_BAD_MALLOC 2 +#define LBX_IMAGE_COMPRESS_NOT_WORTH_IT 3 + +#endif /* _LBX_IMAGE_H_ */ diff --git a/X11/extensions/lbxopts.h b/X11/extensions/lbxopts.h new file mode 100644 index 000000000..02e87fd26 --- /dev/null +++ b/X11/extensions/lbxopts.h @@ -0,0 +1,133 @@ +/* $Xorg: lbxopts.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* + * Copyright 1994 Network Computing Devices, 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 Network Computing Devices, Inc. not be + * used in advertising or publicity pertaining to distribution of this + * software without specific, written prior permission. + * + * THIS SOFTWARE IS PROVIDED `AS-IS'. NETWORK COMPUTING DEVICES, INC., + * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT + * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + * PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT SHALL NETWORK + * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING + * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA, + * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF + * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + */ +/* $XFree86: xc/include/extensions/lbxopts.h,v 1.5 2001/01/17 17:53:21 dawes Exp $ */ + +#ifndef _LBX_OPTS_H_ +#define _LBX_OPTS_H_ + +/* + * Negotiable configuration options + */ +#define LBX_OPT_DELTA_PROXY 0 +#define LBX_OPT_DELTA_SERVER 1 +#define LBX_OPT_STREAM_COMP 2 +#define LBX_OPT_BITMAP_COMP 3 +#define LBX_OPT_PIXMAP_COMP 4 +#define LBX_OPT_MSG_COMP 5 /* aka "squishing" */ +#define LBX_OPT_USE_TAGS 6 +#define LBX_OPT_CMAP_ALL 7 +#define LBX_OPT_EXTENSION 255 + +/* + * Length fields are encoded in 1 or 3 bytes + */ +#define LBX_OPT_SMALLLEN_SIZE 1 +#define LBX_OPT_BIGLEN_SIZE 3 +#define LBX_OPT_BIGLEN_MIN 256 + +#define LBX_OPT_DECODE_LEN(p, len, size) \ + if ((p)[0]) { \ + (len) = (p)[0]; \ + (size) = LBX_OPT_SMALLLEN_SIZE; \ + } \ + else { \ + (len) = ((LBX_OPT_BIGLEN_MIN + (p)[1]) << 8) | (p)[2]; \ + (size) = LBX_OPT_BIGLEN_SIZE; \ + } + +/* + * Option header lengths + */ +#define LBX_OPT_SMALLHDR_LEN (1 + LBX_OPT_SMALLLEN_SIZE) +#define LBX_OPT_BIGHDR_LEN (1 + LBX_OPT_BIGLEN_SIZE) + +/* + * Delta compression parameters + */ +#define LBX_OPT_DELTA_REQLEN 6 +#define LBX_OPT_DELTA_REPLYLEN 2 +#define LBX_OPT_DELTA_NCACHE_DFLT 16 +#define LBX_OPT_DELTA_MSGLEN_MIN 32 +#define LBX_OPT_DELTA_MSGLEN_DFLT 64 + + +/* + * Stream compression opts + */ + +#include + +#if defined(WIN32) || (defined(USG) && !defined(CRAY) && !defined(umips) && !defined(MOTOROLA) && !defined(uniosu) && !defined(__sxg__)) + +struct iovec { + caddr_t iov_base; + int iov_len; +}; + +#else +#ifndef Lynx +#include +#else +#include +#endif +#endif + +typedef void *LbxStreamCompHandle; + +typedef struct _LbxStreamOpts { + LbxStreamCompHandle (*streamCompInit)(int fd, pointer arg); + pointer streamCompArg; + int (*streamCompStuffInput)( + int fd, + unsigned char *buf, + int buflen + ); + int (*streamCompInputAvail)( + int fd + ); + int (*streamCompFlush)( + int fd + ); + int (*streamCompRead)( + int fd, + unsigned char *buf, + int buflen + ); + int (*streamCompWriteV)( + int fd, + struct iovec *iov, + int iovcnt + ); + void (*streamCompOn)( + int fd + ); + void (*streamCompOff)( + int fd + ); + void (*streamCompFreeHandle)( + LbxStreamCompHandle handle + ); +} LbxStreamOpts; + +#endif /* _LBX_OPTS_H_ */ diff --git a/X11/extensions/lbxstr.h b/X11/extensions/lbxstr.h new file mode 100644 index 000000000..5b79e361f --- /dev/null +++ b/X11/extensions/lbxstr.h @@ -0,0 +1,935 @@ +/* $Xorg: lbxstr.h,v 1.4 2001/02/13 20:14:04 pookie Exp $ */ +/* + * Copyright 1992 Network Computing Devices + * + * 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 NCD. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. NCD. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. + * 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. + * + */ +/* $XFree86: xc/include/extensions/lbxstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ + +#ifndef _LBXSTR_H_ +#define _LBXSTR_H_ + +#include + +#define LBXNAME "LBX" + +#define LBX_MAJOR_VERSION 1 +#define LBX_MINOR_VERSION 0 + +/* + * Redefine some basic types used by structures defined herein. This removes + * any possibility on 64-bit architectures of one entity viewing communicated + * data as 32-bit quantities and another entity viewing the same data as 64-bit + * quantities. + */ +#define XID CARD32 +#define Atom CARD32 +#define Colormap CARD32 +#define Drawable CARD32 +#define VisualID CARD32 +#define Window CARD32 + +typedef struct { + BOOL success; /* TRUE */ + BOOL changeType; + CARD16 majorVersion B16, + minorVersion B16; + CARD16 length B16; /* 1/4 additional bytes in setup info */ + CARD32 tag B32; +} xLbxConnSetupPrefix; + +typedef struct _LbxQueryVersion { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxQueryVersion */ + CARD16 length B16; +} xLbxQueryVersionReq; +#define sz_xLbxQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of LBX protocol */ + CARD16 minorVersion B16; /* minor version of LBX protocol */ + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxQueryVersionReply; +#define sz_xLbxQueryVersionReply 32 + +typedef struct _LbxStartProxy { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxStartProxy */ + CARD16 length B16; +} xLbxStartProxyReq; +#define sz_xLbxStartProxyReq 4 + +typedef struct _LbxStopProxy { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxStopProxy */ + CARD16 length B16; +} xLbxStopProxyReq; +#define sz_xLbxStopProxyReq 4 + +typedef struct _LbxSwitch { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxSwitch */ + CARD16 length B16; + CARD32 client B32; /* new client */ +} xLbxSwitchReq; +#define sz_xLbxSwitchReq 8 + +typedef struct _LbxNewClient { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxNewClient */ + CARD16 length B16; + CARD32 client B32; /* new client */ +} xLbxNewClientReq; +#define sz_xLbxNewClientReq 8 + +typedef struct _LbxCloseClient { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxCloseClient */ + CARD16 length B16; + CARD32 client B32; /* new client */ +} xLbxCloseClientReq; +#define sz_xLbxCloseClientReq 8 + +typedef struct _LbxModifySequence { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxModifySequence */ + CARD16 length B16; + CARD32 adjust B32; +} xLbxModifySequenceReq; +#define sz_xLbxModifySequenceReq 8 + +typedef struct _LbxAllowMotion { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxAllowMotion */ + CARD16 length B16; + CARD32 num B32; +} xLbxAllowMotionReq; +#define sz_xLbxAllowMotionReq 8 + +typedef struct { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxGrabCmap */ + CARD16 length B16; + Colormap cmap B32; +} xLbxGrabCmapReq; +#define sz_xLbxGrabCmapReq 8 + +#define LBX_SMART_GRAB 0x80 +#define LBX_AUTO_RELEASE 0x40 +#define LBX_3CHANNELS 0x20 +#define LBX_2BYTE_PIXELS 0x10 +#define LBX_RGB_BITS_MASK 0x0f + +#define LBX_LIST_END 0 +#define LBX_PIXEL_PRIVATE 1 +#define LBX_PIXEL_SHARED 2 +#define LBX_PIXEL_RANGE_PRIVATE 3 +#define LBX_PIXEL_RANGE_SHARED 4 +#define LBX_NEXT_CHANNEL 5 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 flags; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad0 B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B16; +} xLbxGrabCmapReply; +#define sz_xLbxGrabCmapReply 32 +#define sz_xLbxGrabCmapReplyHdr 8 + + +typedef struct { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxReleaseCmap */ + CARD16 length B16; + Colormap cmap B32; +} xLbxReleaseCmapReq; +#define sz_xLbxReleaseCmapReq 8 + +typedef struct { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxAllocColor */ + CARD16 length B16; + Colormap cmap B32; + CARD32 pixel B32; + CARD16 red B16, green B16, blue B16; + CARD16 pad B16; +} xLbxAllocColorReq; +#define sz_xLbxAllocColorReq 20 + +typedef struct _LbxIncrementPixel { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxIncrementPixel */ + CARD16 length B16; + CARD32 cmap B32; + CARD32 pixel B32; +} xLbxIncrementPixelReq; +#define sz_xLbxIncrementPixelReq 12 + +typedef struct _LbxDelta { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxDelta */ + CARD16 length B16; + CARD8 diffs; /* number of diffs */ + CARD8 cindex; /* cache index */ + /* list of diffs follows */ +} xLbxDeltaReq; +#define sz_xLbxDeltaReq 6 + +typedef struct _LbxGetModifierMapping { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxGetModifierMapping */ + CARD16 length B16; +} xLbxGetModifierMappingReq; +#define sz_xLbxGetModifierMappingReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 keyspermod; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 tag B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxGetModifierMappingReply; +#define sz_xLbxGetModifierMappingReply 32 + +typedef struct _LbxGetKeyboardMapping { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxGetKeyboardMapping */ + CARD16 length B16; + KeyCode firstKeyCode; + CARD8 count; + CARD16 pad1 B16; +} xLbxGetKeyboardMappingReq; +#define sz_xLbxGetKeyboardMappingReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 keysperkeycode; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 tag B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxGetKeyboardMappingReply; +#define sz_xLbxGetKeyboardMappingReply 32 + +typedef struct _LbxQueryFont { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxQueryFont */ + CARD16 length B16; + CARD32 fid B32; +} xLbxQueryFontReq; +#define sz_xLbxQueryFontReq 8 + +typedef struct _LbxInternAtoms { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxInternAtoms */ + CARD16 length B16; + CARD16 num B16; +} xLbxInternAtomsReq; +#define sz_xLbxInternAtomsReq 6 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 atomsStart B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxInternAtomsReply; +#define sz_xLbxInternAtomsReply 32 +#define sz_xLbxInternAtomsReplyHdr 8 + + +typedef struct _LbxGetWinAttrAndGeom { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxGetWinAttrAndGeom */ + CARD16 length B16; + CARD32 id B32; /* window id */ +} xLbxGetWinAttrAndGeomReq; +#define sz_xLbxGetWinAttrAndGeomReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 backingStore; + CARD16 sequenceNumber B16; + CARD32 length B32; /* NOT 0; this is an extra-large reply */ + VisualID visualID B32; +#if defined(__cplusplus) || defined(c_plusplus) + CARD16 c_class B16; +#else + CARD16 class B16; +#endif + CARD8 bitGravity; + CARD8 winGravity; + CARD32 backingBitPlanes B32; + CARD32 backingPixel B32; + BOOL saveUnder; + BOOL mapInstalled; + CARD8 mapState; + BOOL override; + Colormap colormap B32; + CARD32 allEventMasks B32; + CARD32 yourEventMask B32; + CARD16 doNotPropagateMask B16; + CARD16 pad1 B16; + Window root B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + CARD16 borderWidth B16; + CARD8 depth; + CARD8 pad2; +} xLbxGetWinAttrAndGeomReply; +#define sz_xLbxGetWinAttrAndGeomReply 60 + + +typedef struct { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxSync */ + CARD16 length B16; +} xLbxSyncReq; +#define sz_xLbxSyncReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xLbxSyncReply; +#define sz_xLbxSyncReply 32 + + +/* an LBX squished charinfo packs the data in a CARD32 as follows */ +#define LBX_WIDTH_SHIFT 26 +#define LBX_LEFT_SHIFT 20 +#define LBX_RIGHT_SHIFT 13 +#define LBX_ASCENT_SHIFT 7 +#define LBX_DESCENT_SHIFT 0 + +#define LBX_WIDTH_BITS 6 +#define LBX_LEFT_BITS 6 +#define LBX_RIGHT_BITS 7 +#define LBX_ASCENT_BITS 6 +#define LBX_DESCENT_BITS 7 + +#define LBX_WIDTH_MASK 0xfc000000 +#define LBX_LEFT_MASK 0x03f00000 +#define LBX_RIGHT_MASK 0x000fe000 +#define LBX_ASCENT_MASK 0x00001f80 +#define LBX_DESCENT_MASK 0x0000007f + +#define LBX_MASK_BITS(val, n) ((unsigned int) ((val) & ((1 << (n)) - 1))) + +typedef struct { + CARD32 metrics B32; +} xLbxCharInfo; + +/* note that this is identical to xQueryFontReply except for missing + * first 2 words + */ +typedef struct { + xCharInfo minBounds; +/* XXX do we need to leave this gunk? */ +#ifndef WORD64 + CARD32 walign1 B32; +#endif + xCharInfo maxBounds; +#ifndef WORD64 + CARD32 walign2 B32; +#endif + CARD16 minCharOrByte2 B16, maxCharOrByte2 B16; + CARD16 defaultChar B16; + CARD16 nFontProps B16; /* followed by this many xFontProp structures */ + CARD8 drawDirection; + CARD8 minByte1, maxByte1; + BOOL allCharsExist; + INT16 fontAscent B16, fontDescent B16; + CARD32 nCharInfos B32; /* followed by this many xLbxCharInfo structures */ +} xLbxFontInfo; + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 compression; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 tag B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + /* X_QueryFont sticks much of the data in the base reply packet, + * but we hope that it won't be needed, (and it won't fit in 32 bytes + * with the tag anyways) + * + * if any additional data is needed, its sent in a xLbxFontInfo + */ +} xLbxQueryFontReply; +#define sz_xLbxQueryFontReply 32 + +typedef struct _LbxChangeProperty { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxChangeProperty */ + CARD16 length B16; + Window window B32; + Atom property B32; + Atom type B32; + CARD8 format; + CARD8 mode; + BYTE pad[2]; + CARD32 nUnits B32; +} xLbxChangePropertyReq; +#define sz_xLbxChangePropertyReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 tag B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxChangePropertyReply; +#define sz_xLbxChangePropertyReply 32 + +typedef struct _LbxGetProperty { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxGetProperty */ + CARD16 length B16; + Window window B32; + Atom property B32; + Atom type B32; + CARD8 delete; + BYTE pad[3]; + CARD32 longOffset B32; + CARD32 longLength B32; +} xLbxGetPropertyReq; +#define sz_xLbxGetPropertyReq 28 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 format; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom propertyType B32; + CARD32 bytesAfter B32; + CARD32 nItems B32; + CARD32 tag B32; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xLbxGetPropertyReply; +#define sz_xLbxGetPropertyReply 32 + +typedef struct _LbxTagData { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxTagData */ + CARD16 length B16; + XID tag B32; + CARD32 real_length B32; + /* data */ +} xLbxTagDataReq; +#define sz_xLbxTagDataReq 12 + +typedef struct _LbxInvalidateTag { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxInvalidateTag */ + CARD16 length B16; + CARD32 tag B32; +} xLbxInvalidateTagReq; +#define sz_xLbxInvalidateTagReq 8 + +typedef struct _LbxPutImage { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxPutImage */ + CARD16 length B16; + CARD8 compressionMethod; + CARD8 cacheEnts; + CARD8 bitPacked; + /* rest is variable */ +} xLbxPutImageReq; +#define sz_xLbxPutImageReq 7 + +typedef struct { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxGetImage */ + CARD16 length B16; + Drawable drawable B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + CARD32 planeMask B32; + CARD8 format; + CARD8 pad1; + CARD16 pad2 B16; +} xLbxGetImageReq; + +#define sz_xLbxGetImageReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 depth; + CARD16 sequenceNumber B16; + CARD32 lbxLength B32; + CARD32 xLength B32; + VisualID visual B32; + CARD8 compressionMethod; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xLbxGetImageReply; + +#define sz_xLbxGetImageReply 32 + +/* Following used for LbxPolyPoint, LbxPolyLine, LbxPolySegment, + LbxPolyRectangle, LbxPolyArc, LbxPolyFillRectangle and LbxPolyFillArc */ + +#define GFX_CACHE_SIZE 15 + +#define GFXdCacheEnt(e) ((e) & 0xf) +#define GFXgCacheEnt(e) (((e) >> 4) & 0xf) +#define GFXCacheEnts(d,g) (((d) & 0xf) | (((g) & 0xf) << 4)) + +#define GFXCacheNone 0xf + +typedef struct _LbxPolyPoint { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; + CARD16 length B16; + CARD8 cacheEnts; + CARD8 padBytes; +} xLbxPolyPointReq; + +#define sz_xLbxPolyPointReq 6 + +typedef xLbxPolyPointReq xLbxPolyLineReq; +typedef xLbxPolyPointReq xLbxPolySegmentReq; +typedef xLbxPolyPointReq xLbxPolyRectangleReq; +typedef xLbxPolyPointReq xLbxPolyArcReq; +typedef xLbxPolyPointReq xLbxPolyFillRectangleReq; +typedef xLbxPolyPointReq xLbxPolyFillArcReq; + +#define sz_xLbxPolyLineReq sz_xLbxPolyPointReq +#define sz_xLbxPolySegmentReq sz_xLbxPolyPointReq +#define sz_xLbxPolyRectangleReq sz_xLbxPolyPointReq +#define sz_xLbxPolyArcReq sz_xLbxPolyPointReq +#define sz_xLbxPolyFillRectangleReq sz_xLbxPolyPointReq +#define sz_xLbxPolyFillArc sz_xLbxPolyPointReq + +typedef struct _LbxFillPoly { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; + CARD16 length B16; + CARD8 cacheEnts; + BYTE shape; + CARD8 padBytes; +} xLbxFillPolyReq; +#define sz_xLbxFillPolyReq 7 + +typedef struct _LbxCopyArea { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; + CARD16 length B16; + CARD8 srcCache; /* source drawable */ + CARD8 cacheEnts; /* dest drawable and gc */ + /* followed by encoded src x, src y, dst x, dst y, width, height */ +} xLbxCopyAreaReq; + +#define sz_xLbxCopyAreaReq 6 + +typedef struct _LbxCopyPlane { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; + CARD16 length B16; + CARD32 bitPlane B32; + CARD8 srcCache; /* source drawable */ + CARD8 cacheEnts; /* dest drawable and gc */ + /* followed by encoded src x, src y, dst x, dst y, width, height */ +} xLbxCopyPlaneReq; + +#define sz_xLbxCopyPlaneReq 10 + +typedef struct _LbxPolyText { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; + CARD16 length B16; + CARD8 cacheEnts; + /* followed by encoded src x, src y coordinates and text elts */ +} xLbxPolyTextReq; + +#define sz_xLbxPolyTextReq 5 + +typedef xLbxPolyTextReq xLbxPolyText8Req; +typedef xLbxPolyTextReq xLbxPolyText16Req; + +#define sz_xLbxPolyTextReq 5 +#define sz_xLbxPolyText8Req 5 +#define sz_xLbxPolyText16Req 5 + +typedef struct _LbxImageText { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; + CARD16 length B16; + CARD8 cacheEnts; + CARD8 nChars; + /* followed by encoded src x, src y coordinates and string */ +} xLbxImageTextReq; + +typedef xLbxImageTextReq xLbxImageText8Req; +typedef xLbxImageTextReq xLbxImageText16Req; + +#define sz_xLbxImageTextReq 6 +#define sz_xLbxImageText8Req 6 +#define sz_xLbxImageText16Req 6 + +typedef struct { + CARD8 offset; + CARD8 diff; +} xLbxDiffItem; +#define sz_xLbxDiffItem 2 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 nOpts; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 optDataStart B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxStartReply; +#define sz_xLbxStartReply 32 +#define sz_xLbxStartReplyHdr 8 + +typedef struct _LbxQueryExtension { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxQueryExtension */ + CARD16 length B16; + CARD32 nbytes B32; +} xLbxQueryExtensionReq; +#define sz_xLbxQueryExtensionReq 8 + +typedef struct _LbxQueryExtensionReply { + BYTE type; /* X_Reply */ + CARD8 numReqs; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL present; + CARD8 major_opcode; + CARD8 first_event; + CARD8 first_error; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + + /* reply & event generating requests */ +} xLbxQueryExtensionReply; +#define sz_xLbxQueryExtensionReply 32 + + +typedef struct _LbxBeginLargeRequest { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxBeginLargeRequest */ + CARD16 length B16; + CARD32 largeReqLength B32; +} xLbxBeginLargeRequestReq; +#define sz_BeginLargeRequestReq 8 + +typedef struct _LbxLargeRequestData { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxLargeRequestData */ + CARD16 length B16; + /* followed by LISTofCARD8 data */ +} xLbxLargeRequestDataReq; +#define sz_LargeRequestDataReq 4 + +typedef struct _LbxEndLargeRequest { + CARD8 reqType; /* always LbxReqCode */ + CARD8 lbxReqType; /* always X_LbxEndLargeRequest */ + CARD16 length B16; +} xLbxEndLargeRequestReq; +#define sz_EndLargeRequestReq 4 + + + +typedef struct _LbxSwitchEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxSwitchEvent */ + CARD16 pad B16; + CARD32 client B32; +} xLbxSwitchEvent; +#define sz_xLbxSwitchEvent 8 + +typedef struct _LbxCloseEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxCloseEvent */ + CARD16 sequenceNumber B16; + CARD32 client B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xLbxCloseEvent; +#define sz_xLbxCloseEvent 32 + +typedef struct _LbxInvalidateTagEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxInvalidateTagEvent */ + CARD16 sequenceNumber B16; + CARD32 tag B32; + CARD32 tagType B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xLbxInvalidateTagEvent; +#define sz_xLbxInvalidateTagEvent 32 + +typedef struct _LbxSendTagDataEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxSendTagDataEvent */ + CARD16 sequenceNumber B16; + CARD32 tag B32; + CARD32 tagType B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xLbxSendTagDataEvent; +#define sz_xLbxSendTagDataEvent 32 + +typedef struct _LbxListenToOneEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxListenToOneEvent */ + CARD16 sequenceNumber B16; + CARD32 client B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xLbxListenToOneEvent; +#define sz_xLbxListenToOneEvent 32 + +typedef struct _LbxListenToAllEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxListenToAllEvent */ + CARD16 sequenceNumber B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xLbxListenToAllEvent; +#define sz_xLbxListenToOneEvent 32 + +typedef struct _LbxReleaseCmapEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxReleaseCmapEvent */ + CARD16 sequenceNumber B16; + Colormap colormap B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xLbxReleaseCmapEvent; +#define sz_xLbxReleaseCmapEvent 32 + + +typedef struct _LbxFreeCellsEvent { + BYTE type; /* always eventBase + LbxEvent */ + BYTE lbxType; /* LbxFreeCellsEvent */ + CARD16 sequenceNumber B16; + Colormap colormap B32; + CARD32 pixelStart B32; + CARD32 pixelEnd B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xLbxFreeCellsEvent; +#define sz_xLbxFreeCellsEvent 32 + + +/* + * squished X event sizes. If these change, be sure to update lbxquish.c + * and unsquish.c appropriately + * + * lbxsz_* is the padded squished length + * lbxupsz_* is the unpadded squished length + */ + +#define lbxsz_KeyButtonEvent 32 +#define lbxupsz_KeyButtonEvent 31 + +#define lbxsz_EnterLeaveEvent 32 +#define lbxupsz_EnterLeaveEvent 32 + +#define lbxsz_FocusEvent 12 +#define lbxupsz_FocusEvent 9 + +#define lbxsz_KeymapEvent 32 +#define lbxupsz_KeymapEvent 32 + +#define lbxsz_ExposeEvent 20 +#define lbxupsz_ExposeEvent 18 + +#define lbxsz_GfxExposeEvent 24 +#define lbxupsz_GfxExposeEvent 21 + +#define lbxsz_NoExposeEvent 12 +#define lbxupsz_NoExposeEvent 11 + +#define lbxsz_VisibilityEvent 12 +#define lbxupsz_VisibilityEvent 9 + +#define lbxsz_CreateNotifyEvent 24 +#define lbxupsz_CreateNotifyEvent 23 + +#define lbxsz_DestroyNotifyEvent 12 +#define lbxupsz_DestroyNotifyEvent 12 + +#define lbxsz_UnmapNotifyEvent 16 +#define lbxupsz_UnmapNotifyEvent 13 + +#define lbxsz_MapNotifyEvent 16 +#define lbxupsz_MapNotifyEvent 13 + +#define lbxsz_MapRequestEvent 12 +#define lbxupsz_MapRequestEvent 12 + +#define lbxsz_ReparentEvent 24 +#define lbxupsz_ReparentEvent 21 + +#define lbxsz_ConfigureNotifyEvent 28 +#define lbxupsz_ConfigureNotifyEvent 27 + +#define lbxsz_ConfigureRequestEvent 28 +#define lbxupsz_ConfigureRequestEvent 28 + +#define lbxsz_GravityEvent 16 +#define lbxupsz_GravityEvent 16 + +#define lbxsz_ResizeRequestEvent 12 +#define lbxupsz_ResizeRequestEvent 12 + +#define lbxsz_CirculateEvent 20 +#define lbxupsz_CirculateEvent 17 + +#define lbxsz_PropertyEvent 20 +#define lbxupsz_PropertyEvent 17 + +#define lbxsz_SelectionClearEvent 16 +#define lbxupsz_SelectionClearEvent 16 + +#define lbxsz_SelectionRequestEvent 28 +#define lbxupsz_SelectionRequestEvent 28 + +#define lbxsz_SelectionNotifyEvent 24 +#define lbxupsz_SelectionNotifyEvent 24 + +#define lbxsz_ColormapEvent 16 +#define lbxupsz_ColormapEvent 14 + +#define lbxsz_MappingNotifyEvent 8 +#define lbxupsz_MappingNotifyEvent 7 + +#define lbxsz_ClientMessageEvent 32 +#define lbxupsz_ClientMessageEvent 32 + +#define lbxsz_UnknownEvent 32 + +#ifdef DEBUG + +#define DBG_SWITCH 0x00000001 +#define DBG_CLOSE 0x00000002 +#define DBG_IO 0x00000004 +#define DBG_READ_REQ 0x00000008 +#define DBG_LEN 0x00000010 +#define DBG_BLOCK 0x00000020 +#define DBG_CLIENT 0x00000040 +#define DBG_DELTA 0x00000080 + +extern int lbxDebug; + +#define DBG(n,m) if (lbxDebug & (n)) { fprintf m; } else +#else +#define DBG(n,m) +#endif + +/* + * Cancel the previous redefinition of the basic types, thus restoring their + * X.h definitions. + */ + +#undef XID +#undef Atom +#undef Colormap +#undef Drawable +#undef VisualID +#undef Window + +#endif /* _LBXSTR_H_ */ diff --git a/X11/extensions/lbxzlib.h b/X11/extensions/lbxzlib.h new file mode 100644 index 000000000..dc21837a1 --- /dev/null +++ b/X11/extensions/lbxzlib.h @@ -0,0 +1,64 @@ +/* $Xorg: lbxzlib.h,v 1.3 2000/08/18 04:05:45 coskrey Exp $ */ +/* + * Copyright 1993 Network Computing Devices + * + * 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 NCD. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. NCD. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD. + * 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: Dale Tonogai, Network Computing Devices + */ + +#ifndef _ZLIB_H_ +#define _ZLIB_H_ + +#define ZLIB_STRCOMP_OPT "XC-ZLIB" +#define ZLIB_STRCOMP_OPT_LEN 7 + +#define ZLIB_PACKET_HDRLEN 2 +#define ZLIB_MAX_DATALEN 0xfff +#define ZLIB_MAX_PLAIN 270 +#define ZLIB_MAX_OUTLEN (ZLIB_MAX_PLAIN << 1) + +#define ZLIB_COMPRESS_FLAG 0x80 +#define ZLIB_DATALEN_MASK 0x0f + +#define ZLIB_PUT_PKTHDR(p, len, compflag) \ + { \ + (p)[0] = ((unsigned)(len)) >> 8 | ((compflag) ? ZLIB_COMPRESS_FLAG : 0);\ + (p)[1] = (len) & 0xff; \ + } + +#define ZLIB_GET_DATALEN(p) \ + ((((unsigned)((p)[0] & ZLIB_DATALEN_MASK)) << 8) | (unsigned)(p)[1]) + +#define ZLIB_COMPRESSED(p) ((p)[0] & ZLIB_COMPRESS_FLAG) + +struct ZlibInfo; + +extern void * ZlibInit ( int fd, int level ); +extern void ZlibFree ( struct ZlibInfo *comp ); +extern int ZlibFlush ( int fd ); +extern int ZlibStuffInput ( int fd, unsigned char *buffer, int buflen ); +extern void ZlibCompressOn ( int fd ); +extern void ZlibCompressOff ( int fd ); +extern int ZlibWrite ( int fd, unsigned char *buffer, int buflen ); +extern int ZlibWriteV ( int fd, struct iovec *iov, int iovcnt ); +extern int ZlibRead ( int fd, unsigned char *buffer, int buflen ); +extern int ZlibInputAvail ( int fd ); + + +#endif /* _ZLIB_H_ */ diff --git a/X11/extensions/missing b/X11/extensions/missing new file mode 100644 index 000000000..e7ef83a1c --- /dev/null +++ b/X11/extensions/missing @@ -0,0 +1,360 @@ +#! /bin/sh +# Common stub for a few missing GNU programs while installing. + +scriptversion=2003-09-02.23 + +# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003 +# Free Software Foundation, Inc. +# Originally by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 +fi + +run=: + +# In the cases where this matters, `missing' is being run in the +# srcdir already. +if test -f configure.ac; then + configure_ac=configure.ac +else + configure_ac=configure.in +fi + +msg="missing on your system" + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + # Exit code 63 means version mismatch. This often happens + # when the user try to use an ancient version of a tool on + # a file that requires a minimum version. In this case we + # we should proceed has if the program had been absent, or + # if --run hadn't been passed. + if test $? = 63; then + run=: + msg="probably too old" + fi + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +error status if there is no known handling for PROGRAM. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + --run try to run the given command, and emulate it if it fails + +Supported PROGRAM values: + aclocal touch file \`aclocal.m4' + autoconf touch file \`configure' + autoheader touch file \`config.h.in' + automake touch all \`Makefile.in' files + bison create \`y.tab.[ch]', if possible, from existing .[ch] + flex create \`lex.yy.c', if possible, from existing .c + help2man touch the output file + lex create \`lex.yy.c', if possible, from existing .c + makeinfo touch the output file + tar try tar, gnutar, gtar, then tar without non-portable flags + yacc create \`y.tab.[ch]', if possible, from existing .[ch] + +Send bug reports to ." + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acinclude.m4' or \`${configure_ac}'. You might want + to install the \`Automake' and \`Perl' packages. Grab them from + any GNU archive site." + touch aclocal.m4 + ;; + + autoconf) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`${configure_ac}'. You might want to install the + \`Autoconf' and \`GNU m4' packages. Grab them from any GNU + archive site." + touch configure + ;; + + autoheader) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`acconfig.h' or \`${configure_ac}'. You might want + to install the \`Autoconf' and \`GNU m4' packages. Grab them + from any GNU archive site." + files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` + test -z "$files" && files="config.h" + touch_files= + for f in $files; do + case "$f" in + *:*) touch_files="$touch_files "`echo "$f" | + sed -e 's/^[^:]*://' -e 's/:.*//'`;; + *) touch_files="$touch_files $f.in";; + esac + done + touch $touch_files + ;; + + automake*) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. + You might want to install the \`Automake' and \`Perl' packages. + Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done + ;; + + autom4te) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is needed, but is $msg. + You might have modified some files without having the + proper tools for further handling them. + You can get \`$1' as part of \`Autoconf' from any GNU + archive site." + + file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` + test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` + if test -f "$file"; then + touch $file + else + test -z "$file" || exec >$file + echo "#! /bin/sh" + echo "# Created by GNU Automake missing as a replacement of" + echo "# $ $@" + echo "exit 0" + chmod +x $file + exit 1 + fi + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' $msg. You should only need it if + you modified a \`.y' file. You may need the \`Bison' package + in order for those modifications to take effect. You can get + \`Bison' from any GNU archive site." + rm -f y.tab.c y.tab.h + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.y) + SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.c + fi + SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" y.tab.h + fi + ;; + esac + fi + if [ ! -f y.tab.h ]; then + echo >y.tab.h + fi + if [ ! -f y.tab.c ]; then + echo 'main() { return 0; }' >y.tab.c + fi + ;; + + lex|flex) + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.l' file. You may need the \`Flex' package + in order for those modifications to take effect. You can get + \`Flex' from any GNU archive site." + rm -f lex.yy.c + if [ $# -ne 1 ]; then + eval LASTARG="\${$#}" + case "$LASTARG" in + *.l) + SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` + if [ -f "$SRCFILE" ]; then + cp "$SRCFILE" lex.yy.c + fi + ;; + esac + fi + if [ ! -f lex.yy.c ]; then + echo 'main() { return 0; }' >lex.yy.c + fi + ;; + + help2man) + if test -z "$run" && ($1 --version) > /dev/null 2>&1; then + # We have it, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a dependency of a manual page. You may need the + \`Help2man' package in order for those modifications to take + effect. You can get \`Help2man' from any GNU archive site." + + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` + fi + if [ -f "$file" ]; then + touch $file + else + test -z "$file" || exec >$file + echo ".ab help2man is required to generate this page" + exit 1 + fi + ;; + + makeinfo) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is $msg. You should only need it if + you modified a \`.texi' or \`.texinfo' file, or any other file + indirectly affecting the aspect of the manual. The spurious + call might also be the consequence of using a buggy \`make' (AIX, + DU, IRIX). You might want to install the \`Texinfo' package or + the \`GNU make' package. Grab either from any GNU archive site." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # We have already tried tar in the generic part. + # Look for gnutar/gtar before invocation to avoid ugly error + # messages. + if (gnutar --version > /dev/null 2>&1); then + gnutar "$@" && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar "$@" && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" "$@" && exit 0 + ;; + esac + fi + + echo 1>&2 "\ +WARNING: I can't seem to be able to run \`tar' with the given arguments. + You may want to install GNU tar or Free paxutils, or check the + command line arguments." + exit 1 + ;; + + *) + echo 1>&2 "\ +WARNING: \`$1' is needed, and is $msg. + You might have modified some files without having the + proper tools for further handling them. Check the \`README' file, + it often tells you about the needed prerequisites for installing + this package. You may also peek at any GNU archive site, in case + some other package would contain this missing \`$1' program." + exit 1 + ;; +esac + +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-end: "$" +# End: diff --git a/X11/extensions/mitmiscstr.h b/X11/extensions/mitmiscstr.h new file mode 100644 index 000000000..32cae2635 --- /dev/null +++ b/X11/extensions/mitmiscstr.h @@ -0,0 +1,70 @@ +/* $XFree86$ */ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */ + +/* $Xorg: mitmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#ifndef _MITMISCSTR_H_ +#define _MITMISCSTR_H_ + +#include "MITMisc.h" + +#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD" + +typedef struct _SetBugMode { + CARD8 reqType; /* always MITReqCode */ + CARD8 mitReqType; /* always X_MITSetBugMode */ + CARD16 length B16; + BOOL onOff; + BYTE pad0; + CARD16 pad1; +} xMITSetBugModeReq; +#define sz_xMITSetBugModeReq 8 + +typedef struct _GetBugMode { + CARD8 reqType; /* always MITReqCode */ + CARD8 mitReqType; /* always X_MITGetBugMode */ + CARD16 length B16; +} xMITGetBugModeReq; +#define sz_xMITGetBugModeReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL onOff; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xMITGetBugModeReply; +#define sz_xMITGetBugModeReply 32 + +#endif /* _MITMISCSTR_H_ */ diff --git a/X11/extensions/mkinstalldirs b/X11/extensions/mkinstalldirs new file mode 100644 index 000000000..d2d5f21b6 --- /dev/null +++ b/X11/extensions/mkinstalldirs @@ -0,0 +1,111 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +errstatus=0 +dirmode="" + +usage="\ +Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." + +# process command line arguments +while test $# -gt 0 ; do + case $1 in + -h | --help | --h*) # -h for help + echo "$usage" 1>&2 + exit 0 + ;; + -m) # -m PERM arg + shift + test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } + dirmode=$1 + shift + ;; + --) # stop option processing + shift + break + ;; + -*) # unknown option + echo "$usage" 1>&2 + exit 1 + ;; + *) # first non-opt arg + break + ;; + esac +done + +for file +do + if test -d "$file"; then + shift + else + break + fi +done + +case $# in + 0) exit 0 ;; +esac + +case $dirmode in + '') + if mkdir -p -- . 2>/dev/null; then + echo "mkdir -p -- $*" + exec mkdir -p -- "$@" + fi + ;; + *) + if mkdir -m "$dirmode" -p -- . 2>/dev/null; then + echo "mkdir -m $dirmode -p -- $*" + exec mkdir -m "$dirmode" -p -- "$@" + fi + ;; +esac + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case $pathcomp in + -*) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + else + if test ! -z "$dirmode"; then + echo "chmod $dirmode $pathcomp" + lasterr="" + chmod "$dirmode" "$pathcomp" || lasterr=$? + + if test ! -z "$lasterr"; then + errstatus=$lasterr + fi + fi + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# End: +# mkinstalldirs ends here diff --git a/X11/extensions/multibuf.h b/X11/extensions/multibuf.h new file mode 100644 index 000000000..96b4c3b14 --- /dev/null +++ b/X11/extensions/multibuf.h @@ -0,0 +1,317 @@ +/* + * $Xorg: multibuf.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ + * +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + */ + +/* $XFree86: xc/include/extensions/multibuf.h,v 3.4 2001/12/14 19:53:28 dawes Exp $ */ + +#ifndef _MULTIBUF_H_ +#define _MULTIBUF_H_ + +#include + +#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering" + +#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */ +#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */ + +#define X_MbufGetBufferVersion 0 +#define X_MbufCreateImageBuffers 1 +#define X_MbufDestroyImageBuffers 2 +#define X_MbufDisplayImageBuffers 3 +#define X_MbufSetMBufferAttributes 4 +#define X_MbufGetMBufferAttributes 5 +#define X_MbufSetBufferAttributes 6 +#define X_MbufGetBufferAttributes 7 +#define X_MbufGetBufferInfo 8 +#define X_MbufCreateStereoWindow 9 +#define X_MbufClearImageBufferArea 10 + +/* + * update_action field + */ +#define MultibufferUpdateActionUndefined 0 +#define MultibufferUpdateActionBackground 1 +#define MultibufferUpdateActionUntouched 2 +#define MultibufferUpdateActionCopied 3 + +/* + * update_hint field + */ +#define MultibufferUpdateHintFrequent 0 +#define MultibufferUpdateHintIntermittent 1 +#define MultibufferUpdateHintStatic 2 + +/* + * valuemask fields + */ +#define MultibufferWindowUpdateHint (1L << 0) +#define MultibufferBufferEventMask (1L << 0) + +/* + * mono vs. stereo and left vs. right + */ +#define MultibufferModeMono 0 +#define MultibufferModeStereo 1 +#define MultibufferSideMono 0 +#define MultibufferSideLeft 1 +#define MultibufferSideRight 2 + +/* + * clobber state + */ +#define MultibufferUnclobbered 0 +#define MultibufferPartiallyClobbered 1 +#define MultibufferFullyClobbered 2 + +/* + * event stuff + */ +#define MultibufferClobberNotifyMask 0x02000000 +#define MultibufferUpdateNotifyMask 0x04000000 + +#define MultibufferClobberNotify 0 +#define MultibufferUpdateNotify 1 +#define MultibufferNumberEvents (MultibufferUpdateNotify + 1) + +#define MultibufferBadBuffer 0 +#define MultibufferNumberErrors (MultibufferBadBuffer + 1) + + +#ifndef _MULTIBUF_SERVER_ +/* + * Extra definitions that will only be needed in the client + */ +typedef XID Multibuffer; + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + int send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Multibuffer buffer; /* buffer of event */ + int state; /* see Clobbered constants above */ +} XmbufClobberNotifyEvent; + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + int send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Multibuffer buffer; /* buffer of event */ +} XmbufUpdateNotifyEvent; + + +/* + * per-window attributes that can be got + */ +typedef struct { + int displayed_index; /* which buffer is being displayed */ + int update_action; /* Undefined, Background, Untouched, Copied */ + int update_hint; /* Frequent, Intermittent, Static */ + int window_mode; /* Mono, Stereo */ + int nbuffers; /* Number of buffers */ + Multibuffer *buffers; /* Buffers */ +} XmbufWindowAttributes; + +/* + * per-window attributes that can be set + */ +typedef struct { + int update_hint; /* Frequent, Intermittent, Static */ +} XmbufSetWindowAttributes; + + +/* + * per-buffer attributes that can be got + */ +typedef struct { + Window window; /* which window this belongs to */ + unsigned long event_mask; /* events that have been selected */ + int buffer_index; /* which buffer is this */ + int side; /* Mono, Left, Right */ +} XmbufBufferAttributes; + +/* + * per-buffer attributes that can be set + */ +typedef struct { + unsigned long event_mask; /* events that have been selected */ +} XmbufSetBufferAttributes; + + +/* + * per-screen buffer info (there will be lists of them) + */ +typedef struct { + VisualID visualid; /* visual usuable at this depth */ + int max_buffers; /* most buffers for this visual */ + int depth; /* depth of buffers to be created */ +} XmbufBufferInfo; + +_XFUNCPROTOBEGIN + +extern Bool XmbufQueryExtension( + Display* /* dpy */, + int* /* event_base_return */, + int* /* error_base_return */ +); + +extern Status XmbufGetVersion( + Display* /* dpy */, + int* /* major_version_return */, + int* /* minor_version_return */ +); + +extern int XmbufCreateBuffers( + Display* /* dpy */, + Window /* w */, + int /* count */, + int /* update_action */, + int /* update_hint */, + Multibuffer* /* buffers */ +); + +extern void XmbufDestroyBuffers( + Display* /* dpy */, + Window /* window */ +); + +extern void XmbufDisplayBuffers( + Display* /* dpy */, + int /* count */, + Multibuffer* /* buffers */, + int /* min_delay */, + int /* max_delay */ +); + +extern Status XmbufGetWindowAttributes( + Display* /* dpy */, + Window /* w */, + XmbufWindowAttributes* /* attr */ +); + +extern void XmbufChangeWindowAttributes( + Display* /* dpy */, + Window /* w */, + unsigned long /* valuemask */, + XmbufSetWindowAttributes* /* attr */ +); + +extern Status XmbufGetBufferAttributes( + Display* /* dpy */, + Multibuffer /* b */, + XmbufBufferAttributes* /* attr */ +); + +extern void XmbufChangeBufferAttributes( + Display* /* dpy */, + Multibuffer /* b */, + unsigned long /* valuemask */, + XmbufSetBufferAttributes* /* attr */ +); + +extern Status XmbufGetScreenInfo( + Display* /* dpy */, + Drawable /* d */, + int* /* nmono_return */, + XmbufBufferInfo** /* mono_info_return */, + int* /* nstereo_return */, + XmbufBufferInfo** /* stereo_info_return */ +); + +extern Window XmbufCreateStereoWindow( + Display* /* dpy */, + Window /* parent */, + int /* x */, + int /* y */, + unsigned int /* width */, + unsigned int /* height */, + unsigned int /* border_width */, + int /* depth */, + unsigned int /* class */, + Visual* /* visual */, + unsigned long /* valuemask */, + XSetWindowAttributes* /* attr */, + Multibuffer* /* leftp */, + Multibuffer* /* rightp */ +); + +extern void XmbufClearBufferArea( + Display* /* dpy */, + Multibuffer /* buffer */, + int /* x */, + int /* y */, + unsigned int /* width */, + unsigned int /* height */, + Bool /* exposures */ +); + +_XFUNCPROTOEND + +#else + +#include "scrnintstr.h" + +typedef Bool (* mbInitFunc)(); + +struct _mbufScreen; /* declared in multibufst.h */ + +extern void RegisterMultibufferInit( + ScreenPtr /* pScreen */, + Bool (* /* bufMultibufferInit */)( + ScreenPtr /* pScreen */, + struct _mbufScreen * /* pMBScreen */ + ) +); + +struct xMbufBufferInfo; /* declared in multibufst.h */ + +extern void RegisterDoubleBufferHardware( + ScreenPtr /* pScreen */, + int /* nInfo */, + struct xMbufBufferInfo * /* pInfo */, + DevUnion * /* frameBuffer */, + DevUnion /* selectPlane */, + void (* /* CopyBufferBitsFunc */ )(), + void (* /* DrawSelectPlaneFunc */ )() +); + +extern int CreateImageBuffers ( + WindowPtr /* pWin */, + int /* nbuf */, + XID * /* ids */, + int /* action */, + int /* hint */ +); +extern void DestroyImageBuffers ( + WindowPtr /* pWin */ +); +extern int DisplayImageBuffers ( + XID * /* ids */, + int /* nbuf */ +); + +#endif /* _MULTIBUF_SERVER_ */ +#endif /* _MULTIBUF_H_ */ diff --git a/X11/extensions/multibufst.h b/X11/extensions/multibufst.h new file mode 100644 index 000000000..8469a16db --- /dev/null +++ b/X11/extensions/multibufst.h @@ -0,0 +1,609 @@ +/* + * $Xorg: multibufst.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ + * +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + */ + +/* $XFree86: xc/include/extensions/multibufst.h,v 3.8 2001/12/19 21:37:29 dawes Exp $ */ + +#ifndef _MULTIBUFST_H_ +#define _MULTIBUFST_H_ + +/* + * Protocol requests constants and alignment values + */ + +#include "multibuf.h" +#ifdef _MULTIBUF_SERVER_ +#include "inputstr.h" +#endif + +#if !defined(UNIXCPP) || defined(ANSICPP) +#define MbufGetReq(name,req,info) GetReq (name, req); \ + req->reqType = info->codes->major_opcode; \ + req->mbufReqType = X_##name; +#else +#define MbufGetReq(name,req,info) GetReq (name, req); \ + req->reqType = info->codes->major_opcode; \ + req->mbufReqType = X_/**/name; +#endif + +#define Window CARD32 +#define Drawable CARD32 +#define VisualID CARD32 +#define Multibuffer CARD32 + +typedef struct xMbufBufferInfo { + CARD32 visualID B32; /* associated visual */ + CARD16 maxBuffers B16; /* maximum supported buffers */ + CARD8 depth; /* depth of visual (redundant) */ + CARD8 unused; +} xMbufBufferInfo; +#define sz_xMbufBufferInfo 8 + +typedef struct { + BYTE type; + BYTE unused; + CARD16 sequenceNumber B16; + CARD32 buffer B32; /* affected buffer */ + BYTE state; /* current status */ + CARD8 unused1; + CARD16 unused2 B16; + CARD32 unused3 B32; + CARD32 unused4 B32; + CARD32 unused5 B32; + CARD32 unused6 B32; + CARD32 unused7 B32; +} xMbufClobberNotifyEvent; + +typedef struct { + BYTE type; + BYTE unused; + CARD16 sequenceNumber B16; + CARD32 buffer B32; /* affected buffer */ + CARD32 timeStamp B32; /* update time */ + CARD32 unused1 B32; + CARD32 unused2 B32; + CARD32 unused3 B32; + CARD32 unused4 B32; + CARD32 unused5 B32; + CARD32 unused6 B32; +} xMbufUpdateNotifyEvent; + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufGetBufferVersion */ + CARD16 length B16; +} xMbufGetBufferVersionReq; +#define sz_xMbufGetBufferVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 majorVersion; /* major version of Multi-Buffering protocol */ + CARD8 minorVersion; /* minor version of Multi-Buffering protocol */ + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xMbufGetBufferVersionReply; +#define sz_xMbufGetBufferVersionReply 32 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufCreateImageBuffers */ + CARD16 length B16; + CARD32 window B32; /* associated window */ + CARD8 updateAction; /* action at update */ + CARD8 updateHint; /* hint as to frequency of updates */ + CARD16 unused; +} xMbufCreateImageBuffersReq; /* followed by buffer ids */ +#define sz_xMbufCreateImageBuffersReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 numberBuffer B16; /* number successfully allocated */ + CARD16 unused1 B16; + CARD32 unused2 B32; + CARD32 unused3 B32; + CARD32 unused4 B32; + CARD32 unused5 B32; + CARD32 unused6 B32; +} xMbufCreateImageBuffersReply; +#define sz_xMbufCreateImageBuffersReply 32 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufDestroyImageBuffers */ + CARD16 length B16; + CARD32 window B32; /* associated window */ +} xMbufDestroyImageBuffersReq; +#define sz_xMbufDestroyImageBuffersReq 8 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufDisplayImageBuffers */ + CARD16 length B16; + CARD16 minDelay B16; /* minimum time between last update and now */ + CARD16 maxDelay B16; /* maximum time between last update and now */ +} xMbufDisplayImageBuffersReq; /* followed by list of buffers */ +#define sz_xMbufDisplayImageBuffersReq 8 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufSetMBufferAttributes */ + CARD16 length B16; + CARD32 window B32; /* associated window */ + CARD32 valueMask B32; /* modified entries */ +} xMbufSetMBufferAttributesReq; /* followed by values */ +#define sz_xMbufSetMBufferAttributesReq 12 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufGetMBufferAttributes */ + CARD16 length B16; + CARD32 window B32; /* associated window */ +} xMbufGetMBufferAttributesReq; +#define sz_xMbufGetMBufferAttributesReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 displayedBuffer B16; /* currently visible buffer */ + CARD8 updateAction; + CARD8 updateHint; + CARD8 windowMode; + CARD8 unused0; + CARD16 unused1 B16; + CARD32 unused2 B32; + CARD32 unused3 B32; + CARD32 unused4 B32; + CARD32 unused5 B32; +} xMbufGetMBufferAttributesReply; +#define sz_xMbufGetMBufferAttributesReply 32 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufSetBufferAttributes */ + CARD16 length B16; + CARD32 buffer B32; + CARD32 valueMask B32; +} xMbufSetBufferAttributesReq; /* followed by values */ +#define sz_xMbufSetBufferAttributesReq 12 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufGetBufferAttributes */ + CARD16 length B16; + CARD32 buffer B32; +} xMbufGetBufferAttributesReq; +#define sz_xMbufGetBufferAttributesReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 window B32; + CARD32 eventMask B32; + CARD16 bufferIndex B16; + CARD8 side; + CARD8 unused0; + CARD32 unused1 B32; + CARD32 unused2 B32; + CARD32 unused3 B32; +} xMbufGetBufferAttributesReply; +#define sz_xMbufGetBufferAttributesReply 32 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufGetBufferInfo */ + CARD16 length B16; + Drawable drawable B32; +} xMbufGetBufferInfoReq; +#define sz_xMbufGetBufferInfoReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 normalInfo B16; + CARD16 stereoInfo B16; + CARD32 unused1 B32; + CARD32 unused2 B32; + CARD32 unused3 B32; + CARD32 unused4 B32; + CARD32 unused5 B32; +} xMbufGetBufferInfoReply; /* followed by buffer infos */ +#define sz_xMbufGetBufferInfoReply 32 + + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufCreateStereoWindow */ + CARD16 length B16; + CARD8 unused0; + CARD8 unused1; + CARD8 unused2; + CARD8 depth; + Window wid B32; + Window parent B32; + Multibuffer left B32; /* associated buffers */ + Multibuffer right B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 borderWidth B16; +#if defined(__cplusplus) || defined(c_plusplus) + CARD16 c_class B16; +#else + CARD16 class B16; +#endif + VisualID visual B32; + CARD32 mask B32; +} xMbufCreateStereoWindowReq; /* followed by value list */ +#define sz_xMbufCreateStereoWindowReq 44 + +typedef struct { + CARD8 reqType; /* always codes->major_opcode */ + CARD8 mbufReqType; /* always X_MbufClearImageBufferArea */ + CARD16 length B16; + Multibuffer buffer B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD8 unused0; + CARD8 unused1; + CARD8 unused2; + BOOL exposures; +} xMbufClearImageBufferAreaReq; +#define sz_xMbufClearImageBufferAreaReq 20 + +#undef Window +#undef Drawable +#undef VisualID +#undef Multibuffer + + +#ifdef _MULTIBUF_SERVER_ +/* Macros for wrapping and unwrapping functions */ + +#define SWAP_FUNC_VECTOR(pSTRUCT1,pSTRUCT2,DATA_TYPE,FUNC_NAME) \ +{ \ + DATA_TYPE (* tmpFn)(); \ + \ + tmpFn = pSTRUCT1->FUNC_NAME; \ + pSTRUCT1->FUNC_NAME = pSTRUCT2->FUNC_NAME; \ + pSTRUCT2->FUNC_NAME = tmpFn; \ +} + +#if !defined(UNIXCPP) || defined(ANSICPP) +#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ +{ \ + if ((pPRIV->funcsWrapped & FUNC_NAME##Mask) == 0) \ + { \ + pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \ + pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \ + pPRIV->funcsWrapped |= FUNC_NAME##Mask; \ + } \ +} + +#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ +{ \ + SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ + pPRIV->funcsWrapped &= ~(FUNC_NAME##Mask); \ +} + +#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ +{ \ + if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \ + { \ + SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ + pPRIV->funcsWrapped |= FUNC_NAME##Mask; \ + } \ +} +#else +#define WRAP_SCREEN_FUNC(pSCREEN,pPRIV,FUNC_NAME, PRIV_FUNC_NAME) \ +{ \ + if ((pPRIV->funcsWrapped & FUNC_NAME/**/Mask) == 0) \ + { \ + pPRIV->FUNC_NAME = pSCREEN->FUNC_NAME; \ + pSCREEN->FUNC_NAME = PRIV_FUNC_NAME; \ + pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \ + } \ +} + +#define UNWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ +{ \ + SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ + pPRIV->funcsWrapped &= ~(FUNC_NAME/**/Mask); \ +} + +#define REWRAP_SCREEN_FUNC(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME) \ +{ \ + if (MB_SCREEN_PRIV(pSCREEN)->mbufWindowCount) \ + { \ + SWAP_FUNC_VECTOR(pSCREEN,pPRIV,DATA_TYPE,FUNC_NAME); \ + pPRIV->funcsWrapped |= FUNC_NAME/**/Mask; \ + } \ +} +#endif + +/* The _Multibuffer and _Multibuffers structures below refer to each other, + * so we need this forward declaration + */ +typedef struct _Multibuffers *MultibuffersPtr; + +/* + * per-Multibuffer data + */ + +typedef struct _Multibuffer { + MultibuffersPtr pMultibuffers; /* associated window data */ + Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */ + Mask otherEventMask; /* mask of all other clients event masks */ + OtherClients *otherClients; /* other clients that want events */ + int number; /* index of this buffer into array */ + int side; /* always Mono */ + int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */ + PixmapPtr pPixmap; /* associated pixmap */ +} MultibufferRec, *MultibufferPtr; + +/* + * per-window data + */ + +typedef struct _Multibuffers { + WindowPtr pWindow; /* associated window */ + int numMultibuffer; /* count of buffers */ + int refcnt; /* ref count for delete */ + int displayedMultibuffer; /* currently active buffer */ + int updateAction; /* Undefined, Background, Untouched, Copied */ + int updateHint; /* Frequent, Intermittent, Static */ + int windowMode; /* always Mono */ + + TimeStamp lastUpdate; /* time of last update */ + + unsigned short width, height; /* last known window size */ + short x, y; /* for static gravity */ + + MultibufferPtr buffers; /* array of numMultibuffer buffers */ +} MultibuffersRec; + +/* + * per-screen data + */ +typedef struct _MultibufferScreen { + PositionWindowProcPtr PositionWindow; /* pWin, x,y */ +} MultibufferScreenRec, *MultibufferScreenPtr; + +/* + * per display-image-buffers request data. + */ + +typedef struct _DisplayRequest { + struct _DisplayRequest *next; + TimeStamp activateTime; + ClientPtr pClient; + XID id; +} DisplayRequestRec, *DisplayRequestPtr; + +#define DestroyWindowMask (1L<<0) +#define PositionWindowMask (1L<<1) +#define PostValidateTreeMask (1L<<2) +#define ClipNotifyMask (1L<<3) +#define WindowExposuresMask (1L<<4) +#define CopyWindowMask (1L<<5) +#define ClearToBackgroundMask (1L<<6) +#define ChangeWindowAttributesMask (1L<<7) + +extern int MultibufferScreenIndex; +extern int MultibufferWindowIndex; + +extern RESTYPE MultibufferDrawableResType; + +extern void MultibufferUpdate( /* pMbuffer, time */ + MultibufferPtr /* pMultibuffer */, + CARD32 /* time */ + ); +extern void MultibufferExpose( /* pMbuffer, pRegion */ + MultibufferPtr /* pMultibuffer */, + RegionPtr /* pRegion */ + ); +extern void MultibufferClobber( /* pMbuffer */ + MultibufferPtr /* pMultibuffer */ + ); + +typedef struct _mbufWindow *mbufWindowPtr; + +/* + * per-buffer data + */ + +#define MB_DISPLAYED_BUFFER(pMBWindow) \ + ((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer) + +typedef struct _mbufBuffer { + mbufWindowPtr pMBWindow; /* associated window data */ + Mask eventMask; /* client event mask */ + Mask otherEventMask; /* union of other clients' event masks */ + OtherClientsPtr otherClients; /* other clients that want events */ + int number; /* index of this buffer into array */ + int side; /* stero side: always Mono */ + int clobber; /* clober state */ + DrawablePtr pDrawable; /* associated drawable */ +} mbufBufferRec, *mbufBufferPtr; + + +/* + * per-window data + */ + +#define MB_WINDOW_PRIV(pWin) \ + ((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr)) + +typedef struct _mbufWindow { + WindowPtr pWindow; /* associated window */ + int numMultibuffer; /* count of buffers */ + mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */ + int displayedMultibuffer; /* currently active buffer */ + int updateAction; /* Undefined, Background, + Untouched, Copied */ + int updateHint; /* Frequent, Intermittent, Static */ + int windowMode; /* always Mono */ + TimeStamp lastUpdate; /* time of last update */ + short x, y; /* for static gravity */ + unsigned short width, height; /* last known window size */ + DevUnion devPrivate; +} mbufWindowRec; + + +/* + * per-screen data + */ + +#define MB_SCREEN_PRIV(pScreen) \ + ((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr)) + +typedef struct _mbufScreen { + long mbufWindowCount; /* count of multibuffered windows */ + + /* Wrap pScreen->DestroyWindow */ + DestroyWindowProcPtr DestroyWindow; + long funcsWrapped; /* flags which functions are wrapped */ + + /* Initialized by device-dependent section */ + int nInfo; /* number of buffer info rec's */ + xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */ + + int (* CreateImageBuffers)( + WindowPtr /* pWin */, + int /* nbuf */, + XID * /* ids */, + int /* action */, + int /* hint */ + ); + void (* DestroyImageBuffers)( + WindowPtr /* pWin */ + ); + void (* DisplayImageBuffers)( + ScreenPtr /* pScreen */, + mbufBufferPtr * /* ppMBBuffer */, + mbufWindowPtr * /* ppMBWindow */, + int /* nbuf */ + ); + void (* ClearImageBufferArea)( + mbufBufferPtr /* pMBBuffer */, + short /* x */, + short /* y */, + unsigned short /* width */, + unsigned short /* height */, + Bool /* exposures */ + ); + Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */ + /* FIXME */ + ); + Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */ + /* FIXME */ + ); + void (* DeleteBufferDrawable)( + DrawablePtr /* pDrawable */ + ); + void (* WrapScreenFuncs)( + ScreenPtr /* pScreen */ + ); + void (* ResetProc)( + ScreenPtr /* pScreen */ + ); + DevUnion devPrivate; +} mbufScreenRec, *mbufScreenPtr; + + +/* Privates to mbufScreenRec */ + +#ifdef _MULTIBUF_PIXMAP_ +#define MB_SCREEN_PRIV_PIXMAP(pScreen) \ + ((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) + +typedef struct _mbufPixmapPriv +{ + /* Pointers to wrapped functions */ + PositionWindowProcPtr PositionWindow; /* pWin, x,y */ + long funcsWrapped; /* flags which functions are wrapped */ +} mbufPixmapPrivRec, *mbufPixmapPrivPtr; +#endif /* _MULTIBUF_PIXMAP_ */ + + +#ifdef _MULTIBUF_BUFFER_ + +extern int frameWindowPrivateIndex; + +#define MB_SCREEN_PRIV_BUFFER(pScreen) \ + ((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) + +typedef struct _mbufBufferPriv +{ + DevUnion *frameBuffer; /* Array of screen framebuffers */ + DevUnion selectPlane; /* Plane(s) that select displayed buffer */ + + /* + * Note: subtractRgn and unionRgn may overlap. subtractRgn is a union + * of all the old clipLists of the windows that are displaying + * the backbuffer. unionRgn is the union of all the new clipLists + * of the same windows. + */ + + RegionRec backBuffer; /* Area of screen displaying back buffer */ + RegionRec subtractRgn; /* Regions lost to backBuffer */ + RegionRec unionRgn; /* Regions gained by backBuffer */ + Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */ + + void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */ + void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */ + + /* Pointers to wrapped functions */ + PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */ + ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */ + WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */ + CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */ + ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */ + ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */ + long funcsWrapped; /* flags which functions are wrapped */ + unsigned inClearToBackground:1; /* used by WindowExposure */ +} mbufBufferPrivRec, *mbufBufferPrivPtr; +#endif /* _MULTIBUF_BUFFER_ */ + +#endif /* _MULTIBUF_SERVER_ */ +#endif /* _MULTIBUFST_H_ */ diff --git a/X11/extensions/randr.h b/X11/extensions/randr.h new file mode 100644 index 000000000..17e6ef9f6 --- /dev/null +++ b/X11/extensions/randr.h @@ -0,0 +1,141 @@ +/* + * Copyright © 2000 Compaq Computer Corporation + * Copyright © 2002 Hewlett Packard Company + * Copyright © 2006 Intel Corporation + * + * 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 the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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. + * Keith Packard, Intel Corporation + */ + +#ifndef _RANDR_H_ +#define _RANDR_H_ + +typedef unsigned short Rotation; +typedef unsigned short SizeID; +typedef unsigned short SubpixelOrder; +typedef unsigned short Connection; +typedef unsigned short XRandrRotation; +typedef unsigned short XRandrSizeID; +typedef unsigned short XRandrSubpixelOrder; +typedef unsigned long XRandrModeFlags; + +#define RANDR_NAME "RANDR" +#define RANDR_MAJOR 1 +#define RANDR_MINOR 2 + +#define RRNumberErrors 3 +#define RRNumberEvents 2 +#define RRNumberRequests 25 + +#define X_RRQueryVersion 0 +/* we skip 1 to make old clients fail pretty immediately */ +#define X_RROldGetScreenInfo 1 +#define X_RR1_0SetScreenConfig 2 +/* V1.0 apps share the same set screen config request id */ +#define X_RRSetScreenConfig 2 +#define X_RROldScreenChangeSelectInput 3 +/* 3 used to be ScreenChangeSelectInput; deprecated */ +#define X_RRSelectInput 4 +#define X_RRGetScreenInfo 5 + +/* V1.2 additions */ +#define X_RRGetScreenSizeRange 6 +#define X_RRSetScreenSize 7 +#define X_RRGetScreenResources 8 +#define X_RRGetOutputInfo 9 +#define X_RRListOutputProperties 10 +#define X_RRQueryOutputProperty 11 +#define X_RRConfigureOutputProperty 12 +#define X_RRChangeOutputProperty 13 +#define X_RRDeleteOutputProperty 14 +#define X_RRGetOutputProperty 15 +#define X_RRCreateMode 16 +#define X_RRDestroyMode 17 +#define X_RRAddOutputMode 18 +#define X_RRDeleteOutputMode 19 +#define X_RRGetCrtcInfo 20 +#define X_RRSetCrtcConfig 21 +#define X_RRGetCrtcGammaSize 22 +#define X_RRGetCrtcGamma 23 +#define X_RRSetCrtcGamma 24 + +/* Event selection bits */ +#define RRScreenChangeNotifyMask (1L << 0) +/* V1.2 additions */ +#define RRCrtcChangeNotifyMask (1L << 1) +#define RROutputChangeNotifyMask (1L << 2) +#define RROutputPropertyNotifyMask (1L << 3) + +/* Event codes */ +#define RRScreenChangeNotify 0 +/* V1.2 additions */ +#define RRNotify 1 +/* RRNotify Subcodes */ +#define RRNotify_CrtcChange 0 +#define RRNotify_OutputChange 1 +#define RRNotify_OutputProperty 2 + +/* used in the rotation field; rotation and reflection in 0.1 proto. */ +#define RR_Rotate_0 1 +#define RR_Rotate_90 2 +#define RR_Rotate_180 4 +#define RR_Rotate_270 8 + +/* new in 1.0 protocol, to allow reflection of screen */ + +#define RR_Reflect_X 16 +#define RR_Reflect_Y 32 + +#define RRSetConfigSuccess 0 +#define RRSetConfigInvalidConfigTime 1 +#define RRSetConfigInvalidTime 2 +#define RRSetConfigFailed 3 + +/* new in 1.2 protocol */ + +#define RR_HSyncPositive 0x00000001 +#define RR_HSyncNegative 0x00000002 +#define RR_VSyncPositive 0x00000004 +#define RR_VSyncNegative 0x00000008 +#define RR_Interlace 0x00000010 +#define RR_DoubleScan 0x00000020 +#define RR_CSync 0x00000040 +#define RR_CSyncPositive 0x00000080 +#define RR_CSyncNegative 0x00000100 +#define RR_HSkewPresent 0x00000200 +#define RR_BCast 0x00000400 +#define RR_PixelMultiplex 0x00000800 +#define RR_DoubleClock 0x00001000 +#define RR_ClockDivideBy2 0x00002000 + +#define RR_Connected 0 +#define RR_Disconnected 1 +#define RR_UnknownConnection 2 + +#define BadRROutput 0 +#define BadRRCrtc 1 +#define BadRRMode 2 + +/* Conventional RandR output properties */ + +#define RR_PROPERTY_RANDR_EDID "RANDR_EDID" + +#endif /* _RANDR_H_ */ diff --git a/X11/extensions/randrproto.h b/X11/extensions/randrproto.h new file mode 100644 index 000000000..3fb2e45e4 --- /dev/null +++ b/X11/extensions/randrproto.h @@ -0,0 +1,654 @@ +/* + * Copyright © 2000 Compaq Computer Corporation + * Copyright © 2002 Hewlett-Packard Company + * Copyright © 2006 Intel Corporation + * + * 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 the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS 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, Hewlett-Packard Company, Inc. + * Keith Packard, Intel Corporation + */ + +/* note that RANDR 1.0 is incompatible with version 0.0, or 0.1 */ +/* V1.0 removes depth switching from the protocol */ +#ifndef _XRANDRP_H_ +#define _XRANDRP_H_ + +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define RROutput CARD32 +#define RRMode CARD32 +#define RRCrtc CARD32 +#define RRModeFlags CARD32 + +#define Rotation CARD16 +#define SizeID CARD16 +#define SubpixelOrder CARD16 + +/* + * data structures + */ + +typedef struct { + CARD16 widthInPixels B16; + CARD16 heightInPixels B16; + CARD16 widthInMillimeters B16; + CARD16 heightInMillimeters B16; +} xScreenSizes; +#define sz_xScreenSizes 8 + +/* + * requests and replies + */ + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xRRQueryVersionReq; +#define sz_xRRQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRQueryVersionReply; +#define sz_xRRQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; +} xRRGetScreenInfoReq; +#define sz_xRRGetScreenInfoReq 8 + +/* + * the xRRScreenInfoReply structure is followed by: + * + * the size information + */ + + +typedef struct { + BYTE type; /* X_Reply */ + BYTE setOfRotations; + CARD16 sequenceNumber B16; + CARD32 length B32; + Window root B32; + Time timestamp B32; + Time configTimestamp B32; + CARD16 nSizes B16; + SizeID sizeID B16; + Rotation rotation B16; + CARD16 rate B16; + CARD16 nrateEnts B16; + CARD16 pad B16; +} xRRGetScreenInfoReply; +#define sz_xRRGetScreenInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Drawable drawable B32; + Time timestamp B32; + Time configTimestamp B32; + SizeID sizeID B16; + Rotation rotation B16; +} xRR1_0SetScreenConfigReq; +#define sz_xRR1_0SetScreenConfigReq 20 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Drawable drawable B32; + Time timestamp B32; + Time configTimestamp B32; + SizeID sizeID B16; + Rotation rotation B16; + CARD16 rate B16; + CARD16 pad B16; +} xRRSetScreenConfigReq; +#define sz_xRRSetScreenConfigReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time newTimestamp B32; + Time newConfigTimestamp B32; + Window root; + CARD16 subpixelOrder B16; + CARD16 pad4 B16; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRSetScreenConfigReply; +#define sz_xRRSetScreenConfigReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + CARD16 enable B16; + CARD16 pad2 B16; +} xRRSelectInputReq; +#define sz_xRRSelectInputReq 12 + +/* + * Additions for version 1.2 + */ + +typedef struct _xRRModeInfo { + RRMode id B32; + CARD16 width B16; + CARD16 height B16; + CARD32 dotClock B32; + CARD16 hSyncStart B16; + CARD16 hSyncEnd B16; + CARD16 hTotal B16; + CARD16 hSkew B16; + CARD16 vSyncStart B16; + CARD16 vSyncEnd B16; + CARD16 vTotal B16; + CARD16 nameLength B16; + RRModeFlags modeFlags B32; +} xRRModeInfo; +#define sz_xRRModeInfo 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; +} xRRGetScreenSizeRangeReq; +#define sz_xRRGetScreenSizeRangeReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 minWidth B16; + CARD16 minHeight B16; + CARD16 maxWidth B16; + CARD16 maxHeight B16; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xRRGetScreenSizeRangeReply; +#define sz_xRRGetScreenSizeRangeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + CARD16 width B16; + CARD16 height B16; + CARD32 widthInMillimeters B32; + CARD32 heightInMillimeters B32; +} xRRSetScreenSizeReq; +#define sz_xRRSetScreenSizeReq 20 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; +} xRRGetScreenResourcesReq; +#define sz_xRRGetScreenResourcesReq 8 + +typedef struct { + BYTE type; + CARD8 pad; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time timestamp B32; + Time configTimestamp B32; + CARD16 nCrtcs B16; + CARD16 nOutputs B16; + CARD16 nModes B16; + CARD16 nbytesNames B16; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xRRGetScreenResourcesReply; +#define sz_xRRGetScreenResourcesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + Time configTimestamp B32; +} xRRGetOutputInfoReq; +#define sz_xRRGetOutputInfoReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time timestamp B32; + RRCrtc crtc B32; + CARD32 mmWidth B32; + CARD32 mmHeight B32; + CARD8 connection; + CARD8 subpixelOrder; + CARD16 nCrtcs B16; + CARD16 nModes B16; + CARD16 nPreferred B16; + CARD16 nClones B16; + CARD16 nameLength B16; +} xRRGetOutputInfoReply; +#define sz_xRRGetOutputInfoReply 36 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; +} xRRListOutputPropertiesReq; +#define sz_xRRListOutputPropertiesReq 8 + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 nAtoms B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRListOutputPropertiesReply; +#define sz_xRRListOutputPropertiesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + Atom property B32; +} xRRQueryOutputPropertyReq; +#define sz_xRRQueryOutputPropertyReq 12 + +typedef struct { + BYTE type; + BYTE pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL pending; + BOOL range; + BOOL immutable; + BYTE pad1; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRQueryOutputPropertyReply; +#define sz_xRRQueryOutputPropertyReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + Atom property B32; + BOOL pending; + BOOL range; + CARD16 pad B16; +} xRRConfigureOutputPropertyReq; +#define sz_xRRConfigureOutputPropertyReq 16 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + Atom property B32; + Atom type B32; + CARD8 format; + CARD8 mode; + CARD16 pad; + CARD32 nUnits B32; +} xRRChangeOutputPropertyReq; +#define sz_xRRChangeOutputPropertyReq 24 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + Atom property B32; +} xRRDeleteOutputPropertyReq; +#define sz_xRRDeleteOutputPropertyReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + Atom property B32; + Atom type B32; + CARD32 longOffset B32; + CARD32 longLength B32; +#ifdef __cplusplus + BOOL _delete; +#else + BOOL delete; +#endif + BOOL pending; + CARD16 pad1 B16; +} xRRGetOutputPropertyReq; +#define sz_xRRGetOutputPropertyReq 28 + +typedef struct { + BYTE type; + CARD8 format; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom propertyType B32; + CARD32 bytesAfter B32; + CARD32 nItems B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xRRGetOutputPropertyReply; +#define sz_xRRGetOutputPropertyReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + Window window B32; + xRRModeInfo modeInfo; +} xRRCreateModeReq; +#define sz_xRRCreateModeReq 40 + +typedef struct { + BYTE type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + RRMode mode B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRCreateModeReply; +#define sz_xRRCreateModeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRMode mode B32; +} xRRDestroyModeReq; +#define sz_xRRDestroyModeReq 8 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + RRMode mode B32; +} xRRAddOutputModeReq; +#define sz_xRRAddOutputModeReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RROutput output B32; + RRMode mode B32; +} xRRDeleteOutputModeReq; +#define sz_xRRDeleteOutputModeReq 12 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRCrtc crtc B32; + Time configTimestamp B32; +} xRRGetCrtcInfoReq; +#define sz_xRRGetCrtcInfoReq 12 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time timestamp B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + RRMode mode B32; + Rotation rotation B16; + Rotation rotations B16; + CARD16 nOutput B16; + CARD16 nPossibleOutput B16; +} xRRGetCrtcInfoReply; +#define sz_xRRGetCrtcInfoReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRCrtc crtc B32; + Time timestamp B32; + Time configTimestamp B32; + INT16 x B16; + INT16 y B16; + RRMode mode B32; + Rotation rotation B16; + CARD16 pad B16; +} xRRSetCrtcConfigReq; +#define sz_xRRSetCrtcConfigReq 28 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + Time newTimestamp B32; + CARD32 pad1 B32; + CARD32 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRRSetCrtcConfigReply; +#define sz_xRRSetCrtcConfigReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRCrtc crtc B32; +} xRRGetCrtcGammaSizeReq; +#define sz_xRRGetCrtcGammaSizeReq 8 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 size B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRGetCrtcGammaSizeReply; +#define sz_xRRGetCrtcGammaSizeReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRCrtc crtc B32; +} xRRGetCrtcGammaReq; +#define sz_xRRGetCrtcGammaReq 8 + +typedef struct { + BYTE type; + CARD8 status; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 size B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRRGetCrtcGammaReply; +#define sz_xRRGetCrtcGammaReply 32 + +typedef struct { + CARD8 reqType; + CARD8 randrReqType; + CARD16 length B16; + RRCrtc crtc B32; + CARD16 size B16; + CARD16 pad1 B16; +} xRRSetCrtcGammaReq; +#define sz_xRRSetCrtcGammaReq 12 + +/* + * event + */ +typedef struct { + CARD8 type; /* always evBase + ScreenChangeNotify */ + CARD8 rotation; /* new rotation */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time screen was changed */ + Time configTimestamp B32; /* time config data was changed */ + Window root B32; /* root window */ + Window window B32; /* window requesting notification */ + SizeID sizeID B16; /* new size ID */ + CARD16 subpixelOrder B16; /* subpixel order */ + CARD16 widthInPixels B16; /* new size */ + CARD16 heightInPixels B16; + CARD16 widthInMillimeters B16; + CARD16 heightInMillimeters B16; +} xRRScreenChangeNotifyEvent; +#define sz_xRRScreenChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_CrtcChange */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time crtc was changed */ + Window window B32; /* window requesting notification */ + RRCrtc crtc B32; /* affected CRTC */ + RRMode mode B32; /* current mode */ + CARD16 rotation B16; /* rotation and reflection */ + CARD16 pad1 B16; /* unused */ + INT16 x B16; /* new location */ + INT16 y B16; + CARD16 width B16; /* new size */ + CARD16 height B16; +} xRRCrtcChangeNotifyEvent; +#define sz_xRRCrtcChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_OutputChange */ + CARD16 sequenceNumber B16; + Time timestamp B32; /* time crtc was changed */ + Time configTimestamp B32; /* time crtc was changed */ + Window window B32; /* window requesting notification */ + RROutput output B32; /* affected output */ + RRCrtc crtc B32; /* current crtc */ + RRMode mode B32; /* current mode */ + CARD16 rotation B16; /* rotation and reflection */ + CARD8 connection; /* connection status */ + CARD8 subpixelOrder; /* subpixel order */ +} xRROutputChangeNotifyEvent; +#define sz_xRROutputChangeNotifyEvent 32 + +typedef struct { + CARD8 type; /* always evBase + RRNotify */ + CARD8 subCode; /* RRNotify_OutputProperty */ + CARD16 sequenceNumber B16; + Window window B32; /* window requesting notification */ + RROutput output B32; /* affected output */ + Atom atom B32; /* property name */ + Time timestamp B32; /* time crtc was changed */ + CARD8 state; /* NewValue or Deleted */ + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xRROutputPropertyNotifyEvent; +#define sz_xRROutputPropertyNotifyEvent 32 + +#undef RRModeFlags +#undef RRCrtc +#undef RRMode +#undef RROutput +#undef RRMode +#undef RRCrtc +#undef Drawable +#undef Window +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef Time +#undef KeyCode +#undef KeySym +#undef Rotation +#undef SizeID +#undef SubpixelOrder + +#endif /* _XRANDRP_H_ */ diff --git a/X11/extensions/randrproto.pc.in b/X11/extensions/randrproto.pc.in new file mode 100644 index 000000000..d94d353ec --- /dev/null +++ b/X11/extensions/randrproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: RandrProto +Description: Randr extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/randrproto.txt b/X11/extensions/randrproto.txt new file mode 100644 index 000000000..6719cf800 --- /dev/null +++ b/X11/extensions/randrproto.txt @@ -0,0 +1,1767 @@ + The X Resize, Rotate and Reflect Extension + Version 1.2 + 2006-4-13 + + Jim Gettys + Jim.Gettys@hp.com + Cambridge Research Laboratory + HP Labs + Hewlett Packard Company + + Keith Packard + keith.packard@intel.com + Open Source Technology Center + Intel Corporation + +1. Introduction + +The X Resize, Rotate and Reflect Extension, called RandR for short, +brings the ability to resize, rotate and reflect the root window of a +screen. It is based on the X Resize and Rotate Extension as specified +in the Proceedings of the 2001 Usenix Technical Conference [RANDR]. + +RandR as implemented and integrated into the X server differs in +one substantial fashion from the design discussed in that paper: that +is, RandR 1.0 does not implement the depth switching described in that +document, and the support described for that in the protocol in that +document and in the implementation has been removed from the +protocol described here, as it has been overtaken by events. + +These events include: + ► Modern toolkits (in this case, GTK+ 2.x) have progressed to the point + of implementing migration between screens of arbitrary depths + ► The continued advance of Moore's law has made limited amounts of VRAM + less of an issue, reducing the pressure to implement depth switching + on laptops or desktop systems + ► The continued decline of legacy toolkits whose design would have + required depth switching to support migration + ► The lack of depth switching implementation experience in the + intervening time, due to events beyond our control + +Additionally, the requirement to support depth switching might +complicate other re-engineering of the device independent part of the +X server that is currently being contemplated. + +Rather than further delaying RandR's widespread deployment for a feature +long wanted by the community (resizing of screens, particularly on laptops), +or the deployment of a protocol design that might be flawed due to lack of +implementation experience, we decided to remove depth switching from the +protocol. It may be implemented at a later time if resources and +interests permit as a revision to the protocol described here, which will +remain a stable base for applications. The protocol described here has been +implemented in the main X.org server, and more fully in the hw/kdrive +implementation in the distribution, which fully implements resizing, +rotation and reflection. + +1.2 Introduction to version 1.2 of the extension + +One of the significant limitations found in version 1.1 of the RandR +protocol was the inability to deal with the Xinerama model where multiple +monitors display portions of a common underlying screen. In this environment, +zero or more video outputs are associated with each CRT controller which +defines both a set of video timings and a 'viewport' within the larger +screen. This viewport is independent of the overall size of the screen, and +may be located anywhere within the screen. + +The effect is to decouple the reported size of the screen from the size +presented by each video output, and to permit multiple outputs to present +information for a single screen. + +To extend RandR for this model, we separate out the output, CRTC and screen +configuration information and permit them to be configured separately. For +compatibility with the 1.1 version of the protocol, we make the 1.1 requests +simultaneously affect both the screen and the (presumably sole) CRTC and +output. The set of available outputs are presented with UTF-8 encoded names +and may be connected to CRTCs as permitted by the underlying hardware. CRTC +configuration is now done with full mode information instead of just size +and refresh rate, and these modes have names. These names also use UTF-8 +encoding. New modes may also be added by the user. + +Additional requests and events are provided for this new functionality. + + ┌────────────────────────────────┬──────────┐ + ┏━━━━━━━┳───────────────┐ ╔════════╗ ╔════════╗ + ┃ 1 ┃ │ ║ A ║ ║ B ║ + ┃ ┏━━━╋━━━━━━━━━━━━━━━┫ ║ ║ ║ ║ + ┣━━━╋━━━┛ ┃ ╚════════╝ ╚════════╝ + │ ┃ 2 ┃─────────────────┐ + │ ┃ ┃ ╔═══════════════════╗ + │ ┃ ┃ ║ ║ + │ ┗━━━━━━━━━━━━━━━━━━━┫ ║ C ║ + └───────────────────────┘ ║ ║ + ┌──────┐ ┏━━━━┓ ╔══════╗ ║ ║ + │screen│ ┃CRTC┃ ║output║ ╚═══════════════════╝ + └──────┘ ┗━━━━┛ ╚══════╝ + +In this picture, the screen is covered (incompletely) by two CRTCs. CRTC1 +is connected to two outputs, A and B. CRTC2 is connected to output C. +Outputs A and B will present exactly the same region of the screen using +the same mode line. Output C will present a different (larger) region of +the screen using a different mode line. + +RandR provides information about each available CRTC and output; the +connection between CRTC and output is under application control, although +the hardware will probably impose restrictions on the possible +configurations. The protocol doesn't try to describe these restrictions, +instead it provides a mechanism to find out what combinations are supported. + +For instance, dual-link DVI gangs two CRTC outputs together to provide higher +bandwidth for large resolution screens. This is exposed in RandR by +requiring that nothing be connected to the second CRTC when driving a high +resolution screen on the first. + +1.1 Acknowledgements + +Our thanks to the contributors to the design found on the xpert mailing +list, in particular: + +Alan Hourihane for work on the early implementation +Andrew C. Aitchison for help with the XFree86 DDX implementation +Andy Ritger for early questions about how mergefb/Xinerama work with RandR +Carl Worth for editing the specification and Usenix paper +David Dawes for XFree86 DDX integration work +Thomas Winischhofer for the hardware-accelerated SiS rotation implementation +Matthew Tippett and Kevin Martin for splitting outputs and CRTCs to more +fully expose what video hardware can do + + ❧❧❧❧❧❧❧❧❧❧❧ + +2. Screen change model + +Screens may change dynamically, either under control of this extension, or +due to external events. Examples include: monitors being swapped, pressing a +button to switch from internal display to an external monitor on a laptop, +or, eventually, the hotplug of a display card entirely on busses such as +Cardbus or Express Card which permit hot-swap (which will require other work +in addition to this extension). + +Since the screen configuration is dynamic and asynchronous to the client and +may change at any time RandR provides mechanisms to ensure that your clients +view is up to date with the configuration possibilities of the moment and +enforces applications that wish to control the configuration to prove that +their information is up to date before honoring requests to change the +screen configuration (by requiring a timestamp on the request). + +Interested applications are notified whenever the screen configuration +changes, providing the current size of the screen and subpixel order (see +the Render extension [RENDER]), to enable proper rendering of subpixel +decimated client text to continue, along with a time stamp of the +configuration change. A client must refresh its knowledge of the screen +configuration before attempting to change the configuration after a +notification, or the request will fail. + +To avoid multiplicative explosion between orientation, reflection and sizes, +the sizes are only those sizes in the normal (0) rotation. + +Rotation and reflection and how they interact can be confusing. In Randr, +the coordinate system is rotated in a counter-clockwise direction relative +to the normal orientation. Reflection is along the window system coordinate +system, not the physical screen X and Y axis, so that rotation and +reflection do not interact. The other way to consider reflection is to is +specified in the "normal" orientation, before rotation, if you find the +other way confusing. + +We expect that most clients and toolkits will be oblivious to changes to the +screen structure, as they generally use the values in the connections Display +structure directly. By toolkits updating the values on the fly, we believe +pop-up menus and other pop up windows will position themselves correctly in +the face of screen configuration changes (the issue is ensuring that pop-ups +are visible on the reconfigured screen). + + ❧❧❧❧❧❧❧❧❧❧❧ + +3. Data Types + +The subpixel order is shared with the Render extension, and is documented +there. The only datatype defined is the screen size, defined in the normal +(0 degree) orientation. + + ❧❧❧❧❧❧❧❧❧❧❧ + +4. Errors + +Errors are sent using core X error reports. + +Output + A value for an OUTPUT argument does not name a defined OUTPUT. +CRTC + A value for a CRTC argument does not name a defined CRTC. +Mode + A value for a MODE argument does not name a defined MODE. + + ❧❧❧❧❧❧❧❧❧❧❧ + +5. Protocol Types + +RRCONFIGSTATUS { Success + InvalidConfigTime + InvalidTime + Failed } + + A value of type RRCONFIGSTATUS returned when manipulating the output + configuration or querying information from the server that has some + time-dependency. + + InvalidConfigTime indicates that the supplied configuration + timestamp does not match the current X server configuration + timestamp. Usually this means that the output configuration has + changed since the timestamp was received by the application. + + InvalidTime indicates that the supplied output reconfiguration time + is earlier than the most recent output reconfiguration request. + Generally this indicates that another application has reconfigured + the output using a later timestamp. + + Failed is returned whenever the operation is unsuccessful for some + other reason. This generally indicates that the requested output + configuration is unsupported by the hardware. The goal is to make + these limitations expressed by the protocol, but when that isn't + possible it is correct to return this error value. If, as a + implentor, you find this error code required, please submit the + hardware constraints that exist so that a future version of the + extension can correctly capture the configuration constraints in + your system. + +ROTATION { Rotate_0 + Rotate_90 + Rotate_180 + Rotate_270 + Reflect_X + Reflect_Y } + + These values are used both to indicate a set of allowed rotations + and reflections as well as to indicate a specific rotation and + reflection combination. + +RRSELECTMASK { RRScreenChangeNotifyMask + RRCrtcChangeNotifyMask (New in version 1.2) + RROutputChangeNotifyMask (New in version 1.2) + RROutputPropertyNotifyMask (New in version 1.2) } + +SIZEID { CARD16 } + +MODE { XID or None } + +CRTC { XID } + +OUTPUT { XID } + +CONNECTION { Connected, Disconnected, UnknownConnection } + + This value provides an indication of whether an output is actually + connected to a monitor or other presentation device. + +SUBPIXELORDER { SubPixelUnknown The subpixel order uses the Render + SubPixelHorizontalRGB extensions definitions; they are here + SubPixelHorizontalBGR only for convenience. + SubPixelVerticalRGB + SubPixelVerticalBGR + SubPixelNone } + +SCREENSIZE { widthInPixels, heightInPixels: CARD16 + widthInMillimeters, heightInMillimeters: CARD16 } + +MODEFLAG { HSyncPositive + HSyncNegative + VSyncPositive + VSyncNegative + Interlace + DoubleScan + CSync + CSyncPositive + CSyncNegative + HSkewPresent + BCast + PixelMultiplex + DoubleClock + ClockDivideBy2 } + +MODEINFO { id: MODE + name: STRING + width, height: CARD16 + dotClock: CARD32 + hSyncStart, hSyncEnd, hTotal, hSkew: CARD16 + vSyncStart, vSyncEnd, vTotal: CARD16 + modeFlags: SETofMODEFLAG } + +REFRESH { rates: LISTofCARD16 } + + ❧❧❧❧❧❧❧❧❧❧❧ + +6. Extension Initialization + +The name of this extension is "RANDR". + +┌─── + RRQueryVersion + client-major-version: CARD32 + client-minor-version: CARD32 + ▶ + major-version: CARD32 + minor-version: CARD32 +└─── + + The client sends the highest supported version to the server + and the server sends the highest version it supports, but no + higher than the requested version. Major versions changes can + introduce incompatibilities in existing functionality, minor + version changes introduce only backward compatible changes. + It is the clients responsibility to ensure that the server + supports a version which is compatible with its expectations. + + ❧❧❧❧❧❧❧❧❧❧❧ + +7. Extension Requests + +┌─── + RRSelectInput + window: WINDOW + enable: SETofRRSELECTMASK +└─── + Errors: Window, Value + + If 'enable' is RRScreenChangeNotifyMask, RRScreenChangeNotify events + will be sent when the screen configuration changes, either from + this protocol extension, or due to detected external screen + configuration changes. RRScreenChangeNotify may also be sent when + this request executes if the screen configuration has changed since + the client connected, to avoid race conditions. + + New for version 1.2: + + If 'enable' contains RRCrtcChangeMask, RRCrtcChangeNotify events + will be sent when a the configuration for a CRTC associated with the + screen changes, either through this protocol extension or due to + detected external changes. RRCrtcChangeNotify may also be sent when + this request executes if the CRTC configuration has changed since + the client connected, to avoid race conditions. + + If 'enable' contains RROutputChangeMask, RROutputChangeNotify events + will be sent when a the configuration for an output associated with + the screen changes, either through this protocol extension or due to + detected external changes. RROutputChangeNotify may also be sent + when this request executes if the output configuration has changed + since the client connected, to avoid race conditions. + + If 'enable' contains RROutputPropertyNotifyMask, + RROutputPropertyNotify events will be sent when properties change on + this output. + +┌─── + RRSetScreenConfig + window: WINDOW + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + size-id: SIZEID + rotation: ROTATION + rate: CARD16 + ▶ + status: RRCONFIGSTATUS + new-timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + root: WINDOW + subpixelOrder: SUBPIXELORDER +└─── + Errors: Value, Match + + If 'timestamp' is less than the time when the configuration was last + successfully set, the request is ignored and InvalidTime returned in + status. + + If 'config-timestamp' is not equal to when the server's screen + configurations last changed, the request is ignored and + InvalidConfigTime returned in status. This could occur if the + screen changed since you last made a RRGetScreenInfo request, + perhaps by a different piece of display hardware being installed. + Rather than allowing an incorrect call to be executed based on stale + data, the server will ignore the request. + + 'rate' contains the desired refresh rate. If it is zero, the server + selects an appropriate rate. + + This request may fail for other indeterminate reasons, in which case + 'status' will be set to Failed and no configuration change will be + made. + + This request sets the screen to the specified size, rate, rotation + and reflection. + + When this request succeeds, 'status' contains Success and the + requested changes to configuration will have been made. + + 'new-time-stamp' contains the time at which this request was + executed. + + 'config-timestamp' contains the time when the possible screen + configurations were last changed. + + 'root' contains the root window for the screen indicated by the + window. + + 'subpixelOrder' contains the resulting subpixel order of the screen + to allow correct subpixel rendering. + + Value errors are generated when 'rotation', 'rate' or 'size-id' + are invalid. + +┌─── + RRGetScreenInfo + window: WINDOW + ▶ + rotations: SETofROTATION + root: WINDOW + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + size-id: SIZEID + rotation: ROTATION + rate: CARD16 + sizes: LISTofSCREENSIZE + refresh: LISTofREFRESH +└─── + + Errors: Window + + RRGetScreenInfo returns information about the current and available + configurations for the screen associated with 'window'. + + 'rotations' contains the set of rotations and reflections supported + by the screen. + + 'root' is the root window of the screen. + + 'config-timestamp' indicates when the screen configuration + information last changed: requests to set the screen will fail + unless the timestamp indicates that the information the client + is using is up to date, to ensure clients can be well behaved + in the face of race conditions. + + 'timestamp' indicates when the configuration was last set. + + 'size-id' indicates which size is active. + + 'rate' is the current refresh rate. This is zero when the refresh + rate is unknown or on devices for which refresh is not relevant. + + 'sizes' is the list of possible frame buffer sizes (at the normal + orientation. Each size indicates both the linear physical size of + the screen and the pixel size. + + 'refresh' is the list of refresh rates for each size. Each element + of 'sizes' has a corresponding element in 'refresh'. An empty list + indicates no known rates, or a device for which refresh is not + relevant. + + The default size of the screen (the size that would become the + current size when the server resets) is the first size in the + list. + +7.1. Extension Requests added in version 1.2 of the extension + +As introduced above, version 1.2 of the extension splits the screen size +from the crtc and output configuration, permitting the subset of the screen +presented by multiple outputs to be configured. As a separate notion, the +size of the screen itself may be arbitrarily configured within a defined +range. As crtcs and outputs are added and removed from the system, the set +returned by the extension will change so that applications can detect +dynamic changes in the display environment. + +┌─── + RRGetScreenSizeRange + window: WINDOW + ▶ + CARD16 minWidth, minHeight + CARD16 maxWidth, maxHeight +└─── + Errors: Window + + Returns the range of possible screen sizes. The screen may be set to + any size within this range. + +┌─── + RRSetScreenSize + window: WINDOW + width: CARD16 + height: CARD16 + width-in-millimeters: CARD32 + height-in-millimeters: CARD32 +└─── + Errors: Window, Match, Value + + Sets the screen to the specified size. 'width' and 'height' must be + within the range allowed by GetScreenSizeRanges, otherwise a Value + error results. All active monitors must be configured to display a + subset of the specified size, else a Match error results. + + 'width-in-millimeters' and 'height-in-millimeters' can be set to + reflect the physical size of the screen reported both through this + extension and the core protocol. They must be non-zero, or Value + error results. + +┌─── + RRGetScreenResources + window: WINDOW + ▶ + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + crtcs: LISTofCRTC + outputs: LISTofOUTPUT + modes: LISTofMODEINFO +└─── + Errors: Window + + RRGetScreenResources returns the list of outputs and crtcs connected + to the screen associated with 'window'. + + 'timestamp' indicates when the configuration was last set. + + 'config-timestamp' indicates when the configuration information last + changed. Requests to configure the output will fail unless the + timestamp indicates that the information the client is using is up + to date, to ensure clients can be well behaved in the face of race + conditions. + + 'crtcs' contains the list of CRTCs associated with the screen. + + 'outputs' contains the list of outputs associated with the screen. + + 'modes' contains the list of modes associated with the screen + + This request explicitly asks the server to ensure that the + configuration data is up-to-date wrt the hardware. If that requires + polling, this is when such polling would take place. Requests for + further information should not poll, but rather return the data + collected at this point. + +┌─── + RRGetOutputInfo + output: OUTPUT + config-timestamp: TIMESTAMP + ▶ + status: RRCONFIGSTATUS + timestamp: TIMESTAMP + crtc: CRTC + + name: STRING + connection: CONNECTION + subpixel-order: SUBPIXELORDER + widthInMillimeters, heightInMillimeters: CARD32 + crtcs: LISTofCRTC + clones: LISTofOUTPUT + modes: LISTofMODE + num-preferred: CARD16 +└─── + Errors: Output + + RRGetOutputInfo returns information about the current and available + configurations 'output'. + + If 'config-timestamp' does not match the current configuration + timestamp (as returned by RRGetScreenResources), 'status' is set to + InvalidConfigTime and the remaining reply data is empty. Otherwise, + 'status' is set to Success. + + 'timestamp' indicates when the configuration was last set. + + 'crtc' is the current source CRTC for video data, or Disabled if the + output is not connected to any CRTC. + + 'name' is a UTF-8 encoded string designed to be presented to the + user to indicate which output this is. E.g. "S-Video" or "DVI". + + 'connection' indicates whether the hardware was able to detect a + device connected to this output. If the hardware cannot determine + whether something is connected, it will set this to + UnknownConnection. + + 'subpixel-order' contains the resulting subpixel order of the + connected device to allow correct subpixel rendering. + + 'widthInMillimeters' and 'heightInMillimeters' report the physical + size of the displayed area. If unknown, or not really fixed (e.g., + for a projector), these values are both zero. + + 'crtcs' is the list of CRTCs that this output may be connected to. + Attempting to connect this output to a different CRTC results in a + Match error. + + 'clones' is the list of outputs which may be simultaneously + connected to the same CRTC along with this output. Attempting to + connect this output with an output not in the 'clones' list + results in a Match error. + + 'modes' is the list of modes supported by this output. Attempting to + connect this output to a CRTC not using one of these modes results + in a Match error. + + The first 'num-preferred' modes in 'modes' are preferred by the + monitor in some way; for fixed-pixel devices, this would generally + indicate which modes match the resolution of the output device. + +┌─── + RRListOutputProperties + output:OUTPUT + ▶ + atoms: LISTof ATOM +└─── + Errors: Output + + This request returns the atoms of properties currently defined on + the output. + +┌─── + RRQueryOutputProperty + output: OUTPUT + property: ATOM + ▶ + pending: BOOL + range: BOOL + immutable: BOOL + valid-values: LISTofINT32 +└─── + Errors: Name, Atom, Output + + If the specified property does not exist for the specified output, + then a Name error is returned. + + If 'pending' is TRUE, changes made to property values with + RRChangeOutputProperty will be saved in the pending property value + and be automatically copied to the current value on the next + RRSetCrtcConfig request involving the named output. If 'pending' is + FALSE, changes are copied immediately. + + If 'range' is TRUE, then the valid-values list will contain + precisely two values indicating the minimum and maximum allowed + values. If 'range' is FALSE, then the valid-values list will contain + the list of possible values; attempts to set other values will + result in a Value error. + + If 'immutable' is TRUE, then the property configuration cannot be + changed by clients. Immutable properties are interpreted by the X + server. + +┌─── + RRConfigureOutputProperty + output: OUTPUT + property: ATOM + pending: BOOL + range: BOOL + valid-values: LISTofINT32 +└─── + Errors: Access, Name, Atom, Output + + If the specified property is 'immutable', an Access error is + returned. + + Otherwise, the configuration of the specified property is changed to + the values provided in this request. + + If the specified property does not exist for the specified output, + it is created with an empty value and None type. + +┌─── + RRChangeOutputProperty + output: OUTPUT + property, type: ATOM + format: {8, 16, 32} + mode: { Replace, Prepend, Append } + data: LISTofINT8 or LISTofINT16 or LISTofINT32 +└─── + Errors: Alloc, Atom, Match, Value, Output + + This request alters the value of the property for the specified + output. If the property is marked as a 'pending' property, only the + pending value of the property is changed. Otherwise, changes are + reflected in both the pending and current values of the property. + The type is uninterpreted by the server. The format specifies + whether the data should be viewed as a list of 8-bit, 16-bit, or + 32-bit quantities so that the server can correctly byte-swap as + necessary. + + If the mode is Replace, the previous property value is discarded. + If the mode is Prepend or Append, then the type and format must + match the existing property value (or a Match error results). If + the property is undefined, it is treated as defined with the correct + type and format with zero-length data. + + For Prepend, the data is tacked on to the beginning of the existing + data, and for Append, it is tacked on to the end of the existing data. + + This request generates a OutputPropertyNotify + + The lifetime of a property is not tied to the storing client. + Properties remain until explicitly deleted, until the output is + destroyed, or until server reset (see section 10). + + The maximum size of a property is server-dependent and may vary + dynamically. + +┌─── + RRDeleteOutputProperty + output: OUTPUT + property: ATOM +└─── + Errors: Atom, Output + + This request deletes the property from the specified window if the + property exists and generates a OutputPropertyNotify event unless + the property does not exist. + +┌─── + RRGetOutputProperty + output: OUTPUT + property: ATOM + type: ATOM or AnyPropertyType + long-offset, long-length: CARD32 + delete: BOOL + pending: BOOL + ▶ + type: ATOM or None + format: {0, 8, 16, 32} + bytes-after: CARD32 + value: LISTofINT8 or LISTofINT16 or LISTofINT32 +└─── + Errors: Atom, Value, Output + + If the specified property does not exist for the specified output, + then the return type is None, the format and bytes-after are zero, + and the value is empty. The delete argument is ignored in this + case. + + If the specified property exists but its type does not match the + specified type, then the return type is the actual type of the + property, the format is the actual format of the property (never + zero), the bytes-after is the length of the property in bytes (even + if the format is 16 or 32), and the value is empty. The delete + argument is ignored in this case. + + If the specified property exists and either AnyPropertyType is + specified or the specified type matches the actual type of the + property, then the return type is the actual type of the property, + the format is the actual format of the property (never zero), and + the bytes-after and value are as follows, given: + + N = actual length of the stored property in bytes + (even if the format is 16 or 32) + I = 4 × offset + T = N - I + L = MINIMUM(T, 4 × long-length) + A = N - (I + L) + + If 'pending' is true, and if the property holds a pending value, + then the value returned will be the pending value of the property + rather than the current value. The returned value starts at byte + index I in the property (indexing from 0), and its length in bytes + is L. However, it is a Value error if long-offset is given such + that L is negative. The value of bytes-after is A, giving the + number of trailing unread bytes in the stored property. If delete + is True and the bytes-after is zero, the property is also deleted + from the output, and a RROutputPropertyNotify event is generated. + +┌─── + RRCreateMode + window: WINDOW + modeinfo: MODEINFO + ▶ + mode: MODE +└─── + Errors: Window, Name, Value + + 'modeinfo' provides a new mode for outputs on the screen + associated with 'window'. If the name of 'modeinfo' names an + existing mode, a Name error is returned. If some parameter of the + mode is not valid in some other way, a Value error is returned. + + The returned 'mode' provides the id for the mode. + +┌─── + RRDestroyMode + mode: MODE +└─── + Errors: Mode, Access + + The user-defined 'mode' is destroyed. 'mode' must name a mode + defined with RRCreateMode, else an Match error is returned. If + 'mode' is in use by some CRTC or Output, then an Access error is + returned. + +┌─── + RRAddOutputMode + output: OUTPUT + mode: MODE +└─── + Errors: Output, Mode, Match + + 'output' indicates which output is to be configured. + + 'mode' specifies which mode to add. If 'mode' is not valid for + 'output', then a Match error is generated. + + This request generates OutputChangeNotify events. + +┌─── + RRDeleteOutputMode + output: OUTPUT + mode: MODE +└─── + Errors: Output, Mode + + 'output' indicates which output is to be configured. + + 'mode' specifies which mode to delete. 'mode' must have been added + with RRAddOutputMode, else an Access error is returned. 'mode' must + not be active, else a Match error is returned. + + This request generates OutputChangeNotify events. + +┌─── + RRGetCrtcInfo + crtc: CRTC + config-timestamp: TIMESTAMP + ▶ + status: RRCONFIGSTATUS + timestamp: TIMESTAMP + x, y: INT16 + width, height: CARD16 + mode: MODE + rotation: ROTATION + outputs: LISTofOUTPUT + + rotations: SETofROTATION + possible-outputs: LISTofOUTPUT +└─── + + Errors: Window + + RRGetCrtcModes returns information about the current and available + configurations for the specified crtc connected to the screen + associated with 'window'. + + If 'config-timestamp' does not match the current configuration + timestamp (as returned by RRGetScreenResources), 'status' is set to + InvalidConfigTime and the remaining reply data is empty. Otherwise, + 'status' is set to Success. + + 'timestamp' indicates when the configuration was last set. + + 'x' and 'y' indicate the position of this CRTC within the screen + region. They will be set to 0 when the CRTC is disabled. + + 'width' and 'height' indicate the size of the area presented by this + CRTC. + + 'mode' indicates which mode is active, or None indicating that the + CRTC has been disabled and is not displaying the screen contents. + + 'rotation' indicates the active rotation. It is set to Rotate_0 + when the CRTC is disabled. + + 'outputs' is the list of outputs currently connected to this CRTC + and is empty when the CRTC is disabled. + + 'rotations' contains the set of rotations and reflections supported + by the CRTC. + + 'possible-outputs' lists all of the outputs which may be connected + to this CRTC. + +┌─── + RRSetCrtcConfig + crtc: CRTC + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + x, y: INT16 + mode: MODE + rotation: ROTATION + outputs: LISTofOUTPUT + ▶ + status: RRCONFIGSTATUS + new-timestamp: TIMESTAMP +└─── + Errors: Value, Match + + If 'timestamp' is less than the time when the configuration was last + successfully set, the request is ignored and InvalidTime returned in + status. + + If 'config-timestamp' is not equal to when the monitor's + configuration last changed, the request is ignored and + InvalidConfigTime returned in status. This could occur if the + monitor changed since you last made a RRGetScreenInfo request, + perhaps by a different monitor being connected to the machine. + Rather than allowing an incorrect call to be executed based on stale + data, the server will ignore the request. + + 'x' and 'y' contain the desired location within the screen for this + monitor's content. 'x' and 'y' must be within the screen size, else + a Value error results. + + 'mode' is either the desired mode or None indicating the CRTC should + be disabled. If 'mode' is not one of these values, a Value + error results. 'mode' must be valid for all of the configured outputs, + else a Match error. + + 'rotation' contains the desired rotation along with which + reflections should be enabled. The rotation and reflection values + must be among those allowed for this monitor, else a Value error + results. + + 'outputs' contains the set of outputs that this CRTC should be + connected to. The set must be among the list of acceptable output + sets for this CRTC or a Match error results. + + If 'mode' is None, then 'outputs' must be empty, else a Match error + results. Conversely, if 'mode' is not None, then 'outputs' must not be + empty, else a Match error results. + + This request may fail for other indeterminate reasons, in which case + 'status' will be set to Failed and no configuration change will be + made. + + This request sets the CRTC to the specified position, mode, rotation + and reflection. The entire area of the CRTC must fit within the + screen size, else a Match error results. As an example, rotating the + screen so that a single CRTC fills the entire screen before and + after may necessitate disabling the CRTC, resizing the screen, + then re-enabling the CRTC at the new configuration to avoid an + invalid intermediate configuration. + + When this request succeeds, 'status' contains Success and the + requested changes to configuration will have been made. + + 'new-time-stamp' contains the time at which this request was + executed. + +┌─── + RRGetCrtcGammaSize + crtc: CRTC + ▶ + size: CARD16 +└─── + Errors: Crtc + + This request returns the size of the gamma ramps used by 'crtc'. + +┌─── + RRGetCrtcGamma + crtc: CRTC + ▶ + red: LISTofCARD16 + green: LISTofCARD16 + blue: LISTofCARD16 +└─── + Errors: Crtc + + This request returns the currently set gamma ramps for 'crtc'. All + three lists will be the size returned by the RRGetCrtcGammaSize + request. + +┌─── + RRSetCrtcGamma + crtc: CRTC + red: LISTofCARD16 + green: LISTofCARD16 + blue: LISTofCARD16 +└─── + Errors: Crtc, Match + + This request sets the gamma ramps for 'crtc'. All three lists + must be the size returned by RRGetCrtcGammaSize else a Value error + results. + + ❧❧❧❧❧❧❧❧❧❧❧ + +8. Extension Events + +Clients MAY select for ConfigureNotify on the root window to be +informed of screen changes. This may be advantageous if all your +client needs to know is the size of the root window, as it avoids +round trips to set up the extension. + +RRScreenChangeNotify is sent if RRSelectInput has requested it +whenever properties of the screen change, which may be due to external +factors, such as re-cabling a monitor, etc. + +┌─── + RRScreenChangeNotify + + rotation: ROTATION; new rotation + sequenceNumber: CARD16 low 16 bits of request seq. number + timestamp: TIMESTAMP time screen was changed + configTimestamp: TIMESTAMP time config data was changed + root: WINDOW root window of screen + window: WINDOW window requesting notification + size-id: SIZEID index of new size + subpixelOrder: SUBPIXELORDER order of subpixels + widthInPixels: CARD16 + heightInPixels: CARD16 + widthInMillimeters: CARD16 + heightInMillimeters: CARD16 +└─── + This event is generated whenever the screen configuration is changed + and sent to requesting clients. 'timestamp' indicates when the + screen configuration was changed. 'configTimestamp' says when the + last time the configuration was changed. 'root' is the root of the + screen the change occurred on, 'window' is window selecting for this + event. 'size-id' contains the index of the current size. + + This event is sent whenever the screen's configuration changes + or if a new screen configuration becomes available that was + not available in the past. In this case (config-timestamp in + the event not being equal to the config-timestamp returned in + the last call to RRGetScreenInfo), the client MUST call + RRGetScreenInfo to update its view of possible screen + configurations to have a correct view of possible screen + organizations. + + Clients which select screen change notification events may be + sent an event immediately if the screen configuration was + changed between when they connected to the X server and + selected for notification. This is to prevent a common race + that might occur on log-in, where many applications start up + just at the time when a display manager or log in script might + be changing the screen size or configuration. + +8.1 Events added in version 1.2 of the RandR extension + +┌─── + RROutputChangeNotify: + timestamp: TIMESTAMP time screen was reconfigured + config-timestamp: TIMESTAMP time available config data was changed + window: WINDOW window requesting notification + output: OUTPUT output affected by change + crtc: CRTC connected CRTC or None + mode: MODE mode in use on CRTC or None + connection: CONNECTION connection status +└─── + + This event is generated whenever the available output configurations + have changed and is sent to requesting clients. 'timestamp' + indicates when the crtc configuration was changed by a client. + 'config-timestamp' says when the last time the available + configurations changed. 'root' is the root of the screen the change + occurred on, 'window' is window selecting for this event. The + precise change can be detected by examining the new state of the + system. + +┌─── + RROutputPropertyNotify: + window: WINDOW window requesting notification + output: OUTPUT output affected by change + atom: ATOM affected property + time: TIMESTAMP time property was changed + subpixel-order: SUBPIXELORDER order of subpixels + state: { NewValue, Deleted } new property state +└─── + + This event is reported to clients selecting RROutputPropertyChange + on the window and is generated with state NewValue when a property + of the window is changed using RRChangeOutputProperty even when + adding zero-length data and when replacing all or part of a property + with identical data. It is generated with state Deleted when a + property of the window is deleted using either + RRDeleteOutputProperty or RRGetOutputProperty. The timestamp + indicates the server time when the property was changed. + +┌─── + RRCrtcChangeNotify + timestamp: TIMESTAMP time monitor was changed + config-timestamp: TIMESTAMP time config data was changed + root: WINDOW root window of screen + window: WINDOW window requesting notification + crtc: CRTC CRTC which changed + mode: MODE new mode + rotation: ROTATION; new rotation + x: INT16 x position of CRTC within screen + y: INT16 y position of CRTC within screen +└─── + This event is generated whenever the CRTC configuration is changed + and sent to requesting clients. 'timestamp' indicates when the + CRTC configuration was changed. 'config-timestamp' says when the + last time the configuration was changed. 'root' is the root of the + screen the change occurred on, 'window' is window selecting for this + event. + + This event is sent whenever the monitor's configuration changes + or if a new monitor configuration becomes available that was + not available in the past. In this case (config-timestamp in + the event not being equal to the config-timestamp returned in + the last call to RRGetCrtcModes), the client MUST call + RRGetCrtcModes to update its view of possible monitor + configurations to have a correct view of possible monitor + organizations. + + Clients which select monitor change notification events may be + sent an event immediately if the monitor configuration was + changed between when they connected to the X server and + selected for notification. This is to prevent a common race + that might occur on log-in, where many applications start up + just at the time when a display manager or log in script might + be changing the monitor size or configuration. + + ❧❧❧❧❧❧❧❧❧❧❧ + +9. Extension Versioning + +The RandR extension was developed in parallel with the implementation +to ensure the feasibility of various portions of the design. As +portions of the extension are implemented, the version number of the +extension has changed to reflect the portions of the standard provided. +This document describes the version 1.2 of the specification, the +partial implementations have version numbers less than that. Here's a +list of what each version provided: + + 0.0: This prototype implemented resize and rotation in the + TinyX server Used approximately the protocol described in + the Usenix paper. Appeared in the TinyX server in + XFree86 4.2, but not in the XFree86 main server. + + 0.1: Added subpixel order, added an event for subpixel order. + This version was never checked in to XFree86 CVS. + + 1.0: Implements resize, rotation, and reflection. Implemented + both in the XFree86 main server (size change only at this + date), and fully (size change, rotation, and reflection) + in XFree86's TinyX server. + + 1.1: Added refresh rates + + 1.2: Separate screens from CRTCs and outputs, switch to full VESA + modes + +Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients +will fail against 1.0 servers. The wire encoding op-codes were +changed for GetScreenInfo to ensure this failure in a relatively +graceful way. Version 1.1 servers and clients are cross compatible with +1.0. Version 1.1 is considered to be stable and we intend upward +compatibility from this point. Version 1.2 offers an extended model of the +system with multiple output support. It offers backward compatibility with +version 1.1. + + ❧❧❧❧❧❧❧❧❧❧❧ + +10. Relationship with other extensions + +Two other extensions have a direct relationship with this extension. This +section attempts to explain how these three are supposed to work together. + +10.1 XFree86-VidModeExtension + +XFree86-VidModeExtension changes the configuration of a single monitor +attached to the screen without changing the configuration of the screen +itself. It provides the ability to specify new mode lines for the server to +use along with selecting among existing mode lines. As it uses screen +numbers instead of window identifiers, it can be used to affect multiple +monitors in a single-screen Xinerama configuration. However, the association +between screen numbers and root windows in a multi-Screen environment is not +defined by the extension. Version 2.0 of this extension added the ability to +adjust the DAC values in a TrueColor server to modify the brightness curves +of the display. + +All of the utility of this extension is subsumed by RandR version 1.2, RandR +should be used in preference to XFree86-VidModeExtension where both are +present. + +10.2 Xinerama + +Xinerama provides a mechanism for describing the relationship between the +overall screen display and monitors placed within that area. As such, it +provides the query functionality of RandR 1.2 without any of the +configuration functionality. Applications using Xinerama to discover +monitor geometry can continue to do so, with the caveat that they will not be +informed of changes when they occur. However, Xinerama configuration data +will be updated, so applications selecting for RandR notification and +re-querying the configuration with the Xinerama extension will get updated +information. It is probably better to view RandR as a superset of Xinerama +at this point and use it in preference to Xinerama where both are present. + + ❧❧❧❧❧❧❧❧❧❧❧ + +Appendix A. Protocol Encoding + +Syntactic Conventions + +This document uses the same syntactic conventions as the core X +protocol encoding document. + +A.1 Common Types + +┌─── + ROTATION + 0x0001 Rotate_0 + 0x0002 Rotate_90 + 0x0004 Rotate_180 + 0x0008 Rotate_270 + 0x0010 Reflect_X + 0x0020 Reflect_Y +└─── + Used to encode both sets of possible rotations and individual + selected rotations. + +┌─── + RRSELECTMASK + 0x0001 ScreenChangeNotifyMask + 0x0002 CrtcChangeNotifyMask Added in version 1.2 + 0x0004 OutputChangeNotifyMask Added in version 1.2 + 0x0008 OutputPropertyNotifyMask Added in version 1.2 +└─── + Event select mask for RRSelectInput + +┌─── + RRCONFIGSTATUS + 0x0 Success + 0x1 InvalidConfigTime + 0x2 InvalidTime + 0x3 Failed +└─── + Return status for requests which depend on time. + +┌─── + MODEINFO (32) Added in version 1.2 + 4 CARD32 id + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 4 CARD32 dot clock + 2 CARD16 h sync start + 2 CARD16 h sync end + 2 CARD16 h total + 2 CARD16 h skew + 2 CARD16 v sync start + 2 CARD16 v sync end + 2 CARD16 v total + 2 CARD16 name length + 4 SETofMODEFLAG mode flags +└─── + + An output mode specifies the complete CRTC timings for + a specific mode. The vertical and horizontal synchronization rates + can be computed given the dot clock and the h total/v total + values. If the dot clock is zero, then all of the timing + parameters and flags are not used, and must be zero as this + indicates that the timings are unknown or otherwise unused. + The name itself will be encoded separately in each usage. + +┌─── + MODEFLAG + 0x00000001 HSyncPositive + 0x00000002 HSyncNegative + 0x00000004 VSyncPositive + 0x00000008 VSyncNegative + 0x00000010 Interlace + 0x00000020 DoubleScan + 0x00000040 CSync + 0x00000080 CSyncPositive + 0x00000100 CSyncNegative + 0x00000200 HSkewPresent + 0x00000400 BCast + 0x00000800 PixelMultiplex + 0x00001000 DoubleClock + 0x00002000 ClockDivideBy2 +└─── +┌─── + CONNECTION + 0 Connected + 1 Disconnected + 2 UnknownConnection +└─── + + +A.2 Protocol Requests + +Opcodes 1 and 3 were used in the 0.0 protocols, and will return +errors if used in version 1.0. + +┌─── + RRQueryVersion + + 1 CARD8 major opcode + 1 0 RandR opcode + 2 3 length + 4 CARD32 major version + 4 CARD32 minor version + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 1 CARD32 major version + 1 CARD32 minor version +└─── +┌─── + RRSetScreenConfig + + 1 CARD8 major opcode + 1 2 RandR opcode + 2 6 length + 4 WINDOW window on screen to be configured + 4 TIMESTAMP timestamp + 4 TIMESTAMP config timestamp + 2 SIZEID size index + 2 ROTATION rotation/reflection + 2 CARD16 refresh rate (1.1 only) + 2 CARD16 pad + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 0 reply length + 4 TIMESTAMP new timestamp + 4 TIMESTAMP new configuration timestamp + 4 WINDOW root + 2 SUBPIXELORDER subpixel order defined in Render + 2 CARD16 pad4 + 4 CARD32 pad5 + 4 CARD32 pad6 +└─── +┌─── + RRSelectInput + + 1 CARD8 major opcode + 1 4 RandR opcode + 2 3 length + 4 WINDOW window + 2 SETofRRSELECTMASK enable + 2 CARD16 pad +└─── +┌─── + RRGetScreenInfo + + 1 CARD8 major opcode + 1 5 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 CARD8 set of Rotations + 2 CARD16 sequence number + 4 0 reply length + 4 WINDOW root window + 4 TIMESTAMP timestamp + 4 TIMESTAMP config timestamp + 2 CARD16 number of SCREENSIZE following + 2 SIZEID current size index + 2 ROTATION current rotation and reflection + 2 CARD16 current rate (added in version 1.1) + 2 CARD16 length of rate info (number of CARD16s) + 2 CARD16 pad + + SCREENSIZE + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 2 CARD16 width in millimeters + 2 CARD16 height in millimeters + + REFRESH + 2 CARD16 number of rates (n) + 2n CARD16 rates +└─── + +A.2.1 Protocol Requests added with version 1.2 + +┌─── + RRGetScreenSizeRange + 1 CARD8 major opcode + 1 6 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 2 CARD16 minWidth + 2 CARD16 minHeight + 2 CARD16 maxWidth + 2 CARD16 maxHeight + 16 unused +└─── +┌─── + RRSetScreenSize + 1 CARD8 major opcode + 1 7 RandR opcode + 2 5 length + 4 WINDOW window + 2 CARD16 width + 2 CARD16 height + 4 CARD32 width in millimeters + 4 CARD32 height in millimeters +└─── +┌─── + RRGetScreenResources + 1 CARD8 major opcode + 1 8 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 c+o+8m+(b+p)/4 reply length + 4 TIMESTAMP timestamp + 4 TIMESTAMP config-timestamp + 2 c number of CRTCs + 2 o number of outputs + 2 m number of modeinfos + 2 b total bytes in mode names + 8 unused + 4c LISTofCRTC crtcs + 4o LISTofOUTPUT outputs + 32m LISTofMODEINFO modeinfos + b STRING8 mode names + p unused, p=pad(b) +└─── +┌─── + RRGetOutputInfo + 1 CARD8 major opcode + 1 9 RandR opcode + 2 3 length + 4 OUTPUT output + 4 TIMESTAMP config-timestamp + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 1+c+m+(n+p)/4 reply length + 4 TIMESTAMP timestamp + 4 CRTC current connected crtc + 4 CARD32 width in millimeters + 4 CARD32 height in millimeters + 1 CONNECTION connection + 1 SUBPIXELORDER subpixel-order + 2 c number of CRTCs + 2 m number of modes + 2 p number of preferred modes + 2 o number of clones + 2 n length of name + 4c LISTofCRTC crtcs + 4m LISTofMODE modes + n STRING8 name + p unused, p=pad(n) +└─── +┌─── + RRListOutputProperties + 1 CARD8 major opcode + 1 10 RandR opcode + 2 2 length + 4 OUTPUT output + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 n reply length + 2 n number of ATOMs in atoms + 22 unused + 4n LISTofATOM atoms +└─── +┌─── + RRQueryOutputProperty + 1 CARD8 major opcode + 1 11 RandR opcode + 2 3 request length + 4 OUTPUT output + 4 ATOM property + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 n reply length + 1 BOOL pending + 1 BOOL range + 1 BOOL immutable + 21 unused + 4n LISTofINT32 valid values +└─── +┌─── + RRConfigureOutputProperty + 1 CARD8 major opcode + 1 12 RandR opcode + 2 4+n request length + 4 OUTPUT output + 4 ATOM property + 1 BOOL pending + 1 BOOL range + 2 unused + 4n LISTofINT32 valid values +└─── +┌─── + RRChangeOutputProperty + 1 CARD8 major opcode + 1 13 RandR opcode + 2 6+(n+p)/4 request length + 4 OUTPUT output + 4 ATOM property + 4 ATOM type + 1 CARD8 format + 1 mode + 0 Replace + 1 Prepend + 2 Append + 2 unused + 4 CARD32 length of data in format units + (= n for format = 8) + (= n/2 for format = 16) + (= n/4 for format = 32) + n LISTofBYTE data + (n is a multiple of 2 for format = 16) + (n is a multiple of 4 for format = 32) + p unused, p=pad(n) +└─── +┌─── + RRDeleteOutputProperty + 1 CARD8 major opcode + 1 14 RandR opcode + 2 3 request length + 4 OUTPUT output + 4 ATOM property +└─── +┌─── + RRGetOutputProperty + 1 CARD8 major opcode + 1 15 RandR opcode + 2 7 request length + 4 OUTPUT output + 4 ATOM property + 4 ATOM type + 0 AnyPropertyType + 4 CARD32 long-offset + 4 CARD32 long-length + 1 BOOL delete + 1 BOOL pending + 2 unused + ▶ + 1 1 Reply + 1 CARD8 format + 2 CARD16 sequence number + 4 (n+p)/4 reply length + 4 ATOM type + 0 None + 4 CARD32 bytes-after + 4 CARD32 length of value in format units + (= 0 for format = 0) + (= n for format = 8) + (= n/2 for format = 16) + (= n/4 for format = 32) + 12 unused + n LISTofBYTE value + (n is zero for format = 0) + (n is a multiple of 2 for format = 16) + (n is a multiple of 4 for format = 32) + p unused, p=pad(n) +└─── +┌─── + RRCreateMode + 1 CARD8 major opcode + 1 16 RandR opcode + 2 12+(n+p)/4 length + 4 WINDOW window + 32 MODEINFO mode + n STRING8 mode name + p unused, p=pad(n) + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 MODE mode + 20 unused +└─── +┌─── + RRDestroyMode + 1 CARD8 major opcode + 1 17 RandR opcode + 2 2 length + 4 MODE mode +└─── +┌─── + RRAddOutputMode + 1 CARD8 major opcode + 1 18 RandR opcode + 2 3 length + 4 OUTPUT output + 4 MODE mode +└─── +┌─── + RRDeleteOutputMode + 1 CARD8 major opcode + 1 19 RandR opcode + 2 3 length + 4 OUTPUT output + 4 MODE mode +└─── +┌─── + RRGetCrtcInfo + 1 CARD8 major opcode + 1 20 RandR opcode + 2 3 length + 4 CRTC crtc + 4 TIMESTAMP config-timestamp + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 o+p reply length + 4 TIMESTATMP timestamp + 2 INT16 x + 2 INT16 y + 2 CARD16 width + 2 CARD16 height + 4 MODE mode + 2 ROTATION current rotation and reflection + 2 ROTATION set of possible rotations + 2 o number of outputs + 2 p number of possible outputs + 4o LISTofOUTPUT outputs + 4p LISTofOUTPUT possible outputs +└─── +┌─── + RRSetCrtcConfig + 1 CARD8 major opcode + 1 21 RandR opcode + 2 7+2n length + 4 CRTC crtc + 4 TIMESTAMP timestamp + 4 TIMESTAMP config timestamp + 2 INT16 x + 2 INT16 y + 4 MODE mode + 2 ROTATION rotation/reflection + 2 unused + 8n LISTofOUTPUT outputs + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 0 reply length + 4 TIMESTAMP new timestamp + 20 unused +└─── +┌─── + RRGetCrtcGammaSize + 1 CARD8 major opcode + 1 22 RandR opcode + 2 2 length + 4 CRTC crtc + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 2 CARD16 size + 22 unused +└─── +┌─── + RRGetCrtcGamma + 1 CARD8 major opcode + 1 23 RandR opcode + 2 2 length + 4 CRTC crtc + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 (6n+2)/4 reply length + 2 n size + 20 unused + 2n LISTofCARD16 red + 2n LISTofCARD16 green + 2n LISTofCARD16 blue + p unused, p=pad(6n) +└─── +┌─── + RRSetCrtcGamma + 1 CARD8 major opcode + 1 24 RandR opcode + 2 3+(6n+2)/4 length + 4 CRTC crtc + 2 n size + 2 unused + 2n LISTofCARD16 red + 2n LISTofCARD16 green + 2n LISTofCARD16 blue + p unused, p=pad(6n) +└─── + +A.3 Protocol Events + +┌─── + RRScreenChangeNotify + 1 Base + 0 code + 1 ROTATION new rotation and reflection + 2 CARD16 sequence number + 4 TIMESTAMP timestamp + 4 TIMESTAMP configuration timestamp + 4 WINDOW root window + 4 WINDOW request window + 2 SIZEID size ID + 2 SUBPIXELORDER subpixel order defined in Render + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 2 CARD16 width in millimeters + 2 CARD16 height in millimeters +└─── + +A.3.1 Protocol Events added with version 1.2 + +┌─── + RRCrtcChangeNotify + 1 Base + 1 code + 1 0 sub-code + 2 CARD16 sequence number + 4 TIMESTAMP timestamp + 4 WINDOW request window + 4 CRTC crtc affected + 4 MODE mode in use + 2 ROTATION new rotation and reflection + 2 unused + 2 INT16 x + 2 INT16 y + 2 CARD16 width + 2 CARD16 height +└─── +┌─── + RROutputChangeNotify + 1 Base + 1 code + 1 1 sub-code + 2 CARD16 sequence number + 4 TIMESTAMP timestamp + 4 TIMESTAMP configuration timestamp + 4 WINDOW request window + 4 OUTPUT output affected + 4 CRTC crtc in use + 4 MODE mode in use + 2 ROTATION rotation in use + 1 CONNECTION connection status + 1 SUBPIXELORDER subpixel order +└─── +┌─── + RROutputPropertyNotify + 1 Base + 1 code + 1 2 sub-code + 2 CARD16 sequence number + 4 WINDOW window + 4 OUTPUT output + 4 ATOM atom + 4 TIMESTAMP time + 1 state + 0 NewValue + 1 Deleted + 11 unused +└─── + +A.4 Protocol Errors + +┌─── + ERRORS + Base + 0 Output + Base + 1 Crtc + Base + 2 Mode +└─── + +Bibliography + +[RANDR] Gettys, Jim and Keith Packard, "The X Resize and Rotate + Extension - RandR", Proceedings of the 2001 USENIX Annual + Technical Conference, Boston, MA + +[RENDER] + Packard, Keith, "The X Rendering Extension", work in progress, + documents found in xc/specs/Render. diff --git a/X11/extensions/record.h b/X11/extensions/record.h new file mode 100644 index 000000000..d88be99dc --- /dev/null +++ b/X11/extensions/record.h @@ -0,0 +1,211 @@ +/* +$Xorg: record.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ +*/ + +/*************************************************************************** + * Copyright 1995 Network Computing Devices + * + * 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 Network Computing Devices + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * + * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. + **************************************************************************/ +/* $XFree86$ */ + +#ifndef _RECORD_H_ +#define _RECORD_H_ + +#define XRecordBadContext 0 /* Not a valid RC */ + +/* + * Constants for arguments of various requests + */ +#define XRecordFromServerTime 0x01 +#define XRecordFromClientTime 0x02 +#define XRecordFromClientSequence 0x04 + +#define XRecordCurrentClients 1 +#define XRecordFutureClients 2 +#define XRecordAllClients 3 + +#define XRecordFromServer 0 +#define XRecordFromClient 1 +#define XRecordClientStarted 2 +#define XRecordClientDied 3 +#define XRecordStartOfData 4 +#define XRecordEndOfData 5 + +typedef unsigned long XRecordClientSpec; + +#ifndef _XRECORD_SERVER_ + +typedef unsigned long XRecordContext; + +typedef struct +{ + unsigned char first; + unsigned char last; +} XRecordRange8; + +typedef struct +{ + unsigned short first; + unsigned short last; +} XRecordRange16; + +typedef struct +{ + XRecordRange8 ext_major; + XRecordRange16 ext_minor; +} XRecordExtRange; + +typedef struct +{ + XRecordRange8 core_requests; /* core X requests */ + XRecordRange8 core_replies; /* core X replies */ + XRecordExtRange ext_requests; /* extension requests */ + XRecordExtRange ext_replies; /* extension replies */ + XRecordRange8 delivered_events; /* delivered core and ext events */ + XRecordRange8 device_events; /* all core and ext device events */ + XRecordRange8 errors; /* core X and ext errors */ + Bool client_started; /* connection setup reply */ + Bool client_died; /* notice of client disconnect */ +} XRecordRange; + +typedef struct +{ + XRecordClientSpec client; + unsigned long nranges; + XRecordRange **ranges; +} XRecordClientInfo; + +typedef struct +{ + Bool enabled; + int datum_flags; + unsigned long nclients; + XRecordClientInfo **client_info; +} XRecordState; + +typedef struct +{ + XID id_base; + Time server_time; + unsigned long client_seq; + int category; + Bool client_swapped; + unsigned char *data; + unsigned long data_len; /* in 4-byte units */ +} XRecordInterceptData; + +_XFUNCPROTOBEGIN + +/********************************************************* + * + * Prototypes + * + */ + +XID XRecordIdBaseMask( + Display *dpy +); + +extern Status XRecordQueryVersion( + Display* /* dpy */, + int* /* cmajor_return */, + int* /* cminor_return */ +); + +extern XRecordContext XRecordCreateContext( + Display* /* dpy */, + int /* datum_flags */, + XRecordClientSpec* /* clients */, + int /* nclients */, + XRecordRange** /* ranges */, + int /* nranges */ +); + +extern XRecordRange *XRecordAllocRange( + void +); + +extern Status XRecordRegisterClients( + Display* /* dpy */, + XRecordContext /* context */, + int /* datum_flags */, + XRecordClientSpec* /* clients */, + int /* nclients */, + XRecordRange** /* ranges */, + int /* nranges */ +); + +extern Status XRecordUnregisterClients( + Display* /* dpy */, + XRecordContext /* context */, + XRecordClientSpec* /* clients */, + int /* nclients */ +); + +extern Status XRecordGetContext( + Display* /* dpy */, + XRecordContext /* context */, + XRecordState** /* state_return */ +); + +extern void XRecordFreeState( +XRecordState* /* state */ +); + +typedef void (*XRecordInterceptProc) ( + XPointer /* closure */, + XRecordInterceptData* /* recorded_data */ +); + +extern Status XRecordEnableContext( + Display* /* dpy */, + XRecordContext /* context */, + XRecordInterceptProc /* callback */, + XPointer /* closure */ +); + +extern Status XRecordEnableContextAsync( + Display* /* dpy */, + XRecordContext /* context */, + XRecordInterceptProc /* callback */, + XPointer /* closure */ +); + +extern void XRecordProcessReplies( + Display* /* dpy */ +); + +extern void XRecordFreeData( +XRecordInterceptData* /* data */ +); + +extern Status XRecordDisableContext( + Display* /* dpy */, + XRecordContext /* context */ +); + +extern Status XRecordFreeContext( + Display* /* dpy */, + XRecordContext /* context */ +); + +_XFUNCPROTOEND + +#endif /* _XRECORD_SERVER_ */ + +#endif /* _RECORD_H_ */ diff --git a/X11/extensions/recordproto.pc.in b/X11/extensions/recordproto.pc.in new file mode 100644 index 000000000..77cd38fa4 --- /dev/null +++ b/X11/extensions/recordproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: RecordProto +Description: Record extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/recordstr.h b/X11/extensions/recordstr.h new file mode 100644 index 000000000..246d34f1a --- /dev/null +++ b/X11/extensions/recordstr.h @@ -0,0 +1,322 @@ +/* +#ifndef lint +$Xorg: recordstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ +static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44"; +#endif +*/ + +/*************************************************************************** + * Copyright 1995 Network Computing Devices + * + * 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 Network Computing Devices + * not be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * + * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO + * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES 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. + **************************************************************************/ +/* $XFree86$ */ + +#ifndef _RECORDSTR_H_ +#define _RECORDSTR_H_ + +#include + +#define RECORD_NAME "RECORD" +#define RECORD_MAJOR_VERSION 1 +#define RECORD_MINOR_VERSION 13 +#define RECORD_LOWEST_MAJOR_VERSION 1 +#define RECORD_LOWEST_MINOR_VERSION 12 +/* only difference between 1.12 and 1.13 is byte order of device events, + which the library doesn't deal with. */ + +/********************************************************* + * + * Protocol request constants + * + */ +#define X_RecordQueryVersion 0 /* First request from client */ +#define X_RecordCreateContext 1 /* Create client RC */ +#define X_RecordRegisterClients 2 /* Add to client RC */ +#define X_RecordUnregisterClients 3 /* Delete from client RC */ +#define X_RecordGetContext 4 /* Query client RC */ +#define X_RecordEnableContext 5 /* Enable interception and reporting */ +#define X_RecordDisableContext 6 /* Disable interception and reporting */ +#define X_RecordFreeContext 7 /* Free client RC */ + +#define RecordNumErrors (XRecordBadContext + 1) +#define RecordNumEvents 0L + +#define sz_XRecordRange 32 +#define sz_XRecordClientInfo 12 +#define sz_XRecordState 16 +#define sz_XRecordDatum 32 + + +#define XRecordGlobaldef +#define XRecordGlobalref extern + +#define RecordMaxEvent (128L-1L) +#define RecordMinDeviceEvent (2L) +#define RecordMaxDeviceEvent (6L) +#define RecordMaxError (256L-1L) +#define RecordMaxCoreRequest (128L-1L) +#define RecordMaxExtRequest (256L-1L) +#define RecordMinExtRequest (129L-1L) + +#define RECORD_RC CARD32 +#define RECORD_XIDBASE CARD32 +#define RECORD_CLIENTSPEC CARD32 +#define RECORD_ELEMENT_HEADER CARD8 + +typedef RECORD_CLIENTSPEC RecordClientSpec, *RecordClientSpecPtr; + +typedef struct +{ + CARD8 first; + CARD8 last; +} RECORD_RANGE8; + +typedef struct +{ + CARD16 first B16; + CARD16 last B16; +} RECORD_RANGE16; + +typedef struct +{ + RECORD_RANGE8 majorCode; + RECORD_RANGE16 minorCode; +} RECORD_EXTRANGE; + +typedef struct +{ + RECORD_RANGE8 coreRequests; + RECORD_RANGE8 coreReplies; + RECORD_EXTRANGE extRequests; + RECORD_EXTRANGE extReplies; + RECORD_RANGE8 deliveredEvents; + RECORD_RANGE8 deviceEvents; + RECORD_RANGE8 errors; + BOOL clientStarted; + BOOL clientDied; +} RECORDRANGE; +#define sz_RECORDRANGE 24 + +/* typedef RECORDRANGE xRecordRange, *xRecordRangePtr; +#define sz_xRecordRange 24 */ + +/* Cannot have structures within structures going over the wire */ +typedef struct +{ + CARD8 coreRequestsFirst; + CARD8 coreRequestsLast; + CARD8 coreRepliesFirst; + CARD8 coreRepliesLast; + CARD8 extRequestsMajorFirst; + CARD8 extRequestsMajorLast; + CARD16 extRequestsMinorFirst B16; + CARD16 extRequestsMinorLast B16; + CARD8 extRepliesMajorFirst; + CARD8 extRepliesMajorLast; + CARD16 extRepliesMinorFirst B16; + CARD16 extRepliesMinorLast B16; + CARD8 deliveredEventsFirst; + CARD8 deliveredEventsLast; + CARD8 deviceEventsFirst; + CARD8 deviceEventsLast; + CARD8 errorsFirst; + CARD8 errorsLast; + BOOL clientStarted; + BOOL clientDied; +} xRecordRange; +#define sz_xRecordRange 24 + +typedef struct +{ + RECORD_CLIENTSPEC clientResource B32; + CARD32 nRanges B32; +/* LISTofRECORDRANGE */ +} RECORD_CLIENT_INFO; + +typedef RECORD_CLIENT_INFO xRecordClientInfo; + +/* + * Initialize + */ +typedef struct { + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + CARD16 majorVersion B16; + CARD16 minorVersion B16; +} xRecordQueryVersionReq; +#define sz_xRecordQueryVersionReq 8 + +typedef struct +{ + CARD8 type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; + CARD16 minorVersion B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + } xRecordQueryVersionReply; +#define sz_xRecordQueryVersionReply 32 + +/* + * Create RC + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; + RECORD_ELEMENT_HEADER elementHeader; + CARD8 pad; + CARD16 pad0 B16; + CARD32 nClients B32; + CARD32 nRanges B32; +/* LISTofRECORD_CLIENTSPEC */ +/* LISTofRECORDRANGE */ +} xRecordCreateContextReq; +#define sz_xRecordCreateContextReq 20 + +/* + * Add to RC + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; + RECORD_ELEMENT_HEADER elementHeader; + CARD8 pad; + CARD16 pad0 B16; + CARD32 nClients B32; + CARD32 nRanges B32; +/* LISTofRECORD_CLIENTSPEC */ +/* LISTofRECORDRANGE */ +} xRecordRegisterClientsReq; +#define sz_xRecordRegisterClientsReq 20 + +/* + * Delete from RC + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; + CARD32 nClients B32; +/* LISTofRECORD_CLIENTSPEC */ +} xRecordUnregisterClientsReq; +#define sz_xRecordUnregisterClientsReq 12 + +/* + * Query RC + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; +} xRecordGetContextReq; +#define sz_xRecordGetContextReq 8 + +typedef struct +{ + CARD8 type; + BOOL enabled; + CARD16 sequenceNumber B16; + CARD32 length B32; + RECORD_ELEMENT_HEADER elementHeader; + CARD8 pad; + CARD16 pad0 B16; + CARD32 nClients B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +/* LISTofCLIENT_INFO */ /* intercepted-clients */ +} xRecordGetContextReply; +#define sz_xRecordGetContextReply 32 + +/* + * Enable data interception + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; +} xRecordEnableContextReq; +#define sz_xRecordEnableContextReq 8 + +typedef struct +{ + CARD8 type; + CARD8 category; + CARD16 sequenceNumber B16; + CARD32 length B32; + RECORD_ELEMENT_HEADER elementHeader; + BOOL clientSwapped; + CARD16 pad1 B16; + RECORD_XIDBASE idBase B32; + CARD32 serverTime B32; + CARD32 recordedSequenceNumber B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + /* BYTE data; */ +} xRecordEnableContextReply; +#define sz_xRecordEnableContextReply 32 + +/* + * Disable data interception + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; +} xRecordDisableContextReq; +#define sz_xRecordDisableContextReq 8 + +/* + * Free RC + */ +typedef struct +{ + CARD8 reqType; + CARD8 recordReqType; + CARD16 length B16; + RECORD_RC context B32; +} xRecordFreeContextReq; +#define sz_xRecordFreeContextReq 8 + +#undef RECORD_RC +#undef RECORD_XIDBASE +#undef RECORD_ELEMENT_HEADER +#undef RECORD_CLIENTSPEC + +#endif diff --git a/X11/extensions/render.h b/X11/extensions/render.h new file mode 100644 index 000000000..497af6d10 --- /dev/null +++ b/X11/extensions/render.h @@ -0,0 +1,189 @@ +/* + * $XFree86: xc/include/extensions/render.h,v 1.10 2002/11/06 22:47:49 keithp Exp $ + * + * Copyright © 2000 SuSE, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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: Keith Packard, SuSE, Inc. + */ + +#ifndef _RENDER_H_ +#define _RENDER_H_ + +typedef XID Glyph; +typedef XID GlyphSet; +typedef XID Picture; +typedef XID PictFormat; + +#define RENDER_NAME "RENDER" +#define RENDER_MAJOR 0 +#define RENDER_MINOR 10 + +#define X_RenderQueryVersion 0 +#define X_RenderQueryPictFormats 1 +#define X_RenderQueryPictIndexValues 2 /* 0.7 */ +#define X_RenderQueryDithers 3 +#define X_RenderCreatePicture 4 +#define X_RenderChangePicture 5 +#define X_RenderSetPictureClipRectangles 6 +#define X_RenderFreePicture 7 +#define X_RenderComposite 8 +#define X_RenderScale 9 +#define X_RenderTrapezoids 10 +#define X_RenderTriangles 11 +#define X_RenderTriStrip 12 +#define X_RenderTriFan 13 +#define X_RenderColorTrapezoids 14 +#define X_RenderColorTriangles 15 +/* #define X_RenderTransform 16 */ +#define X_RenderCreateGlyphSet 17 +#define X_RenderReferenceGlyphSet 18 +#define X_RenderFreeGlyphSet 19 +#define X_RenderAddGlyphs 20 +#define X_RenderAddGlyphsFromPicture 21 +#define X_RenderFreeGlyphs 22 +#define X_RenderCompositeGlyphs8 23 +#define X_RenderCompositeGlyphs16 24 +#define X_RenderCompositeGlyphs32 25 +#define X_RenderFillRectangles 26 +/* 0.5 */ +#define X_RenderCreateCursor 27 +/* 0.6 */ +#define X_RenderSetPictureTransform 28 +#define X_RenderQueryFilters 29 +#define X_RenderSetPictureFilter 30 +/* 0.8 */ +#define X_RenderCreateAnimCursor 31 +/* 0.9 */ +#define X_RenderAddTraps 32 +/* 0.10 */ +#define X_RenderCreateSolidFill 33 +#define X_RenderCreateLinearGradient 34 +#define X_RenderCreateRadialGradient 35 +#define X_RenderCreateConicalGradient 36 +#define RenderNumberRequests (X_RenderCreateConicalGradient+1) + +#define BadPictFormat 0 +#define BadPicture 1 +#define BadPictOp 2 +#define BadGlyphSet 3 +#define BadGlyph 4 +#define RenderNumberErrors (BadGlyph+1) + +#define PictTypeIndexed 0 +#define PictTypeDirect 1 + +#define PictOpMinimum 0 +#define PictOpClear 0 +#define PictOpSrc 1 +#define PictOpDst 2 +#define PictOpOver 3 +#define PictOpOverReverse 4 +#define PictOpIn 5 +#define PictOpInReverse 6 +#define PictOpOut 7 +#define PictOpOutReverse 8 +#define PictOpAtop 9 +#define PictOpAtopReverse 10 +#define PictOpXor 11 +#define PictOpAdd 12 +#define PictOpSaturate 13 +#define PictOpMaximum 13 + +/* + * Operators only available in version 0.2 + */ +#define PictOpDisjointMinimum 0x10 +#define PictOpDisjointClear 0x10 +#define PictOpDisjointSrc 0x11 +#define PictOpDisjointDst 0x12 +#define PictOpDisjointOver 0x13 +#define PictOpDisjointOverReverse 0x14 +#define PictOpDisjointIn 0x15 +#define PictOpDisjointInReverse 0x16 +#define PictOpDisjointOut 0x17 +#define PictOpDisjointOutReverse 0x18 +#define PictOpDisjointAtop 0x19 +#define PictOpDisjointAtopReverse 0x1a +#define PictOpDisjointXor 0x1b +#define PictOpDisjointMaximum 0x1b + +#define PictOpConjointMinimum 0x20 +#define PictOpConjointClear 0x20 +#define PictOpConjointSrc 0x21 +#define PictOpConjointDst 0x22 +#define PictOpConjointOver 0x23 +#define PictOpConjointOverReverse 0x24 +#define PictOpConjointIn 0x25 +#define PictOpConjointInReverse 0x26 +#define PictOpConjointOut 0x27 +#define PictOpConjointOutReverse 0x28 +#define PictOpConjointAtop 0x29 +#define PictOpConjointAtopReverse 0x2a +#define PictOpConjointXor 0x2b +#define PictOpConjointMaximum 0x2b + +#define PolyEdgeSharp 0 +#define PolyEdgeSmooth 1 + +#define PolyModePrecise 0 +#define PolyModeImprecise 1 + +#define CPRepeat (1 << 0) +#define CPAlphaMap (1 << 1) +#define CPAlphaXOrigin (1 << 2) +#define CPAlphaYOrigin (1 << 3) +#define CPClipXOrigin (1 << 4) +#define CPClipYOrigin (1 << 5) +#define CPClipMask (1 << 6) +#define CPGraphicsExposure (1 << 7) +#define CPSubwindowMode (1 << 8) +#define CPPolyEdge (1 << 9) +#define CPPolyMode (1 << 10) +#define CPDither (1 << 11) +#define CPComponentAlpha (1 << 12) +#define CPLastBit 12 + +/* Filters included in 0.6 */ +#define FilterNearest "nearest" +#define FilterBilinear "bilinear" +/* Filters included in 0.10 */ +#define FilterConvolution "convolution" + +#define FilterFast "fast" +#define FilterGood "good" +#define FilterBest "best" + +#define FilterAliasNone -1 + +/* Subpixel orders included in 0.6 */ +#define SubPixelUnknown 0 +#define SubPixelHorizontalRGB 1 +#define SubPixelHorizontalBGR 2 +#define SubPixelVerticalRGB 3 +#define SubPixelVerticalBGR 4 +#define SubPixelNone 5 + +/* Extended repeat attributes included in 0.10 */ +#define RepeatNone 0 +#define RepeatNormal 1 +#define RepeatPad 2 +#define RepeatReflect 3 + +#endif /* _RENDER_H_ */ diff --git a/X11/extensions/renderproto.h b/X11/extensions/renderproto.h new file mode 100644 index 000000000..ffe06395d --- /dev/null +++ b/X11/extensions/renderproto.h @@ -0,0 +1,663 @@ +/* + * $XFree86: xc/include/extensions/renderproto.h,v 1.12 2002/09/26 02:56:48 keithp Exp $ + * + * Copyright © 2000 SuSE, 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 SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * 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: Keith Packard, SuSE, Inc. + */ + +#ifndef _XRENDERP_H_ +#define _XRENDERP_H_ + +#include +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +#define Picture CARD32 +#define PictFormat CARD32 +#define Fixed INT32 +#define Glyphset CARD32 + +/* + * data structures + */ + +typedef struct { + CARD16 red B16; + CARD16 redMask B16; + CARD16 green B16; + CARD16 greenMask B16; + CARD16 blue B16; + CARD16 blueMask B16; + CARD16 alpha B16; + CARD16 alphaMask B16; +} xDirectFormat; + +#define sz_xDirectFormat 16 + +typedef struct { + PictFormat id B32; + CARD8 type; + CARD8 depth; + CARD16 pad1 B16; + xDirectFormat direct; + Colormap colormap; +} xPictFormInfo; + +#define sz_xPictFormInfo 28 + +typedef struct { + VisualID visual; + PictFormat format; +} xPictVisual; + +#define sz_xPictVisual 8 + +typedef struct { + CARD8 depth; + CARD8 pad1; + CARD16 nPictVisuals B16; + CARD32 pad2 B32; +} xPictDepth; + +#define sz_xPictDepth 8 + +typedef struct { + CARD32 nDepth B32; + PictFormat fallback B32; +} xPictScreen; + +#define sz_xPictScreen 8 + +typedef struct { + CARD32 pixel B32; + CARD16 red B16; + CARD16 green B16; + CARD16 blue B16; + CARD16 alpha B16; +} xIndexValue; + +#define sz_xIndexValue 12 + +typedef struct { + CARD16 red B16; + CARD16 green B16; + CARD16 blue B16; + CARD16 alpha B16; +} xRenderColor; + +#define sz_xRenderColor 8 + +typedef struct { + Fixed x B32; + Fixed y B32; +} xPointFixed; + +#define sz_xPointFixed 8 + +typedef struct { + xPointFixed p1; + xPointFixed p2; +} xLineFixed; + +#define sz_xLineFixed 16 + +typedef struct { + xPointFixed p1, p2, p3; +} xTriangle; + +#define sz_xTriangle 24 + +typedef struct { + Fixed top B32; + Fixed bottom B32; + xLineFixed left; + xLineFixed right; +} xTrapezoid; + +#define sz_xTrapezoid 40 + +typedef struct { + CARD16 width B16; + CARD16 height B16; + INT16 x B16; + INT16 y B16; + INT16 xOff B16; + INT16 yOff B16; +} xGlyphInfo; + +#define sz_xGlyphInfo 12 + +typedef struct { + CARD8 len; + CARD8 pad1; + CARD16 pad2; + INT16 deltax; + INT16 deltay; +} xGlyphElt; + +#define sz_xGlyphElt 8 + +typedef struct { + Fixed l, r, y; +} xSpanFix; + +#define sz_xSpanFix 12 + +typedef struct { + xSpanFix top, bot; +} xTrap; + +#define sz_xTrap 24 + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xRenderQueryVersionReq; + +#define sz_xRenderQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRenderQueryVersionReply; + +#define sz_xRenderQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; +} xRenderQueryPictFormatsReq; + +#define sz_xRenderQueryPictFormatsReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numFormats B32; + CARD32 numScreens B32; + CARD32 numDepths B32; + CARD32 numVisuals B32; + CARD32 numSubpixel B32; /* Version 0.6 */ + CARD32 pad5 B32; +} xRenderQueryPictFormatsReply; + +#define sz_xRenderQueryPictFormatsReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + PictFormat format B32; +} xRenderQueryPictIndexValuesReq; + +#define sz_xRenderQueryPictIndexValuesReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numIndexValues; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xRenderQueryPictIndexValuesReply; + +#define sz_xRenderQueryPictIndexValuesReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture pid B32; + Drawable drawable B32; + PictFormat format B32; + CARD32 mask B32; +} xRenderCreatePictureReq; + +#define sz_xRenderCreatePictureReq 20 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; + CARD32 mask B32; +} xRenderChangePictureReq; + +#define sz_xRenderChangePictureReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; + INT16 xOrigin B16; + INT16 yOrigin B16; +} xRenderSetPictureClipRectanglesReq; + +#define sz_xRenderSetPictureClipRectanglesReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; +} xRenderFreePictureReq; + +#define sz_xRenderFreePictureReq 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture mask B32; + Picture dst B32; + INT16 xSrc B16; + INT16 ySrc B16; + INT16 xMask B16; + INT16 yMask B16; + INT16 xDst B16; + INT16 yDst B16; + CARD16 width B16; + CARD16 height B16; +} xRenderCompositeReq; + +#define sz_xRenderCompositeReq 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture src B32; + Picture dst B32; + CARD32 colorScale B32; + CARD32 alphaScale B32; + INT16 xSrc B16; + INT16 ySrc B16; + INT16 xDst B16; + INT16 yDst B16; + CARD16 width B16; + CARD16 height B16; +} xRenderScaleReq; + +#define sz_xRenderScaleReq 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTrapezoidsReq; + +#define sz_xRenderTrapezoidsReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTrianglesReq; + +#define sz_xRenderTrianglesReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTriStripReq; + +#define sz_xRenderTriStripReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderTriFanReq; + +#define sz_xRenderTriFanReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Glyphset gsid B32; + PictFormat format B32; +} xRenderCreateGlyphSetReq; + +#define sz_xRenderCreateGlyphSetReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Glyphset gsid B32; + Glyphset existing B32; +} xRenderReferenceGlyphSetReq; + +#define sz_xRenderReferenceGlyphSetReq 24 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Glyphset glyphset B32; +} xRenderFreeGlyphSetReq; + +#define sz_xRenderFreeGlyphSetReq 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Glyphset glyphset B32; + CARD32 nglyphs; +} xRenderAddGlyphsReq; + +#define sz_xRenderAddGlyphsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Glyphset glyphset B32; +} xRenderFreeGlyphsReq; + +#define sz_xRenderFreeGlyphsReq 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture src B32; + Picture dst B32; + PictFormat maskFormat B32; + Glyphset glyphset B32; + INT16 xSrc B16; + INT16 ySrc B16; +} xRenderCompositeGlyphsReq, xRenderCompositeGlyphs8Req, +xRenderCompositeGlyphs16Req, xRenderCompositeGlyphs32Req; + +#define sz_xRenderCompositeGlyphs8Req 28 +#define sz_xRenderCompositeGlyphs16Req 28 +#define sz_xRenderCompositeGlyphs32Req 28 + +/* 0.1 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + CARD8 op; + CARD8 pad1; + CARD16 pad2 B16; + Picture dst B32; + xRenderColor color; +} xRenderFillRectanglesReq; + +#define sz_xRenderFillRectanglesReq 20 + +/* 0.5 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Cursor cid B32; + Picture src B32; + CARD16 x B16; + CARD16 y B16; +} xRenderCreateCursorReq; + +#define sz_xRenderCreateCursorReq 16 + +/* 0.6 and higher */ + +/* + * This can't use an array because 32-bit values may be in bitfields + */ +typedef struct { + Fixed matrix11 B32; + Fixed matrix12 B32; + Fixed matrix13 B32; + Fixed matrix21 B32; + Fixed matrix22 B32; + Fixed matrix23 B32; + Fixed matrix31 B32; + Fixed matrix32 B32; + Fixed matrix33 B32; +} xRenderTransform; + +#define sz_xRenderTransform 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; + xRenderTransform transform; +} xRenderSetPictureTransformReq; + +#define sz_xRenderSetPictureTransformReq 44 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Drawable drawable B32; +} xRenderQueryFiltersReq; + +#define sz_xRenderQueryFiltersReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAliases B32; /* LISTofCARD16 */ + CARD32 numFilters B32; /* LISTofSTRING8 */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xRenderQueryFiltersReply; + +#define sz_xRenderQueryFiltersReply 32 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture B32; + CARD16 nbytes B16; /* number of bytes in name */ + CARD16 pad B16; +} xRenderSetPictureFilterReq; + +#define sz_xRenderSetPictureFilterReq 12 + +/* 0.8 and higher */ + +typedef struct { + Cursor cursor B32; + CARD32 delay B32; +} xAnimCursorElt; + +#define sz_xAnimCursorElt 8 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Cursor cid B32; +} xRenderCreateAnimCursorReq; + +#define sz_xRenderCreateAnimCursorReq 8 + +/* 0.9 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture picture; + INT16 xOff B16; + INT16 yOff B16; +} xRenderAddTrapsReq; + +#define sz_xRenderAddTrapsReq 12 + +/* 0.10 and higher */ + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture pid B32; + xRenderColor color; +} xRenderCreateSolidFillReq; + +#define sz_xRenderCreateSolidFillReq 16 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture pid B32; + xPointFixed p1; + xPointFixed p2; + CARD32 nStops; +} xRenderCreateLinearGradientReq; + +#define sz_xRenderCreateLinearGradientReq 28 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture pid B32; + xPointFixed inner; + xPointFixed outer; + Fixed inner_radius; + Fixed outer_radius; + CARD32 nStops; +} xRenderCreateRadialGradientReq; + +#define sz_xRenderCreateRadialGradientReq 36 + +typedef struct { + CARD8 reqType; + CARD8 renderReqType; + CARD16 length B16; + Picture pid B32; + xPointFixed center; + Fixed angle; /* in degrees */ + CARD32 nStops; +} xRenderCreateConicalGradientReq; + +#define sz_xRenderCreateConicalGradientReq 24 + +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#undef Picture +#undef PictFormat +#undef Fixed +#undef Glyphset + +#endif /* _XRENDERP_H_ */ diff --git a/X11/extensions/renderproto.pc.in b/X11/extensions/renderproto.pc.in new file mode 100644 index 000000000..17331e93e --- /dev/null +++ b/X11/extensions/renderproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: RenderProto +Description: Render extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/renderproto.txt b/X11/extensions/renderproto.txt new file mode 100644 index 000000000..af158b500 --- /dev/null +++ b/X11/extensions/renderproto.txt @@ -0,0 +1,1253 @@ + The X Rendering Extension + Version 0.10 + 2005-07-01 + Keith Packard + keithp@keithp.com + +1. Introduction + +The X Rendering Extension (Render) introduces digital image composition as +the foundation of a new rendering model within the X Window System. +Rendering geometric figures is accomplished by client-side tessellation into +either triangles or trapezoids. Text is drawn by loading glyphs into the +server and rendering sets of them. + +2. Acknowledgments + +This extension was the work of many people, in particular: + + + Thomas Porter and Tom Duff for their formal description + of image compositing. + + + Rob Pike and Russ Cox who designed the Plan 9 window system from + which the compositing model was lifted. + + + Juliusz Chroboczek and Raph Levien whose proposal for client-side + glyph management eliminated font handling from the X server. + + + Jon Leech, Brad Grantham and Allen Akin for patiently explaining + how OpenGL works. + + + Carl Worth for providing the sample implementation of + trapezoid rendering and showing how broken the spec was + + + Sam Pottle and Jamey Sharp for helping demonstrate the correctness + of the trapezoid specification. + + + Owen Taylor for helping specify projective transformations + +3. Rendering Model + +Render provides a single rendering operation which can be used in a variety of +ways to generate images: + + dest = (source IN mask) OP dest + +Where 'IN' is the Porter/Duff operator of that name and 'OP' is any of the +list of compositing operators described below, among which can be found all +of the Porter/Duff binary operators. + +To use this operator several additional values are required: + + + The destination rectangle. This is a subset of the destination + within which the rendering is performed. + + + The source location. This identifies the coordinate in the + source aligned with the upper left corner of the + destination rectangle. + + + The mask location. This identifies the coordinate in the + mask aligned with the upper left corner of the + destination rectangle. + + + A clip list. This limits the rendering to the intersection of the + destination rectangle with this clip list. + + + The OP to use + + + Whether the source should be repeated to cover the destination + rectangle, extended with a constant pixel value or extended by + using the nearest available source pixel. + + + Whether the mask should be repeated to cover the destination + rectangle, extended with a constant pixel value or extended by + using the nearest available mask pixel. + + + Whether the mask has a single alpha value for all four channels or + whether each mask channel should affect the associated source/dest + channels. + + + Whether the source should be reshaped with a projective + transformation, and if so, what filter to apply while + resampling the data. + + + Whether the mask should be reshaped with a projective + transformation, and if so, what filter to apply while + resampling the data. + +These parameters are variously attached to the operands or included in each +rendering request. + +4. Data types + +The core protocol rendering system uses a pixel model and applies color only +in the final generation of the video signal. A compositing model operates +on colors, not pixel values so a new datatype is needed to interpret data as +color instead of just bits. + +The "PictFormat" object holds information needed to translate pixel values +into red, green, blue and alpha channels. The server has a list of picture +formats corresponding to the various visuals on the screen. There are two +classes of formats, Indexed and Direct. Indexed PictFormats hold a list of +pixel values and RGBA values while Direct PictFormats hold bit masks for each +of R, G, B and A. + +The "Picture" object contains a Drawable, a PictFormat and some +rendering state. More than one Picture can refer to the same Drawable. + +5. Errors + +Errors are sent using core X error reports. + +PictFormat + A value for a PICTFORMAT argument does not name a defined PICTFORMAT. + +Picture + A value for a PICTURE argument does not name a defined PICTURE. + +PictOp + A value for a PICTOP argument does not name a defined PICTOP. + +GlyphSet + A value for a GLYPHSET argument does not name a defined GLYPHSET. + +Glyph + A value for a GLYPH argument does not name a defined GLYPH in the + glyphset. + +6. Protocol Types + +PICTURE 32-bit value (top three bits guaranteed to be zero) +PICTFORMAT 32-bit value (top three bits guaranteed to be zero) +PICTTYPE { Indexed, Direct } +PICTOP { Clear, Src, Dst, Over, OverReverse, In, InReverse, + Out, OutReverse, Atop, AtopReverse, Xor, Add, Saturate, + DisjointClear, DisjointSrc, DisjointDst, DisjointOver, + DisjointOverReverse, DisjointIn, DisjointInReverse, + DisjointOut, DisjointOutReverse, DisjointAtop, + DisjointAtopReverse, DisjointXor, + ConjointClear, ConjointSrc, ConjointDst, ConjointOver, + ConjointOverReverse, ConjointIn, ConjointInReverse, + ConjointOut, ConjointOutReverse, ConjointAtop, + ConjointAtopReverse, ConjointXor } +SUBPIXEL { Unknown, HorizontalRGB, HorizontalBGR, + VerticalRGB, VerticalBGR, None + } +COLOR [ + red, green, blue, alpha: CARD16 + ] +CHANNELMASK [ + shift, mask: CARD16 + ] +DIRECTFORMAT [ + red, green, blue, alpha: CHANNELMASK + ] +INDEXVALUE [ + pixel: Pixel; + red, green, blue, alpha: CARD16 + ] +PICTFORMINFO [ + id: PICTFORMAT + type: PICTTYPE + depth: CARD8 + direct: DIRECTFORMAT + colormap: COLORMAP or None + ] + +PICTVISUAL [ + visual: VISUALID or None + format: PICTFORMAT + ] + +PICTDEPTH [ + depth: CARD8 + visuals: LISTofPICTVISUAL + ] + +PICTSCREEN LISTofPICTDEPTH + +FIXED 32-bit value (top 16 are integer portion, bottom 16 are fraction) +TRANSFORM [ + p11, p12, p13: FIXED + p21, p22, p23: FIXED + p31, p32, p33: FIXED + ] +POINTFIX [ + x, y: FIXED + ] +POLYEDGE { Sharp, Smooth } +POLYMODE { Precise, Imprecise } +REPEAT { None, Regular, Pad, Reflect } +COLORPOINT [ + point: POINTFIX + color: COLOR + ] +SPANFIX [ + left, right, y: FIXED + ] +COLORSPANFIX [ + left, right, y: FIXED + left_color: COLOR + right_color: COLOR +QUAD [ + p1, p2, p3, p4: POINTFIX + ] +TRIANGLE [ + p1, p2, p3: POINTFIX + ] +LINEFIX [ + p1, p2: POINTFIX + ] +TRAP [ + top, bottom: SPANFIX + ] +TRAPEZOID [ + top, bottom: FIXED + left, right: LINEFIX + ] +(TRAPEZOID is deprecated) +COLORTRIANGLE [ + p1, p2, p3: COLORPOINT + ] +COLORTRAP [ + top, bottom: COLORSPANFIX + ] +GLYPHSET 32-bit value (top three bits guaranteed to be zero) +GLYPH 32-bit value +GLYPHINFO [ + width, height: CARD16 + x, y: INT16 + off-x, off-y: INT16 + ] +PICTGLYPH [ + info: GLYPHINFO + x, y: INT16 + ] +GLYPHABLE GLYPHSET or FONTABLE +GLYPHELT8 [ + dx, dy: INT16 + glyphs: LISTofCARD8 + ] +GLYPHITEM8 GLYPHELT8 or GLYPHABLE +GLYPHELT16 [ + dx, dy: INT16 + glyphs: LISTofCARD16 + ] +GLYPHITEM16 GLYPHELT16 or GLYPHABLE +GLYPHELT32 [ + dx, dy: INT16 + glyphs: LISTofCARD32 + ] +GLYPHITEM32 GLYPHELT32 or GLYPHABLE + +ANIMCURSORELT [ + cursor: CURSOR + delay: CARD32 + ] +7. Standard PictFormats + +The server must support a Direct PictFormat with 8 bits each of red, green, +blue and alpha as well as a Direct PictFormat with 8 bits of red, green and +blue and 0 bits of alpha. The server must also support Direct PictFormats +with 1, 4 and 8 bits of alpha and 0 bits of r, g and b. + +Pixel component values lie in the close range [0,1]. These values are +encoded in a varying number of bits. Values are encoded in a straight +forward manner. For a component encoded in m bits, a binary encoding b +is equal to a component value of b/(2^m-1). + +A Direct PictFormat with zero bits of alpha component is declared to have +alpha == 1 everywhere. A Direct PictFormat with zero bits of red, green and +blue is declared to have red, green, blue == 0 everywhere. If any of red, +green or blue components are of zero size, all are of zero size. Direct +PictFormats never have colormaps and are therefore screen independent. + +Indexed PictFormats never have alpha channels and the direct component is all +zeros. Indexed PictFormats always have a colormap in which the specified +colors are allocated read-only and are therefore screen dependent. Drawing +to in Indexed Picture uses only pixel values listed by QueryPictIndexValues. +Reading from an Indexed Picture uses red, green and blue values from the +colormap and alpha values from those listed by QueryPictIndexValues. Pixel +values not present in QueryPictIndexValues are given alpha values of 1. + +8. Compositing Operators + +For each pixel, the four channels of the image are computed with: + + C = Ca * Fa + Cb * Fb + +where C, Ca, Cb are the values of the respective channels and Fa and Fb +come from the following table: + + PictOp Fa Fb + -------------------------------------------------- + Clear 0 0 + Src 1 0 + Dst 0 1 + Over 1 1-Aa + OverReverse 1-Ab 1 + In Ab 0 + InReverse 0 Aa + Out 1-Ab 0 + OutReverse 0 1-Aa + Atop Ab 1-Aa + AtopReverse 1-Ab Aa + Xor 1-Ab 1-Aa + Add 1 1 + Saturate min(1,(1-Ab)/Aa) 1 + DisjointClear 0 0 + DisjointSrc 1 0 + DisjointDst 0 1 + DisjointOver 1 min(1,(1-Aa)/Ab) + DisjointOverReverse min(1,(1-Ab)/Aa) 1 + DisjointIn max(1-(1-Ab)/Aa,0) 0 + DisjointInReverse 0 max(1-(1-Aa)/Ab,0) + DisjointOut min(1,(1-Ab)/Aa) 0 + DisjointOutReverse 0 min(1,(1-Aa)/Ab) + DisjointAtop max(1-(1-Ab)/Aa,0) min(1,(1-Aa)/Ab) + DisjointAtopReverse min(1,(1-Ab)/Aa) max(1-(1-Aa)/Ab,0) + DisjointXor min(1,(1-Ab)/Aa) min(1,(1-Aa)/Ab) + ConjointClear 0 0 + ConjointSrc 1 0 + ConjointDst 0 1 + ConjointOver 1 max(1-Aa/Ab,0) + ConjointOverReverse max(1-Ab/Aa,0) 1 + ConjointIn min(1,Ab/Aa) 0 + ConjointInReverse 0 min(Aa/Ab,1) + ConjointOut max(1-Ab/Aa,0) 0 + ConjointOutReverse 0 max(1-Aa/Ab,0) + ConjointAtop min(1,Ab/Aa) max(1-Aa/Ab,0) + ConjointAtopReverse max(1-Ab/Aa,0) min(1,Aa/Ab) + ConjointXor max(1-Ab/Aa,0) max(1-Aa/Ab,0) + +Saturate and DisjointOverReverse are the same. They match OpenGL +compositing with FUNC_ADD, SRC_ALPHA_SATURATE, ONE, except that Render uses +premultiplied alpha while Open GL uses non-premultiplied alpha. + +The result of any compositing operator is always limited to the range +[0,1] for each component. Components whose value would be greater than 1 +are set to 1. + +For operations involving division, when the divisor is zero, define the +quotient to be positive infinity. The result is always well defined +because the division is surrounded with a max or min operator which will +give a finite result. + +When the mask contains separate alpha values for each channel, the +alpha value resulting from the combination of that value with the source +alpha channel is used in the final image composition. + +9. Source and Mask Transformations + +When fetching pixels from the source or mask pictures, Render provides three +options for pixel values which fall outside the drawable (this includes +pixels within a window geometry obscured by other windows). + + + Transparent. Missing values are replaced with transparent. + + + Nearest. Replace missing pixels with the nearest available + pixel. Where multiple pixels are equidistant, select + those with smallest Y and then smallest X coordinates + + + Tile. Select the pixel which would appear were the + drawable tiled to enclose the missing coordinate. If + the tiling doesn't cover the coordinate, use the + selected Constant or Nearest mode. + +When GraphicsExposures are selected in the destination picture, a region +containing at least the union of all destination pixel values affected by +data replaced as above is delivered after each compositing operation. If +the resulting region is empty, a NoExpose event is delivered instead. + +To construct the source and mask operands, the computed pixels values are +transformed through a homogeneous matrix, filtered and then used in the +fundamental rendering operator described above. Each screen provides a list +of supported filter names. There are a few required filters, and several +required filter alias which must map to one of the available filters. + +10. Polygon Rasterization + +Render provides only two kinds of polygons, trapezoids and triangles. To +improve efficiency, several different wire encodings exist for each. + +All trapezoids must be convex. Rendering of concave trapezoids is unspecified +except that the result must obey the clipping rules. + +Composite +Polygons are rasterized by implicit generating an alpha mask and using that +in the general compositing operator along with a supplied source image: + + tmp = Rasterize (polygon) + Composite (op, dst, src, tmp) + +When rasterized with Sharp edges, the mask is computed with a depth of 1 so +that all of the mask values are either 0 or 1. + +When rasterized with Smooth edges, the mask is generated by creating a square +around each pixel coordinate and computing the amount of that square covered +by the polygon. This ignores sampling theory but it provides a precise +definition which is close to the right answer. This value is truncated to +the alpha width in the fallback format before application of the compositing +operator. + +Rasterization +Alpha values are generated by point sampling the coverage of a square +surrounding the center of each pixel by the polygon. + +In Precise poly mode, the sample points are located in a regular grid. When +alpha depth 'e' is even, the regular grid is 2**(e/2) + 1 samples wide and +2**(e/2) -1 samples high. For odd alpha depth 'o', the sample grid is 2**o +- 1 samples wide and 1 sample high. Note that odd alpha depth usually +occurs only at depth 1, so this misshapen sample grid has no ill effects. +The sample grid is centered within the pixel and then each sample point is +rounded down to a point on the sub-pixel coordinate grid. + +In Imprecise mode, the location of the sample points is not specified, but +the implementation must conform to the following constraints: + + + Abutting edges must match precisely. When specifying two polygons + abutting along a common edge, if that edge is specified with the + same coordinates in each polygon then the sum of alpha values for + pixels inside the union of the two polygons must be precisely one. + + + Translationally invariant. The pixelization of the polygon must + be the same when either the polygon or the target drawable + are translated by any whole number of pixels in any direction. + + + Sharp edges are honored. When the polygon is rasterized with Sharp + edges, the implicit alpha mask will contain only 1 or 0 for + each pixel. + + + Order independent. Two identical polygons specified with vertices + in different orders must generate identical results. + +11. Image Filtering + +When computing pixels from source and mask images, a filter may be applied +to the data. This is usually used with a non-identity transformation +matrix, but filtering may be applied with an identity transformation. + +Each filter is given a unique name encoded as an ISO Latin-1 string. +Filters may be configured with a list of fixed point values; the number of +parameters and their interpretation is currently left to conventions passed +outside of the protocol. A set of standard filters are required to be +provided: + + Filter Name Description + + nearest Nearest neighbor filtering + bilinear Linear interpolation in two dimensions + +Additional names may be provided for any filter as aliases. A set of +standard alias names are required to be mapped to a provided filter so that +applications can use the alias names without checking for availability. + + Alias name Intended interpretation + + fast High performance, quality similar to Nearest + good Reasonable performance, quality similar to Bilinear + best Highest quality available, performance may not + be suitable for interactive use + +Aliases must map directly to a non-aliased filter name. + +There is also a set of standard filters which are not required but may be +provided. If they are provided, using the standard name, they must match +the definition specified here. + + Filter Name Description + + convolution MxN convolution filter. The values specified + in SetPictureFilter are M, N and then M * N + filter parameters. M and N must be integers + represented as fixed point numbers. + gaussian Gaussian blur. The value specified is a radius + in pixels (which can be fractional). A standard + Gaussian 2D convolution filter will be applied. + binomial Binomial blur. An approximation of a Gaussian + blur using binomial coefficients + +12. Glyph Rendering + +Glyphs are small alpha masks which can be stored in the X server and +rendered by referring to them by name. A set of glyphs can be rendered in a +single request. Glyphs are positioned by subtracting the x, y elements of +the GLYPHINFO from the requested rendering position. The next glyph +rendering position is set to the current rendering position plus the off-x +and off-y elements. + +Glyphs are stored in GlyphSets and are named within the GlyphSet with +client-specified 32-bit numbers. + +Glyphs can be stored in any PictFormat supported by the server. All glyphs +in a GlyphSet are stored in the same format. + +13. Extension Initialization + +The client must negotiate the version of the extension before executing +extension requests. Behavior of the server is undefined otherwise. + +QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the clients responsibility to ensure that the server supports + a version which is compatible with its expectations. + +QueryPictFormats + + -> + + fallback: PICTFORMAT + formats: LISTofPICTFORMINFO + screens: LISTofPICTSCREEN + subpixels: LISTofSUBPIXEL + + Errors: + + + The server responds with a list of supported PictFormats and + a list of which PictFormat goes with each visual on each screen. + Every PictFormat must match a supported depth, but not every + PictFormat need have a matching visual. + + The fallback format is used as an intermediate representation + in cases where there is no ideal choice. + + The relationship between the red, green and blue elements making + up each pixel indexed by screen is returned in subpixels. + This list is not present in servers advertising protocol + versions earlier than 0.6. This list may be shorter than + the number of screens, in which case the remaining screens + are given sub pixel order Unknown. + +QueryPictIndexValues + + format: PICTFORMAT + + -> + + values: LISTofINDEXVALUE + + Errors: + PictFormat, Match + + Returns the mapping from pixel values to RGBA values for the + specified Indexed PictFormat. If 'format' does not refer to + an Indexed PictFormat a Match error is generated. + +QueryFilters + + drawable: DRAWABLE + + -> + + filters: LISTofSTRING8 + aliases: LISTofCARD16 + + +14. Extension Requests + +CreatePicture + + pid: PICTURE + drawable: DRAWABLE + format: PICTFORMAT + value-mask: BITMASK + value-list: LISTofVALUE + + Errors: + Alloc, Drawable, IDChoice, Match, Pixmap, Picture, + PictFormat, Value + + This request creates a Picture object associated with the specified + drawable and assigns the identifier pid to it. Pixel data in the + image are interpreted according to 'format'. It is a Match error + to specify a format with a different depth than the drawable. If + the drawable is a Window then the Red, Green and Blue masks must + match those in the visual for the window else a Match error is + generated. + + The value-mask and value-list specify attributes of the picture that + are to be explicitly initialized. The possible values are: + + repeat: REPEAT + alpha-map: PICTURE or None + alpha-x-origin: INT16 + alpha-y-origin: INT16 + clip-x-origin: INT16 + clip-y-origin: INT16 + clip-mask: PIXMAP or None + graphics-exposures: BOOL + subwindow-mode: { ClipByChildren, IncludeInferiors } + poly-edge: POLYEDGE + poly-mode: POLYMODE + dither: ATOM or None + component-alpha: BOOL + + When used as a source or mask operand, the repeat and fill-constant + values control how pixels outside the geometry of the drawable are + computed. + + Repeat indicates how the drawable contents should be extented + in both directions. + + The alpha channel of alpha-map is used in place of any alpha channel + contained within the drawable for all rendering operations. The + alpha-mask origin is interpreted relative to the origin of drawable. + Rendering is additionally clipped by the geometry of alpha-map. + Exposures to the window do not affect the contents of alpha-map. + Alpha-map must refer to a picture containing a Pixmap, not a Window + (or a Match error results). + + The clip-mask restricts reads and writes to drawable. Only pixels + where the clip-mask has bits set to 1 are read or written. Pixels + are not accessed outside the area covered by the clip-mask or where + the clip-mask has bits set to 0. The clip-mask affects all graphics + requests, including sources. The clip-mask origin is interpreted + relative to the origin of drawable. If a pixmap is specified as the + clip-mask, it must have depth 1 and have the same root as the + drawable (or a Match error results). If clip-mask is None, then + pixels are always drawn, regardless of the clip origin. The + clip-mask can also be set with the SetPictureClipRectangles request. + + For ClipByChildren, both source and destination windows are + additionally clipped by all viewable InputOutput children. For + IncludeInferiors , neither source nor destination window is clipped + by inferiors. This will result in including subwindow contents in + the source and drawing through subwindow boundaries of the + destination. The use of IncludeInferiors with a source or + destination window of one depth with mapped inferiors of differing + depth is not illegal, but the semantics are undefined by this + extension. + + The graphics-exposures flag controls GraphicsExposure event + generation for Composite requests (and any similar requests + defined by additional extensions). + + Poly-edge and poly-mode control the rasterization of polygons + as described above. + + Dither selects which of the available dither patterns should + be used. If dither is None, no dithering will be done. + + Component-alpha indicates whether each image component is + intended as a separate alpha value when the picture is used + as a mask operand. + + The default component values are + + Component Default + ------------------------------- + repeat False + fill-nearest: False + clip-x-origin 0 + clip-y-origin 0 + clip-mask None + graphics-exposures True + subwindow-mode ClipByChildren + poly-edge Smooth + poly-mode Precise + dither None + component-alpha False + +ChangePicture + + pid: PICTURE + value-mask: BITMASK + value-list: LISTofVALUE + + Errors: + Picture, Alloc, Pixmap, PictOp, Value + + The value-mask and value-list specify which attributes are to be + changed. The values and restrictions are the same as for + CreatePicture. + +SetPictureClipRectangles + + picture: PICTURE + clip-x-origin: INT16 + clip-y-origin: INT16 + rectangles: LISTofRECTANGLE + + Errors: + Alloc, Picture + + This request changes clip-mask in picture to the specified list of + rectangles and sets the clip origin. Input and output will be + clipped to remain contained within the rectangles. The clip origin + is interpreted relative to the origin of the drawable associated + with picture. The rectangle coordinates are interpreted relative to + the clip origin. Note that the list of rectangles can be empty, + which effectively disables output. This is the opposite of passing + None as the clip-mask in CreatePicture and ChangePicture. + + Note that output is clipped to the union of all of the rectangles + and that no particular ordering among the rectangles is required. + +SetPictureTransform + + picture: PICTURE + transform: TRANSFORM + + Errors: + Alloc, Value, Picture + + This request changes the projective transformation used to + map coordinates when 'picture' is used as the source or + mask in any compositing operation. The transform + maps from destination pixel geometry back to the source pixel + geometry. + + The matrix must be invertable, else a Value error is generated. + +SetPictureFilter + + picture: PICTURE + filter: STRING8 + values: LISTofFIXED + + Errors: + Value, Match, Picture + + This request sets the current filter used when picture is a source + or mask operand. Filter must be one of the filters supported + for the screen associated with picture, else a Match error + is generated. If the filter accepts additional parameters, + they can be provided in values, incorrect values generate Value + errors, too many values generate Match errors. Too few values + cause the filter to assume default values for the missing + parameters. + + When created, Pictures are set to the Nearest filter. + +FreePicture + + pid: PICTURE + + Errors: + Picture + + This request deletes the association between the resource ID and the + picture. The picture storage will be freed when no other resource + references it. + +Composite + + op: PICTOP + src: PICTURE + mask: PICTURE or None + dst: PICTURE + src-x, src-y: INT16 + mask-x, mask-y: INT16 + dst-x, dst-y: INT16 + width, height: CARD16 + + This request combines the specified rectangle of the transformed + src and mask operands with the specified rectangle of dst using op + as the compositing operator. The coordinates are relative their + respective (transformed) drawable's origin. Rendering is clipped + to the geometry of the dst drawable and then to the dst clip-list. + + Pixels outside the geometry of src or mask needed for this + computation are substituted as described in the Source and Mask + Transformations section above. + + If src, mask and dst are not in the same format, and one of their + formats can hold all without loss of precision, they are converted + to that format. Alternatively, the server will convert each + operand to the fallback format. + + If mask is None, it is replaced by a constant alpha value of 1. + + When dst has graphics-exposures true, a region covering all dst + pixels affected by substitutions performed on src or mask pixels + outside their respective geometries is computed. If that region is + empty, a NoExpose event is sent. Otherwise, a sequence of + GraphicsExpose events are sent covering that region. + +FillRectangles + + op: PICTOP + dst: PICTURE + color: COLOR + rects: LISTofRECTANGLE + + This request combines color with the destination drawable in the + area specified by rects. Each rectangle is combined separately; + overlapping areas will be rendered multiple times. The effect is + equivalent to compositing with a repeating source picture filled with + the specified color. + +Trapezoids + + op: PICTOP + src: PICTURE + src-x, src-y: INT16 + dst: PICTURE + mask-format: PICTFORMAT or None + traps: LISTofTRAPEZOID + + This request rasterizes the list of trapezoids. + + For each trap, the area between the left and right edges is filled + from the top to the bottom. src-x and src-y register the pattern to + the floor of the top x and y coordinate of the left edge of the + first trapezoid, they are adjusted for subsequent trapezoids so that + the pattern remains globally aligned within the destination. + + When mask-format is not None, trapezoids are rendered in the + following way with the effective mask computed in mask-format: + + tmp = temporary alpha picture (in mask-format) + Combine (Zero, tmp, tmp, None) + for each trapezoid + Combine (Add, tmp, trapezoid, None) + Combine (op, dst, source, tmp) + + When mask-format is None, trapezoids are rendered in the order + specified directly to the destination: + + for each trapezoid + Combine (op, dst, source, trapezoid) + +Triangles + + op: PICTOP + src: PICTURE + src-x, src-y: INT16 + dst: PICTURE + mask-format: PICTFORMAT or None + triangles: LISTofTRIANGLE + + This request rasterizes the list of triangles in the order they + occur in the list. + + When mask-format is not None, triangles are rendered in the + following way with the effective mask computed in mask-format: + + tmp = temporary alpha picture (in mask-format) + Combine (Zero, tmp, tmp, None) + for each triangle + Combine (Add, tmp, triangle, None) + Combine (op, dst, source, tmp) + + When mask-format is None, triangles are rendered in the order + specified directly to the destination: + + for each triangle + Combine (op, dst, source, triangle) + +TriStrip + + op: PICTOP + src: PICTURE + src-x, src-y: INT16 + dst: PICTURE + mask-format: PICTFORMAT or None + points: LISTofPOINTFIX + + Triangles are formed by initially using the first three points and + then by eliminating the first point and appending the next point in + the list. If fewer than three points are provided, this request does + nothing. + + When mask-format is not None, triangles are rendered in the + following way with the effective mask computed in mask-format: + + tmp = temporary alpha picture (in mask-format) + Combine (Zero, tmp, tmp, None) + for each triangle + Combine (Add, tmp, triangle, None) + Combine (op, dst, source, tmp) + + When mask-format is None, triangles are rendered in the order + specified directly to the destination: + + for each triangle + Combine (op, dst, source, triangle) + +TriFan + op: PICTOP + src: PICTURE + src-x, src-y: INT16 + dst: PICTURE + mask-format: PICTFORMAT or None + points: LISTofPOINTFIX + + Triangles are formed by initially using the first three points and + then by eliminating the second point and appending the next point + int the list. If fewer than three points are provided, this request + does nothing. + + When mask-format is not None, triangles are rendered in the + following way with the effective mask computed in mask-format: + + tmp = temporary alpha picture (in mask-format) + Combine (Zero, tmp, tmp, None) + for each triangle + Combine (Add, tmp, triangle, None) + Combine (op, dst, source, tmp) + + When mask-format is None, triangles are rendered in the order + specified directly to the destination: + + for each triangle + Combine (op, dst, source, triangle) + +ColorTrapezoids + + op: PICTOP + dst: PICTURE + trapezoids: LISTofCOLORTRAP + + The geometry of the trapezoids must meet the same requirements as + for the Trapezoids request. The trapezoids are filled in the order + they occur in the list. + +ColorTriangles + + op: PICTOP + dst: PICTURE + triangles: LISTofCOLORTRIANGLE + + The colored triangles are rasterized in the order they occur in the + list. + +??? + +Should I included compressed triangle representations here? + +??? + +CreateGlyphSet + + gsid: GLYPHSET + format: PICTFORMAT + + Errors: + Alloc, IDChoice, PictFormat, Match + + This request creates a container for glyphs. The glyphset and + all contained glyphs are destroyed when gsid and any other names + for the glyphset are freed. Format must be a Direct format, when + it contains RGB values, the glyphs are composited using + component-alpha True, otherwise they are composited using + component-alpha False. + +ReferenceGlyphSet + + gsid: GLYPHSET + existing: GLYPHSET + + Errors: + Alloc, IDChoice, GlyphSet + + This request creates an additional name for the existing glyphset. + The glyphset will not be freed until all references to it are + destroyed. + +FreeGlyphSet + + glyphset: GLYPHSET + + Errors: + GlyphSet + + This request frees the name for the glyphset. When all names have + been freed, the glyphset and all contained glyphs are freed. + +AddGlyphs + glyphset: GLYPHSET + glyphids: LISTofCARD32 + glyphs: LISTofGLYPHINFO + data: LISTofBYTE + + Errors: + GlyphSet, Alloc + + This request adds glyphs to glyphset. The image for the glyphs + are stored with each glyph in a separate Z-format image padded to a + 32-bit boundary. Existing glyphs with the same names are replaced. + +AddGlyphsFromPicture + + glyphset: GLYPHSET + src: PICTURE + glyphs: LISTofPICTGLYPH + + Errors: + GlyphSet, Alloc + + This request adds glyphs to glyphset by copying them from src from + the locations included in glyphs. Existing glyphs with the same + names are replaced. Src may be in a different PictFormat than + glyphset, in which case the images are converted to the glyphset + format. + +FreeGlyphs + + glyphset: GLYPHSET + glyphs: LISTofGLYPH + + Errors: + GlyphSet, Match + + This request removes glyphs from glyphset. Each glyph must exist + in glyphset (else a Match error results). + +CompositeGlyphs8 +CompositeGlyphs16 +CompositeGlyphs32 + + op: PICTOP + src: PICTURE + dst: PICTURE + mask-format: PICTFORMAT or None + glyphset: GLYPHABLE + src-x, src-y: INT16 + dst-x, dst-y: INT16 + glyphcmds: LISTofGLYPHITEM8 CompositeGlyphs8 + glyphcmds: LISTofGLYPHITEM16 CompositeGlyphs16 + glyphcmds: LISTofGLYPHITEM32 CompositeGlyphs32 + + Errors: + Picture, PictOp, PictFormat, GlyphSet, Glyph + + The dst-x and dst-y coordinates are relative to the drawable's + origin and specify the baseline starting position (the initial glyph + origin). Each glyph item is processed in turn. A glyphset item + causes the glyphset to be used for subsequent glyphs. Switching + among glyphsets does not affect the next glyph origin. A glyph + element delta-x and delta-y specify additional changes in the + position along the x and y axes before the string is drawn; the + deltas are always added to the glyph origin. + + All contained GLYPHSETs are always transmitted most significant byte + first. + + If a GlyphSet error is generated for an item, the previous items may + have been drawn. + + When mask-format is not None, glyphs are rendered in the following + way with the effective mask computed in mask-format: + + tmp = temporary alpha picture + Combine (Zero, tmp, tmp, None) + for each glyph + Combine (Add, tmp, glyph, None) + Combine (op, dst, source, tmp) + + When mask-format is None, glyphs are rendered in the order specified + directly to the destination: + + for each glyph + Combine (op, dst, source, glyph) + +CreateCursor + + cid: CURSOR + source: PICTURE + x, y: CARD16 + + Errors: Alloc, IDChoice, Match, Picture + + This request creates a cursor and associates identifier cid with it. + The x and y coordinates define the hotspot relative to the source's + origin and must be a point within the source (or a Match error + results). The resulting picture will nominally be drawn to the + screen with PictOpOver. + + The components of the cursor may be transformed arbitrarily to meet + display limitations. In particular, if the display supports only + two colors cursors without translucency, the cursor will be + transformed so that areas less than .5 alpha will be transparent, + else opaque, and areas darker than 50% gray will be black else white. + + The source picture can be freed immediately if no further explicit + references to it are to be made. + + Subsequent drawing in the source has an undefined effect on the + cursor. The server might or might not make a copy of the picture. + +CreateAnimCursor + cid: CURSOR + cursors: LISTofANIMCURSORELT + + Errors: Alloc, IDChoice, Cursor + + This request creates a cursor and associates identifier cid with it. + When active, the cursor image on the screen will cycle through + 'cursors', showing each cursor in the element for the number of + milliseconds indicated by the 'delay' member of that element. + +AddTraps + picture: PICTURE + off-x, off-y: INT16 + trapezoids: LISTofTRAP + + Errors: Match + + Each trap is PictOpAdd'ed to 'picture'. 'off-x', 'off-y' + are added to each coordinate. + + 'picture' must be an alpha-only picture else a 'Match' error is + returned. + +CreateSolidFill + pid: PICTURE + color: COLOR + + Creates a Source picture that represents a solid fill with + the specified color. + +CreateLinearGradient + pid: PICTURE + p1, p2: POINTFIX + nstops: CARD32 + stops: LISTofFIXED + stop_colors: LISTofCOLOR + + Errors: Alloc, Value + + Creates a source picture representing a linear Gradient. The gradients + bounds are defined by the two end points p1 and p2. + + The gradient has nstops stop points between 0 and 1, each + having a stop color defined in stop_colors. + + The array of stops has to contain values between 0 and 1 (inclusive) and + has to be ordered in increasing size or a Value error is generated. If + p1 == p2 a Value error is generated. + + The colors are non premultiplied. + +CreateRadialGradient + pid: PICTURE + inner_center: POINTFIX + outer_center: POINTFIX + inner_radius: FIXED + outer_radius: FIXED + nstops: CARD32 + stops: LISTofFIXED + stop_colors: LISTofCOLOR + + Errors: Alloc, Value + + Creates a source picture representing a radial Gradient. The + gradients bounds are defined by a center point, a focal point and a + radius around the center. + + The gradient has nstops stop points between 0 and 1, each + having a stop color defined in stop_colors. + + The array of stops has to contain values between 0 and 1 (inclusive) and + has to be ordered in increasing size or a Value error is generated. The inner + circle has to be completely contained inside the outer one or a Value error is + generated. + + The colors are non premultiplied. + +CreateConicalGradient + pid: PICTURE + center: POINTFIX + angle: FIXED + nstops: CARD32 + stops: LISTofFIXED + stop_colors: LISTofCOLOR + + Errors: Alloc, Value + + Creates a source picture representing a conical Gradient. The + gradient is defined by a center point and an angle (in degrees). + + The gradient has nstops stop points between 0 and 1, each + having a stop color defined in stop_colors. + + The array of stops has to contain values between 0 and 1 (inclusive) and + has to be ordered in increasing size or a Value error is generated. + + The colors are non premultiplied. + + +15. Extension Versioning + +The Render extension was developed in parallel with the implementation to +ensure the feasibility of various portions of the design. As portions of +the extension are implemented, the version number of the extension has +changed to reflect the portions of the standard provided. This document +describes the intent for version 1.0 of the specification, the partial +implementations have version numbers less than that. Here's a list of +what each version before 1.0 implemented: + + 0.0: + No disjoint/conjoint operators + No component alpha + Composite + CreateGlyphSet + FreeGlyphSet + AddGlyphs + CompositeGlyphs + + 0.1: + Component alpha + FillRectangles + + 0.2: + Disjoint/Conjoint operators + + 0.3: + FreeGlyphs + + 0.4: + Trapezoids + Triangles + TriStrip + TriFan + + 0.5: + CreateCursor + + 0.6: + SetPictureTransform + QueryFilters + SetPictureFilter + subpixels member of QueryPictFormats + + 0.7: + QueryPictIndexValues + 0.8: + CreateAnimCursor + 0.9: + AddTrapezoids + + 0.10: + CreateSolidFill + CreateLinearGradient + CreateRadialGradient + CreateConicalGradient + + The repeat picture attribute now supports Pad and + Reflect, older versions only supported None and Normal. diff --git a/X11/extensions/resourceproto.pc.in b/X11/extensions/resourceproto.pc.in new file mode 100644 index 000000000..2851df1c3 --- /dev/null +++ b/X11/extensions/resourceproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ResourceProto +Description: Resource extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/saver.h b/X11/extensions/saver.h new file mode 100644 index 000000000..d253e4f79 --- /dev/null +++ b/X11/extensions/saver.h @@ -0,0 +1,54 @@ +/* + * $XConsortium: saver.h,v 1.5 94/04/17 20:59:33 rws Exp $ + * +Copyright (c) 1992 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + * + * Author: Keith Packard, MIT X Consortium + */ + +#ifndef _SAVER_H_ +#define _SAVER_H_ + +#define ScreenSaverName "MIT-SCREEN-SAVER" +#define ScreenSaverPropertyName "_MIT_SCREEN_SAVER_ID" + +#define ScreenSaverNotifyMask 0x00000001 +#define ScreenSaverCycleMask 0x00000002 + +#define ScreenSaverMajorVersion 1 +#define ScreenSaverMinorVersion 1 + +#define ScreenSaverOff 0 +#define ScreenSaverOn 1 +#define ScreenSaverCycle 2 +#define ScreenSaverDisabled 3 + +#define ScreenSaverBlanked 0 +#define ScreenSaverInternal 1 +#define ScreenSaverExternal 2 + +#define ScreenSaverNotify 0 +#define ScreenSaverNumberEvents 1 + +#endif /* _SAVER_H_ */ diff --git a/X11/extensions/saverproto.h b/X11/extensions/saverproto.h new file mode 100644 index 000000000..9b8ed7333 --- /dev/null +++ b/X11/extensions/saverproto.h @@ -0,0 +1,178 @@ +/* + * $XConsortium: saverproto.h,v 1.5 94/04/17 20:59:33 keith Exp $ + * +Copyright (c) 1992 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + * + * Author: Keith Packard, MIT X Consortium + */ +/* $XFree86$ */ + +#ifndef _SAVERPROTO_H_ +#define _SAVERPROTO_H_ + +#include + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 + +#define X_ScreenSaverQueryVersion 0 + +typedef struct _ScreenSaverQueryVersion { + CARD8 reqType; /* always ScreenSaverReqCode */ + CARD8 saverReqType; /* always X_ScreenSaverQueryVersion */ + CARD16 length B16; + CARD8 clientMajor; + CARD8 clientMinor; + CARD16 unused B16; +} xScreenSaverQueryVersionReq; +#define sz_xScreenSaverQueryVersionReq 8 + +typedef struct { + CARD8 type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of protocol */ + CARD16 minorVersion B16; /* minor version of protocol */ + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xScreenSaverQueryVersionReply; +#define sz_xScreenSaverQueryVersionReply 32 + +#define X_ScreenSaverQueryInfo 1 + +typedef struct _ScreenSaverQueryInfo { + CARD8 reqType; /* always ScreenSaverReqCode */ + CARD8 saverReqType; /* always X_ScreenSaverQueryInfo */ + CARD16 length B16; + Drawable drawable B32; +} xScreenSaverQueryInfoReq; +#define sz_xScreenSaverQueryInfoReq 8 + +typedef struct { + CARD8 type; /* X_Reply */ + BYTE state; /* Off, On */ + CARD16 sequenceNumber B16; + CARD32 length B32; + Window window B32; + CARD32 tilOrSince B32; + CARD32 idle B32; + CARD32 eventMask B32; + BYTE kind; /* Blanked, Internal, External */ + CARD8 pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; +} xScreenSaverQueryInfoReply; +#define sz_xScreenSaverQueryInfoReply 32 + +#define X_ScreenSaverSelectInput 2 + +typedef struct _ScreenSaverSelectInput { + CARD8 reqType; /* always ScreenSaverReqCode */ + CARD8 saverReqType; /* always X_ScreenSaverSelectInput */ + CARD16 length B16; + Drawable drawable B32; + CARD32 eventMask B32; +} xScreenSaverSelectInputReq; +#define sz_xScreenSaverSelectInputReq 12 + +#define X_ScreenSaverSetAttributes 3 + +typedef struct _ScreenSaverSetAttributes { + CARD8 reqType; /* always ScreenSaverReqCode */ + CARD8 saverReqType; /* always X_ScreenSaverSetAttributes */ + CARD16 length B16; + Drawable drawable B32; + INT16 x B16, y B16; + CARD16 width B16, height B16, borderWidth B16; + BYTE c_class; + CARD8 depth; + VisualID visualID B32; + CARD32 mask B32; +} xScreenSaverSetAttributesReq; +#define sz_xScreenSaverSetAttributesReq 28 + +#define X_ScreenSaverUnsetAttributes 4 + +typedef struct _ScreenSaverUnsetAttributes { + CARD8 reqType; /* always ScreenSaverReqCode */ + CARD8 saverReqType; /* always X_ScreenSaverUnsetAttributes */ + CARD16 length B16; + Drawable drawable B32; +} xScreenSaverUnsetAttributesReq; +#define sz_xScreenSaverUnsetAttributesReq 8 + +#define X_ScreenSaverSuspend 5 + +typedef struct _ScreenSaverSuspend { + CARD8 reqType; + CARD8 saverReqType; + CARD16 length B16; + Bool suspend B32; +} xScreenSaverSuspendReq; +#define sz_xScreenSaverSuspendReq 8 + +typedef struct _ScreenSaverNotify { + CARD8 type; /* always eventBase + ScreenSaverNotify */ + BYTE state; /* off, on, cycle */ + CARD16 sequenceNumber B16; + Time timestamp B32; + Window root B32; + Window window B32; /* screen saver window */ + BYTE kind; /* blanked, internal, external */ + BYTE forced; + CARD16 pad0 B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xScreenSaverNotifyEvent; +#define sz_xScreenSaverNotifyEvent 32 + +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _SAVERPROTO_H_ */ diff --git a/X11/extensions/scrnsaver.h b/X11/extensions/scrnsaver.h new file mode 100644 index 000000000..8e8c5d6d1 --- /dev/null +++ b/X11/extensions/scrnsaver.h @@ -0,0 +1,136 @@ +/* + * $XConsortium: scrnsaver.h,v 1.6 94/04/17 20:59:34 keith Exp $ + * +Copyright (c) 1992 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the X Consortium. + * + * Author: Keith Packard, MIT X Consortium + */ +/* $XFree86$ */ + +#ifndef _SCRNSAVER_H_ +#define _SCRNSAVER_H_ + +#include +#include +#include + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* screen saver window */ + Window root; /* root window of event screen */ + int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverCycle*/ + int kind; /* ScreenSaverBlanked, ...Internal, ...External */ + Bool forced; /* extents of new region */ + Time time; /* event timestamp */ +} XScreenSaverNotifyEvent; + +typedef struct { + Window window; /* screen saver window - may not exist */ + int state; /* ScreenSaverOff, ScreenSaverOn, ScreenSaverDisabled*/ + int kind; /* ScreenSaverBlanked, ...Internal, ...External */ + unsigned long til_or_since; /* time til or since screen saver */ + unsigned long idle; /* total time since last user input */ + unsigned long eventMask; /* currently selected events for this client */ +} XScreenSaverInfo; + +_XFUNCPROTOBEGIN + +extern Bool XScreenSaverQueryExtension ( + Display* /* display */, + int* /* event_base */, + int* /* error_base */ +); + +extern Status XScreenSaverQueryVersion ( + Display* /* display */, + int* /* major_version */, + int* /* minor_version */ +); + +extern XScreenSaverInfo *XScreenSaverAllocInfo ( + void +); + +extern Status XScreenSaverQueryInfo ( + Display* /* display */, + Drawable /* drawable */, + XScreenSaverInfo* /* info */ +); + +extern void XScreenSaverSelectInput ( + Display* /* display */, + Drawable /* drawable */, + unsigned long /* eventMask */ +); + +extern void XScreenSaverSetAttributes ( + Display* /* display */, + Drawable /* drawable */, + int /* x */, + int /* y */, + unsigned int /* width */, + unsigned int /* height */, + unsigned int /* border_width */, + int /* depth */, + unsigned int /* class */, + Visual * /* visual */, + unsigned long /* valuemask */, + XSetWindowAttributes * /* attributes */ +); + +extern void XScreenSaverUnsetAttributes ( + Display* /* display */, + Drawable /* drawable */ +); + +extern Status XScreenSaverRegister ( + Display* /* display */, + int /* screen */, + XID /* xid */, + Atom /* type */ +); + +extern Status XScreenSaverUnregister ( + Display* /* display */, + int /* screen */ +); + +extern Status XScreenSaverGetRegistered ( + Display* /* display */, + int /* screen */, + XID* /* xid */, + Atom* /* type */ +); + +extern void XScreenSaverSuspend ( + Display* /* display */, + Bool /* suspend */ +); + +_XFUNCPROTOEND + +#endif /* _SCRNSAVER_H_ */ diff --git a/X11/extensions/scrnsaverproto.pc.in b/X11/extensions/scrnsaverproto.pc.in new file mode 100644 index 000000000..87f9ddc69 --- /dev/null +++ b/X11/extensions/scrnsaverproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: ScrnSaverProto +Description: ScrnSaver extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/security.h b/X11/extensions/security.h new file mode 100644 index 000000000..fc7ade236 --- /dev/null +++ b/X11/extensions/security.h @@ -0,0 +1,111 @@ +/* $Xorg: security.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* +Copyright 1996, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. +*/ +/* $XFree86: xc/include/extensions/security.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ + +#ifndef _SECURITY_H +#define _SECURITY_H + +#define _XAUTH_STRUCT_ONLY +#include + +/* constants that server, library, and application all need */ + +#define XSecurityNumberEvents 1 +#define XSecurityNumberErrors 2 +#define XSecurityBadAuthorization 0 +#define XSecurityBadAuthorizationProtocol 1 + +/* trust levels */ +#define XSecurityClientTrusted 0 +#define XSecurityClientUntrusted 1 + +/* authorization attribute masks */ +#define XSecurityTimeout (1<<0) +#define XSecurityTrustLevel (1<<1) +#define XSecurityGroup (1<<2) +#define XSecurityEventMask (1<<3) +#define XSecurityAllAuthorizationAttributes \ + (XSecurityTimeout | XSecurityTrustLevel | XSecurityGroup | XSecurityEventMask) + +/* event masks */ +#define XSecurityAuthorizationRevokedMask (1<<0) +#define XSecurityAllEventMasks XSecurityAuthorizationRevokedMask + +/* event offsets */ +#define XSecurityAuthorizationRevoked 0 + +#define XSecurityAuthorizationName "XC-QUERY-SECURITY-1" +#define XSecurityAuthorizationNameLen 19 + + +#ifndef _SECURITY_SERVER + +_XFUNCPROTOBEGIN + +Status XSecurityQueryExtension ( + Display *dpy, + int *major_version_return, + int *minor_version_return); + +Xauth *XSecurityAllocXauth(void); + +void XSecurityFreeXauth(Xauth *auth); + +/* type for returned auth ids */ +typedef unsigned long XSecurityAuthorization; + +typedef struct { + unsigned int timeout; + unsigned int trust_level; + XID group; + long event_mask; +} XSecurityAuthorizationAttributes; + +Xauth *XSecurityGenerateAuthorization( + Display *dpy, + Xauth *auth_in, + unsigned long valuemask, + XSecurityAuthorizationAttributes *attributes, + XSecurityAuthorization *auth_id_return); + +Status XSecurityRevokeAuthorization( + Display *dpy, + XSecurityAuthorization auth_id); + +_XFUNCPROTOEND + +typedef struct { + int type; /* event base + XSecurityAuthorizationRevoked */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + XSecurityAuthorization auth_id; /* revoked authorization id */ +} XSecurityAuthorizationRevokedEvent; + +#endif /* _SECURITY_SERVER */ + +#endif /* _SECURITY_H */ diff --git a/X11/extensions/securstr.h b/X11/extensions/securstr.h new file mode 100644 index 000000000..50c764441 --- /dev/null +++ b/X11/extensions/securstr.h @@ -0,0 +1,116 @@ +/* $Xorg: securstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* +Copyright 1996, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from The Open Group. +*/ +/* $XFree86: xc/include/extensions/securstr.h,v 1.2 2001/08/01 00:44:35 tsi Exp $ */ + +#ifndef _SECURSTR_H +#define _SECURSTR_H + +#include + +#define SECURITY_EXTENSION_NAME "SECURITY" +#define SECURITY_MAJOR_VERSION 1 +#define SECURITY_MINOR_VERSION 0 + +#define X_SecurityQueryVersion 0 +#define X_SecurityGenerateAuthorization 1 +#define X_SecurityRevokeAuthorization 2 + +typedef struct { + CARD8 reqType; + CARD8 securityReqType; + CARD16 length B16; + CARD16 majorVersion B16; + CARD16 minorVersion B16; +} xSecurityQueryVersionReq; +#define sz_xSecurityQueryVersionReq 8 + +typedef struct { + CARD8 type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; + CARD16 minorVersion B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + } xSecurityQueryVersionReply; +#define sz_xSecurityQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 securityReqType; + CARD16 length B16; + CARD16 nbytesAuthProto B16; + CARD16 nbytesAuthData B16; + CARD32 valueMask B32; + /* auth protocol name padded to 4 bytes */ + /* auth protocol data padded to 4 bytes */ + /* list of CARD32 values, if any */ +} xSecurityGenerateAuthorizationReq; +#define sz_xSecurityGenerateAuthorizationReq 12 + +typedef struct { + CARD8 type; + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 authId B32; + CARD16 dataLength B16; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + } xSecurityGenerateAuthorizationReply; +#define sz_xSecurityGenerateAuthorizationReply 32 + +typedef struct { + CARD8 reqType; + CARD8 securityReqType; + CARD16 length B16; + CARD32 authId B32; +} xSecurityRevokeAuthorizationReq; +#define sz_xSecurityRevokeAuthorizationReq 8 + +typedef struct _xSecurityAuthorizationRevokedEvent { + BYTE type; + BYTE detail; + CARD16 sequenceNumber B16; + CARD32 authId B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xSecurityAuthorizationRevokedEvent; +#define sz_xSecurityAuthorizationRevokedEvent 32 + +#endif /* _SECURSTR_H */ diff --git a/X11/extensions/shape.h b/X11/extensions/shape.h new file mode 100644 index 000000000..d173efef8 --- /dev/null +++ b/X11/extensions/shape.h @@ -0,0 +1,180 @@ +/* $XFree86: xc/include/extensions/shape.h,v 1.3 2001/12/14 19:53:29 dawes Exp $ */ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* $Xorg: shape.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#ifndef _SHAPE_H_ +#define _SHAPE_H_ + +#include + +#define X_ShapeQueryVersion 0 +#define X_ShapeRectangles 1 +#define X_ShapeMask 2 +#define X_ShapeCombine 3 +#define X_ShapeOffset 4 +#define X_ShapeQueryExtents 5 +#define X_ShapeSelectInput 6 +#define X_ShapeInputSelected 7 +#define X_ShapeGetRectangles 8 + +#define ShapeSet 0 +#define ShapeUnion 1 +#define ShapeIntersect 2 +#define ShapeSubtract 3 +#define ShapeInvert 4 + +#define ShapeBounding 0 +#define ShapeClip 1 +#define ShapeInput 2 + +#define ShapeNotifyMask (1L << 0) +#define ShapeNotify 0 + +#define ShapeNumberEvents (ShapeNotify + 1) + +#ifndef _SHAPE_SERVER_ + +#include + +typedef struct { + int type; /* of event */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came frome a SendEvent request */ + Display *display; /* Display the event was read from */ + Window window; /* window of event */ + int kind; /* ShapeBounding or ShapeClip */ + int x, y; /* extents of new region */ + unsigned width, height; + Time time; /* server timestamp when region changed */ + Bool shaped; /* true if the region exists */ +} XShapeEvent; + +_XFUNCPROTOBEGIN + +extern Bool XShapeQueryExtension ( + Display* /* display */, + int* /* event_base */, + int* /* error_base */ +); + +extern Status XShapeQueryVersion ( + Display* /* display */, + int* /* major_version */, + int* /* minor_version */ +); + +extern void XShapeCombineRegion ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + Region /* region */, + int /* op */ +); + +extern void XShapeCombineRectangles ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + XRectangle* /* rectangles */, + int /* n_rects */, + int /* op */, + int /* ordering */ +); + +extern void XShapeCombineMask ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + Pixmap /* src */, + int /* op */ +); + +extern void XShapeCombineShape ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */, + Window /* src */, + int /* src_kind */, + int /* op */ +); + +extern void XShapeOffsetShape ( + Display* /* display */, + Window /* dest */, + int /* dest_kind */, + int /* x_off */, + int /* y_off */ +); + +extern Status XShapeQueryExtents ( + Display* /* display */, + Window /* window */, + Bool* /* bounding_shaped */, + int* /* x_bounding */, + int* /* y_bounding */, + unsigned int* /* w_bounding */, + unsigned int* /* h_bounding */, + Bool* /* clip_shaped */, + int* /* x_clip */, + int* /* y_clip */, + unsigned int* /* w_clip */, + unsigned int* /* h_clip */ +); + +extern void XShapeSelectInput ( + Display* /* display */, + Window /* window */, + unsigned long /* mask */ +); + +extern unsigned long XShapeInputSelected ( + Display* /* display */, + Window /* window */ +); + +extern XRectangle *XShapeGetRectangles ( + Display* /* display */, + Window /* window */, + int /* kind */, + int* /* count */, + int* /* ordering */ +); + +_XFUNCPROTOEND + +#endif /* _SHAPE_SERVER_ */ + +#endif /* _SHAPE_H_ */ diff --git a/X11/extensions/shapestr.h b/X11/extensions/shapestr.h new file mode 100644 index 000000000..4742ba8e9 --- /dev/null +++ b/X11/extensions/shapestr.h @@ -0,0 +1,234 @@ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* $Xorg: shapestr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#ifndef _SHAPESTR_H_ +#define _SHAPESTR_H_ + +/* + * Protocol requests constants and alignment values + * These would really be in SHAPE's X.h and Xproto.h equivalents + */ + +#include "shape.h" + +#define Window CARD32 +#define Time CARD32 + +#define SHAPENAME "SHAPE" + +#define SHAPE_MAJOR_VERSION 1 /* current version numbers */ +#define SHAPE_MINOR_VERSION 1 + +typedef struct _ShapeQueryVersion { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeQueryVersion */ + CARD16 length B16; +} xShapeQueryVersionReq; +#define sz_xShapeQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of SHAPE protocol */ + CARD16 minorVersion B16; /* minor version of SHAPE protocol */ + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xShapeQueryVersionReply; +#define sz_xShapeQueryVersionReply 32 + +typedef struct _ShapeRectangles { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeRectangles */ + CARD16 length B16; + CARD8 op; /* Set, ... */ + CARD8 destKind; /* ShapeBounding or ShapeClip */ + CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */ + CARD8 pad0; /* not used */ + Window dest B32; + INT16 xOff B16; + INT16 yOff B16; +} xShapeRectanglesReq; /* followed by xRects */ +#define sz_xShapeRectanglesReq 16 + +typedef struct _ShapeMask { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeMask */ + CARD16 length B16; + + CARD8 op; /* Set, ... */ + CARD8 destKind; /* ShapeBounding or ShapeClip */ + CARD16 junk B16; /* not used */ + + Window dest B32; + INT16 xOff B16; + INT16 yOff B16; + CARD32 src B32; /* 1 bit pixmap */ +} xShapeMaskReq; +#define sz_xShapeMaskReq 20 + +typedef struct _ShapeCombine { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeCombine */ + CARD16 length B16; + CARD8 op; /* Set, ... */ + CARD8 destKind; /* ShapeBounding or ShapeClip */ + CARD8 srcKind; /* ShapeBounding or ShapeClip */ + CARD8 junk; /* not used */ + Window dest B32; + INT16 xOff B16; + INT16 yOff B16; + Window src B32; +} xShapeCombineReq; +#define sz_xShapeCombineReq 20 + +typedef struct _ShapeOffset { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeOffset */ + CARD16 length B16; + CARD8 destKind; /* ShapeBounding or ShapeClip */ + CARD8 junk1; /* not used */ + CARD16 junk2 B16; /* not used */ + Window dest B32; + INT16 xOff B16; + INT16 yOff B16; +} xShapeOffsetReq; +#define sz_xShapeOffsetReq 16 + +typedef struct _ShapeQueryExtents { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeQueryExtents */ + CARD16 length B16; + Window window B32; +} xShapeQueryExtentsReq; +#define sz_xShapeQueryExtentsReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; /* 0 */ + CARD8 boundingShaped; /* window has bounding shape */ + CARD8 clipShaped; /* window has clip shape */ + CARD16 unused1 B16; + INT16 xBoundingShape B16; /* extents of bounding shape */ + INT16 yBoundingShape B16; + CARD16 widthBoundingShape B16; + CARD16 heightBoundingShape B16; + INT16 xClipShape B16; /* extents of clip shape */ + INT16 yClipShape B16; + CARD16 widthClipShape B16; + CARD16 heightClipShape B16; + CARD32 pad1 B32; +} xShapeQueryExtentsReply; +#define sz_xShapeQueryExtentsReply 32 + +typedef struct _ShapeSelectInput { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeSelectInput */ + CARD16 length B16; + Window window B32; + BYTE enable; /* xTrue -> send events */ + BYTE pad1; + CARD16 pad2 B16; +} xShapeSelectInputReq; +#define sz_xShapeSelectInputReq 12 + +typedef struct _ShapeNotify { + BYTE type; /* always eventBase + ShapeNotify */ + BYTE kind; /* either ShapeBounding or ShapeClip */ + CARD16 sequenceNumber B16; + Window window B32; + INT16 x B16; + INT16 y B16; /* extents of new shape */ + CARD16 width B16; + CARD16 height B16; + Time time B32; /* time of change */ + BYTE shaped; /* set when a shape actual exists */ + BYTE pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xShapeNotifyEvent; +#define sz_xShapeNotifyEvent 32 + +typedef struct _ShapeInputSelected { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeInputSelected */ + CARD16 length B16; + Window window B32; +} xShapeInputSelectedReq; +#define sz_xShapeInputSelectedReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 enabled; /* current status */ + CARD16 sequenceNumber B16; + CARD32 length B32; /* 0 */ + CARD32 pad1 B32; /* unused */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xShapeInputSelectedReply; +#define sz_xShapeInputSelectedReply 32 + +typedef struct _ShapeGetRectangles { + CARD8 reqType; /* always ShapeReqCode */ + CARD8 shapeReqType; /* always X_ShapeGetRectangles */ + CARD16 length B16; + Window window B32; + CARD8 kind; /* ShapeBounding or ShapeClip */ + CARD8 junk1; + CARD16 junk2 B16; +} xShapeGetRectanglesReq; +#define sz_xShapeGetRectanglesReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 ordering; /* UnSorted, YSorted, YXSorted, YXBanded */ + CARD16 sequenceNumber B16; + CARD32 length B32; /* not zero */ + CARD32 nrects B32; /* number of rectangles */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xShapeGetRectanglesReply; /* followed by xRectangles */ +#define sz_xShapeGetRectanglesReply 32 + +#undef Window +#undef Time + +#endif /* _SHAPESTR_H_ */ diff --git a/X11/extensions/shmstr.h b/X11/extensions/shmstr.h new file mode 100644 index 000000000..b15538d4e --- /dev/null +++ b/X11/extensions/shmstr.h @@ -0,0 +1,217 @@ +/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */ +/************************************************************ + +Copyright 1989, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +********************************************************/ + +/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ + +#ifndef _SHMSTR_H_ +#define _SHMSTR_H_ + +/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ + +#include "XShm.h" + +#define ShmSeg CARD32 +#define Drawable CARD32 +#define VisualID CARD32 +#define GContext CARD32 +#define Pixmap CARD32 + +#define SHMNAME "MIT-SHM" + +#define SHM_MAJOR_VERSION 1 /* current version numbers */ +#define SHM_MINOR_VERSION 1 + +#ifdef _XSHM_SERVER_ +#define XSHM_PUT_IMAGE_ARGS \ + DrawablePtr /* dst */, \ + GCPtr /* pGC */, \ + int /* depth */, \ + unsigned int /* format */, \ + int /* w */, \ + int /* h */, \ + int /* sx */, \ + int /* sy */, \ + int /* sw */, \ + int /* sh */, \ + int /* dx */, \ + int /* dy */, \ + char * /* data */ + +#define XSHM_CREATE_PIXMAP_ARGS \ + ScreenPtr /* pScreen */, \ + int /* width */, \ + int /* height */, \ + int /* depth */, \ + char * /* addr */ + +typedef struct _ShmFuncs { + PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS); + void (* PutImage)(XSHM_PUT_IMAGE_ARGS); +} ShmFuncs, *ShmFuncsPtr; +#endif + +typedef struct _ShmQueryVersion { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmQueryVersion */ + CARD16 length B16; +} xShmQueryVersionReq; +#define sz_xShmQueryVersionReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL sharedPixmaps; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; /* major version of SHM protocol */ + CARD16 minorVersion B16; /* minor version of SHM protocol */ + CARD16 uid B16; + CARD16 gid B16; + CARD8 pixmapFormat; + CARD8 pad0; + CARD16 pad1 B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xShmQueryVersionReply; +#define sz_xShmQueryVersionReply 32 + +typedef struct _ShmAttach { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmAttach */ + CARD16 length B16; + ShmSeg shmseg B32; + CARD32 shmid B32; + BOOL readOnly; + BYTE pad0; + CARD16 pad1 B16; +} xShmAttachReq; +#define sz_xShmAttachReq 16 + +typedef struct _ShmDetach { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmDetach */ + CARD16 length B16; + ShmSeg shmseg B32; +} xShmDetachReq; +#define sz_xShmDetachReq 8 + +typedef struct _ShmPutImage { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmPutImage */ + CARD16 length B16; + Drawable drawable B32; + GContext gc B32; + CARD16 totalWidth B16; + CARD16 totalHeight B16; + CARD16 srcX B16; + CARD16 srcY B16; + CARD16 srcWidth B16; + CARD16 srcHeight B16; + INT16 dstX B16; + INT16 dstY B16; + CARD8 depth; + CARD8 format; + CARD8 sendEvent; + CARD8 bpad; + ShmSeg shmseg B32; + CARD32 offset B32; +} xShmPutImageReq; +#define sz_xShmPutImageReq 40 + +typedef struct _ShmGetImage { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmGetImage */ + CARD16 length B16; + Drawable drawable B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD32 planeMask B32; + CARD8 format; + CARD8 pad0; + CARD8 pad1; + CARD8 pad2; + ShmSeg shmseg B32; + CARD32 offset B32; +} xShmGetImageReq; +#define sz_xShmGetImageReq 32 + +typedef struct _ShmGetImageReply { + BYTE type; /* X_Reply */ + CARD8 depth; + CARD16 sequenceNumber B16; + CARD32 length B32; + VisualID visual B32; + CARD32 size B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xShmGetImageReply; +#define sz_xShmGetImageReply 32 + +typedef struct _ShmCreatePixmap { + CARD8 reqType; /* always ShmReqCode */ + CARD8 shmReqType; /* always X_ShmCreatePixmap */ + CARD16 length B16; + Pixmap pid B32; + Drawable drawable B32; + CARD16 width B16; + CARD16 height B16; + CARD8 depth; + CARD8 pad0; + CARD8 pad1; + CARD8 pad2; + ShmSeg shmseg B32; + CARD32 offset B32; +} xShmCreatePixmapReq; +#define sz_xShmCreatePixmapReq 28 + +typedef struct _ShmCompletion { + BYTE type; /* always eventBase + ShmCompletion */ + BYTE bpad0; + CARD16 sequenceNumber B16; + Drawable drawable B32; + CARD16 minorEvent B16; + BYTE majorEvent; + BYTE bpad1; + ShmSeg shmseg B32; + CARD32 offset B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; +} xShmCompletionEvent; +#define sz_xShmCompletionEvent 32 + +#undef ShmSeg +#undef Drawable +#undef VisualID +#undef GContext +#undef Pixmap + +#endif /* _SHMSTR_H_ */ diff --git a/X11/extensions/sync.h b/X11/extensions/sync.h new file mode 100644 index 000000000..9fbe6d72f --- /dev/null +++ b/X11/extensions/sync.h @@ -0,0 +1,469 @@ +/* $Xorg: sync.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1991, 1993, 1994, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/*********************************************************** +Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, +and Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 names of Digital or Olivetti +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THEY 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. + +******************************************************************/ +/* $XFree86: xc/include/extensions/sync.h,v 1.4 2001/12/20 19:40:59 tsi Exp $ */ + +#ifndef _SYNC_H_ +#define _SYNC_H_ + +#include + +_XFUNCPROTOBEGIN + +#define SYNC_NAME "SYNC" + +#define SYNC_MAJOR_VERSION 3 +#define SYNC_MINOR_VERSION 0 + +#define X_SyncInitialize 0 +#define X_SyncListSystemCounters 1 +#define X_SyncCreateCounter 2 +#define X_SyncSetCounter 3 +#define X_SyncChangeCounter 4 +#define X_SyncQueryCounter 5 +#define X_SyncDestroyCounter 6 +#define X_SyncAwait 7 +#define X_SyncCreateAlarm 8 +#define X_SyncChangeAlarm 9 +#define X_SyncQueryAlarm 10 +#define X_SyncDestroyAlarm 11 +#define X_SyncSetPriority 12 +#define X_SyncGetPriority 13 + +#define XSyncCounterNotify 0 +#define XSyncAlarmNotify 1 +#define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify) + +#define XSyncNumberEvents 2L + +#define XSyncBadCounter 0L +#define XSyncBadAlarm 1L +#define XSyncNumberErrors (XSyncBadAlarm + 1) + +/* + * Flags for Alarm Attributes + */ +#define XSyncCACounter (1L<<0) +#define XSyncCAValueType (1L<<1) +#define XSyncCAValue (1L<<2) +#define XSyncCATestType (1L<<3) +#define XSyncCADelta (1L<<4) +#define XSyncCAEvents (1L<<5) + +/* + * Constants for the value_type argument of various requests + */ +typedef enum { + XSyncAbsolute, + XSyncRelative +} XSyncValueType; + +/* + * Alarm Test types + */ +typedef enum { + XSyncPositiveTransition, + XSyncNegativeTransition, + XSyncPositiveComparison, + XSyncNegativeComparison +} XSyncTestType; + +/* + * Alarm state constants + */ +typedef enum { + XSyncAlarmActive, + XSyncAlarmInactive, + XSyncAlarmDestroyed +} XSyncAlarmState; + + +typedef XID XSyncCounter; +typedef XID XSyncAlarm; +typedef struct _XSyncValue { + int hi; + unsigned int lo; +} XSyncValue; + +/* + * Macros/functions for manipulating 64 bit values + */ + +/* have to put these prototypes before the corresponding macro definitions */ + +extern void XSyncIntToValue( + XSyncValue* /*pv*/, + int /*i*/ +); + +extern void XSyncIntsToValue( + XSyncValue* /*pv*/, + unsigned int /*l*/, + int /*h*/ +); + +extern Bool XSyncValueGreaterThan( + XSyncValue /*a*/, + XSyncValue /*b*/ +); + +extern Bool XSyncValueLessThan( + XSyncValue /*a*/, + XSyncValue /*b*/ +); + +extern Bool XSyncValueGreaterOrEqual( + XSyncValue /*a*/, + XSyncValue /*b*/ +); + +extern Bool XSyncValueLessOrEqual( + XSyncValue /*a*/, + XSyncValue /*b*/ +); + +extern Bool XSyncValueEqual( + XSyncValue /*a*/, + XSyncValue /*b*/ +); + +extern Bool XSyncValueIsNegative( + XSyncValue /*v*/ +); + +extern Bool XSyncValueIsZero( + XSyncValue /*a*/ +); + +extern Bool XSyncValueIsPositive( + XSyncValue /*v*/ +); + +extern unsigned int XSyncValueLow32( + XSyncValue /*v*/ +); + +extern int XSyncValueHigh32( + XSyncValue /*v*/ +); + +extern void XSyncValueAdd( + XSyncValue* /*presult*/, + XSyncValue /*a*/, + XSyncValue /*b*/, + int* /*poverflow*/ +); + +extern void XSyncValueSubtract( + XSyncValue* /*presult*/, + XSyncValue /*a*/, + XSyncValue /*b*/, + int* /*poverflow*/ +); + +extern void XSyncMaxValue( + XSyncValue* /*pv*/ +); + +extern void XSyncMinValue( + XSyncValue* /*pv*/ +); + +_XFUNCPROTOEND + +/* The _XSync macros below are for library internal use only. They exist + * so that if we have to make a fix, we can change it in this one place + * and have both the macro and function variants inherit the fix. + */ + +#define _XSyncIntToValue(pv, i) ((pv)->hi=((i<0)?~0:0),(pv)->lo=(i)) +#define _XSyncIntsToValue(pv, l, h) ((pv)->lo = (l), (pv)->hi = (h)) +#define _XSyncValueGreaterThan(a, b)\ + ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>(b).lo)) +#define _XSyncValueLessThan(a, b)\ + ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<(b).lo)) +#define _XSyncValueGreaterOrEqual(a, b)\ + ((a).hi>(b).hi || ((a).hi==(b).hi && (a).lo>=(b).lo)) +#define _XSyncValueLessOrEqual(a, b)\ + ((a).hi<(b).hi || ((a).hi==(b).hi && (a).lo<=(b).lo)) +#define _XSyncValueEqual(a, b) ((a).lo==(b).lo && (a).hi==(b).hi) +#define _XSyncValueIsNegative(v) (((v).hi & 0x80000000) ? 1 : 0) +#define _XSyncValueIsZero(a) ((a).lo==0 && (a).hi==0) +#define _XSyncValueIsPositive(v) (((v).hi & 0x80000000) ? 0 : 1) +#define _XSyncValueLow32(v) ((v).lo) +#define _XSyncValueHigh32(v) ((v).hi) +#define _XSyncValueAdd(presult,a,b,poverflow) {\ + int t = (a).lo;\ + Bool signa = XSyncValueIsNegative(a);\ + Bool signb = XSyncValueIsNegative(b);\ + ((presult)->lo = (a).lo + (b).lo);\ + ((presult)->hi = (a).hi + (b).hi);\ + if (t>(presult)->lo) (presult)->hi++;\ + *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\ + } +#define _XSyncValueSubtract(presult,a,b,poverflow) {\ + int t = (a).lo;\ + Bool signa = XSyncValueIsNegative(a);\ + Bool signb = XSyncValueIsNegative(b);\ + ((presult)->lo = (a).lo - (b).lo);\ + ((presult)->hi = (a).hi - (b).hi);\ + if (t>(presult)->lo) (presult)->hi--;\ + *poverflow = ((signa == signb) && !(signa == XSyncValueIsNegative(*presult)));\ + } +#define _XSyncMaxValue(pv) ((pv)->hi = 0x7fffffff, (pv)->lo = 0xffffffff) +#define _XSyncMinValue(pv) ((pv)->hi = 0x80000000, (pv)->lo = 0) + +/* + * These are the publically usable macros. If you want the function version + * of one of these, just #undef the macro to uncover the function. + * (This is the same convention that the ANSI C library uses.) + */ + +#define XSyncIntToValue(pv, i) _XSyncIntToValue(pv, i) +#define XSyncIntsToValue(pv, l, h) _XSyncIntsToValue(pv, l, h) +#define XSyncValueGreaterThan(a, b) _XSyncValueGreaterThan(a, b) +#define XSyncValueLessThan(a, b) _XSyncValueLessThan(a, b) +#define XSyncValueGreaterOrEqual(a, b) _XSyncValueGreaterOrEqual(a, b) +#define XSyncValueLessOrEqual(a, b) _XSyncValueLessOrEqual(a, b) +#define XSyncValueEqual(a, b) _XSyncValueEqual(a, b) +#define XSyncValueIsNegative(v) _XSyncValueIsNegative(v) +#define XSyncValueIsZero(a) _XSyncValueIsZero(a) +#define XSyncValueIsPositive(v) _XSyncValueIsPositive(v) +#define XSyncValueLow32(v) _XSyncValueLow32(v) +#define XSyncValueHigh32(v) _XSyncValueHigh32(v) +#define XSyncValueAdd(presult,a,b,poverflow) _XSyncValueAdd(presult,a,b,poverflow) +#define XSyncValueSubtract(presult,a,b,poverflow) _XSyncValueSubtract(presult,a,b,poverflow) +#define XSyncMaxValue(pv) _XSyncMaxValue(pv) +#define XSyncMinValue(pv) _XSyncMinValue(pv) + +#ifndef _SYNC_SERVER + +typedef struct _XSyncSystemCounter { + char *name; /* null-terminated name of system counter */ + XSyncCounter counter; /* counter id of this system counter */ + XSyncValue resolution; /* resolution of this system counter */ +} XSyncSystemCounter; + + +typedef struct { + XSyncCounter counter; /* counter to trigger on */ + XSyncValueType value_type; /* absolute/relative */ + XSyncValue wait_value; /* value to compare counter to */ + XSyncTestType test_type; /* pos/neg comparison/transtion */ +} XSyncTrigger; + +typedef struct { + XSyncTrigger trigger; /* trigger for await */ + XSyncValue event_threshold; /* send event if past threshold */ +} XSyncWaitCondition; + + +typedef struct { + XSyncTrigger trigger; + XSyncValue delta; + Bool events; + XSyncAlarmState state; +} XSyncAlarmAttributes; + +/* + * Events + */ + +typedef struct { + int type; /* event base + XSyncCounterNotify */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + XSyncCounter counter; /* counter involved in await */ + XSyncValue wait_value; /* value being waited for */ + XSyncValue counter_value; /* counter value when this event was sent */ + Time time; /* milliseconds */ + int count; /* how many more events to come */ + Bool destroyed; /* True if counter was destroyed */ +} XSyncCounterNotifyEvent; + +typedef struct { + int type; /* event base + XSyncCounterNotify */ + unsigned long serial; /* # of last request processed by server */ + Bool send_event; /* true if this came from a SendEvent request */ + Display *display; /* Display the event was read from */ + XSyncAlarm alarm; /* alarm that triggered */ + XSyncValue counter_value; /* value that triggered the alarm */ + XSyncValue alarm_value; /* test value of trigger in alarm */ + Time time; /* milliseconds */ + XSyncAlarmState state; /* new state of alarm */ +} XSyncAlarmNotifyEvent; + +/* + * Errors + */ + +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XSyncAlarm alarm; /* resource id */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error base + XSyncBadAlarm */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ +} XSyncAlarmError; + +typedef struct { + int type; + Display *display; /* Display the event was read from */ + XSyncCounter counter; /* resource id */ + unsigned long serial; /* serial number of failed request */ + unsigned char error_code; /* error base + XSyncBadCounter */ + unsigned char request_code; /* Major op-code of failed request */ + unsigned char minor_code; /* Minor op-code of failed request */ +} XSyncCounterError; + +/* + * Prototypes + */ + +_XFUNCPROTOBEGIN + +extern Status XSyncQueryExtension( + Display* /*dpy*/, + int* /*event_base_return*/, + int* /*error_base_return*/ +); + +extern Status XSyncInitialize( + Display* /*dpy*/, + int* /*major_version_return*/, + int* /*minor_version_return*/ +); + +extern XSyncSystemCounter *XSyncListSystemCounters( + Display* /*dpy*/, + int* /*n_counters_return*/ +); + +extern void XSyncFreeSystemCounterList( + XSyncSystemCounter* /*list*/ +); + +extern XSyncCounter XSyncCreateCounter( + Display* /*dpy*/, + XSyncValue /*initial_value*/ +); + +extern Status XSyncSetCounter( + Display* /*dpy*/, + XSyncCounter /*counter*/, + XSyncValue /*value*/ +); + +extern Status XSyncChangeCounter( + Display* /*dpy*/, + XSyncCounter /*counter*/, + XSyncValue /*value*/ +); + +extern Status XSyncDestroyCounter( + Display* /*dpy*/, + XSyncCounter /*counter*/ +); + +extern Status XSyncQueryCounter( + Display* /*dpy*/, + XSyncCounter /*counter*/, + XSyncValue* /*value_return*/ +); + +extern Status XSyncAwait( + Display* /*dpy*/, + XSyncWaitCondition* /*wait_list*/, + int /*n_conditions*/ +); + +extern XSyncAlarm XSyncCreateAlarm( + Display* /*dpy*/, + unsigned long /*values_mask*/, + XSyncAlarmAttributes* /*values*/ +); + +extern Status XSyncDestroyAlarm( + Display* /*dpy*/, + XSyncAlarm /*alarm*/ +); + +extern Status XSyncQueryAlarm( + Display* /*dpy*/, + XSyncAlarm /*alarm*/, + XSyncAlarmAttributes* /*values_return*/ +); + +extern Status XSyncChangeAlarm( + Display* /*dpy*/, + XSyncAlarm /*alarm*/, + unsigned long /*values_mask*/, + XSyncAlarmAttributes* /*values*/ +); + +extern Status XSyncSetPriority( + Display* /*dpy*/, + XID /*client_resource_id*/, + int /*priority*/ +); + +extern Status XSyncGetPriority( + Display* /*dpy*/, + XID /*client_resource_id*/, + int* /*return_priority*/ +); + +#endif /* _SYNC_SERVER */ + +_XFUNCPROTOEND + +#endif /* _SYNC_H_ */ diff --git a/X11/extensions/syncstr.h b/X11/extensions/syncstr.h new file mode 100644 index 000000000..4e384f22e --- /dev/null +++ b/X11/extensions/syncstr.h @@ -0,0 +1,494 @@ +/* $Xorg: syncstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1991, 1993, 1994, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +/*********************************************************** +Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts, +and Olivetti Research Limited, Cambridge, England. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +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 names of Digital or Olivetti +not be used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS +SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS, IN NO EVENT SHALL THEY 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. + +******************************************************************/ +/* $XFree86: xc/include/extensions/syncstr.h,v 1.3 2003/07/16 01:38:24 dawes Exp $ */ + +#ifndef _SYNCSTR_H_ +#define _SYNCSTR_H_ + +#include "sync.h" + +#ifndef _SYNC_OS + +/* cover up types from sync.h to make sure they're the right size for + * protocol packaging. These will be undef'ed after all the protocol + * structures are defined. + */ +#define XSyncCounter CARD32 +#define XSyncAlarm CARD32 + +/* + * Initialize + */ +typedef struct _xSyncInitialize { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + CARD8 majorVersion; + CARD8 minorVersion; + CARD16 pad B16; +} xSyncInitializeReq; +#define sz_xSyncInitializeReq 8 + +typedef struct { + BYTE type; + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD8 majorVersion; + CARD8 minorVersion; + CARD16 pad B16; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xSyncInitializeReply; +#define sz_xSyncInitializeReply 32 + +/* + * ListSystemCounters + */ +typedef struct _xSyncListSystemCounters +{ + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; +} xSyncListSystemCountersReq; +#define sz_xSyncListSystemCountersReq 4 + +typedef struct { + BYTE type; + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT32 nCounters B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xSyncListSystemCountersReply; +#define sz_xSyncListSystemCountersReply 32 + +typedef struct { + XSyncCounter counter B32; + INT32 resolution_hi B32; + CARD32 resolution_lo B32; + CARD16 name_length B16; +} xSyncSystemCounter; +#define sz_xSyncSystemCounter 14 + +/* + * Create Counter + */ +typedef struct _xSyncCreateCounterReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncCounter cid B32; + INT32 initial_value_hi B32; + CARD32 initial_value_lo B32; +} xSyncCreateCounterReq; +#define sz_xSyncCreateCounterReq 16 + +/* + * Change Counter + */ +typedef struct _xSyncChangeCounterReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncCounter cid B32; + INT32 value_hi B32; + CARD32 value_lo B32; +} xSyncChangeCounterReq; +#define sz_xSyncChangeCounterReq 16 + +/* + * Set Counter + */ +typedef struct _xSyncSetCounterReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncCounter cid B32; + INT32 value_hi B32; + CARD32 value_lo B32; +} xSyncSetCounterReq; +#define sz_xSyncSetCounterReq 16 + +/* + * Destroy Counter + */ +typedef struct _xSyncDestroyCounterReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncCounter counter B32; +} xSyncDestroyCounterReq; +#define sz_xSyncDestroyCounterReq 8 + +/* + * Query Counter + */ +typedef struct _xSyncQueryCounterReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncCounter counter B32; +} xSyncQueryCounterReq; +#define sz_xSyncQueryCounterReq 8 + + +typedef struct { + BYTE type; + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT32 value_hi B32; + CARD32 value_lo B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xSyncQueryCounterReply; +#define sz_xSyncQueryCounterReply 32 + +/* + * Await + */ +typedef struct _xSyncAwaitReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; +} xSyncAwaitReq; +#define sz_xSyncAwaitReq 4 + +typedef struct _xSyncWaitCondition { + XSyncCounter counter B32; + CARD32 value_type B32; + INT32 wait_value_hi B32; + CARD32 wait_value_lo B32; + CARD32 test_type B32; + INT32 event_threshold_hi B32; + CARD32 event_threshold_lo B32; +} xSyncWaitCondition; +#define sz_xSyncWaitCondition 28 + +/* + * Create Alarm + */ +typedef struct _xSyncCreateAlarmReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncAlarm id B32; + CARD32 valueMask B32; +} xSyncCreateAlarmReq; +#define sz_xSyncCreateAlarmReq 12 + +/* + * Destroy Alarm + */ +typedef struct _xSyncDestroyAlarmReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncAlarm alarm B32; +} xSyncDestroyAlarmReq; +#define sz_xSyncDestroyAlarmReq 8 + +/* + * Query Alarm + */ +typedef struct _xSyncQueryAlarmReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncAlarm alarm B32; +} xSyncQueryAlarmReq; +#define sz_xSyncQueryAlarmReq 8 + +typedef struct { + BYTE type; + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + XSyncCounter counter B32; + CARD32 value_type B32; + INT32 wait_value_hi B32; + CARD32 wait_value_lo B32; + CARD32 test_type B32; + INT32 delta_hi B32; + CARD32 delta_lo B32; + BOOL events; + BYTE state; + BYTE pad0; + BYTE pad1; +} xSyncQueryAlarmReply; +#define sz_xSyncQueryAlarmReply 40 + +/* + * Change Alarm + */ +typedef struct _xSyncChangeAlarmReq { + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + XSyncAlarm alarm B32; + CARD32 valueMask B32; +} xSyncChangeAlarmReq; +#define sz_xSyncChangeAlarmReq 12 + +/* + * SetPriority + */ +typedef struct _xSyncSetPriority{ + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + CARD32 id B32; + INT32 priority B32; +} xSyncSetPriorityReq; +#define sz_xSyncSetPriorityReq 12 + +/* + * Get Priority + */ +typedef struct _xSyncGetPriority{ + CARD8 reqType; + CARD8 syncReqType; + CARD16 length B16; + CARD32 id B32; /*XXX XID? */ +} xSyncGetPriorityReq; +#define sz_xSyncGetPriorityReq 8 + +typedef struct { + BYTE type; + CARD8 unused; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT32 priority B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xSyncGetPriorityReply; +#define sz_xSyncGetPriorityReply 32 + +/* + * Events + */ + +typedef struct _xSyncCounterNotifyEvent { + BYTE type; + BYTE kind; + CARD16 sequenceNumber B16; + XSyncCounter counter B32; + INT32 wait_value_hi B32; + CARD32 wait_value_lo B32; + INT32 counter_value_hi B32; + CARD32 counter_value_lo B32; + CARD32 time B32; + CARD16 count B16; + BOOL destroyed; + BYTE pad0; +} xSyncCounterNotifyEvent; + +typedef struct _xSyncAlarmNotifyEvent { + BYTE type; + BYTE kind; + CARD16 sequenceNumber B16; + XSyncAlarm alarm B32; + INT32 counter_value_hi B32; + CARD32 counter_value_lo B32; + INT32 alarm_value_hi B32; + CARD32 alarm_value_lo B32; + CARD32 time B32; + CARD8 state; + BYTE pad0; + BYTE pad1; + BYTE pad2; +} xSyncAlarmNotifyEvent; + +#undef XSyncCounter +#undef XSyncAlarm + +#endif /* _SYNC_OS */ + +#ifdef _SYNC_SERVER + +#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */ + +typedef struct _SyncCounter { + ClientPtr client; /* Owning client. 0 for system counters */ + XSyncCounter id; /* resource ID */ + CARD64 value; /* counter value */ + struct _SyncTriggerList *pTriglist; /* list of triggers */ + Bool beingDestroyed; /* in process of going away */ + struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */ +} SyncCounter; + +/* + * The System Counter interface + */ + +typedef enum { + XSyncCounterNeverChanges, + XSyncCounterNeverIncreases, + XSyncCounterNeverDecreases, + XSyncCounterUnrestricted +} SyncCounterType; + +typedef struct _SysCounterInfo { + char *name; + CARD64 resolution; + CARD64 bracket_greater; + CARD64 bracket_less; + SyncCounterType counterType; /* how can this counter change */ + void (*QueryValue)( + pointer /*pCounter*/, + CARD64 * /*freshvalue*/ +); + void (*BracketValues)( + pointer /*pCounter*/, + CARD64 * /*lessthan*/, + CARD64 * /*greaterthan*/ +); +} SysCounterInfo; + + + +typedef struct _SyncTrigger { + SyncCounter *pCounter; + CARD64 wait_value; /* wait value */ + unsigned int value_type; /* Absolute or Relative */ + unsigned int test_type; /* transition or Comparision type */ + CARD64 test_value; /* trigger event threshold value */ + Bool (*CheckTrigger)( + struct _SyncTrigger * /*pTrigger*/, + CARD64 /*newval*/ + ); + void (*TriggerFired)( + struct _SyncTrigger * /*pTrigger*/ + ); + void (*CounterDestroyed)( + struct _SyncTrigger * /*pTrigger*/ + ); +} SyncTrigger; + +typedef struct _SyncTriggerList { + SyncTrigger *pTrigger; + struct _SyncTriggerList *next; +} SyncTriggerList; + +typedef struct _SyncAlarmClientList { + ClientPtr client; + XID delete_id; + struct _SyncAlarmClientList *next; +} SyncAlarmClientList; + +typedef struct _SyncAlarm { + SyncTrigger trigger; + ClientPtr client; + XSyncAlarm alarm_id; + CARD64 delta; + int events; + int state; + SyncAlarmClientList *pEventClients; +} SyncAlarm; + +typedef struct { + ClientPtr client; + CARD32 delete_id; + int num_waitconditions; +} SyncAwaitHeader; + +typedef struct { + SyncTrigger trigger; + CARD64 event_threshold; + SyncAwaitHeader *pHeader; +} SyncAwait; + +typedef union { + SyncAwaitHeader header; + SyncAwait await; +} SyncAwaitUnion; + + +extern pointer SyncCreateSystemCounter( + char * /* name */, + CARD64 /* inital_value */, + CARD64 /* resolution */, + SyncCounterType /* change characterization */, + void (* /*QueryValue*/ ) ( + pointer /* pCounter */, + CARD64 * /* pValue_return */), /* XXX prototype */ + void (* /*BracketValues*/) ( + pointer /* pCounter */, + CARD64 * /* pbracket_less */, + CARD64 * /* pbracket_greater */) +); + +extern void SyncChangeCounter( + SyncCounter * /* pCounter*/, + CARD64 /* new_value */ +); + +extern void SyncDestroySystemCounter( + pointer pCounter +); +extern void InitServertime(void); + +#endif /* _SYNC_SERVER */ + +#endif /* _SYNCSTR_H_ */ diff --git a/X11/extensions/xcmiscproto.pc.in b/X11/extensions/xcmiscproto.pc.in new file mode 100644 index 000000000..86b030a69 --- /dev/null +++ b/X11/extensions/xcmiscproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: XCMiscProto +Description: XCMisc extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/xcmiscstr.h b/X11/extensions/xcmiscstr.h new file mode 100644 index 000000000..2aa45e617 --- /dev/null +++ b/X11/extensions/xcmiscstr.h @@ -0,0 +1,112 @@ +/* $Xorg: xcmiscstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1993, 1994, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ +/* $XFree86$ */ + +#ifndef _XCMISCSTR_H_ +#define _XCMISCSTR_H_ + +#define X_XCMiscGetVersion 0 +#define X_XCMiscGetXIDRange 1 +#define X_XCMiscGetXIDList 2 + +#define XCMiscNumberEvents 0 + +#define XCMiscNumberErrors 0 + +#define XCMiscMajorVersion 1 +#define XCMiscMinorVersion 1 + +#define XCMiscExtensionName "XC-MISC" + +typedef struct { + CARD8 reqType; /* always XCMiscCode */ + CARD8 miscReqType; /* always X_XCMiscGetVersion */ + CARD16 length B16; + CARD16 majorVersion B16; + CARD16 minorVersion B16; +} xXCMiscGetVersionReq; +#define sz_xXCMiscGetVersionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 majorVersion B16; + CARD16 minorVersion B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXCMiscGetVersionReply; +#define sz_xXCMiscGetVersionReply 32 + +typedef struct { + CARD8 reqType; /* always XCMiscCode */ + CARD8 miscReqType; /* always X_XCMiscGetXIDRange */ + CARD16 length B16; +} xXCMiscGetXIDRangeReq; +#define sz_xXCMiscGetXIDRangeReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 start_id B32; + CARD32 count B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xXCMiscGetXIDRangeReply; +#define sz_xXCMiscGetXIDRangeReply 32 + +typedef struct { + CARD8 reqType; /* always XCMiscCode */ + CARD8 miscReqType; /* always X_XCMiscGetXIDList */ + CARD16 length B16; + CARD32 count B32; /* number of IDs requested */ +} xXCMiscGetXIDListReq; +#define sz_xXCMiscGetXIDListReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 pad0; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 count B32; /* number of IDs requested */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXCMiscGetXIDListReply; +#define sz_xXCMiscGetXIDListReply 32 + +#endif /* _XCMISCSTR_H_ */ diff --git a/X11/extensions/xextproto.pc.in b/X11/extensions/xextproto.pc.in new file mode 100644 index 000000000..e85200fde --- /dev/null +++ b/X11/extensions/xextproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: XExtProto +Description: XExt extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/X11/extensions/xfixesproto.h b/X11/extensions/xfixesproto.h new file mode 100644 index 000000000..d3899810a --- /dev/null +++ b/X11/extensions/xfixesproto.h @@ -0,0 +1,520 @@ +/* + * $XFree86: xc/include/extensions/xfixesproto.h,v 1.1 2002/11/30 06:21:43 keithp Exp $ + * + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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. + * + * Copyright © 2002 Keith Packard, member of The XFree86 Project, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifndef _XFIXESPROTO_H_ +#define _XFIXESPROTO_H_ + +#include +#include +#define _SHAPE_SERVER_ +#include +#undef _SHAPE_SERVER_ + +#define Window CARD32 +#define Drawable CARD32 +#define Font CARD32 +#define Pixmap CARD32 +#define Cursor CARD32 +#define Colormap CARD32 +#define GContext CARD32 +#define Atom CARD32 +#define VisualID CARD32 +#define Time CARD32 +#define KeyCode CARD8 +#define KeySym CARD32 +#define Picture CARD32 + +/*************** Version 1 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesReq; + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xXFixesQueryVersionReq; + +#define sz_xXFixesQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXFixesQueryVersionReply; + +#define sz_xXFixesQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + BYTE mode; /* SetModeInsert/SetModeDelete*/ + BYTE target; /* SaveSetNearest/SaveSetRoot*/ + BYTE map; /* SaveSetMap/SaveSetUnmap */ + BYTE pad1; + Window window; +} xXFixesChangeSaveSetReq; + +#define sz_xXFixesChangeSaveSetReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + Atom selection B32; + CARD32 eventMask B32; +} xXFixesSelectSelectionInputReq; + +#define sz_xXFixesSelectSelectionInputReq 16 + +typedef struct { + CARD8 type; + CARD8 subtype; + CARD16 sequenceNumber B16; + Window window B32; + Window owner B32; + Atom selection B32; + Time timestamp B32; + Time selectionTimestamp B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesSelectionNotifyEvent; + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; + CARD32 eventMask B32; +} xXFixesSelectCursorInputReq; + +#define sz_xXFixesSelectCursorInputReq 12 + +typedef struct { + CARD8 type; + CARD8 subtype; + CARD16 sequenceNumber B16; + Window window B32; + CARD32 cursorSerial B32; + Time timestamp; + Atom name B32; /* Version 2 */ + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesCursorNotifyEvent; + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesGetCursorImageReq; + +#define sz_xXFixesGetCursorImageReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 xhot B16; + CARD16 yhot B16; + CARD32 cursorSerial B32; + CARD32 pad2 B32; + CARD32 pad3 B32; +} xXFixesGetCursorImageReply; + +#define sz_xXFixesGetCursorImageReply 32 + +/*************** Version 2 ******************/ + +#define Region CARD32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + /* LISTofRECTANGLE */ +} xXFixesCreateRegionReq; + +#define sz_xXFixesCreateRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Pixmap bitmap B32; +} xXFixesCreateRegionFromBitmapReq; + +#define sz_xXFixesCreateRegionFromBitmapReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Window window B32; + CARD8 kind; + CARD8 pad1; + CARD16 pad2 B16; +} xXFixesCreateRegionFromWindowReq; + +#define sz_xXFixesCreateRegionFromWindowReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + GContext gc B32; +} xXFixesCreateRegionFromGCReq; + +#define sz_xXFixesCreateRegionFromGCReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + Picture picture B32; +} xXFixesCreateRegionFromPictureReq; + +#define sz_xXFixesCreateRegionFromPictureReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; +} xXFixesDestroyRegionReq; + +#define sz_xXFixesDestroyRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + /* LISTofRECTANGLE */ +} xXFixesSetRegionReq; + +#define sz_xXFixesSetRegionReq 8 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; +} xXFixesCopyRegionReq; + +#define sz_xXFixesCopyRegionReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source1 B32; + Region source2 B32; + Region destination B32; +} xXFixesCombineRegionReq, + xXFixesUnionRegionReq, + xXFixesIntersectRegionReq, + xXFixesSubtractRegionReq; + +#define sz_xXFixesCombineRegionReq 16 +#define sz_xXFixesUnionRegionReq sz_xXFixesCombineRegionReq +#define sz_xXFixesIntersectRegionReq sz_xXFixesCombineRegionReq +#define sz_xXFixesSubtractRegionReq sz_xXFixesCombineRegionReq + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + Region destination B32; +} xXFixesInvertRegionReq; + +#define sz_xXFixesInvertRegionReq 20 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; + INT16 dx B16, dy B16; +} xXFixesTranslateRegionReq; + +#define sz_xXFixesTranslateRegionReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; +} xXFixesRegionExtentsReq; + +#define sz_xXFixesRegionExtentsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region region B32; +} xXFixesFetchRegionReq; + +#define sz_xXFixesFetchRegionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16, y B16; + CARD16 width B16, height B16; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXFixesFetchRegionReply; + +#define sz_xXFixesFetchRegionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + GContext gc B32; + Region region B32; + INT16 xOrigin B16, yOrigin B16; +} xXFixesSetGCClipRegionReq; + +#define sz_xXFixesSetGCClipRegionReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window dest; + BYTE destKind; + CARD8 pad1; + CARD16 pad2 B16; + INT16 xOff B16, yOff B16; + Region region; +} xXFixesSetWindowShapeRegionReq; + +#define sz_xXFixesSetWindowShapeRegionReq 20 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Picture picture B32; + Region region B32; + INT16 xOrigin B16, yOrigin B16; +} xXFixesSetPictureClipRegionReq; + +#define sz_xXFixesSetPictureClipRegionReq 16 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor cursor B32; + CARD16 nbytes B16; + CARD16 pad B16; +} xXFixesSetCursorNameReq; + +#define sz_xXFixesSetCursorNameReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor cursor B32; +} xXFixesGetCursorNameReq; + +#define sz_xXFixesGetCursorNameReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + Atom atom B32; + CARD16 nbytes B16; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xXFixesGetCursorNameReply; + +#define sz_xXFixesGetCursorNameReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; +} xXFixesGetCursorImageAndNameReq; + +#define sz_xXFixesGetCursorImageAndNameReq 4 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + INT16 x B16; + INT16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 xhot B16; + CARD16 yhot B16; + CARD32 cursorSerial B32; + Atom cursorName B32; + CARD16 nbytes B16; + CARD16 pad B16; +} xXFixesGetCursorImageAndNameReply; + +#define sz_xXFixesGetCursorImageAndNameReply 32 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor source B32; + Cursor destination B32; +} xXFixesChangeCursorReq; + +#define sz_xXFixesChangeCursorReq 12 + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Cursor source B32; + CARD16 nbytes; + CARD16 pad; +} xXFixesChangeCursorByNameReq; + +#define sz_xXFixesChangeCursorByNameReq 12 + +/*************** Version 3 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Region source B32; + Region destination B32; + CARD16 left B16; + CARD16 right B16; + CARD16 top B16; + CARD16 bottom B16; +} xXFixesExpandRegionReq; + +#define sz_xXFixesExpandRegionReq 20 + +/*************** Version 4.0 ******************/ + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; +} xXFixesHideCursorReq; + +#define sz_xXFixesHideCursorReq sizeof(xXFixesHideCursorReq) + +typedef struct { + CARD8 reqType; + CARD8 xfixesReqType; + CARD16 length B16; + Window window B32; +} xXFixesShowCursorReq; + +#define sz_xXFixesShowCursorReq sizeof(xXFixesShowCursorReq) + +#undef Region +#undef Picture +#undef Window +#undef Drawable +#undef Font +#undef Pixmap +#undef Cursor +#undef Colormap +#undef GContext +#undef Atom +#undef VisualID +#undef Time +#undef KeyCode +#undef KeySym + +#endif /* _XFIXESPROTO_H_ */ diff --git a/X11/extensions/xfixeswire.h b/X11/extensions/xfixeswire.h new file mode 100644 index 000000000..e9bb5f5d0 --- /dev/null +++ b/X11/extensions/xfixeswire.h @@ -0,0 +1,127 @@ +/* + * $XFree86: xc/include/extensions/xfixeswire.h,v 1.1 2002/11/30 06:21:43 keithp Exp $ + * + * Copyright © 2006 Sun Microsystems + * + * 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 Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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. + * + * Copyright © 2002 Keith Packard, member of The XFree86 Project, 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 Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + + +#ifndef _XFIXESWIRE_H_ +#define _XFIXESWIRE_H_ + +#define XFIXES_NAME "XFIXES" +#define XFIXES_MAJOR 4 +#define XFIXES_MINOR 0 + +/*************** Version 1 ******************/ +#define X_XFixesQueryVersion 0 +#define X_XFixesChangeSaveSet 1 +#define X_XFixesSelectSelectionInput 2 +#define X_XFixesSelectCursorInput 3 +#define X_XFixesGetCursorImage 4 +/*************** Version 2 ******************/ +#define X_XFixesCreateRegion 5 +#define X_XFixesCreateRegionFromBitmap 6 +#define X_XFixesCreateRegionFromWindow 7 +#define X_XFixesCreateRegionFromGC 8 +#define X_XFixesCreateRegionFromPicture 9 +#define X_XFixesDestroyRegion 10 +#define X_XFixesSetRegion 11 +#define X_XFixesCopyRegion 12 +#define X_XFixesUnionRegion 13 +#define X_XFixesIntersectRegion 14 +#define X_XFixesSubtractRegion 15 +#define X_XFixesInvertRegion 16 +#define X_XFixesTranslateRegion 17 +#define X_XFixesRegionExtents 18 +#define X_XFixesFetchRegion 19 +#define X_XFixesSetGCClipRegion 20 +#define X_XFixesSetWindowShapeRegion 21 +#define X_XFixesSetPictureClipRegion 22 +#define X_XFixesSetCursorName 23 +#define X_XFixesGetCursorName 24 +#define X_XFixesGetCursorImageAndName 25 +#define X_XFixesChangeCursor 26 +#define X_XFixesChangeCursorByName 27 +/*************** Version 3 ******************/ +#define X_XFixesExpandRegion 28 +/*************** Version 4 ******************/ +#define X_XFixesHideCursor 29 +#define X_XFixesShowCursor 30 + +#define XFixesNumberRequests (X_XFixesShowCursor+1) + +/* Selection events share one event number */ +#define XFixesSelectionNotify 0 + +/* Within the selection, the 'subtype' field distinguishes */ +#define XFixesSetSelectionOwnerNotify 0 +#define XFixesSelectionWindowDestroyNotify 1 +#define XFixesSelectionClientCloseNotify 2 + +#define XFixesSetSelectionOwnerNotifyMask (1L << 0) +#define XFixesSelectionWindowDestroyNotifyMask (1L << 1) +#define XFixesSelectionClientCloseNotifyMask (1L << 2) + +/* There's only one cursor event so far */ +#define XFixesCursorNotify 1 + +#define XFixesDisplayCursorNotify 0 + +#define XFixesDisplayCursorNotifyMask (1L << 0) + +#define XFixesNumberEvents (2) + +/* errors */ +#define BadRegion 0 +#define XFixesNumberErrors (BadRegion+1) + +#define SaveSetNearest 0 +#define SaveSetRoot 1 + +#define SaveSetMap 0 +#define SaveSetUnmap 1 + +/*************** Version 2 ******************/ + +#define WindowRegionBounding 0 +#define WindowRegionClip 1 + +#endif /* _XFIXESWIRE_H_ */ diff --git a/X11/extensions/xtestext1.h b/X11/extensions/xtestext1.h new file mode 100644 index 000000000..8f49cad07 --- /dev/null +++ b/X11/extensions/xtestext1.h @@ -0,0 +1,326 @@ +/* $Xorg: xtestext1.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + * xtestext1.h + * + * X11 Input Synthesis Extension include file + */ + +/* + + +Copyright 1986, 1987, 1988, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, 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 Hewlett-Packard not be used in +advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +Hewlett-Packard makes no representations about the +suitability of this software for any purpose. It is provided +"as is" without express or implied warranty. + +This software is not subject to any license of the American +Telephone and Telegraph Company or of the Regents of the +University of California. + +*/ + +/* + * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h + */ + +/* + * used in the XTestPressButton and XTestPressKey functions + */ +#define XTestPRESS 1 << 0 +#define XTestRELEASE 1 << 1 +#define XTestSTROKE 1 << 2 + +/* + * When doing a key or button stroke, the number of milliseconds + * to delay between the press and the release of a key or button + * in the XTestPressButton and XTestPressKey functions. + */ + +#define XTestSTROKE_DELAY_TIME 10 + +/* + * used in the XTestGetInput function + */ +#define XTestEXCLUSIVE 1 << 0 +#define XTestPACKED_ACTIONS 1 << 1 +#define XTestPACKED_MOTION 1 << 2 + +/* + * used in the XTestFakeInput function + */ +#define XTestFAKE_ACK_NOT_NEEDED 0 +#define XTestFAKE_ACK_REQUEST 1 + +/* + * used in the XTest extension initialization routine + */ +#define XTestEXTENSION_NAME "XTestExtension1" +#define XTestEVENT_COUNT 2 + +/* + * XTest request type values + * + * used in the XTest extension protocol requests + */ +#define X_TestFakeInput 1 +#define X_TestGetInput 2 +#define X_TestStopInput 3 +#define X_TestReset 4 +#define X_TestQueryInputSize 5 + +/* + * This defines the maximum size of a list of input actions + * to be sent to the server. It should always be a multiple of + * 4 so that the entire xTestFakeInputReq structure size is a + * multiple of 4. + */ +#define XTestMAX_ACTION_LIST_SIZE 64 + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 XTestReqType; /* always X_TestFakeInput */ + CARD16 length B16; /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */ + CARD32 ack B32; + CARD8 action_list[XTestMAX_ACTION_LIST_SIZE]; +} xTestFakeInputReq; +#define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8) + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 XTestReqType; /* always X_TestGetInput */ + CARD16 length B16; /* 2 */ + CARD32 mode B32; +} xTestGetInputReq; +#define sz_xTestGetInputReq 8 + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 XTestReqType; /* always X_TestStopInput */ + CARD16 length B32; /* 1 */ +} xTestStopInputReq; +#define sz_xTestStopInputReq 4 + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 XTestReqType; /* always X_TestReset */ + CARD16 length B16; /* 1 */ +} xTestResetReq; +#define sz_xTestResetReq 4 + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 XTestReqType; /* always X_TestQueryInputSize */ + CARD16 length B16; /* 1 */ +} xTestQueryInputSizeReq; +#define sz_xTestQueryInputSizeReq 4 + +/* + * This is the definition of the reply for the xTestQueryInputSize + * request. It should remain the same minimum size as other replies + * (32 bytes). + */ +typedef struct { + CARD8 type; /* always X_Reply */ + CARD8 pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; /* always 0 */ + CARD32 size_return B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xTestQueryInputSizeReply; + +/* + * This is the definition for the input action wire event structure. + * This event is sent to the client when the server has one or + * more user input actions to report to the client. It must + * remain the same size as all other wire events (32 bytes). + */ +#define XTestACTIONS_SIZE 28 + +typedef struct { + CARD8 type; /* always XTestInputActionType */ + CARD8 pad00; + CARD16 sequenceNumber B16; + CARD8 actions[XTestACTIONS_SIZE]; +} xTestInputActionEvent; + +/* + * This is the definition for the xTestFakeAck wire event structure. + * This event is sent to the client when the server has completely + * processed its input action buffer, and is ready for more. + * It must remain the same size as all other wire events (32 bytes). + */ +typedef struct { + CARD8 type; /* always XTestFakeAckType */ + CARD8 pad00; + CARD16 sequenceNumber B16; + CARD32 pad02 B32; + CARD32 pad03 B32; + CARD32 pad04 B32; + CARD32 pad05 B32; + CARD32 pad06 B32; + CARD32 pad07 B32; + CARD32 pad08 B32; +} xTestFakeAckEvent; + +/* + * The server side of this extension does not (and should not) have + * definitions for Display and Window. The ifndef allows the server + * side of the extension to ignore the following typedefs. + */ +#ifndef XTestSERVER_SIDE +/* + * This is the definition for the input action host format event structure. + * This is the form that a client using this extension will see when + * it receives an input action event. + */ +typedef struct { + int type; /* always XTestInputActionType */ + Display *display; + Window window; + CARD8 actions[XTestACTIONS_SIZE]; +} XTestInputActionEvent; + +/* + * This is the definition for the xTestFakeAck host format event structure. + * This is the form that a client using this extension will see when + * it receives an XTestFakeAck event. + */ +typedef struct { + int type; /* always XTestFakeAckType */ + Display *display; + Window window; +} XTestFakeAckEvent; +#endif + +/* + * This is the definition for the format of the header byte + * in the input action structures. + */ +#define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */ +#define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */ +#define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */ +#define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */ +#define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */ + +#define XTestMAX_DEVICE_ID 0x0f +#define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4) +#define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4) + +/* + * These are the possible action types. + */ +#define XTestDELAY_ACTION 0 +#define XTestKEY_ACTION 1 +#define XTestMOTION_ACTION 2 +#define XTestJUMP_ACTION 3 + +/* + * These are the definitions for key/button motion input actions. + */ +#define XTestKEY_UP 0x04 +#define XTestKEY_DOWN 0x00 + +typedef struct { + CARD8 header; /* which device, key up/down */ + CARD8 keycode; /* which key/button to move */ + CARD16 delay_time B16; /* how long to delay (in ms) */ +} XTestKeyInfo; + +/* + * This is the definition for pointer jump input actions. + */ +typedef struct { + CARD8 header; /* which pointer */ + CARD8 pad1; /* unused padding byte */ + CARD16 jumpx B16; /* x coord to jump to */ + CARD16 jumpy B16; /* y coord to jump to */ + CARD16 delay_time B16; /* how long to delay (in ms) */ +} XTestJumpInfo; + +/* + * These are the definitions for pointer relative motion input + * actions. + * + * The sign bits for the x and y relative motions are contained + * in the header byte. The x and y relative motions are packed + * into one byte to make things fit in 32 bits. If the relative + * motion range is larger than +/-15, use the pointer jump action. + */ +#define XTestMOTION_MAX 15 +#define XTestMOTION_MIN -15 + +#define XTestX_NEGATIVE 0x04 +#define XTestY_NEGATIVE 0x08 + +#define XTestX_MOTION_MASK 0x0f +#define XTestY_MOTION_MASK 0xf0 + +#define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK) +#define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK) + +#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK) +#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4) + +typedef struct { + CARD8 header; /* which pointer */ + CARD8 motion_data; /* x,y relative motion */ + CARD16 delay_time B16; /* how long to delay (in ms) */ +} XTestMotionInfo; + +/* + * These are the definitions for a long delay input action. It is + * used when more than XTestSHORT_DELAY_TIME milliseconds of delay + * (approximately one minute) is needed. + * + * The device ID for a delay is always set to XTestDELAY_DEVICE_ID. + * This guarantees that a header byte with a value of 0 is not + * a valid header, so it can be used as a flag to indicate that + * there are no more input actions in an XTestInputAction event. + */ + +#define XTestSHORT_DELAY_TIME 0xffff +#define XTestDELAY_DEVICE_ID 0x0f + +typedef struct { + CARD8 header; /* always XTestDELAY_DEVICE_ID */ + CARD8 pad1; /* unused padding byte */ + CARD16 pad2 B16; /* unused padding word */ + CARD32 delay_time B32; /* how long to delay (in ms) */ +} XTestDelayInfo; diff --git a/X11/extensions/xteststr.h b/X11/extensions/xteststr.h new file mode 100644 index 000000000..a196b775d --- /dev/null +++ b/X11/extensions/xteststr.h @@ -0,0 +1,120 @@ +/* $Xorg: xteststr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */ +/* + +Copyright 1992, 1998 The Open Group + +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. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + +*/ + +#ifndef _XTESTSTR_H_ +#define _XTESTSTR_H_ + +#define Window CARD32 +#define Time CARD32 +#define Cursor CARD32 + +#define XTestCurrentCursor ((Cursor)1) + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 xtReqType; /* always X_XTestGetVersion */ + CARD16 length B16; + CARD8 majorVersion; + CARD8 pad; + CARD16 minorVersion B16; +} xXTestGetVersionReq; +#define sz_xXTestGetVersionReq 8 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 majorVersion; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD16 minorVersion B16; + CARD16 pad0 B16; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXTestGetVersionReply; +#define sz_xXTestGetVersionReply 32 + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 xtReqType; /* always X_XTestCompareCursor */ + CARD16 length B16; + Window window B32; + Cursor cursor B32; +} xXTestCompareCursorReq; +#define sz_xXTestCompareCursorReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BOOL same; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad0 B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xXTestCompareCursorReply; +#define sz_xXTestCompareCursorReply 32 + +/* used only on the client side */ +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 xtReqType; /* always X_XTestFakeInput */ + CARD16 length B16; + BYTE type; + BYTE detail; + CARD16 pad0 B16; + Time time B32; + Window root B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + INT16 rootX B16, rootY B16; + CARD32 pad3 B32; + CARD16 pad4 B16; + CARD8 pad5; + CARD8 deviceid; +} xXTestFakeInputReq; +#define sz_xXTestFakeInputReq 36 + +typedef struct { + CARD8 reqType; /* always XTestReqCode */ + CARD8 xtReqType; /* always X_XTestGrabControl */ + CARD16 length B16; + BOOL impervious; + CARD8 pad0; + CARD8 pad1; + CARD8 pad2; +} xXTestGrabControlReq; +#define sz_xXTestGrabControlReq 8 + +#undef Window +#undef Time +#undef Cursor + +#endif /* _XTESTSTR_H_ */ -- cgit v1.2.3