Merge xextproto

This commit is contained in:
Keith Packard 2017-12-13 15:12:27 -08:00
commit 8ce4bff36c
57 changed files with 22537 additions and 0 deletions

78
.gitignore vendored Normal file
View file

@ -0,0 +1,78 @@
#
# X.Org module default exclusion patterns
# The next section if for module specific patterns
#
# Do not edit the following section
# GNU Build System (Autotools)
aclocal.m4
autom4te.cache/
autoscan.log
ChangeLog
compile
config.guess
config.h
config.h.in
config.log
config-ml.in
config.py
config.status
config.status.lineno
config.sub
configure
configure.scan
depcomp
.deps/
INSTALL
install-sh
.libs/
libtool
libtool.m4
ltmain.sh
lt~obsolete.m4
ltoptions.m4
ltsugar.m4
ltversion.m4
Makefile
Makefile.in
mdate-sh
missing
mkinstalldirs
*.pc
py-compile
stamp-h?
symlink-tree
texinfo.tex
ylwrap
# Do not edit the following section
# Edit Compile Debug Document Distribute
*~
*.[0-9]
*.[0-9]x
*.bak
*.bin
core
*.dll
*.exe
*-ISO*.bdf
*-JIS*.bdf
*-KOI8*.bdf
*.kld
*.ko
*.ko.cmd
*.lai
*.l[oa]
*.[oa]
*.obj
*.patch
*.so
*.pcf.gz
*.pdb
*.tar.bz2
*.tar.gz
#
# Add & Override patterns for xextproto
#
# Edit the following section as needed
# For example, !report.pc overrides *.pc. See 'man gitignore'
#

201
COPYING Normal file
View file

@ -0,0 +1,201 @@
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.
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.

36
EVI.h Normal file
View file

@ -0,0 +1,36 @@
/************************************************************
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.
********************************************************/
#ifndef _EVI_H_
#define _EVI_H_
#define XEVI_TRANSPARENCY_NONE 0
#define XEVI_TRANSPARENCY_PIXEL 1
#define XEVI_TRANSPARENCY_MASK 2
#define EVINAME "Extended-Visual-Information"
#define XEVI_MAJOR_VERSION 1 /* current version numbers */
#define XEVI_MINOR_VERSION 0
#endif

96
EVIproto.h Normal file
View file

@ -0,0 +1,96 @@
/************************************************************
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.
********************************************************/
#ifndef _EVIPROTO_H_
#define _EVIPROTO_H_
#include <X11/extensions/EVI.h>
#define X_EVIQueryVersion 0
#define X_EVIGetVisualInfo 1
#define VisualID CARD32
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 /* _EVIPROTO_H_ */

59
Makefile.am Normal file
View file

@ -0,0 +1,59 @@
SUBDIRS=specs
xextdir = $(includedir)/X11/extensions
xext_HEADERS = \
dpmsconst.h \
dpmsproto.h \
ge.h \
geproto.h \
lbx.h \
lbxproto.h \
mitmiscconst.h \
mitmiscproto.h \
multibufconst.h \
multibufproto.h \
secur.h \
securproto.h \
shapeconst.h \
shapeproto.h \
shm.h \
shmproto.h \
syncconst.h \
syncproto.h \
ag.h \
agproto.h \
cup.h \
cupproto.h \
dbe.h \
dbeproto.h \
EVI.h \
EVIproto.h \
xtestext1proto.h \
xtestext1const.h \
xtestconst.h \
xtestproto.h
#
# These headers allow old servers to be built with
# new headers
#
compatdir = $(xextdir)
compat_HEADERS = \
shapestr.h \
shmstr.h \
syncstr.h
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = xextproto.pc
MAINTAINERCLEANFILES = ChangeLog INSTALL
.PHONY: ChangeLog INSTALL
INSTALL:
$(INSTALL_CMD)
ChangeLog:
$(CHANGELOG_CMD)
dist-hook: ChangeLog INSTALL

42
README Normal file
View file

@ -0,0 +1,42 @@
X Protocol Extensions
Extension names:
DOUBLE-BUFFER
DPMS
Extended-Visual-Information
Generic Event Extension
LBX
MIT-SHM
MIT-SUNDRY-NONSTANDARD
Multi-Buffering
SECURITY
SHAPE
SYNC
TOG-CUP
XC-APPGROUP
XTEST
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
Please submit bug reports to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/proto/xextproto
http://cgit.freedesktop.org/xorg/proto/xextproto
For patch submission instructions, see:
http://www.x.org/wiki/Development/Documentation/SubmittingPatches
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

52
ag.h Normal file
View file

@ -0,0 +1,52 @@
/*
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.
*/
#ifndef _AG_H_
#define _AG_H_
#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
#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
#endif /* _AG_H_ */

178
agproto.h Normal file
View file

@ -0,0 +1,178 @@
/*
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.
*/
#ifndef _AGPROTO_H_ /* { */
#define _AGPROTO_H_
#include <X11/extensions/ag.h>
#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 XAppGroup CARD32
/*
* 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 /* } _AGPROTO_H_ */

17
autogen.sh Executable file
View file

@ -0,0 +1,17 @@
#! /bin/sh
srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=.
ORIGDIR=`pwd`
cd "$srcdir"
autoreconf -v --install || exit 1
cd "$ORIGDIR" || exit $?
git config --local --get format.subjectPrefix >/dev/null 2>&1 ||
git config --local format.subjectPrefix "PATCH xextproto"
if test -z "$NOCONFIGURE"; then
exec "$srcdir"/configure "$@"
fi

20
configure.ac Normal file
View file

@ -0,0 +1,20 @@
AC_PREREQ([2.60])
AC_INIT([XExtProto], [7.3.0],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
# Require xorg-macros minimum of 1.12 for DocBook external references
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.12)
XORG_DEFAULT_OPTIONS
XORG_ENABLE_SPECS
XORG_WITH_XMLTO(0.0.22)
XORG_WITH_FOP
XORG_WITH_XSLTPROC
XORG_CHECK_SGML_DOCTOOLS(1.8)
AC_CONFIG_FILES([Makefile
specs/Makefile
xextproto.pc])
AC_OUTPUT

38
cup.h Normal file
View file

@ -0,0 +1,38 @@
/*
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.
*/
#ifndef _CUP_H_
#define _CUP_H_
#define XCUPNAME "TOG-CUP"
#define XCUP_MAJOR_VERSION 1 /* current version numbers */
#define XCUP_MINOR_VERSION 0
#define XcupNumberErrors 0
#endif /* _CUP_H_ */

105
cupproto.h Normal file
View file

@ -0,0 +1,105 @@
/*
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.
*/
#ifndef _XCUPPROTO_H_ /* { */
#define _XCUPPROTO_H_
#include <X11/extensions/cup.h>
#define X_XcupQueryVersion 0
#define X_XcupGetReservedColormapEntries 1
#define X_XcupStoreColors 2
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 /* } _XCUPPROTO_H_ */

57
dbe.h Normal file
View file

@ -0,0 +1,57 @@
/******************************************************************************
*
* 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 DBE_H
#define DBE_H
/* Values for swap_action field of XdbeSwapInfo structure */
#define XdbeUndefined 0
#define XdbeBackground 1
#define XdbeUntouched 2
#define XdbeCopied 3
/* Errors */
#define XdbeBadBuffer 0
#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)
#endif /* DBE_H */

224
dbeproto.h Normal file
View file

@ -0,0 +1,224 @@
/******************************************************************************
*
* 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 DBE_PROTO_H
#define DBE_PROTO_H
#include <X11/extensions/dbe.h>
/* 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;
/* TYPEDEFS */
/* Protocol data types */
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 /* DBE_PROTO_H */

105
docbook.am Normal file
View file

@ -0,0 +1,105 @@
#
# Generate output formats for a single DocBook/XML with/without chapters
#
# Variables set by the calling Makefile:
# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
# docbook: the main DocBook/XML file, no chapters, appendix or image files
# chapters: all files pulled in by an XInclude statement and images.
#
#
# This makefile is intended for Users Documentation and Functional Specifications.
# Do not use for Developer Documentation which is not installed and does not require olink.
# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
# for an explanation on documents classification.
#
# DocBook/XML generated output formats to be installed
shelf_DATA =
# DocBook/XML file with chapters, appendix and images it includes
dist_shelf_DATA = $(docbook) $(chapters)
if HAVE_XMLTO
if HAVE_STYLESHEETS
XMLTO_SEARCHPATH_FLAGS = \
--searchpath "$(XORG_SGML_PATH)/X11" \
--searchpath "$(abs_top_builddir)"
XMLTO_HTML_OLINK_FLAGS = \
--stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
--stringparam current.docid="$(<:.xml=)"
XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
XMLTO_HTML_FLAGS = \
$(XMLTO_SEARCHPATH_FLAGS) \
$(XMLTO_HTML_STYLESHEET_FLAGS) \
$(XMLTO_HTML_OLINK_FLAGS)
shelf_DATA += $(docbook:.xml=.html)
%.html: %.xml $(chapters)
$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
if HAVE_XMLTO_TEXT
shelf_DATA += $(docbook:.xml=.txt)
%.txt: %.xml $(chapters)
$(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
endif HAVE_XMLTO_TEXT
if HAVE_FOP
XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
XMLTO_PDF_OLINK_FLAGS = \
--stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
--stringparam current.docid="$(<:.xml=)"
XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
XMLTO_FO_FLAGS = \
$(XMLTO_SEARCHPATH_FLAGS) \
$(XMLTO_FO_STYLESHEET_FLAGS) \
$(XMLTO_FO_IMAGEPATH_FLAGS) \
$(XMLTO_PDF_OLINK_FLAGS)
shelf_DATA += $(docbook:.xml=.pdf)
%.pdf: %.xml $(chapters)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
shelf_DATA += $(docbook:.xml=.ps)
%.ps: %.xml $(chapters)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
endif HAVE_FOP
# Generate documents cross-reference target databases
if HAVE_XSLTPROC
XSLT_SEARCHPATH_FLAGS = \
--path "$(XORG_SGML_PATH)/X11" \
--path "$(abs_top_builddir)"
XSLT_OLINK_FLAGS = \
--stringparam targets.filename "$@" \
--stringparam collect.xref.targets "only" \
--stringparam olink.base.uri "$(@:.db=)"
XSLT_HTML_FLAGS = \
$(XSLT_SEARCHPATH_FLAGS) \
$(XSLT_OLINK_FLAGS) \
--nonet --xinclude \
$(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
XSLT_PDF_FLAGS = \
$(XSLT_SEARCHPATH_FLAGS) \
$(XSLT_OLINK_FLAGS) \
--nonet --xinclude \
$(STYLESHEET_SRCDIR)/xorg-fo.xsl
shelf_DATA += $(docbook:.xml=.html.db)
%.html.db: %.xml $(chapters)
$(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
shelf_DATA += $(docbook:.xml=.pdf.db)
%.pdf.db: %.xml $(chapters)
$(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
endif HAVE_XSLTPROC
endif HAVE_STYLESHEETS
endif HAVE_XMLTO
CLEANFILES = $(shelf_DATA)

43
dpmsconst.h Normal file
View file

@ -0,0 +1,43 @@
/*****************************************************************
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.
******************************************************************/
#ifndef _DPMSCONST_H
#define _DPMSCONST_H 1
#define DPMSMajorVersion 1
#define DPMSMinorVersion 1
#define DPMSExtensionName "DPMS"
#define DPMSModeOn 0
#define DPMSModeStandby 1
#define DPMSModeSuspend 2
#define DPMSModeOff 3
#endif /* !_DPMSCONST_H */

175
dpmsproto.h Normal file
View file

@ -0,0 +1,175 @@
/*****************************************************************
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.
******************************************************************/
#ifndef _DPMSPROTO_H_
#define _DPMSPROTO_H_
#include <X11/extensions/dpmsconst.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
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 /* _DPMSPROTO_H_ */

60
ge.h Normal file
View file

@ -0,0 +1,60 @@
/*
* 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 GENumberEvents 0
/*********************************************************
*
* Errors
*
*/
#define GENumberErrors 0
#endif /* _GE_H_ */

85
geproto.h Normal file
View file

@ -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<X11/Xproto.h>
#include<X11/X.h>
#include<X11/extensions/ge.h>
/*********************************************************
*
* 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_ */

73
lbx.h Normal file
View file

@ -0,0 +1,73 @@
/*
* 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.
*
*/
#ifndef _LBX_H_
#define _LBX_H_
#define LBXNAME "LBX"
#define LBX_MAJOR_VERSION 1
#define LBX_MINOR_VERSION 0
#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
#endif

975
lbxproto.h Normal file
View file

@ -0,0 +1,975 @@
/*
* 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.
*
*/
#ifndef _LBXPROTO_H_
#define _LBXPROTO_H_
#include <X11/extensions/lbx.h>
/*
* 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
/*
* 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
#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 /* _LBXPROTO_H_ */

38
mitmiscconst.h Normal file
View file

@ -0,0 +1,38 @@
/************************************************************
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 */
#ifndef _MITMISCCONST_H_
#define _MITMISCCONST_H_
#define MITMiscNumberEvents 0
#define MITMiscNumberErrors 0
#define MITMISCNAME "MIT-SUNDRY-NONSTANDARD"
#endif

68
mitmiscproto.h Normal file
View file

@ -0,0 +1,68 @@
/************************************************************
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 */
#ifndef _MITMISCPROTO_H_
#define _MITMISCPROTO_H_
#include <X11/extensions/mitmiscconst.h>
#define X_MITSetBugMode 0
#define X_MITGetBugMode 1
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 /* _MITMISCPROTO_H_ */

83
multibufconst.h Normal file
View file

@ -0,0 +1,83 @@
/*
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.
*/
#ifndef _MULTIBUFCONST_H_
#define _MULTIBUFCONST_H_
#define MULTIBUFFER_PROTOCOL_NAME "Multi-Buffering"
#define MULTIBUFFER_MAJOR_VERSION 1 /* current version numbers */
#define MULTIBUFFER_MINOR_VERSION 1 /* has ClearImageBufferArea */
/*
* 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)
#endif /* _MULTIBUFCONST_H_ */

295
multibufproto.h Normal file
View file

@ -0,0 +1,295 @@
/*
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.
*/
#ifndef _MULTIBUFPROTO_H_
#define _MULTIBUFPROTO_H_
#include <X11/extensions/multibufconst.h>
/*
* Protocol requests constants and alignment values
*/
#define Window CARD32
#define Drawable CARD32
#define VisualID CARD32
#define Multibuffer CARD32
#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
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
#endif /* _MULTIBUFPROTO_H_ */

61
secur.h Normal file
View file

@ -0,0 +1,61 @@
/*
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.
*/
#ifndef _SECUR_H
#define _SECUR_H
#define SECURITY_EXTENSION_NAME "SECURITY"
#define SECURITY_MAJOR_VERSION 1
#define SECURITY_MINOR_VERSION 0
#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
#endif /* _SECUR_H */

110
securproto.h Normal file
View file

@ -0,0 +1,110 @@
/*
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.
*/
#ifndef _SECURPROTO_H
#define _SECURPROTO_H
#include <X11/extensions/secur.h>
#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 /* _SECURPROTO_H */

55
shapeconst.h Normal file
View file

@ -0,0 +1,55 @@
/************************************************************
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.
********************************************************/
#ifndef _SHAPECONST_H_
#define _SHAPECONST_H_
/*
* Protocol requests constants and alignment values
* These would really be in SHAPE's X.h and Xproto.h equivalents
*/
#define SHAPENAME "SHAPE"
#define SHAPE_MAJOR_VERSION 1 /* current version numbers */
#define SHAPE_MINOR_VERSION 1
#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)
#endif /* _SHAPECONST_H_ */

237
shapeproto.h Normal file
View file

@ -0,0 +1,237 @@
/************************************************************
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.
********************************************************/
#ifndef _SHAPEPROTO_H_
#define _SHAPEPROTO_H_
#include <X11/extensions/shapeconst.h>
/*
* Protocol requests constants and alignment values
* These would really be in SHAPE's X.h and Xproto.h equivalents
*/
#define Window CARD32
#define Time CARD32
#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
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 /* _SHAPEPROTO_H_ */

8
shapestr.h Normal file
View file

@ -0,0 +1,8 @@
#ifndef _SHAPESTR_H_
#define _SHAPESTR_H_
#warning "shapestr.h is obsolete and may be removed in the future."
#warning "include <X11/extensions/shapeproto.h> for the protocol defines."
#include <X11/extensions/shapeproto.h>
#endif /* _SHAPESTR_H_ */

44
shm.h Normal file
View file

@ -0,0 +1,44 @@
/************************************************************
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 _SHM_H_
#define _SHM_H_
#define SHMNAME "MIT-SHM"
#define SHM_MAJOR_VERSION 1 /* current version numbers */
#define SHM_MINOR_VERSION 2
#define ShmCompletion 0
#define ShmNumberEvents (ShmCompletion + 1)
#define BadShmSeg 0
#define ShmNumberErrors (BadShmSeg + 1)
#endif /* _SHM_H_ */

229
shmproto.h Normal file
View file

@ -0,0 +1,229 @@
/************************************************************
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 _SHMPROTO_H_
#define _SHMPROTO_H_
#include <X11/extensions/shm.h>
#define ShmSeg CARD32
#define Drawable CARD32
#define VisualID CARD32
#define GContext CARD32
#define Pixmap CARD32
#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 X_ShmAttachFd 6
#define X_ShmCreateSegment 7
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
/* Version 1.2 additions */
typedef struct _ShmAttachFd {
CARD8 reqType; /* always ShmReqCode */
CARD8 shmReqType; /* always X_ShmAttachFd */
CARD16 length B16;
ShmSeg shmseg B32;
BOOL readOnly;
BYTE pad0;
CARD16 pad1 B16;
} xShmAttachFdReq;
/* File descriptor is passed with this request */
#define sz_xShmAttachFdReq 12
typedef struct _ShmCreateSegment {
CARD8 reqType; /* always ShmReqCode */
CARD8 shmReqType; /* always X_ShmAttachFd */
CARD16 length B16;
ShmSeg shmseg B32;
CARD32 size B32;
BOOL readOnly;
BYTE pad0;
CARD16 pad1 B16;
} xShmCreateSegmentReq;
#define sz_xShmCreateSegmentReq 16
typedef struct {
CARD8 type; /* must be X_Reply */
CARD8 nfd; /* must be 1 */
CARD16 sequenceNumber B16; /* last sequence number */
CARD32 length B32; /* 0 */
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
CARD32 pad6 B32; /* unused */
CARD32 pad7 B32; /* unused */
} xShmCreateSegmentReply;
/* File descriptor is passed with this reply */
#define sz_xShmCreateSegmentReply 32
#undef ShmSeg
#undef Drawable
#undef VisualID
#undef GContext
#undef Pixmap
#endif /* _SHMPROTO_H_ */

63
shmstr.h Normal file
View file

@ -0,0 +1,63 @@
/************************************************************
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_
#include <X11/extensions/shmproto.h>
#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
#endif /* _SHMSTR_H_ */

5
specs/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
*.html
*.ps
*.pdf
*.txt
*.db

29
specs/Makefile.am Normal file
View file

@ -0,0 +1,29 @@
if ENABLE_SPECS
# Main DocBook/XML files (DOCTYPE book)
docbook = \
appgrp.xml \
dbe.xml \
dpms.xml \
evi.xml \
geproto.xml \
lbx.xml \
multibuf.xml \
security.xml \
shape.xml \
shm.xml \
sync.xml \
tog-cup.xml \
xtest.xml
# Included chapters, appendix, images
chapters = appendix.xml
# The location where the DocBook/XML files and their generated formats are installed
shelfdir = $(docdir)
# Generate DocBook/XML output formats with or without stylesheets
include $(top_srcdir)/docbook.am
endif ENABLE_SPECS

61
specs/appendix.xml Normal file
View file

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE appendix
PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<appendix id='system_window_encodings'>
<title>System Window Encodings</title>
<para>
The AppGroupCreateAssoc request has the following possible variations:
</para>
<literallayout>
<emphasis role='bold'>AppGroupCreateAssoc (X11)</emphasis>
1 CARD8 opcode
1 6 XC-APPGROUP opcode
2 n length
4 WINDOW window
2 0 window_type
2 4 system_window_len
4 WINDOW Window
</literallayout>
<literallayout>
<emphasis role='bold'>AppGroupCreateAssoc (Macintosh)</emphasis>
1 CARD8 opcode
1 6 XC-APPGROUP opcode
2 n length
4 WINDOW window
2 1 window_type
2 12 system_window_len
4 CARD32 WindowPtr
2 INT16 Rect.top
2 INT16 Rect.left
2 INT16 Rect.bottom
2 INT16 Rect.right
</literallayout>
<literallayout>
<emphasis role='bold'>AppGroupCreateAssoc (Win32)</emphasis>
1 CARD8 opcode
1 6 XC-APPGROUP opcode
2 n length
4 WINDOW window
2 2 window_type
2 4 system_window_len
4 CARD32 HWND
</literallayout>
<literallayout>
<emphasis role='bold'>AppGroupCreateAssoc (Win16)</emphasis>
1 CARD8 opcode
1 6 XC-APPGROUP opcode
2 n length
4 WINDOW window
2 3 window_type
2 4 system_window_len
2 CARD16 HWND offset
2 CARD16 HWND segment
</literallayout>
</appendix>

1041
specs/appgrp.xml Normal file

File diff suppressed because it is too large Load diff

1065
specs/dbe.xml Normal file

File diff suppressed because it is too large Load diff

567
specs/dpms.xml Normal file
View file

@ -0,0 +1,567 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<book id="dpms">
<bookinfo>
<title>X Display Power Management Signaling (DPMS) Extension Protocol Specification</title>
<subtitle>X Project Team Standard</subtitle>
<authorgroup>
<author>
<firstname>Rob </firstname><surname>Lembree</surname>
<affiliation><orgname>Digital Equipment Corporation</orgname></affiliation>
<email>lembree@zk3.dec.com</email>
</author>
</authorgroup>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 1.0</releaseinfo>
<copyright><year>1996</year><holder>Digital Equipment Corporation</holder></copyright>
<legalnotice>
<para>
Permission to use, copy, modify, distribute, and sell this
documentation for any purpose is hereby granted without fee,
provided that the above copyright notice and this permission
notice appear in all copies. Digital Equipment Corporation
makes no representations about the suitability for any purpose
of the information in this document. This documentation is
provided &ldquo;as is&rdquo; without express or implied warranty.
</para>
</legalnotice>
</bookinfo>
<chapter id="Overview">
<title>Overview</title>
<para>
This extension provides X Protocol control over the VESA Display
Power Management Signaling (DPMS) characteristics of video boards
under control of the X Window System.<footnote>
<para>
<emphasis remap='I'>X Window System</emphasis> is a trademark of The Open Group.
</para>
</footnote>
</para>
<para>
<!-- .LP -->
Traditionally, the X Window System has provided for both blanking and
non-blanking screen savers. Timeouts associated with these built-in
screen saver mechanisms are limited to idle (dwell) time, and a change
timeout that specifies the change interval for non-blanking screen savers.
</para>
<para>
<!-- .LP -->
The United States' Environmental Protection Agency (EPA) Energy Star program
requires that monitors power down after some idle time by default.
While it is possible to simply overload the existing screen saver timeouts,
this solution leaves the non-privileged user little to no control over
the DPMS characteristics of his or her system. For example, disabling
DPMS would require some unintended side effect in the core screen saver,
such as disabling the changing of a non-blanking screen saver. Providing
clients with this control requires an extension to the core X Window System
Protocol, and this extension seeks to fill this gap.
</para>
<para>
<!-- .LP -->
The design goal of the DPMS extension is to be a logical extension to
the traditional screen saver. The protocol and sample implementation is
designed to use the same date types and time units as the screen saver.
The sample implementation works independently from the screen saver so that
policy as it pertains to the interaction between screen saver and DPMS can
be deferred to the user or screen saver application. The extension has
been tested with and shown to work correctly with both the internal blanking
and non-blanking screen savers, as well as with screen saver extension
clients.
</para>
<para>
The DPMS extension is designed to be simple, yet export sufficient
VESA DPMS information to enable full function clients to be written.
Included is the ability to sense DPMS capability, set and get DPMS timeouts,
enable and disable individual DPMS modes, enable and disable DPMS (without
destroying timeout values), and sense current DPMS on/off state and
power level.
</para>
<para>
There are four power levels specified by the Video Electronics Standards
Association (VESA) Display Power Management Signaling (DPMS) standard.
These are:
</para>
<literallayout class="monospaced">
<function>DPMS Extension Power Levels</function>
0 DPMSModeOn In use
1 DPMSModeStandby Blanked, low power
2 DPMSModeSuspend Blanked, lower power
3 DPMSModeOff Shut off, awaiting activity
</literallayout>
<para>
It is logical to assume that successive DPMS modes be chronologically
at the same time or later than one another, and the protocol is designed
to enforce this rule.
</para>
<para>
Note however that a concious decision is made to decouple the timeouts
associated with screen saver from the DPMS timeouts. While it might be
considered logical to require that the first non-zero DPMS timeout be
greater than or equal to the screen saver timeout, this is intentionally
omitted, leaving this policy decision to the user or the screen saver
application. In the case of a laptop where power may be scarce, the
importance of power savings should supersede the screen saver. If the
laptop user plugs the unit in and power is no longer a scarce commodity,
it may be decided to make DPMS less aggressive, or disable it completely.
</para>
</chapter>
<chapter id="Requests">
<title>Requests</title>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSGetVersion'><function>DPMSGetVersion</function></olink>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>client_major_version</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>client_minor_version</emphasis>: CARD16
</entry>
</row>
<row>
<entry>=&gt;</entry>
</row>
<row>
<entry>
<emphasis remap='I'>server_major_version</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>server_minor_version</emphasis>: CARD16
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
If supplied, the <emphasis remap='I'>client_major_version</emphasis> and
<emphasis remap='I'>client_minor_version</emphasis> indicate what version
of the protocol the
client wants the server to implement. The server version numbers
returned indicate the protocol this extension actually supports. This
might not equal the version sent by the client. An implementation can
(but need not) support more than one version simultaneously. The
<emphasis remap='I'>server_major_version</emphasis> and the
<emphasis remap='I'>server_minor_version</emphasis> are a
mechanism to support future revisions of the Display Power Management
Signaling protocol which may be necessary. In general, the major version
would increment for incompatible changes, and the minor version would
increment for small, upward-compatible changes. Servers that support the
protocol defined in this document will return a
<emphasis remap='I'>server_major_version</emphasis>
of one (1), and a <emphasis remap='I'>server_minor_version</emphasis>
of one (1).
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSCapable'><function>DPMSCapable</function></olink>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>=&gt;</entry>
</row>
<row>
<entry>
<emphasis remap='I'>capable</emphasis>: BOOL
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request is used to determine whether or not the currently running
server's devices are capable of DPMS operations. The truth value of this
request is implementation defined, but is generally based on the capabilities
of the graphic card and monitor combination. Also, the return value in the
case of heterogeneous multi-head servers is implementation defined.
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSGetTimeouts'><function>DPMSGetTimeouts</function></olink>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>=&gt;</entry>
</row>
<row>
<entry>
<emphasis remap='I'>standby_timeout</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>suspend_timeout</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>off_timeout</emphasis>: CARD16
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request returns the current values of the DPMS timeout values. All
values are in units of seconds.
</para>
<para>
<emphasis remap='I'>standby_timeout</emphasis> is the amount of time
of inactivity before standby
mode is invoked. The actual effects of this mode are implementation defined,
but in the case of DPMS compliant hardware, it is implemented by shutting off
the horizontal sync signal, and pulsing the vertical sync signal. Standby
mode provides the quickest monitor recovery time. Note also that many
monitors implement this mode identically to suspend mode. A value of
zero indicates that this mode is disabled.
</para>
<para>
<emphasis remap='I'>suspend_timeout</emphasis> is the amount of time
of inactivity before the second
level of power savings is invoked. Suspend mode's physical and electrical
characteristics are implementation defined, but in DPMS compliant hardware,
results in the pulsing of the horizontal sync signal, and shutting off of
the vertical sync signal. Suspend mode recovery is considered to be slower
than standby mode, but faster than off mode, however this is monitor
dependent. As noted above, many monitors implement this mode identically to
standby mode. A value of zero indicates that this mode is disabled.
</para>
<para>
<emphasis remap='I'>off_timeout</emphasis> is the amount of time of
inactivity before the third and
final level of power savings is invoked. Off mode's physical and electrical
characteristics are implementation defined, but in DPMS compliant hardware,
is implemented by shutting off both horizontal and vertical sync signals,
resulting in the power-down of the monitor. Recovery time is implementation
dependant, but frequently is similar to the power-up time of the monitor. A
value of zero indicates that this mode is disabled.
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSSetTimeouts'><function>DPMSSetTimeouts</function></olink>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>standby_timeout</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>suspend_timeout</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>off_timeout</emphasis>: CARD16
</entry>
</row>
<row>
<entry>=&gt;</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
All values are in units of seconds.
<emphasis remap='I'>standby_timeout</emphasis> is the amount of
time of inactivity before standby mode will be invoked. This is the
lightest level of power savings, and the monitor is generally immediately
ready upon detection of user activity. This is most often implemented by
shutting off the horizontal sync signal to the monitor.
A value of zero disables this mode.
</para>
<para>
The <emphasis remap='I'>suspend_timeout</emphasis> specifies the amount
of time of inactivity
before the screen is placed into suspend mode. Suspend mode is the
middle level of power savings, resulting in a slightly longer recovery
upon detection of activity. Suspend mode is most often implemented by
pulsing the horizontal sync signal, and removing the vertical sync
signal. A value of zero disables this mode.
</para>
<para>
The <emphasis remap='I'>off_timeout</emphasis> specifies the amount of
time of inactivity before
the monitor is shut off. Off mode is the deepest level of power management,
resulting in the greatest power savings and the longest recovery time.
Off mode is most often implemented by removing both the horizontal and
vertical signals. A value of zero disables this mode.
</para>
<para>
The values of successive power levels must be greater than or equal
to the value of the previous (non-zero) level. A BadValue error is generated
if an illegal combination is detected.
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSEnable'><function>DPMSEnable</function></olink>
</para>
<para>
=&gt;
</para>
<para>
This request enables the DPMS characteristics of the server, using the
server's currently stored timeouts. If DPMS is already enabled, no change is
effected.
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSDisable'><function>DPMSDisable</function></olink>
</para>
<para>
=&gt;
</para>
<para>
This request disables the DPMS characteristics of the server. It does
not affect the core or extension screen savers. If DPMS is already
disabled, no change is effected. This request is provided so that DPMS
may be disabled without damaging the server's stored timeout values.
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSForceLevel'><function>DPMSForceLevel</function></olink>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>power_level</emphasis>: CARD16
</entry>
</row>
<row>
<entry>=&gt;</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request forces a specific DPMS level on the server. If DPMS is
disabled, a BadMatch error is generated. If an erroneous power level
is specified, a BadValue error is returned, and the error value contains
the bad value. If the power level specified is already in effect, no
changes occur. Power Level must be one of DPMSModeOn, DPMSModeStandby,
DPMSModeSuspend or DPMSModeOff.
</para>
<para>
<olink targetdoc='dpmslib' targetptr='DPMSInfo'><function>DPMSInfo</function></olink>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>=&gt;</entry>
</row>
<row>
<entry>
<emphasis remap='I'>power_level</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>state</emphasis>: BOOL
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request returns information about the current DPMS state of the
display. <emphasis remap='I'>state</emphasis> is one of DPMSEnabled
or DPMSDisabled.
If <emphasis remap='I'>state</emphasis> is DPMSEnabled,
<emphasis remap='I'>power_level</emphasis> is returned as one
of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend or DPMSModeOff, otherwise
it is undefined.
</para>
</chapter>
<chapter id="Events_and_Errors">
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
</chapter>
<chapter id="Encoding">
<title>Encoding</title>
<para>
Please refer to the X11 Protocol Encoding document as this document uses
conventions established there.
</para>
<para>
The name of this extension is "DPMS".
</para>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSGetVersion'><function>DPMSGetVersion</function></olink>
1 CARD8 opcode
1 0 DPMS opcode
2 2 request length
2 CARD16 client_major_version
2 CARD16 client_minor_version
=&gt;
1 1 Reply
1 unused
2 CARD16 sequence number
4 0 length
2 CARD16 server_major_version
2 CARD16 server_minor_version
20 unused
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSCapable'><function>DPMSCapable</function></olink>
1 CARD8 opcode
1 1 DPMS opcode
2 1 request length
=&gt;
1 1 Reply
1 unused
2 CARD16 sequence number
4 0 length
1 BOOL capable
23 unused
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSGetTimeouts'><function>DPMSGetTimeouts</function></olink>
1 CARD8 opcode
1 2 DPMS opcode
2 1 request length
=&gt;
1 1 Reply
1 unused
2 CARD16 sequence number
4 0 length
2 CARD16 standby_timeout
2 CARD16 suspend_timeout
2 CARD16 off_timeout
18 unused
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSSetTimeouts'><function>DPMSSetTimeouts</function></olink>
1 CARD8 opcode
1 3 DPMS opcode
2 3 request length
2 CARD16 standby_timeout
2 CARD16 suspend_timeout
2 CARD16 off_timeout
2 unused
=&gt;
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSEnable'><function>DPMSEnable</function></olink>
1 CARD8 opcode
1 4 DPMS opcode
2 1 request length
=&gt;
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSDisable'><function>DPMSDisable</function></olink>
1 CARD8 opcode
1 5 DPMS opcode
2 1 request length
=&gt;
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSForceLevel'><function>DPMSForceLevel</function></olink>
1 CARD8 opcode
1 6 DPMS opcode
2 2 request length
2 power_level
0 DPMSModeOn
1 DPMSModeStandby
2 DPMSModeSuspend
3 DPMSModeOff
2 unused
=&gt;
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='dpmslib' targetptr='DPMSInfo'><function>DPMSInfo</function></olink>
1 CARD8 opcode
1 7 DPMS opcode
2 1 request length
=&gt;
1 1 Reply
1 unused
2 CARD16 sequence number
4 0 length
2 power_level
0 DPMSModeOn
1 DPMSModeStandby
2 DPMSModeSuspend
3 DPMSModeOff
1 BOOL state
21 unused
</literallayout>
</chapter>
</book>

519
specs/evi.xml Normal file
View file

@ -0,0 +1,519 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<book id="evi">
<bookinfo>
<title>Extended Visual Information Extension</title>
<subtitle>X Project Team Standard</subtitle>
<authorgroup>
<author>
<firstname>Peter</firstname><surname>Daifuku</surname>
<affiliation><orgname>Silicon Graphics, Inc.</orgname></affiliation>
</author>
</authorgroup>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 1.0</releaseinfo>
<copyright><year>1986-1997</year><holder>The Open Group</holder></copyright>
<legalnotice>
<para>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this
software and associated documentation files (the Software), to use the
Software without restriction, including, without limitation, the rights to
copy, modify, merge, publish, distribute and sublicense the Software,
to make, have made, license and distribute derivative works thereof, and
to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
</para>
<para>
The above copyright notice and the following permission notice shall be
included in all copies of the Software:
</para>
<para>
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
INFRINGEMENT. IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER USEABILITIY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN
CONNNECTION WITH THE SOFTWARE OR THE USE OF OTHER DEALINGS IN
THE SOFTWARE.
</para>
<para>
Except as contained in this notice, the name of The Open Group shall not
be used in advertising or otherwise to promote the use or other dealings
in this Software without prior written authorization from The Open Group.
</para>
<para>
X Window System is a trademark of The Open Group.
</para>
</legalnotice>
</bookinfo>
<chapter id="Introduction">
<title>Introduction</title>
<para>
EVI (Extended Visual Information extension) allows a client to determine
information about core X visuals beyond what the core protocol provides.
</para>
</chapter>
<chapter id="Goals">
<title>Goals</title>
<para>
As the X Window System has evolved, it has become clear that the information
returned by the core X protocol regarding Visuals is often insufficient for a
client to determine which is the most appropriate visual for its needs. This
extension allows clients to query the X server for additional visual
information, specifically as regards colormaps and framebuffer levels.
</para>
<para>
This extension is meant to address the needs of pure X clients only. It is
specifically and purposefully not designed to address the needs of X
extensions. Extensions that have an impact on visual information should provide
their own mechanisms for delivering that information. For example, the Double
Buffering Extension (DBE) provides its own mechanism for determining which
visuals support double-buffering.
</para>
</chapter>
<chapter id="Requests">
<title>Requests</title>
<para>
<function>GetVersion</function>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>client_major_version</emphasis>: CARD8
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>client_minor_version</emphasis>: CARD8
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>server_major_version</emphasis>: CARD8
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>server_minor_version</emphasis>: CARD8
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
If supplied, the client_major_version and client_minor_version indicate
what version of the protocol the client wants the server to implement.
The server version numbers returned indicate the protocol this extension
actually supports. This might not equal the version sent by the client.
An implementation can (but need not) support more than one version
simultaneously. The server_major_version and the server_minor_version
are a mechanism to support future revisions of the EVI protocol that
may be necessary. In general, the major version would increment for
incompatible changes, and the minor version would increment for small
upward-compatible changes. Servers that support the protocol defined in
this document will return a server_major_version of one (1), and a
server_minor_version of zero (0).
</para>
<para>
<function> GetVisualInfo</function>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>visual_list</emphasis>: LISTofVISUALID
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>per_visual_info</emphasis>: LISTofVISUALINFO
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
where:
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
VISUALINFO: [core_visual_id: VISUALID
</entry>
</row>
<row>
<entry>
screen: CARD8
</entry>
</row>
<row>
<entry>
level: INT8
</entry>
</row>
<row>
<entry>
transparency_type: CARD8
</entry>
</row>
<row>
<entry>
unused: CARD8
</entry>
</row>
<row>
<entry>
transparency_value: CARD32
</entry>
</row>
<row>
<entry>
min_hw_colormaps: CARD8
</entry>
</row>
<row>
<entry>
max_hw_colormaps: CARD8
</entry>
</row>
<row>
<entry>
num_colormap_conflicts: CARD16
</entry>
</row>
<row>
<entry>
colormap_conflicts: LISTofVISUALID]
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<itemizedlist>
<listitem>
<para>
level is 0 for normal planes, &gt; 0 for overlays, &lt; 0 for underlays.
</para>
</listitem>
<listitem>
<para>
transparency_type is 0 for none, 1 for transparent pixel, 2 for
transparent mask.
</para>
</listitem>
<listitem>
<para>
transparency_value: value to get transparent pixel if transparency
supported.
</para>
</listitem>
<listitem>
<para>
min_hw_colormaps: minimum number of hardware colormaps backing up the
visual.
</para>
</listitem>
<listitem>
<para>
max_hw_colormaps: maximum number of hardware colormaps backing up the
visual.
</para>
<para>
(architectures with static colormap allocation/reallocation would have min
= max)
</para>
</listitem>
<listitem>
<para>
num_colormap_conflicts: number of elements in colormap_conflicts.
</para>
</listitem>
<listitem>
<para>
colormap_conflicts: list of visuals that may conflict with this one. For
example, if a 12-bit colormap is overloaded to support 8-bit visuals, the
8-bit visuals would conflict with the 12-bit visuals.
</para>
</listitem>
</itemizedlist>
</chapter>
<chapter id="Events_and_Errors">
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
</chapter>
<chapter id='Changes_to_existing_protocol'>
<title>Changes to existing protocol.</title>
<para>
None.
</para>
</chapter>
<chapter id="Encoding">
<title>Encoding</title>
<para>
The name of this extension is "Extended-Visual-Information".
</para>
<para>
The conventions used here are the same as those for the core X11
Protocol Encoding.
</para>
<literallayout class="monospaced">
<function>GetVersion</function>
1 CARD8 opcode
1 0 EVI opcode
2 2 request length
2 CARD16 client_major_version
2 CARD16 client_minor_version
=&gt;
1 1 reply
1 unused
2 CARD16 sequence number
4 0 length
2 CARD16 server_major_version
2 CARD16 server_minor_version
20 unused
</literallayout>
<literallayout class="monospaced">
<function>GetVisualInfo</function>
1 CARD8 opcode
1 1 EVI opcode
2 2+n request length
4 CARD32 n_visual
4n CARD32 visual_ids
=&gt;
1 1 reply
1 unused
2 CARD16 sequence number
4 n length
4 CARD32 n_info
4 CARD32 n_conflicts
16 unused
16n LISTofVISUALINFO items
</literallayout>
<literallayout class="monospaced">
VISUALINFO
4 VisualID core_visual_id
1 INT8 screen
1 INT8 level
1 CARD8 transparency_type
1 CARD8 unused
4 CARD32 transparency_value
1 CARD8 min_hw_colormaps
1 CARD8 max_hw_colormaps
2 CARD16 num_colormap_conflicts
</literallayout>
</chapter>
<chapter id="C_Language_Binding">
<title>C Language Binding</title>
<para>
<!-- .LP -->
The C functions provide direct access to the protocol and add no additional
semantics. For complete details on the effects of these functions, refer
to the appropriate protocol request, which can be derived by deleting Xevi
at the start of the function. All functions that have return type Status
will return nonzero for success and zero for failure.
</para>
<para>
The include file for this extension is:
<function>&lt; X11/extensions/XEVI.h&gt;</function>.
</para>
<funcsynopsis id='XeviQueryVersion'>
<funcprototype>
<funcdef>Bool <function> XeviQueryVersion</function></funcdef>
<paramdef>Display<parameter> *display</parameter></paramdef>
<paramdef>int<parameter> *major_version_return</parameter></paramdef>
<paramdef>int<parameter> *minor_version_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term>
<emphasis remap='I'>display</emphasis>
</term>
<listitem>
<para>
Specifies the connection to the X server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>major_version_return</emphasis>
</term>
<listitem>
<para>
Returns the major version supported by the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>minor_version_return</emphasis>
</term>
<listitem>
<para>
Returns the minor version supported by the server.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
XeviQueryVersion sets major_version_return and minor_version_return to
the major and minor EVI protocol version supported by the server. If
the EVI library is compatible with the version returned by the server,
it returns nonzero. If dpy does not support the EVI extension, or if
there was an error during communication with the server, or if the server
and library protocol versions are incompatible, it returns zero. No other
Xevi functions may be called before this function. If a client violates
this rule, the effects of all subsequent Xevi calls that it makes are
undefined.
</para>
<para>
To get the extended information for any subset of visuals use
XeviGetVisualInfo.
</para>
<funcsynopsis id='XeviGetVisualInfo'>
<funcprototype>
<funcdef>int <function> XeviGetVisualInfo</function></funcdef>
<paramdef>Display<parameter> *display</parameter></paramdef>
<paramdef>VisualID<parameter> *visual</parameter></paramdef>
<paramdef>int<parameter> n_visual</parameter></paramdef>
<paramdef>ExtendedVisualInfo<parameter> **evi_return</parameter></paramdef>
<paramdef>int<parameter> *n_info_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term>
<emphasis remap='I'>display</emphasis>
</term>
<listitem>
<para>
Specifies the connection to the X server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>visual</emphasis>
</term>
<listitem>
<para>
If NULL, then information for all visuals of all
screens is returned. Otherwise, a pointer to a list of visuals for which
extended visual information is desired.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>n_visual</emphasis>
</term>
<listitem>
<para>
If 0, then information for all visuals of all screens is returned. Otherwise,
the number of elements in the array <emphasis remap='I'>visual</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>evi_return</emphasis>
</term>
<listitem>
<para>
Returns a pointer to a list of <emphasis remap='I'>ExtendedVisualInfo</emphasis>. When done, the client
should free the list using <emphasis remap='I'>XFree</emphasis>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>n_info_return</emphasis>
</term>
<listitem>
<para>
Returns the number of elements in the list of
<emphasis remap='I'>ExtendedVisualInfo</emphasis>.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
XeviGetVisualInfo returns a list of ExtendedVisualInfo structures that describe
visual information beyond that supported by the core protocol. This includes
layer information relevant for systems supporting overlays and/or underlay
planes, and information that allows applications better to determine the level
of hardware support for multiple colormaps. XeviGetVisualInfo returns Success
if successful, or an X error otherwise.
</para>
</chapter>
</book>

126
specs/geproto.xml Normal file
View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<book>
<bookinfo>
<title>X Generic Event Extension</title>
<author>
<firstname>Peter</firstname>
<surname>Hutterer</surname>
<email>peter.hutterer@who-t.net</email>
</author>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 1.0</releaseinfo>
<copyright><year>2007</year><holder>Peter Hutterer</holder></copyright>
<legalnotice>
<para>
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:
</para>
<para>
The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.
</para>
<para>
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, 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.
</para>
</legalnotice>
</bookinfo>
<chapter>
<title>Introduction</title>
<para>X was designed to provide 64 event opcodes for all extensions. These
events are limited to 32 bytes.</para>
<para>The Generic Event Extension provides a template event for extensions
to re-use a single event opcode. GE only provide headers and the most
basic functionality, leaving the extensions to interpret the events in
their specific context.</para>
<para>GenericEvents may be longer than 32 bytes. If so, the number of 4
byte units following the initial 32 bytes must be specified in the length
field of the event.</para>
</chapter>
<chapter>
<title>Extension Initialization</title>
<para>The name of this extension is "Generic Event Extension"</para>
<programlisting>GEQueryVersion
client-major-version: CARD16
client-minor-version: CARD16
==&gt;
major-version: CARD16
minor-version: CARD16</programlisting>
<para>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.</para>
<para>As of version 1.0, no other requests are provided by this extension.
</para>
</chapter>
<chapter>
<title>Events</title>
<para>GE defines a single event, to be used by all extensions. The event's
structure is similar to a reply. This is a core protocol event, ID 35, and
is not itself an extension event.</para>
<programlisting>GenericEvent
type: BYTE always GenericEvent (35)
extension: CARD8 extension offset
sequenceNumber: CARD16 low 16 bits of request seq. number
length: CARD32 length
evtype: CARD16 event type</programlisting>
<para>The field 'extension' is to be set to the major opcode of the
extension. The 'evtype' field is the actual opcode of the event. The
length field specifies the number of 4-byte blocks after the initial 32
bytes. If length is 0, the event is 32 bytes long.</para>
</chapter>
<chapter>
<title>Notes</title>
<para>Although the wire event is of arbitrary length, the actual size of
an XEvent is restricted to sizeof(XEvent) [96 bytes, see Xlib.h]. If an
extension converts a wire event to an XEvent &gt; 96 bytes, it will
overwrite the space allocated for the event. See struct _XSQEvent in
Xlibint.h for details.</para>
<para>Extensions need to malloc additional data and fill the XEvent
structure with pointers to the malloc'd data. The client then needs to
free the data, only the XEvent structure will be released by Xlib.</para>
<para>The server must not send GenericEvents longer than 32 bytes until it
has verified that the client is able to interpret these events. If a long
event is sent to a client unable to process GenericEvents, future
interpretation of replies and events by this client will fail.</para>
</chapter>
</book>

6346
specs/lbx.xml Normal file

File diff suppressed because it is too large Load diff

1628
specs/multibuf.xml Normal file

File diff suppressed because it is too large Load diff

1467
specs/security.xml Normal file

File diff suppressed because it is too large Load diff

1244
specs/shape.xml Normal file

File diff suppressed because it is too large Load diff

476
specs/shm.xml Normal file
View file

@ -0,0 +1,476 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<!-- lifted from troff+ms+XMan by doclifter -->
<book id="shm">
<bookinfo>
<title>MIT-SHM(The MIT Shared Memory Extension)</title>
<subtitle>How the shared memory extension works</subtitle>
<authorgroup>
<author>
<firstname>Jonathan</firstname><surname>Corbet</surname>
<affiliation>
<orgname>National Center for Atmospheric Research</orgname>
<orgdiv>Atmospheric Technology Division</orgdiv>
</affiliation>
<email>corbet@ncar.ucar.edu</email>
</author>
<editor>
<firstname>Keith</firstname><surname>Packard</surname>
<affiliation><orgname>MIT X Consortium</orgname></affiliation>
</editor>
</authorgroup>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 1.0</releaseinfo>
<copyright><year>1991</year><holder>X Consortium</holder></copyright>
<legalnotice>
<para>
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:
</para>
<para>
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
</para>
<para>
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, 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.
</para>
<para>
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.
</para>
<para>X Window System is a trademark of The OpenGroup.</para>
</legalnotice>
<abstract>
<para>
This document briefly describes how to use the MIT-SHM shared memory
extension. I have tried to make it accurate, but it would not surprise me
if some errors remained. If you find anything wrong, do let me know and I
will incorporate the corrections. Meanwhile, please take this document "as
is" (eman improvement over what was there before, but certainly not the
definitive word.)
</para>
</abstract>
</bookinfo>
<chapter id="REQUIREMENTS">
<title>REQUIREMENTS</title>
<para>
The shared memory extension is provided only by some X servers. To find out
if your server supports the extension, use xdpyinfo(1). In particular, to
be able to use this extension, your system must provide the SYSV shared
memory primitives. There is not an mmap-based version of this extension.
To use shared memory on Sun systems, you must have built your kernel with
SYSV shared memory enabled -- which is not the default configuration.
Additionally, the shared memeory maximum size will need to be increased on
both Sun and Digital systems; the defaults are far too small for any useful
work.
</para>
</chapter>
<chapter id="WHAT_IS_PROVIDED">
<title>WHAT IS PROVIDED</title>
<para>
The basic capability provided is that of shared memory XImages. This is
essentially a version of the ximage interface where the actual image data
is stored in a shared memory segment, and thus need not be moved through
the Xlib interprocess communication channel. For large images, use of this
facility can result in some real performance increases.
</para>
<para>
Additionally, some implementations provided shared memory pixmaps. These
are 2 dimensional arrays of pixels in a format specified by the X server,
where the image data is stored in the shared memory segment. Through use of
shared memory pixmaps, it is possible to change the contents of these
pixmaps without using any Xlib routines at all. Shared memory pixmaps can
only be supported when the X server can use regular virtual memory for
pixmap data; if the pixmaps are stored in some magic graphics hardware, your
application will not be able to share them with the server. Xdpyinfo(1)
doesn't print this particular nugget of information.
</para>
</chapter>
<chapter id="HOW_TO_USE_THE_SHARED_MEMORY_EXTENSION">
<title>HOW TO USE THE SHARED MEMORY EXTENSION</title>
<para>
Code which uses the shared memory extension must include a number of header
files:
</para>
<literallayout class="monospaced">
#include &lt;X11/Xlib.h&gt; /* of course */
#include &lt;sys/ipc.h&gt;
#include &lt;sys/shm.h&gt;
#include &lt;X11/extensions/XShm.h&gt;
</literallayout>
<para>
Of course, if the system you are building on does not support shared
memory, the file XShm.h may not be present. You may want to make
liberal use of #ifdefs.
</para>
<para>
Any code which uses the shared memory extension should first check to see
that the server provides the extension. You could always be running over
the net, or in some other environment where the extension will not work.
To perform this check, call either
</para>
<funcsynopsis id='XShmQueryExtension'>
<funcprototype>
<funcdef>Status <function>XShmQueryExtension</function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
or
</para>
<funcsynopsis id='XShmQueryVersion'>
<funcprototype>
<funcdef>Status <function>XShmQueryVersion</function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
<paramdef>int <parameter>*major</parameter></paramdef>
<paramdef>int <parameter>*minor</parameter></paramdef>
<paramdef>Bool <parameter>*pixmaps</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Where "display" is, of course, the display on which you are running. If
the shared memory extension may be used, the return value from either
function will be True; otherwise your program should operate using
conventional Xlib calls. When the extension is available,
\fCXShmQueryVersion\fP also returns "major" and "minor" which are the
version numbers of the extension implementation, and "pixmaps" which is
True iff shared memory pixmaps are supported.
</para>
</chapter>
<chapter id="USE_OF_SHARED_MEMORY_XIMAGES">
<title>USE OF SHARED MEMORY XIMAGES</title>
<para>
The basic sequence of operations for shared memory XImages is as follows:
</para>
<orderedlist>
<listitem>
<para>
Create the shared memory XImage structure
</para>
</listitem>
<listitem>
<para>
Create a shared memory segment to store the image data
</para>
</listitem>
<listitem>
<para>
Inform the server about the shared memory segment
</para>
</listitem>
<listitem>
<para>
Use the shared memory XImage, much like a normal one.
</para>
</listitem>
</orderedlist>
<para>
To create a shared memory XImage, use:
</para>
<funcsynopsis id='XShmCreateImage'>
<funcprototype>
<funcdef>XImage <function>*XShmCreateImage</function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
<paramdef>Visual <parameter>*visual</parameter></paramdef>
<paramdef>unsigned int <parameter>depth</parameter></paramdef>
<paramdef>int <parameter>format</parameter></paramdef>
<paramdef>char <parameter>*data</parameter></paramdef>
<paramdef>XShmSegmentInfo <parameter>*shminfo</parameter></paramdef>
<paramdef>unsigned int <parameter>width</parameter></paramdef>
<paramdef>unsigned int <parameter>height</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Most of the arguments are the same as for XCreateImage; I will not go
through them here. Note, however, that there are no "offset", "bitmap_pad",
or "bytes_per_line" arguments. These quantities will be defined by the
server itself, and your code needs to abide by them. Unless you have already
allocated the shared memory segment (see below), you should pass in NULL for
the "data" pointer.
</para>
<para>
There is one additional argument: "shminfo", which is a pointer to a
structure of type XShmSegmentInfo. You must allocate one of these
structures such that it will have a lifetime at least as long as that of
the shared memory XImage. There is no need to initialize this structure
before the call to XShmCreateImage.
</para>
<para>
The return value, if all goes well, will be an XImage structure, which you
can use for the subsequent steps.
</para>
<para>
The next step is to create the shared memory segment. This is
best done after the creation of the XImage, since you need to make use of
the information in that XImage to know how much memory to allocate. To
create the segment, you need a call like:
</para>
<literallayout class="monospaced">
shminfo.shmid = shmget (IPC_PRIVATE,
image-&gt;bytes_per_line * image-&gt;height, IPC_CREAT|0777);
</literallayout>
<para>
(assuming that you have called your shared memory XImage "image"). You
should, of course, follow the Rules and do error checking on all of these
system calls. Also, be sure to use the bytes_per_line field, not the width
you used to create the XImage as they may well be different.
</para>
<para>
Note that the shared memory ID returned by the system is stored in the
shminfo structure. The server will need that ID to attach itself to the
segment.
</para>
<para>
Also note that, on many systems for security reasons, the X server
will only accept to attach to the shared memory segment if it's
readable and writeable by "other". On systems where the X server is
able to determine the uid of the X client over a local transport, the
shared memory segment can be readable and writeable only by the uid of
the client.
</para>
<para>
Next, attach this shared memory segment to your process:
</para>
<para>
shminfo.shmaddr = image-&gt;data = shmat (shminfo.shmid, 0, 0);
</para>
<para>
The address returned by shmat should be stored in *both* the XImage
structure and the shminfo structure.
</para>
<para>
To finish filling in the shminfo structure, you need to decide how you want
the server to attach to the shared memory segment, and set the "readOnly"
field as follows. Normally, you would code:
</para>
<para>
shminfo.readOnly = False;
</para>
<para>
If you set it to True, the server will not be able to write to this
segment, and thus XShmGetImage calls will fail.
</para>
<para>
Finally, tell the server to attach to your shared memory segment with:
</para>
<literallayout class="monospaced">
Status XShmAttach (display, shminfo);
</literallayout>
<para>
If all goes well, you will get a non-zero status back, and your XImage is
ready for use.
</para>
<para>
To write a shared memory XImage into an X drawable, use XShmPutImage:
</para>
<funcsynopsis id='XShmPutImage'>
<funcprototype>
<funcdef>Status <function>XShmPutImage </function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
<paramdef>Drawable <parameter>d</parameter></paramdef>
<paramdef>GC <parameter>gc</parameter></paramdef>
<paramdef>XImage <parameter>*image</parameter></paramdef>
<paramdef>int <parameter>src_x</parameter></paramdef>
<paramdef>int <parameter>src_y</parameter></paramdef>
<paramdef>int <parameter>dest_x</parameter></paramdef>
<paramdef>int <parameter>dest_y</parameter></paramdef>
<paramdef>unsigned int <parameter>width</parameter></paramdef>
<paramdef>unsigned int <parameter>height</parameter></paramdef>
<paramdef>bool <parameter>send_event</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The interface is identical to that of XPutImage, so I will spare my fingers
and not repeat that documentation here. There is one additional parameter,
however, called "send_event". If this parameter is passed as True, the
server will generate a "completion" event when the image write is complete;
thus your program can know when it is safe to begin manipulating the shared
memory segment again.
</para>
<para>
The completion event has type XShmCompletionEvent, which is defined as the
following:
</para>
<literallayout class="monospaced">
typedef struct {
int type; /* of event */
unsigned long serial; /* # of last request processed */
Bool send_event; /* true if came from 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 */
} XShmCompletionEvent;
</literallayout>
<para>
The event type value that will be used can be determined at run time with a
line of the form:
</para>
<para>
int CompletionType = XShmGetEventBase (display) + ShmCompletion;
</para>
<para>
If you modify the shared memory segment before the arrival of the
completion event, the results you see on the screen may be inconsistent.
</para>
<para>
To read image data into a shared memory XImage, use the following:
</para>
<funcsynopsis id='XShmGetImage'>
<funcprototype>
<funcdef>Status <function>XShmGetImage </function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
<paramdef>Drawable <parameter>d</parameter></paramdef>
<paramdef>XImage <parameter>*image</parameter></paramdef>
<paramdef>int <parameter>x</parameter></paramdef>
<paramdef>int <parameter>y</parameter></paramdef>
<paramdef>unsigned long <parameter>plane_mask</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
Where "display" is the display of interest, "d" is the source drawable,
"image" is the destination XImage, "x" and "y" are the offsets within
"d", and "plane_mask" defines which planes are to be read.
</para>
<para>
To destroy a shared memory XImage, you should first instruct the server to
detach from it, then destroy the segment itself, as follows:
</para>
<literallayout class="monospaced">
XShmDetach (display, shminfo);
XDestroyImage (image);
shmdt (shminfo.shmaddr);
shmctl (shminfo.shmid, IPC_RMID, 0);
</literallayout>
</chapter>
<chapter id="USE_OF_SHARED_MEMORY_PIXMAPS">
<title>USE OF SHARED MEMORY PIXMAPS</title>
<para>
Unlike X images, for which any image format is usable, the shared memory
extension supports only a single format (i.e. XYPixmap or ZPixmap) for the
data stored in a shared memory pixmap. This format is independent of the
depth of the image (for 1-bit pixmaps it doesn't really matter what this
format is) and independent of the screen. Use XShmPixmapFormat to get the
format for the server:
</para>
<funcsynopsis id='XShmPixmapFormat'>
<funcprototype>
<funcdef>int <function>XShmPixmapFormat</function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
If your application can deal with the server pixmap data format (including
bits-per-pixel et al.), create a shared memory segment and "shminfo"
structure in exactly the same way as is listed above for shared memory
XImages. While it is, not strictly necessary to create an XImage first,
doing so incurs little overhead and will give you an appropriate
bytes_per_line value to use.
</para>
<para>
Once you have your shminfo structure filled in, simply call:
</para>
<funcsynopsis id='XShmCreatePixmap'>
<funcprototype>
<funcdef>Pixmap <function>XShmCreatePixmap</function></funcdef>
<paramdef>Display <parameter>*display</parameter></paramdef>
<paramdef>Drawable <parameter>d</parameter></paramdef>
<paramdef>char <parameter>*data</parameter></paramdef>
<paramdef>XShmSegmentInfo <parameter>*shminfo</parameter></paramdef>
<paramdef>unsigned int <parameter>width</parameter></paramdef>
<paramdef>unsigned int <parameter>height</parameter></paramdef>
<paramdef>unsigned int <parameter>depth</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<para>
The arguments are all the same as for XCreatePixmap, with two additions:
"data" and "shminfo". The second of the two is the same old shminfo
structure that has been used before. The first is the pointer to the shared
memory segment, and should be the same as the shminfo.shmaddr field. I am
not sure why this is a separate parameter.
</para>
<para>
If everything works, you will get back a pixmap, which you can manipulate in
all of the usual ways, with the added bonus of being able to tweak its
contents directly through the shared memory segment. Shared memory pixmaps
are destroyed in the usual manner with XFreePixmap, though you should detach
and destroy the shared memory segment itself as shown above.
</para>
</chapter>
</book>

1274
specs/sync.xml Normal file

File diff suppressed because it is too large Load diff

564
specs/tog-cup.xml Normal file
View file

@ -0,0 +1,564 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<book id="tog-cup">
<bookinfo>
<title>Colormap Utilization Policy and Extension</title>
<subtitle>X Project Team Standard</subtitle>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 1.0</releaseinfo>
<authorgroup>
<author>
<firstname>Kaleb</firstname>
<othername>S.</othername>
<surname>Keithley</surname>
<affiliation><orgname>The Open Group</orgname></affiliation>
</author>
</authorgroup>
<copyright><year>1986-1997</year><holder>The Open Group</holder></copyright>
<legalnotice>
<para>
Permission is hereby granted, free of charge, to any person obtaining a
copy of this
software and associated documentation files (the Software), to use the
Software
without restriction, including, without limitation, the rights to copy,
modify, merge,
publish, distribute and sublicense the Software, to make, have made,
license and
distribute derivative works thereof, and to permit persons to whom the
Software is
furnished to do so, subject to the following conditions:
</para>
<para>
The above copyright notice and the following permission notice shall be
included in all copies of the Software:
</para>
<para>
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
INFRINGEMENT. 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
CONNNECTION WITH THE SOFTWARE OR THE USE OF OTHER DEALINGS IN
THE SOFTWARE.
</para>
<para>
Except as contained in this notice, the name of The Open Group shall not be
used in
advertising or otherwise to promote the use or other dealings in this
Software without prior written authorization from The Open Group.
</para>
<para>
X Window System is a trademark of The Open Group.
</para>
</legalnotice>
</bookinfo>
<chapter id="Overview">
<title>Overview</title>
<para>
This extension has three purposes: a) to provide mechanism for a special
application (a colormap manager) to discover any special colormap
requirements, e.g. the colormap entries that are nominally reserved for
desktop colors in the MS-Windows environment and initialize the default
colormap so that it can be more easily shared; and b) to encourage colormap
sharing and reduce colormap flashing on low-end 8-bit frame buffers by
providing a policy for sharing; and c) when colormaps aren't shared,
define a behavior in the X server color allocation scheme to reduce
colormap flashing.
</para>
<para>
To encourage colormap sharing and accomodate special colormap requirements
two new protocols are defined: the first provides a way to query the
server for a list of reserved colormap entries, and the second is a way
to initialize read-only (shareable) colormap entries at specific locations
in a colormap.
</para>
<para>
To minimize colormap flashing when the root window's default visual is one
of GrayScale, PseudoColor, or DirectColor, and a private colormap for the
default visual is being used, a minor (but compatible) change to the
server implementation of the AllocColor and AllocNamedColor requests is
required. Where the core protocol says nothing about the pixel values
returned, when this extension is in effect, the AllocColor and AllocNamedColor
requests will first look for a matching color in the default colormap, and,
if a match is found and the same cell in the private colormap has not
already been allocated, the color will be allocated in the private colormap
at the same locaton as in the default colormap (instead of in the first
available location.)
</para>
</chapter>
<chapter id="Requests">
<title>Requests</title>
<para>
<function>QueryVersion</function>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
client_major_version: CARD16
</entry>
</row>
<row>
<entry>
client_minor_version: CARD16
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
server_major_version: CARD16
</entry>
</row>
<row>
<entry>
server_minor_version: CARD16
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
If supplied, the client_major_version and client_minor_version indicate
what version of the protocol the client wants the server to implement.
The server version numbers returned indicate the protocol this extension
actually supports. This might not equal the version sent by the client.
An implementation can (but need not) support more than one version
simultaneously. The server_major_version and the server_minor_version
are a mechanism to support future revisions of the TOG-CUP protocol that
may be necessary. In general, the major version would increment for
incompatible changes, and the minor version would increment for small
upward-compatible changes. Servers that support the protocol defined in
this document will return a server_major_version of one (1), and a
server_minor_version of zero (0).
</para>
<para>
<function>GetReservedColormapEntries</function>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
screen: CARD32
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
entries: LISTofCOLORITEM
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request returns a list of colormap entries (pixels) that are reserved
by the system, e.g. MS-Windows reserved desktop colors. This list will, at a
minimum, contain entries for the BlackPixel and WhitePixel of the specified
screen. The do-red, do-green, and do-blue elements of the COLORITEMs are
unused in this reply.
</para>
<para>
Rationale: There are colormap entries (pixels) that, e.g., MS-Windows
desktop reserves as desktop colors, that should not be altered. If they
are altered then X programs will cause colormap flashing between X and
MS-Windows applications running/displaying on the same desktop.
</para>
<para>
<function>StoreColors</function>
</para>
<informaltable frame="none">
<?dbfo keep-together="always" ?>
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
cmap: COLORMAP
</entry>
</row>
<row>
<entry>
items: LISTofCOLORITEM
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
items: LISTofCOLORITEM
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request changes the colormap entries of the specified pixels. The
colormap entries are allocated as if by an AllocColor request. The do-red,
do-green, and do-blue elements of the COLORITEMs are unused in this request.
A boolean alloc-ok element (a bit) is returned indicating whether the
particular pixel was successfully allocated or not. If successfully
allocated the RGB and pixel are returned.
</para>
<para>
A Value error is generated if a pixel is not a valid index into cmap. A
BadMatch error is generated if if cmap does not belong to a GrayScale,
PseudoColor, or DirectColor visual.
</para>
</chapter>
<chapter id="Events_and_Errors">
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
</chapter>
<chapter id='Changes_to_existing_protocol'>
<title>Changes to existing protocol.</title>
<para>
None.
</para>
</chapter>
<chapter id="Encoding">
<title>Encoding</title>
<para>
The name of this extension is "TOG-CUP".
</para>
<para>
The conventions used here are the same as those for the core X11
Protocol Encoding.
</para>
<literallayout class="monospaced">
<function>QueryVersion</function>
1 CARD8 opcode
1 0 TOG-CUP opcode
2 2 request length
2 CARD16 client_major_version
2 CARD16 client_minor_version
=&gt;
1 1 reply
1 unused
2 CARD16 sequence number
4 0 length
2 CARD16 server_major_version
2 CARD16 server_minor_number
20 unused
</literallayout>
<literallayout class="monospaced">
<function>GetReservedColormapEntries</function>
1 CARD8 opcode
1 1 TOG-CUP opcode
2 2 request length
4 CARD32 screen
=&gt;
1 1 reply
1 unused
2 CARD16 sequence number
4 3n length
24 unused
12n LISTofCOLORITEM items
</literallayout>
<literallayout class="monospaced">
<function>StoreColors</function>
1 CARD8 opcode
1 2 TOG-CUP opcode
2 2+3n request length
4 COLORMAP cmap
12n LISTofCOLORITEM items
=&gt;
1 1 reply
1 unused
2 CARD16 sequence number
4 3n length
24 unused
12n LISTofCOLORITEM items
</literallayout>
<para>
(The definition of COLORITEM here is only for the purpose of defining the
additional alloc-ok member in the CUPStoreColors reply.)
</para>
<literallayout class="monospaced">
COLORITEM
4 CARD32 pixel
2 CARD16 red
2 CARD16 green
2 CARD16 blue
1 alloc-ok
#x07 unused
#x08 alloc-ok (1 is True, 0 is False)
#xF0 unused
1 unused
</literallayout>
</chapter>
<chapter id="C_Language_Binding">
<title>C Language Binding</title>
<para>
The C functions provide direct access to the protocol and add no additional
semantics. For complete details on the effects of these functions, refer
to the appropriate protocol request, which can be derived by deleting XCup
at the start of the function. All functions that have return type Status
will return nonzero for success and zero for failure.
</para>
<para>
The include file for this extension is
<function>&lt;X11/extensions/Xcup.h&gt;</function>.
</para>
<funcsynopsis id='XCupQueryVersion'>
<funcprototype>
<funcdef>Status <function> XCupQueryVersion</function></funcdef>
<paramdef>Display*<parameter> display</parameter></paramdef>
<paramdef>int*<parameter> major_version_return</parameter></paramdef>
<paramdef>int*<parameter> minor_version_return</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term>
<emphasis remap='I'>display</emphasis>
</term>
<listitem>
<para>
Specifies the connection to the X server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>major_version_return</emphasis>
</term>
<listitem>
<para>
Returns the major version supported by the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>minor_version_return</emphasis>
</term>
<listitem>
<para>
Returns the minor version supported by the server.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
XCupQueryVersions sets major_version_return and minor_version_return to
the major and minor TOG-CUP protocol version supported by the server. If
the TOG-CUP library is compatible with the version returned by the server,
it returns nonzero. If dpy does not support the TOG-CUP extension, or if
there was an error during communication with the server, or if the server
and library protocol versions are incompatible, it returns zero. No other
XCup functions may be called before this function. If a client violates
this rule, the effects of all subsequent XCup calls that it makes are
undefined.
</para>
<para>
To get the list of reserved colormap entries, use
XCupGetReservedColormapEntries.
</para>
<funcsynopsis id='XCupGetReservedColormapEntries'>
<funcprototype>
<funcdef>Status <function> XCupGetReservedColormapEntries</function></funcdef>
<paramdef>Display*<parameter> display</parameter></paramdef>
<paramdef>int<parameter> screen</parameter></paramdef>
<paramdef>XColor**<parameter> colors_out</parameter></paramdef>
<paramdef>int*<parameter> ncolors</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term>
<emphasis remap='I'>display</emphasis>
</term>
<listitem>
<para>
Specifies the connection to the X server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>colors_out</emphasis>
</term>
<listitem>
<para>
Returns the values reserved by the server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>ncolors</emphasis>
</term>
<listitem>
<para>
Returns the number of items in colors_out.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
The XCupGetReservedColormapEntries function gets system specific colormap
entries. E.g. the MS-Windows desktop uses N colormap entries at the beginning
(0..N) and end (256-N..255) of the colormap. Use XFree to free colors_out.
</para>
<para>
To allocate one or more read-only color cells with RGB values, use
XCupStoreColors.
</para>
<funcsynopsis id='XCupStoreColors'>
<funcprototype>
<funcdef>Status <function> XCupStoreColors</function></funcdef>
<paramdef>Display*<parameter> display</parameter></paramdef>
<paramdef>Colormap<parameter> colormap</parameter></paramdef>
<paramdef>XColor*<parameter> colors_in_out</parameter></paramdef>
<paramdef>int<parameter> ncolors</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term>
<emphasis remap='I'>display</emphasis>
</term>
<listitem>
<para>
Specifies the connection to the X server.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>colormap</emphasis>
</term>
<listitem>
<para>
Specifies the colormap.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>colors_in_out</emphasis>
</term>
<listitem>
<para>
Specifies and returns the values actually used in the colormap.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>ncolors</emphasis>
</term>
<listitem>
<para>
Specifies the number of items in colors_in_out.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
The XCupStoreColors function changes the colormap entries of the pixel
values specified in the pixel members of the XColor structures. The colormap
entries are allocated as if an AllocColor had been used instead, i.e. the
colors are read-only (shareable). XCupStoreColors returns the number of
colors that were successfully allocated in the colormap.
</para>
</chapter>
<chapter id="Using_the_TOG_CUP_extension_and_Colormap_Utilization_Policy">
<title>Using the TOG-CUP extension and Colormap Utilization Policy</title>
<para>
The X server preallocates any hardware or desktop special colors in the
default colormap; e.g. UNIX X servers preallocate Black and White pixels.
PC X servers should also preallocate the MS-Windows desktop colors. (Note
to implementors: in the Sample Implementation special colors are allocated
in the default colormap in cfbCreateDefColormap for dumb memory framebuffers.)
</para>
<para>
To minimize colormap flash an application which installs its own private
colormap should query the special colors by calling
XCupGetReservedColormapEntries, and can then store those entries (in the
proper location) in its private colormap using XCupStoreColors.
</para>
<para>
Applications which allocate many colors in a screen's default colormap, e.g.
a color-cube or a gray-ramp, should allocate them with XCupStoreColors. By
using XCupStoreColors the colors will be allocated sharable (read-only) and
any other application which allocates the same color will share that color
cell.
</para>
</chapter>
</book>

723
specs/xtest.xml Normal file
View file

@ -0,0 +1,723 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % defs SYSTEM "defs.ent"> %defs;
]>
<book id="xtest">
<bookinfo>
<title>XTEST Extension Protocol</title>
<subtitle>X Consortium Standard</subtitle>
<authorgroup>
<author>
<firstname>Kieron</firstname><surname>Drake</surname>
<affiliation><orgname>UniSoft Ltd.</orgname></affiliation>
</author>
</authorgroup>
<releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
<releaseinfo>Version 2.2</releaseinfo>
<copyright><year>1992</year><holder>UniSoft Group Ltd.</holder></copyright>
<copyright><year>1992</year><year>1994</year><holder>X Consortium</holder></copyright>
<legalnotice>
<para>
Permission to use, copy, modify, and distribute this documentation for any
purpose and without fee is hereby granted, provided that the above copyright
notice and this permission notice appear in all copies. UniSoft makes no
representations about the suitability for any purpose of the information in
this document. This documentation is provided "as is" without express or
implied warranty.
</para>
<para>
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:
</para>
<para>
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
</para>
<para>
THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, 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.
</para>
<para>
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.
</para>
</legalnotice>
</bookinfo>
<chapter id="Overview">
<title>Overview</title>
<para>
This extension is a minimal set of client and server extensions
required to completely test the X11 server with no user intervention.
</para>
<para>
This extension is not intended to support general journaling and
playback of user actions. This is a difficult area [XTrap, 89] as it attempts
to synchronize synthetic user interactions with their effects; it is at the
higher level of dialogue recording/playback rather than at the strictly lexical
level. We are interested only in the latter, simpler, case. A more detailed
discussion and justification of the extension functionality is given in
[Drake, 91].
</para>
<para>
We are aiming only to provide a minimum set of facilities that
solve immediate testing and validation problems. The testing extension
itself needs testing, where possible, and so should be as simple as possible.
</para>
<para>
We have also tried to:
</para>
<itemizedlist>
<listitem>
<para>
Confine the extension to an appropriate high level within the server
to minimize portability problems. In practice this means that the extension
should be at the DIX level or use the DIX/DDX interface, or both. This
has effects, in particular, on the level at which "input synthesis"
can occur.
</para>
</listitem>
<listitem>
<para>
Minimize the changes required in the rest of the server.
</para>
</listitem>
<listitem>
<para>
Minimize performance penalties on normal server operation.
</para>
</listitem>
</itemizedlist>
</chapter>
<chapter id="Description">
<title>Description</title>
<para>
The functions provided by this extension fall into two groups:
</para>
<variablelist>
<varlistentry>
<term>Client Operations</term>
<listitem>
<para>
These routines manipulate otherwise hidden client-side behavior. The
actual implementation will depend on the details of the actual language
binding and what degree of request buffering, GContext caching, and so on, is
provided.
In the C binding, defined in "XTEST Extension Library", routines are
provided to access the internals of two opaque data structures
-- <function>GC</function>s
and
<function>Visual</function>s --
and to discard any requests pending within the
output buffer of a connection. The exact details can be expected to differ for
other language bindings.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Server Requests</term>
<listitem>
<para>
The first of these requests is similar to that provided in most
extensions: it allows a client to specify a major and minor version
number to the server and for the server to respond with major and minor
versions of its own. The remaining two requests allow the following:
<!-- .RS -->
</para>
<itemizedlist>
<listitem>
<para>
Access to an otherwise "write-only" server resource: the cursor
associated with a given window
</para>
</listitem>
<listitem>
<para>
Perhaps most importantly, limited synthesis of input device events,
almost as if a cooperative user had moved the pointing device
or pressed a key or button.
</para>
</listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</chapter>
<chapter id="Types">
<title>Types</title>
<para>
The following types are used in the request and event definitions in
subsequent sections:
</para>
<informaltable frame="none">
<tgroup cols='2' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<colspec colname='c2' colwidth="3.0*"/>
<tbody>
<row>
<entry namest="c1" nameend="c2">
FAKE_EVENT_TYPE
{ <function>KeyPress</function>,
<function>KeyRelease</function>,
<function>MotionNotify</function>,
<function>ButtonPress</function>,
<function>ButtonRelease</function> }
</entry>
</row>
<row>
<entry></entry>
</row>
<row>
<entry>FAKE_EVENT</entry>
<entry>[type: FAKE_EVENT_TYPE,</entry>
</row>
<row>
<entry></entry>
<entry>detail: BYTE,</entry>
</row>
<row>
<entry></entry>
<entry>time: TIME,</entry>
</row>
<row>
<entry></entry>
<entry>root: WINDOW,</entry>
</row>
<row>
<entry></entry>
<entry>rootX, rootY: INT16]</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
CURSOR { <function>CurrentCursor</function>, <function> None</function> }
or a cursor as defined by the X11 Protocol.
</para>
</chapter>
<chapter id="Client_Operations">
<title>Client Operations</title>
<para>
These are abstract definitions of functionality. They refer to client-side
objects such as "GC" and "VISUAL" that are quoted to
denote their abstract nature. Concrete versions of these functions are
defined only for particular language bindings. In some circumstances
a particular language binding may not implement the relevant abstract
type or may provide it as a transparent, rather than opaque, type, with
the result that the corresponding function does not make sense or is
not required, respectively.
</para>
<para>
<olink targetdoc='xtestlib' targetptr='XTestSetGContextOfGC'><function>XTestSetGContextOfGC</function></olink>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>gc</emphasis>: "GC"
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>gid</emphasis>: GCONTEXT
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
Sets the GCONTEXT within the "GC" gc to have
the value specified by gid.
</para>
<para>
<olink targetdoc='xtestlib' targetptr='XTestSetVisualIDOfVisual'><function>XTestSetVisualIDOfVisual</function></olink>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>visual</emphasis>: "VISUAL"
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>visualid</emphasis>: VISUALID
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
Sets the VISUALID within the "VISUAL" visual to have
the value specified by visualid.
</para>
<para>
<olink targetdoc='xtestlib' targetptr='XTestDiscard'><function>XTestDiscard</function></olink>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>dpy</emphasis>: "CONNECTION"
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
status: BOOL
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
Discards any requests that are present in the request buffer associated with
the "CONNECTION" dpy.
The status returned is
<function>True</function>
if there were one or more requests
in the buffer and
<function>False</function>
otherwise.
</para>
</chapter>
<chapter id="Server_Requests">
<title>Server Requests</title>
<para>
<function>XTestGetVersion</function>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>clientMajorVersion</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>clientMinorVersion</emphasis>: CARD16
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
serverMajorVersion: CARD16
</entry>
</row>
<row>
<entry>
serverMinorVersion: CARD16
</entry>
</row>
<row>
<entry>
Errors: <function>Length</function>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request can be used to ensure that the server version of the XTEST
extension is usable by the client. This document defines major version two
(2), minor version one (1).
</para>
<para>
<function>XTestCompareCursor</function>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>window</emphasis>: WINDOW
</entry>
</row>
<row>
<entry>
<emphasis remap='I'>cursor-id</emphasis>: CURSOR or
<function>CurrentCursor</function>
or
<function>None</function>
</entry>
</row>
<row>
<entry>
=&gt;
</entry>
</row>
<row>
<entry>
same: BOOL
</entry>
</row>
<row>
<entry>
Errors:
<function>Window</function>,
<function>Length</function>,
<function>Cursor</function>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request looks up the cursor associated with the window and
compares it with either the null cursor if cursor-id is
<function>None ,</function>
or the current cursor (that is, the one being displayed),
or the cursor whose ID is cursor-id, and returns
the result of the comparison in same.
</para>
<para>
<function>XTestFakeInput</function>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>events</emphasis>: LISTofFAKE_EVENT
</entry>
</row>
<row>
<entry>
Errors:
<function>Window</function>,
<function>Length</function>,
<function>Alloc</function>,
<function>Value</function>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
This request simulates the limited set of core protocol
events within the set FAKE_EVENT_TYPE. Only the following event fields,
defined in FAKE_EVENT, are interpreted:
</para>
<variablelist>
<varlistentry>
<term>
<emphasis remap='I'>type</emphasis>
</term>
<listitem>
<para>
This must be one of
<function>KeyPress</function>,
<function>KeyRelease</function>,
<function>MotionNotify</function>,
<function>ButtonPress</function>,
or
<function>ButtonRelease</function>,
or else a
<function>Value</function>
error occurs.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>detail</emphasis>
</term>
<listitem>
<para>
For key events, this field is interpreted as the physical keycode.
If the keycode is less than min-keycode or greater than max-keycode,
as returned in the connection setup, then a
<function>Value</function>
error occurs.
For button events, this field is interpreted as the physical (or core) button,
meaning it will be mapped to the corresponding logical button according to
the most recent
<function>SetPointerMapping</function>
request.
If the button number is less than one or greater than the number of physical
buttons, then a
<function>Value</function>
error occurs.
For motion events, if this field is
<function>True ,</function>
then rootX and rootY
are relative distances from the current pointer location; if this field is
<function>False,</function>
then they are absolute positions.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>time</emphasis>
</term>
<listitem>
<para>
This is either
<function>CurrentTime</function>
(meaning no delay)
or the delay in milliseconds that the server should wait before
simulating this event. No other requests from this client will be
processed until this delay, if any, has expired and subsequent processing
of the simulated event has been completed.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>root</emphasis>
</term>
<listitem>
<para>
In the case of motion events this field is the ID of the root window on
which the new motion is to take place. If
<function>None</function>
is specified, the root window of the screen the pointer is currently on
is used instead.
If this field is not a valid window, then a
<function>Window</function>
error occurs.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<emphasis remap='I'>rootX</emphasis> &amp;
<emphasis remap='I'>rootY</emphasis>
</term>
<listitem>
<para>
In the case of motion events these fields indicate relative distance or
absolute pointer coordinates, according to the setting of detail.
If the specified coordinates are off-screen, the closest on-screen
coordinates will be substituted.
</para>
</listitem>
</varlistentry>
</variablelist>
<para>
When the simulated event(s) are processed, they cause event propagation,
passive grab activation, and so on, just as if the corresponding input device
action had occurred. However, motion events might not be recorded in the
motion history buffer.
</para>
<para>
For the currently supported event types, the event list must have length one,
otherwise a
<function>BadLength</function>
error occurs.
</para>
<para>
<olink targetdoc='xtestlib' targetptr='XTestGrabControl'><function>XTestGrabControl</function></olink>
</para>
<informaltable frame="none">
<tgroup cols='1' align='left' colsep='0' rowsep='0'>
<colspec colname='c1' colwidth="1.0*"/>
<tbody>
<row>
<entry>
<emphasis remap='I'>impervious</emphasis>: BOOL
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>
If impervious is
<function>True</function>,
then the executing client becomes impervious to server grabs;
that is, it can continue executing requests even if another client
grabs the server.
If impervious is
<function>False</function>,
then the executing client returns to the normal state of being
susceptible to server grabs.
</para>
</chapter>
<chapter id="Encoding">
<title>Encoding</title>
<para>
Please refer to the X11 Protocol Encoding document as this document uses
conventions established there.
</para>
<para>
The name of this extension is "XTEST".
</para>
<sect1 id="New_Types">
<title>New Types</title>
<literallayout class="monospaced">
FAKE_EVENT_TYPE
2 KeyPress
3 KeyRelease
4 ButtonPress
5 ButtonRelease
6 MotionNotify
</literallayout>
<para>
NOTE that the above values are defined to be the same as those for
the corresponding core protocol event types.
</para>
</sect1>
<sect1 id="Requests">
<title>Requests</title>
<literallayout class="monospaced">
<function>XTestGetVersion</function>
1 CARD8 opcode
1 0 xtest opcode
2 2 request length
1 CARD8 client major version
1 unused
2 CARD16 client minor version
=&gt;
1 1 Reply
1 CARD8 server major version
2 CARD16 sequence number
4 0 reply length
2 CARD16 server minor version
22 unused
</literallayout>
<literallayout class="monospaced">
<function>XTestCompareCursor</function>
1 CARD8 opcode
1 1 xtest opcode
2 3 request length
4 WINDOW window
4 CURSOR cursor-id
0 None
1 CurrentCursor
=&gt;
1 1 Reply
1 BOOL cursors are the same
2 CARD16 sequence number
4 0 reply length
24 unused
</literallayout>
<literallayout class="monospaced">
<function>XTestFakeInput</function>
1 CARD8 opcode
1 2 xtest opcode
2 1+(1*8) request length
1 FAKE_EVENT_TYPE fake device event type
1 BYTE detail: button or keycode
2 unused
4 TIME delay (milliseconds)
0 CurrentTime
4 WINDOW root window for MotionNotify
0 None
8 unused
2 INT16 x position for MotionNotify
2 INT16 y position for MotionNotify
8 unused
</literallayout>
<literallayout class="monospaced">
<olink targetdoc='xtestlib' targetptr='XTestGrabControl'><function>XTestGrabControl</function></olink>
1 CARD8 opcode
1 3 xtest opcode
2 2 request length
1 BOOL impervious
3 unused
</literallayout>
</sect1>
</chapter>
<chapter id="References">
<title>References</title>
<para>
Annicchiarico, D., et al.,
<emphasis remap='I'>XTrap: The XTrap Architecture</emphasis>.
Digital Equipment Corporation, July 1991.
</para>
<para>
Drake, K. J.,
<emphasis remap='I'>Some Proposals for a
Minimum X11 Testing Extension</emphasis>.
UniSoft Ltd., June 1991.
</para>
</chapter>
</book>

181
syncconst.h Normal file
View file

@ -0,0 +1,181 @@
/*
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.
******************************************************************/
#ifndef _SYNCCONST_H_
#define _SYNCCONST_H_
#define SYNC_NAME "SYNC"
#define SYNC_MAJOR_VERSION 3
#define SYNC_MINOR_VERSION 1
#define XSyncCounterNotify 0
#define XSyncAlarmNotify 1
#define XSyncAlarmNotifyMask (1L << XSyncAlarmNotify)
#define XSyncNumberEvents 2L
#define XSyncBadCounter 0L
#define XSyncBadAlarm 1L
#define XSyncBadFence 2L
#define XSyncNumberErrors (XSyncBadFence + 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)
/* 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)
/*
* 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 XID XSyncFence;
typedef struct _XSyncValue {
int hi;
unsigned int lo;
} XSyncValue;
#endif /* _SYNCCONST_H_ */

474
syncproto.h Normal file
View file

@ -0,0 +1,474 @@
/*
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.
******************************************************************/
#ifndef _SYNCPROTO_H_
#define _SYNCPROTO_H_
#include <X11/extensions/syncconst.h>
#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 X_SyncCreateFence 14
#define X_SyncTriggerFence 15
#define X_SyncResetFence 16
#define X_SyncDestroyFence 17
#define X_SyncQueryFence 18
#define X_SyncAwaitFence 19
/* 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
#define XSyncFence CARD32
#define Drawable 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
/*
* Create Fence
*/
typedef struct _xSyncCreateFenceReq {
CARD8 reqType;
CARD8 syncReqType;
CARD16 length B16;
Drawable d B32;
XSyncFence fid B32;
BOOL initially_triggered;
CARD8 pad0;
CARD16 pad1;
} xSyncCreateFenceReq;
#define sz_xSyncCreateFenceReq 16
/*
* Put a fence object in the "triggered" state.
*/
typedef struct _xSyncTriggerFenceReq {
CARD8 reqType;
CARD8 syncReqType;
CARD16 length B16;
XSyncFence fid B32;
} xSyncTriggerFenceReq;
#define sz_xSyncTriggerFenceReq 8
/*
* Put a fence in the "untriggered" state.
*/
typedef struct _xSyncResetFenceReq {
CARD8 reqType;
CARD8 syncReqType;
CARD16 length B16;
XSyncFence fid B32;
} xSyncResetFenceReq;
#define sz_xSyncResetFenceReq 8
/*
* Destroy a fence object
*/
typedef struct _xSyncDestroyFenceReq {
CARD8 reqType;
CARD8 syncReqType;
CARD16 length B16;
XSyncFence fid B32;
} xSyncDestroyFenceReq;
#define sz_xSyncDestroyFenceReq 8
/*
* Query a fence object
*/
typedef struct _xSyncQueryFenceReq {
CARD8 reqType;
CARD8 syncReqType;
CARD16 length B16;
XSyncFence fid B32;
} xSyncQueryFenceReq;
#define sz_xSyncQueryFenceReq 8
/*
* Wait for any of a list of fence sync objects
* to reach the "triggered" state.
*/
typedef struct _xSyncAwaitFenceReq {
CARD8 reqType;
CARD8 syncReqType;
CARD16 length B16;
} xSyncAwaitFenceReq;
#define sz_xSyncAwaitFenceReq 4
typedef struct {
BYTE type;
CARD8 unused;
CARD16 sequenceNumber B16;
CARD32 length B32;
BOOL triggered;
BYTE pad0;
CARD16 pad1 B16;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xSyncQueryFenceReply;
#define sz_xSyncQueryFenceReply 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
#undef XSyncFence
#undef Drawable
#endif /* _SYNCPROTO_H_ */

182
syncstr.h Normal file
View file

@ -0,0 +1,182 @@
/*
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.
******************************************************************/
#ifndef _SYNCSTR_H_
#define _SYNCSTR_H_
#include <X11/extensions/syncproto.h>
#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_ */

9
xextproto.pc.in Normal file
View file

@ -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}

41
xtestconst.h Normal file
View file

@ -0,0 +1,41 @@
/*
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 _XTEST_CONST_H_
#define _XTEST_CONST_H_
#define XTestNumberEvents 0
#define XTestNumberErrors 0
#define XTestCurrentCursor ((Cursor)1)
#define XTestMajorVersion 2
#define XTestMinorVersion 2
#define XTestExtensionName "XTEST"
#endif

160
xtestext1const.h Normal file
View file

@ -0,0 +1,160 @@
/*
* 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.
*/
#ifndef _XTESTEXT1CONST_H
#define _XTESTEXT1CONST_H 1
#define XTestMAX_ACTION_LIST_SIZE 64
#define XTestACTIONS_SIZE 28
/*
* 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
/*
* 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
/*
* 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)
/*
* 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
#endif /* _XTESTEXT1CONST_H */

221
xtestext1proto.h Normal file
View file

@ -0,0 +1,221 @@
/*
* 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.
*/
#ifndef _XTESTEXT1PROTO_H
#define _XTESTEXT1PROTO_H 1
#include <X11/extensions/xtestext1const.h>
/*
* the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h
*/
/*
* 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.
*/
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).
*/
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;
/*
* These are the definitions for key/button motion input actions.
*/
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.
*/
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.
*/
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;
#endif /* _XTESTEXT1PROTO_H */

124
xtestproto.h Normal file
View file

@ -0,0 +1,124 @@
/*
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 _XTESTPROTO_H_
#define _XTESTPROTO_H_
#include <X11/extensions/xtestconst.h>
#define Window CARD32
#define Time CARD32
#define Cursor CARD32
#define X_XTestGetVersion 0
#define X_XTestCompareCursor 1
#define X_XTestFakeInput 2
#define X_XTestGrabControl 3
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 /* _XTESTPROTO_H_ */