summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Dew <matt@osource.org>2010-06-28 08:46:21 -0400
committerGaetan Nadon <memsize@videotron.ca>2010-06-28 08:46:21 -0400
commit3b999f69545b921738f3d51c55c427a83250ee5f (patch)
treea919c2ed6ee0fc5bbb4bf090641444f82bec025b
parent4f05216edd9122d82c4a451914ee78a332b6a2e3 (diff)
downloadxorg-proto-xcmiscproto-3b999f69545b921738f3d51c55c427a83250ee5f.tar.gz
specs: convert xc-misc.ms from xorg-docs module to DocBook XML
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac11
-rw-r--r--specs/.gitignore6
-rw-r--r--specs/Makefile.am64
-rw-r--r--specs/xc-misc.xml205
5 files changed, 285 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 7937ee6..08d6331 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,5 @@
+SUBDIRS=specs
+
xcmiscdir = $(includedir)/X11/extensions
xcmisc_HEADERS = \
xcmiscproto.h \
diff --git a/configure.ac b/configure.ac
index 7f355d8..2abc4dc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,11 +3,16 @@ AC_INIT([XCMiscProto], [1.2.0], [https://bugs.freedesktop.org/enter_bug.cgi?prod
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_XMLTO(0.0.20)
+XORG_WITH_FOP
+XORG_CHECK_SGML_DOCTOOLS(1.5)
AC_OUTPUT([Makefile
+ specs/Makefile
xcmiscproto.pc])
diff --git a/specs/.gitignore b/specs/.gitignore
new file mode 100644
index 0000000..12fe512
--- /dev/null
+++ b/specs/.gitignore
@@ -0,0 +1,6 @@
+# Add & Override for this directory and it's subdirectories
+*.html
+*.ps
+*.pdf
+*.txt
+*.css
diff --git a/specs/Makefile.am b/specs/Makefile.am
new file mode 100644
index 0000000..5b3225d
--- /dev/null
+++ b/specs/Makefile.am
@@ -0,0 +1,64 @@
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+if ENABLE_SPECS
+doc_sources = xc-misc.xml
+dist_doc_DATA = $(doc_sources)
+
+if HAVE_XMLTO
+doc_DATA = $(doc_sources:.xml=.html)
+
+if HAVE_FOP
+doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
+endif
+
+if HAVE_XMLTO_TEXT
+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 $@
+endif
+
+CLEANFILES = $(doc_DATA)
+
+SUFFIXES = .xml .ps .pdf .txt .html
+
+.xml.txt:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
+
+.xml.html:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
+
+.xml.pdf:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
+
+.xml.ps:
+ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
+
+endif HAVE_XMLTO
+endif ENABLE_SPECS
diff --git a/specs/xc-misc.xml b/specs/xc-misc.xml
new file mode 100644
index 0000000..65ba0d2
--- /dev/null
+++ b/specs/xc-misc.xml
@@ -0,0 +1,205 @@
+<?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="xcmisc">
+
+<bookinfo>
+ <title>XC-MISC Extension</title>
+ <subtitle>X Consortium Standard</subtitle>
+ <releaseinfo>X Version 11, Release 6.9/7.0</releaseinfo>
+ <authorgroup>
+ <author>
+ <firstname>Bob</firstname><surname>Scheifler</surname>
+ </author>
+ </authorgroup>
+<othercredit><firstname>David</firstname><surname>Wiggins</surname></othercredit>
+ <corpname>X Consortium Standard</corpname>
+ <copyright><year>1994</year><holder>X Consortium</holder></copyright>
+ <releaseinfo>Version 1.1</releaseinfo>
+ <affiliation><orgname>X Consortium</orgname></affiliation>
+ <productnumber>X Version 11, Release 6.9/7.0</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>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>
+
+<para>X Window System is a trademark of The Open Group.</para>
+</legalnotice>
+
+</bookinfo>
+
+<chapter id='overview'>
+<title>Overview</title>
+
+<para>When an X client connects to an X server, it receives a fixed range of
+resource IDs to use to identify the client's resources inside the X
+server. Xlib hands these out sequentially as needed. When it
+overruns the end of the range, an IDChoice protocol error results.
+Long running clients, or clients that use resource IDs at a rapid
+rate, may encounter this circumstance. When it happens, there are
+usually many resource IDs available, but Xlib doesn't know about them.</para>
+
+<para>One approach to solving this problem would be to have Xlib notice when
+a resource is freed and recycle its ID for future use. This strategy
+runs into difficulties because sometimes freeing one resource causes
+others to be freed (for example, when a window is destroyed, so are
+its children). To do a complete job, Xlib would have to maintain a
+large amount of state that currently resides only in the server (the
+entire window tree in the above example). Even if a less
+comprehensive strategy was adopted, such as recycling only those IDs
+that Xlib can identify without maintaining additional state, the
+additional bookkeeping at resource creation and destruction time
+would likely introduce unacceptable overhead.</para>
+
+<para>To avoid the problems listed above, the server's complete knowledge of
+all resource IDs in use by a client is leveraged. This extension
+provides two ways for Xlib to query the server for available resource
+IDs. Xlib can use these extension requests behind the scenes when it has
+exhausted its current pool of resource IDs.</para>
+</chapter>
+
+<chapter id='requests'>
+<title>Requests</title>
+
+<para><function>XCMiscGetVersion</function></para>
+
+<itemizedlist>
+ <listitem><para><emphasis remap='I'>client_major_version</emphasis>: CARD16</para></listitem>
+ <listitem><para><emphasis remap='I'>client_minor_version</emphasis>: CARD16</para></listitem>
+</itemizedlist>
+<para> =&gt;</para>
+<itemizedlist>
+ <listitem><para><emphasis remap='I'>client_major_version</emphasis>: CARD16</para></listitem>
+ <listitem><para><emphasis remap='I'>client_minor_version</emphasis>: CARD16</para></listitem>
+</itemizedlist>
+
+<para>If supplied, the <emphasis remap='I'>client_major_version</emphasis> and
+<emphasis remap='I'>client_minor_version</emphasis> indicate what version of
+the protocol the client wants the server to implement. The server version
+numbers returned indicate the protocol this extension actually supports. This
+might not equal the version sent by the client. An implementation can
+(but need not) support more than one version simultaneously. The
+<emphasis remap='I'>server_major_version</emphasis> and the <emphasis remap='I'>server_minor_version</emphasis> are a
+mechanism to support future revisions of the XC-MISC protocol
+which may be necessary. In general, the major version would increment
+for incompatible changes, and the minor version would increment for
+small, upward-compatible changes. Servers that support the protocol
+defined in this document will return a
+<emphasis remap='I'>server_major_version</emphasis> of one (1), and a
+<emphasis remap='I'>server_minor_version</emphasis> of one (1).</para>
+
+<para><function>XCMiscGetXIDRange</function></para>
+
+<para> =&gt;</para>
+<itemizedlist>
+ <listitem><para><emphasis remap='I'>start_id</emphasis>: XID</para></listitem>
+ <listitem><para><emphasis remap='I'>count</emphasis>: CARD32</para></listitem>
+</itemizedlist>
+
+<para>This request returns a range of available resource IDs for the client
+issuing the request. <emphasis remap='I'>start_id</emphasis> is the first
+ID in the range. <emphasis remap='I'>count</emphasis> is the number of IDs
+in the range. The returned range may or may not be the largest possible
+range.</para>
+
+<para><function>XCMiscGetXIDList</function></para>
+
+<itemizedlist>
+ <listitem><para><emphasis remap='I'>count</emphasis>: CARD32</para></listitem>
+</itemizedlist>
+<para> =&gt;</para>
+<itemizedlist>
+ <listitem><para><emphasis remap='I'>ids</emphasis>: LISTofXID</para></listitem>
+</itemizedlist>
+
+<para>This request returns the a list of individual resource IDs in
+<emphasis remap='I'>ids</emphasis>.
+<emphasis remap='I'>count</emphasis> is the number of resource IDs requested.
+The number returned may be smaller than the number requested.</para>
+</chapter>
+
+<chapter id='events_and_errors'>
+<title>Events and Errors</title>
+
+<para>No new events or errors are defined by this extension.</para>
+</chapter>
+
+<chapter id='encoding'>
+<title>Encoding</title>
+
+<para>Please refer to the X11 Protocol Encoding document as this document uses
+conventions established there.</para>
+
+<para>The name of this extension is &ldquo;XC-MISC&rdquo;.</para>
+
+<literallayout remap='Ds'>
+<function>XCMiscGetVersion</function>
+ 1 CARD8 opcode
+ 1 0 XC-MISC opcode
+ 2 2 request length
+ 2 CARD16 client_major_version
+ 2 CARD16 client_minor_version
+</literallayout>
+<literallayout remap='Ds'>
+<synopsis>
+ =&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
+</synopsis>
+</literallayout>
+
+<literallayout remap='Ds'>
+<function>XCMiscGetXIDRange</function>
+ 1 CARD8 opcode
+ 1 1 XC-MISC opcode
+ 2 1 request length
+</literallayout>
+<literallayout remap='Ds'>
+<synopsis>
+ =&gt;
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 0 length
+ 4 XID start_id
+ 4 CARD32 count
+ 16 unused
+</synopsis>
+</literallayout> <!-- remap='De' -->
+
+<literallayout remap='Ds'>
+<function>XCMiscGetXIDList</function>
+ 1 CARD8 opcode
+ 1 2 XC-MISC opcode
+ 2 2 request length
+ 4 CARD32 count
+</literallayout>
+<literallayout remap='Ds'>
+<synopsis>
+ =&gt;
+ 1 1 Reply
+ 1 unused
+ 2 CARD16 sequence number
+ 4 CARD32 length
+ 4 CARD32 number of XIDs in ids
+ 20 unused
+ 4n LISTofXID ids
+</synopsis>
+</literallayout>
+</chapter>
+</book>
+