summaryrefslogtreecommitdiff
path: root/proto/xextproto
diff options
context:
space:
mode:
Diffstat (limited to 'proto/xextproto')
-rw-r--r--proto/xextproto/ChangeLog194
-rw-r--r--proto/xextproto/INSTALL291
-rw-r--r--proto/xextproto/configure.ac2
-rw-r--r--proto/xextproto/shmstr.h3
-rw-r--r--proto/xextproto/specs/Makefile.am20
-rw-r--r--proto/xextproto/specs/appendix.xml61
-rw-r--r--proto/xextproto/specs/appgroup.xml248
-rw-r--r--proto/xextproto/specs/appgrp.xml1018
-rw-r--r--proto/xextproto/specs/dbe.xml4
-rw-r--r--proto/xextproto/specs/dpms.xml17
-rw-r--r--proto/xextproto/specs/evi.xml29
-rw-r--r--proto/xextproto/specs/geproto.xml4
-rw-r--r--proto/xextproto/specs/lbx.xml6291
-rw-r--r--proto/xextproto/specs/multibuf.xml79
-rw-r--r--proto/xextproto/specs/security.xml4
-rw-r--r--proto/xextproto/specs/shape.xml34
-rw-r--r--proto/xextproto/specs/shm.xml23
-rw-r--r--proto/xextproto/specs/sync.xml239
-rw-r--r--proto/xextproto/specs/tog-cup.xml30
-rw-r--r--proto/xextproto/specs/xtest.xml37
-rw-r--r--proto/xextproto/syncconst.h6
-rw-r--r--proto/xextproto/syncproto.h96
-rw-r--r--proto/xextproto/syncstr.h2
23 files changed, 8312 insertions, 420 deletions
diff --git a/proto/xextproto/ChangeLog b/proto/xextproto/ChangeLog
index 716313832..778f35af8 100644
--- a/proto/xextproto/ChangeLog
+++ b/proto/xextproto/ChangeLog
@@ -1,3 +1,197 @@
+commit c593fd1000ceb83f0933361c5e7496d799233f7e
+Author: Keith Packard <keithp@keithp.com>
+Date: Sat Feb 26 23:57:48 2011 -0800
+
+ Version 7.2.0
+
+ Signed-off-by: Keith Packard <keithp@keithp.com>
+
+commit a6a542841e85344115bbb6a1ba35c4f3487995e4
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Feb 25 08:53:55 2011 -0500
+
+ Docbook: change the book id to match the xml file basename
+
+ This is required for the up-coming external references support.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit d16788e87438015d3e121ffb046bc6a4ce01da89
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Fri Feb 25 08:51:47 2011 -0500
+
+ Docbook: change the book id to match the xml file basename
+
+ This is required for the up-coming external references support.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 8c6cc9ddb5776a2b32d42a41d27b3df56e62c44f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Feb 24 20:44:00 2011 -0500
+
+ Docbook: change the book id to match the xml file basename
+
+ Rename appgroup.xml as it conflicts with xorg-docs/specs/Xserver/appgroup.xml
+ This is required for the up-coming external references support.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 9df8b77604b7ea7132d32f65f2280720b91249c1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Dec 16 23:54:45 2010 -0800
+
+ specs: Fix section titles/nesting
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6aa72ae8e629e065f09a6b6c05504363806d76a3
+Author: Paulo Zanoni <pzanoni@mandriva.com>
+Date: Tue Dec 14 16:23:56 2010 -0200
+
+ Use the same docbookx.dtd version (4.3) for all docs
+
+ This way we don't need to require 4.1.2 and 4.5
+ The geproto xml was inconsistent, by the way.
+
+ Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
+ Reviewed-by: Matt Dew <matt@osource.org>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 77c2b72d8df53e918b0fbff5425af82ac7f5693a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Dec 9 17:43:29 2010 -0800
+
+ specs/sync.xml: Fix minor typos in document title section
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b4e8a6fb63715442b4927d18d9cdd7ee78e50d00
+Author: James Jones <jajones@nvidia.com>
+Date: Mon Nov 29 09:35:50 2010 -0800
+
+ Bump version to 7.1.99.0
+
+ Use version 7.1.99.0 to mark the inclusion of
+ Fence Sync protocol support.
+
+ Signed-off-by: James Jones <jajones@nvidia.com>
+ Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+ Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6e696a0a4c9a115c7f080c2bdee3d8afc16b134f
+Author: James Jones <jajones@nvidia.com>
+Date: Wed Feb 24 15:57:29 2010 -0800
+
+ Add protocol for XSyncAwaitFence()
+
+ Add the fence sync object equivalent of
+ XSyncAwait()
+
+ Signed-off-by: James Jones <jajones@nvidia.com>
+ Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+ Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 220b824f20dc3dd0fd6eae6e2896fb63aefbf11a
+Author: James Jones <jajones@nvidia.com>
+Date: Mon Feb 22 17:01:16 2010 -0800
+
+ Add XSyncQueryFence()
+
+ Allows callers to query whether a given fence sync
+ object is currently triggered or not.
+
+ Signed-off-by: James Jones <jajones@nvidia.com>
+ Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+ Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d079ee210726d2407fa9c8cf99555daf2d96023a
+Author: James Jones <jajones@nvidia.com>
+Date: Fri Feb 12 16:38:08 2010 -0800
+
+ Initial Fence Sync support
+
+ Defines the protocol for creation and basic
+ management of binary state sync objects.
+ The following operations are defined:
+
+ -Creation
+ -Destruction
+ -Trigger
+ -Reset
+
+ Signed-off-by: James Jones <jajones@nvidia.com>
+ Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+ Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 9ba2065b63ea0e61a17b8221ad454c02a1755373
+Author: James Jones <jajones@nvidia.com>
+Date: Wed Aug 11 15:03:59 2010 -0700
+
+ Document changes in XSync version 3.1
+
+ Signed-off-by: James Jones <jajones@nvidia.com>
+ Reviewed-by: Pierre-Loup Griffais <pgriffais@nvidia.com>
+ Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
+ Reviewed-by: Robert Morell <rmorell@nvidia.com>
+ Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fd8a26edefc53b370c554a60c75ff32fc60b99c8
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Nov 30 09:05:07 2010 -0500
+
+ specs: add low bandwith spec from xorg-docs
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 3102665110846af5c87792b221e1ef6a9dc1a0e2
+Author: Matt Dew <matt@osource.org>
+Date: Mon Nov 29 16:29:44 2010 -0500
+
+ specs: add appgroup specs in DocBook/XML format
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit f6ee80371c4bf9ebd99418a4328a351186ac0847
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Nov 9 15:19:09 2010 -0500
+
+ config: HTML file generation: use the installed copy of xorg.css
+
+ Currenlty the xorg.css file is copied in each location
+ where a DocBook/XML file resides. This produces about
+ 70 copies in the $(docdir) install tree.
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 6fbb74bfe75adc7cfd6d4bc642d7d4179a3db17d
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date: Tue Sep 28 13:30:04 2010 -0700
+
+ Purge cvs tags.
+
+ Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5508eec058c0ffbb180f3d98f8a02083d6de428b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Thu Sep 9 16:41:21 2010 -0400
+
+ Remove the appgroup specs which is the one for the server side.
+
+ The spec for the protocol side is still in Framemaker format.
+ See doc/xorg-docs/specs/Xext/AppGroup.mif
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 5daf9cff36df7423f6247fc8174b8e6c9443ed07
+Author: Adam Jackson <ajax@redhat.com>
+Date: Tue Aug 10 10:24:51 2010 -0400
+
+ xextproto 7.1.2
+
+ Signed-off-by: Adam Jackson <ajax@redhat.com>
+
commit 35741d9dc745532dc4af37cc07e256392e3880da
Author: Gaetan Nadon <memsize@videotron.ca>
Date: Tue Aug 3 11:03:49 2010 -0400
diff --git a/proto/xextproto/INSTALL b/proto/xextproto/INSTALL
new file mode 100644
index 000000000..8b82ade08
--- /dev/null
+++ b/proto/xextproto/INSTALL
@@ -0,0 +1,291 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package. The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system.
+
+ Running `configure' might take a while. While running, it prints
+ some messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+ 6. Often, you can also type `make uninstall' to remove the installed
+ files again.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you can use GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory. After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+ On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor. Like
+this:
+
+ ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+ CPP="gcc -E" CXXCPP="g++ -E"
+
+ This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+ By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc. You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+ On HP-UX, the default C compiler is not ANSI C compatible. If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+ ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+ On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file. The option `-nodtk' can be used as
+a workaround. If GNU CC is not installed, it is therefore recommended
+to try
+
+ ./configure CC="cc"
+
+and if that doesn't work, try
+
+ ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug. Until the bug is fixed you can use this workaround:
+
+ CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+ Print a summary of the options unique to this package's
+ `configure', and exit. The `short' variant lists options used
+ only in the top level, while the `recursive' variant lists options
+ also present in any nested packages.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+ Use DIR as the installation prefix. *Note Installation Names::
+ for more details, including other options available for fine-tuning
+ the installation locations.
+
+`--no-create'
+`-n'
+ Run the configure checks, but stop before creating any output
+ files.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/proto/xextproto/configure.ac b/proto/xextproto/configure.ac
index 599651b35..dd30292e3 100644
--- a/proto/xextproto/configure.ac
+++ b/proto/xextproto/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([XExtProto], [7.1.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
+AC_INIT([XExtProto], [7.2.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
diff --git a/proto/xextproto/shmstr.h b/proto/xextproto/shmstr.h
index 635886053..78f375962 100644
--- a/proto/xextproto/shmstr.h
+++ b/proto/xextproto/shmstr.h
@@ -1,4 +1,3 @@
-/* $XFree86: xc/include/extensions/shmstr.h,v 3.3 2001/12/14 19:53:29 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@@ -30,8 +29,6 @@ in this Software without prior written authorization from The Open Group.
#ifndef _SHMSTR_H_
#define _SHMSTR_H_
-/* $Xorg: shmstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
-
#include <X11/extensions/shmproto.h>
#ifdef _XSHM_SERVER_
diff --git a/proto/xextproto/specs/Makefile.am b/proto/xextproto/specs/Makefile.am
index 3e631a138..e689dff35 100644
--- a/proto/xextproto/specs/Makefile.am
+++ b/proto/xextproto/specs/Makefile.am
@@ -23,11 +23,12 @@
if ENABLE_SPECS
doc_sources = \
- appgroup.xml \
+ appgrp.xml \
dbe.xml \
dpms.xml \
evi.xml \
geproto.xml \
+ lbx.xml \
multibuf.xml \
security.xml \
shape.xml \
@@ -36,7 +37,7 @@ doc_sources = \
tog-cup.xml \
xtest.xml
-dist_doc_DATA = $(doc_sources)
+dist_doc_DATA = $(doc_sources) appendix.xml
if HAVE_XMLTO
doc_DATA = $(doc_sources:.xml=.html)
@@ -50,27 +51,24 @@ doc_DATA += $(doc_sources:.xml=.txt)
endif
if HAVE_STYLESHEETS
-XMLTO_FLAGS = -m $(XSL_STYLESHEET)
-
-doc_DATA += xorg.css
-xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
- $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+XMLTO_FLAGS = -m $(XSL_STYLESHEET) \
+ --stringparam html.stylesheet=$(STYLESHEET_SRCDIR)/xorg.css
endif
CLEANFILES = $(doc_DATA)
SUFFIXES = .xml .ps .pdf .txt .html
-.xml.txt:
+%.txt: %.xml $(dist_doc_DATA)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
-.xml.html:
+%.html: %.xml $(dist_doc_DATA)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
-.xml.pdf:
+%.pdf: %.xml $(dist_doc_DATA)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
-.xml.ps:
+%.ps: %.xml $(dist_doc_DATA)
$(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
endif HAVE_XMLTO
diff --git a/proto/xextproto/specs/appendix.xml b/proto/xextproto/specs/appendix.xml
new file mode 100644
index 000000000..b6c0f1de3
--- /dev/null
+++ b/proto/xextproto/specs/appendix.xml
@@ -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>
diff --git a/proto/xextproto/specs/appgroup.xml b/proto/xextproto/specs/appgroup.xml
deleted file mode 100644
index eebf843c2..000000000
--- a/proto/xextproto/specs/appgroup.xml
+++ /dev/null
@@ -1,248 +0,0 @@
-<?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">
-
-
-<book id="appgroup">
-
-<bookinfo>
- <title>Description of the Application Group Extension</title>
- <subtitle>Implementation for the X11 Sample Server</subtitle>
- <releaseinfo>Version 1.0</releaseinfo>
- <authorgroup>
- <author>
- <firstname>Kaleb </firstname><surname>KEITHLEY</surname>
- <affiliation><orgname>FUJITSU Limited.</orgname></affiliation>
- <email>blah@blah.com</email>
- </author>
- </authorgroup>
- <corpname>X Consortium Standard</corpname>
- <copyright><year>1996</year><holder>X Consortium</holder></copyright>
- <affiliation><orgname>X Consortium</orgname></affiliation>
- <productnumber>X Version 11, Release 7</productnumber>
-
-<abstract>
-<para>
-The following document explains the server side of the Application
-Group Extension.
-</para>
-</abstract>
-
-<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 "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-</para>
-
-<para>
-The following document explains the server side of the Application
-Group Extension.
-</para>
-
-<para>
-WindowsNT is a trademark of Microsoft, Inc. Macintosh and Apple
-are trademarks of Apple Computer, Inc. X Window System is a
-trademark of X Consortium, Inc.
-</para>
-</legalnotice>
-</bookinfo>
-
-<chapter>
-<title>TITLE</title>
-<para>
-To understand this document and the accompanying source code, you
-should know the C language, should be familiar with X server
-internals, and should also have a general knowledge of the X
-Window System.
-</para>
-
-<sect1 id="AppGroup_Server_Public_Functions">
-<title>AppGroup Server Public Functions</title>
-<para>
-The AppGroup extension adds seven new functions that are called
-from elsewhere in the server. They are: XagExtensionInit,
-XagDefaultColormap, XagRootVisual, XagLeader, XagIsControlledRoot,
-XagConnectionInfo, XagCallClientStateChange.
-</para>
-<para>
-XagExtensionInit is the extension initialization function called
-from InitExtension in mi/miinitext.c. Note that an new resource
-type, RT_APPGROUP, is created, specifying the destructor function
-XagAppGroupFree.
-</para>
-<para>
-XagDefaultColormap returns the colormap ID that was specified in
-the creation of the AppGroup. Any time CopyFromParent is specified
-for a top-level window's colormap, i.e. in a CreateWindow or
-ChangeWindowAttributes request, this function is called to see
-if there is an AppGroup specific colormap to use. If there is
-one, its ID is returned, otherwise None is returned.
-</para>
-<para>
-XagRootVisual returns the visual ID that was specified in the
-creation of the Appgroup. Like XagDefaultColormap, when CopyFromParent
-is specified for a top-level window's visual in a CreateWindow
-request, this function is called to see if there is an AppGroup
-specific visual to use. If there is one, its ID is returned,
-otherwise 0 (zero) is returned.
-</para>
-<para>
-XagLeader returns the ClientPtr of the client that is the AppGroup
-Leader. Normally when an application maps or configures a top-level
-window a MapRequest or ConfigureRequest event is delivered to the
-client, e.g. a window manager, that has selected SubstructureRedirect
-on the root window. However, when the application is part of an
-AppGroup, the MapRequest and ConfigureRequest events are delivered
-to the AppGroup Leader instead.
-</para>
-<para>
-XagIsControlledRoot returns a boolean: True if the window is a
-top-level window of a client in an AppGroup, False otherwise.
-In a combined server, i.e. one that provides both UI and printing,
-the application may create and map windows on the "printing"
-screens; thus it becomes necessary to discriminate between the
-AppGroup's root window and other root windows. If an AppGroup
-member creates and maps a [top-level] window then the window's
-parent [the root window] is tested to determine whether to send
-MapRequest or ConfigureRequest events to the AppGroup Leader to
-to some other client.
-</para>
-<para>
-In the trivial case XagIsControlledRoot returns True if the parent
-window has no parent itself, i.e. it is a root window. In the case
-where the application is embedded, indicated by the singleScreen
-attribute being True, the parent's drawable ID is compared to the
-AppGroup's root window ID, and if it is the same, True is returned.
-If neither case is true, then False is returned.
-</para>
-<para>
-XagConnectionInfo returns an abreviated version of the connection
-setup information. When an embedded AppGroup is created the server
-returns only the information about the [UI] screen that the
-application is embedded within in the connection setup in order to
-prevent the application from creating windows on other screens;
-thus attempting to guarantee that any window that should be embedded
-can be reparented into the AppGroup Leader's window hierarchy.
-</para>
-<para>
-XagCallClientStateChange is called to invoke the extension's client
-state change callback additional times as necessary -- currently
-only once, after the auth data becomes available between
-ClientStateInitial and ClientStateConnected. Client state change
-callbacks were introduced in the Record extension, which specifies
-when the callbacks are invoked. Unfortunately the points at which
-they are called are not necessarily the best as far as the AppGroup
-Extension is concerned. Adding an additional state and calling all
-the callbacks works too, however this seemed unnecessary overkill.
-</para>
-</sect1>
-
-<sect1 id="AppGroup_Server_Private_APIs">
-<title>AppGroup Server Private APIs</title>
-<para>
-The AppGroup extension adds the following functions which are
-private to the extension: ProcXagDispatch and SProcXagDispatch,
-ProcXagQueryVersion and SProcXagQueryVersion, ProcXagCreate and
-SProcXagCreate, ProcXagDestroy and SProcXagDestroy,
-ProcGetAttr and SProcGetAttr, ProcXagQuery and SProcXagQuery,
-ProcXagCreateAssoc and SProcXagCreateAssoc, ProcXagDestroyAssoc
-and SProcXagDestroyAssoc, XagResetProc, and XagAppGroupFree.
-</para>
-<para>
-The ProcXagDispatch, SProcXagDispatch, and XagResetProc functions
-should be familiar to anyone familiar with X server internals and
-I won't elaborate on them here. Similarly the wrapper functions:
-SProcXagQueryVersion, SProcXagCreate, SProcXagDestroy, SProcXagGetAttr,
-SProcXagQuery, SProcXagCreateAssoc, and SProcXagDestroyAssoc, as
-wrappers which handle swapping integer data into the host's byte
-order will not be explained in any detail.
-</para>
-<para>
-ProcXagQueryVersion returns the major and minor versions of the
-AppGroup extension supported by the server.
-</para>
-<para>
-ProcXagCreate creates an AppGroup. A new record in a linked list
-of AppGroups is allocated and initialized. The attributes from the
-request are validated and copied to the AppGroup record. If necessary
-an abbreviated version of the connection setup information is compiled
-and also stored in the AppGroup record. The first time an AppGroup
-is created a client-state-change callback is registered and a
-reference count is incremented.
-</para>
-<para>
-ProcXagDestroy destroys an AppGroup an AppGroup by calling
-FreeResource specifying the AppGroup ID. This will result in
-the destructor function XagAppGroupFree being called. The
-reference count is decremented and when it reaches zero the
-client-state-change callback is deleted.
-</para>
-<para>
-ProcXagGetAttr returns the AppGroup Attributes to the requesting
-client.
-</para>
-<para>
-ProcXagQuery returns the AppGroup ID of an arbitrary resource to
-the requesting client.
-</para>
-<para>
-ProcXagCreateAssoc creates an association between an X window ID
-and system-specific data. In native X this functionality is
-unnecessary but for various personal computers, e.g. Macintosh,
-OS/2, and MS-Windows it is necessary to associate an X window ID
-with the system's native window identifier so that when the
-AppGroup Leader issues a ReparentWindow request the personal
-computer X server can lookup the system-specific window ID and
-make the necessary function call(s) with it.
-</para>
-<para>
-ProcXagDestroyAssoc destroys the association created with
-ProcXagCreateAssoc.
-</para>
-<para>
-XagResetProc removes the client-state-change callback, sets the
-reference count to zero, and frees all the AppGroup records in
-the linked list by calling XagAppGroupFree.
-</para>
-<para>
-XagAppGroupFree calls CloseDownClient for each client in an
-AppGroup if the AppGroup has a leader, unlinks the AppGroup
-record from the linked list, frees allocated memory referenced
-by the record, and finally frees the record itself.
-</para>
-</sect1>
-
-<sect1 id="Known_Problems_in_this_release_">
-<title>Known Problems in this release.</title>
-<para>
-In a combined UI/Print server the connection setup returned to an
-embedded application will not have information about the print
-screens.
-</para>
-<para>
-The LBX proxy caches connection setup information and will return
-incorrect connection setup information to an embedded client.
-</para>
-</sect1>
-</chapter>
-</book>
diff --git a/proto/xextproto/specs/appgrp.xml b/proto/xextproto/specs/appgrp.xml
new file mode 100644
index 000000000..099fca1f0
--- /dev/null
+++ b/proto/xextproto/specs/appgrp.xml
@@ -0,0 +1,1018 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE article
+ PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<article id="appgrp">
+
+<articleinfo>
+ <title>Application Group Extension to the X Protocol</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <authorgroup>
+ <author>
+ <firstname>Kaleb</firstname>
+ <othername>S.</othername>
+ <surname>KEITHLEY</surname>
+ <affiliation><orgname>X Consortium, Inc</orgname></affiliation>
+ <email>kaleb@x.org</email>
+ </author>
+ </authorgroup>
+ <releaseinfo>X Version 11, Release 6.4</releaseinfo>
+ <date>27 September 1996</date>
+
+<legalnotice>
+<para>
+Copyright © 1996 X Consortium, Inc. All Rights Reserved.
+</para>
+
+<para>
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM,
+DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
+OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+OR THE USE OF 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>
+
+<abstract>
+<para>
+The Application Group Extension to the X protocol is intended to provide a framework to allow
+more than one program to manage X applications on the desktop. The initial use of this extension
+will be to insert or embed the windows of X programs into the windows of another program, such
+as a web browser. This extension is not intended to address larger embedding issues that, for
+example, OpenDoc does, such as shared menu bars, etc.
+</para>
+</abstract>
+</articleinfo>
+
+<sect1 id='purpose_and_goals'>
+<title>Purpose and Goals</title>
+
+<para>
+The Application Group Extension to the X protocol is intended to provide
+a framework to allow more than one program to manage X applications on
+the desktop. The initial use of this extension will be to insert or embed
+the windows of X programs into the windows of another program, such as a
+web browser. This extension is not intended to address larger embedding
+issues that, for example, OpenDoc does, such as shared menu bars, etc.
+Using X programs on the World Wide Web allows for greater control of the
+presentation and takes advantage of the existing body of X programs rather
+than re-implement them in another language. In addition it allows the
+embedding of non-X programs into web browsers by using third party products
+like Wabi, MAE, and WinCenter.
+<footnote><para>
+Wabi is a trademark of Sun Microsystems, Inc. MAE is a trademark of Apple
+Computer, Inc. WinCenter is a trademark of Network Computing Devices, Inc.
+</para></footnote>
+</para>
+
+</sect1>
+
+<sect1 id='overview_of_the_protocol'>
+<title>Overview of the protocol.</title>
+
+<para>
+This extension introduces the concept of an Application Group. An Application Group is a set of one or more applications that are primarily managed by a special application known as the Application Group Leader, which, for example, might be a web browser. The primary purpose of Application Groups is to provide a means of sharing the Substructure-Redirect attribute of the root window between the window manager and one or more Application Group Leaders.
+</para>
+
+<para>
+To join an Application Group an application must present the proper authorization during the connection setup. Authorizations are generated by the X server at the request of an Application Group Leader, and are then stored for the application to use to establish its connection to the X server. To generate an authorization the Application Group Leader sends a request to the server naming the Application Group to which the authorization will be bound, and any applications that connect using that authorization will automatically become part of the associated Application Group. The protocol to generate an authorization is defined in the Security Extension specification.
+</para>
+
+<para>
+As a member of an Application Group, when an application creates and maps a window as a child of the root window, the MapRequest and ConfigureRequest events are delivered to the Application Group Leader instead of the window manager. The Application Group Leader may then reparent the window into its own window hierarchy; or reissue the map request, in which case the window comes under the control of the window manager.
+</para>
+
+</sect1>
+<sect1 id='requests'>
+<title>Requests</title>
+
+
+<para><emphasis role='bold'>AppGroupQueryVersion</emphasis></para>
+
+<informaltable>
+<tgroup cols='1'>
+<colspec colsep='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 application wants the server to implement. The server version numbers returned indicate the version of the protocol the X server actually supports. This may not match the versions requested by the application. An implementation may (but need not) support more than one version simultaneously. The server_major_version and server_minor_version numbers are a mechanism to support any future revisions of the Application Group extension 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. X servers that support the protocol defined in this document will return a server_major_version of 1 and a server_minor_version of 0.
+</para>
+
+
+<para><emphasis role='bold'>AppGroupCreate</emphasis></para>
+
+<informaltable>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row>
+ <entry>app_group: APPGROUP</entry>
+ </row>
+ <row>
+ <entry>value_mask: BITMASK</entry>
+ </row>
+ <row>
+ <entry>value_list: LISTofVALUE</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+This request creates an Application Group using app_group as the Application Group ID.
+</para>
+
+
+<para>
+&nbsp;
+</para>
+
+
+<para>
+The value_mask and value_list specify attributes of the Application Group that are to be explicitly initialized. The attributes, their types, and the default values are:
+</para>
+
+<informaltable frame="all">
+<tgroup cols='3'>
+<colspec colsep='0'/>
+<colspec colsep='0'/>
+<colspec colsep='0'/>
+<tbody>
+ <row>
+ <entry>Attribute</entry>
+ <entry>Type</entry>
+ <entry>Default</entry>
+ </row>
+ <row>
+ <entry>app_group_leader</entry>
+ <entry>Bool</entry>
+ <entry>True</entry>
+ </row>
+ <row>
+ <entry>single_screen</entry>
+ <entry>Bool</entry>
+ <entry>True</entry>
+ </row>
+ <row>
+ <entry>default_root</entry>
+ <entry>Window</entry>
+ <entry>None</entry>
+ </row>
+ <row>
+ <entry>root_visual</entry>
+ <entry>VisualID</entry>
+ <entry>None</entry>
+ </row>
+ <row>
+ <entry>default_colormap</entry>
+ <entry>Colormap</entry>
+ <entry>None</entry>
+ </row>
+ <row>
+ <entry>black_pixel</entry>
+ <entry>Pixel</entry>
+ <entry>0</entry>
+ </row>
+ <row>
+ <entry>white_pixel</entry>
+ <entry>Pixel</entry>
+ <entry>0</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+If the single_screen attribute is True then the number of video screens returned to a program in the Application Group in the connection setup message is one, irrespective of how many video screens the server actually has. If a server supports both video and print screens, then all print screens will always be returned. If single_screen is specified as True then the connection setup message will contain only the information about the video screen which has default_root as its root window, plus any print screens.
+</para>
+
+<note><para>
+The intent is to allow an embedding manager to ensure that it will be able to reparent any top-level windows that Application Group members create. By hiding the fact that there are other screens it can be reasonably assured that applications will only create top-level windows on the same screen that it itself appears on. An embedding manager should take care not to supply an invalid display, e.g. :0.1, to a program that will be in an Application Group where the single_screen attribute is True.
+</para></note>
+
+<para>
+If single_screen is set to True default_root specifies which screen will be returned as screen zero in the connection setup message for applications in the Application Group. If set to None, then the real screen zero is used, otherwise the screen which has default_root as its root window will be used.
+</para>
+
+
+<para>
+If single_screen is set to True the root_visual and default_colormap attributes may be used to over-ride the default values that are returned in the connection setup information returned to new programs in the Application Group. If None is specified for root_visual or default_colormap then the normal default values for the screen (possibly spedified by default_root) are used, otherwise the specified values are used. If root_visual and/or default_colormap are specified they must be valid, i.e. root_visual must be a visual type available on the screen, and the colormap, if specified, must be a valid colormap for the visual that is used.
+</para>
+
+<para>
+IF single_screen is set to True and default_colormap is not specified as None, the black_pixel and white_pixel attributes must be specified, and they will over-ride the default values that are returned in the connection setup returned to new programs in the Application Group. If default_colormap is specified as None and black_pixel and/or white_pixel are specified, they will be ignored.
+</para>
+
+<para>
+The app_group_leader attribute is used to identify the Application Group Leader program for the app_group. By specifying True the server will identify the program making the request as the Application Group Leader for the application group. The Application Group Leader receives MapRequest and ConfigureRequest events from the server when an attempt is made to map or configure top-level windows of a program in an Application Group, instead of being sent to a window manager that has selected SubstructureRedirect events on the root window. The parent window field in these events will contain the Application Group ID.
+</para>
+
+<para><emphasis role='bold'>AppGroupDestroy</emphasis></para>
+
+<para>app_group: APPGROUP</para>
+
+
+<para>
+This request destroys the app_group. If the app_group_leader attribute for the app_group is True, then any applications in the Application Group that are still connected will be killed as if a KillClient request had been received for that application.
+</para>
+
+<note><para>
+If the application that created a non-embedded Application Group exits, and therefore any Authorizations to be cancelled, and any applications that attempt to open new connections to the X server using one of those Authorizations will be unable to do so.
+</para></note>
+
+<para><emphasis role='bold'>AppGroupGetAttr</emphasis></para>
+
+
+<informaltable>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row>
+ <entry>>app_group: APPGROUP</entry>
+ </row>
+ <row>
+ <entry>=&gt;</entry>
+ </row>
+ <row>
+ <entry>LISTofVALUE</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+This request returns the application group attributes for app_group.
+</para>
+
+<para><emphasis role='bold'>AppGroupQuery</emphasis></para>
+
+<informaltable>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row>
+ <entry>resource: XID</entry>
+ </row>
+ <row>
+ <entry>=&gt;</entry>
+ </row>
+ <row>
+ <entry>app_group: APPGROUP</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+This request returns the Application Group ID of the application that created resource or None if that application is not associated with any Application Group. The resource value may be the resource base of the application.
+</para>
+
+<para><emphasis role='bold'>AppGroupCreateAssociation</emphasis></para>
+
+<informaltable>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row>
+ <entry>window: WINDOW</entry>
+ </row>
+ <row>
+ <entry>window_type: CARD32</entry>
+ </row>
+ <row>
+ <entry>system_window: LISTofCARD8</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+This request associates window with system_window. The window_type indicates the native window system of the application making the request. For non-X window_types both the embedding manager and the server must be executing on the same host. When system_window is Microsoft Windows or OS/2 Presentation Manager, the system_window is an HWND; when the native window system is Macintosh, the system_window is a WindowPtr and a Rect. The window may be used for any X request that takes a Window.
+</para>
+
+<para><emphasis role='bold'>AppGroupDestroyAssociation</emphasis></para>
+
+<informaltable>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row>
+ <entry>window: WINDOW</entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+This request destroys the association created with AppGroupCreateAssociation. The window is destroyed. The system_window that was specified in the AppGroupCreateAssociation request is not affected.
+</para>
+
+</sect1>
+
+<sect1 id='changes_to_existing_requests'>
+<title>Changes to Existing Requests</title>
+
+<sect2 id='mapwindow'>
+<title>MapWindow</title>
+
+<para>
+If the override-redirect attribute of the window is False and if the window is a child of a root window and if the window belongs to an application that is in an application group and if some other application is the application group leader for that group, then a MapRequest event is generated and the window remains unmapped. Otherwise, the core protocol semantics apply.
+</para>
+
+</sect2>
+<sect2 id='configurewindow'>
+<title>ConfigureWindow</title>
+
+<para>
+If the override-redirect attribute of the window is False and if the window is a child of a root window and if the window belongs to an application that is in an application group and if some other application is the application group leader for that group, then a ConfigureRequest event is generated and the window remains unchanged. Otherwise, the core protocol semantics apply.
+</para>
+
+</sect2>
+<sect2 id='createwindow'>
+<title>CreateWindow</title>
+
+<para>
+When a program in an Application Group creates a window that is a child of a root window and specifies CopyFromParent for the Visual, if the single_screen attribute is True and the root_visual attribute is set to something other than None, then the window will be created using the Application Group’s root_visual, otherwise core protocol semantics apply.
+</para>
+
+<para>
+When a program in an Application Group creates a window that is a child of a root window and specifies CopyFromParent for the Colormap, if the single_screen attribute is True, the default_colormap attribute is set to something other than None, and the window’s Visual is the same as the Application Group’s root_visual attribute, then the window will be created using the Application Group’s default_colormap, otherwise core protocol semantics apply.
+</para>
+
+</sect2>
+
+<sect2 id='changewindowattributes'>
+<title>ChangeWindowAttributes</title>
+
+<para>
+When a program in an Application Group changes the attributes of a window that is a child of a root window and specifies CopyFromParent for the Colormap, if the single_screen attribute is True, the default_colormap attribute is set to something other than None, and the window’s Visual is the same as the Application Group’s root_visual attribute, then the window will be created using the Application Group’s default_colormap, otherwise core protocol semantics apply.
+</para>
+
+</sect2>
+
+</sect1>
+
+<sect1 id='changes_to_existing_events'>
+<title>Changes to Existing Events</title>
+
+<para>
+When the top-level window of an application that is a member of an Application Group is the target of a MapWindow or ConfigureWindow request, if there is an Application Group Leader then MapRequest and ConfigureRequest events are automatically delivered to it, otherwise the core protocol semantics apply, i.e. they are delivered to the client, if any, that has SubstructureRedirect set in its root-window event mask, e.g. the window manager.
+</para>
+
+<note><para>
+The Application Group Leader must not select SubstructuRedirect events on a root window as doing so would result in a core protocol error; only one client is permitted to do so, and that is usually the window manager.
+</para></note>
+
+
+<sect2 id='maprequest'>
+<title>MapRequest</title>
+
+<para>
+When a MapWindow request is received for a window whose override-redirect attribut is set to False and whose parent is the root window and the window belongs to an application that is in an application group and there is an application group leader for the group, then this event is delivered to the Application Group Leader with the parent field in the event set to the AppGroup ID. Otherwise the core protocol semantics apply.
+</para>
+
+</sect2>
+<sect2 id='configurerequest'>
+<title>ConfigureRequest</title>
+
+<para>
+When a ConfigureWindow request is received for a window whose override-redirect attribut is set to False and whose parent is the root window and the window belongs to an application that is in an application group and there is an application group leader for the group, then this event is delivered to the Application Group Leader with the parent field in the event set to the AppGroup ID. Otherwise the core protocol semantics apply.
+</para>
+
+</sect2>
+</sect1>
+
+<sect1 id='errors'>
+<title>Errors</title>
+
+<sect2 id='appgroupqueryversion'>
+<title>AppGroupQueryVersion</title>
+
+<para>
+There are no errors for AppGroupQueryVersion.
+</para>
+
+</sect2>
+
+<sect2 id='appgroupcreate'>
+<title>AppGroupCreate</title>
+
+<para>
+A Window error is returned if default_root is specified and is not a valid root window..
+</para>
+
+<para>
+A Color error is returned default_colormap is specified but default_colormap is not a valid colormap for the screen of default_root.
+</para>
+
+<para>
+A Match error is returned if root_visual and default_colormap are both specified, but
+</para>
+
+<para>
+default_colormap’s visual is not root_visual.
+</para>
+
+<para>
+A Match error is returned if root_visual does not exist for the screen of the default_root.
+</para>
+
+</sect2>
+
+<sect2 id='appgroupdestroy'>
+<title>AppGroupDestroy</title>
+
+<para>
+An AppGroup error is returned if app_group is not a valid Application Group.
+</para>
+
+<para>
+An Access error is returned if an untrusted application attempts to destroy an Application Group created by a trusted application.
+</para>
+
+</sect2>
+
+<sect2 id='appgroupgetattr'>
+<title>AppGroupGetAttr</title>
+
+<para>
+An AppGroup error is returned if app_group is not a valid Application Group.
+</para>
+
+<para>
+An Access error is returned if an untrusted application attempts to get the attributes of an Application Group created by a trusted application.
+</para>
+
+</sect2>
+
+<sect2 id='appgroupquery'>
+<title>AppGroupQuery</title>
+
+<para>
+An Access error is returned if an untrusted application attempts to query the Application Group of a trusted application.
+</para>
+
+</sect2>
+
+<sect2 id='appgroupcreateassociation'>
+<title>AppGroupCreateAssociation</title>
+
+<para>
+A Match error is returned if the X server does not support the window_type.
+</para>
+
+<para>
+An Access error may be returned if the X server only supports the window_type on the local host and the program making the request is on a non-local host.
+</para>
+
+<para>
+A Window error may be returned for system-specific errors related to system_window, e.g. system_window does not represent a valid native window.
+</para>
+
+</sect2>
+
+<sect2 id='appgroupdestroyassociation'>
+<title>AppGroupDestroyAssociation</title>
+
+<para>
+A Window error is returned if window was not specified in a previous AppGroupCreateAssociation request.
+</para>
+
+</sect2>
+</sect1>
+
+<sect1 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 XC-APPGROUP
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>AppGroupQueryVersion</emphasis>
+ 1 CARD8 opcode
+ 1 0 XC-APPGROUP opcode
+ 2 3 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'>
+<emphasis role='bold'>AppGroupCreate</emphasis>
+ 1 CARD8 opcode
+ 1 1 XC-APPGROUP opcode
+ 2 8+n length
+ 4 XID app_group
+ 4 BITMASK attrib_mask
+ #x00000001 app_group_leader
+ #x00000002 single_screen
+ #0x0000004 default_root
+ #x00000008 root_visual
+ #x00000010 default_colormap
+ #x00000020 black_pixel
+ #x00000040 white_pixel
+ n LISTofVALUE value-list
+VALUEs
+ 4 BOOL app_group_leader
+ 4 BOOL single_screen
+ 4 WINDOW default_root
+ 4 VISUALID root_visual
+ 4 COLORMAP default_colormap
+ 4 CARD32 black_pixel
+ 4 CARD32 white_pixel
+</literallayout>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>AppGroupDestroy</emphasis>
+ 1 CARD8 opcode
+ 1 2 XC-APPGROUP opcode
+ 2 2 length
+ 4 XID app_group
+</literallayout>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>AAppGroupGetAttr</emphasis>
+ 1 CARD8 opcode
+ 1 4 XC-APPGROUP opcode
+ 2 2 length
+ 4 XID app_group
+=&gt;
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence_number
+ 4 0 length
+ 4 WINDOW default_root
+ 4 VISUALID root_visual
+ 4 COLORMAP default_colormap
+ 4 CARD32 black_pixel
+ 4 CARD32 whte_pixel
+ 1 BOOL single_screen
+ 1 BOOL app_group_leader
+ 2 unused
+</literallayout>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>AppGroupQuery</emphasis>
+ 1 CARD8 opcode
+ 1 5 XC-APPGROUP opcode
+ 2 2 length
+ 4 XID resource
+=&gt;
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence_number
+ 4 0 length
+ 4 XID app_group
+ 20 unused
+</literallayout>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>AppGroupCreateAssoc</emphasis>
+ 1 CARD8 opcode
+ 1 6 XC-APPGROUP opcode
+ 2 n length
+ 4 WINDOW window
+ 2 CARD16 window_type
+ #0 X11
+ #1 Macintosh
+ #2 Win32, OS/2 PM 2.x
+ #3 Win16, OS/2 PM 1.x
+ 2 n system_window_len
+ n LISTofCARD8 system_window
+</literallayout>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>AppGroupDestroyAssoc</emphasis>
+ 1 CARD8 opcode
+ 1 7 XC-APPGROUP opcode
+ 2 2 length
+ 4 WINDOW window
+</literallayout>
+
+</sect1>
+
+<sect1 id='library_api'>
+<title>Library API</title>
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status <emphasis>XagQueryVersion</emphasis> (<emphasis> xkb, keycode</emphasis>) /* macro */
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+Display <emphasis>dpy</emphasis>;
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+int * <emphasis>major_version_return</emphasis>;
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+int * <emphasis>minor_version_return</emphasis>;
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+XagQueryVersion sets major_version_return and minor_version_return to the major and minor Application Group protocol version supported by the server. If the Xag library is compatible with the version returned by the server it returns non-zero. If dpy does not support the Application Group extension, or if the server and library protocol versions are incompatible, or if there was an error during communication with the server, it returns zero. No other Xag functions may be called before this function. If a program violates this rule, the effects of all subsequent Xag calls that it makes are undefined.
+</para>
+
+<note><para>
+An embedding manager in, e.g. a Personal Computer Web Browser, will need to open a connection to the Personal Computer X server by calling XOpenDisplay() before using the Application Group extension.
+</para></note>
+
+<para>
+An embedding manager such as a web browser that intends to embed programs in an Application Group should create the Application Group with XagCreateEmbeddedApplicationGroup.
+</para>
+
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagCreateEmbeddedApplicationGroup(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ VisualID root_visual,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Colormap default_colormap,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ unsigned long black_pixel,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ unsigned long white_pixel,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ XAppGroup* app_group_return);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+
+<para>
+XagCreateEmbeddedApplicationGroup creates an Application Group for an embedding manager with the attributes specified. It also sets the default_root attribute to DefaultRoot(dpy, DefaultsScreen(dpy)) and the single_screen and app_group_leader attributes to True. It returns the Application Group ID in app_group_return.
+</para>
+
+<para>
+You can create an Application Group without intending to do embedding. One reason for doing this is to give a group of clients their own font-path.
+</para>
+
+<note><para>
+A special font-path can be created by creating an Application Group, getting an Authorization using XSecurityGenerateAuthorization, and then running ‘xset fp+ &lt;new font path&gt;’ as a member of the Application Group. Font-path elements added in this way will be "private" to the Application Group.
+</para></note>
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagCreateNonembeddedApplicationGroup(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ XAppGroup* app_group_return);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+An Application Group created with XagCreateNonembeddedApplicationGroup will have the default_root, root_visual, and default_colormap attributes all set to None; the single_screen and app_group_leader attributes are set to False, and the black_pixel and white_pixel attributes are not used since the default_colormap attribute is None.
+</para>
+
+<para>
+To destroy an Application Group use XagDestroyApplicationGroup.
+</para>
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagDestroyApplicationGroup(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ XAppGroup app_group);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+The Application Group specified by app_group is destroyed. If the Application Group was created using XagCreateEmbeddingApplicationGroup, i.e. and therefore the app_group_leader attribute is True, all programs that are members of the Application Group are killed as if a KillClient request had been issued.
+</para>
+
+
+<para>
+To retrieve the attributes of an Application Group use XagGetApplicationGroupAttributes.
+</para>
+
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagGetApplicationGroupAttributes(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ XAppGroup app_group,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ ...);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+
+
+<para>
+XagGetApplicationGroupAttributes is a varargs function that retrieves the Application Group’s attributes specified in the vararg parameter list.
+</para>
+
+<para>
+The attributes that may be specified are: XagNappGroupLeader, XagNsingleScreen, XagNdefaultRoot, XagNrootVisual, XagNdefaultColormap, XagNblackPixel, and XagNwhitePixel; which correspond to app_group_leader, single_screen, default_root, root_visual, default_colormap, black_pixel, and white_pixel respectively. See AppGroupCreate in Section 3 for a description of each attribute.
+</para>
+
+<para>
+The types for each of the parameters are pointers to the following:
+</para>
+
+<literallayout>
+ single_screen Bool
+ default_root Window
+ root_visual VisualID
+ default_colormap Colormap
+ black_pixel unsigned long
+ white_pixel unsigned long
+ app_group_leader Bool
+</literallayout>
+
+<para><programlisting>
+Example:
+ ...
+ Boolean app_group_leader, single_screen;
+ Window default_root;
+ VisualID root_visual;
+ Colormap default_colormap;
+ Pixel black_pixel, white_pixel;
+ ...
+ status = XagGetApplicationGroupAttributes(dpy, app_group,
+ XagNappGroupLeader, &amp;app_group_leader,
+ XagNsingleScreen, &amp;single_screen,
+ XagNdefault_root, &amp;default_root,
+ XagNrootVisual, &amp;root_visual,
+ XagNdefaultColormap, &amp;default_colormap,
+ XagNblackPixel, &amp;black_pixel,
+ XagNwhitePixel, &amp;white_pixel,
+ NULL);
+ ...
+</programlisting></para>
+
+
+<para>
+To determine which Application Group a resource (such as a window) belongs to, use XagQueryApplicationGroup.
+</para>
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagQueryApplicationGroup(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ XID resource,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ XAppGroup* app_group_return);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+
+<para>
+The Application Group is returned in app_group_return, if the resource is not in any Application Group then app_group_return will be set to None.
+</para>
+
+<para>
+To associate an X Window ID with a system-specific window ID, such as a HWND or a WindowPtr, use XagCreateAssociation.
+</para>
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagCreateAssociation(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Window* window_return,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ void* system_window);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+
+<para>
+The window_ret may be used as the target for a ReparentWindow request.
+</para>
+
+<note><para>
+Because XReparentWindow is not constrained in the same way that Win32’s SetParent and the Macintosh are, there is no reason to call XagCreateAssociation in an X-based embedding manager. As such if XagCreateAssociation is called in a native X program, the window_return will be the same as the system_window, and the implementation may even elect to not generate any protocol.
+</para></note>
+
+<para>To create an association on the Macintosh:</para>
+
+<para><programlisting>
+ struct {
+ WindowPtr win;
+ Rect rect;
+ } system_window;
+ system_window.win = win_ptr;
+ system_window.rect.top = system_window.rect.left = 20;
+ system_window.rect.bottom = 180;
+ system_window.rect.right = 380;
+</programlisting></para>
+
+<para><programlisting>
+ status = XagCreateAssociation (dpy, &amp;window, (void*)&amp;system_window);
+</programlisting></para>
+
+<para>
+To create an association using a Win16, Win32, or OS/2 PM:
+</para>
+
+<para><programlisting>
+ HWND system_window;
+ status = XagCreateAssociation (dpy, &amp;window, (void*)&amp;system_window);
+</programlisting></para>
+
+<para>
+To destroy the association created with XagCreateAssociation use XagDestroyAssociation.
+</para>
+
+
+<informaltable frame='none'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+<tbody>
+ <row rowsep='0'>
+ <entry role='functiondecl'>
+Status XagDestroyAssociation(
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Display* dpy,
+ </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='functionargdecl'>
+ Window window);
+ </entry>
+ </row>
+</tbody>
+</tgroup>
+</informaltable>
+
+<para>
+After calling XagDestroyAssociation the window may no longer be used to
+reparent windows with XReparentWindow.
+</para>
+
+<note><para>
+Like XagCreateAssociation, if the native window system is X11 the implementation may elect to not generate any protocol as a result of this function call in order to avoid unintentionally destroying the the system_window that was specified in the prior XagCreateAssociation call.
+</para></note>
+</sect1>
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="appendix.xml"/>
+</article>
diff --git a/proto/xextproto/specs/dbe.xml b/proto/xextproto/specs/dbe.xml
index ce7a327a4..c85dfda64 100644
--- a/proto/xextproto/specs/dbe.xml
+++ b/proto/xextproto/specs/dbe.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<!--
diff --git a/proto/xextproto/specs/dpms.xml b/proto/xextproto/specs/dpms.xml
index d5323b134..98aaaa3d9 100644
--- a/proto/xextproto/specs/dpms.xml
+++ b/proto/xextproto/specs/dpms.xml
@@ -34,9 +34,7 @@ provided "as is" without express or implied warranty.
</legalnotice>
</bookinfo>
-<chapter>
-<title>TITLE</title>
-<sect1 id="Overview">
+<chapter id="Overview">
<title>Overview</title>
<para>
This extension provides X Protocol control over the VESA Display
@@ -119,9 +117,9 @@ 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>
-</sect1>
+</chapter>
-<sect1 id="Requests">
+<chapter id="Requests">
<title>Requests</title>
<para>
<function>DPMSGetVersion</function>
@@ -430,16 +428,16 @@ of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend or DPMSModeOff, otherwise
it is undefined.
</para>
-</sect1>
+</chapter>
-<sect1 id="Events_and_Errors">
+<chapter id="Events_and_Errors">
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
-</sect1>
+</chapter>
-<sect1 id="Encoding">
+<chapter id="Encoding">
<title>Encoding</title>
<para>
Please refer to the X11 Protocol Encoding document as this document uses
@@ -558,6 +556,5 @@ The name of this extension is "DPMS".
21 unused
</literallayout>
-</sect1>
</chapter>
</book>
diff --git a/proto/xextproto/specs/evi.xml b/proto/xextproto/specs/evi.xml
index 1136278de..a565f73e0 100644
--- a/proto/xextproto/specs/evi.xml
+++ b/proto/xextproto/specs/evi.xml
@@ -62,17 +62,15 @@ X Window System is a trademark of The Open Group.
</legalnotice>
</bookinfo>
-<chapter>
-<title>TITLE</title>
-<sect1 id="Introduction">
+<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>
-</sect1>
+</chapter>
-<sect1 id="Goals">
+<chapter id="Goals">
<title>Goals</title>
<para>
As the X Window System has evolved, it has become clear that the information
@@ -90,9 +88,9 @@ 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>
-</sect1>
+</chapter>
-<sect1 id="Requests">
+<chapter id="Requests">
<title>Requests</title>
<para>
<function>GetVersion</function>
@@ -285,22 +283,22 @@ example, if a 12-bit colormap is overloaded to support 8-bit visuals, the
</listitem>
</itemizedlist>
-</sect1>
-<sect1 id="Events_and_Errors">
+</chapter>
+<chapter id="Events_and_Errors">
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
-</sect1>
+</chapter>
-<sect1 id="Changes_to_existing_protocol_">
+<chapter id="Changes_to_existing_protocol_">
<title>Changes to existing protocol.</title>
<para>
None.
</para>
-</sect1>
+</chapter>
-<sect1 id="Encoding">
+<chapter id="Encoding">
<title>Encoding</title>
<para>
The name of this extension is "Extended-Visual-Information".
@@ -358,9 +356,9 @@ VISUALINFO
1 CARD8 max_hw_colormaps
2 CARD16 num_colormap_conflicts
</literallayout>
-</sect1>
+</chapter>
-<sect1 id="C_Language_Binding">
+<chapter id="C_Language_Binding">
<title>C Language Binding</title>
<para>
<!-- .LP -->
@@ -513,6 +511,5 @@ of hardware support for multiple colormaps. XeviGetVisualInfo returns Success
if successful, or an X error otherwise.
</para>
-</sect1>
</chapter>
</book>
diff --git a/proto/xextproto/specs/geproto.xml b/proto/xextproto/specs/geproto.xml
index 7bba3577d..3356d45ea 100644
--- a/proto/xextproto/specs/geproto.xml
+++ b/proto/xextproto/specs/geproto.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<book>
<bookinfo>
<title>X Generic Event Extension</title>
diff --git a/proto/xextproto/specs/lbx.xml b/proto/xextproto/specs/lbx.xml
new file mode 100644
index 000000000..f42f9f9f5
--- /dev/null
+++ b/proto/xextproto/specs/lbx.xml
@@ -0,0 +1,6291 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE article
+ PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
+
+<article id="lbx">
+
+<articleinfo>
+ <title>Low Bandwidth X Extension</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <authorgroup>
+ <author>
+ <firstname>D.</firstname>
+ <surname>Converse</surname>
+ </author>
+ <author>
+ <firstname>J.</firstname>
+ <surname>Fulton</surname>
+ </author>
+ <author>
+ <firstname>D.</firstname>
+ <surname>Lemke</surname>
+ </author>
+ <author>
+ <firstname>R.</firstname>
+ <surname>Mor</surname>
+ </author>
+ <author>
+ <firstname>K.</firstname>
+ <surname>Packard</surname>
+ </author>
+ <author>
+ <firstname>R.</firstname>
+ <surname>Tice</surname>
+ </author>
+ <author>
+ <firstname>D.</firstname>
+ <surname>Tonogai</surname>
+ </author>
+ </authorgroup>
+ <releaseinfo>Protocol Version 1.0</releaseinfo>
+
+
+<legalnotice>
+<para>
+Copyright (c) 1996 X Consortium
+</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
+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 "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X
+CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+</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>
+
+</articleinfo>
+
+<sect1 id='introduction'>
+<title>Introduction</title>
+
+<para>
+Low Bandwidth X (LBX) is a network-transparent protocol for running X Window
+System applications over transport channels whose bandwidth and latency are
+significantly worse than that used in local area networks. It combines a
+variety of caching and reencoding techniques to reduce the volume of data that
+must be sent over the wire. It can be used with existing clients by placing a
+proxy between the clients and server, so that the low bandwidth/high latency
+communication occurs between the proxy and server.
+</para>
+
+
+<para>
+This extension was designed and implemented by Jim Fulton, David Lemke, Keith
+Packard, and Dale Tonogai, all of Network Computing Devices (NCD). Chris Kent
+Kantarjiev (Xerox PARC) participated in early design discussions. Ralph Mor (X
+Consortium) designed and implemented additional sections. Donna Converse (X
+Consortium) authored the protocol description and encoding from design notes
+and the implementation. Ray Tice (X Consortium) resolved the open issues in the
+design and specification. Bob Scheifler (X Consortium) helped out in many areas.
+</para>
+
+
+<para>
+The extension name is &quot;LBX&quot;.
+</para>
+
+
+</sect1>
+<sect1 id='description'>
+<title>Description</title>
+
+<para>
+The design center for LBX is to use a proxy as an intermediary between the
+client and server. The proxy reencodes and compresses requests, events, replies
+and errors, as well as the resulting data stream. Additionally, the proxy can
+cache information from the server to provide low-latency replies to clients.
+This reply generation by the proxy is known as short-circuiting. A proxy can
+handle multiple clients for a given server, but does not prevent clients from
+connecting directly to the server. The design allows the proxy to multiplex
+multiple clients into a single data stream to the server.
+</para>
+
+
+<para>
+Much of LBX is implemented as an extension. The compression and reencoding
+changes can be isolated to the transport and dispatch portions of the server,
+while short-circuiting requires minor changes to the server’s colormap and
+property code.
+</para>
+
+
+<para>
+LBX employs several different compression and short-circuiting methods. Use of
+these methods is negotiable, and in some cases, the algorithm used by a given
+method is negotiable as well. LBX also provides for negotiation of extensions
+to LBX.
+</para>
+
+
+<sect2 id='data_flow'>
+<title>Data Flow</title>
+
+<para>
+The LBX data stream goes through a number of layers:
+</para>
+
+
+<orderedlist>
+ <listitem>
+<para>Client requests</para>
+ </listitem>
+ <listitem>
+<para>Read by LBX and potential byte-swapping</para>
+ </listitem>
+ <listitem>
+<para>Request-specific compression</para>
+ </listitem>
+ <listitem>
+<para>Potential byte swapping</para>
+ </listitem>
+ <listitem>
+<para>Multiplexing of client request streams</para>
+ </listitem>
+ <listitem>
+<para>Delta replacement</para>
+ </listitem>
+ <listitem>
+<para>Stream compression</para>
+ </listitem>
+</orderedlist>
+
+<para>
+Transport
+</para>
+
+<!-- FIXME: descending -->
+<orderedlist>
+ <listitem>
+<para>Stream decompression</para>
+ </listitem>
+ <listitem>
+<para>Delta substitution</para>
+ </listitem>
+ <listitem>
+<para>Demultiplexing of client request streams</para>
+ </listitem>
+ <listitem>
+<para>Potential byte swapping</para>
+ </listitem>
+ <listitem>
+<para>Reencoding</para>
+ </listitem>
+ <listitem>
+<para>Request processing</para>
+ </listitem>
+</orderedlist>
+
+<para>
+The reverse process occurs with X server replies, events, and errors.
+</para>
+
+
+</sect2>
+<sect2 id='tags'>
+<title>Tags</title>
+
+<para>
+Tags are used to support caching of large data items that are expected to be
+queried multiple times. Such things as the keyboard map and font metrics are
+often requested by multiple clients. Rather than send the data each time, the
+first time the data is sent it includes a tag. The proxy saves this data, so
+that subsequent requests can send only the tag to refer to that same data. The
+different types of tags are used for connection information, keyboard maps,
+modifier maps, fonts information and properties.
+</para>
+
+
+<para>
+Tag usage is negotiated as a boolean in the <emphasis>
+LbxStartProxy</emphasis>
+ message. The proxy controls how many tags are stored in the proxy. The server
+may wish to observe the proxy’s InvalidateTag behavior to limit how many tags
+are cached at any one time. Tagged data is not shared across types of tags, but
+the number space used for the tag ids is. The tag ids are generated by the
+server.
+</para>
+
+
+<para>
+The X server keeps track of what tags are known to the proxy. The proxy can
+invalidate a tag if no tag bearing replies of that type are pending. The proxy
+sends an <emphasis>
+LbxInvalidateTag</emphasis>
+ message to release the tagged data. The proxy must not invalidate connection
+tags unless instructed to do so by the server.
+</para>
+
+
+<para>
+If the server wishes to discard tagged data, it must either have received an
+<emphasis>
+LbxInvalidateTag</emphasis>
+ request from the proxy or send an <emphasis>
+LbxInvalidateTag</emphasis>
+ event to the proxy for that tag.
+</para>
+
+
+<sect3 id='tag_substitution_in_requests'>
+<title>Tag Substitution in Requests</title>
+
+<para>
+Many substitution requests have a tag field, followed by fields marked
+optional. For these requests, if the optional fields are present, the
+data in them is stored in the indicated tag, unless the tag is 0. If
+the optional fields are absent, the tag field indicates the tag that
+contains the data for the &quot;optional&quot; fields.
+</para>
+
+
+</sect3>
+<sect3 id='property_tags'>
+<title>Property Tags</title>
+
+<para>
+Property data makes special use of tags. A common use of properties is for
+inter-client communication. If both clients use the proxy, it is wasteful to
+send the data to the server and then back, when the server may never need it.
+<emphasis>
+LbxChangeProperty</emphasis>
+ request does the same work as the core <emphasis>
+ChangeProperty</emphasis>
+ request, but it does not send the data. The reply to this request contains a
+tag id corresponding to the data. If the property information is used locally,
+the server responds to <emphasis>
+LbxGetProperty</emphasis>
+ with the tag, and the property data need never be sent to the server. If the
+server does require the data, it can issue an <emphasis>
+LbxQueryTag</emphasis>
+ message. The proxy can also send the data on at any time if it judges it
+appropriate (i.e., when the wire goes idle). Since the proxy owns the property
+data, it must not invalidate the tag before sending the data back to the server
+via an <emphasis>
+LbxTagData</emphasis>
+ request.
+</para>
+
+
+</sect3>
+</sect2>
+<sect2 id='short_circuiting'>
+<title>Short-circuiting</title>
+
+<para>
+Short-circuiting is used to handle constant data. This includes atoms, color
+name/RGB mappings, and <emphasis>
+AllocColor</emphasis>
+ calls. Atoms and color name/RGB mappings stay constant for the life of the
+server. <emphasis>
+AllocColor</emphasis>
+<emphasis>
+ </emphasis>
+replies are constant for each colormap. Short-circuiting replaces round-trip
+requests with one-way requests, and can sometimes use one in place of many.
+</para>
+
+
+<para>
+Atoms are used heavily for ICCCM communication. Once the proxy knows the string
+to atom mapping, it has no need to send subsequent requests for this atom to
+the server.
+</para>
+
+
+<para>
+Colorname/RGB mappings are constant, so once the proxy sees the response from
+<emphasis>
+LookupColor</emphasis>
+, it need not forward any subsequent requests.
+</para>
+
+
+<para>
+Clients often use the same color cells, so once a read-only color allocation
+has occurred, the proxy knows what RGB values should be returned to the client.
+The proxy doesn't need to forward any <emphasis>
+AllocColor</emphasis>
+ requests it can resolve, but it must tell the server to modify the color
+cell's reference count. <emphasis>
+LbxIncrementPixel</emphasis>
+ is used to support this.
+</para>
+
+
+<para>
+For all three classes of short-circuiting, the proxy must still tell the server
+a request has occurred, so that the request sequence numbers stay in sync. This
+is done with <emphasis>
+LbxModifySequence</emphasis>
+.
+</para>
+
+
+<para>
+Sequence numbers cause the major complication with short-circuiting. X
+guarantees that any replies, events or errors generated by a previous request
+will be sent before those of a later request. This means that any requests that
+can be handled by the proxy must have their reply sent after any previous
+events or errors.
+</para>
+
+
+<para>
+If a proxy’s applications do not require strict adherence to the X protocol
+ordering of errors or events, a proxy might provide further optimization by
+avoiding the overhead of maintaining this ordering, however, the resulting
+protocol is not strictly X11 compliant.
+</para>
+
+
+</sect2>
+<sect2 id='graphics_re_encoding'>
+<title>Graphics Re-encoding</title>
+
+<para>
+The LBX proxy attempts to reencode <emphasis>PolyPoint</emphasis>,
+<emphasis>PolyLine</emphasis>, <emphasis>PolySegment</emphasis>,
+<emphasis>PolyRectangle</emphasis>, <emphasis>PolyArc</emphasis>,
+<emphasis>FillPoly</emphasis>, <emphasis>PolyFillRectangle</emphasis>,
+<emphasis>PolyFillArc</emphasis>, <emphasis>CopyArea</emphasis>,
+<emphasis>CopyPlane</emphasis>, <emphasis>PolyText8</emphasis>,
+<emphasis>PolyText16</emphasis>, <emphasis>ImageText8</emphasis>,
+and <emphasis>ImageText16</emphasis> requests. If the request can be
+reencoded, it may be replaced by an equivalent LBX form of the request.
+The requests are reencoded by attempting to reduce 2-byte coordinate,
+length, width and angle fields to 1 byte. Where applicable, the
+coordinate mode is also converted to <emphasis>Previous</emphasis>
+ to improve the compressibility of the resulting data. In image requests,
+the image data may also be compressed.
+</para>
+
+</sect2>
+<sect2 id='motion_events'>
+<title>Motion events</title>
+
+<para>
+To prevent clogging the wire with <emphasis>MotionNotify</emphasis>
+ events, the server and proxy work together to control the number
+of events on the wire. This is done with the
+<emphasis>LbxAllowMotion</emphasis>
+ request. The request adds an amount to an allowed motion count in
+the server, which is kept on a per-proxy basis. Every motion notify
+event sent to the proxy decrements the allowed motion counter. If
+the allowed motion count is less than or equal to zero, motion
+events not required by the X protocol definition are not sent to the
+proxy. The allowed motion counter has a minimum value of -2^31.
+</para>
+
+</sect2>
+<sect2 id='event_squishing'>
+<title>Event Squishing</title>
+
+<para>
+In the core protocol, all events are padded as needed to be 32 bytes long. The
+LBX extension reduces traffic by removing padding at the end of events, and
+implying the event length from its type. This is known as squishing.
+</para>
+
+</sect2>
+<sect2 id='master_client_'>
+<title>Master Client </title>
+
+<para>
+When the initial X connection between the proxy and the server is converted to
+LBX mode, the proxy itself becomes the master client. New client requests and
+some tag messages are sent in the context of the master client.
+</para>
+
+
+</sect2>
+<sect2 id='multiplexing_of_clients'>
+<title>Multiplexing of Clients</title>
+
+<para>
+The LBX proxy multiplexes the data streams of all its clients into one stream,
+and then splits them apart again when they are received. The <emphasis>
+LbxSwitch</emphasis>
+ message is used to tell each end which client is using the wire at the time.
+</para>
+
+
+<para>
+The server should process delta requests in the order that they appear on the
+LBX connection. If the server does not maintain the interclient request order
+for requests sent by the proxy, it must still obey the semantics implied by the
+interclient request order so that the delta cache functions correctly.
+</para>
+
+
+<para>
+The server can affect the multiplexing of clients by the proxy using the
+<emphasis>
+LbxListenToOne</emphasis>
+ and <emphasis>
+LbxListenToAll</emphasis>
+ messages. This is useful during grabs, since the master connection can not be
+blocked during grabs like other clients. The proxy is responsible for tracking
+server grabs issued by its clients so that the proxy can multiplex the client
+streams in an order executable by the server.
+</para>
+
+
+<para>
+Replies must be ordered in the multiplexed data stream from the server to the
+proxy such that the reply carrying tagged data precedes replies that refer to
+that tagged data.
+</para>
+
+
+</sect2>
+<sect2 id='swapping'>
+<title>Swapping</title>
+
+<para>
+Swapping is handled as with any X extension, with one caveat. Since a proxy can
+be supporting clients with different byte orders, and they all share the same
+wire, the length fields of all messages between the server and proxy are
+expressed in the proxy byte order. This prevents any problems with length
+computation that may occur when clients are switched.
+</para>
+
+
+</sect2>
+<sect2 id='delta_cache'>
+<title>Delta cache</title>
+
+<para>
+LBX takes advantage of the fact that an X message may be very similar to one
+that has been previously sent. For example, a <emphasis>
+KeyPress</emphasis>
+ event may differ from a previous <emphasis>
+KeyPress</emphasis>
+ event in just a few bytes. By sending just the bytes that differ (or
+"deltas"), the number of bytes sent over the wire can be substantially reduced.
+Delta compaction is used on requests being sent by the proxy as well as on
+replies and events being sent by the server.
+</para>
+
+
+<para>
+The server and the proxy each keep per-proxy request and response caches. The
+response cache contains events, errors and replies. All messages are saved in
+the appropriate delta cache if they are of an appropriate type and more than 8
+bytes long but fit within the delta cache. The number of entries in the delta
+cache and the maximum saved message size are negotiated in the <emphasis>
+LbxStartProxy</emphasis>
+ request.
+</para>
+
+
+<para>
+The LBX requests that are never stored in the request delta cache are the
+<emphasis>
+LbxQueryVersion</emphasis>
+, <emphasis>
+LbxStartProxy</emphasis>
+, <emphasis>
+LbxSwitch</emphasis>
+, <emphasis>
+LbxNewClient</emphasis>
+, <emphasis>
+LbxAllowMotion</emphasis>
+, <emphasis>
+LbxDelta</emphasis>
+, <emphasis>
+LbxQueryExtension</emphasis>
+, <emphasis>
+LbxPutImage</emphasis>
+, <emphasis>
+LbxGetImage</emphasis>
+, <emphasis>
+LbxBeginLargeRequest</emphasis>
+, <emphasis>
+LbxLargeRequestData</emphasis>
+, <emphasis>
+LbxEndLargeRequest</emphasis>
+ and <emphasis>
+LbxInternAtoms</emphasis>
+ requests. The responses that are never stored in the response cache are
+<emphasis>
+LbxSwitchEvent</emphasis>
+ and <emphasis>
+LbxDeltaResponse</emphasis>
+. The message carried by a <emphasis>
+delta </emphasis>
+message is also cached, if it meets the other requirements. Messages after the
+<emphasis>
+LbxStartProxy</emphasis>
+ request are cached starting at index 0, and incrementing the index, modulo the
+number of entries, thereafter. The request and response caches are
+independently indexed.
+</para>
+
+
+<para>
+If the current message is cachable and the same length as a message in the
+corresponding delta cache, a delta message may be substituted in place of the
+original message in the protocol stream.
+</para>
+
+
+</sect2>
+<sect2 id='stream_compression'>
+<title>Stream Compression</title>
+
+<para>
+Before being passed down to the transport layer messages can be passed through
+a general purpose data compressor. The choice of compression algorithm is
+negotiated with <ulink url="lbx.htm#20870">See LbxStartProxy</ulink>. The proxy
+and server are not required to support any specific stream compressor. As an
+example, however, the X Consortium implementation of a ZLIB based compressor is
+described below.
+</para>
+
+<note><para>
+The XC-ZLIB compressor is presented with a simple byte stream - the X and LBX
+message boundaries are not apparent. The data is broken up into fixed sized
+blocks. Each block is compressed using zlib 1.0 (by Gailly &amp; Adler), then a
+two byte header is prepended, and then the entire packet is transmitted. The
+header has the following information:
+</para></note>
+<para><programlisting>
+ out[0] = (length &amp; 0xfff) &gt;&gt; 8 | ((compflag) ? 0x80 : 0);
+ out[1] = length &amp; 0xff;
+</programlisting></para>
+
+</sect2>
+<sect2 id='authentication_protocols'>
+<title>Authentication Protocols</title>
+
+<para>
+The current version of LBX does not support multipass authentication protocols
+for clients of the proxy. These authentication protocols return an <emphasis>
+Authenticate</emphasis>
+ message in response to a connection setup request, and require additional
+authentication data from the client after the <emphasis>
+LbxNewClient</emphasis>
+ request, and before the reply to <emphasis>
+LbxNewClient</emphasis>
+. One example of such a protocol is XC-QUERY-SECURITY-1.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='c_library_interfaces_'>
+<title>C Library Interfaces </title>
+
+<para>
+The C Library routines for LBX are in the Xext library. The prototypes are
+located in a file named &quot;XLbx.h&quot;.
+</para>
+
+
+<sect2 id='application_library_interfaces'>
+<title>Application Library Interfaces</title>
+
+<para>
+In a proxy environment, applications do not need to call these routines to take
+advantage of LBX. Clients can, however, obtain information about the LBX
+extension to the server using this interface. Use of this routine may be
+altered when connected through a proxy, as described in <ulink
+url="lbx.htm#33319">See C Library Interfaces</ulink>.
+</para>
+
+
+<sect3 id='xlbxqueryversion'>
+<title>XLbxQueryVersion</title>
+
+<para>
+To determine the version of LBX supported by the X server, call <emphasis>
+XLbxQueryVersion</emphasis>
+.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>Bool <function>XLbxQueryVersion</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>display</term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>major_version_return</term>
+ <listitem><para>Returns the extension major version number.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>minor_version_return</term>
+ <listitem><para>Returns the extension minor version number.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The <emphasis>
+XLbxQueryVersion</emphasis>
+ function determines if the LBX extension is present. If the extension is not
+present, <emphasis>
+XLbxQueryVersion</emphasis>
+ returns <emphasis>
+False</emphasis>
+; otherwise, it returns <emphasis>
+True</emphasis>
+. If the extension is present, <emphasis>
+XLbxQueryVersion</emphasis>
+ returns the major and minor version numbers of the extension as supported by
+the X server.
+</para>
+
+
+</sect3>
+</sect2>
+<sect2 id='proxy_library_interfaces'>
+<title>Proxy Library Interfaces</title>
+
+<para>
+The following interfaces are intended for use by the proxy.
+</para>
+
+<sect3 id='xlbxqueryextension'>
+<title>XLbxQueryExtension</title>
+
+<para>
+To determine the dynamically assigned codes for the extension, use the Xlib
+function <emphasis>
+XQueryExtension</emphasis>
+ or the LBX function <emphasis>
+XLbxQueryExtension</emphasis>
+.</para>
+
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>Bool <function>XLbxQueryExtension</function></funcdef>
+ <paramdef>Display * <parameter>display</parameter></paramdef>
+ <paramdef>int * <parameter>major_opcode_return</parameter></paramdef>
+ <paramdef>int * <parameter>first_event_return</parameter></paramdef>
+ <paramdef>int * <parameter>first_error_return</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>display</term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>major_opcode_return</term>
+ <listitem><para>Returns the major opcode.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>first_event_return</term>
+ <listitem><para>Returns the first event code.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>first_error_return</term>
+ <listitem><para>Returns the first error code.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The <emphasis>
+XLbxQueryExtension</emphasis>
+ function determines if the LBX extension is present. If the extension is not
+present, <emphasis>
+XLbxQueryExtension</emphasis>
+ returns <emphasis>
+False</emphasis>
+; otherwise, it returns <emphasis>
+True</emphasis>
+. If the extension is present, <emphasis>
+XLbxQueryExtension</emphasis>
+ returns the major opcode for the extension to major_opcode_return, the base
+event type code to first_event_return, and the base error code to
+first_error_return; otherwise, the return values are undefined.
+</para>
+
+</sect3>
+
+<sect3 id='xlbxgeteventbase'>
+<title>XLbxGetEventBase</title>
+<para>
+To determine the base event type code, use the Xlib function <emphasis>
+XQueryExtension</emphasis>
+ or the LBX function <emphasis>
+XLbxGetEventBase</emphasis>.
+</para>
+
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>int <function>XLbxGetEventBase</function></funcdef>
+ <paramdef>Display * <parameter>display</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist>
+ <varlistentry>
+ <term>display</term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The <emphasis>XLbxGetEventBase</emphasis>
+function returns the base event type code if the extension is
+present; otherwise, it returns -1.
+</para>
+
+</sect3>
+</sect2>
+</sect1>
+
+
+<sect1 id='protocol'>
+<title>Protocol</title>
+
+<sect2 id='syntactic_conventions_and_common_types'>
+<title>Syntactic Conventions and Common Types</title>
+
+<para>
+Please refer to the X Window System Protocol specification,
+as this document uses the syntactic conventions established
+there and references types defined there.
+</para>
+
+
+<para>
+The following additional types are defined by this extension:
+</para>
+
+<literallayout>
+<emphasis role='bold'>DIFFITEM</emphasis>
+1 CARD8 offset
+1 CARD8 diff
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXANGLE: CARD8 or 2 BYTE</emphasis>
+ where (in order of precedence):
+ (0 &lt;= in &lt;= A(95)) &amp;&amp; !(in % A(5)) out = 0x5a + (in /
+A(5))
+ A(105) &lt;= in &lt;= A(360) &amp;&amp; !(in % A(15)) out = 0x67 +
+(in / A(15))
+ -A(100) &lt;= in &lt;= -A(5) &amp;&amp; !(in % A(5)) out = 0xa6 +
+(in / A(5))
+ -A(360) &lt; in &lt;= -A(105) &amp;&amp; !(in % A(15)) out = 0x98 +
+(in / A(15))
+ -A(360) &lt; in &lt;= A(360) out[0] = in &gt;&gt; 8; out[1] = in
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXARC:</emphasis>
+ [x, y: LBXINT16,
+ width, height: LBXCARD16,
+ angle1, angle2: LBXANGLE]
+</literallayout>
+
+<para>
+Within a list of arcs, after the first arc, x and y are
+relative to the corresponding fields of the prior arc.
+</para>
+
+<literallayout>
+<emphasis role='bold'>LBXCARD16: CARD8 or 2 BYTE</emphasis>
+ where:
+ 0x0000 &lt;= in &lt; 0x00F0 CARD8
+ 0x00F0 &lt;= in &lt; 0x10F0 out[0] = 0xF0 | ((in - 0xF0) &gt;&gt;
+8)
+ out[1] = in - 0xF0
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXGCANDDRAWENT</emphasis>
+[ gc-cache-index, drawable-cache-index: CARD4 ]
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXGCANDDRAWUPDATE</emphasis>
+ drawable: DRAWABLE /* present only if
+<emphasis>drawable-cache-index</emphasis>
+ == 0 */
+gc: GC] /* present only if <emphasis>gc-cache-index</emphasis> == 0 */
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXGCANDDRAWABLE</emphasis>
+ cache-entries: LBXGCANDDRAWENT
+ updates: LBXGCANDDRAWUPDATE
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXINT16</emphasis>: INT8 or 2 BYTE
+ where:
+ 0xF790 &lt;= in &lt; 0xFF90 out[0] = 0x80 | (((in + 0x70) &gt;&gt;
+8) &amp; 0x0F)
+ out[1] = in + 0x70
+ 0xFF90 &lt;= in &lt; 0x0080 CARD8
+ 0x0080 &lt;= in &lt; 0x0880 out[0] = 0x80 | (((in - 0x80) &gt;&gt;
+8) &amp; 0x0F)
+ out[1] = in - 0x80
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXPINT16</emphasis>: CARD8 or 2 BYTE /* for
+usually positive numbers */
+ where:
+ 0xFE00 &lt;= in &lt; 0x0000 out[0] = 0xF0 | (((in + 0x1000)
+&gt;&gt; 8) &amp; 0x0F)
+ out[1] = in + 0x1000
+ 0x0000 &lt;= in &lt; 0x00F0 CARD8
+ 0x00F0 &lt;= in &lt; 0x0EF0 out[0] = 0xF0 | ((in - 0xF0) &gt;&gt;8)
+ out[1] = in - 0xF0
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXPOINT</emphasis>: [x, y: LBXINT16]
+ Within a list of points, after the first rectangle, x and y are
+relative to the corresponding fields of the prior point.
+</literallayout>
+
+<literallayout>
+<emphasis role='bold'>LBXRECTANGLE</emphasis>:
+ [x, y: LBXINT16,
+ width, height: LBXCARD16]
+</literallayout>
+
+<para>
+Within a list of rectangles, after the first rectangle, x and
+y are relative to the corresponding fields of the prior rectangle.
+</para>
+
+<para>
+MASK: CARD8
+</para>
+
+
+</sect2>
+<sect2 id='errors'>
+<title>Errors</title>
+
+<para>
+As with the X11 protocol, when a request terminates with an error,
+the request has no side effects (that is, there is no partial execution).
+</para>
+
+
+<para>
+There is one error, <emphasis>
+LbxClient</emphasis>
+. This error indicates that the client field of an LBX request was invalid, or
+that the proxy’s connection was in an invalid state for a start or stop proxy
+request.
+</para>
+
+
+</sect2>
+<sect2 id='requests'>
+<title>Requests</title>
+
+<para>
+There is one request that is expected to be used only by the client: <emphasis>
+LbxQueryVersion</emphasis>
+</para>
+
+
+<para>
+There is one request that is expected to be used by the client or the proxy:
+<emphasis>
+LbxQueryExtension</emphasis>
+.
+</para>
+
+
+<para>
+The following requests are expected to be used only by the proxy, and are
+instigated by the proxy: <emphasis>
+LbxStartProxy</emphasis>
+, <emphasis>
+LbxStopProxy</emphasis>
+, <emphasis>
+LbxNewClient</emphasis>
+, <emphasis>
+LbxSwitch</emphasis>
+, <emphasis>
+LbxCloseClient</emphasis>
+, <emphasis>
+LbxModifySequence</emphasis>
+, <emphasis>
+LbxAllowMotion</emphasis>
+, <emphasis>
+LbxInvalidateTag</emphasis>
+, <emphasis>
+LbxTagData</emphasis>
+ and <emphasis>
+LbxQueryTag</emphasis>
+.
+</para>
+
+
+<para>
+All other requests are sent by the proxy to the LBX server and are instigated
+by reception of an X request from the client. They replace the X request.
+</para>
+
+
+<sect3 id='requests_initiated_by_the_proxy_or_by_the_client'>
+<title>Requests Initiated by the Proxy or by the Client</title>
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxQueryVersion</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry>=&gt;;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>majorVersion: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>minorVersion: CARD16</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request returns the major and minor version numbers of the LBX protocol.
+</para>
+
+
+<para>
+The encoding of this request is on <ulink url="lbx.htm#34166">See
+LbxQueryVersion</ulink>.
+</para>
+
+
+
+</sect3>
+<sect3 id='requests_initiated_or_substituted_by_the_proxy'>
+<title>Requests Initiated or Substituted by the Proxy</title>
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxQueryExtension</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+nbytes</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+name</emphasis>
+: STRING8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>num-requests: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>present: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>major-opcode: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>first-event: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>first-error: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>reply-mask: LISTofMASK /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>event-mask:LISTofMASK /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is identical to the <emphasis>
+QueryExtension</emphasis>
+ request, with an additional field, and two optional additional fields. When
+the client issues an <emphasis>
+QueryExtension</emphasis>
+ request, the proxy will substitute an <emphasis>
+LbxQueryExtension</emphasis>
+ request.
+</para>
+
+
+<para>
+This request determines if the named extension is present. If so, the major
+opcode for the extension is returned, if it has one. Otherwise, zero is
+returned. Any minor opcode and the request formats are specific to the
+extension. If the extension involves additional event types, the base event
+type code is returned. Otherwise, zero is returned. The format of events is
+specific to the extension. If the extension involves additional error codes,
+the base error code is returned. Otherwise, zero is returned. The format of
+additional data in the errors is specific to the extension.
+</para>
+
+
+<para>
+In addition, the number of requests defined by the named extension is returned.
+If the number of requests is nonzero, and if the information is available,
+reply-mask and event-mask will be included in the reply. The reply-mask
+represents a bit-wise one-to-one correspondence with the extension requests.
+The least significant bit corresponds to the first request, and the next bit
+corresponds to the next request, and so on. Each element in the list contains
+eight meaningful bits, except for the last element, which contains eight or
+fewer meaningful bits. Unused bits are not guaranteed to be zero. The bit
+corresponding to a request is set if the request could generate a reply,
+otherwise it is zero. In the same way, the event-mask represents a bit-wise
+one-to-one correspondence with the extension requests. A bit is set if the
+corresponding request could result in the generation of one or more extension
+or X11 events. If reply-mask is present in the reply, event-mask will also be
+present.
+</para>
+
+
+<para>
+The encoding of this request is on <ulink url="lbx.htm#37117">See
+LbxQueryExtension</ulink>.
+</para>
+
+
+
+</sect3>
+<sect3 id='control_requests_initiated_by_the_proxy'>
+<title>Control Requests Initiated by the Proxy</title>
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxStartProxy</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+options</emphasis>
+: LISTofOPTION</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>choices: LISTofCHOICE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+LbxClient</emphasis>
+, <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>where:</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>OPTION [optcode: CARD8,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> len: OPTLEN,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> option: (See <ulink
+url="lbx.htm#35444">See StartProxy Options</ulink>) ]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>CHOICE [optcode: CARD8,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> len: OPTLEN,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> choice: (See <ulink
+url="lbx.htm#35444">See StartProxy Options</ulink>) ]</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+<!--
+ <row rowsep='0'>
+ <entry role='protoargs'> -->
+
+
+<table frame='none'>
+ <title>StartProxy Options</title>
+ <tgroup cols='4'>
+ <colspec colsep='0'/>
+ <colspec colsep='0'/>
+ <colspec colsep='0'/>
+ <colspec colsep='0'/>
+<thead>
+<row rowsep='0'>
+ <entry>optcode</entry>
+ <entry>option</entry>
+ <entry>choice</entry>
+ <entry>default</entry>
+</row>
+</thead>
+<tbody>
+<row rowsep='0'>
+ <entry>delta-proxy</entry>
+ <entry>DELTAOPT</entry>
+ <entry>DELTACHOICE</entry>
+ <entry>entries=16, maxlen=64</entry>
+</row>
+<row rowsep='0'>
+ <entry>delta-server</entry>
+ <entry>DELTAOPT</entry>
+ <entry>DELTACHOICE</entry>
+ <entry>entries=16, maxlen=64</entry>
+</row>
+<row rowsep='0'>
+ <entry>stream-comp</entry>
+ <entry>LISTofNAMEDOPT</entry>
+ <entry>INDEXEDCHOICE</entry>
+ <entry>No Compression</entry>
+</row>
+<row rowsep='0'>
+ <entry>bitmap-comp</entry>
+ <entry>LISTofSTRING8</entry>
+ <entry>LISTofINDEXEDOPT</entry>
+ <entry>No Compression</entry>
+</row>
+<row rowsep='0'>
+ <entry>pixmap-comp</entry>
+ <entry>LISTofPIXMAPMETHOD</entry>
+ <entry>LISTofPIXMAPCHOICE</entry>
+ <entry>No Compression</entry>
+</row>
+<row rowsep='0'>
+ <entry>use-squish</entry>
+ <entry>BOOL</entry>
+ <entry>BOOL</entry>
+ <entry>True</entry>
+</row>
+<row rowsep='0'>
+ <entry>use-tags</entry>
+ <entry>BOOL</entry>
+ <entry>BOOL</entry>
+ <entry>True</entry>
+</row>
+<row rowsep='0'>
+ <entry>colormap</entry>
+ <entry>LISTofSTRING8</entry>
+ <entry>INDEXEDCHOICE</entry>
+ <entry>No Colormap Grabbing</entry>
+</row>
+<row rowsep='0'>
+ <entry>extension</entry>
+ <entry>NAMEDOPT</entry>
+ <entry>INDEXEDCHOICE</entry>
+ <entry>Extension Disabled</entry>
+ </row>
+</tbody>
+</tgroup>
+</table>
+<!-- </entry>
+ </row>
+-->
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'>&nbsp;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>DELTAOPT [minN, maxN, prefN: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> minMaxMsgLen, maxMaxMsgLen, prefMaxMsgLen:
+CARD8]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>DELTACHOICE [entries, maxlen:
+CARD8]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>INDEXEDCHOICE [index: CARD8,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> data: LISTofBYTE]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>INDEXEDOPT [index, opcode: CARD8]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>NAMEDOPT [name: STRING8,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> detail: LISTofBYTE]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>OPTLEN 1 or 3 CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> where:</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> (0 &lt; in &lt;= 0xFF): out =
+in</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> (0 &lt;= in&lt;= 0xFFFF): out[0] =
+0; out[1] = in &gt;&gt; 8; out[2] = in&amp; 0xFF;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXMAPMETHOD [name: STRING8,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> format-mask: BITMASK,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> depths: LISTofCARD8]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXMAPCHOICE [index, opcode: CARD8,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> format-mask: BITMASK,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> depths: LISTofCARD8]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'></entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request negotiates LBX protocol options, and switches the proxy-server
+connection from X11 protocol to LBX protocol.
+</para>
+
+
+<para>
+The proxy gives the preferred protocol options in the request. The server
+chooses from the given options and informs the proxy which to use. The options
+may be listed in any order, and the proxy may choose which options to
+negotiate. If an option is not successfully negotiated, the default is used.
+</para>
+
+
+<para>
+The server delta cache and proxy delta caches can be configured for number of
+entries, and the length of entries. (See <ulink url="lbx.htm#22595">See Delta
+cache</ulink> for details.) The delta caches are configured using the <emphasis>
+delta-server</emphasis>
+ and <emphasis>
+delta-proxy</emphasis>
+ options. To configure a cache, the proxy sends the minimum, maximum and
+preferred values for the number of cache entries, (<emphasis>
+minN, maxN, prefN</emphasis>
+), and the length of the cache entries, (<emphasis>
+minMaxMsgLen, maxMaxMsgLen, prefMaxMsgLen</emphasis>
+). The server’s reply fields, <emphasis>
+entries</emphasis>
+ and <emphasis>
+maxlen</emphasis>
+, contains the values to use. These values must be within the ranges specified
+by the proxy. The server may also specify an <emphasis>
+entries</emphasis>
+ value of 0 to disable delta caching. The cache entry lengths are specified in
+units of 4 bytes.
+</para>
+
+
+<para>
+The stream compression algorithm is selected using the <emphasis>
+stream-comp </emphasis>
+option. (Stream compression is described in <ulink url="lbx.htm#11596">See
+Stream Compression</ulink>.) Each algorithm has a name that follows the naming
+conventions in <ulink url="lbx.htm#13570">See Algorithm Naming</ulink>. To
+negotiate using the stream-comp option, the proxy lists its available
+compressors. For each candidate algorithm, the proxy sends the name in the
+<emphasis>
+name</emphasis>
+ field, and uses the <emphasis>
+detail</emphasis>
+ field to send any additional data specific to each compression algorithm. The
+reply contains a 0-based index into the list of algorithms to indicate which
+algorithm to use, followed by data specific to that algorithm.
+</para>
+
+
+<para>
+Bitmap compression is negotiated using the <emphasis>
+bitmap-comp</emphasis>
+ option. The proxy sends a list of names of available algorithms, and the
+server reply lists the algorithms to use. For each bitmap algorithm in the
+reply, a 0-based index into the list of algorithms indicates the algorithm, and
+the <emphasis>
+opcode</emphasis>
+ field gives the value for use in requests. The algorithm names follow the
+conventions in <ulink url="lbx.htm#13570">See Algorithm Naming</ulink>.
+</para>
+
+
+<para>
+Pixmap compression is negotiated using the <emphasis>
+pixmap-comp</emphasis>
+ option. The proxy sends a list of available algorithms. For each algorithm,
+the list includes, the name, a bitmask of supported formats, and a list of
+depths that the format supports. The server reply lists the algorithms to use.
+For each pixmap algorithm in the reply, the reply contains a 0-based index into
+the list of proxy algorithms, the opcode to use in requests when referring to
+this algorithm, a mask of valid formats, and a list of valid depths. Algorithm
+names follow the conventions in <ulink url="lbx.htm#13570">See Algorithm
+Naming</ulink>.
+</para>
+
+
+<para>
+Squishing is negotiated using the use-squish option. If the proxy desires
+squishing, it sends a true value. The reply from the server indicates whether
+to do squishing, and will indicate squishing only if <emphasis>
+use-squish</emphasis>
+ is set to true in the request.
+</para>
+
+
+<para>
+Tag caching, described in <ulink url="lbx.htm#11018">See Tags</ulink>, is
+negotiated using the use-tag option. If the proxy desires tag caching, it sends
+a true value. The reply from the server indicates whether to do tag caching,
+and will demand caching only if <emphasis>
+use-tag</emphasis>
+ is set to true in the request.
+</para>
+
+
+<para>
+The colormap option is used to negotiate what color matching algorithm will be
+used by the proxy when the proxy uses the <emphasis>
+LbxAllocColor</emphasis>
+ request to allocate pixels in a grabbed colormap. To negotiate using the
+colormap option, the proxy lists the names of available colormap algorithms.
+The choice in the reply contains a 0-based index into the list of algorithms to
+indicate which algorithm to use, followed by data specific to that algorithm.
+If no colormap algorithm is successfully negotiated, then the <emphasis>
+LbxAllocColor</emphasis>
+, <emphasis>
+LbxGrabCmap</emphasis>
+, and <emphasis>
+LbxReleaseCmap</emphasis>
+ requests will not be used.
+</para>
+
+
+<para>
+The extension option is used to control extensions to LBX. These extensions
+may, for example, enable other types of compression. To negotiate an extension,
+the name of the extension is sent, followed by any data specific to that
+extension. The extension name follows the conventions in <ulink
+url="lbx.htm#13570">See Algorithm Naming</ulink>. The extension option may
+occur multiple times in the start proxy message, since multiple extensions can
+be negotiated. The reply to an extension option contains the zero-based index
+of the extension option, as counted in the <emphasis>
+LbxStartProxy</emphasis>
+ message. This index is followed by extension-specific information. The server
+does not respond to extensions it does not recognize.
+</para>
+
+
+<para>
+An <emphasis>
+LbxClient</emphasis>
+ error is returned when a client which is already communicating through an LBX
+proxy to the X server sends a <emphasis>
+LbxStartProxy</emphasis>
+ request.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#27452">See
+LbxStartProxy</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxStopProxy</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+LbxClient</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request terminates the connection between the proxy and X server, and
+terminates any clients connected through the proxy.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#23471">See
+LbxStopProxy</ulink>.
+</para>
+
+
+<para>
+An <emphasis>
+LbxClient</emphasis>
+ error is returned if the requesting client is not an LBX proxy.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxNewClient</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+byte-order</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+client-id</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+protocol-major-version</emphasis>
+: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+protocol-minor-version:</emphasis>
+ CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+authorization-protocol-name</emphasis>
+: STRING8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+authorization-protocol-data</emphasis>
+: STRING8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>Core X reply (if connection is rejected)</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>&nbsp;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>OR</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>&nbsp;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>success: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>change-type: {NoDeltas, NormalClientDeltas,
+AppGroupDeltas}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>protocol-major-version: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>protocol-minor-version: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>tag-id: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>length: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>connection-data: CONINFO or CONDIF or
+CONDIFROOT</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>&nbsp;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>where:</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>CONINFO: (the &quot;additional data&quot;
+portion of the core connection reply for successes)</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>CONDIF: [resource-id-base: CARD32,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> root-input-masks: LISTofSETofEVENT]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>CONDIFROOT: [resource-id-base:
+CARD32,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> root: WINDOW</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> root-visual: VISUALID</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> default-colormap: COLORMAP</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> white-pixel, black-pixel: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> root-input-masks: LISTofSETofEVENT]</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Errors: LbxClient, Alloc
+</para>
+
+
+<para>
+This request, which is sent by the proxy over the control connection, creates a
+new virtual connection to the server.
+</para>
+
+
+<para>
+Much of the information in the <emphasis>
+LbxNewClient</emphasis>
+ request and reply is identical to the connection setup and reply information
+in the core X protocol.
+</para>
+
+
+<para>
+For the <emphasis>
+LbxNewClient</emphasis>
+ request, the field unique to LBX is client-id. For the <emphasis>
+LbxNewClient</emphasis>
+ reply, <emphasis>
+tag-id</emphasis>
+ and <emphasis>
+change-type</emphasis>
+ are fields unique to LBX, and the contents of connection-data may be different
+in LBX from the core X protocol (see below).
+</para>
+
+
+<para>
+The proxy assigns each virtual connection a unique identifier using the
+<emphasis>
+client-id</emphasis>
+ field in the <emphasis>
+LbxNewClient</emphasis>
+ request. This client-id is used in the LBX protocol to specify the current
+client (see the <emphasis>
+LbxSwitch</emphasis>
+ request and the <emphasis>
+LbxSwitchEvent</emphasis>
+). client-id 0 is reserved for the proxy control connection. An <emphasis>
+LbxClient</emphasis>
+ error will result if the <emphasis>
+LbxNewClient</emphasis>
+ request contains a client-id of 0 or an already in use client-id.
+</para>
+
+
+<para>
+If the server rejects this new virtual connection, the server sends a core X
+connection failure reply to the proxy. The current version of LBX does not
+support the return of an <emphasis>
+Authenticate</emphasis>
+ reply.
+</para>
+
+
+<para>
+If the <emphasis>
+change-type</emphasis>
+ field is set to <emphasis>
+NoDeltas</emphasis>
+, then <emphasis>
+connection-data</emphasis>
+ is sent using the CONINFO structure, which is identical to the additional data
+of the core connection reply. If the <emphasis>
+tag-id</emphasis>
+ is non-zero, then the connection-data is stored by the proxy using this tag
+value. Tagged connection data must be stored by the proxy, and can not be
+invalidated by the proxy until an <emphasis>
+LbxInvalidateTag</emphasis>
+ event is received for that tag.
+</para>
+
+
+<para>
+When the <emphasis>
+change-type</emphasis>
+ field is not set to <emphasis>
+NoDeltas</emphasis>
+, then connection data is sent as changes against connection information
+previously sent to the proxy. The <emphasis>
+tag-id</emphasis>
+ field, if non-zero, has the tag of the previously sent data to apply the
+changes to. A zero tag-id indicates that the changes are with respect to the
+connection information sent when the proxy connected to the server.
+</para>
+
+
+<para>
+If the <emphasis>
+change-type</emphasis>
+ field is set to <emphasis>
+NormalClientDeltas</emphasis>
+, then <emphasis>
+connection-data</emphasis>
+ is sent using the CONDIF structure. The values in the CONDIF structure are
+substituted for the identically named fields of the connection information for
+the new connection.
+</para>
+
+
+<para>
+If the <emphasis>
+change-type</emphasis>
+ field is set to <emphasis>
+AppGroupDeltas</emphasis>
+, then <emphasis>
+connection-data</emphasis>
+ is sent using the CONDIFROOT structure. The <emphasis>
+root</emphasis>
+, <emphasis>
+root-visual</emphasis>
+, and <emphasis>
+default-colormap</emphasis>
+ fields, when nonzero, are substituted for the corresponding fields in the
+reference connection information. The <emphasis>
+white-pixel</emphasis>
+ and <emphasis>
+black-pixel</emphasis>
+ fields are substituted only when the <emphasis>
+default-colormap</emphasis>
+ field of the reply is non-zero. When <emphasis>
+default-colormap</emphasis>
+ field of the reply is zero, so are <emphasis>
+white-pixel</emphasis>
+ and <emphasis>
+black-pixel</emphasis>
+. The first entry in the <emphasis>
+root-input-masks</emphasis>
+ field is the current-input-mask for the default root window. The remaining
+entries in <emphasis>
+root-input-masks</emphasis>
+ are input masks for non-video screens, as defined by the X Print Extension.
+The number of non-video screens is one less than the number of entries in
+<emphasis>
+root-input-masks</emphasis>
+. These screens are at the end of screen list in the reference connection
+information.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#15166">See The
+description of this request is on page 13.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxCloseClient</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+client</emphasis>
+: CARD32</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+LbxClient</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This requests the server to close down the connection represented by the
+specified proxy’s client identifier. If the specified client wasn’t
+previously registered with the server by a <emphasis>
+LbxNewClient</emphasis>
+ request, the server will send the <emphasis>
+LbxClient</emphasis>
+ error.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#21121">See The
+description of this request is on page 12.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxSwitch</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+client</emphasis>
+: CARD32</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+LbxClient</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request causes the X server to treat subsequent requests as being from a
+connection to the X server represented by the specified client identifier.
+</para>
+
+
+<para>
+If the client making the request is not the proxy, or if the client identifier
+sent in the request was not previously sent in a <emphasis>
+LbxNewClient</emphasis>
+ request, an <emphasis>
+LbxClient</emphasis>
+ error is returned.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#36790">See
+LbxSwitch</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxSync</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The sync request causes the server to send a reply when all requests before the
+sync request have been processed.
+</para>
+
+
+<para>
+The encoding for this client is on <ulink url="lbx.htm#21186">See
+LbxSync</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxModifySequence</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+adjust</emphasis>
+: CARD32</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: None</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request advances the sequence number of the virtual client connection by
+the specified amount. The proxy sends the <emphasis>
+LbxModifySequence</emphasis>
+ request to the server when it replies to a client request without forwarding
+the client request on to the X server.
+</para>
+
+
+<para>
+The encoding for this client is on <ulink url="lbx.htm#10940">See The
+description of this request is on page 13.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxAllowMotion</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+num</emphasis>
+: CARD32</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: None</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request controls the delivery of optional motion notify events, as
+described in <ulink url="lbx.htm#15503">See Motion events</ulink>. The num
+field specifies an increase in the allowed number of motion notify events sent.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#11897">See The
+description of this request is on page 14.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxInvalidateTag</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag</emphasis>
+: CARD32</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The LBX proxy sends this notification to the X server when it refuses to store
+tagged data, or when it releases tagged data which was previously stored and
+which was not invalidated by a notification from the X server.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#37545">See
+LbxInvalidateTag</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxTagData</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+real-length</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+data</emphasis>
+: LISTofBYTE</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request specifies the data associated with a previously assigned tag. It
+is sent in two circumstances: in response to receiving a <emphasis>
+SendTagDataEvent</emphasis>
+, and spontaneously, when the proxy must rely on the server to store data which
+was not previously received from the server. The data is carried in the byte
+order and structure as would have originally been sent in the core protocol
+request.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#37174">See
+LbxTagData</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxGrabCmap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cmap</emphasis>
+: Colormap </entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+smart-grab</emphasis>
+: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+large-pixel: </emphasis>
+BOOL /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+auto-release: </emphasis>
+BOOL /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+three-channels</emphasis>
+: BOOL /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+bits-per-rgb: </emphasis>
+CARD4 /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cells</emphasis>
+: LISTofCHAN /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>&nbsp;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>where:</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>CHAN: LISTofLBXPIXEL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>LBXPIXEL: PIXELPRIVATE or PIXELPRIVATERANGE
+or </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> PIXELALLOC or PIXELALLOCRANGE </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXEL: CARD8 or CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXELPRIVATE: [ pixel: PIXEL ]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXELPRIVATERANGE: [ first-pixel,
+last-pixel: PIXEL]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXELALLOC: [ pixel: PIXEL,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> color: COLORSINGLE or COLORTRIPLE]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>PIXELALLOCRANGE: [ first-pixel,
+last-pixel: PIXEL,</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> colors: LISTofCOLORSINGLE or
+LISTofCOLORTRIPLE]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>COLORSINGLE: [ value: CARD8 or CARD16
+]</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>COLORTRIPLE: [ r, g, b:
+COLORSINGLE]</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Colormap</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request asks the server for control of allocating new colormap cells in
+the specified colormap. The server grants control by replying to this request.
+If no changes have occurred since the last time this proxy grabbed this
+colormap, then the <emphasis>
+smart-grab</emphasis>
+ field of the reply is set to true, and the optional fields are not sent.
+Otherwise, the current contents of the colormap are placed in the reply, as
+described later in this section.
+</para>
+
+
+<para>
+Once the proxy has received the reply, it can use the <emphasis>
+LbxAllocColor</emphasis>
+ request to allocate new colormap cells without the performance penalty of
+round trips. The proxy is still permitted to use the normal colormap and
+<emphasis>
+LbxIncrementPixel</emphasis>
+ requests while the colormap is grabbed. The grab is valid across all virtual
+connections of the proxy.
+</para>
+
+
+<para>
+The <emphasis>
+LbxGrabCmap</emphasis>
+ request is limited to colormaps for the visual types negotiated as part of the
+colormap algorithm negotiation in the start proxy request at connection setup.
+</para>
+
+
+<para>
+The server and other proxies may not allocate new colormap cells in the
+colormap while the colormap is grabbed by this proxy. If the server or another
+proxy needs to allocate new colormap cells, the server sends a Lbx<emphasis>
+ReleaseCmap</emphasis>
+ event to the proxy holding the grab, which then issues an <emphasis>
+LbxReleaseCmap</emphasis>
+ request.
+</para>
+
+
+<para>
+The server and other proxies may free colormap cells in a colormap grabbed by a
+proxy. The server will send an <emphasis>
+LbxFreeCells</emphasis>
+ event to the proxy that currently has the colormap grabbed when the cell
+reference count reaches 0.
+</para>
+
+
+<para>
+If the colormap is a of a static visual type, such as <emphasis>
+StaticGray</emphasis>
+, <emphasis>
+StaticColor</emphasis>
+, <emphasis>
+GrayScale</emphasis>
+, or <emphasis>
+TrueColor</emphasis>
+, then the proxy’s grab is immediately released by the server, and the proxy
+must use <emphasis>
+LbxIncrementPixel</emphasis>
+ requests in place of <emphasis>
+LbxAllocColor</emphasis>
+ requests for this colormap.
+</para>
+
+
+<para>
+If the cmap field does not refer to a valid colormap or the colormap is already
+grabbed by this proxy then a <emphasis>
+Colormap</emphasis>
+ error is generated.
+</para>
+
+
+<para>
+The reply describes the contents of the colormap via several arguments and a
+descriptive list containing one or three channels, with each channel describing
+allocations in the colormap.
+</para>
+
+
+<para>
+The <emphasis>
+large-pixel</emphasis>
+ argument, if True, specifies that PIXEL indices will be listed as CARD16
+quantities instead of CARD8. The<emphasis>
+ auto-release</emphasis>
+ field, if True, indicates that this colormap is of a static visual type and
+the proxy’s grab is immediately released by the server.
+</para>
+
+
+<para>
+If <emphasis>
+three-channels</emphasis>
+ is False, a single channel is enclosed and color values are described using
+COLORTRIPLE, which has fields for red, green and blue. A single channel is used
+when the visual type is not <emphasis>
+DirectColor</emphasis>
+ or <emphasis>
+TrueColor</emphasis>
+.
+</para>
+
+
+<para>
+If <emphasis>
+three-channels</emphasis>
+ is True, separate red, green and blue channel lists are enclosed, for
+describing a <emphasis>
+DirectColor</emphasis>
+ or <emphasis>
+TrueColor</emphasis>
+ colormap. Color values for entries in each channel are sent using COLORSINGLE
+and the corresponding PIXEL value refers to the RGB subfield of the current
+channel, as defined by the corresponding red-mask, green-mask and blue-mask of
+the visual.
+</para>
+
+
+<para>
+The <emphasis>
+bits-per-rgb</emphasis>
+ value is one less than the bits-per-rgb-value field of the visual that the
+colormap belongs to. If the value is 7 or less, then COLORSINGLE values in the
+descriptive list are sent using CARD8 fields. Otherwise these values are sent
+using CARD16 fields.
+</para>
+
+
+<para>
+The list describing current colormap allocations contains entries of the
+following types:
+</para>
+
+
+<para>
+An LBXPIXELPRIVATE entry indicates that the pixel in the <emphasis>
+pixel </emphasis>
+field is unavailable for allocation.
+</para>
+
+
+<para>
+An LBXPIXELPRIVATERANGE entry indicates that a contiguous range of pixels are
+unavailable for allocation. The range is <emphasis>
+first-pixel</emphasis>
+ to <emphasis>
+last-pixel</emphasis>
+, and includes <emphasis>
+last-pixel</emphasis>
+.
+</para>
+
+
+<para>
+An LBXPIXELALLOC entry indicates that the pixel in the <emphasis>
+pixel </emphasis>
+field is allocated as a read-only pixel. The <emphasis>
+color</emphasis>
+ field carries the color information of the pixel.
+</para>
+
+
+<para>
+An LBXPIXELALLOCRANGE entry indicates that a contiguous range of pixels are
+allocated as read-only. The range starts <emphasis>
+first-pixel</emphasis>
+ to <emphasis>
+last-pixel</emphasis>
+, and includes <emphasis>
+last-pixel</emphasis>
+. These fields are followed by a list of COLORSINGLE or COLORTRIPLE, depending
+on the value of <emphasis>
+three-channels</emphasis>
+.
+</para>
+
+
+<para>
+A NEXTCHANNEL entry indicates that the next channel of the colormap will be
+described.
+</para>
+
+
+<para>
+A LISTEND entry indicates the end of the colormap description.
+</para>
+
+
+<para>
+All pixels not described in the reply are unallocated.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#17198">See
+LbxGrabCmap</ulink>.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxReleaseCmap</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cmap</emphasis>
+: Colormap</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request releases the specified grabbed colormap. If the <emphasis>
+cmap</emphasis>
+ field does not refer to a colormap, a <emphasis>
+BadColormap</emphasis>
+ error is produced.
+</para>
+
+
+<para>
+The proxy must remember the state of the colormap when the <emphasis>
+LbxReleaseCmap</emphasis>
+ request is issued if this proxy may at some future time issue another
+<emphasis>
+LbxGrabCmap</emphasis>
+ request on this colormap before the state of the colormap changes.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#14796">See
+LbxReleaseCmap</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxInternAtoms</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+count</emphasis>
+: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+names: LISTofSTRING8</emphasis>
+</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+atoms</emphasis>
+: LISTofATOM</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request allows the proxy to intern a group of atoms in a single round
+trip. The server will create any atoms that do not exist.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#34140">See
+LbxInternAtoms</ulink>.
+</para>
+
+
+
+</sect3>
+<sect3 id='substitution_requests'>
+<title>Substitution Requests</title>
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxAllocColor</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cmap</emphasis>
+: Colormap</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+pixel</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+red</emphasis>
+, <emphasis>
+green</emphasis>
+, <emphasis>
+blue</emphasis>
+: CARD16</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is sent by a proxy that has given colormap grabbed to allocate a
+new read-only cell in the colormap. The proxy may substitute this request for
+the core <emphasis>
+AllocColor</emphasis>
+ and <emphasis>
+AllocNamedColor</emphasis>
+ requests.
+</para>
+
+
+<para>
+The <emphasis>
+pixel</emphasis>
+ field identifies the colormap cell to allocate. The <emphasis>
+red</emphasis>
+, <emphasis>
+green</emphasis>
+, and <emphasis>
+blue</emphasis>
+ fields are the hardware specific color values of the corresponding fields of
+the core <emphasis>
+AllocColor</emphasis>
+ request. The mapping to hardware specific colormap values by the proxy is
+performed using the color algorithm negotiated by <emphasis>
+LbxStartProxy</emphasis>
+.
+</para>
+
+
+<para>
+For colormaps of static visual types, the <emphasis>
+LbxIncrementPixel</emphasis>
+ request is used instead of LBX <emphasis>
+AllocColor</emphasis>
+.
+</para>
+
+
+<para>
+If the <emphasis>
+cmap</emphasis>
+ field does not identify a grabbed colormap then a <emphasis>
+BadAccess</emphasis>
+ error is produced. If the <emphasis>
+pixel</emphasis>
+ field refers to a read-write entry, or the pixel field refers to a pixel
+outside of the range of this colormap, a <emphasis>
+BadAlloc</emphasis>
+ error is produced.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#28429">See
+LbxAllocColor</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxIncrementPixel</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cmap</emphasis>
+: COLORMAP</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+pixel</emphasis>
+: CARD32</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: None</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+AllocColor</emphasis>
+ request for read-only pixels currently allocated for the current client. If
+the visual type of the colormap is of a static type, this request may be used
+on currently unallocated pixels. The colormap is not required to be grabbed to
+use this request.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#38053">See The
+description of this request is on page 14.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxDelta</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+count</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cache-index</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+diffs</emphasis>
+: LISTofDIFFITEM</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request contains a minimal amount of information relative to a similar
+prior request. The information is in the form of a difference comparison to a
+prior request. The prior request is specified by an index to a cache,
+independently maintained by both the proxy and the server.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#39838">See The
+description of this request is on page 18.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxGetModifierMapping</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+keyspermod</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+keycodes</emphasis>
+: LISTofKEYCODE /* optional */</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is identical to the core <emphasis>
+GetModifierMapping</emphasis>
+ request, with the addition of a tag being returned in the reply. See <ulink
+url="lbx.htm#26534">See Tag Substitution in Requests</ulink> for a description
+of the <emphasis>
+tag</emphasis>
+ field and optional fields.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#40057">See
+LbxGetModifierMapping</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxGetKeyboardMapping</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+firstKeyCode</emphasis>
+: KEYCODE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+count</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+keysperkeycode</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+keysyms</emphasis>
+: LISTofKEYSYM /* optional */</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is identical to the X <emphasis>
+GetKeyboardMapping</emphasis>
+ protocol request, with the addition that a tag is returned in the reply. See
+<ulink url="lbx.htm#26534">See Tag Substitution in Requests</ulink> for a
+description of the <emphasis>
+tag</emphasis>
+ field and optional fields.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#21702">See
+LbxGetKeyboardMapping</ulink>.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxGetWinAttrAndGeom</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+window</emphasis>
+: WINDOW</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoargs'>visual: VISUALID</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>class: {InputOutput, InputOnly}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>bit-gravity: BITGRAVITY</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>win-gravity: WINGRAVITY</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>backing-store: {NotUseful, WhenMapped,
+Always}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>backing-planes: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>backing-pixel: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>save-under: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>colormap: COLORMAP or None</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>map-is-installed: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>map-state: {Unmapped, Unviewable,
+Viewable}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>all-event-masks, your-event-mask:
+SETofEVENT</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>do-not-propagate-mask: SETofDEVICEEVENT</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>override-redirect: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>root: WINDOW</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>depth: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>x, y: INT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>width, height, border-width: CARD16</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Window</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+<emphasis>
+GetWindowAttributes</emphasis>
+ and <emphasis>
+GetGeometry</emphasis>
+ are frequently used together in the X protocol. <emphasis>
+LbxGetWinAttrAndGeom</emphasis>
+ allows the proxy to request the same information in one round trip.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#41440">See
+LbxGetWinAttrAndGeom</ulink>.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxQueryFont</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+font</emphasis>
+: FONTABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>compression: BOOL</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>tag: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>font-info: FONTINFO /* optional
+*/</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>char-infos: LISTofCHARINFO or LISTofLBXCHARINFO
+ /* optional */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>where:</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>LBXCHARINFO: [left-side-bearing:
+INT6</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> right-side-bearing: INT7</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> character-width: INT6</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> ascent: INT6</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'> descent: INT7]</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Font,Alloc</emphasis>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is used to replace the core <emphasis>
+QueryFont</emphasis>
+ request and has identical semantics.
+</para>
+
+
+<para>
+See <ulink url="lbx.htm#26534">See Tag Substitution in Requests</ulink> for a
+description of the <emphasis>
+tag</emphasis>
+ field and optional fields.
+</para>
+
+
+<para>
+The <emphasis>
+compression</emphasis>
+ field is True if the <emphasis>
+char-infos</emphasis>
+ field is represented using LBXCHARINFO.
+</para>
+
+
+<para>
+The per-character information will be encoded in an LBXCHARINFO when, for every
+character, the character-width, left-side-bearing, and ascent can each be
+represented in not more than 6 bits, and the right-side-bearing and descent can
+each be represented in not more than 7 bits, and the attributes field is
+identical the attributes field of the max_bounds of the <emphasis>
+font_info</emphasis>
+ field of the font.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#24597">See
+LbxQueryFont</ulink>.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxChangeProperty</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+window</emphasis>
+: WINDOW</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+property</emphasis>
+: ATOM</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+type</emphasis>
+: ATOM</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+format</emphasis>
+: {0,8,16,32}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+mode</emphasis>
+: {Replace, Prepend, Append}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+nUnits</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>tag: CARD32</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is sent to the server when the client sends an X <emphasis>
+ChangeProperty </emphasis>
+request through the proxy. The size of the data is sent with this request, but
+not the property data itself. The server reply contains a tag identifier for
+the data, which is stored in the proxy. The proxy must not discard this data
+before it is sent to the server, or invalidated by the server. This means that
+before issuing an <emphasis>
+LbxStopProxy</emphasis>
+ request, or exiting, the proxy must send Lbx<emphasis>
+TagData</emphasis>
+ requests for these items. If the server loses the connection before the
+information is sent back, the server should revert the property value to its
+last known value, if possible.
+</para>
+
+
+<para>
+If the <emphasis>
+mode</emphasis>
+ field is <emphasis>
+Prepend</emphasis>
+ or <emphasis>
+Append</emphasis>
+, the tag refers only to the prepended or appended data.
+</para>
+
+
+<para>
+If the tag in the reply is zero, then the change was ignored by the server, as
+defined in the security extension. The proxy should dump the associated data,
+since the server will never ask for it.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#18013">See
+LbxChangeProperty</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxGetProperty</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+window</emphasis>
+: WINDOW</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+property</emphasis>
+: ATOM</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+type</emphasis>
+: ATOM or AnyPropertyType</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+long-offset</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+long-length</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+delete</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoargs'>type: ATOM or None</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>format: {0, 8, 16, 32}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>bytes-after: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>nItems: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>tag: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>value: LISTofINT8 or LISTofINT16 or
+LISTofINT32</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request may be used by the proxy as a substitution for a core <emphasis>
+GetProperty</emphasis>
+ request. It allows tags to be used for property data that is unlikely to
+change often in value, but is likely to be fetched by multiple clients.
+</para>
+
+
+<para>
+The <emphasis>
+LbxGetProperty</emphasis>
+ request has the same arguments as the core <emphasis>
+GetProperty</emphasis>
+ request. The reply for <emphasis>
+LbxGetProperty</emphasis>
+ has all of the fields from the core <emphasis>
+GetProperty</emphasis>
+ reply, but has the additional fields of <emphasis>
+nItems</emphasis>
+ and <emphasis>
+tag</emphasis>
+.
+</para>
+
+
+<para>
+In order to utilize tags in <emphasis>
+LbxGetProperty</emphasis>
+ for a specific property, the server must first send the complete property data
+to the proxy and associate this data with a tag. More precisely, the server
+sends an <emphasis>
+LbxGetProperty</emphasis>
+ reply with a new <emphasis>
+tag</emphasis>
+, <emphasis>
+nItems</emphasis>
+ set to the number of items in the property, the size of the property data in
+the reply length field, and the complete property data in value. The proxy
+stores the property data in its tag cache and associates it with the specified
+tag.
+</para>
+
+
+<para>
+In response to future <emphasis>
+LbxGetProperty</emphasis>
+ requests for the same property, if the server thinks that the proxy has the
+actual property data in its tag cache, it may choose to send an <emphasis>
+LbxGetProperty</emphasis>
+ reply without the actual property data. In this case, the reply would include
+a non-zero <emphasis>
+tag</emphasis>
+, a zero reply length, and no data for value.
+</para>
+
+
+<para>
+If the server chooses not to generate a tagged reply to <emphasis>
+LbxGetProperty</emphasis>
+, or for some reason is unable to do so, it would send a reply with a <emphasis>
+tag</emphasis>
+ of zero, the size of the property data in the reply length field, and the
+complete property data in value.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#13863">See
+LbxGetProperty</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyPoint</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+points</emphasis>
+: LISTofLBXPOINT</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyPoint</emphasis>
+ request. Not all <emphasis>
+PolyPoint</emphasis>
+ requests can be represented as <emphasis>
+LbxPolyPoint</emphasis>
+ requests.
+</para>
+
+
+<para>
+The proxy will convert the representation of the points to be relative to the
+previous point, as described by previous coordinate mode in the X protocol.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#29719">See
+LbxPolyPoint</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyLine</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+points</emphasis>
+: LISTofLBXPOINT</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyLine</emphasis>
+ request. Not all <emphasis>
+PolyLine</emphasis>
+ requests can be represented as <emphasis>
+LbxPolyline</emphasis>
+ requests.
+</para>
+
+
+<para>
+The proxy will convert the representation of the points to be relative to the
+previous point, as described by previous coordinate mode in the X protocol.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#31086">See The
+description of this request is on page 21.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolySegment</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+segments</emphasis>
+: LISTofLBXSEGMENT</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>&nbsp;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>where:</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>LBXSEGEMENT; [x1, y1, x2, y2: LBXINT16]</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolySegment</emphasis>
+ request. Not all <emphasis>
+PolySegment</emphasis>
+ requests can be represented as <emphasis>
+LbxPolySegment</emphasis>
+ requests.
+</para>
+
+
+<para>
+For segments other than the first segment of the request, [x1, y1] is
+relative to [x1, y1] of the previous segment. For all segments, [x2, y2] is
+relative to that segment’s [x1, y1].
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#27528">See
+LbxPolySegment</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyRectangle</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+rectangles</emphasis>
+: LISTofLBXRECTANGLE</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyRectangle</emphasis>
+ request. Not all <emphasis>
+PolyRectangle</emphasis>
+ requests can be represented as <emphasis>
+LbxPolyRectangle</emphasis>
+ requests.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#33628">See The
+description of this request is on page 22.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyArc</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+arcs</emphasis>
+: LISTofLBXARC</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyArc</emphasis>
+ request. Not all <emphasis>
+PolyArc</emphasis>
+ requests can be represented as <emphasis>
+LbxPolyArc</emphasis>
+ requests.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#25855">See
+LbxPolyArc</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyFillRectangle</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+rectangles</emphasis>
+: LISTofLBXRECTANGLE</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyFillRectangle</emphasis>
+ request. Not all <emphasis>
+PolyFillRectangle</emphasis>
+ requests can be represented as <emphasis>
+LbxPolyFillRectangle</emphasis>
+ requests.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#26399">See
+LbxPolyFillRectangle</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyFillArc</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+arcs</emphasis>
+: LISTofLBXARC</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyFillArc</emphasis>
+ request. Not all <emphasis>
+PolyFillArc</emphasis>
+ requests can be represented as <emphasis>
+LbxPolyFillArc</emphasis>
+ requests.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#19081">See The
+description of this request is on page 22.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxFillPoly</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+shape</emphasis>
+: BYTE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+points</emphasis>
+: LISTofLBXPOINT</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+ and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+FillPoly</emphasis>
+ request. Not all <emphasis>
+FillPoly</emphasis>
+ requests can be represented as <emphasis>
+LbxFillPoly</emphasis>
+ requests.
+</para>
+
+
+<para>
+The proxy will convert the representation of the points to be relative to the
+previous point, as described by previous coordinate mode in the X protocol.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#24998">See
+LbxFillPoly</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxCopyArea</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+srcCache</emphasis>
+: CARD8 /* source drawable */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-Drawable</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-x</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+width</emphasis>
+: LBXCARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+height</emphasis>
+: LBXCARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+dst-x</emphasis>
+: LBXPINT16 </entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+dst-y</emphasis>
+: LBXPINT16</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: Those given for the corresponding X
+request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+CopyArea</emphasis>
+ request for requests within its encoding range.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#10231">See
+LbxCopyArea</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxCopyPlane</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+bit-plane</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-cache</emphasis>
+: CARD8 /* cache reference for source drawable */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-drawable</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-x</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+src-y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+width</emphasis>
+: LBXCARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+height</emphasis>
+: LBXCARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+dst-x</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+dst-y</emphasis>
+: LBXPINT16</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: Those given for the corresponding X
+request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+CopyPlane</emphasis>
+ request for requests within its coding range.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#18847">See
+LbxCopyPlane</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyText8</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+x</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+items</emphasis>
+: LISTofTEXTITEM8</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+, and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyText8</emphasis>
+ request for requests within its encoding range.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#39640">See The
+description of this request is on page 23.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPolyText16</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+x:</emphasis>
+ LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+items</emphasis>
+: LISTofTEXTITEM16</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+, and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+PolyText16</emphasis>
+ request for requests within its encoding range.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#32634">See The
+description of this request is on page 24.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxImageText8</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+nChars</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+x</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+string</emphasis>
+: STRING8</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+, and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+ImageText8</emphasis>
+ request for requests within its encoding range.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#17018">See The
+description of this request is on page 24.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxImageText16</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+nChars</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>x: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+string</emphasis>
+: STRING16</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+, and those given for the corresponding X request.</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request replaces the <emphasis>
+ImageText16</emphasis>
+ request for requests within its encoding range.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#23910">See The
+description of this request is on page 24.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxPutImage</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+compression-method</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+format</emphasis>
+: {<emphasis>
+Bitmap</emphasis>
+, <emphasis>
+XYPixmap</emphasis>
+, <emphasis>
+ZPixmap</emphasis>
+} /* packed */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+gc-and-drawable: </emphasis>
+LBXGCANDDRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+width</emphasis>
+, <emphasis>
+height</emphasis>
+: LBXCARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+dst-x</emphasis>
+, <emphasis>
+dst-y</emphasis>
+: LBXPINT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+depth</emphasis>
+: CARD8 /* packed */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+left-pad</emphasis>
+: CARD8 /* packed */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+pad-bytes</emphasis>
+: CARD8 /* packed */</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+data</emphasis>
+:LISTofBYTE</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+, <emphasis>
+Value</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+When the request can be usefully compressed, this request replaces the
+<emphasis>
+PutImage</emphasis>
+ request. The <emphasis>
+compression-method</emphasis>
+ parameter contains the opcode of a compression method returned in the
+<emphasis>
+LbxStartProxy</emphasis>
+ reply. The <emphasis>
+pad-bytes</emphasis>
+ parameter gives the number of unused pad bytes that follow the compressed
+image data. All other parameters are as in the X request. If the specified
+compression method is not recognized, the server returns a <emphasis>
+Value</emphasis>
+ error.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#12268">See
+LbxPutImage</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxGetImage</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+drawable</emphasis>
+: DRAWABLE</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+x</emphasis>
+, <emphasis>
+y</emphasis>
+: INT16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+width</emphasis>
+, <emphasis>
+height</emphasis>
+: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+plane-mask</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+format</emphasis>
+: {XYPixmap, ZPixmap}</entry>
+ </row>
+ <row rowsep='0'>
+ <entry>=&gt;</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>depth: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>x-length: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>visual: VISUALID or None</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>compression-method: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'>data: LISTofBYTE</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc,Match,Value</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request can replace the <emphasis>
+GetImage</emphasis>
+ request. The same semantics apply, with the following exceptions.
+</para>
+
+
+<para>
+The <emphasis>
+compression-method</emphasis>
+ field contains the opcode of the compression method used in the reply. The
+compression opcodes are supplied in the <emphasis>
+LbxStartProxy</emphasis>
+ reply. The <emphasis>
+x-length </emphasis>
+field<emphasis>
+ </emphasis>
+contains the length of the uncompressed version of the reply in 4 byte units.
+</para>
+
+
+<para>
+A <emphasis>
+Value</emphasis>
+ error is returned if the format is not recognized by the X server. A <emphasis>
+Match</emphasis>
+ error is returned under the same circumstances as described by the <emphasis>
+GetImage</emphasis>
+ request.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#10066">See
+LbxGetImage</ulink>.
+</para>
+
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxBeginLargeRequest</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+large-request-length</emphasis>
+: CARD32</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request, along with the Lbx<emphasis>
+LargeRequestData</emphasis>
+ and Lbx<emphasis>
+EndLargeRequest</emphasis>
+ requests, is used to transport a large request in pieces. The smaller size of
+the resulting requests allows smoother multiplexing of clients on a single low
+bandwidth connection to the server. The resulting finer-grained multiplexing
+improves responsiveness for the other clients.
+</para>
+
+
+<para>
+After a <emphasis>
+LbxBeginLargeRequest</emphasis>
+ request is sent, multiple <emphasis>
+LbxLargeRequestData</emphasis>
+ requests are sent to transport all of the data in the large request, and
+finally an <emphasis>
+LbxEndLargeRequest</emphasis>
+ request is sent. The large-request-length field expresses the total length of
+the transported large request, expressed as the number of bytes in the
+transported request divided by four.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#22013">See The
+description of this request is on page 25.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxLargeRequestData</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+data</emphasis>
+: LISTofBYTE</entry>
+ </row>
+
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This request is used to carry the segments of a larger request, as described in
+the definition of <emphasis>
+LbxBeginLargeRequest</emphasis>
+. The data must be carried in order, starting with the request header, and each
+segment must be multiples of 4 bytes long. If the <emphasis>
+LbxLargeRequestData</emphasis>
+ is not preceded by a corresponding <emphasis>
+LbxBeginLargeRequest</emphasis>
+, a <emphasis>
+BadAlloc</emphasis>
+ error is generated.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#31469">See The
+description of this request is on page 26.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxEndLargeRequest</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoerror'>Errors: <emphasis>
+Length, Alloc</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+As described in the definition of <emphasis>
+LbxBeginLargeRequest</emphasis>
+, <emphasis>
+LbxEndLargeRequest</emphasis>
+ is used to signal the end of a series of <emphasis>
+LargeRequestData</emphasis>
+ requests. If the total length of the data transported by the <emphasis>
+LbxLargeRequestData</emphasis>
+ requests does not match the large-request-length field of the preceding
+<emphasis>
+LbxBeginLargeRequest</emphasis>
+ request, then a <emphasis>
+Length</emphasis>
+ error occurs. If the <emphasis>
+LbxEndLargeRequest</emphasis>
+ is not preceded by a corresponding <emphasis>
+LbxBeginLargeRequest</emphasis>
+, a <emphasis>
+BadAlloc</emphasis>
+ error is generated. The request is executed in order for that client as if it
+were the request after the request preceding <emphasis>
+LbxEndLargeRequest</emphasis>
+.
+</para>
+
+
+<para>
+The encoding for this request is on <ulink url="lbx.htm#31037">See
+LbxEndLargeRequest</ulink>.
+</para>
+
+
+
+</sect3>
+</sect2>
+<sect2 id='events'>
+<title>Events</title>
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxSwitchEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+client</emphasis>
+: CARD32</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Notify the proxy that the subsequent replies, events, and errors are relative
+to the specified client.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#17348">See
+LbxSwitchEvent</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxCloseEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+client</emphasis>
+: CARD32</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Notify the proxy that the specified client's connection to the server is closed.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#41814">See The
+description of this event is on page 27.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxInvalidateTagEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag-type</emphasis>
+: {Modmap, Keymap, Property, Font, ConnInfo}</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This message informs the proxy that the tag and the server data referenced by
+the tag are obsolete, and should be discarded. The tag type may be one of the
+following values: <emphasis>
+LbxTagTypeModmap</emphasis>
+, <emphasis>
+LbxTagTypeKeymap</emphasis>
+, <emphasis>
+LbxTagTypeProperty</emphasis>
+, <emphasis>
+LbxTagTypeFont</emphasis>
+, <emphasis>
+LbxTagTypeConnInfo</emphasis>
+.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#34406">See
+LbxInvalidateTagEvent</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxSendTagDataEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag</emphasis>
+: CARD32</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+tag-type</emphasis>
+: {Property}</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The server sends this event to the proxy to request a copy of tagged data which
+is being stored by the proxy. The request contains a tag which was previously
+assigned to the data by the server. The proxy should respond to <emphasis>
+SendTagData</emphasis>
+ by sending a <emphasis>
+TagData</emphasis>
+ request to the server. The tag type may be one of the following values:
+<emphasis>
+LbxTagTypeProperty</emphasis>
+.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#22353">See
+LbxSendTagDataEvent</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxListenToOne</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+client</emphasis>
+: CARD32 or <emphasis>
+0xffffffff</emphasis>
+</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+When the server is grabbed, <emphasis>
+ListenToOne</emphasis>
+ is sent to the proxy. As an X client, the proxy itself is unaffected by grabs,
+in order that it may respond to requests for data from the X server.
+</para>
+
+
+<para>
+When the client grabbing the server is managed through the proxy, the proxy
+will permit messages from itself and the grabbing client to be sent immediately
+to the server, and may buffer requests from other clients of the proxy. The
+client is identified in the event.
+</para>
+
+
+<para>
+When the client grabbing the server is not managed through the proxy, the
+client field in the event will be <emphasis>
+0xffffffff</emphasis>
+. The proxy will communicate with the server, and it may buffer requests from
+other clients. The proxy will continue to handle new connections while the
+server is grabbed.
+</para>
+
+
+<para>
+The server will send <emphasis>
+ListenToAll</emphasis>
+ to the proxy when the server is ungrabbed. There is no time-out for this
+interval in the protocol.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#18630">See The
+description of this event is on page 27.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxListenToAll</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+Notify the proxy that the server has been ungrabbed, and that the proxy may now
+send all buffered client requests on to the server.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#30610">See The
+description of this event is on page 27.</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxQuickMotionDeltaEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaTime</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaX</emphasis>
+: INT8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaY</emphasis>
+: INT8</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This event is used as a replacement for the <emphasis>
+MotionNotify</emphasis>
+ event when possible. The fields are used as deltas to the most recent
+<emphasis>
+MotionNotify</emphasis>
+ event encoded as a <emphasis>
+MotionNotify</emphasis>
+ event, <emphasis>
+LbxQuickMotionDeltaEvent</emphasis>
+, or <emphasis>
+LbxMotionDeltaEvent</emphasis>
+. Not every <emphasis>
+MotionNotify</emphasis>
+ event can be encoded as a <emphasis>
+LbxQuickMotionDeltaEvent</emphasis>
+.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#35213">See
+LbxQuickMotionDeltaEvent</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxMotionDeltaEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaX</emphasis>
+: INT8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaY</emphasis>
+: INT8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaTime</emphasis>
+: CARD16</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+deltaSequence</emphasis>
+: CARD16</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This event is used as a replacement for the <emphasis>
+MotionNotify</emphasis>
+ event when possible. The fields are used as deltas to the most recent
+<emphasis>
+MotionNotify</emphasis>
+ event encoded as a <emphasis>
+MotionNotify</emphasis>
+ event, <emphasis>
+LbxQuickMotionDeltaEvent</emphasis>
+, or <emphasis>
+LbxMotionDeltaEvent</emphasis>
+. Not every <emphasis>
+MotionNotify</emphasis>
+ event can be encoded as <emphasis>
+a LbxMotionDeltaEvent</emphasis>
+.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#35310">See
+LbxMotionDeltaEvent</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxReleaseCmapEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+colormap</emphasis>
+: Colormap</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This event notifies the proxy that it must release the grab on this colormap
+via the ReleaseCmap request. <ulink url="lbx.htm#34675">See
+LbxReleaseCmap</ulink>
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#14052">See
+LbxReleaseCmapEvent</ulink>.
+</para>
+
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxFreeCellsEvent</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+colormap</emphasis>
+: Colormap</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+pixelStart, pixelEnd</emphasis>
+: CARD32</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+The <emphasis>
+LbxFreeCells</emphasis>
+ event is sent to a proxy that has a colormap grabbed to notify the proxy that
+the reference count of the described cells were decremented to zero by the
+server or another proxy. The reference count includes those by this proxy. The
+proxy must update its copy of the colormap state accordingly if the colormap is
+still grabbed, or if the proxy may in the future grab the colormap using
+smart-grab mode. <ulink url="lbx.htm#10922">See LbxGrabCmap</ulink>
+</para>
+
+
+<para>
+The pixelStart and pixelEnd fields of the event denote a continuous range of
+cells that were freed.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#14731">See
+LbxFreeCellsEvent</ulink>.
+</para>
+
+</sect2>
+<sect2 id='responses'>
+<title>Responses</title>
+
+<para>
+Responses are messages from the server to the proxy that not, strictly
+speaking, events, replies or errors.
+</para>
+
+<informaltable frame='none' tabstyle='proto'>
+<tgroup cols='1'>
+<colspec colsep='0'/>
+ <thead>
+ <row rowsep='0'>
+ <entry role='protoname'>LbxDeltaResponse</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+count</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+cache-index</emphasis>
+: CARD8</entry>
+ </row>
+ <row rowsep='0'>
+ <entry role='protoargs'><emphasis>
+diffs</emphasis>
+: LISTofDIFFITEM</entry>
+ </row>
+ </tbody>
+ </tgroup>
+</informaltable>
+
+<para>
+This response carries an event, reply, or error that has been encoded relative
+to a message in the response delta cache. The <emphasis>
+cache-index</emphasis>
+ field is the index into the cache. Each entry in <emphasis>
+diffs</emphasis>
+ provides a byte offset and replacement value to use in reconstructing the
+response.
+</para>
+
+
+<para>
+The encoding for this event is on <ulink url="lbx.htm#17100">See
+LbxDeltaResponse</ulink>.
+</para>
+
+
+</sect2>
+</sect1>
+<sect1 id='algorithm_naming'>
+<title>Algorithm Naming</title>
+
+<para>
+To avoid potential clashes between different but similar algorithms for stream,
+bitmap, and pixmap compression, the following naming scheme will be adhered to:
+</para>
+
+
+<para>
+Each algorithm has a unique name, which is a STRING8, of the following form:
+</para>
+
+
+<para>
+ &lt;organization&gt;-&lt;some-descriptive-name&gt;
+</para>
+
+
+<para>
+The organization field above is the organization name as registered in section
+1 of the X Registry (the registry is provided as a free service by the X
+Consortium.) This prevents conflicts among different vendor’s extensions.
+</para>
+
+
+<para>
+As an example, the X Consortium defines a zlib-based stream compression
+algorithm called XC-ZLIB.
+</para>
+
+
+</sect1>
+<sect1 id='encoding'>
+<title>Encoding</title>
+
+<para>
+The syntax and types used in the encoding are taken from the X protocol
+encoding. Where LBX defines new types, they are defined earlier in this
+document.
+</para>
+
+
+<para>
+As in the X protocol, in various cases, the number of bytes occupied by a
+component will be specified by a lowercase single-letter variable name instead
+of a specific numeric value, and often some other component will have its value
+specified as a simple numeric expression involving these variables. Components
+specified with such expressions are always interpreted as unsigned integers.
+The scope of such variables is always just the enclosing request, reply, error,
+event, or compound type structure.
+</para>
+
+
+<para>
+For unused bytes, the encode-form is:
+</para>
+
+<literallayout>
+N unused
+</literallayout>
+
+<para>
+If the number of unused bytes is variable, the encode-form typically is:
+</para>
+
+<literallayout>
+p unused, p=pad(E)
+</literallayout>
+
+<para>
+where E is some expression, and pad(E) is the number of bytes needed to round E
+up to a multiple of four.
+</para>
+
+
+<para>
+pad(E) = (4 - (E mod 4)) mod 4
+</para>
+
+
+<para>
+In many of the encodings, the length depends on many variable length fields.
+The variable L is used to indicate the number of padded 4 byte units needed to
+carry the request. Similarly, the variable Lpad indicates the number of bytes
+needed to pad the request to a 4 byte boundary.
+</para>
+
+<literallayout>
+For counted lists there is a common encoding of NLISTofFOO:
+</literallayout>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>NLISTofFOO</emphasis>
+1 m num items
+m LISTofFOO items
+</literallayout>
+
+<para>
+For cached GC and Drawables:
+</para>
+
+<literallayout>
+<emphasis role='bold'>LBXGCANDDRAWUPDATE</emphasis>
+4 or 0 DRAWBLE optional drawable
+4 or 0 GC optional GC
+</literallayout>
+
+
+
+<literallayout>
+<emphasis role='bold'>LBXGCANDDRAWABLE</emphasis>
+8 LBXGCANDDRAWENT cache-entries
+8 unused
+m LBXGCANDDRAWUPDATE optional GC and Drawable
+</literallayout>
+
+
+<sect2 id='errors2'>
+<title>Errors</title>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxClient</emphasis>
+1 0 Error
+1 CARD8 error-base + 0
+2 CARD16 sequence number
+4 unused
+2 CARD16 lbx opcode
+1 CARD8 major opcode
+21 unused
+</literallayout>
+
+</sect2>
+<sect2 id='requests2'>
+<title>Requests</title>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxQueryVersion</emphasis>
+1 CARD8 opcode
+1 0 lbx opcode
+2 1 request length
+=&gt;
+1 1 Reply
+1 unused
+2 CARD16 sequence number
+4 0 reply length
+2 CARD16 major version
+2 CARD16 minor version
+20 unused
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#18761">See
+LbxQueryVersion</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxStartProxy</emphasis>
+1 CARD8 opcode
+1 1 lbx opcode
+2 L request length
+n NLISTofOPTION-REQUEST options
+p unused, p=pad(n)
+
+<emphasis role='bold'>OPTION-REQUEST</emphasis>
+1 OPTCODE option-code
+m OPTLEN option-request-byte-length, (b=m+a+1)
+a DELTAOPT or option
+ NLISTofNAMEDOPT or
+ NLISTofSTR or
+ NLISTofPIXMAPMETHOD or
+ BOOL
+</literallayout>
+
+<para>
+The encoding of the option field depends on the option-code.
+See <ulink url="lbx.htm#35444">See StartProxy Options</ulink>.
+</para>
+
+<literallayout class='monospaced'>
+1 OPTCODE option-code
+0 LbxOptionDeltaProxy
+1 LbxOptionDeltaServer
+2 LbxOptionStreamCompression
+3 LbxOptionBitmapCompression
+4 LbxOptionPixmapCompression
+5 LbxOptionMessageCompression /* also known as squishing */
+6 LbxOptionUseTags
+7 LbxOptionColormapAllocation
+255 LbxOptionExtension
+</literallayout>
+
+<para>
+OPTLEN has two possible encodings, depending on the size of the value carried:
+</para>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>OPTLEN</emphasis>
+1 CARD8 b (0 &lt; b &lt;= 255)
+
+<emphasis role='bold'>OPTLEN</emphasis>
+1 0 long length header
+1 c length0, c = b &gt;&gt; 8
+1 d length1, d= b &amp; #xff
+
+<emphasis role='bold'>DELTAOPT</emphasis>
+1 CARD8 min-cache-size
+1 CARD8 max-cache-size
+1 CARD8 preferred-cache-size
+1 CARD8 min-message-length
+1 CARD8 max-message-length (in 4-byte units)
+1 CARD8 preferred-message-length
+
+<emphasis role='bold'>NAMEDOPT</emphasis>
+f STR type-name
+1 g+1 option-data-length
+g LISTofBYTE option-data (option specific)
+
+<emphasis role='bold'>PIXMAPMETHOD</emphasis>
+h STR name
+1 BITMASK format mask
+1 j depth count
+j LISTofCARD8 depths
+
+=&gt;
+=&gt;
+
+1 1 Reply
+1 CARD8 count
+
+0xff options in request cannot be decoded
+2 CARD16 sequence number
+4 (a+p-32)/4 reply length
+a LISTofCHOICE options-reply
+p unused, if (n&lt;24) p=24-n else p=pad(n)
+
+<emphasis role='bold'>CHOICE</emphasis>
+1 CARD8 request-option-index
+b OPTLEN reply-option-byte-length
+c DELTACHOICE or choice
+ INDEXEDCHOICE or
+ NLISTofINDEXEDOPT or
+ NLISTofPIXMAPCHOICE or
+ BOOL or
+ INDEXEDCHOICE
+</literallayout>
+
+<para>
+The encoding of the choice field depends on the option-code. See <ulink
+url="lbx.htm#35444">See StartProxy Options</ulink>.
+</para>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>DELTACHOICE</emphasis>
+1 CARD8 preferred cache size
+1 CARD8 preferred message length in 4-byte units
+
+<emphasis role='bold'>INDEXEDCHOICE</emphasis>
+1 CARD8 index
+d LISTofBYTE data
+
+<emphasis role='bold'>PIXMAPCHOICE</emphasis>
+1 CARD8 index
+1 CARD8 opcode
+1 BITMASK format mask
+e NLISTofCARD8 depths
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#20870">See
+LbxStartProxy</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxStopProxy</emphasis>
+1 CARD8 opcode
+1 2 lbx opcode
+2 1 request length
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#27455">See
+LbxStopProxy</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxSwitch</emphasis>
+1 CARD8 opcode
+1 3 lbx opcode
+2 2 request length
+4 CARD32 client
+</literallayout>
+
+<para>
+The description of this request is on
+<ulink url="lbx.htm#33500">See LbxSwitch</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxNewClient</emphasis>
+1 CARD8 opcode
+1 4 lbx opcode
+2 L request length
+4 CARD32 client
+The remaining bytes of the request are the core connection setup.
+=&gt;
+If the connection is rejected, a core connection reply is sent. Otherwise the
+reply has the form:
+1 BOOL success
+1 change type
+ 0 no-deltas
+ 1 normal-client-deltas
+ 2 app-group-deltas
+2 CARD16 major version
+2 CARD16 minor version
+2 1 + a length
+4 CARD32 tag id
+</literallayout>
+
+<para>
+The remaining bytes depend on the value of change-type and length.
+</para>
+
+<para>
+For no-deltas, the remaining bytes are the &quot;additional data&quot;
+bytes of the core reply. (a = length of core reply, in 4 byte quantities).
+</para>
+
+<para>
+For normal-client-deltas, the additional bytes have the form, with a length (a
+= 1 +b):
+</para>
+
+<literallayout class='monospaced'>
+4 CARD32 resource id base
+4b LISTofSETofEVENT root input masks
+</literallayout>
+
+<para>
+For app-group-deltas, the additional bytes have the following form, with a
+length of (a = 1 + 4c):
+</para>
+
+<literallayout class='monospaced'>
+4 CARD32 resource id base
+4 WINDOW root id base
+4 VISUALID visual
+4 COLORMAP colormap
+4 CARD32 white pixel
+4 CARD32 black pixel
+4c LISTofSETofEVENT root input masks
+</literallayout>
+
+<para>
+The description of this request is on
+<ulink url="lbx.htm#17810">See LbxNewClient</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxCloseClient</emphasis>
+1 CARD8 opcode
+1 5 lbx opcode
+2 2 request length
+4 CARD32 client
+</literallayout>
+
+<para>
+The description of this request is on
+<ulink url="lbx.htm#21625">See LbxCloseClient</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxModifySequence</emphasis>
+1 CARD8 opcode
+1 6 lbx opcode
+2 2 request length
+4 CARD32 offset to sequence number
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#36693">See
+LbxModifySequence</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxAllowMotion</emphasis>
+1 CARD8 opcode
+1 7 lbx opcode
+2 2 request length
+4 CARD32 number of MotionNotify events
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#15895">See
+LbxAllowMotion</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxIncrementPixel</emphasis>
+1 CARD8 opcode
+1 8 lbx opcode
+2 3 request length
+4 COLORMAP colormap
+4 CARD32 pixel
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#27227">See
+LbxIncrementPixel</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxDelta</emphasis>
+1 CARD8 opcode
+1 9 lbx opcode
+2 1+(2n +p+2)/4 request length
+1 n count of diffs
+1 CARD8 cache index
+2n LISTofDIFFITEM offsets and differences
+p unused, p=pad(2n + 2)
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#26857">See
+LbxDelta</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxGetModifierMapping</emphasis>
+1 CARD8 opcode
+1 10 lbx opcode
+2 1 request length
+=&gt;
+1 1 Reply
+1 n keycodes-per-modifier
+2 CARD16 sequence number
+4 2n reply length
+4 CARD32 tag
+20 unused
+8n LISTofKEYCODE keycodes
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#37687">See
+LbxGetModifierMapping</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxInvalidateTag</emphasis>
+1 CARD8 opcode
+1 12 lbx opcode
+2 2 request length
+4 CARD32 tag
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#12515">See
+LbxInvalidateTag</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyPoint</emphasis>
+1 CARD8 opcode
+1 13 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXPOINT points (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#37179">See
+LbxPolyPoint</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyLine</emphasis>
+1 CARD8 opcode
+1 14 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXPOINT points (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#16574">See
+LbxPolyLine</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolySegment</emphasis>
+1 CARD8 opcode
+1 15 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXSEGMENT segments (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#26077">See
+LbxPolySegment</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyRectangle</emphasis>
+1 CARD8 opcode
+1 16 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXRECTANGLE rectangles (n is data-dependent)
+p 0 unused, p=pad(m+n)
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#40958">See
+LbxPolyRectangle</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyArc</emphasis>
+1 CARD8 opcode
+1 17 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXARCS arcs (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#15317">See
+LbxPolyArc</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxFillPoly</emphasis>
+1 CARD8 opcode
+1 18 lbx opcode
+2 1+(3+m+n+p)/4 request length
+1 LBXGCANDDRAWENT cache entries
+1 shape
+0 Complex
+1 Nonconvex
+2 Convex
+1 p pad byte count
+m LBXGCANDDRAWUPDATE optional gc and drawable
+n LISTofLBXPOINT points (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#35796">See
+LbxFillPoly</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyFillRectangle</emphasis>
+1 CARD8 opcode
+1 19 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXRECTANGLE rectangles (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#25511">See
+LbxPolyFillRectangle</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyFillArc</emphasis>
+1 CARD8 opcode
+1 20 lbx opcode
+2 1+(m+n+p)/4 request length
+m LBXGCANDDRAWABLE cache entries
+n LISTofLBXARC arcs (n is data-dependent)
+p 0 unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#42698">See
+LbxPolyFillArc</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxGetKeyboardMapping</emphasis>
+1 CARD8 opcode
+1 21 lbx opcode
+2 2 request length
+1 KEYCODE first keycode
+1 m count
+2 unused
+=&gt;
+1 1 Reply
+1 n keysyms-per-keycode
+2 CARD16 sequence number
+4 nm reply length (m = count field from the request)
+4 CARD32 tag
+20 unused
+4nm LISTofKEYSYM keysyms
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#33719">See
+LbxGetKeyboardMapping</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxQueryFont</emphasis>
+1 CARD8 opcode
+1 22 lbx opcode
+2 2 request length
+4 FONTABLE font
+=&gt;
+1 1 Reply
+1 BOOL compression
+2 CARD16 sequence number
+4 L reply length
+4 CARD32 tag
+20 unused
+All of the following is conditional:
+12 CHARINFO min-bounds
+4 unused
+12 CHARINFO max-bounds
+4 unused
+2 CARD16 min-char-or-byte2
+2 CARD16 max-char-or-byte2
+2 CARD16 default-char
+2 n number of FONTPROPs in properties
+1 draw-direction
+0 <emphasis>LeftToRight</emphasis>
+1 <emphasis>RightToLeft</emphasis>
+1 CARD8 min-byte1
+1 CARD8 max-byte1
+1 BOOL all-chars-exist
+2 INT16 font-ascent
+2 INT16 font-descent
+4 m number of elements in char-infos
+8n LISTofFONTPROP properties
+and either
+12m LISTofCHARINFO char-infos
+or
+m LISTofLBXCHARINFO char-infos
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#18818">See
+LbxQueryFont</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxChangeProperty</emphasis>
+1 CARD8 opcode
+1 23 lbx opcode
+2 6 request length
+4 WINDOW window
+4 ATOM property
+4 ATOM type
+1 CARD8 format
+1 mode
+0 Replace
+1 Preprend
+2 Append
+2 unused
+4 CARD32 length of data in format units
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+=&gt;
+1 1 Reply
+1 unused
+2 CARD16 sequence number
+4 0 reply length
+4 CARD32 tag
+20 unused
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#40098">See
+LbxChangeProperty</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxGetProperty</emphasis>
+1 CARD8 opcode
+1 24 lbx opcode
+2 7 request length
+4 WINDOW window
+4 ATOM property
+4 ATOM type
+0 AnyPropertyType
+1 CARD8 delete
+3 unused
+4 CARD32 long-offset
+4 CARD32 long-length
+=&gt;
+1 1 Reply
+1 CARD8 format
+2 CARD16 sequence number
+4 CARD32 reply length
+4 ATOM type
+0 None
+4 CARD32 bytes-after
+4 CARD32 length of value in format units
+ (= 0 for format = 0)
+ (= n for format = 8)
+ (= n/2 for format = 16)
+ (= n/4 for format = 32)
+4 CARD32 tag
+8 unused
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#31397">See
+LbxGetProperty</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxTagData</emphasis>
+1 CARD8 opcode
+1 25 lbx opcode
+2 3+(n+p)/4 request length
+4 CARD32 tag
+4 CARD32 length of data in bytes
+n LISTofBYTE data
+p unused, p=pad(n)
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#17987">See
+LbxTagData</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxCopyArea</emphasis>
+1 CARD8 opcode
+1 26 lbx opcode
+2 L request length
+1 CARD8 source drawable cache entry
+1 LBXGCANDDRAWENT cache entries
+4 or 0 DRAWABLE optional source drawable
+b LBXGCANDDRAWUPDATE optional gc and dest drawable
+c LBXPINT16 src-x
+d LBXPINT16 src-y
+e LBXPINT16 dst-x
+f LBXPINT16 dst-y
+g LBXCARD16 width
+h LBXCARD16 height
+p unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#11409">See
+LbxCopyArea</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxCopyPlane</emphasis>
+1 CARD8 opcode
+1 27 lbx opcode
+2 L request length
+4 CARD32 bit plane
+1 CARD8 source drawable cache entry
+1 LBXGCANDDRAWENT cache entries
+4 or 0 DRAWABLE optional source drawable
+b LBXGCANDDRAWUPDATE optional gc and dest drawable
+c LBXPINT16 src-x
+d LBXPINT16 src-y
+e LBXPINT16 dst-x
+f LBXPINT16 dst-y
+g LBXCARD16 width
+h LBXCARD16 height
+p unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#36772">See
+LbxCopyPlane</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyText8</emphasis>
+1 CARD8 opcode
+1 28 lbx opcode
+2 L request length
+1 LBXGCANDDRAWENT cache entries
+a LBXGCANDDRAWUPDATE optional gc and drawable
+b LBXPINT16 x
+c LBXPINT16 y
+n LISTofTEXTITEM8 items
+p unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#23201">See
+LbxPolyText8</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPolyText16</emphasis>
+1 CARD8 opcode
+1 29 lbx opcode
+2 L request length
+1 LBXGCANDDRAWENT cache entries
+a LBXGCANDDRAWUPDATE optional gc and drawable
+b LBXPINT16 x
+c LBXPINT16 y
+2n LISTofTEXTITEM16 items
+p unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#13228">See
+LbxPolyText16</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxImageText8</emphasis>
+1 CARD8 opcode
+1 30 lbx opcode
+2 L request length
+1 LBXGCANDDRAWENT cache entries
+a LBXGCANDDRAWUPDATE optional gc and drawable
+b LBXPINT16 x
+c LBXPINT16 y
+n STRING8 string
+p unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#10990">See
+LbxImageText8</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxImageText16</emphasis>
+1 CARD8 opcode
+1 31 lbx opcode
+2 L request length
+1 LBXGCANDDRAWENT cache entries
+a LBXGCANDDRAWUPDATE optional gc and drawable
+b LBXPINT16 x
+c LBXPINT16 y
+2n STRING16 string
+p unused, p=Lpad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#39584">See
+LbxImageText16</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxQueryExtension</emphasis>
+1 CARD8 opcode
+1 32 lbx opcode
+2 2+(n+p)/4 request length
+4 n length of extension name
+n STRING8 extension name
+p unused, p=pad(n)
+=&gt;
+1 1 Reply
+1 n number of requests in the extension
+2 CARD16 sequence number
+4 0 or 2*(m + p) reply length, m = (n+7)/8
+1 BOOL present
+1 CARD8 major opcode
+1 CARD8 first event
+1 CARD8 first error
+20 unused
+m LISTofMASK optional reply-mask
+p unused, p=pad(m)
+m LISTofMASK optional event-mask
+p unused, p=pad(m)
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#36662">See
+LbxQueryExtension</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxPutImage</emphasis>
+1 CARD8 opcode
+1 33 lbx opcode
+2 L request length
+1 CARD8 compression method
+1 LBXGCANDDRAWENT cache entries
+a PIPACKED bit-packed
+b LBXGCANDDRAWUPDATE optional gc and drawable
+c LBXCARD16 width
+d LBXCARD16 height
+e LBXPINT16 x
+f LBXPINT16 y
+n LISTofBYTE compressed image data
+p unused, p=Lpad
+</literallayout>
+
+<para>
+If there is no left padding and the depth is less than or equal to nine,
+PIPPACKED is encoded as follows:
+</para>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>PIPACKED</emphasis>
+1 #x80 | (format &lt;&lt; 5) | ((depth -1) &lt;&lt; 2)
+</literallayout>
+
+<para>
+Otherwise PIPACKED is defined as:
+</para>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>PIPACKED</emphasis>
+1 (depth -1) &lt;&lt; 2)
+1 (format &lt;&lt; 5) | left-pad
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#21218">See
+LbxPutImage</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxGetImage</emphasis>
+1 CARD8 opcode
+1 34 lbx opcode
+2 6 request length
+4 DRAWABLE drawable
+2 INT16 x
+2 INT16 y
+2 CARD16 width
+2 CARD16 height
+4 CARD32 plane mask
+1 CARD8 format
+3 unused
+=&gt;
+1 1 Reply
+1 CARD8 depth
+2 CARD16 sequence number
+4 (n+p)/4 reply length
+4 (m+p)/4 X reply length; if uncompressed, m=n
+4 VISUALID visual
+0 None
+1 compression method
+15 unused
+n LISTofBYTE data
+p unused, p=pad(n)
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#26896">See
+LbxGetImage</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxBeginLargeRequest</emphasis>
+1 CARD8 opcode
+1 35 lbx opcode
+2 2 request length
+4 CARD32 large request length
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#31209">See
+LbxBeginLargeRequest</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxLargeRequestData</emphasis>
+1 CARD8 opcode
+1 36 lbx opcode
+2 1+n request length
+4n LISTofBYTE data
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#36982">See
+LbxLargeRequestData</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxEndLargeRequest</emphasis>
+1 CARD8 opcode
+1 37 lbx opcode
+2 1 request length
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#31841">See
+LbxEndLargeRequest</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxInternAtoms</emphasis>
+1 CARD8 opcode
+1 38 lbx opcode
+2 1+(2+m+n+p)/4 request length
+2 m num-atoms
+n LISTofLONGSTR names
+p pad p=Lpad
+=&gt;
+1 1 Reply
+1 unused
+2 CARD16 sequence number
+4 a reply length, a = MAX(m - 6, 0)
+4*m LISTofATOM atoms
+p pad p = MAX(0, 4*(6 - m))
+&nbsp;
+LONGSTR
+2 c string length
+c STRING8 string
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#21636">See
+LbxInternAtoms</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxGetWinAttrAndGeom</emphasis>
+1 CARD8 opcode
+1 39 lbx opcode
+2 2 request length
+4 CARD32 window id
+=&gt;
+1 1 Reply
+1 backing store
+0 NotUseful
+1 WhenMapped
+2 Always
+2 CARD16 sequence number
+4 7 reply length
+4 VISUALID visual id
+2 class
+1 InputOutput
+2 InputOnly
+1 BITGRAVITY bit gravity
+1 WINGRAVITY window gravity
+4 CARD32 backing bit planes
+4 CARD32 backing pixel
+1 BOOL save under
+1 BOOL map installed
+1 map state
+0 Unmapped
+1 Unviewable
+2 Viewable
+1 BOOL override
+4 COLORMAP colormap
+4 SETofEVENT all events mask
+4 SETofEVENT your event mask
+2 SETofDEVICEEVENT do not propagate mask
+2 unused
+4 WINDOW root
+2 INT16 x
+2 INT16 y
+2 CARD16 width
+2 CARD16 height
+2 CARD16 border width
+1 CARD8 depth
+1 unused
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#39382">See
+LbxGetWinAttrAndGeom</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxGrabCmap</emphasis>
+1 CARD8 opcode
+1 40 lbx opcode
+2 2 request length
+4 COLORMAP colormap
+=&gt;
+</literallayout>
+
+<para>
+If smart-grab is true, the reply is as follows:
+</para>
+
+<literallayout class='monospaced'>
+1 1 Reply
+1 #x80 flags
+2 CARD16 sequence number
+4 0 reply length
+24 unused
+
+If smart-grab is false, the reply is as follows:
+
+1 1 Reply
+1 flags (set of)
+ #x40 auto-release
+ #x20 three-channels
+ #x10 two-byte-pixels
+lower four bits specifies bits-per-pixel
+2 CARD16 sequence number
+4 L reply length
+m CHAN or CHANNELS cells (CHAN if !three-channels)
+p 0 pad(m)
+
+<emphasis role='bold'>CHANNELS</emphasis>
+a CHAN red
+1 5 next channel
+b CHAN green
+1 5 next channel
+c CHAN blue
+1 0 list end
+
+<emphasis role='bold'>CHAN</emphasis>
+d LISTofLBXPIXEL
+
+<emphasis role='bold'>LBXPIXEL</emphasis>
+e PIXELPRIVATE or
+ PIXELPRIVATERANGE or
+ PIXELALLOC or
+ PIXELALLOCRANGE
+
+<emphasis role='bold'>PIXELPRIVATE</emphasis>
+1 1 pixel-private
+f PIXEL pixel
+
+<emphasis role='bold'>PIXEL</emphasis>
+f CARD8 or CARD16 (CARD8 if !two-byte-pixels)
+
+<emphasis role='bold'>PIXELPRIVATERANGE</emphasis>
+1 2 pixel-private-range
+f PIXEL fist-pixel
+f PIXEL last-pixel
+
+<emphasis role='bold'>PIXELALLOC</emphasis>
+1 3 pixel-private
+f PIXEL pixel
+g COLORSINGLE or COLORTRIPLE color (COLORSINGLE if
+three-channels)
+
+<emphasis role='bold'>COLORSINGLE</emphasis>
+h CARD8 or CARD16 value (CARD8 if bits-per-rgb =&lt; 7)
+
+<emphasis role='bold'>COLORTRIPLE</emphasis>
+h COLORSINGLE red
+h COLORSINGLE green
+h COLORSINGLE blue
+
+<emphasis role='bold'>PIXELALLOCRANGE</emphasis>
+1 4 pixel-private
+f PIXEL first-pixel
+f PIXEL last-pixel
+j LISTofCOLORSINGLE or color (COLORSINGLE if three-channels)
+ LISTofCOLORTRIPLE
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#10922">See
+LbxGrabCmap</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxReleaseCmap</emphasis>
+1 CARD8 opcode
+1 41 lbx opcode
+2 2 request length
+4 COLORMAP cmap
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#34675">See
+LbxReleaseCmap</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxAllocColor</emphasis>
+1 CARD8 opcode
+1 42 lbx opcode
+2 5 request length
+4 COLORMAP colormap
+4 CARD32 pixel
+2 CARD16 red
+2 CARD16 green
+2 CARD16 blue
+2 unused
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#10446">See
+LbxAllocColor</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxSync</emphasis>
+1 CARD8 opcode
+1 43 lbx opcode
+2 1 request length
+=&gt;
+1 1 Reply
+1 n unused
+2 CARD16 sequence number
+4 0 reply length
+24 unused
+</literallayout>
+
+<para>
+The description of this request is on <ulink url="lbx.htm#30719">See
+LbxSync</ulink>.
+</para>
+
+
+
+</sect2>
+<sect2 id='events2'>
+<title>Events</title>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxSwitchEvent</emphasis>
+1 base + 0 code
+1 0 lbx type
+2 CARD16 sequence number
+4 CARD32 client
+24 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#33748">See
+LbxSwitchEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxCloseEvent</emphasis>
+1 base + 0 code
+1 1 lbx type
+2 CARD16 sequence number
+4 CARD32 client
+24 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#17292">See
+LbxCloseEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxInvalidateTagEvent</emphasis>
+1 base + 0 code
+1 3 lbx type
+2 CARD16 sequence number
+4 CARD32 tag
+4 tag-type
+1 <emphasis>LbxTagTypeModmap</emphasis>
+2 <emphasis>LbxTagTypeKeymap</emphasis>
+3 <emphasis>LbxTagTypeProperty</emphasis>
+4 <emphasis>LbxTagTypeFont</emphasis>
+5 <emphasis>LbxTagTypeConnInfo</emphasis>
+20 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#23016">See
+LbxInvalidateTagEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxSendTagDataEvent</emphasis>
+1 base + 0 code
+1 4 lbx type
+2 CARD16 sequence number
+4 CARD32 tag
+4 tag-type
+3 <emphasis>LbxTagTypeProperty</emphasis>
+20 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#20373">See
+LbxSendTagDataEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxListenToOne</emphasis>
+1 base + 0 code
+1 5 lbx type
+2 CARD16 sequence number
+4 CARD32 client
+<emphasis>#xFFFFFFFF</emphasis>
+a client not managed by the proxy
+24 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#25209">See
+LbxListenToOne</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxListenToAll</emphasis>
+1 base + 0 code
+1 6 lbx type
+2 CARD16 sequence number
+28 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#11095">See
+LbxListenToAll</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxQuickMotionDeltaEvent</emphasis>
+1 base + 1 code
+1 CARD8 delta-time
+1 INT8 delta-x
+1 INT8 delta-y
+</literallayout>
+
+<para>
+This event is not padded to 32 bytes.
+</para>
+
+
+<para>
+The description of this event is on <ulink url="lbx.htm#40268">See
+LbxQuickMotionDeltaEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxMotionDeltaEvent</emphasis>
+1 base + 0 code
+1 7 lbx type
+1 INT8 delta-x
+1 INT8 delta-y
+2 CARD16 delta-time
+2 CARD16 delta-sequence
+</literallayout>
+
+<para>
+This event is not padded to 32 bytes.
+</para>
+
+
+<para>
+The description of this event is on <ulink url="lbx.htm#30033">See
+LbxMotionDeltaEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxReleaseCmapEvent</emphasis>
+1 base + 0 code
+1 8 lbx type
+2 CARD16 sequence number
+4 COLORMAP colormap
+24 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#19129">See
+LbxReleaseCmapEvent</ulink>.
+</para>
+
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxFreeCellsEvent</emphasis>
+1 base + 0 code
+1 9 lbx type
+2 CARD16 sequence number
+4 COLORMAP colormap
+4 PIXEL pixel start
+4 PIXEL pixel end
+16 unused
+</literallayout>
+
+<para>
+The description of this event is on <ulink url="lbx.htm#38041">See
+LbxFreeCellsEvent</ulink>.
+</para>
+
+
+</sect2>
+<sect2 id='re_encoding_of_x_events'>
+<title>Re-encoding of X Events</title>
+
+<para>
+The X protocol requires all X events to be 32 bytes. The LBX server reduces the
+number of bytes sent between the server and the proxy for some X events by not
+appending unused pad bytes to the event data. The offsets of X event data are
+unchanged. The proxy will pad the events to 32 bytes before passing them on to
+the client.
+</para>
+
+
+<para>
+LBX reencodes X event representations into the following sizes, if squishing is
+enabled:
+</para>
+
+<para><programlisting>
+KeyOrButton 32
+EnterOrLeave 32
+Keymap 32
+Expose 20
+GraphicsExposure 24
+NoExposure 12
+VisibilityNotify 12
+CreateNotify 24
+DestroyNotify 12
+UnmapNotify 16
+MapNotify 16
+MapRequest 12
+Reparent 24
+ConfigureNotify 28
+ConfigureRequest 28
+GravityNotify 16
+ResizeRequest 12
+Circulate 20
+Property Notify 20
+SelectionClear 20
+SelectionRequest 28
+SelectionNotify 24
+Colormap Notify 16
+MappingNotify 8
+ClientMessage 32
+Unknown 32
+</programlisting></para>
+
+</sect2>
+<sect2 id='responses2'>
+<title>Responses</title>
+
+<literallayout class='monospaced'>
+<emphasis role='bold'>LbxDeltaResponse</emphasis>
+1 event_base + 0 event code
+1 2 lbx type
+2 1+(2+2n+p)/4 request length
+1 n count of diffs
+1 CARD8 cache index
+2n LISTofDIFFITEM offsets and differences
+p unused, p=pad(2n)
+</literallayout>
+
+<para>
+The description of this response is on <ulink url="lbx.htm#34042">See
+LbxDeltaResponse</ulink>.
+</para>
+
+</sect2>
+</sect1>
+</article>
diff --git a/proto/xextproto/specs/multibuf.xml b/proto/xextproto/specs/multibuf.xml
index 263d58084..1c8e36341 100644
--- a/proto/xextproto/specs/multibuf.xml
+++ b/proto/xextproto/specs/multibuf.xml
@@ -4,7 +4,7 @@
<!-- lifted from troff+ms+XMan by doclifter -->
-<book id="buffer">
+<book id="multibuf">
<bookinfo>
<title>Extending X for Double-Buffering, Multi-Buffering, and Stereo</title>
@@ -70,16 +70,16 @@ in this Software without prior written authorization from the X Consortium.
</legalnotice>
</bookinfo>
-<chapter>
-<title>TITLE</title>
+<preface><title>Warning</title>
<warning><para>
The <emphasis remap='I'>Multi-Buffering</emphasis> extension described here
was a draft standard of the X Consortium prior to Release 6.1. It has been
superseded by the Double Buffer
Extension (DBE). DBE is an X Consortium Standard as of Release 6.1.
</para></warning>
+</preface>
-<sect1 id="introduction">
+<chapter id="introduction">
<title>Introduction</title>
<para>
@@ -120,9 +120,9 @@ The authors of this proposal have tried to unify the above documents
to yield a proposal that incorporates support for double-buffering,
multi-buffering, and stereo in a way that is acceptable to all concerned.
</para>
-</sect1>
+</chapter>
-<sect1 id="goals">
+<chapter id="goals">
<title>Goals</title>
<para>
@@ -176,9 +176,9 @@ existing hardware features.
</listitem>
</itemizedlist>
-</sect1>
+</chapter>
-<sect1 id="image_buffers">
+<chapter id="image_buffers">
<title>Image Buffers</title>
<para>
@@ -316,9 +316,9 @@ the screen contents are not altered and the contents of any
undisplayed image buffers are undefined. If backing store was
maintained for an image buffer, then no exposure events are generated.
</para>
-</sect1>
+</chapter>
-<sect1 id="new_requests">
+<chapter id="new_requests">
<title>New Requests</title>
<para>
@@ -671,9 +671,9 @@ display are de-allocated. If the window is not multi-buffered,
the request is ignored.
</para>
-</sect1>
+</chapter>
-<sect1 id="attributes">
+<chapter id="attributes">
<title>Attributes</title>
<para>
@@ -860,9 +860,9 @@ increment for incompatible changes, and the minor version would
increment for small upward compatible changes. Barring changes, the
major version will be 1, and the minor version will be 1.
</para>
-</sect1>
+</chapter>
-<sect1 id="events">
+<chapter id="events">
<title>Events</title>
<para>
@@ -958,9 +958,9 @@ becomes <emphasis remap='I'>updated</emphasis>
<function>DisplayImageBuffers</function>
request), an <function>UpdateNotify</function> event is generated.
</para>
-</sect1>
+</chapter>
-<sect1 id="errors">
+<chapter id="errors">
<title>Errors</title>
<para>
@@ -968,14 +968,14 @@ The following error type has been added to support
this extension:
</para>
-<sect2 id="buffer_2">
+<sect1 id="buffer_2">
<title>Buffer</title>
<para>
A value for a BUFFER argument does not name a defined BUFFER.
</para>
-</sect2>
+</sect1>
-<sect2 id="double_buffering_normal_windows">
+<sect1 id="double_buffering_normal_windows">
<title>Double-Buffering Normal Windows</title>
<para>
@@ -1023,9 +1023,9 @@ while animating
DestroyImageBuffers( W )
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="multi_buffering_normal_windows">
+<sect1 id="multi_buffering_normal_windows">
<title>Multi-Buffering Normal Windows</title>
<para>
@@ -1070,9 +1070,9 @@ while animating
}
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="stereo_windows">
+<sect1 id="stereo_windows">
<title>Stereo Windows</title>
<para>
<emphasis remap='I'>How</emphasis> stereo windows are supported on a server
@@ -1175,9 +1175,9 @@ right eyes for normal windows should be the same
(ie: have no stereo offset).
</para>
-</sect2>
+</sect1>
-<sect2 id="single_buffered_stereo_windows">
+<sect1 id="single_buffered_stereo_windows">
<title>Single-Buffered Stereo Windows</title>
<para>
@@ -1195,9 +1195,9 @@ MapWindow( W )
&lt;draw picture using L,R&gt;
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="double_buffering_stereo_windows">
+<sect1 id="double_buffering_stereo_windows">
<title>Double-Buffering Stereo Windows</title>
<para>
@@ -1267,9 +1267,9 @@ while animating
}
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="multi_buffering_stereo_windows">
+<sect1 id="multi_buffering_stereo_windows">
<title>Multi-Buffering Stereo Windows</title>
<para>
@@ -1310,9 +1310,9 @@ while animating
DisplayImageBuffers( [L(i)], 100, 0 )
}
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="protocol_encoding">
+<sect1 id="protocol_encoding">
<title>Protocol Encoding</title>
<para>
@@ -1356,10 +1356,10 @@ Specifies the code that will be returned when
The following sections describe the protocol
encoding for this extension.
</para>
-</sect2>
</sect1>
+</chapter>
-<sect1 id="type">
+<chapter id="type">
<title>TYPES</title>
<literallayout class="monospaced">
@@ -1379,9 +1379,9 @@ SETofBUFFER_EVENT
#x04000000 UpdateNotify
</literallayout>
-</sect1>
+</chapter>
-<sect1 id="events_2">
+<chapter id="events_2">
<title>EVENTS</title>
<literallayout class="monospaced">
@@ -1406,8 +1406,8 @@ SETofBUFFER_EVENT
24 unused
</literallayout>
-</sect1>
-<sect1 id="errors_2">
+</chapter>
+<chapter id="errors_2">
<title>ERRORS</title>
<literallayout class="monospaced">
@@ -1421,9 +1421,9 @@ SETofBUFFER_EVENT
21 unused
</literallayout>
-</sect1>
+</chapter>
-<sect1 id="requests">
+<chapter id="requests">
<title>REQUESTS</title>
<literallayout class="monospaced">
@@ -1623,6 +1623,5 @@ VALUEs
</literallayout>
-</sect1>
</chapter>
</book>
diff --git a/proto/xextproto/specs/security.xml b/proto/xextproto/specs/security.xml
index bcf0153a3..ee132f379 100644
--- a/proto/xextproto/specs/security.xml
+++ b/proto/xextproto/specs/security.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<!--translated from security.tex, on 2010-06-27 15:29:00,
by TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/)
xhtml,docbook,html,refcaption -->
diff --git a/proto/xextproto/specs/shape.xml b/proto/xextproto/specs/shape.xml
index 7e5f2f77c..3386443c2 100644
--- a/proto/xextproto/specs/shape.xml
+++ b/proto/xextproto/specs/shape.xml
@@ -60,8 +60,7 @@ copyright holders.
</legalnotice>
</bookinfo>
-<chapter><title>TITLE</title>
-<sect1 id="Overview">
+<chapter id="Overview">
<title>Overview</title>
<para>
<!-- .LP -->
@@ -94,9 +93,9 @@ the window's geometry in the core protocol. An expected convention would be
that client programs expand their shape to fill the area offered by the
window manager.
</para>
-</sect1>
+</chapter>
-<sect1 id="Description">
+<chapter id="Description">
<title>Description</title>
<para>
Each window (even with no shapes specified) is defined by three regions: the
@@ -264,9 +263,9 @@ the server is permitted to ignore requested changes to the bounding region
of a root window. If the server accepts bounding region changes, the contents
of the screen outside the bounding region are implementation dependent.
</para>
-</sect1>
+</chapter>
-<sect1 id="Types">
+<chapter id="Types">
<title>Types</title>
<para>
<!-- .LP -->
@@ -307,9 +306,9 @@ produce the new destination region.
indicates that the destination region is subtracted from the source region to
produce the new destination region.
</para>
-</sect1>
+</chapter>
-<sect1 id="Requests">
+<chapter id="Requests">
<title>Requests</title>
<para>
<function>ShapeQueryVersion</function>
@@ -802,9 +801,9 @@ values is the same as in the
<function>ShapeRectangles</function>
request.
</para>
-</sect1>
+</chapter>
-<sect1 id="Events">
+<chapter id="Events">
<title>Events</title>
<para>
<function>ShapeNotify</function>
@@ -870,9 +869,9 @@ current shape. When shaped is
these will indicate the extents of the default region. The timestamp
indicates the server time when the shape was changed.
</para>
-</sect1>
+</chapter>
-<sect1 id="Encoding">
+<chapter id="Encoding">
<title>Encoding</title>
<para>
Please refer to the X11 Protocol Encoding document as this document uses
@@ -883,7 +882,7 @@ conventions established there.
The name of this extension is "SHAPE".
</para>
-<sect2 id="New_Types">
+<sect1 id="New_Types">
<title>New Types</title>
<literallayout class="monospaced">
@@ -901,9 +900,9 @@ SHAPE_OP
3 Subtract
4 Invert
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="Requests_2">
+<sect1 id="Requests_2">
<title>Requests</title>
<literallayout class="monospaced">
<function>ShapeQueryVersion</function>
@@ -1055,9 +1054,9 @@ SHAPE_OP
20 unused
8n LISTofRECTANGLE rectangles
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="Events_2">
+<sect1 id="Events_2">
<title>Events</title>
<literallayout class="monospaced">
<function>ShapeNotify</function>
@@ -1073,7 +1072,6 @@ SHAPE_OP
1 BOOL shaped
11 unused
</literallayout>
-</sect2>
</sect1>
</chapter>
diff --git a/proto/xextproto/specs/shm.xml b/proto/xextproto/specs/shm.xml
index 24c989c7d..127412c1d 100644
--- a/proto/xextproto/specs/shm.xml
+++ b/proto/xextproto/specs/shm.xml
@@ -4,7 +4,7 @@
<!-- lifted from troff+ms+XMan by doclifter -->
-<book id="mit-shm">
+<book id="shm">
<bookinfo>
<title>MIT-SHM(The MIT Shared Memory Extension)</title>
@@ -67,9 +67,7 @@ in this Software without prior written authorization from the X Consortium.
</legalnotice>
</bookinfo>
-<chapter>
-<title>TITLE</title>
-<sect1 id="REQUIREMENTS">
+<chapter id="REQUIREMENTS">
<title>REQUIREMENTS</title>
<para>
The shared memory extension is provided only by some X servers. To find out
@@ -82,9 +80,9 @@ 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>
-</sect1>
+</chapter>
-<sect1 id="WHAT_IS_PROVIDED">
+<chapter id="WHAT_IS_PROVIDED">
<title>WHAT IS PROVIDED</title>
<para>
@@ -106,9 +104,9 @@ 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>
-</sect1>
+</chapter>
-<sect1 id="HOW_TO_USE_THE_SHARED_MEMORY_EXTENSION">
+<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
@@ -165,9 +163,9 @@ conventional Xlib calls. When the extension is available,
version numbers of the extension implementation, and "pixmaps" which is
True iff shared memory pixmaps are supported.
</para>
-</sect1>
+</chapter>
-<sect1 id="USE_OF_SHARED_MEMORY_XIMAGES">
+<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:
@@ -408,9 +406,9 @@ shmdt (shminfo.shmaddr);
shmctl (shminfo.shmid, IPC_RMID, 0);
</literallayout>
-</sect1>
+</chapter>
-<sect1 id="USE_OF_SHARED_MEMORY_PIXMAPS">
+<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
@@ -469,6 +467,5 @@ 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>
-</sect1>
</chapter>
</book>
diff --git a/proto/xextproto/specs/sync.xml b/proto/xextproto/specs/sync.xml
index a8064a9c2..44a6b2cd5 100644
--- a/proto/xextproto/specs/sync.xml
+++ b/proto/xextproto/specs/sync.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
- "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
<!--translated from sync.tex, on 2010-06-29 10:52:00,
by TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/) xhtml,docbook,html,refcaption -->
@@ -9,7 +9,7 @@ by TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/) xhtml,docbook,html,ref
<book id="sync">
<bookinfo>
- <title>X Synchronization Extention Protocol</title>
+ <title>X Synchronization Extension Protocol</title>
<subtitle>X Consortium Standard</subtitle>
<releaseinfo>X Version 11, Release 6.6.84</releaseinfo>
<authorgroup>
@@ -20,18 +20,23 @@ by TeX4ht (http://www.cse.ohio-state.edu/~gurari/TeX4ht/) xhtml,docbook,html,ref
<othercredit>
<firstname>Dave</firstname>
<surname>Carver</surname>
- <affiliation><orgname>Digital EquipmentCorporation, MIT/Project Athena</orgname></affiliation>
+ <affiliation><orgname>Digital Equipment Corporation, MIT/Project Athena</orgname></affiliation>
</othercredit>
<othercredit>
<firstname>Jim</firstname>
<surname>Gettys</surname>
- <affiliation><orgname>Digital EquipmentCorporation, Cambridge Research Laboratory</orgname></affiliation>
+ <affiliation><orgname>Digital Equipment Corporation, Cambridge Research Laboratory</orgname></affiliation>
</othercredit>
<othercredit>
<firstname>David</firstname>
<surname>Wiggins</surname>
<affiliation><orgname>X Consortium, Inc.</orgname></affiliation>
</othercredit>
+ <othercredit>
+ <firstname>James</firstname>
+ <surname>Jones</surname>
+ <affiliation><orgname>NVIDIA Corporation</orgname></affiliation>
+ </othercredit>
</authorgroup>
<corpname>X Consortium Standard</corpname>
@@ -43,8 +48,9 @@ Digital Equipment Corporation, Maynard, Massachusetts
</holder>
</copyright>
<copyright><year>1991</year><holder>X Consortium</holder></copyright>
+ <copyright><year>2010</year><holder>NVIDIA Corporation</holder></copyright>
- <releaseinfo>Version 3.0</releaseinfo>
+ <releaseinfo>Version 3.1</releaseinfo>
<affiliation><orgname>X Consortium</orgname></affiliation>
<productnumber>X Version 11, Release 6.8</productnumber>
@@ -52,10 +58,10 @@ Digital Equipment Corporation, Maynard, Massachusetts
<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 appear in all copies. Olivetti, Digital, MIT, and the
-X Consortium make 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.
+copyright notice appear in all copies. Olivetti, Digital, MIT, the
+X Consortium, and NVIDIA make 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>
@@ -133,12 +139,17 @@ frame marker.
</para>
<para>
-The extension adds <function>Counter</function> and
-<function>Alarm</function> to the set of resources managed by the
+The extension adds <function>Counter</function>, <function>Alarm</function>,
+and <function>Fence</function> to the set of resources managed by the
server. A counter has a 64-bit integer value that may be increased or
decreased by client requests or by the server internally. A client can block
by sending an Await request that waits until one of a set of synchronization
-conditions, called TRIGGERs, becomes TRUE.
+conditions, called TRIGGERs, becomes TRUE. Alarms generate events when
+counter values go through a specified transition. A fence has two possible
+states: triggered and not triggered. Client requests can put the fence in
+either of these states. A client can block until one of a set of fences
+becomes triggered by sending an AwaitFence request. Fences are bound to a
+particular screen at creation time.
</para>
<para>
@@ -168,6 +179,21 @@ clients to receive an event on a regular basis when a particular counter
is changed.
</para>
+<para>
+The <function>CreateFence</function> request allows a client to create a
+<function>Fence</function> that can be triggered and reset using
+<function>TriggerFence</function> and <function>ResetFence</function>
+requests, respectively. <function>CreateFence</function> takes a drawable
+argument that implies which screen the fence should be created on. The
+<function>TriggerFence</function> request changes the fence's state only
+after all previous rendering commands affecting objects owned by the given
+fence's screen have completed. Note that while fence objects are bound
+to a screen and the simple trigger operation provided by this extension
+operates at screen granularity, other extensions may add more fine-grained
+trigger operations based on any number of events. The screen binding
+merely establishes an upper bound for the scope of fence operations.
+</para>
+
</sect1>
<sect1 id="types">
<title>Types</title>
@@ -201,6 +227,7 @@ SYSTEMCOUNTER: [
]
ALARM: XID
ALARMSTATE: {Active,Inactive,Destroyed}
+FENCE: XID
</literallayout>
<para>
@@ -283,6 +310,14 @@ registry of system counter names to avoid collisions in the name space.
<para>
An ALARM is the client-side handle on an <function>Alarm</function> resource.
</para>
+
+<para>
+The FENCE type defines the client-side handle on a server
+<function>Fence</function>. A fence can only be in one of two states,
+represented by a BOOL. If the value is TRUE, the fence is in the triggered
+state. Otherwise, the fence is in the not triggered state.
+</para>
+
</sect1>
<sect1 id="errors">
@@ -307,6 +342,15 @@ does not name a defined ALARM.
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>Fence</term>
+ <listitem>
+ <para>
+This error is generated if the value for a FENCE argument in a request
+does not name a defined FENCE.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect1>
@@ -341,7 +385,7 @@ and v1.version_minor &lt;= v2.version_minor. Compatible means that the
functionality is fully supported in an identical fashion in the two versions.
</para>
<para>
-This document describes major version 3, minor version 0 of the SYNC protocol.
+This document describes major version 3, minor version 1 of the SYNC protocol.
</para>
</listitem>
</varlistentry>
@@ -740,6 +784,118 @@ server.
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>CreateFence</term>
+ <listitem>
+<literallayout class="monospaced">
+drawable: DRAWABLE
+id: FENCE
+initially-triggered: BOOL
+Errors: <function>IDChoice</function>,<function>Alloc</function>
+</literallayout>
+ <para>
+This request creates a fence on the screen associated with drawable and
+assigns the specified id to it. The fence is in the triggered state iff
+initially-triggered is TRUE. There are no clients waiting on the fence.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>TriggerFence</term>
+ <listitem>
+<literallayout class="monospaced">
+fence: FENCE
+Errors: <function>Fence</function>
+</literallayout>
+ <para>
+This request puts the given fence in the triggered state after all rendering
+from previous requests that affects resources owned by the fence's screen has
+completed. This includes requests from other clients if those requests have
+been dispatched. This request has no visible effects if the fence was already
+in the triggered state. A <function>Fence</function> error is generated if
+fence does not name a valid fence.
+ </para>
+ <para>
+Note that the given fence's state is not necessarily directly modified by this
+request. The state change need only be queued to occur after the required
+rendering has completed. Clients should take care to not assume the fence will
+be in the triggered state in subsequent requests, such as those that operate
+on the given fence immediately. <function>AwaitFence</function> should first
+be issued if subsequent requests require the fence to be in the triggered
+state.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>ResetFence</term>
+ <listitem>
+<literallayout class="monospaced">
+fence: FENCE
+Errors: <function>Fence</function>,<function>Match</function>
+</literallayout>
+ <para>
+This request immediately puts the given fence in the not triggered state.
+A <function>Match</function> error is generated if the fence is not in the
+triggered state. A <function>Fence</function> error is generated if fence
+does not name a valid fence.
+ </para>
+ <para>
+See the warnings above regarding <function>TriggerFence</function>'s delayed
+effect. In particular, a <function>TriggerFence</function> request
+immediately followed by a <function>ResetFence</function> request is likely
+to result in a <function>Match</function> error. An
+<function>AwaitFence</function> request should be issued between the two.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>DestroyFence</term>
+ <listitem>
+<literallayout class="monospaced">
+fence: FENCE
+Errors: <function>Fence</function>
+</literallayout>
+ <para>
+This request destroys the given fence. All clients waiting on this fence are
+released. A fence is destroyed automatically when the connection to the client
+that created the fence is closed if the close-down mode is
+<function>DestroyAll</function>. A <function>Fence</function> error is
+generated if fence does not name a valid fence.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>QueryFence</term>
+ <listitem>
+<literallayout class="monospaced">
+fence: FENCE
+=>
+triggered: BOOL
+Errors: <function>Fence</function>
+</literallayout>
+ <para>
+This request returns TRUE if the given fence is triggered, or FALSE if it
+is not triggered. A <function>Fence</function> error is generated if
+fence does not name a valid fence.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>AwaitFence</term>
+ <listitem>
+<literallayout class="monospaced">
+fence-list: LISTofFENCE
+Errors: <function>Fence</function>,<function>Alloc</function>
+</literallayout>
+ <para>
+When this request is executed, the processing of further requests for the
+client is blocked until one or more of the fences in fence-list reaches the
+triggered state. If any of the fences are already in the triggered state,
+request processing resumes immediately. A <function>Fence</function> error
+is generated if any member of fence-list does not name a valid fence.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</sect1>
@@ -844,6 +1000,7 @@ TRIGGER:
WAITCONDITION:
20 TRIGGER trigger
8 INT64 event threshold
+FENCE: CARD32
</literallayout>
<para>
@@ -872,6 +1029,14 @@ groups, the byte ordering determined during connection setup is used.
2 CARD16 minor opcode
1 CARD8 major opcode
21 unused
+<function>Fence</function>
+ 1 0 Error
+ 1 Base + 2 code
+ 2 CARD16 sequence number
+ 4 CARD32 bad fence
+ 2 CARD16 minor opcode
+ 1 CARD8 major opcode
+ 21 unused
</literallayout>
</sect1>
@@ -1026,6 +1191,52 @@ GetPriority
4 INT32 priority
20 unused
+CreateFence
+ 1 CARD8 major opcode
+ 1 14 minor opcode
+ 2 4 request length
+ 4 DRAWABLE drawable
+ 4 FENCE id
+ 1 BOOL initially triggered
+ 3 unused
+
+TriggerFence
+ 1 CARD8 major opcode
+ 1 15 minor opcode
+ 2 2 request length
+ 4 FENCE id
+
+ResetFence
+ 1 CARD8 major opcode
+ 1 16 minor opcode
+ 2 2 request length
+ 4 FENCE id
+
+DestroyFence
+ 1 CARD8 major opcode
+ 1 17 minor opcode
+ 2 2 request length
+ 4 FENCE id
+
+QueryFence
+ 1 CARD8 major opcode
+ 1 18 minor opcode
+ 2 2 request length
+ 4 FENCE id
+=>
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 reply length
+ 1 BOOL triggered
+ 23 unused
+
+AwaitFence
+ 1 CARD8 major opcode
+ 1 19 minor opcode
+ 2 1 + n request length
+ 4*n LISTofFENCE wait conditions
+
</literallayout>
</sect1>
diff --git a/proto/xextproto/specs/tog-cup.xml b/proto/xextproto/specs/tog-cup.xml
index 08bb19b0c..bb6fb2558 100644
--- a/proto/xextproto/specs/tog-cup.xml
+++ b/proto/xextproto/specs/tog-cup.xml
@@ -64,9 +64,7 @@ X Window System is a trademark of The Open Group.
</legalnotice>
</bookinfo>
-<chapter>
-<title>TITLE</title>
-<sect1 id="Overview">
+<chapter id="Overview">
<title>Overview</title>
<para>
This extension has three purposes: a) to provide mechanism for a special
@@ -101,9 +99,9 @@ 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>
-</sect1>
+</chapter>
-<sect1 id="Requests">
+<chapter id="Requests">
<title>Requests</title>
<para>
<function>QueryVersion</function>
@@ -246,23 +244,23 @@ BadMatch error is generated if if cmap does not belong to a GrayScale,
PseudoColor, or DirectColor visual.
</para>
-</sect1>
+</chapter>
-<sect1 id="Events_and_Errors">
+<chapter id="Events_and_Errors">
<title>Events and Errors</title>
<para>
No new events or errors are defined by this extension.
</para>
-</sect1>
-<sect1 id="Changes_to_existing_protocol_">
+</chapter>
+<chapter id="Changes_to_existing_protocol_">
<title>Changes to existing protocol.</title>
<para>
None.
</para>
-</sect1>
+</chapter>
-<sect1 id="Encoding">
+<chapter id="Encoding">
<title>Encoding</title>
<para>
The name of this extension is "TOG-CUP".
@@ -338,9 +336,9 @@ additional alloc-ok member in the CUPStoreColors reply.)
#xF0 unused
1 unused
</literallayout>
-</sect1>
+</chapter>
-<sect1 id="C_Language_Binding">
+<chapter id="C_Language_Binding">
<title>C Language Binding</title>
<para>
@@ -531,9 +529,9 @@ colors are read-only (shareable). XCupStoreColors returns the number of
colors that were successfully allocated in the colormap.
</para>
-</sect1>
+</chapter>
-<sect1 id="Using_the_TOG_CUP_extension_and_Colormap_Utilization_Policy">
+<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
@@ -557,6 +555,6 @@ 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>
-</sect1>
</chapter>
+
</book>
diff --git a/proto/xextproto/specs/xtest.xml b/proto/xextproto/specs/xtest.xml
index 6da29f179..cdf5e6357 100644
--- a/proto/xextproto/specs/xtest.xml
+++ b/proto/xextproto/specs/xtest.xml
@@ -59,10 +59,7 @@ in this Software without prior written authorization from the X Consortium.
</bookinfo>
-<chapter>
-<title>TITLE</title>
-
-<sect1 id="Overview">
+<chapter id="Overview">
<title>Overview</title>
<para>
This extension is a minimal set of client and server extensions
@@ -110,9 +107,9 @@ Minimize performance penalties on normal server operation.
</para>
</listitem>
</itemizedlist>
-</sect1>
+</chapter>
-<sect1 id="Description">
+<chapter id="Description">
<title>Description</title>
<para>
The functions provided by this extension fall into two groups:
@@ -167,9 +164,9 @@ or pressed a key or button.
</varlistentry>
</variablelist>
-</sect1>
+</chapter>
-<sect1 id="Types">
+<chapter id="Types">
<title>Types</title>
<para>
The following types are used in the request and event definitions in
@@ -223,9 +220,9 @@ CURSOR { <function>CurrentCursor</function>, <function> None</function> }
or a cursor as defined by the X11 Protocol.
</para>
-</sect1>
+</chapter>
-<sect1 id="Client_Operations">
+<chapter id="Client_Operations">
<title>Client Operations</title>
<para>
@@ -330,9 +327,9 @@ in the buffer and
<function>False</function>
otherwise.
</para>
-</sect1>
+</chapter>
-<sect1 id="Server_Requests">
+<chapter id="Server_Requests">
<title>Server Requests</title>
<para>
<function>XTestGetVersion</function>
@@ -607,9 +604,9 @@ If impervious is
then the executing client returns to the normal state of being
susceptible to server grabs.
</para>
-</sect1>
+</chapter>
-<sect1 id="Encoding">
+<chapter id="Encoding">
<title>Encoding</title>
<para>
Please refer to the X11 Protocol Encoding document as this document uses
@@ -620,7 +617,7 @@ conventions established there.
The name of this extension is "XTEST".
</para>
-<sect2 id="New_Types">
+<sect1 id="New_Types">
<title>New Types</title>
<literallayout class="monospaced">
FAKE_EVENT_TYPE
@@ -635,9 +632,9 @@ FAKE_EVENT_TYPE
NOTE that the above values are defined to be the same as those for
the corresponding core protocol event types.
</para>
-</sect2>
+</sect1>
-<sect2 id="Requests">
+<sect1 id="Requests">
<title>Requests</title>
<literallayout class="monospaced">
@@ -700,10 +697,10 @@ the corresponding core protocol event types.
1 BOOL impervious
3 unused
</literallayout>
-</sect2>
</sect1>
+</chapter>
-<sect1 id="References">
+<chapter id="References">
<title>References</title>
<para>
Annicchiarico, D., et al.,
@@ -717,6 +714,6 @@ Drake, K. J.,
Minimum X11 Testing Extension</emphasis>.
UniSoft Ltd., June 1991.
</para>
-</sect1>
</chapter>
+
</book>
diff --git a/proto/xextproto/syncconst.h b/proto/xextproto/syncconst.h
index 926b60cb7..3acc387e3 100644
--- a/proto/xextproto/syncconst.h
+++ b/proto/xextproto/syncconst.h
@@ -54,7 +54,7 @@ PERFORMANCE OF THIS SOFTWARE.
#define SYNC_NAME "SYNC"
#define SYNC_MAJOR_VERSION 3
-#define SYNC_MINOR_VERSION 0
+#define SYNC_MINOR_VERSION 1
#define XSyncCounterNotify 0
@@ -65,7 +65,8 @@ PERFORMANCE OF THIS SOFTWARE.
#define XSyncBadCounter 0L
#define XSyncBadAlarm 1L
-#define XSyncNumberErrors (XSyncBadAlarm + 1)
+#define XSyncBadFence 2L
+#define XSyncNumberErrors (XSyncBadFence + 1)
/*
* Flags for Alarm Attributes
@@ -172,6 +173,7 @@ typedef enum {
typedef XID XSyncCounter;
typedef XID XSyncAlarm;
+typedef XID XSyncFence;
typedef struct _XSyncValue {
int hi;
unsigned int lo;
diff --git a/proto/xextproto/syncproto.h b/proto/xextproto/syncproto.h
index 13b53d531..1453e4401 100644
--- a/proto/xextproto/syncproto.h
+++ b/proto/xextproto/syncproto.h
@@ -67,6 +67,12 @@ PERFORMANCE OF THIS SOFTWARE.
#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
@@ -74,6 +80,8 @@ PERFORMANCE OF THIS SOFTWARE.
*/
#define XSyncCounter CARD32
#define XSyncAlarm CARD32
+#define XSyncFence CARD32
+#define Drawable CARD32
/*
* Initialize
@@ -337,6 +345,92 @@ typedef struct {
#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
*/
@@ -373,6 +467,8 @@ typedef struct _xSyncAlarmNotifyEvent {
#undef XSyncCounter
#undef XSyncAlarm
+#undef XSyncFence
+#undef Drawable
#endif /* _SYNCPROTO_H_ */
diff --git a/proto/xextproto/syncstr.h b/proto/xextproto/syncstr.h
index 87697a22f..25a48277e 100644
--- a/proto/xextproto/syncstr.h
+++ b/proto/xextproto/syncstr.h
@@ -1,4 +1,3 @@
-/* $Xorg: syncstr.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ */
/*
Copyright 1991, 1993, 1994, 1998 The Open Group
@@ -48,7 +47,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* $XFree86: xc/include/extensions/syncstr.h,v 1.3 2003/07/16 01:38:24 dawes Exp $ */
#ifndef _SYNCSTR_H_
#define _SYNCSTR_H_