summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaetan Nadon <memsize@videotron.ca>2010-06-26 14:29:04 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-06-26 16:19:23 -0400
commit7a945c21ebe87cd0b3e91159f83059f55ed40006 (patch)
tree7cc21bef94c81b1a2aa6f636b18bd07fda55e500
parent0860348104536fc3a6e7daa44079b7a58cbfe4e5 (diff)
doc: replace groff input format with docbook xml format
Initial version of docbook xml. dbelib abd synclib are missing and will be added later. Requires util-macros 1.10 Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--configure.ac10
-rw-r--r--specs/.gitignore6
-rw-r--r--specs/DPMSLib.ms331
-rw-r--r--specs/Makefile.am76
-rw-r--r--specs/dpmslib.xml420
-rw-r--r--specs/macros.t226
-rw-r--r--specs/shapelib.ms556
-rw-r--r--specs/shapelib.xml582
8 files changed, 1038 insertions, 1169 deletions
diff --git a/configure.ac b/configure.ac
index 7847a71..ff8d916 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,13 +12,15 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require xorg-macros minimum of 1.10 for DocBook XML documentation
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.10)
XORG_DEFAULT_OPTIONS
XORG_ENABLE_SPECS
-XORG_WITH_GROFF
+XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_FOP
+XORG_CHECK_SGML_DOCTOOLS(1.5)
AM_CONFIG_HEADER([config.h])
# Determine .so library version per platform
diff --git a/specs/.gitignore b/specs/.gitignore
index 84d7456..12fe512 100644
--- a/specs/.gitignore
+++ b/specs/.gitignore
@@ -1,8 +1,6 @@
# Add & Override for this directory and it's subdirectories
*.html
*.ps
+*.pdf
*.txt
-*.html.raw
-*.ps.raw
-*.txt.raw
-/images
+*.css
diff --git a/specs/DPMSLib.ms b/specs/DPMSLib.ms
deleted file mode 100644
index a8e909c..0000000
--- a/specs/DPMSLib.ms
+++ /dev/null
@@ -1,331 +0,0 @@
-.\" Use -ms and macros.t
-.\" $XdotOrg: xc/doc/specs/Xext/DPMSLib.ms,v 1.2 2004/04/23 18:42:18 eich Exp $
-.EH ''''
-.OH ''''
-.EF ''''
-.OF ''''
-.ps 10
-.nr PS 10
-\&
-.sp 8
-.ce 1
-\s+2\fBX Display Power Management Signaling (DPMS) Extension\fP\s-2
-.sp
-.ce 1
-\s+1\fBLibrary Specification\fP\s-1
-.sp 3
-.ce 3
-Version 1.0
-X Project Team Standard
-X Version 11, Release 6.8
-.sp 6
-.ce 4
-Rob Lembree
-\fIlembree@zk3.dec.com\fP
-.sp 6p
-Digital Equipment Corporation
-.sp 6p
-24 April 1996
-.ps 9
-.nr PS 9
-.sp 8
-.LP
-.bp
-.sp 15
-Copyright \(co Digital Equipment Corporation, 1996
-.LP
-Permission to use, copy, modify, distribute, and sell this
-documentation for any purpose is hereby granted without fee,
-provided that the above copyright notice and this permission
-notice appear in all copies. Digital Equipment Corporation
-makes no representations about the suitability for any purpose
-of the information in this document. This documentation is
-provided ``as is'' without express or implied warranty.
-.LP
-.ps 10
-.nr PS 10
-.bp 1
-.EH '\fBDisplay Power Management Signaling (DPMS) Extension\fP'
-.OH '\fBDisplay Power Management Signaling (DPMS) Extension\fP'
-.EF ''\fB % \fP''
-.OF ''\fB % \fP''
-.NH 1
-Overview
-.LP
-This extension provides X Protocol control over the VESA Display
-Power Management Signaling (DPMS) characteristics of video boards
-under control of the X Window System.
-.FS
-1. \fIX Window System\fP is a trademark of The Open Group.
-.FE
-.LP
-Traditionally, the X Window System has provided for both blanking and
-non-blanking screen savers. Timeouts associated with these built-in
-screen saver mechanisms are limited to idle (dwell) time, and a change
-timeout that specifies the change interval for non-blanking screen savers.
-.LP
-The United States' Environmental Protection Agency (EPA) Energy Star program
-requires that monitors power down after some idle time by default.
-While it is possible to simply overload the existing screen saver timeouts,
-this solution leaves the non-privileged user little to no control over
-the DPMS characteristics of his or her system. For example, disabling
-DPMS would require some unintended side effect in the core screen saver,
-such as disabling the changing of a non-blanking screen saver. Providing
-clients with this control requires an extension to the core X Window System
-Protocol, and this extension seeks to fill this gap.
-.LP
-There are four power levels specified by the Video Electronics Standards
-Association (VESA) Display Power Management Signaling (DPMS) standard.
-These are mapped onto the X DPMS Extension like this:
-.LP
-.Ds 0
-.TA .2i 1.5i 2.5i 3.5i
-.ta .2i 1.5i 2.5i 3.5i
-.R
-.PN "DPMS Extension Power Levels"
- 0 DPMSModeOn In use
- 1 DPMSModeStandby Blanked, low power
- 2 DPMSModeSuspend Blanked, lower power
- 3 DPMSModeOff Shut off, awaiting activity
-.De
-
-.NH 1
-DPMS Functions
-
-.PN DPMSQueryExtension
-.LP
-
-Bool DPMSQueryExtension \^(\fIdisplay, event_base, error_base\fP\^)
-.IP
- Display \fI*display;\fP
-.br
- int \fI*event_base, *error_base;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-.br
-\fIevent_base\fP Specifies the return location for the assigned base event
-.br
-\fIerror_base\fP Specifies the return location for the assigned base error
-
-.LP
-The DPMSQueryExtension function queries the X server to determine the availability
-of the DPMS Extension. If the extension is available, the return value is TRUE,
-and \fIevent_base\fP and \fIerror_base\fP are set to the base event number and base
-error number for the extension, respectively. Otherwise, the return value is
-FALSE, and the values of \fIevent_base\fP and \fIerror_base\fP are undefined.
-.LP
-
-.PN DPMSGetVersion
-.LP
-
-Status DPMSGetVersion\^(\fIdisplay, major_version, minor_version\fP\^)
-.IP
- Display \fI*display;\fP
-.br
- int \fI*major_version, *minor_version;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-.br
-\fImajor_version\fP Specifies the return location for the extension major version.
-.br
-\fIminor_version\fP Specifies the return location for the extension minor version.
-
-.LP
-The DPMSGetVersion function returns the version of the DPMS extension implemented by
-the X server. The version is returned in \fImajor_version\fP and \fIminor_version\fP.
-The major version and minor version for this specification are '1' and '1', respectively.
-The major version will be incremented for protocol incompatible changes, and the minor
-version will be incremented for small, upwardly compatible changes.
-.LP
-
-.PN DPMSCapable
-.LP
-
-Bool DPMSCapable\^(\fIdisplay\fP\^)
-.IP
- Display \fI*display;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-
-.LP
-The DPMSCapable function returns the DPMS capability of the X server, either
-TRUE \^(capable of DPMS\^) or FALSE \^(incapable of DPMS\^). The capability
-of an X server is implementation defined. For example, if a multi-headed X server
-is capable of DPMS on one head, and incapable on another, the truth value of this
-function is defined by the X server implementation.
-.LP
-
-.PN DPMSSetTimeouts
-.LP
-
-
-Status DPMSSetTimeouts\^(\fIdisplay, standby, suspend, off\fP\^)
-.IP
- Display \fI*display;\fP
-.br
- CARD16 \fIstandby, suspend, off;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-.br
-\fIstandby\fP Specifies the new standby timeout in seconds.
-.br
-\fIsuspend\fP Specifies the new suspend timeout in seconds.
-.br
-\fIoff\fP Specifies the new off timeout in seconds.
-
-.LP
-The DPMSSetTimeouts function permits applications to set the timeout values
-used by the X server for DPMS timings.
-.LP
-The value \fIstandby\fP is the amount of time of inactivity in seconds before
-standby mode is invoked. The actual effects of this mode are implementation
-defined, but in the case of DPMS compliant hardware, it is implemented by
-shutting off the horizontal sync signal, and pulsing the vertical sync signal.
-Standby mode provides the quickest monitor recovery time. Note also that many
-monitors implement this mode identically to suspend mode. A value of zero
-disables this mode.
-.LP
-The value \fIsuspend\fP is the amount of time of inactivity in seconds
-before the second level of power savings is invoked. Suspend mode's physical
-and electrical characteristics are implementation defined, but in DPMS compliant
-hardware, results in the pulsing of the horizontal sync signal, and shutting off
-of the vertical sync signal. Suspend mode recovery is considered to be slower
-than standby mode, but faster than off mode, however this is monitor
-dependent. As noted above, many monitors implement this mode identically to
-standby mode. A value of zero disables this mode.
-.LP
-The value \fIoff\fP is the amount of time of inactivity in seconds before the third and
-final level of power savings is invoked. Off mode's physical and electrical
-characteristics are implementation defined, but in DPMS compliant hardware,
-is implemented by shutting off both horizontal and vertical sync signals,
-resulting in the power-down of the monitor. Recovery time is implementation
-dependant, but frequently is similar to the power-up time of the monitor.
-A value of zero disables this mode.
-.LP
-Chronologically, standby mode occurs before or simultaneously with suspend mode, and
-suspend mode must occur before or simultaneously with off mode. Therefore,
-non-zero mode timeout values must be greater than or equal to the timeout values of
-earlier modes. If inconsistent values are supplied, a BadValue error will result.
-.LP
-
-.PN DPMSGetTimeouts
-.LP
-
-
-Bool DPMSGetTimeouts\^(\fIdisplay, standby, suspend, off\fP\^)
-.IP
- Display \fI*display;\fP
-.br
- CARD16 \fI*standby, *suspend, *off;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-.br
-\fIstandby\fP Specifies the current standby timeout in seconds.
-.br
-\fIsuspend\fP Specifies the current suspend timeout in seconds.
-.br
-\fIoff\fP Specifies the current off timeout in seconds.
-
-.LP
-The DPMSGetTimeouts function retrieves the timeout values used by the X
-server for DPMS timings.
-.LP
-The value \fIstandby\fP is the amount of time of inactivity in seconds before
-standby mode is invoked. A value of zero indicates that this mode has been disabled.
-.LP
-The value \fIsuspend\fP is the amount of time of inactivity in seconds before the
-second level of power savings is invoked. A value of zero indicates that this mode
-has been disabled.
-.LP
-The value \fIoff\fP is the amount of time of inactivity in seconds before the third
-and final level of power savings is invoked. A value of zero indicates that this mode
-has been disabled.
-.LP
-
-.PN DPMSEnable
-.LP
-
-
-Status DPMSEnable\^(\fIdisplay\fP\^)
-.IP
- Display \fI*display;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-
-.LP
-The DPMSEnable function enables DPMS on the specified display. When
-enabled, DPMS will use the currently saved timeout values, and will
-invoke the DPMS power mode appropriate for the amount of time that
-the workstation input devices have been idle. If DPMSEnable is invoked
-on a display with DPMS already enabled, no change is made, and no
-error is returned. If DPMSEnable is invoked on a display without
-support for DPMS, no change is made and no error is returned.
-.LP
-
-.PN DPMSDisable
-.LP
-
-
-Status DPMSDisable\^(\fIdisplay\fP\^)
-.IP
- Display \fI*display;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-
-.LP
-The DPMSDisable function disables DPMS on the specified display. When
-disabled, DPMS returns the display to DPMSModeOn. If DPMSDisable is
-invoked on a display with DPMS already disabled, no change is made,
-and no error is returned. If DPMSDisable is invoked on a display
-without support for DPMS, no change is made and no error is returned.
-.LP
-
-.PN DPMSForceLevel
-.LP
-
-
-Status DPMSForceLevel\^(\fIdisplay, level\fP\^)
-.IP
- Display \fI*display;\fP
-.br
- CARD16 \fIlevel;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-.br
-\fIlevel\fP Specifies the level to force power to.
-
-.LP
-The DPMSForceLevel function forces a DPMS capable display into the
-specified power level. The \fIlevel\fP must be one of
-DPMSModeOn, DPMSModeStandby, DPMSModeSuspend, or DPMSModeOff.
-Values other than these will result in a BadValue error. If DPMS
-is disabled on the display, a BadMatch protocol error will result.
-.LP
-
-.PN DPMSInfo
-.LP
-
-
-Status DPMSInfo\^(\fIdisplay, power_level, state\fP\^)
-.IP
- Display \fI*display;\fP
-.br
- CARD16 \fI*power_level;\fP
-.br
- BOOL \fI*state;\fP
-.LP
-\fIdisplay\fP Specifies the connection to the X server.
-.br
-\fIpower_level\fP Specifies the current power level.
-.br
-\fIstate\fP Specifies the current DPMS state
-
-.LP
-The DPMSInfo function returns information about the current DPMS state.
-The \fIstate\fP return parameter indicates whether or not DPMS is enabled
-\^(TRUE\^) or
-disabled \^(FALSE\^). The \fIpower_level\fP return parameter indicates the current
-power level \^(one of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend, or
-DPMSModeOff.\^)
-.LP
-
diff --git a/specs/Makefile.am b/specs/Makefile.am
index 7d39c2a..26cec9a 100644
--- a/specs/Makefile.am
+++ b/specs/Makefile.am
@@ -21,64 +21,44 @@
# DEALINGS IN THE SOFTWARE.
#
-EXTRA_DIST = \
- macros.t \
- dbelib.tex \
- DPMSLib.ms \
- shapelib.ms \
- synclib.tex
-
if ENABLE_SPECS
-if HAVE_GROFF_MS
-doc_DATA = DPMSLib.txt DPMSLib.ps DPMSLib.html shapelib.txt shapelib.ps shapelib.html
-imagesdir = $(docdir)/images
+doc_sources = dpmslib.xml shapelib.xml
+dist_doc_DATA = $(doc_sources)
-CLEANFILES = $(doc_DATA)
-MOSTLYCLEANFILES = index.*
+if HAVE_XMLTO
+doc_DATA = $(doc_sources:.xml=.html)
-install-data-local:
- test -z "$(imagesdir)" || $(mkdir_p) "$(DESTDIR)$(imagesdir)"
- @d="$(srcdir)/images/"; \
- list=`ls $$d`; \
- for p in $$list; do \
- echo " $(INSTALL_DATA) '$$d$$p' '$(DESTDIR)$(imagesdir)/$$p'"; \
- $(INSTALL_DATA) "$$d$$p" "$(DESTDIR)$(imagesdir)/$$p"; \
- done;
+if HAVE_FOP
+doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
+endif
-uninstall-local:
- @if test -n $(DESTDIR)$(imagesdir); then \
- if test -d $(DESTDIR)$(imagesdir); then \
- list=`ls $(DESTDIR)$(imagesdir)`; \
- for p in $$list; do \
- echo " rm -f '$(DESTDIR)$(imagesdir)/$$p'"; \
- rm -f "$(DESTDIR)$(imagesdir)/$$p"; \
- done \
- fi; \
- fi;
+if HAVE_XMLTO_TEXT
+doc_DATA += $(doc_sources:.xml=.txt)
+endif
-mostlyclean-local:
- @rm -fr images
+if HAVE_STYLESHEETS
+XMLTO_FLAGS = -m $(XSL_STYLESHEET)
-# Pass version string as a troff string for substitution
-GROFF_DEFS = -dxV="$(PACKAGE_STRING)"
+doc_DATA += xorg.css
+xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
+ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
+endif
-# -t to run through tbl
-GROFF_FLAGS = -t -ms $(GROFF_DEFS) $(srcdir)/macros.t
+CLEANFILES = $(doc_DATA)
-SUFFIXES = .ms .ps .txt .html
+SUFFIXES = .xml .ps .pdf .txt .html
-.ms.ps:
- -$(AM_V_GEN) $(GROFF) -Tps $(GROFF_FLAGS) $< 2> index.$@.raw > $@
- @if grep '^[^1-9.]' index.$@.raw | grep -v warning; then exit 1; \
- else test $$? -le 1; fi
+.xml.txt:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
-.ms.txt:
- $(AM_V_GEN) env GROFF_NO_SGR=TRUE $(GROFF) -Tutf8 $(GROFF_FLAGS) \
- $< 2> index.$@.raw > $@
+.xml.html:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
-.ms.html:
- $(AM_V_GEN) $(GROFF) -Thtml -P-Dimages -P-I$*-image $(GROFF_FLAGS) $< 2> index.$@.raw > $@
+.xml.pdf:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
-endif HAVE_GROFF_MS
-endif ENABLE_SPECS
+.xml.ps:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+endif HAVE_XMLTO
+endif ENABLE_SPECS
diff --git a/specs/dpmslib.xml b/specs/dpmslib.xml
new file mode 100644
index 0000000..1e29494
--- /dev/null
+++ b/specs/dpmslib.xml
@@ -0,0 +1,420 @@
+<?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">
+
+<!-- lifted from troff+ms+XMan by doclifter -->
+<book id="dpmslib">
+
+<bookinfo>
+ <title>X Display Power Management Signaling (DPMS) Extension</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release 6.8</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Rob</firstname><surname>Lembree</surname>
+ </author>
+ </authorgroup>
+ <corpname>Digital Equipment Corporation</corpname>
+ <copyright><year>1996</year><holder>X Consortium</holder></copyright>
+ <releaseinfo>Version 1.0</releaseinfo>
+ <affiliation><orgname>X Consortium</orgname></affiliation>
+ <productnumber>X Version 11, Release 6.8</productnumber>
+
+<legalnotice>
+<para>
+Permission to use, copy, modify, distribute, and sell this
+documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice and this permission
+notice appear in all copies. Digital Equipment Corporation
+makes no representations about the suitability for any purpose
+of the information in this document. This documentation is
+provided "as is" without express or implied warranty.
+</para>
+
+<para>
+<emphasis remap='I'>X Window System</emphasis> is a trademark of The Open Group.
+</para>
+</legalnotice>
+
+</bookinfo>
+
+<chapter id='overview'>
+<title>Overview</title>
+
+<para>This extension provides X Protocol control over the VESA Display
+Power Management Signaling (DPMS) characteristics of video boards
+under control of the X Window System.
+</para>
+
+<para>
+Traditionally, the X Window System has provided for both blanking and
+non-blanking screen savers. Timeouts associated with these built-in
+screen saver mechanisms are limited to idle (dwell) time, and a change
+timeout that specifies the change interval for non-blanking screen savers.
+</para>
+
+<para>
+The United States' Environmental Protection Agency (EPA) Energy Star program
+requires that monitors power down after some idle time by default.
+While it is possible to simply overload the existing screen saver timeouts,
+this solution leaves the non-privileged user little to no control over
+the DPMS characteristics of his or her system. For example, disabling
+DPMS would require some unintended side effect in the core screen saver,
+such as disabling the changing of a non-blanking screen saver. Providing
+clients with this control requires an extension to the core X Window System
+Protocol, and this extension seeks to fill this gap.
+</para>
+
+<para>
+There are four power levels specified by the Video Electronics Standards
+Association (VESA) Display Power Management Signaling (DPMS) standard.
+These are mapped onto the X DPMS Extension like this:
+</para>
+
+<literallayout remap='Ds'>
+<function>DPMS Extension Power Levels</function>
+ 0 DPMSModeOn In use
+ 1 DPMSModeStandby Blanked, low power
+ 2 DPMSModeSuspend Blanked, lower power
+ 3 DPMSModeOff Shut off, awaiting activity
+</literallayout> <!-- remap='De' -->
+
+</chapter>
+
+<chapter id='dpms_functions'>
+<title>DPMS Functions</title>
+
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>DPMSQueryExtention</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+ <paramdef>int <parameter>event_base</parameter></paramdef>
+ <paramdef>int <parameter>error_base</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>*display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>event_base</emphasis></term>
+ <listitem><para>Specifies the return location for the assigned base event</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>error_base</emphasis></term>
+ <listitem><para>Specifies the return location for the assigned base error</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSQueryExtension function queries the X server to determine the
+availability of the DPMS Extension. If the extension is available, the
+return value is TRUE, and <emphasis remap='I'>event_base</emphasis> and
+<emphasis remap='I'>error_base</emphasis> are set to the base event number
+and base error number for the extension, respectively. Otherwise, the
+return value is FALSE, and the values of
+<emphasis remap='I'>event_base</emphasis> and
+<emphasis remap='I'>error_base</emphasis> are undefined.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSGetVersion</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+ <paramdef>int <parameter>*major_version</parameter></paramdef>
+ <paramdef>int <parameter>*minor_version</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>major_version</emphasis></term>
+ <listitem><para>Specifies the return location for the extension major version.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>minor_version</emphasis></term>
+ <listitem><para>Specifies the return location for the extension minor version.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+
+<para>
+The DPMSGetVersion function returns the version of the DPMS extension
+implemented by the X server. The version is returned in
+<emphasis remap='I'>major_version</emphasis> and
+<emphasis remap='I'>minor_version</emphasis>.
+The major version and minor version for this specification are '1' and '1',
+respectively. The major version will be incremented for protocol
+incompatible changes, and the minor version will be incremented for small,
+upwardly compatible changes.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Bool <function>DPMSCapable</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+
+<para>
+The DPMSCapable function returns the DPMS capability of the X server, either
+TRUE (capable of DPMS) or FALSE (incapable of DPMS). The capability of an
+X server is implementation defined. For example, if a multi-headed X server
+is capable of DPMS on one head, and incapable on another, the truth value of
+this function is defined by the X server implementation.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSSetTimeouts</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+ <paramdef>CARD16 <parameter>standby</parameter></paramdef>
+ <paramdef>CARD16 <parameter>suspend</parameter></paramdef>
+ <paramdef>CARD16 <parameter>off</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>standby</emphasis></term>
+ <listitem><para>Specifies the new standby timeout in seconds.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>suspend</emphasis></term>
+ <listitem><para>Specifies the new suspend timeout in seconds.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>off</emphasis></term>
+ <listitem><para>Specifies the new off timeout in seconds.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSSetTimeouts function permits applications to set the timeout values
+used by the X server for DPMS timings.
+</para>
+
+<para>
+The value <emphasis remap='I'>standby</emphasis> is the amount of time of
+inactivity in seconds before standby mode is invoked. The actual effects of
+this mode are implementation defined, but in the case of DPMS compliant
+hardware, it is implemented by shutting off the horizontal sync signal,
+and pulsing the vertical sync signal.
+Standby mode provides the quickest monitor recovery time. Note also that
+many monitors implement this mode identically to suspend mode. A value
+of zero disables this mode.
+</para>
+
+<para>
+The value <emphasis remap='I'>suspend</emphasis> is the amount of time of
+inactivity in seconds before the second level of power savings is invoked.
+Suspend mode's physical and electrical characteristics are implementation
+defined, but in DPMS compliant hardware, results in the pulsing of the
+horizontal sync signal, and shutting off of the vertical sync signal.
+Suspend mode recovery is considered to be slower than standby mode, but
+faster than off mode, however this is monitor dependent. As noted above,
+many monitors implement this mode identically to standby mode. A value of
+zero disables this mode.
+</para>
+
+<para>
+The value <emphasis remap='I'>off</emphasis> is the amount of time of
+inactivity in seconds before the third and final level of power savings is
+invoked. Off mode's physical and electrical characteristics are
+implementation defined, but in DPMS compliant hardware, is implemented by
+shutting off both horizontal and vertical sync signals, resulting in
+the power-down of the monitor. Recovery time is implementation dependant,
+but frequently is similar to the power-up time of the monitor. A value
+of zero disables this mode.
+</para>
+
+<para>
+Chronologically, standby mode occurs before or simultaneously with
+suspend mode, and suspend mode must occur before or simultaneously with
+off mode. Therefore, non-zero mode timeout values must be greater than
+or equal to the timeout values of earlier modes. If inconsistent values
+are supplied, a BadValue error will result.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSGetTimeouts</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+ <paramdef>CARD16 <parameter>*standby</parameter></paramdef>
+ <paramdef>CARD16 <parameter>*suspend</parameter></paramdef>
+ <paramdef>CARD16 <parameter>*off</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>standby</emphasis></term>
+ <listitem><para>Specifies the new standby timeout in seconds.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>suspend</emphasis></term>
+ <listitem><para>Specifies the new suspend timeout in seconds.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>off</emphasis></term>
+ <listitem><para>Specifies the new off timeout in seconds.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSGetTimeouts function retrieves the timeout values used by the X
+server for DPMS timings.
+</para>
+
+<para>
+The value <emphasis remap='I'>standby</emphasis> is the amount of time of
+inactivity in seconds before standby mode is invoked. A value of zero
+indicates that this mode has been disabled.
+</para>
+
+<para>
+The value <emphasis remap='I'>suspend</emphasis> is the amount of time of
+inactivity in seconds before the second level of power savings is invoked.
+A value of zero indicates that this mode has been disabled.
+</para>
+
+<para>
+The value <emphasis remap='I'>off</emphasis> is the amount of time of
+inactivity in seconds before the third and final level of power savings is
+invoked. A value of zero indicates that this mode has been disabled.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSEnable</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSEnable function enables DPMS on the specified display. When
+enabled, DPMS will use the currently saved timeout values, and will
+invoke the DPMS power mode appropriate for the amount of time that
+the workstation input devices have been idle. If DPMSEnable is invoked
+on a display with DPMS already enabled, no change is made, and no
+error is returned. If DPMSEnable is invoked on a display without
+support for DPMS, no change is made and no error is returned.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSDisable</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSDisable function disables DPMS on the specified display. When
+disabled, DPMS returns the display to DPMSModeOn. If DPMSDisable is
+invoked on a display with DPMS already disabled, no change is made,
+and no error is returned. If DPMSDisable is invoked on a display
+without support for DPMS, no change is made and no error is returned.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSForceLevel</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+ <paramdef>CARD16 <parameter>level</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>level</emphasis></term>
+ <listitem><para>Specifies the level to force power to.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSForceLevel function forces a DPMS capable display into the
+specified power level. The <emphasis remap='I'>level</emphasis> must be one of
+DPMSModeOn, DPMSModeStandby, DPMSModeSuspend, or DPMSModeOff.
+Values other than these will result in a BadValue error. If DPMS
+is disabled on the display, a BadMatch protocol error will result.
+</para>
+
+<para>Status DPMSInfo(<emphasis remap='I'>display, power_level, state</emphasis>)</para>
+
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Status <function>DPMSInfo</function></funcdef>
+ <paramdef>Display <parameter>*display</parameter></paramdef>
+ <paramdef>CARD16 <parameter>power_level</parameter></paramdef>
+ <paramdef>BOOL <parameter>*state</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<variablelist remap='IP'>
+ <varlistentry>
+ <term><emphasis remap='I'>display</emphasis></term>
+ <listitem><para>Specifies the connection to the X server.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>power_level</emphasis></term>
+ <listitem><para>Specifies the current power level.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><emphasis remap='I'>state</emphasis></term>
+ <listitem><para>Specifies the current DPMS state.</para></listitem>
+ </varlistentry>
+</variablelist>
+
+<para>
+The DPMSInfo function returns information about the current DPMS state.
+The <emphasis remap='I'>state</emphasis> return parameter indicates whether
+or not DPMS is enabled (TRUE) or disabled (FALSE). The
+<emphasis remap='I'>power_level</emphasis> return parameter indicates the
+current power level (one of DPMSModeOn, DPMSModeStandby, DPMSModeSuspend,
+or DPMSModeOff.)
+</para>
+
+</chapter>
+</book>
+
diff --git a/specs/macros.t b/specs/macros.t
deleted file mode 100644
index cbc599b..0000000
--- a/specs/macros.t
+++ /dev/null
@@ -1,226 +0,0 @@
-.\" $Xorg: macros.t,v 1.3 2000/08/17 19:42:51 cpqbld Exp $
-.\" macros.t -- macros for X Consortium documents
-.\" Revised and commented by smarks 93.12.20.
-.\"
-.\" global setup: set ragged right, assign string variables
-.\"
-.na
-.ie n \{\
-.ds Q \&"
-.ds U \&"
-.ds - \%--
-.\}
-.el \{\
-.ds Q `\h'-\w'\^'u'`
-.ds U '\h'-\w'\^'u''
-.ds - \(em
-.\}
-.\"
-.\" --- Ds --- displayed text (like .DS) with no keep
-.\" .Ds is obsolete. Change to something from this table:
-.\" for this use instead
-.\" .Ds .ID
-.\" .Ds n .LD (where "n" is a number)
-.\" (Numbers don't work in these macros, so ".Ds 5"
-.\" comes out the same as ".Ds 0".)
-.\"
-.de Ds
-.nf
-.\\$1D \\$2 \\$1
-.ft 1
-.ps \\n(PS
-.if \\n(VS>=40 .vs \\n(VSu
-.if \\n(VS<=39 .vs \\n(VSp
-..
-.de D
-.ID \\$1
-..
-.de 0D
-.LD
-..
-.\" backward compatibility for the Xt spec
-.de 5D
-.LD
-..
-.\"
-.\" --- De --- obsolete: use .DE instead
-.\"
-.de De
-.DE
-..
-.\"
-.\" --- FD ---
-.\"
-.de FD
-.LP
-.KS
-.TA .5i 3i
-.ta .5i 3i
-.nf
-..
-.\"
-.\" --- FN ---
-.\"
-.de FN
-.fi
-.KE
-.LP
-..
-.\"
-.\" --- IN --- send an index entry to the stderr
-.\"
-.de IN
-.tm \\n%:\\$1:\\$2:\\$3
-..
-.\"
-.\" --- C{ ---
-.\"
-.de C{
-.KS
-.nf
-.D
-.\"
-.\" choose appropriate monospace font
-.\" the imagen conditional, 480,
-.\" may be changed to L if LB is too
-.\" heavy for your eyes...
-.\"
-.ie "\\*(.T"480" .ft L
-.el .ie "\\*(.T"300" .ft L
-.el .ie "\\*(.T"202" .ft PO
-.el .ie "\\*(.T"aps" .ft CW
-.el .ft R
-.ps \\n(PS
-.ie \\n(VS>40 .vs \\n(VSu
-.el .vs \\n(VSp
-..
-.\"
-.\" --- C} ---
-.\"
-.de C}
-.DE
-.R
-..
-.\"
-.\" --- Pn --- like PN, but use $2; $1 and $3 abut
-.\"
-.de Pn
-.IN \\$2
-.ie t \\$1\fB\^\\$2\^\fR\\$3
-.el \\$1\fI\^\\$2\^\fP\\$3
-..
-.\"
-.\" --- PN --- put $1 in boldface and add index entry; $2 abuts
-.\"
-.de PN
-.IN \\$1
-.ie t \fB\^\\$1\^\fR\\$2
-.el \fI\^\\$1\^\fP\\$2
-..
-.\"
-.\" --- hI --- add index entry for $1 as header file
-.\"
-.de hI
-.IN <\\$1>
-.IN Files <\\$1>
-.IN Headers <\\$1>
-..
-.\"
-.\" --- hN --- put $1 in boldface as header and add index entry; $2 abuts
-.\"
-.de hN
-.hI \\$1
-.ie t <\fB\\$1\fR>\\$2
-.el <\fI\\$1\fP>\\$2
-..
-.\"
-.\" --- NT ---
-.\"
-.de NT
-.br
-.ne 7
-.ds NO Note
-.if \\n(.$ .ds NO \\$1
-.ie n .sp
-.el .sp 10p
-.ce
-\\*(NO
-.ie n .sp
-.el .sp 5p
-.if '\\$1'C' .ce 99
-.if '\\$2'C' .ce 99
-.\" .QS/.QE macros don't exist in older versions of -ms
-.ie \\n(GS .QS
-.el \{\
-. in +5n
-. ll -5n
-.\}
-.R
-..
-.\"
-.\" --- NE --- Note End (doug kraft 3/85)
-.\"
-.de NE
-.ce 0
-.ie \\n(GS .QE
-.el \{\
-. in -5n
-. ll +5n
-.\}
-.ie n .sp
-.el .sp 10p
-..
-.\"
-.\" --- nH --- numbered header (like NH) but with automatic TOC entry
-.\" usage: .nH level "section title, preferable in quotes"
-.\"
-.de nH
-.NH \\$1
-\\$2
-.XS
-\\*(SN \\$2
-.XE
-..
-.\"
-.\" --- sM --- put start-marker in margin
-.\"
-.de sM
-.KS
-.sp 1
-\\h'-0.5i'\\L'-1v'\\v'1p'\\l'1v'\\v'1v-1p'
-.sp -1
-..
-.\"
-.\" --- eM --- put end-marker in margin
-.\"
-.de eM
-.sp -1
-\\h'-0.5i'\\L'-1v'\\v'1v+1p'\\l'1v'\\v'-1p'
-.sp 1
-.KE
-..
-.\"
-.\" --- YZ --- finish up; $1 is the starting page number of the TOC
-.\"
-.de YZ
-. \" Force there to be an even number of pages, so the table of
-. \" contents doesn't end up on the back of the last page in
-. \" the case of duplex printing.
-.if o .bp
-. \" Emit a .pn directive with one plus the last page number.
- \" This will be the number of the first page of the index.
-.nr YZ \\n%+1
-.tm .pn \\n(YZ
-. \" Issue the table of contents, setting roman numerals,
-. \" and redefining the footer to use them.
-.bp \\$1
-.af PN i
-.EF ''\\\\\\\\n(PN''
-.OF ''\\\\\\\\n(PN''
-. \" Why all the backslashes? This string is evaluated
-. \" three times: 1) during the definition of this macro,
-. \" 2) when the .EF and .OF macros are expanded, and 3)
-. \" when the bottom-of-page trap is invoked. Thus,
-. \" eight backslashes are reduced to one in the final output.
-.PX
-..
diff --git a/specs/shapelib.ms b/specs/shapelib.ms
deleted file mode 100644
index e8fcdc8..0000000
--- a/specs/shapelib.ms
+++ /dev/null
@@ -1,556 +0,0 @@
-.\" Use -ms and macros.t
-.\" $Xorg: shapelib.ms,v 1.3 2000/08/17 19:42:36 cpqbld Exp $
-.\" $XdotOrg: xc/doc/specs/Xext/shapelib.ms,v 1.2 2004/04/23 18:42:18 eich Exp $
-.\" edited for DP edits and code consistency w/ core protocol/xlib 4/1/96
-.EH ''''
-.OH ''''
-.EF ''''
-.OF ''''
-.ps 10
-.nr PS 10
-\&
-.sp 8
-.ce 3
-\s+2\fBX Nonrectangular Window
-
-Shape Extension Library\fP\s-2
-.sp 3
-.ce 3
-Version 1.0
-X Consortium Standard
-X Version 11, Release 6.8
-.sp 6
-.ce 4
-\s-1Keith Packard
-.sp 6p
-MIT X Consortium
-.ps 9
-.nr PS 9
-.sp 8
-.LP
-Copyright \(co 1989 X Consortium
-.LP
-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:
-.LP
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-.LP
-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.
-.LP
-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.
-.ps 10
-.nr PS 10
-.bp 1
-.EH ''X Nonrectangular Window Shape Extension Library''
-.OH ''X Nonrectangular Window Shape Extension Library''
-.EF ''\fB % \fP''
-.OF ''\fB % \fP''
-.NH 1
-Overview
-.LP
-This extension provides arbitrary window and border shapes within the X11
-protocol.
-.LP
-The restriction of rectangular windows within the X protocol is a significant
-limitation in the implementation of many styles of user interface. For
-example, many transient windows would like to display a ``drop shadow'' to
-give the illusion of 3 dimensions. As another example, some user interface
-style guides call for buttons with rounded corners; the full simulation of a
-nonrectangular shape, particularly with respect to event distribution and
-cursor shape, is not possible within the core X protocol. As a final
-example, round clocks and nonrectangular icons are desirable visual addition
-to the desktop.
-.LP
-This extension provides mechanisms for changing the visible shape of a
-window to an arbitrary, possibly disjoint, nonrectangular form. The intent
-of the extension is to supplement the existing semantics, not replace them.
-In particular, it is desirable for clients that are unaware of the
-extension to still be able to cope reasonably with shaped windows. For
-example, window managers should still be able to negotiate screen
-real estate in rectangular pieces. Toward this end, any shape specified for
-a window is clipped by the bounding rectangle for the window as specified by
-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.
-.NH 1
-Description
-.LP
-Each window (even with no shapes specified) is defined by two regions: the
-\fIbounding region\fP and the \fIclip region\fP. The bounding region is the area of the
-parent window that the window will occupy (including border). The clip region
-is the subset of the bounding region that is available for subwindows and
-graphics. The area between the bounding region and the clip region is defined
-to be the border of the window.
-.LP
-A nonshaped window will have a bounding region that is a rectangle
-spanning the window, including its border; the clip region will be a rectangle
-filling the inside dimensions (not including the border). In this document,
-these areas are referred to as the \fIdefault bounding region\fP and the
-\fIdefault clip region\fP. For a window with inside size of \fIwidth\fP by
-\fIheight\fP and border width \fIbwidth\fP, the default bounding and clip
-regions are the rectangles (relative to the window origin):
-.LP
-.sM
-.Ds 0
-bounding.x = -\fIbwidth\fP
-bounding.y = -\fIbwidth\fP
-bounding.width = \fIwidth\fP + 2 * \fIbwidth\fP
-bounding.height = \fIheight\fP + 2 * \fIbwidth\fP
-
-clip.x = 0
-clip.y = 0
-clip.width = \fIwidth\fP
-clip.height = \fIheight\fP
-.De
-.LP
-.eM
-This extension allows a client to modify either or both of the bounding or
-clip regions by specifying new regions that combine with the default
-regions. These new regions are called the \fIclient bounding region\fP and
-the \fIclient clip region\fP. They are specified relative to the origin of
-the window and are always defined by offsets relative to the window origin
-(that is, region adjustments are not required when the window is moved).
-Three mechanisms for specifying regions are provided: a list of rectangles,
-a bitmap, and an existing bounding or clip region from a window. This is
-modeled on the specification of regions in graphics contexts in the core
-protocol and allows a variety of different uses of the extension.
-.LP
-When using an existing window shape as an operand in specifying a new shape,
-the client region is used, unless none has been set, in which case the
-default region is used instead.
-.LP
-The \fIeffective bounding region\fP of a window is defined to be the intersection of
-the client bounding region with the default bounding region. Any portion of
-the client bounding region that is not included in the default bounding
-region will not be included in the effective bounding region on the screen.
-This means that window managers (or other geometry managers) used to dealing
-with rectangular client windows will be able to constrain the client to a
-rectangular area of the screen.
-.LP
-Construction of the effective bounding region is dynamic; the client bounding
-region is not mutated to obtain the effective bounding region. If a client
-bounding region is specified that extends beyond the current default bounding
-region, and the window is later enlarged, the effective bounding region will
-be enlarged to include more of the client bounding region.
-.LP
-The \fIeffective clip region\fP of a window is defined to be the intersection of the
-client clip region with both the default clip region and the client bounding
-region. Any portion of the client clip region that is not included in both
-the default clip region and the client bounding region will not be included in
-the effective clip region on the screen.
-.LP
-Construction of the effective clip region is dynamic; the client clip region is
-not mutated to obtain the effective clip region. If a client clip region is
-specified that extends beyond the current default clip region and the
-window or its bounding region is later enlarged, the effective clip region will
-be enlarged to include more of the client clip region if it is included in
-the effective bounding region.
-.LP
-The border of a window is defined to be the difference between the effective
-bounding region and the effective clip region. If this region is empty, no
-border is displayed. If this region is nonempty, the border is filled
-using the border-tile or border-pixel of the window as specified in the core
-protocol. Note that a window with a nonzero border width will never be able
-to draw beyond the default clip region of the window. Also note that a zero
-border width does not prevent a window from having a border, since the clip
-shape can still be made smaller than the bounding shape.
-.LP
-All output to the window and visible regions of any subwindows will be
-clipped to the effective clip region. The server must not retain window
-contents beyond the effective bounding region with backing store. The window's
-origin (for graphics operations, background tiling, and subwindow placement)
-is not affected by the existence of a bounding region or clip region.
-.LP
-Areas that are inside the default bounding region but outside the effective
-bounding region are not part of the window; these areas of the screen will
-be occupied by other windows. Input events that occur within the default
-bounding region but outside the effective bounding region will be delivered as
-if the window was not occluding the event position. Events that occur in
-a nonrectangular border of a window will be delivered to that window, just
-as for events that occur in a normal rectangular border.
-.LP
-An
-.PN InputOnly
-window can have its bounding region set, but it is a
-.PN Match
-error to attempt to set a clip region on an
-.PN InputOnly
-window or to specify its clip region as a source to a request
-in this extension.
-.LP
-The server must accept changes to the clip region of a root window, but
-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.
-.NH 1
-C Language Binding
-.LP
-The C functions provide direct access to the protocol and add no additional
-semantics.
-.LP
-The include file for this extension is
-.Pn < X11/extensions/shape.h >.
-The defined shape kinds are
-.PN ShapeBounding
-and
-.PN ShapeClip .
-The defined region operations are
-.PN ShapeSet ,
-.PN ShapeUnion ,
-.PN ShapeIntersect ,
-.PN ShapeSubtract ,
-and
-.PN ShapeInvert .
-.sM
-.FD 0
-Bool
-XShapeQueryExtension(\fIdisplay\fP\^, \fIevent_base\fP\^, \fIerror_base\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- int *\fIevent_base\fP\^; /* RETURN */
-.br
- int *\fIerror_base\fP\^; /* RETURN */
-.FN
-.LP
-.eM
-.PN XShapeQueryExtension
-returns
-.PN True
-if the specified display supports the SHAPE extension else
-.PN False .
-If the extension is supported, *event_base is set to the event number for
-.PN ShapeNotify
-events and *error_base would be set to the error number for the first error for
-this extension.
-Because no errors are defined for this version of the extension,
-the value returned here is not defined (nor useful).
-.LP
-.sp
-.sM
-.FD 0
-Status
-XShapeQueryVersion(\fIdisplay\fP\^, \fImajor_version\fP\^, \fIminor_version\fP\^)
-.br
- Display *\fIdisplay\fP;
-.br
- int *\fImajor_version\fP, *\fIminor_version\fP\^; /* RETURN */
-.FN
-.LP
-.eM
-If the extension is supported,
-.PN XShapeQueryVersion
-sets the major and minor version numbers of the
-extension supported by the display and returns a nonzero value.
-Otherwise, the arguments are not set and zero is returned.
-.LP
-.sp
-.sM
-.FD 0
-XShapeCombineRegion(\fIdisplay\fP\^, \fIdest\fP\^, \fIdest_kind\fP\^, \
-\fIx_off\fP\^, \fIy_off\fP\^, \fIregion\fP\^, \fIop\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIdest\fP\^;
-.br
- int \fIdest_kind\fP\^, \fIop\fP\^, \fIx_off\fP\^, \fIy_off\fP\^;
-.br
- REGION *\fIregion\fP\^;
-.FN
-.LP
-.eM
-.PN XShapeCombineRegion
-converts the specified region into a list of rectangles and calls
-.PN XShapeCombineRectangles .
-.LP
-.sp
-.sM
-.FD 0
-XShapeCombineRectangles(\fIdisplay\fP\^, \fIdest\fP\^, \fIdest_kind\fP\^, \
-\fIx_off\fP\^, \fIy_off\fP\^, \fIrectangles\fP\^, \fIn_rects\fP\^, \fIop\fP\^, \
-\fIordering\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIdest\fP\^;
-.br
- int \fIdest_kind\fP\^, \fIn_rects\fP\^, \fIop\fP\^, \fIx_off\fP\^, \
-\fIy_off\fP\^, \fIordering\fP\^;
-.br
- XRectangle *\fIrectangles\fP\^;
-.FN
-.LP
-.eM
-If the extension is supported,
-.PN XShapeCombineRectangles
-performs a
-.PN ShapeRectangles
-operation; otherwise, the request is ignored.
-.LP
-.sp
-.sM
-.FD 0
-XShapeCombineMask(\fIdisplay\fP\^, \fIdest\fP\^, \fIdest_kind\fP\^, \
-\fIx_off\fP\^, \fIy_off\fP\^, \fIsrc\fP\^, \fIop\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIdest\fP\^;
-.br
- int \fIdest_kind\fP\^, \fIop\fP\^, \fIx_off\fP\^, \fIy_off\fP\^;
-.br
- Pixmap \fIsrc\fP\^;
-.FN
-.LP
-.eM
-If the extension is supported,
-.PN XShapeCombineMask
-performs a
-.PN ShapeMask
-operation; otherwise, the request is ignored.
-.LP
-.sp
-.sM
-.FD 0
-XShapeCombineShape(\fIdisplay\fP\^, \fIdest\fP\^, \fIdest_kind\fP\^, \
-\fIx_off\fP\^, \fIy_off\fP\^, \fIsrc\fP\^, \fIsrc_kind\fP\^, \fIop\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIdest\fP\^, \fIsrc\fP\^;
-.br
- int \fIdest_kind\fP\^, \fIsrc_kind\fP\^, \fIop\fP\^, \fIx_off\fP\^, \fIy_off\fP\^;
-.FN
-.LP
-.eM
-If the extension is supported,
-.PN XShapeCombineShape
-performs a
-.PN ShapeCombine
-operation; otherwise, the request is ignored.
-.LP
-.sp
-.sM
-.FD 0
-XShapeOffsetShape(\fIdisplay\fP\^, \fIdest\fP\^, \fIdest_kind\fP\^, \
-\fIx_off\fP\^, \fIy_off\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIdest\fP\^;
-.br
- int \fIdest_kind\fP\^, fIx_off\fP\^, \fIy_off\fP\^;
-.FN
-.LP
-.eM
-If the extension is supported,
-.PN XShapeOffsetShape
-performs a
-.PN ShapeOffset
-operation; otherwise, the request is ignored.
-.LP
-.sp
-.sM
-.FD 0
-Status XShapeQueryExtents(\fIdisplay\fP\^, \fIwindow\fP\^, \
-\fIbounding_shaped\fP\^, \fIx_bounding\fP\^, \fIy_bounding\fP\^,
-.br
- \fIw_bounding\fP\^, \ \fIh_bounding\fP\^, \fIclip_shaped\fP\^, \
-\fIx_clip\fP\^, \fIy_clip\fP\^, \fIw_clip\fP\^, \fIh_clip\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIwindow\fP\^;
-.br
- Bool *\fIbounding_shaped\fP\^, *\fIclip_shaped\fP\^; /* RETURN */
-.br
- int *\fIx_bounding\fP\^, *\fIy_bounding\fP\^, *\fIx_clip\fP\^, \
-*\fIy_clip\fP\^; /* RETURN */
-.br
- unsigned int *\fIw_bounding\fP\^, *\fIh_bounding\fP\^, *\fIw_clip\fP\^, \
-* \fIh_clip\fP\^; /* RETURN */
-.FN
-.LP
-.eM
-If the extension is supported,
-.PN XShapeQueryExtents
-sets x_bounding, y_bounding, w_bounding, h_bounding to the extents of the
-bounding shape and sets x_clip, y_clip, w_clip, h_clip to the extents of
-the clip shape. For unspecified client regions, the extents of the
-corresponding default region are used.
-.LP
-If the extension is supported,
-a nonzero value is returned; otherwise, zero is returned.
-.LP
-.sp
-.sM
-.FD 0
-XShapeSelectInput(\fIdisplay\fP\^, \fIwindow\fP\^, \fImask\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIwindow\fP\^;
-.br
- unsigned long \fImask\fP\^;
-.FN
-.LP
-.eM
-To make this extension more compatible with other interfaces, although
-only one event type can be selected via the extension,
-.PN XShapeSelectInput
-provides a general mechanism similar to the standard Xlib binding for
-window events. A mask value has been defined,
-.PN ShapeNotifyMask
-that is the only valid bit in mask that may be specified.
-The structure for this event is defined as follows:
-.LP
-.sM
-.Ds 0
-.TA 1.5i
-.ta 1.5i
-typedef struct {
- int type; /* of event */
- unsigned long serial; /* # of last request processed by server */
- Bool send_event; /* true if this came frome a SendEvent request */
- Display *display; /* Display the event was read from */
- Window window; /* window of event */
- int kind; /* ShapeBounding or ShapeClip */
- int x, y; /* extents of new region */
- unsigned width, height;
- Time time; /* server timestamp when region changed */
- Bool shaped; /* true if the region exists */
-} XShapeEvent;
-.De
-.LP
-.eM
-.LP
-.sM
-.FD 0
-unsigned long
-XShapeInputSelected(\fIdisplay\fP\^, \fIwindow\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIwindow\fP\^;
-.FN
-.LP
-.eM
-.PN XShapeInputSelected
-returns the current input mask for extension events on the specified
-window; the value returned if
-.PN ShapeNotify
-is selected for is
-.PN ShapeNotifyMask ;
-otherwise, it returns zero.
-If the extension is not supported, it returns zero.
-.LP
-.sp
-.sM
-.FD 0
-XRectangle *
-XShapeGetRectangles(\fIdisplay\fP\^, \fIwindow\fP\^, \fIkind\fP\^, \
-\fIcount\fP\^, \fIordering\fP\^)
-.br
- Display *\fIdisplay\fP\^;
-.br
- Window \fIwindow\fP\^;
-.br
- int \fIkind\fP\^;
-.br
- int *\fIcount\fP\^; /* RETURN */
-.br
- int *\fIordering\fP\^; /* RETURN */
-.FN
-.LP
-.eM
-If the extension is not supported,
-.PN XShapeGetRectangles
-returns NULL.
-Otherwise, it returns a list of rectangles that describe the region
-specified by kind.
-.NH 1
-Glossary
-.LP
-.KS
-\fBbounding region\fP
-.IP
-The area of the parent window that this window will occupy. This area is
-divided into two parts: the border and the interior.
-.KE
-.LP
-.KS
-\fBclip region\fP
-.IP
-The interior of the window, as a subset of the bounding region. This
-region describes the area that will be painted with the window background
-when the window is cleared, will contain all graphics output to the window,
-and will clip any subwindows.
-.KE
-.LP
-.KS
-\fBdefault bounding region\fP
-.IP
-The rectangular area, as described by the core protocol window size, that
-covers the interior of the window and its border.
-.KE
-.LP
-.KS
-\fBdefault clip region\fP
-.IP
-The rectangular area, as described by the core protocol window size, that
-covers the interior of the window and excludes the border.
-.KE
-.LP
-.KS
-\fBclient bounding region\fP
-.IP
-The region associated with a window that is directly modified via this
-extension when specified by
-.PN ShapeBounding .
-This region is used in conjunction with the default bounding region
-to produce the effective bounding region.
-.KE
-.LP
-.KS
-\fBclient clip region\fP
-.IP
-The region associated with a window that is directly modified via this
-extension when specified by
-.PN ShapeClip .
-This region is used in conjunction with the default clip region
-and the client bounding region to produce the effective clip region.
-.KE
-.LP
-.KS
-\fBeffective bounding region\fP
-.IP
-The actual shape of the window on the screen, including border and interior
-(but excluding the effects of overlapping windows). When a window has a client
-bounding region, the effective bounding region is the intersection of the
-default bounding region and the client bounding region. Otherwise, the
-effective bounding region is the same as the default bounding region.
-.KE
-.LP
-.KS
-\fBeffective clip region\fP
-.IP
-The actual shape of the interior of the window on the screen (excluding the
-effects of overlapping windows). When a window has a client clip region or
-a client bounding region, the effective clip region is the intersection of
-the default clip region, the client clip region (if any) and the client
-bounding region (if any). Otherwise, the effective clip region is the
-same as the default clip region.
-.KE
diff --git a/specs/shapelib.xml b/specs/shapelib.xml
new file mode 100644
index 0000000..376db60
--- /dev/null
+++ b/specs/shapelib.xml
@@ -0,0 +1,582 @@
+<?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">
+
+<!-- lifted from troff+ms+XMan by doclifter -->
+<book id="shapelib">
+
+<bookinfo>
+ <title>X Nonrectangular Window Shape Extension Library</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release 6.4</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Keith</firstname><surname>Packard</surname>
+ </author>
+ </authorgroup>
+ <corpname>MIT X Consortium</corpname>
+ <copyright><year>1989</year><holder>X Consortium</holder></copyright>
+ <releaseinfo>Version 1.0</releaseinfo>
+ <affiliation><orgname>MIT X Consortium</orgname></affiliation>
+ <productnumber>X Version 11, Release 6.4</productnumber>
+
+<legalnotice>
+
+<para>
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files
+(the &ldquo;Software&rdquo;), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software, and
+to permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+</para>
+
+<para>
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+</para>
+
+<para>
+THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+</para>
+
+<para>
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
+</para>
+</legalnotice>
+</bookinfo>
+
+<chapter id='overview'>
+<title>Overview</title>
+
+<para>This extension provides arbitrary window and border shapes within
+the X11 protocol.
+</para>
+
+<para>
+The restriction of rectangular windows within the X protocol is a significant
+limitation in the implementation of many styles of user interface. For
+example, many transient windows would like to display a
+&ldquo;drop shadow&rdquo; to give the illusion of 3 dimensions. As
+another example, some user interface style guides call for buttons with
+rounded corners; the full simulation of a nonrectangular shape,
+particularly with respect to event distribution and cursor shape, is not
+possible within the core X protocol. As a final example, round clocks
+and nonrectangular icons are desirable visual addition to the desktop.
+</para>
+
+<para>
+This extension provides mechanisms for changing the visible shape of a
+window to an arbitrary, possibly disjoint, nonrectangular form. The intent
+of the extension is to supplement the existing semantics, not replace them.
+In particular, it is desirable for clients that are unaware of the
+extension to still be able to cope reasonably with shaped windows. For
+example, window managers should still be able to negotiate screen
+real estate in rectangular pieces. Toward this end, any shape specified for
+a window is clipped by the bounding rectangle for the window as specified by
+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>
+</chapter>
+
+<chapter id='description'>
+<title>Description</title>
+
+<para>
+Each window (even with no shapes specified) is defined by two regions: the
+<emphasis remap='I'>bounding region</emphasis> and the
+<emphasis remap='I'>clip region</emphasis>. The bounding region is the
+area of the parent window that the window will occupy (including border).
+The clip region is the subset of the bounding region that is available for
+subwindows and graphics. The area between the bounding region and the
+clip region is defined to be the border of the window.
+</para>
+
+<para>
+A nonshaped window will have a bounding region that is a rectangle spanning
+the window, including its border; the clip region will be a rectangle
+filling the inside dimensions (not including the border). In this document,
+these areas are referred to as the
+<emphasis remap='I'>default bounding region</emphasis> and the
+<emphasis remap='I'>default clip region</emphasis>. For a window with
+inside size of <emphasis remap='I'>width</emphasis> by
+<emphasis remap='I'>height</emphasis> and border width
+<emphasis remap='I'>bwidth</emphasis>, the default bounding and clip
+regions are the rectangles (relative to the window origin):
+</para>
+
+<literallayout remap='Ds'>
+bounding.x = -<emphasis remap='I'>bwidth</emphasis>
+bounding.y = -<emphasis remap='I'>bwidth</emphasis>
+bounding.width = <emphasis remap='I'>width</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis>
+bounding.height = <emphasis remap='I'>height</emphasis> + 2 * <emphasis remap='I'>bwidth</emphasis>
+
+clip.x = 0
+clip.y = 0
+clip.width = <emphasis remap='I'>width</emphasis>
+clip.height = <emphasis remap='I'>height</emphasis>
+</literallayout>
+
+<para>
+This extension allows a client to modify either or both of the bounding or
+clip regions by specifying new regions that combine with the default
+regions. These new regions are called the
+<emphasis remap='I'>client bounding region</emphasis> and the
+<emphasis remap='I'>client clip region</emphasis>. They are specified
+relative to the origin of the window and are always defined by offsets
+relative to the window origin (that is, region adjustments are not
+required when the window is moved). Three mechanisms for specifying
+regions are provided: a list of rectangles, a bitmap, and an existing
+bounding or clip region from a window. This is modeled on the specification
+of regions in graphics contexts in the core protocol and allows a variety
+of different uses of the extension.
+</para>
+
+<para>
+When using an existing window shape as an operand in specifying a new shape,
+the client region is used, unless none has been set, in which case the
+default region is used instead.
+</para>
+
+<para>
+The <emphasis remap='I'>effective bounding region</emphasis> of a window is
+defined to be the intersection of the client bounding region with the default
+bounding region. Any portion of the client bounding region that is not
+included in the default bounding region will not be included in the
+effective bounding region on the screen. This means that window managers
+(or other geometry managers) used to dealing with rectangular client windows
+will be able to constrain the client to a rectangular area of the screen.
+</para>
+
+<para>
+Construction of the effective bounding region is dynamic; the client bounding
+region is not mutated to obtain the effective bounding region. If a client
+bounding region is specified that extends beyond the current default bounding
+region, and the window is later enlarged, the effective bounding region will
+be enlarged to include more of the client bounding region.
+</para>
+
+<para>
+The <emphasis remap='I'>effective clip region</emphasis> of a window is
+defined to be the intersection of the client clip region with both the
+default clip region and the client bounding region. Any portion of the
+client clip region that is not included in both the default clip region
+and the client bounding region will not be included in the effective clip
+region on the screen.
+</para>
+
+<para>
+Construction of the effective clip region is dynamic; the client clip region is
+not mutated to obtain the effective clip region. If a client clip region is
+specified that extends beyond the current default clip region and the
+window or its bounding region is later enlarged, the effective clip region will
+be enlarged to include more of the client clip region if it is included in
+the effective bounding region.
+</para>
+
+<para>
+The border of a window is defined to be the difference between the effective
+bounding region and the effective clip region. If this region is empty, no
+border is displayed. If this region is nonempty, the border is filled
+using the border-tile or border-pixel of the window as specified in the core
+protocol. Note that a window with a nonzero border width will never be able
+to draw beyond the default clip region of the window. Also note that a zero
+border width does not prevent a window from having a border, since the clip
+shape can still be made smaller than the bounding shape.
+</para>
+
+<para>
+All output to the window and visible regions of any subwindows will be
+clipped to the effective clip region. The server must not retain window
+contents beyond the effective bounding region with backing store. The window's
+origin (for graphics operations, background tiling, and subwindow placement)
+is not affected by the existence of a bounding region or clip region.
+</para>
+
+<para>
+Areas that are inside the default bounding region but outside the effective
+bounding region are not part of the window; these areas of the screen will
+be occupied by other windows. Input events that occur within the default
+bounding region but outside the effective bounding region will be delivered as
+if the window was not occluding the event position. Events that occur in
+a nonrectangular border of a window will be delivered to that window, just
+as for events that occur in a normal rectangular border.
+</para>
+
+<para>An
+<function>InputOnly</function>
+window can have its bounding region set, but it is a
+<function>Match</function>
+error to attempt to set a clip region on an
+<function>InputOnly</function>
+window or to specify its clip region as a source to a request
+in this extension.
+</para>
+
+<para>
+The server must accept changes to the clip region of a root window, but
+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>
+</chapter>
+
+<chapter id='c_language_binding'>
+<title>C Language Binding</title>
+
+<para>
+The C functions provide direct access to the protocol and add no additional
+semantics.
+</para>
+
+<para>The include file for this extension is
+&lt;<symbol role='Pn'>X11/extensions/shape.h</symbol>&gt;.
+The defined shape kinds are
+<function>ShapeBounding</function>
+and
+<function>ShapeClip</function>
+The defined region operations are
+<function>ShapeSet</function>
+<function>ShapeUnion</function>
+<function>ShapeIntersect</function>
+<function>ShapeSubtract</function>
+and
+<function>ShapeInvert</function>.</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>Bool<function> XShapeQueryExtension</function></funcdef>
+<paramdef>Display <parameter>*display</parameter></paramdef>
+<paramdef>int <parameter>*event_base</parameter></paramdef>
+<paramdef>int <parameter>*error_base</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<function>XShapeQueryExtension</function>
+returns
+<function>True</function>
+if the specified display supports the SHAPE extension else
+<function>False</function>
+If the extension is supported, *event_base is set to the event number for
+<function>ShapeNotify</function>
+events and *error_base would be set to the error number for the first error for
+this extension. Because no errors are defined for this version of
+the extension, the value returned here is not defined (nor useful).
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>Status<function> XShapeQueryVersion</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>int<parameter> *major_version</parameter></paramdef>
+<paramdef>int<parameter> *minor_version</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is supported,
+<function>XShapeQueryVersion</function>
+sets the major and minor version numbers of the
+extension supported by the display and returns a nonzero value.
+Otherwise, the arguments are not set and zero is returned.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>XShapeCombineRegion</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> dest</parameter></paramdef>
+<paramdef>int<parameter> dest_kind</parameter></paramdef>
+<paramdef>int<parameter> x_off</parameter></paramdef>
+<paramdef>int<parameter> y_off</parameter></paramdef>
+<paramdef>int<parameter> region</parameter></paramdef>
+<paramdef>int<parameter> op</parameter></paramdef>
+<paramdef>REGION<parameter> *region</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<function>XShapeCombineRegion</function>
+converts the specified region into a list of rectangles and calls
+<function>XShapeCombineRectangles</function>
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>XShapeCombineRectangles</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> dest</parameter></paramdef>
+<paramdef>int<parameter> dest_kind</parameter></paramdef>
+<paramdef>int<parameter> x_off</parameter></paramdef>
+<paramdef>int<parameter> y_off</parameter></paramdef>
+<paramdef>XRectangle<parameter> *rectangles</parameter></paramdef>
+<paramdef>int<parameter> n_rects</parameter></paramdef>
+<paramdef>int<parameter> op</parameter></paramdef>
+<paramdef>int<parameter> ordering</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is supported,
+<function>XShapeCombineRectangles</function>
+performs a
+<function>ShapeRectangles</function>
+operation; otherwise, the request is ignored.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>XShapeCombineMask</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>int<parameter> dest</parameter></paramdef>
+<paramdef>int<parameter> dest_kind</parameter></paramdef>
+<paramdef>int<parameter> x_off</parameter></paramdef>
+<paramdef>int<parameter> y_off</parameter></paramdef>
+<paramdef>Pixmap<parameter> src</parameter></paramdef>
+<paramdef>int<parameter> op</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is supported,
+<function>XShapeCombineMask</function>
+performs a
+<function>ShapeMask</function>
+operation; otherwise, the request is ignored.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>XShapeCombineShape</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> dest</parameter></paramdef>
+<paramdef>int<parameter> dest_kind</parameter></paramdef>
+<paramdef>int<parameter> x_off</parameter></paramdef>
+<paramdef>int<parameter> y_off</parameter></paramdef>
+<paramdef>Window<parameter> src</parameter></paramdef>
+<paramdef>int<parameter> src_kind</parameter></paramdef>
+<paramdef>int<parameter> op</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is supported,
+<function>XShapeCombineShape</function>
+performs a
+<function>ShapeCombine</function>
+operation; otherwise, the request is ignored.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>XShapeOffsetShape</function></funcdef>
+<paramdef><parameter>display</parameter></paramdef>
+<paramdef><parameter>dest</parameter></paramdef>
+<paramdef><parameter>dest_kind</parameter></paramdef>
+<paramdef><parameter>x_off</parameter></paramdef>
+<paramdef><parameter>y_off</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is supported,
+<function>XShapeOffsetShape</function>
+performs a
+<function>ShapeOffset</function>
+operation; otherwise, the request is ignored.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>Status <function>XShapeQueryExtents</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> window</parameter></paramdef>
+<paramdef>Bool<parameter> *bounding_shaped</parameter></paramdef>
+<paramdef>int<parameter> *x_bounding</parameter></paramdef>
+<paramdef>int<parameter> *y_bounding</parameter></paramdef>
+<paramdef>unsigned int<parameter> *w_bounding</parameter></paramdef>
+<paramdef>unsigned int<parameter> *h_bounding</parameter></paramdef>
+<paramdef>Bool<parameter> *clip_shaped</parameter></paramdef>
+<paramdef>int<parameter> *x_clip</parameter></paramdef>
+<paramdef>int<parameter> *y_clip</parameter></paramdef>
+<paramdef>unsigned int<parameter> *w_clip</parameter></paramdef>
+<paramdef>unsigned int<parameter> *h_clip</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is supported,
+<function>XShapeQueryExtents</function>
+sets x_bounding, y_bounding, w_bounding, h_bounding to the extents of the
+bounding shape and sets x_clip, y_clip, w_clip, h_clip to the extents of
+the clip shape. For unspecified client regions, the extents of the
+corresponding default region are used.
+</para>
+
+<para>
+If the extension is supported, a nonzero value is returned; otherwise,
+zero is returned.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef><function>XShapeSelectInput</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> window</parameter></paramdef>
+<paramdef>unsigned long<parameter> mask</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+To make this extension more compatible with other interfaces, although
+only one event type can be selected via the extension,
+<function>XShapeSelectInput</function>
+provides a general mechanism similar to the standard Xlib binding for
+window events. A mask value has been defined,
+<function>ShapeNotifyMask</function>
+that is the only valid bit in mask that may be specified.
+The structure for this event is defined as follows:
+</para>
+
+<literallayout remap='Ds'>
+typedef struct {
+ int type; /* of event */
+ unsigned long serial; /* # of last request processed by server */
+ Bool send_event; /* true if this came frome a SendEvent request */
+ Display *display; /* Display the event was read from */
+ Window window; /* window of event */
+ int kind; /* ShapeBounding or ShapeClip */
+ int x, y; /* extents of new region */
+ unsigned width, height;
+ Time time; /* server timestamp when region changed */
+ Bool shaped; /* true if the region exists */
+} XShapeEvent;
+</literallayout>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>unsigned long <function>XShapeInputSelected</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> window</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+<function>XShapeInputSelected</function>
+returns the current input mask for extension events on the specified
+window; the value returned if
+<function>ShapeNotify</function>
+is selected for is
+<function>ShapeNotifyMask</function>
+otherwise, it returns zero.
+If the extension is not supported, it returns zero.
+</para>
+
+<funcsynopsis>
+<funcprototype>
+<funcdef>XRectangle<function> *XShapeGetRectangles</function></funcdef>
+<paramdef>Display<parameter> *display</parameter></paramdef>
+<paramdef>Window<parameter> window</parameter></paramdef>
+<paramdef>int<parameter> kind</parameter></paramdef>
+<paramdef>int<parameter> *count</parameter></paramdef>
+<paramdef>int<parameter> *ordering</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
+<para>
+If the extension is not supported,
+<function>XShapeGetRectangles</function>
+returns NULL. Otherwise, it returns a list of rectangles that describe the
+region specified by kind.
+</para>
+</chapter>
+
+<glossary id='glossary'>
+
+<glossdiv>
+<title>Glossary</title>
+<glossentry id='bounding_region'>
+ <glossterm>bounding region</glossterm>
+ <glossdef><para>The area of the parent window that this window will occupy.
+This area is divided into two parts: the border and the interior.</para>
+ </glossdef>
+</glossentry>
+
+<glossentry id='clip_region'>
+ <glossterm>clip region</glossterm>
+ <glossdef><para>The interior of the window, as a subset of the bounding
+region. This region describes the area that will be painted with the
+window background when the window is cleared, will contain all graphics
+output to the window, and will clip any subwindows.</para></glossdef>
+</glossentry>
+
+<glossentry id='default_bounding_region'>
+ <glossterm>default bounding region</glossterm>
+ <glossdef><para>The rectangular area, as described by the core protocol
+window size, that covers the interior of the window and its border.</para>
+ </glossdef>
+</glossentry>
+
+<glossentry id='default_clip_region'>
+ <glossterm>default clip region</glossterm>
+ <glossdef><para>The rectangular area, as described by the core protocol
+window size, that covers the interior of the window and excludes the border.
+ </para></glossdef>
+</glossentry>
+
+<glossentry id='client_bounding_region'>
+ <glossterm>client bounding region</glossterm>
+ <glossdef><para>The region associated with a window that is directly
+modified via this extension when specified by
+<function>ShapeBounding</function>
+This region is used in conjunction with the default bounding region
+to produce the effective bounding region.</para></glossdef>
+</glossentry>
+
+<glossentry id='client_clip_region'>
+ <glossterm>client clip region</glossterm>
+ <glossdef><para>The region associated with a window that is directly
+modified via this extension when specified by
+<function>ShapeClip</function>
+This region is used in conjunction with the default clip region
+and the client bounding region to produce the effective clip region.</para>
+ </glossdef>
+</glossentry>
+
+<glossentry id='effective_bounding_region'>
+ <glossterm>effective bounding region</glossterm>
+ <glossdef><para>The actual shape of the window on the screen, including
+border and interior (but excluding the effects of overlapping windows).
+When a window has a client bounding region, the effective bounding region
+is the intersection of the default bounding region and the client bounding
+region. Otherwise, the effective bounding region is the same as the
+default bounding region.</para>
+ </glossdef>
+</glossentry>
+
+<glossentry id='effective_clip_region'>
+ <glossterm>effective clip region</glossterm>
+ <glossdef><para>The actual shape of the interior of the window on the
+screen (excluding the effects of overlapping windows). When a window
+has a client clip region or a client bounding region, the effective
+clip region is the intersection of the default clip region, the client
+clip region (if any) and the client bounding region (if any). Otherwise,
+the effective clip region is the same as the default clip region.</para>
+ </glossdef>
+</glossentry>
+
+</glossdiv>
+</glossary>
+</book>
+