Tizen 2.1 base tizen_2.1 2.1b_release accepted/tizen/20130520.101417 accepted/tizen_2.1/20130425.024702 submit/tizen/20130517.045404 submit/tizen_2.1/20130424.234402
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:53:59 +0000 (01:53 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:53:59 +0000 (01:53 +0900)
29 files changed:
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.am [new file with mode: 0644]
README [new file with mode: 0644]
configure.ac [new file with mode: 0644]
dmx.pc.in [new file with mode: 0644]
include/X11/extensions/dmxext.h [new file with mode: 0644]
man/DMX.man [new file with mode: 0644]
man/DMXAddInput.man [new file with mode: 0644]
man/DMXAddScreen.man [new file with mode: 0644]
man/DMXChangeDesktopAttributes.man [new file with mode: 0644]
man/DMXChangeScreensAttributes.man [new file with mode: 0644]
man/DMXForceWindowCreation.man [new file with mode: 0644]
man/DMXGetDesktopAttributes.man [new file with mode: 0644]
man/DMXGetInputAttributes.man [new file with mode: 0644]
man/DMXGetInputCount.man [new file with mode: 0644]
man/DMXGetScreenAttributes.man [new file with mode: 0644]
man/DMXGetScreenCount.man [new file with mode: 0644]
man/DMXGetWindowAttributes.man [new file with mode: 0644]
man/DMXQueryExtension.man [new file with mode: 0644]
man/DMXQueryVersion.man [new file with mode: 0644]
man/DMXRemoveInput.man [new file with mode: 0644]
man/DMXRemoveScreen.man [new file with mode: 0644]
man/DMXSync.man [new file with mode: 0644]
man/Makefile.am [new file with mode: 0644]
packaging/libdmx.spec [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/dmx.c [new file with mode: 0644]

diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..7ea03ea
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,24 @@
+Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+
+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 on 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
+NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+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.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..cdc3e13
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,498 @@
+commit 9f470c92bc2d194c8abb9154f42864e6c82f43ef
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Mar 7 21:43:10 2012 -0800
+
+    libdmx 1.1.2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 94c2e8ba375d968bd648097a484edac5d1c87c78
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Mar 2 17:38:24 2012 -0800
+
+    Stop casting away constness on dmx_extension_name
+    
+    Fixes gcc warning:
+    dmx.c: In function 'find_display':
+    dmx.c:78:1: warning: cast discards qualifiers from pointer target type
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 19bea63b9b39d83da9b4aa277cc1db967a4928bd
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 16 22:06:15 2011 -0700
+
+    Strip trailing whitespace
+    
+    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+    git diff -w & git diff -b show no diffs from this change
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 1ab0d436ceac0acef0cd97d8b280727b02062cc8
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue May 17 20:32:38 2011 -0700
+
+    Fix various typos in man pages
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 77701e9139f79db2e66026bebaab265a873b0856
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 11:43:46 2011 -0500
+
+    config: comment, minor upgrade, quote and layout configure.ac
+    
+    Group statements per section as per Autoconf standard layout
+    Quote statements where appropriate.
+    Autoconf recommends not using dnl instead of # for comments
+    
+    Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
+    Add AC_CONFIG_SRCDIR([Makefile.am])
+    
+    This helps automated maintenance and release activities.
+    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
+
+commit d970eb0954c0400bdab923c0b9c433b2f33dbe9d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jan 28 19:41:37 2011 -0500
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b865861d72a86024daec36c517a214e75ef4b973
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Jan 27 19:20:39 2011 -0500
+
+    config: remove AC_PROG_CC as it overrides AC_PROG_C_C99
+    
+    XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
+    AC_PROG_C_C99. This sets gcc with -std=gnu99.
+    If AC_PROG_CC macro is called afterwards, it resets CC to gcc.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 09d2ddd805a00568e4b7f668b0f500a63c350940
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Oct 28 16:56:29 2010 -0700
+
+    libdmx 1.1.1
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 83fa1d94d11f368824bea6ba64e9575b57f87769
+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 db8beb3d19f152a87249fa91c957e4782f47df77
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jul 7 15:10:34 2010 -0700
+
+    config: upgrade to util-macros 1.8 for additional man page support
+    
+    Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS
+    The value of MAN_SUBST is the same for all X.Org packages.
+    
+    Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS
+    The existing statement can now be removed from the configuration file.
+    
+    Use automake provided $(AM_V_GEN) and XORG_DEFAULT_OPTIONS provided $(SED)
+    Enables silent rule and use platform appropriate version of sed.
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 309745fc0095cccc575ead3446480060091161f1
+Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
+Date:   Thu Jul 1 06:48:47 2010 -0300
+
+    Purge macros NEED_EVENTS and NEED_REPLIES
+    
+    Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
+    Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6d9de78c3cde1e7963cafc6e8155b3e2ea5819c1
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Mar 29 16:50:34 2010 -0400
+
+    config: update AC_PREREQ statement to 2.60
+    
+    Unrelated to the previous patches, the new value simply reflects
+    the reality that the minimum level for autoconf to configure
+    all x.org modules is 2.60 dated June 2006.
+    
+    ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 6163288513cc166c5e8b9488b08a2d07e7100755
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Mar 29 14:53:49 2010 -0400
+
+    config: remove the pkgconfig pc.in file from EXTRA_DIST
+    
+    Automake always includes it in the tarball.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit a8b1449bca44bfddd2e7228bb7d514512e4ef30c
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Feb 16 10:37:21 2010 -0500
+
+    config: move CWARNFLAGS from configure.ac to Makefile.am
+    
+    Compiler warning flags should be explicitly set in the makefile
+    rather than being merged with other packages compiler flags.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 442b50b94eaae9202e76c170738fcc049dcc453d
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Jan 13 16:04:33 2010 -0500
+
+    COPYING: replace stub with actual copyright notices
+    
+    Refer to dmx.c
+    Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit c34b17f997f63842649b93e1575cd2bc322e8f4e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Nov 27 20:56:05 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit fdf48235bc529bbda112a70dbd6e9ff560ca6a04
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Oct 28 14:09:10 2009 -0400
+
+    INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206
+    
+    Add missing INSTALL file. Use standard GNU file on building tarball
+    README may have been updated
+    Remove AUTHORS file as it is empty and no content available yet.
+    Remove NEWS file as it is empty and no content available yet.
+
+commit fa6e6e76d9a58d021473369e4a9ff287e7e42e15
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Oct 27 15:07:25 2009 -0400
+
+    Deploy the new XORG_DEFAULT_OPTIONS #24242
+    
+    This macro aggregate a number of existing macros that sets commmon
+    X.Org components configuration options. It shields the configuration file from
+    future changes.
+
+commit 4a78271ada80b64eeb5f6563fd9d1a161abc7afe
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Oct 26 22:08:43 2009 -0400
+
+    Makefile.am: ChangeLog not required: EXTRA_DIST or *CLEANFILES #24432
+    
+    ChangeLog filename is known to Automake and requires no further
+    coding in the makefile.
+
+commit 4fd8605292125d95d1eb58fec1b7daff2f35ec26
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 13:11:11 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit fad53bf1e485036146570d9ead901f23bf4c323f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:20 2009 -0400
+
+    .gitignore: use common defaults with custom section # 24239
+    
+    Using common defaults will reduce errors and maintenance.
+    Only the very small or inexistent custom section need periodic maintenance
+    when the structure of the component changes. Do not edit defaults.
+
+commit c43a769428a03c0de58545c611e75243a8d8f2ea
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Wed Oct 21 12:47:27 2009 -0700
+
+    This is not a GNU project, so declare it foreign.
+    
+    On Wed, 2009-10-21 at 13:36 +1000, Peter Hutterer wrote:
+    > On Tue, Oct 20, 2009 at 08:23:55PM -0700, Jeremy Huddleston wrote:
+    > > I noticed an INSTALL file in xlsclients and libXvMC today, and it
+    > > was quite annoying to work around since 'autoreconf -fvi' replaces
+    > > it and git wants to commit it.  Should these files even be in git?
+    > > Can I nuke them for the betterment of humanity and since they get
+    > > created by autoreconf anyways?
+    >
+    > See https://bugs.freedesktop.org/show_bug.cgi?id=24206
+    
+    As an interim measure, replace AM_INIT_AUTOMAKE([dist-bzip2]) with
+    AM_INIT_AUTOMAKE([foreign dist-bzip2]). This will prevent the generation
+    of the INSTALL file. It is also part of the 24206 solution.
+    
+    Signed-off-by: Jeremy Huddleston <jeremyhu@freedesktop.org>
+
+commit a3ff756a3a478162a6f96b9fbf54c9f1a487af38
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 5 11:54:43 2009 +1000
+
+    libdmx 1.1.0
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 9d7cb1321dd44081f52a80419c32bbbbb155757f
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Mon Oct 5 11:54:09 2009 +1000
+
+    Require macros 1.3 for XORG_DEFAULT_OPTIONS
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 1cb350964c416963523aca0234dc24563ef29d1b
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Aug 28 10:07:10 2009 +1000
+
+    libdmx 1.0.99.1
+
+commit 72929c5cb3b78d3b83a2f40e3662104194b70cd6
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Tue Aug 25 16:07:54 2009 +1000
+
+    Move dmxext.h from dmxproto to here.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c46bf972f2f0658e0fe473e978c1a7153b68d0e9
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Feb 2 20:34:37 2009 -0800
+
+    Add README with pointers to mailing list, bugzilla & git repos
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit ca08b93d5829a03e464fb27d96292c37825aa5ea
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Wed Jan 28 16:11:37 2009 -0200
+
+    Janitor: correct make distcheck.
+
+commit 628281b17467fc8237d9d9e2443cb9e88d8e07c5
+Author: Julien Cristau <jcristau@debian.org>
+Date:   Sun May 11 14:18:34 2008 +0200
+
+    Use __libmansuffix__ instead of hardcoding 3X in the dmx manpages
+
+commit cfd82b1ff1033dbb3d83fd71e8b1af5535108245
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 16:38:48 2007 -0500
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit a49ce3a7f23e0bfab84661afea15602403445c5a
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Mon Sep 3 05:53:54 2007 -0400
+
+    Add *~ to .gitignore to skip patch/emacs droppings
+
+commit 88286ad8dee07f4a06c8cfc032606ad26972fd3f
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jul 13 14:59:15 2006 -0700
+
+    renamed: .cvsignore -> .gitignore
+
+commit fe6012c309b7465a81535a5b18f70cac44fb33fb
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Apr 26 23:51:19 2006 +0000
+
+    Bump to 1.0.2
+
+commit 44c22b0f24d2cc835d088b9da65cf5ade41a2854
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Fri Apr 7 00:31:17 2006 +0000
+
+    Coverity #928: Don't dereference screen if it's null.
+
+commit 3aec4c999217de52ee28beb5dc429e84f25a4cee
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:30:06 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit 61ba01b94fda571fc02287cfb321e7ace5f4e344
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:28:28 2005 +0000
+
+    Stub COPYING files
+
+commit 1594c277fed66ac77eff2687cfa586a82c649594
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:35 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit e608c6a473d3ff6abd7290301d10929e37a2de9d
+Author: Kevin E Martin <kem@kem.org>
+Date:   Tue Dec 6 22:48:46 2005 +0000
+
+    Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
+
+commit 7f82999694f562b664190cd2d0041ac3dc8b7e0e
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:46 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit 074fde5f1862e7ca6e18ac198baf7ec3359a2fa5
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 04:41:52 2005 +0000
+
+    Add check and cflags for malloc(0) returning NULL.
+
+commit 2f295bd0ca857cc50b98170a91a98d94c6c1fab7
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Mon Nov 28 22:03:07 2005 +0000
+
+    Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4
+        update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir)
+
+commit a064437898064f0906e1676caa5823c8334e77c7
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Nov 19 07:15:44 2005 +0000
+
+    Update pkgconfig files to separate library build-time dependencies from
+        application build-time dependencies, and update package deps to work
+        with separate build roots.
+
+commit 6424ff482a845160bc1146bb8a17fa2bde976685
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Sun Nov 13 18:14:22 2005 +0000
+
+    Use $(LIB_MAN_SUFFIX) instead of forcing man pages into section 3. Use sed
+        to substitute variables in man pages.
+
+commit 68ee705e1066d5092bc266c9d47d6c1022be2f1c
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:48:12 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit c0414eb4d8c710fac94ea32bc47031e1855c6fdb
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Aug 3 03:28:03 2005 +0000
+
+    Do PKG_CHECK_MODULES on a unique token instead of on "DEP", so builds with
+        a global configure cache don't get confused.
+
+commit e51544b67812183184becaf6cd2ba907483bcea7
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:53 2005 +0000
+
+    Various changes preparing packages for RC0:
+    - Verify and update package version numbers as needed
+    - Implement versioning scheme
+    - Change bug address to point to bugzilla bug entry form
+    - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to
+        reenable it)
+    - Fix makedepend to use pkgconfig and pass distcheck
+    - Update build script to build macros first
+    - Update modular Xorg version
+
+commit 0e287fb569607a88500fc8ead709113da7d62a76
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Wed Jul 20 12:10:12 2005 +0000
+
+    Set soversion to 1.0.0 with -version-number.
+
+commit 1665593dffc0a2a15b4c2dbd50e0f4ef655c7d49
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Sat Jul 16 07:49:42 2005 +0000
+
+    Set soversion to 1.0 using -version-number.
+
+commit b5b357df37d6adb66daedf8a9950bf653bf4c54d
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Jul 9 21:11:25 2005 +0000
+
+    Add .cvsignore files Switch _la_CFLAGS for AM_CFLAGS to clean up directory
+
+commit 63d3d3060793b834a6f55a1788ed74dd91ff1635
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Wed Jun 22 22:46:39 2005 +0000
+
+    Apply these patches from Theo van Klaveren:
+    lib-dmx.patch lib-FS.patch lib-X11.patch lib-XRes.patch
+        lib-XScrnSaver.patch lib-xtrans.patch
+    to make the libraries distcheck.
+
+commit 414f10d9cd304ad410eaab1faeb9bec6db99a254
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date:   Tue Jun 21 15:41:37 2005 +0000
+
+    lib/XScrnSaver/configure.ac
+    lib/XScrnSaver/src/Makefile.am
+    lib/Xfontcache/configure.ac
+    lib/Xfontcache/src/Makefile.am
+    lib/Xinerama/configure.ac
+    lib/Xinerama/src/Makefile.am
+    lib/Xtst/configure.ac
+    lib/Xv/configure.ac
+    lib/XvMC/configure.ac
+    lib/dmx/configure.ac Add missing xext.pc and xextproto.pc Add DEP_CFLAGS to
+        src/Makefile.am
+
+commit 110b58cc4b1fe556937d0cc10c21e8d378bf557f
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 22:41:49 2005 +0000
+
+    Dummy change
+
+commit 87e6dd4a3b2911df52c748cbaf25d9f2f1e39267
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 22:41:28 2005 +0000
+
+    Dummy change to make CVS see this file.
+
+commit 731efd283366cdef8f55a5c0e533603eae2dc9cd
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 22:40:55 2005 +0000
+
+    *** empty log message ***
+
+commit b15aee70c23e46cc06023c42359ae831b4aa97e5
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 21:18:09 2005 +0000
+
+    Really add the dmx build system.
+    Also, in some ways CVS is not an optimal version control system.
+
+commit 48338cc9c422ff0ac4b9c532088649f2f3c4e2bb
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Mon Jun 13 21:11:44 2005 +0000
+
+    - Add dmx build system
+    - Rename man pages: man -> 3
+    - dmx.c: include <X11/extensions/blah.h> instead of "blah.h"
+
+commit 9569816261fed00b3f0991abb676d60ba904c0f6
+Author: Kevin E Martin <kem@kem.org>
+Date:   Mon Dec 6 20:04:04 2004 +0000
+
+    Fix overwrite in DMX library calls (Bug #1989, Mark McLoughlin).
+
+commit 90b1782cf132d4d3a753e4643fe8c398cecbb07b
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Jun 30 20:06:53 2004 +0000
+
+    Add Distributed Multihead X (DMX) support
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..8b82ade
--- /dev/null
+++ b/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/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..be67679
--- /dev/null
@@ -0,0 +1,37 @@
+#
+#  Copyright 2005  Red Hat, Inc.
+#
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+#
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+
+SUBDIRS = src man
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = dmx.pc
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..3b99e7f
--- /dev/null
+++ b/README
@@ -0,0 +1,25 @@
+libdmx - X Window System DMX (Distributed Multihead X) extension library
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/lib/libdmx
+
+        http://cgit.freedesktop.org/xorg/lib/libdmx
+
+For patch submission instructions, see:
+
+       http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..24e03fc
--- /dev/null
@@ -0,0 +1,50 @@
+#  Copyright 2005 Red Hat, Inc.
+#
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no
+#  representations about the suitability of this software for any purpose.  It
+#  is provided "as is" without express or implied warranty.
+#
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+#
+
+# Initialize Autoconf
+AC_PREREQ([2.60])
+AC_INIT([libdmx], [1.1.2],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libdmx])
+AC_CONFIG_SRCDIR([Makefile.am])
+AC_CONFIG_HEADERS([config.h])
+
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+# Initialize libtool
+AC_PROG_LIBTOOL
+
+# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS
+m4_ifndef([XORG_MACROS_VERSION],
+          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
+XORG_DEFAULT_OPTIONS
+XORG_CHECK_MALLOC_ZERO
+
+# Obtain compiler/linker options for depedencies
+PKG_CHECK_MODULES(DMX, x11 xext xextproto [dmxproto >= 2.2.99.1])
+
+AC_CONFIG_FILES([Makefile
+               src/Makefile
+               man/Makefile
+               dmx.pc])
+AC_OUTPUT
diff --git a/dmx.pc.in b/dmx.pc.in
new file mode 100644 (file)
index 0000000..823d45a
--- /dev/null
+++ b/dmx.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: dmx
+Description: The dmx Library
+Version: @PACKAGE_VERSION@
+Requires: dmxproto
+Requires.private: x11 xext
+Cflags: -I${includedir}
+Libs: -L${libdir} -ldmx
diff --git a/include/X11/extensions/dmxext.h b/include/X11/extensions/dmxext.h
new file mode 100644 (file)
index 0000000..93a1bfa
--- /dev/null
@@ -0,0 +1,162 @@
+/*
+ * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * 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 on 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
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ *   Rickard E. (Rik) Faith <faith@redhat.com>
+ *
+ */
+
+/** \file
+ * This file describes the interface to the client-side libdmx.a
+ * library.  All DMX-aware client-side applications should include this
+ * file. */
+
+#ifndef _DMXEXT_H_
+#define _DMXEXT_H_
+
+#include <X11/extensions/dmx.h>
+
+/** Client-library screen information structure, returned by
+ * #DMXGetScreenAttributes.  */
+typedef struct {
+    char         *displayName;
+    int          logicalScreen;
+
+    unsigned int screenWindowWidth;    /* displayName's coordinate system */
+    unsigned int screenWindowHeight;   /* displayName's coordinate system */
+    int          screenWindowXoffset;  /* displayName's coordinate system */
+    int          screenWindowYoffset;  /* displayName's coordinate system */
+
+    unsigned int rootWindowWidth;      /* screenWindow's coordinate system */
+    unsigned int rootWindowHeight;     /* screenWindow's coordinate system */
+    int          rootWindowXoffset;    /* screenWindow's coordinate system */
+    int          rootWindowYoffset;    /* screenWindow's coordinate system */
+
+    int          rootWindowXorigin;    /* global coordinate system */
+    int          rootWindowYorigin;    /* global coordinate system */
+} DMXScreenAttributes;
+
+/** Client-library window information structure, returned by
+ * #DMXGetWindowAttributes. */
+typedef struct {
+    int          screen;
+    Window       window;
+    XRectangle   pos, vis;
+} DMXWindowAttributes;
+
+/** Client-library desktop information structure, returned by
+ * #DMXGetDesktopAttributes. */
+typedef struct {
+    unsigned int width;         /* global coordinate system */
+    unsigned int height;        /* global coordinate system */
+    int          shiftX;        /* global coordinate system */
+    int          shiftY;        /* global coordinate system */
+} DMXDesktopAttributes;
+
+/** Enumeration for the #inputType field in the #DMXInputAttributes
+ * structure. */
+typedef enum {
+    DMXLocalInputType,
+    DMXConsoleInputType,
+    DMXBackendInputType
+} DMXInputEnum;
+
+/** Client-library input information structure, returned by
+ * #DMXGetInputAttributes. */
+typedef struct {
+    DMXInputEnum inputType;
+    int          physicalScreen;
+    int          physicalId;
+    Bool         isCore;
+    Bool         sendsCore;
+    const char   *name;
+    Bool         detached;
+} DMXInputAttributes;
+
+_XFUNCPROTOBEGIN
+
+extern Bool DMXQueryExtension(Display *dpy,
+                              int *event_basep, int *error_basep);
+extern Bool DMXQueryVersion(Display *dpy, int *major_version,
+                            int *minor_version, int *patch_version);
+extern Bool DMXSync(Display *dpy);
+extern Bool DMXForceWindowCreation(Display *dpy, Window window);
+
+
+extern Bool DMXGetScreenCount(Display *dpy, int *screen_count);
+extern Bool DMXGetScreenAttributes(Display *dpy,
+                                   int screen,
+                                   DMXScreenAttributes *attr);
+extern int  DMXChangeScreensAttributes(Display *dpy,
+                                       int screen_count,
+                                       int *screens,
+                                       int mask_count,
+                                       unsigned int *masks,
+                                       DMXScreenAttributes *attr, /* vector */
+                                       int *error_screen);
+
+extern Bool DMXAddScreen(Display *dpy,
+                         const char *displayName,
+                         unsigned int mask,
+                         DMXScreenAttributes *attr,
+                         int *screen);
+extern Bool DMXRemoveScreen(Display *dpy, int screen);
+
+/* Call DMXGetScreenWindowCount and allocate info to that size.  Pass
+ * the size in available_count.  This call can generate a large amount
+ * of wire traffic and should not be used called with available_count=0
+ * just to determine the screen_count value -- use DMXGetScreenCount
+ * instead.  NOTE: Also see DMX protocol specification (DMXSpec.txt) for
+ * usage of DMXSync to flush pending commands. */
+extern Bool DMXGetWindowAttributes(Display *dpy, Window window,
+                                   int *screen_count, int available_count,
+                                   DMXWindowAttributes *attr);
+
+extern Bool DMXGetDesktopAttributes(Display *dpy, DMXDesktopAttributes *attr);
+extern int  DMXChangeDesktopAttributes(Display *dpy,
+                                       unsigned int mask,
+                                       DMXDesktopAttributes *attr);
+
+extern Bool DMXGetInputCount(Display *dpy, int *input_count);
+extern Bool DMXGetInputAttributes(Display *dpy, int id,
+                                  DMXInputAttributes *attr);
+
+extern Bool DMXAddInput(Display *dpy,
+                        unsigned int mask,
+                        DMXInputAttributes *attr,
+                        int *id);
+extern Bool DMXRemoveInput(Display *dpy, int id);
+
+/* These are helper functions that call DMXAddInput. */
+extern Bool DMXAddBackendInput(Display *dpy, int screen, int sendsCore,
+                               int *newId);
+extern Bool DMXAddConsoleInput(Display *dpy, const char *name, int sendsCore,
+                               int *newId);
+
+_XFUNCPROTOEND
+#endif
diff --git a/man/DMX.man b/man/DMX.man
new file mode 100644 (file)
index 0000000..bd934ce
--- /dev/null
@@ -0,0 +1,77 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMX __libmansuffix__ __vendorversion__
+.SH NAME
+DMX \- X Window System DMX (Distributed Multihead X) extension
+.SH DESCRIPTION
+The DMX extension provides support for communication with and control of
+.BR Xdmx (1)
+server.  Attributes of the
+.BR Xdmx (1)
+server and of the back-end screens attached to the server can be queried
+and modified via this protocol.
+.SH "SUMMARY OF LIBRARY FUNCTIONS"
+The following is a summary of DMX library functions:
+.sp
+DMXQueryExtension(__libmansuffix__) \- determine if DMX is available
+.sp
+DMXQueryVersion(__libmansuffix__) \- determine DMX extension version
+.sp
+DMXSync(__libmansuffix__) \- flush protocol requests between
+.BR Xdmx (1)
+and back-end X servers
+.sp
+DMXForceWindowCreation(__libmansuffix__) \- force immediate back-end window creation
+.sp
+DMXGetScreenCount(__libmansuffix__) \- determine number of back-end screens
+.sp
+DMXGetScreenAttributes(__libmansuffix__) \- determine back-end screen attributes
+.sp
+DMXChangeScreensAttributes(__libmansuffix__) \- change back-end screen attributes
+.sp
+DMXAddScreen(__libmansuffix__) \- attach a new back-end screen
+.sp
+DMXRemoveScreen(__libmansuffix__) \- detach a back-end screen
+.sp
+DMXGetWindowAttributes(__libmansuffix__) \- determine back-end window attributes
+.sp
+DMXGetDesktopAttributes(__libmansuffix__) \- determine global bounding box
+.sp
+DMXChangeDesktopAttributes(__libmansuffix__) \- change global bounding box
+.sp
+DMXGetInputCount(__libmansuffix__) \- determine number of input devices
+.sp
+DMXGetInputAttributes(__libmansuffix__) \- determine input device attributes
+.sp
+DMXAddInput(__libmansuffix__) \- attach a new backend or console input
+.sp
+DMXRemoveInput(__libmansuffix__) \- detach an input
+.sp
+DMXAddBackendInput(__libmansuffix__) \- attach a new back-end input
+.sp
+DMXAddConsoleInput(__libmansuffix__) \- attach a new console input
+.PP
+Each of these functions is described in its own man page.
+.SH "SEE ALSO"
+.BR Xdmx "(1), " xdmxconfig "(1), " vdltodmx (1)
diff --git a/man/DMXAddInput.man b/man/DMXAddInput.man
new file mode 100644 (file)
index 0000000..5b0f834
--- /dev/null
@@ -0,0 +1,160 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXAddInput __libmansuffix__ __vendorversion__
+.SH NAME
+DMXAddInput, DMXAddBackendInput, DMXAddConsoleInput \- attach a new input
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXAddInput(Display " *dpy ,
+.BI "                 unsigned int " mask ,
+.BI "                 DMXInputAttributes " *attr ,
+.BI "                 int " *id );
+.br
+.BI "Bool DMXAddBackendInput(Display " *dpy ,
+.BI "                        int " screen ,
+.BI "                        int " sendsCore ,
+.BI "                        int " *newId );
+.br
+.BI "Bool DMXAddConsoleInput(Display " *dpy ,
+.BI "                        const char " *name ,
+.BI "                        int " sendsCore ,
+.BI "                        int " *newId );
+.fi
+.SH DESCRIPTION
+.B DMXAddInput()
+is used to attach a new input (or a previously detached input) to the
+.BR Xdmx (1)
+server.
+.I mask
+specifies the fields in
+.I attr
+that are active, and
+.I id
+returns the device if of the first device in the series that is added.
+.PP
+The value of
+.I mask
+is computed from the following values:
+.sp
+.nf
+DMXInputType
+DMXInputPhysicalScreen
+DMXInputSendsCore
+.fi
+.PP
+The
+.B DMXInputAttributes
+structure is:
+.sp
+.nf
+typedef struct {
+    DMXInputEnum inputType;
+    int          physicalScreen;
+    int          physicalId;
+    Bool         isCore;
+    Bool         sendsCore;
+    const char   *name;
+    Bool         detached;
+} DMXInputAttributes;
+.fi
+.PP
+.I inputType
+may have the value
+.B DMXConsoleInputType " or " DMXBackendInputType .
+.PP
+For console devices,
+.I name
+will specify the display to be used.
+.PP
+For back-end devices,
+.I physicalScreen
+will specify the
+.BR Xdmx (1)
+screen number.
+.PP
+If
+.I sendsCore
+is
+.BR True ,
+the new device will be added as a true core device.
+.PP
+If a device was removed with
+.BR DMXRemoveInput (__libmansuffix__)
+an attempt will be made to reconnect the previous devices
+.RI ( sendsCore
+is ignored in this case).
+.PP
+.B DMXAddBackendInput()
+is a helper function that is used to add input from a back-end server.
+With this function,
+.I screen
+refers to the back-end screen,
+.I sendsCore
+is
+.B True
+if the new input should send core events (and it ignored if the input
+has been detached), and
+.I newId
+will hold the device id of the first device in the series added.
+.PP
+.B DMXAddConsoleInput()
+is a helper function that is used to add input from a console.  With
+this function,
+.I name
+is the name of the console display,
+.I sendsCore
+is
+.B True
+if the new input should send core events (and it ignored if the input
+has been detached), and
+.I newId
+will hold the device id of the first device in the series added.
+.SH "RETURN VALUE"
+.B DMXAddInput()
+returns
+.B True
+on success and
+.B False
+otherwise.
+.PP
+.B DMXAddInput()
+can generate
+.B BadValue
+(if
+.I inputType
+is invalid or
+.I physicalScreen
+is out of range),
+.B BadAccess
+(if the input has already been attached or if the backend screen is
+currently detached).
+.SH NOTES
+Local devices cannot be attached or detached.
+.PP
+Attributes that are not specified will default to 0.  This may lead to
+unintended results.
+.SH "SEE ALSO"
+.BR DMXRemoveInput "(__libmansuffix__), " DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXAddScreen.man b/man/DMXAddScreen.man
new file mode 100644 (file)
index 0000000..a148af9
--- /dev/null
@@ -0,0 +1,102 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXAddScreen __libmansuffix__ __vendorversion__
+.SH NAME
+DMXAddScreen \- attach a new back-end screen
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXAddScreen(Display " *dpy ,
+.BI "                  const char " *displayName ,
+.BI "                  unsigned int " mask ,
+.BI "                  DMXScreenAttributes " *attr ,
+.BI "                  int " *screen );
+.fi
+.SH DESCRIPTION
+.B DMXAddScreen()
+attaches a back-end screen to the
+.BR Xdmx (1)
+server, in place of the previously detached back-end server specified by
+.IR screen .
+.PP
+.I displayName
+is the name of the new back-end display,
+.I mask
+specifies the field in
+.I attr
+that are active, and
+.I screen
+returns the new
+.BR Xdmx (1)
+screen number for the attached screen.
+.PP
+The information stored in
+.I mask " and " attr
+is identical to that used by the
+.BR DMXChangeScreensAttributes (__libmansuffix__)
+and
+.BR DMXGetScreenAttributes (__libmansuffix__)
+functions.
+.SH "RETURN VALUE"
+.B DMXAddScreen()
+will return
+.B True
+if the screen was successfully attached, and
+.B False
+otherwise.
+.B False
+will be returned if the
+.I \-addremovescreens
+command line option was not specified on the
+.BR Xdmx (1)
+command line, the input value of
+.I screen
+is out of range,
+.I screen
+is not currently detached,
+.I displayName
+cannot be opened, has unexpected visuals, or has characteristics that do
+not match the previously detached screen.
+.PP
+.B DMXAddScreen()
+can generate
+.BR BadLength ,
+.BR BadAlloc ,
+and
+.B BadValue
+errors.
+.SH NOTES
+Attributes that are not specified will default to 0.  This may lead to
+unintended results.
+.PP
+Unlike other functions in the
+.BR DMX (__libmansuffix__)
+API, this function uses
+.I screen
+for both input and output.
+.SH "SEE ALSO"
+.BR DMXRemoveScreen "(__libmansuffix__), "
+.BR DMXChangeScreensAttributes "(__libmansuffix__), " DMXGetScreenAttributes "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXChangeDesktopAttributes.man b/man/DMXChangeDesktopAttributes.man
new file mode 100644 (file)
index 0000000..eebfe82
--- /dev/null
@@ -0,0 +1,100 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXChangeDesktopAttributes __libmansuffix__ __vendorversion__
+.SH NAME
+DMXChangeDesktopAttributes \- change global bounding box
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "int DMXChangeDesktopAttributes(Display " *dpy ,
+.BI "                               unsigned int " mask ,
+.BI "                               DMXDesktopAttributes " *attr );
+.fi
+.SH DESCRIPTION
+.B DMXChangeDesktopAttributes()
+resizes the bounding box of the whole screen when using the Xinerama
+extension.  Otherwise, it has no effect on the screen layout.
+An attribute mask is placed in
+.I mask
+and the attributes to change are placed in
+.IR attr .
+.PP
+The values that are used to compute
+.I mask
+are as follows:
+.sp
+.nf
+DMXDesktopWidth
+DMXDesktopHeight
+DMXDesktopShiftX
+DMXDesktopShiftY
+.fi
+.PP
+The
+.B DMXDesktopAttributes
+structure is:
+.sp
+.nf
+typedef struct {
+    unsigned int width;
+    unsigned int height;
+    int          shiftX;
+    int          shiftY;
+} DMXDesktopAttributes;
+.fi
+.PP
+.I width " and " height
+specify the new width and height for the bounding box.
+.I shiftX " and " shiftY
+specify where the Xinerama origin will be placed with respect to the
+origin of the new bounding box.  This allows the left and upper edges of
+the bounding box to be changed without changing the visual position of
+the windows on the desktop.  If
+.I width " or " height
+is not specified, the current values will be used.  If
+.I shiftX " or " shiftY
+is not specified, 0 will be used.
+.PP
+All coordinates are in the global DMX coordinate system.  If Xinerama is
+not active, an error will be generated.
+.SH "RETURN VALUE"
+.B DMXChangeDesktopAttributes()
+will return 0 on success,
+.B DmxBadXinerama
+if Xinerama is not active,
+.B DmxBadValue
+if the size of the bounding box is too large, and
+.B DmxBadReply
+if there was a protocol error.
+.PP
+.B DMXChangeDesktopAttributes()
+can generate
+.B BadLength
+(if the request is malformed, which should never happen when using this
+library interface), and
+.B BadValue
+(if any values are out of range).
+.SH "SEE ALSO"
+.BR DMXGetDesktopAttributes "(__libmansuffix__), " DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXChangeScreensAttributes.man b/man/DMXChangeScreensAttributes.man
new file mode 100644 (file)
index 0000000..5b6b8fd
--- /dev/null
@@ -0,0 +1,121 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXChangeScreensAttributes __libmansuffix__ __vendorversion__
+.SH NAME
+DMXChangeScreensAttributes \- change back-end screen attributes
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "int DMXChangeScreensAttributes(Display " *dpy ,
+.BI "                               int " screen_count ,
+.BI "                               int " *screens ,
+.BI "                               int " mask_count ,
+.BI "                               unsigned int " *masks ,
+.BI "                               DMXScreenAttributes " *attr ,
+.BI "                               int *" error_screen );
+.fi
+.SH DESCRIPTION
+.B DMXChangeScreensAttributes()
+changes the geometries and positions of the DMX screen and DMX root
+windows on the back-end X servers.
+.I screen_count
+specifies the number of screens to be changed.  For each screen, the
+screen number is placed in
+.IR screens ,
+an attribute mask is placed in
+.IR masks ,
+and a
+.I DMXScreenAttributes
+structure is included in
+.IR attr .
+.PP
+An explanation of the
+.I DMXScreenAttributes
+structure is given in
+.BR DMXGetScreenAttributes (__libmansuffix__).
+.PP
+The values that are used to compute each value in
+.I masks
+are as follows
+.sp
+.nf
+DMXScreenWindowWidth
+DMXScreenWindowHeight
+DMXScreenWindowXoffset
+DMXScreenWindowYoffset
+DMXRootWindowWidth
+DMXRootWindowHeight
+DMXRootWindowXoffset
+DMXRootWindowYoffset
+DMXRootWindowXorigin
+DMXRootWindowYorigin
+.fi
+.PP
+In general,
+.I mask_count
+should be equal to
+.IR screen_count .
+However, as a convenience,
+.I mask_count
+may be less than
+.IR screen_count ,
+and the last entry in
+.I masks
+will then be used for all of the remaining screens.  For example, this
+allows identical changes to be made to several screens using only one
+mask.
+.SH "RETURN VALUE"
+On success, 0 is returned.  Otherwise,
+.I error_screen
+is set to the value of the first screen in the list that caused the
+error and a non-zero value is returned.  If
+.I screen_count
+or
+.I mask_count
+is less than 1, or if any of the attribute values are not within the
+appropriate bounding boxes,
+.B DmxBadValue
+is returned.  If a protocol error occurs,
+.B DmxBadReply
+is returned.
+.PP
+.B DMXChangeScreensAttributes()
+can generate
+.B BadLength
+(if the data provided does not match the data implicitly required by the
+.I screen_count
+and
+.I mask_count
+values),
+.B BadValue
+(if the values in
+.I screens
+are not valid), and
+.B BadAlloc
+errors.
+.SH "SEE ALSO"
+.BR DMXGetScreenCount "(__libmansuffix__), "
+.BR DMXGetScreenAttributes "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXForceWindowCreation.man b/man/DMXForceWindowCreation.man
new file mode 100644 (file)
index 0000000..01ad470
--- /dev/null
@@ -0,0 +1,49 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXForceWindowCreation __libmansuffix__ __vendorversion__
+.SH NAME
+DMXForceWindowCreation \- force immediate back-end window creation
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXForceWindowCreation(Display " *dpy ,
+.BI "                            Window " window );
+.fi
+.SH DESCRIPTION
+When using the lazy window creation optimization, windows are not
+created on the back-end X servers until they are required.
+.B DMXForceWindowCreation()
+forces the immediate creation of the window requested.
+.SH "RETURN VALUE"
+.B DMXForceWindowCreation()
+returns
+.B True
+unless there is a protocol error.
+.B DMXForceWindowCreation()
+can generate
+.B BadWindow
+errors.
+.SH "SEE ALSO"
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXGetDesktopAttributes.man b/man/DMXGetDesktopAttributes.man
new file mode 100644 (file)
index 0000000..bd66864
--- /dev/null
@@ -0,0 +1,65 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXDesktopAttributes __libmansuffix__ __vendorversion__
+.SH NAME
+DMXGetDesktopAttributes \- determine global bounding box
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXGetDesktopAttributes(Display " *dpy ,
+.BI "                             DMXDesktopAttributes " *attr );
+.fi
+.SH DESCRIPTION
+.B DMXGetDesktopAttributes()
+returns information about the desktop in
+.BR DMXDesktopAttributes :
+.sp
+.nf
+typedef struct {
+    unsigned int width;
+    unsigned int height;
+    int          shiftX;
+    int          shiftY;
+} DMXDesktopAttributes;
+.fi
+.PP
+The size of the global bounding box is given in
+.IR width ", and " height .
+The
+.IR shiftX " and " shiftY
+values will always be 0.  The global bounding box is computed whether or
+not Xinerama is active, but it is only useful when using Xinerama.
+.PP
+The global bounding box used by
+.BR Xdmx (1)
+may be larger than the Xinerama screen size because of information in
+the configuration file.
+.SH "RETURN VALUE"
+.B DMXGetDesktopAttributes()
+returns
+.B True
+unless there is a protocol error.
+.SH "SEE ALSO"
+.BR DMXChangeDesktopAttributes "(__libmansuffix__), " DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXGetInputAttributes.man b/man/DMXGetInputAttributes.man
new file mode 100644 (file)
index 0000000..4a0b1cf
--- /dev/null
@@ -0,0 +1,133 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXGetInputAttributes __libmansuffix__ __vendorversion__
+.SH NAME
+DMXGetInputAttributes \- determine input device attributes
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXGetInputAttributes(Display " *dpy ,
+.BI "                           int " id ,
+.BI "                           DMXInputAttributes " *attr );
+.fi
+.SH DESCRIPTION
+.B DMXGetInputAttributes()
+returns information about the input device specified with
+.IR id .
+This information cannot be
+obtained from the
+.BR XListInputDevices (__libmansuffix__)
+call.
+.I id
+is the same as that used by the
+.BR XListInputDevices (__libmansuffix__)
+call, and must be in
+the range 0 to one less than the value returned by
+.BR DMXGetInputCount(__libmansuffix__) ,
+inclusive.
+.PP
+The
+.B DMXInputAttributes
+structure is:
+.sp
+.nf
+typedef struct {
+    DMXInputEnum inputType;
+    int          physicalScreen;
+    int          physicalId;
+    Bool         isCore;
+    Bool         sendsCore;
+    const char   *name;
+    Bool         detached;
+} DMXInputAttributes;
+.fi
+.PP
+The value of
+.I inputType
+will always be valid, and will have one of the following values,
+depending on the type of input:
+.B DMXLocalInputType ", " DMXConsoleInputType ", or" DMXBackendInputType .
+.PP
+For local devices, all other fields returned, except
+.I isCore " and " sendsCore ,
+are invalid.
+.PP
+For console devices,
+.I physicalScreen " and " physicalID
+will be invalid, and
+.I name
+will return the name of the X server on which the console window is
+displayed.
+.PP
+For back-end devices,
+.I physicalScreen
+will identify the back-end display and can be used as an argument to
+.BR DMXGetScreenAttributes (__libmansuffix__)
+to obtain more information;
+.I physicalId
+will be the XInput device id on the back-end X server; and
+.I name
+will be invalid (since it does not provide any additional information
+that cannot be obtained with
+.BR DMXGetScreenAttributes (__libmansuffix__)).
+.PP
+If
+.I isCore
+is
+.BR True ,
+then this device is active as a true core input device and will send
+core events.  If
+.B sendsCore
+is True, then this device is an XInput extension device, but sends core
+events
+.I instead
+of extension events.  This behavior is different from that of XFree86 or
+Xorg, where XInput extension devices may send
+.I both
+extension events and core events.
+.PP
+If
+.I detached
+is True, then this device has been detached and is no longer producing
+input events.  The device may be reattached using
+.BR DMXAddInput (__libmansuffix__).
+.SH "RETURN VALUE"
+.B DMXGetInputAttributes()
+returns
+.B True
+unless there is a protocol error.
+.PP
+.B DMXGetInputAttributes()
+can generate
+.B BadValue
+(if the value of
+.I id
+is out of range).
+.SH "SEE ALSO"
+.BR DMXGetInputCount "(__libmansuffix__), "
+.BR XListInputDevices "(__libmansuffix__), "
+.BR DMXGetScreenAttributes "(__libmansuffix__), "
+.BR DMXAddInput "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXGetInputCount.man b/man/DMXGetInputCount.man
new file mode 100644 (file)
index 0000000..cbc9e75
--- /dev/null
@@ -0,0 +1,51 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXGetInputCount __libmansuffix__ __vendorversion__
+.SH NAME
+DMXGetInputCount \- determine number of input devices
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXGetInputCount(Display " *dpy ,
+.BI "                      int " *input_count );
+.fi
+.SH DESCRIPTION
+.B DMXGetInputCount()
+returns the number of input devices connected to the
+.BR Xdmx (1)
+server in
+.IR input_count .
+This number is the same as that returned by
+.BR XListInputDevices (__libmansuffix__),
+but is available even when the XInput extension is not supported.
+.SH "RETURN VALUE"
+.B DMXGetInputCount()
+returns
+.B True
+unless there is a protocol error.
+.SH "SEE ALSO"
+.BR DMXGetInputAttributes "(__libmansuffix__), "
+.BR XListInputDevices "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXGetScreenAttributes.man b/man/DMXGetScreenAttributes.man
new file mode 100644 (file)
index 0000000..e7a1fd1
--- /dev/null
@@ -0,0 +1,110 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXGetScreenAttributes __libmansuffix__ __vendorversion__
+.SH NAME
+DMXGetScreenAttributes \- determine back-end screen attributes
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXGetScreenAttributes(Display " *dpy ,
+.BI "                            int " screen ,
+.BI "                            DMXScreenAttributes " *attr );
+.fi
+.SH DESCRIPTION
+.B DMXGetScreenAttributes()
+returns the attributes for the single DMX screen specified in
+.IR screen .
+.PP
+The
+.I DMXScreenAttributes
+structure is:
+.sp
+.nf
+typedef struct {
+    char         *displayName;
+    int          logicalScreen;
+
+    unsigned int screenWindowWidth;
+    unsigned int screenWindowHeight;
+    int          screenWindowXoffset;
+    int          screenWindowYoffset;
+
+    unsigned int rootWindowWidth;
+    unsigned int rootWindowHeight;
+    int          rootWindowXoffset;
+    int          rootWindowYoffset;
+
+    int          rootWindowXorigin;
+    int          rootWindowYorigin;
+} DMXScreenAttributes;
+.fi
+.PP
+.I displayName
+is the name used to open the display, either from the
+.BR Xdmx (1)
+command-line or from the configuration file.
+.PP
+.I logicalScreen
+is the value of the screen that that
+.BR Xdmx (1)
+server exports to clients.  When Xinerama is in use, this value is
+typically 0 for all values of physicalScreen.  If Xinerama is in
+use,
+.I rootWindowXorigin
+and
+.I rootWindowYorigin
+specify where the physical screen is positioned in the global Xinerama
+coordinate system.  Otherwise, these values are set to 0.
+.PP
+.IR screenWindowWidth ", " screenWindowHeight ", "
+.IR screenWindowXoffset ", and " screenWindowYoffset
+are a geometry specification (see
+.BR X (7x))
+for the location of the DMX screen on the back-end screen.  The
+coordinate system of the back-end display is used for these values.
+.PP
+.IR rootWindowWidth ", " rootWindowHeight ", "
+.IR rootWindowXoffset ", and " rootWindowYoffset
+are a geometry specification (see
+.BR X (7x))
+for the location of the root window on the screen window.  The
+coordinate system of the screen window is used.  In most cases, the root
+window will have the same geometry as the DMX screen window, and will
+occupy the same area of the back-end display.  (This would not be the
+case, for example, if automatic projector alignment is used.)
+.SH "RETURN VALUE"
+.B DMXGetScreenAttributes()
+returns
+.B True
+unless there is a protocol error.
+.PP
+.B DMXGetScreenAttributes()
+can generate
+.B BadValue
+errors.
+.SH "SEE ALSO"
+.BR DMXGetScreenCount "(__libmansuffix__), "
+.BR DMXChangeScreensAttributes "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXGetScreenCount.man b/man/DMXGetScreenCount.man
new file mode 100644 (file)
index 0000000..279f1f3
--- /dev/null
@@ -0,0 +1,66 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXGetScreenCount __libmansuffix__ __vendorversion__
+.SH NAME
+DMXGetScreenCount \- determine number of back-end screens
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXGetScreenCount(Display " *dpy ,
+.BI "                       int " *screen_count );
+.fi
+.SH DESCRIPTION
+.B DMXGetScreenCount()
+returns the number of back-end screens that a
+.BR Xdmx (1)
+server controls.  Since a DMX screen usually fills all of the available
+area on a back-end server, there is usually a one-to-one correspondence
+between DMX screens and backend servers.  However, it is also possible
+for a DMX screen to cover only part of the available area on a back-end
+server, and for more than one DMX screens to occupy different parts of
+the visible area on the same back-end server.
+.PP
+A DMX screen may be managed as a regular X screen in the
+.BR Xdmx (1)
+server or may be joined with other DMX screens using Xinerama.
+.SH "RETURN VALUE"
+.B DMXGetScreenCount()
+sets
+.I screen_count
+and returns
+.B True
+unless there is a protocol error.
+.SH NOTES
+If Xinerama is active, only one logical screen will be available to
+clients of the
+.BR Xdmx (1)
+server.  However, this call will accurately reflect the number of
+composite back-end screens that the
+.BR Xdmx (1)
+server is using.
+.SH "SEE ALSO"
+.BR DMXGetScreenAttributes "(__libmansuffix__), "
+.BR DMXChangeScreensAttributes "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXGetWindowAttributes.man b/man/DMXGetWindowAttributes.man
new file mode 100644 (file)
index 0000000..d64d5b5
--- /dev/null
@@ -0,0 +1,152 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXGetWindowAttributes __libmansuffix__ __vendorversion__
+.SH NAME
+DMXGetWindowAttributes \- determine back-end window attributes
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXGetWindowAttributes(Display " *dpy ,
+.BI "                            Window " window ,
+.BI "                            int " *screen_count ,
+.BI "                            int " available_count ,
+.BI "                            DMXWindowAttributes " *attr );
+.fi
+.SH DESCRIPTION
+When calling
+.BR DMXGetWindowAttributes() ,
+.I window
+specifies the window ID of a window on the
+.BR Xdmx (1)
+server and
+.I available_count
+specifies the length of
+.I attr.
+.PP
+The number of screens for which information is available will be
+returned in
+.I screen_count
+and information about those screen will be returned in
+.IR attr .
+If
+.I screen_count
+is less than
+.IR available_count ,
+then information for all of the screens will be returned.  Otherwise,
+information for the first
+.I available_count
+screens will be returned.
+.PP
+The
+.I DMXWindowAttributes
+structure is:
+.sp
+.nf
+typedef struct {
+    int          screen;
+    Window       window;
+    XRectangle   pos, vis;
+} DMXWindowAttributes;
+.fi
+.PP
+For each back-end X server that displays a portion of
+.IR window ,
+this structure contains the physical
+.I screen
+containing that portion, the
+.I window
+ID on the back-end X server of the window containing that portion, the
+position and dimensions of the window on the back-end
+.RI ( pos ,
+in screen coordinates), and the visible area of the window on the
+back-end
+.RI ( vis ,
+in window-relative coordinates -- all zeros if the window is not visible
+on the backend).
+.PP
+To obtain more information about the physical screen use the
+.BR DMXGetScreenAttributes (__libmansuffix__)
+call.
+.PP
+Note that DMX allows multiple back-end windows to overlap in their
+view of the DMX logical window.  Further, a logical window does not
+have to be completely covered by back-end windows -- there may be
+gaps.
+.PP
+As an example, consider a 500x500 window that spans the top two
+1024x768 back-end displays (A and B) of a 2048x1536 DMX display
+composed of 4 1024x768 back-end displays arranged in a cube:
+.sp
+.nf
+    A B
+    C D
+.fi
+.sp
+In this case, the DMXGetWindowAttributes call would return the
+following information for the 500x500 window:
+.sp
+.nf
+display A: 500x500 window at 1024-250,0 (relative to back end)
+           with 250x500 visible at 0,0 (relative to window origin)
+
+display B: 500x500 window at -250,0 (relative to back end)
+           with 250x500 visible at 250,0 (relative to window origin)
+
+display C: 500x500 window at 1024-250,-768 with 0x0 visible at 0,0
+
+display D: 500x500 window at -250,-768 with 0x0 visible at 0,0
+.fi
+.SH "RETURN VALUE"
+.B DMXGetWindowAttributes()
+returns
+.B True
+unless there is a protocol error.
+.PP
+.B DMXGetWindowAttributes()
+can generate
+.B BadWindow
+and
+.B BadAlloc
+errors.
+.SH NOTES
+Because this call transports a great deal of information over the wire,
+please call
+.BR DMXGetScreenCount (__libmansuffix__)
+first, and make sure
+.I attr
+is sufficiently large.
+.PP
+On a particular back-end server, it is possible that the associated
+window has not yet been mapped because the
+.BR XMapWindow (__libmansuffix__)
+call that will eventually map the window had been buffered by Xlib's
+normal buffering system.  To avoid this race condition, please call
+.BR DMXSync (__libmansuffix__)
+before communicating directly with the back-end X server.
+.SH "SEE ALSO"
+.BR DMXGetScreenCount "(__libmansuffix__), "
+.BR DMXSync "(__libmansuffix__), "
+.BR DMXGetScreenAttributes "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXQueryExtension.man b/man/DMXQueryExtension.man
new file mode 100644 (file)
index 0000000..3a9d7c7
--- /dev/null
@@ -0,0 +1,53 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXQueryExtension __libmansuffix__ __vendorversion__
+.SH NAME
+DMXQueryExtension \- determine if DMX is available
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXQueryExtension(Display " *dpy ,
+.BI "                       int " *event_basep ,
+.BI "                       int " *error_basep );
+.fi
+.SH DESCRIPTION
+.B DMXQueryExtension()
+determines if the DMX protocol extension is available.  It will be
+available if the server is an
+.BR Xdmx (1)
+server.
+.SH "RETURN VALUE"
+If the DMX protocol extension is available,
+.I event_basep
+and
+.I error_basep
+will be set to the event and error bases, respectively, and
+.B True
+will be returned.  Otherwise,
+.B False
+will be returned.
+.SH "SEE ALSO"
+.BR DMXQueryVersion "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXQueryVersion.man b/man/DMXQueryVersion.man
new file mode 100644 (file)
index 0000000..8f44469
--- /dev/null
@@ -0,0 +1,78 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXQueryVersion __libmansuffix__ __vendorversion__
+.SH NAME
+DMXQueryVersion \- determine DMX extension version
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXQueryVersion(Display " *dpy ,
+.BI "                     int " *major_version ,
+.BI "                     int " *minor_version ,
+.BI "                     int " *patch_version );
+.fi
+.SH DESCRIPTION
+.B DMXQueryVersion()
+returns version information about the DMX protocol extension.
+.PP
+Any incompatible changes to the protocol will be indicated by
+a change in
+.IR major_version .
+Small, upward-compatible changes will be indicated by a change in
+.IR minor_version .
+In general,
+.I patch_version
+is for informational purposes and will encode the date of the last
+protocol revision (e.g., 20040604).
+.SH "RETURN VALUE"
+If the DMX protocol extension is available,
+.IR major_version ,
+.IR minor_version ,
+and
+.I patch_version
+will be set, and
+.B True
+will be returned.  Otherwise,
+.B False
+will be returned.
+.SH NOTES
+At the time of this writing, the DMX protocol is at version 2.2.
+.PP
+Version 2.2 was the final development version, and code supporting this
+version was submitted to upstream X server repositories in the summer of
+2004.
+.PP
+Version 1.5 was the last of the 1.x series, which was used for
+development before screen and input addition and removal were supported.
+Version 2.0 and 2.1 were development versions that partially supported
+screen and input addition and removal.
+.PP
+Since we do not expect development versions to be widely used, we
+recommend that any software that uses the DMX protocol extension to
+support only versions 2.2 and above (although they should detect earlier
+versions and either reduce functionality or fail gracefully).
+.SH "SEE ALSO"
+.BR DMXQueryExtension "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXRemoveInput.man b/man/DMXRemoveInput.man
new file mode 100644 (file)
index 0000000..b185223
--- /dev/null
@@ -0,0 +1,57 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXRemoveInput __libmansuffix__ __vendorversion__
+.SH NAME
+DMXRemoveInput \- detach an input
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXRemoveInput(Display " *dpy ,
+.BI "                    int " id );
+.fi
+.SH DESCRIPTION
+.B DMXRemoveInput()
+detaches the input device with
+.IR id ,
+and all associated inputs (e.g., if the
+.I id
+is a backend mouse, and a keyboard is also attached to the backend, then
+both devices will be detached).
+.SH "RETURN VALUE"
+.B DMXRemoveInput()
+returns
+.B True
+unless there is a protocol error.
+.PP
+.B DMXRemoveInput()
+can generate
+.B BadValue
+(if the
+.I id
+is not valid) and
+.B BadAccess
+(if the input has already been detached).
+.SH "SEE ALSO"
+.BR DMXAddInput "(__libmansuffix__), " DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXRemoveScreen.man b/man/DMXRemoveScreen.man
new file mode 100644 (file)
index 0000000..c8da784
--- /dev/null
@@ -0,0 +1,58 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXRemoveScreen __libmansuffix__ __vendorversion__
+.SH NAME
+DMXRemoveScreen \- detach a back-end screen
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXRemoveScreen(Display " *dpy ,
+.BI "                     int " screen );
+.fi
+.SH DESCRIPTION
+.B DMXRemoveScreen()
+detaches the back-end
+.I screen
+from the
+.BR Xdmx (1)
+server.
+.SH "RETURN VALUE"
+.B DMXRemoveScreen()
+returns
+.B True
+on success, and
+.B False
+if there were protocol errors, if the
+.I \-addremovescreens
+command-line option was not specified on the
+.BR Xdmx (1)
+command line, if the value of
+.I screen
+is out of range, or if the back-end screen specified by
+.I screen
+has already been detached.
+.SH "SEE ALSO"
+.BR DMXAddScreen "(__libmansuffix__), "
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/DMXSync.man b/man/DMXSync.man
new file mode 100644 (file)
index 0000000..66b76be
--- /dev/null
@@ -0,0 +1,48 @@
+.\" Copyright 2004 Red Hat Inc., Durham, North Carolina.
+.\" 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 on 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:
+.\"
+.\" he 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
+.\" NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+.\" 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.
+.TH DMXSync __libmansuffix__ __vendorversion__
+.SH NAME
+DMXSync \- flush protocol requests between Xdmx and back-end X servers
+.SH SYNOPSIS
+.B #include <X11/extensions/dmxext.h>
+.sp
+.nf
+.BI "Bool DMXSync(Display " *dpy );
+.fi
+.SH DESCRIPTION
+.B DMXSync()
+flushes all pending protocol requests between the
+.BR Xdmx (1)
+server and each back-end X server.  It is used by clients that talk
+directly to back-end X servers to ensure that all pending
+.BR Xdmx (1)
+requests have reached all back-end servers and have been processed by
+those servers.
+.SH "RETURN VALUE"
+.B DMXSync()
+returns
+.BR True
+unless there is a protocol error.
+.SH "SEE ALSO"
+.BR DMX "(__libmansuffix__), " Xdmx (1)
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644 (file)
index 0000000..c2129c9
--- /dev/null
@@ -0,0 +1,52 @@
+#  Copyright 2005  Red Hat, Inc.
+#
+#  Permission to use, copy, modify, distribute, and sell this software and its
+#  documentation for any purpose is hereby granted without fee, provided that
+#  the above copyright notice appear in all copies and that both that
+#  copyright notice and this permission notice appear in supporting
+#  documentation, and that the name of Red Hat not be used in
+#  advertising or publicity pertaining to distribution of the software without
+#  specific, written prior permission.  Red Hat makes no representations about
+#  the suitability of this software for any purpose.  It is provided "as is" without
+#  express or implied warranty.
+#
+#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+#  PERFORMANCE OF THIS SOFTWARE.
+#
+
+libmandir = $(LIB_MAN_DIR)
+
+libman_PRE = \
+         DMX.man \
+         DMXAddInput.man \
+         DMXAddScreen.man \
+         DMXChangeDesktopAttributes.man \
+         DMXChangeScreensAttributes.man \
+         DMXForceWindowCreation.man \
+         DMXGetDesktopAttributes.man \
+         DMXGetInputAttributes.man \
+         DMXGetInputCount.man \
+         DMXGetScreenAttributes.man \
+         DMXGetScreenCount.man \
+         DMXGetWindowAttributes.man \
+         DMXQueryExtension.man \
+         DMXQueryVersion.man \
+         DMXRemoveInput.man \
+         DMXRemoveScreen.man \
+         DMXSync.man
+
+libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@)
+
+EXTRA_DIST = $(libman_PRE)
+
+CLEANFILES = $(libman_DATA)
+
+SUFFIXES = .$(LIB_MAN_SUFFIX) .man
+
+.man.$(LIB_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/packaging/libdmx.spec b/packaging/libdmx.spec
new file mode 100644 (file)
index 0000000..9608c69
--- /dev/null
@@ -0,0 +1,64 @@
+Summary: X.Org X11 DMX runtime library
+Name: libdmx
+Version: 1.1.2
+Release: 1
+License: MIT
+Group: System Environment/Libraries
+URL: http://www.x.org
+
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig(xorg-macros)
+BuildRequires: pkgconfig(dmxproto)
+BuildRequires: pkgconfig(xext)
+
+%description
+The X.Org X11 DMX (Distributed Multihead X) runtime library.
+
+%package devel
+Summary: X.Org X11 DMX development files
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+The X.Org X11 DMX (Distributed Multihead X) development files.
+
+%prep
+%setup -q
+
+%build
+%reconfigure --disable-static \
+           LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p %{buildroot}/usr/share/license
+cp -af COPYING %{buildroot}/usr/share/license/%{name}
+
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
+
+%remove_docs
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+/usr/share/license/%{name}
+#%doc COPYING ChangeLog
+%{_libdir}/libdmx.so.1
+%{_libdir}/libdmx.so.1.0.0
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/libdmx.so
+%{_libdir}/pkgconfig/dmx.pc
+#%{_mandir}/man3/*.3*
+%{_includedir}/X11/extensions/dmxext.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..95f7908
--- /dev/null
@@ -0,0 +1,19 @@
+lib_LTLIBRARIES = libdmx.la
+
+libdmx_la_SOURCES = \
+         dmx.c
+
+libdmx_la_LIBADD = $(DMX_LIBS)
+
+libdmx_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+
+AM_CFLAGS = -I$(top_srcdir)/include \
+            -I$(top_srcdir)/include/X11 \
+            -I$(top_srcdir)/include/X11/extensions \
+            $(DMX_CFLAGS) \
+            $(MALLOC_ZERO_CFLAGS) \
+            $(CWARNFLAGS)
+
+libdmxincludedir = $(includedir)/X11/extensions
+libdmxinclude_HEADERS = $(top_srcdir)/include/X11/extensions/dmxext.h
+
diff --git a/src/dmx.c b/src/dmx.c
new file mode 100644 (file)
index 0000000..201568e
--- /dev/null
+++ b/src/dmx.c
@@ -0,0 +1,803 @@
+/*
+ * Copyright 2002-2004 Red Hat Inc., Durham, North Carolina.
+ *
+ * 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 on 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
+ * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * Authors:
+ *   Rickard E. (Rik) Faith <faith@redhat.com>
+ *
+ */
+
+/* THIS IS NOT AN X CONSORTIUM STANDARD */
+
+/** \file
+ * This file implements the client-side part of the DMX protocol.  It
+ * can be included in client applications by linking with the libdmx.a
+ * library. */
+
+#include <X11/Xlibint.h>
+#include <X11/extensions/Xext.h>
+#define EXTENSION_PROC_ARGS void *
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/dmxproto.h>
+#include <X11/extensions/dmxext.h>
+
+static XExtensionInfo dmx_extension_info_data;
+static XExtensionInfo *dmx_extension_info = &dmx_extension_info_data;
+static const char     *dmx_extension_name = DMX_EXTENSION_NAME;
+
+#define DMXCheckExtension(dpy,i,val) \
+  XextCheckExtension(dpy, i, dmx_extension_name, val)
+#define DMXSimpleCheckExtension(dpy,i) \
+  XextSimpleCheckExtension(dpy, i, dmx_extension_name)
+
+/*****************************************************************************
+ *                                                                           *
+ *                         private utility routines                          *
+ *                                                                           *
+ *****************************************************************************/
+
+static int close_display(Display *dpy, XExtCodes *extCodes);
+static /* const */ XExtensionHooks dmx_extension_hooks = {
+    NULL,                              /* create_gc */
+    NULL,                              /* copy_gc */
+    NULL,                              /* flush_gc */
+    NULL,                              /* free_gc */
+    NULL,                              /* create_font */
+    NULL,                              /* free_font */
+    close_display,                     /* close_display */
+    NULL,                              /* wire_to_event */
+    NULL,                              /* event_to_wire */
+    NULL,                              /* error */
+    NULL,                              /* error_string */
+};
+
+static XEXT_GENERATE_FIND_DISPLAY(find_display, dmx_extension_info,
+                                  dmx_extension_name,
+                                  &dmx_extension_hooks,
+                                  0, NULL)
+
+static XEXT_GENERATE_CLOSE_DISPLAY(close_display, dmx_extension_info)
+
+
+/*****************************************************************************
+ *                                                                           *
+ *                  public DMX Extension routines                            *
+ *                                                                           *
+ *****************************************************************************/
+
+/** If the server has the DMX extension, the event and error bases will
+ * be placed in \a event_basep and \a error_basep, and True will be
+ * returned.  Otherwise, False will be returned.
+ *
+ * Available in DMX Protocol Version 1.0 */
+Bool DMXQueryExtension(Display *dpy, int *event_basep, int *error_basep)
+{
+    XExtDisplayInfo *info = find_display(dpy);
+
+    if (XextHasExtension(info)) {
+       *event_basep = info->codes->first_event;
+       *error_basep = info->codes->first_error;
+       return True;
+    } else {
+       return False;
+    }
+}
+
+/** If the DMXQueryVersion protocol request returns version information
+ * from the server, \a majorVersion, \a minorVersion, and \a
+ * patchVersion are filled in with the appropriate information and True
+ * is returned.  Otherwise, False will be returned.
+ *
+ * Available in DMX Protocol Version 1.0 */
+Bool DMXQueryVersion(Display *dpy,
+                     int *majorVersion, int *minorVersion, int *patchVersion)
+{
+    XExtDisplayInfo       *info = find_display(dpy);
+    xDMXQueryVersionReply rep;
+    xDMXQueryVersionReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXQueryVersion, req);
+    req->reqType     = info->codes->major_opcode;
+    req->dmxReqType  = X_DMXQueryVersion;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+       UnlockDisplay(dpy);
+       SyncHandle();
+       return False;
+    }
+    *majorVersion = rep.majorVersion;
+    *minorVersion = rep.minorVersion;
+    *patchVersion = rep.patchVersion;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+/** Flush all pending dmxSync requests in DMX server.
+ *
+ * Available in DMX Protocol Version 1.5 */
+Bool DMXSync(Display *dpy)
+{
+    XExtDisplayInfo *info = find_display(dpy);
+    xDMXSyncReply   rep;
+    xDMXSyncReq     *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXSync, req);
+    req->reqType    = info->codes->major_opcode;
+    req->dmxReqType = X_DMXSync;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status == Success ? True : False;
+}
+
+/** The creation of the specified \a window will be forced.
+ *
+ * Available in DMX Protocol Version 1.2
+ * Reply added in DMX Protocol Version 2.0 */
+Bool DMXForceWindowCreation(Display *dpy, Window window)
+{
+    XExtDisplayInfo              *info = find_display(dpy);
+    xDMXForceWindowCreationReq   *req;
+    xDMXForceWindowCreationReply rep;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXForceWindowCreation, req);
+    req->reqType    = info->codes->major_opcode;
+    req->dmxReqType = X_DMXForceWindowCreation;
+    req->window     = window;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status == Success ? True : False;
+}
+
+/** If the DMXGetScreenCount protocol request returns the screen count,
+ * the value will be placed in \a screen_count, and True will be
+ * returned.  Otherwise, False will be returned.
+ *
+ * Available in DMX Protocol Version 1.0 */
+Bool DMXGetScreenCount(Display *dpy, int *screen_count)
+{
+    XExtDisplayInfo         *info = find_display(dpy);
+    xDMXGetScreenCountReply rep;
+    xDMXGetScreenCountReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXGetScreenCount, req);
+    req->reqType    = info->codes->major_opcode;
+    req->dmxReqType = X_DMXGetScreenCount;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    *screen_count = rep.screenCount;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+/** If the DMXGetScreenAttributes protocol request returns information
+ * for the specified \a physical_screen, information about the screen
+ * will be placed in \a attr, and True will be returned.  Otherwise,
+ * False will be returned.
+ *
+ * Available in DMX Protocol Version 1.0; Modified in Version 2.0 */
+Bool DMXGetScreenAttributes(Display *dpy, int physical_screen,
+                            DMXScreenAttributes *attr)
+{
+    XExtDisplayInfo              *info = find_display(dpy);
+    xDMXGetScreenAttributesReply rep;
+    xDMXGetScreenAttributesReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXGetScreenAttributes, req);
+    req->reqType        = info->codes->major_opcode;
+    req->dmxReqType     = X_DMXGetScreenAttributes;
+    req->physicalScreen = physical_screen;
+    if (!_XReply(dpy, (xReply *)&rep,
+                 (SIZEOF(xDMXGetScreenAttributesReply) - 32) >> 2, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    attr->displayName  = Xmalloc(rep.displayNameLength + 1 + 4 /* for pad */);
+    _XReadPad(dpy, attr->displayName, rep.displayNameLength);
+    attr->displayName[rep.displayNameLength] = '\0';
+    attr->logicalScreen       = rep.logicalScreen;
+
+    attr->screenWindowWidth   = rep.screenWindowWidth;
+    attr->screenWindowHeight  = rep.screenWindowHeight;
+    attr->screenWindowXoffset = rep.screenWindowXoffset;
+    attr->screenWindowYoffset = rep.screenWindowYoffset;
+
+    attr->rootWindowWidth     = rep.rootWindowWidth;
+    attr->rootWindowHeight    = rep.rootWindowHeight;
+    attr->rootWindowXoffset   = rep.rootWindowXoffset;
+    attr->rootWindowYoffset   = rep.rootWindowYoffset;
+    attr->rootWindowXorigin   = rep.rootWindowXorigin;
+    attr->rootWindowYorigin   = rep.rootWindowYorigin;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+static CARD32 _DMXGetScreenAttribute(int bit, DMXScreenAttributes *attr)
+{
+    switch (1 << bit) {
+    case DMXScreenWindowWidth:   return attr->screenWindowWidth;
+    case DMXScreenWindowHeight:  return attr->screenWindowHeight;
+    case DMXScreenWindowXoffset: return attr->screenWindowXoffset;
+    case DMXScreenWindowYoffset: return attr->screenWindowYoffset;
+    case DMXRootWindowWidth:     return attr->rootWindowWidth;
+    case DMXRootWindowHeight:    return attr->rootWindowHeight;
+    case DMXRootWindowXoffset:   return attr->rootWindowXoffset;
+    case DMXRootWindowYoffset:   return attr->rootWindowYoffset;
+    case DMXRootWindowXorigin:   return attr->rootWindowXorigin;
+    case DMXRootWindowYorigin:   return attr->rootWindowYorigin;
+    default:                     return 0;
+    }
+}
+
+static int _DMXDumpScreenAttributes(Display *dpy,
+                                    unsigned long mask,
+                                    DMXScreenAttributes *attr)
+{
+    int           i;
+    unsigned long value_list[32];
+    unsigned long *value = value_list;
+    int           count  = 0;
+
+    for (i = 0; i < 32; i++) {
+        if (mask & (1 << i)) {
+            *value++ = _DMXGetScreenAttribute(i, attr);
+            ++count;
+        }
+    }
+    Data32(dpy, value_list, count * sizeof(CARD32));
+    return count;
+}
+
+static CARD32 _DMXGetInputAttribute(int bit, DMXInputAttributes *attr)
+{
+    switch (1 << bit) {
+    case DMXInputType:
+        switch (attr->inputType) {
+        case DMXLocalInputType:   return 0;
+        case DMXConsoleInputType: return 1;
+        case DMXBackendInputType: return 2;
+        }
+        return attr->inputType;
+    case DMXInputPhysicalScreen: return attr->physicalScreen;
+    case DMXInputSendsCore:      return attr->sendsCore;
+    default:                     return 0;
+    }
+}
+
+static int _DMXDumpInputAttributes(Display *dpy,
+                                   unsigned long mask,
+                                   DMXInputAttributes *attr)
+{
+    int           i;
+    unsigned long value_list[32];
+    unsigned long *value = value_list;
+    int           count = 0;
+
+    for (i = 0; i < 32; i++) {
+        if (mask & (1 << i)) {
+            *value++ = _DMXGetInputAttribute(i, attr);
+            ++count;
+        }
+    }
+    Data32(dpy, value_list, count * sizeof(CARD32));
+    return count;
+}
+
+/** Change geometries and positions of the DMX screen and root windows
+ * on the back-end X server. */
+int DMXChangeScreensAttributes(Display *dpy,
+                               int screen_count,
+                               int *screens,
+                               int mask_count,
+                               unsigned int *masks,
+                               DMXScreenAttributes *attrs, /* vector */
+                               int *error_screen)
+{
+    XExtDisplayInfo                  *info = find_display(dpy);
+    xDMXChangeScreensAttributesReply rep;
+    xDMXChangeScreensAttributesReq   *req;
+    int                              i;
+    unsigned int                     mask  = 0;
+    CARD32                           *screen_list;
+    CARD32                           *mask_list;
+
+    DMXCheckExtension(dpy, info, False);
+
+    if (screen_count < 1 || mask_count < 1) return DmxBadValue;
+
+    LockDisplay(dpy);
+    GetReq(DMXChangeScreensAttributes, req);
+    req->reqType      = info->codes->major_opcode;
+    req->dmxReqType   = X_DMXChangeScreensAttributes;
+    req->screenCount  = screen_count;
+    req->maskCount    = mask_count;
+    req->length      += screen_count + mask_count;
+
+    screen_list = (CARD32 *)Xmalloc(sizeof(*screen_list) * screen_count);
+    for (i = 0; i < screen_count; i++) screen_list[i] = screens[i];
+    Data32(dpy, screen_list, screen_count * sizeof(CARD32));
+    Xfree(screen_list);
+
+    mask_list = (CARD32 *)Xmalloc(sizeof(*mask_list) * mask_count);
+    for (i = 0; i < mask_count;   i++) mask_list[i]   = masks[i];
+    Data32(dpy, mask_list, mask_count * sizeof(CARD32));
+    Xfree(mask_list);
+
+    for (i = 0; i < screen_count; i++) {
+        if (i < mask_count) mask = masks[i];
+        req->length += _DMXDumpScreenAttributes(dpy, mask, attrs + i);
+    }
+
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return DmxBadReply;
+    }
+    if (error_screen) *error_screen = rep.errorScreen;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status;
+}
+
+/** Add a screen. */
+Bool DMXAddScreen(Display *dpy, const char *displayName, unsigned int mask,
+                  DMXScreenAttributes *attr, int *screen)
+{
+    XExtDisplayInfo    *info = find_display(dpy);
+    xDMXAddScreenReply rep;
+    xDMXAddScreenReq   *req;
+    int                length;
+    int                paddedLength;
+
+    if (!screen)
+       return False;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXAddScreen, req);
+    length                 = displayName ? strlen(displayName) : 0;
+    paddedLength           = (length + 3) & ~3;
+    req->reqType           = info->codes->major_opcode;
+    req->dmxReqType        = X_DMXAddScreen;
+    req->displayNameLength = length;
+    req->physicalScreen    = *screen;
+    req->valueMask         = mask;
+    req->length           += paddedLength/4;
+    req->length           += _DMXDumpScreenAttributes(dpy, mask, attr);
+
+    if (length) {
+        char *buffer       = Xmalloc(paddedLength);
+        memset(buffer, 0, paddedLength);
+        memcpy(buffer, displayName, length);
+        Data32(dpy, buffer, paddedLength);
+        Xfree(buffer);
+    }
+
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    if (screen) *screen = rep.physicalScreen;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status == Success ? True : False;
+}
+
+/** Remove a screen. */
+Bool DMXRemoveScreen(Display *dpy, int screen)
+{
+    XExtDisplayInfo       *info = find_display(dpy);
+    xDMXRemoveScreenReply rep;
+    xDMXRemoveScreenReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXRemoveScreen, req);
+    req->reqType           = info->codes->major_opcode;
+    req->dmxReqType        = X_DMXRemoveScreen;
+    req->physicalScreen    = screen;
+
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status == Success ? True : False;
+}
+
+/** If the DMXGetWindowAttributes protocol request returns information
+ * about the specified \a window, the number of screens for which
+ * information is available will be returned in \a screen_count and
+ * information about the first \a available_count of those screens will
+ * be placed in \a inf.  Because this call transports a great deal of
+ * information over the wire, please call #DMXGetScreenCount first, and
+ * make sure \a inf is that large.
+ *
+ * Note that if the specified \a window has not yet been mapped when
+ * #DMXGetWindowAttributes is called, then a subsequent XMapWindow call
+ * might be buffered in xlib while requests directly to the back-end X
+ * servers are processed.  This race condition can be solved by calling
+ * #DMXSync before talking directly to the back-end X servers.
+ *
+ * Available in DMX Protocol Version 1.0, but not working correctly
+ * until DMX Protocol Version 1.4 */
+Bool DMXGetWindowAttributes(Display *dpy, Window window,
+                            int *screen_count, int available_count,
+                            DMXWindowAttributes *inf)
+{
+    XExtDisplayInfo              *info = find_display(dpy);
+    xDMXGetWindowAttributesReply rep;
+    xDMXGetWindowAttributesReq   *req;
+    unsigned long                current;
+    CARD32                       *screens; /* Must match protocol size */
+    CARD32                       *windows; /* Must match protocol size */
+    XRectangle                   *pos;     /* Must match protocol size */
+    XRectangle                   *vis;     /* Must match protocol size */
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXGetWindowAttributes, req);
+    req->reqType    = info->codes->major_opcode;
+    req->dmxReqType = X_DMXGetWindowAttributes;
+    req->window     = window;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+
+                                /* FIXME: check for NULL? */
+    screens    = Xmalloc(rep.screenCount * sizeof(*screens));
+    windows    = Xmalloc(rep.screenCount * sizeof(*windows));
+    pos        = Xmalloc(rep.screenCount * sizeof(*pos));
+    vis        = Xmalloc(rep.screenCount * sizeof(*vis));
+
+    _XRead(dpy, (char *)screens, rep.screenCount * sizeof(*screens));
+    _XRead(dpy, (char *)windows, rep.screenCount * sizeof(*windows));
+    _XRead(dpy, (char *)pos,     rep.screenCount * sizeof(*pos));
+    _XRead(dpy, (char *)vis,     rep.screenCount * sizeof(*vis));
+
+    *screen_count = rep.screenCount;
+    for (current = 0;
+         current < rep.screenCount && current < (unsigned)available_count;
+         current++, inf++) {
+        inf->screen    = screens[current];
+        inf->window    = windows[current];
+        inf->pos       = pos[current];
+        inf->vis       = vis[current];
+    }
+
+    Xfree(vis);
+    Xfree(pos);
+    Xfree(windows);
+    Xfree(screens);
+
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+/** If the DMXGetDesktopAttributes protocol request returns information
+ * correctly, the information will be placed in \a attr, and True will
+ * be returned.  Otherwise, False will be returned.
+ *
+ * Available in DMX Protocol Version 2.0 */
+Bool DMXGetDesktopAttributes(Display *dpy, DMXDesktopAttributes *attr)
+{
+    XExtDisplayInfo               *info = find_display(dpy);
+    xDMXGetDesktopAttributesReply rep;
+    xDMXGetDesktopAttributesReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXGetDesktopAttributes, req);
+    req->reqType        = info->codes->major_opcode;
+    req->dmxReqType     = X_DMXGetDesktopAttributes;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    attr->width  = rep.width;
+    attr->height = rep.height;
+    attr->shiftX = rep.shiftX;
+    attr->shiftY = rep.shiftY;
+
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+static CARD32 _DMXGetDesktopAttribute(int bit, DMXDesktopAttributes *attr)
+{
+    switch (1 << bit) {
+    case DMXDesktopWidth:  return attr->width;
+    case DMXDesktopHeight: return attr->height;
+    case DMXDesktopShiftX: return attr->shiftX;
+    case DMXDesktopShiftY: return attr->shiftY;
+    default:               return 0;
+    }
+}
+
+static int _DMXDumpDesktopAttributes(Display *dpy,
+                                     unsigned long mask,
+                                     DMXDesktopAttributes *attr)
+{
+    int           i;
+    unsigned long value_list[32];
+    unsigned long *value = value_list;
+    int           count  = 0;
+
+    for (i = 0; i < 32; i++) {
+        if (mask & (1 << i)) {
+            *value++ = _DMXGetDesktopAttribute(i, attr);
+            ++count;
+        }
+    }
+    Data32(dpy, value_list, count * sizeof(CARD32));
+    return count;
+}
+
+/** Change the global bounding box and origin offset.
+ *
+ * Available in DMX Protocol Version 2.0 */
+int DMXChangeDesktopAttributes(Display *dpy,
+                               unsigned int mask,
+                               DMXDesktopAttributes *attr)
+{
+    XExtDisplayInfo                  *info = find_display(dpy);
+    xDMXChangeDesktopAttributesReply rep;
+    xDMXChangeDesktopAttributesReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXChangeDesktopAttributes, req);
+    req->reqType      = info->codes->major_opcode;
+    req->dmxReqType   = X_DMXChangeDesktopAttributes;
+    req->valueMask    = mask;
+    req->length      +=_DMXDumpDesktopAttributes(dpy, mask, attr);
+
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return DmxBadReply;
+    }
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status;
+}
+
+/** If the DMXGetInputCount protocol request returns the input count,
+ * the value will be placed in \a input_count, and True will be
+ * returned.  Otherwise, False will be returned.
+ *
+ * Available in DMX Protocol Version 1.1 */
+Bool DMXGetInputCount(Display *dpy, int *input_count)
+{
+    XExtDisplayInfo         *info = find_display(dpy);
+    xDMXGetInputCountReply  rep;
+    xDMXGetInputCountReq    *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXGetInputCount, req);
+    req->reqType    = info->codes->major_opcode;
+    req->dmxReqType = X_DMXGetInputCount;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    *input_count = rep.inputCount;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+/** If the DMXGetInputAttributes protocol request returns information
+ * about the input device with the specified \a id, information about
+ * the input device will be placed in \a inf, and True will be returned.
+ * Otherwise, False will be returned.
+ *
+ * Available in DMX Protocol Version 1.1 */
+Bool DMXGetInputAttributes(Display *dpy, int id, DMXInputAttributes *inf)
+{
+    XExtDisplayInfo             *info = find_display(dpy);
+    xDMXGetInputAttributesReply rep;
+    xDMXGetInputAttributesReq   *req;
+    char                        *buffer;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXGetInputAttributes, req);
+    req->reqType    = info->codes->major_opcode;
+    req->dmxReqType = X_DMXGetInputAttributes;
+    req->deviceId   = id;
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+
+    switch (rep.inputType) {
+    case 0: inf->inputType = DMXLocalInputType;   break;
+    case 1: inf->inputType = DMXConsoleInputType; break;
+    case 2: inf->inputType = DMXBackendInputType; break;
+    }
+
+    inf->physicalScreen = rep.physicalScreen;
+    inf->physicalId     = rep.physicalId;
+    inf->isCore         = rep.isCore;
+    inf->sendsCore      = rep.sendsCore;
+    inf->detached       = rep.detached;
+    buffer              = Xmalloc(rep.nameLength + 1 + 4 /* for pad */);
+    _XReadPad(dpy, buffer, rep.nameLength);
+    buffer[rep.nameLength] = '\0';
+    inf->name           = buffer;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return True;
+}
+
+/** Add input. */
+Bool DMXAddInput(Display *dpy, unsigned int mask, DMXInputAttributes *attr,
+                 int *id)
+{
+    XExtDisplayInfo         *info = find_display(dpy);
+    xDMXAddInputReply       rep;
+    xDMXAddInputReq         *req;
+    int                     length;
+    int                     paddedLength;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXAddInput, req);
+    length                 = attr->name ? strlen(attr->name) : 0;
+    paddedLength           = (length + 3) & ~3;
+    req->reqType           = info->codes->major_opcode;
+    req->dmxReqType        = X_DMXAddInput;
+    req->displayNameLength = length;
+    req->valueMask         = mask;
+    req->length           += paddedLength/4;
+    req->length           += _DMXDumpInputAttributes(dpy, mask, attr);
+
+    if (length) {
+        char *buffer       = Xmalloc(paddedLength);
+        memset(buffer, 0, paddedLength);
+        memcpy(buffer, attr->name, paddedLength);
+        Data32(dpy, buffer, paddedLength);
+        Xfree(buffer);
+    }
+
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    if (id) *id = rep.physicalId;
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status == Success ? True : False;
+}
+
+/** Add backend input (a helper function that calls #DMXAddInput). */
+Bool DMXAddBackendInput(Display *dpy, int screen, int sendsCore, int *newId)
+{
+    DMXInputAttributes attr;
+    unsigned int       mask = (DMXInputType
+                               | DMXInputPhysicalScreen
+                               | DMXInputSendsCore);
+
+    attr.inputType        = DMXBackendInputType;
+    attr.physicalScreen   = screen;
+    attr.sendsCore        = sendsCore;
+    attr.name             = NULL;
+    return DMXAddInput(dpy, mask, &attr, newId);
+}
+
+/** Add console input (a helper function that calls #DMXAddInput). */
+Bool DMXAddConsoleInput(Display *dpy, const char *name, int sendsCore,
+                        int *newId)
+{
+    DMXInputAttributes attr;
+    unsigned int       mask = (DMXInputType
+                               | DMXInputSendsCore);
+
+    attr.inputType        = DMXConsoleInputType;
+    attr.physicalScreen   = 0;
+    attr.sendsCore        = sendsCore;
+    attr.name             = name;
+    return DMXAddInput(dpy, mask, &attr, newId);
+}
+
+/** Remove an input. */
+Bool DMXRemoveInput(Display *dpy, int id)
+{
+    XExtDisplayInfo      *info = find_display(dpy);
+    xDMXRemoveInputReply rep;
+    xDMXRemoveInputReq   *req;
+
+    DMXCheckExtension(dpy, info, False);
+
+    LockDisplay(dpy);
+    GetReq(DMXRemoveInput, req);
+    req->reqType          = info->codes->major_opcode;
+    req->dmxReqType       = X_DMXRemoveInput;
+    req->physicalId       = id;
+
+    if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+        UnlockDisplay(dpy);
+        SyncHandle();
+        return False;
+    }
+    UnlockDisplay(dpy);
+    SyncHandle();
+    return rep.status == Success ? True : False;
+}