Tizen 2.0 Release tizen_2.0 accepted/tizen_2.0/20130215.203109 submit/tizen_2.0/20130215.191841
authorHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 15:19:22 +0000 (00:19 +0900)
committerHyungKyu Song <hk76.song@samsung.com>
Fri, 15 Feb 2013 15:19:22 +0000 (00:19 +0900)
18 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]
include/X11/extensions/Xinerama.h [new file with mode: 0644]
include/X11/extensions/panoramiXext.h [new file with mode: 0644]
man/Makefile.am [new file with mode: 0644]
man/Xinerama.man [new file with mode: 0644]
man/XineramaIsActive.man [new file with mode: 0644]
man/XineramaQueryExtension.man [new file with mode: 0644]
man/XineramaQueryScreens.man [new file with mode: 0644]
man/XineramaQueryVersion.man [new file with mode: 0644]
packaging/libXinerama.spec [new file with mode: 0644]
src/Makefile.am [new file with mode: 0644]
src/Xinerama.c [new file with mode: 0644]
xinerama.pc.in [new file with mode: 0644]

diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..b565d04
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,66 @@
+Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice (including the next
+paragraph) shall be included in all copies or substantial portions of the
+Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
+Copyright 2003  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..779346a
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,595 @@
+commit 34b66b71eeb04a50125a3e5c59fe0d22500ab679
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Mar 7 20:29:30 2012 -0800
+
+    libXinerama 1.1.2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2a6cc285b7f9c880d08de6e58b045a314fc1ff78
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Nov 10 21:35:42 2011 -0800
+
+    Fix gcc -Wwrite-strings warning
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3e94f2d5fe0ee95f54faabbe253ac33327ef6d66
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 16 22:44:02 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 22cd4cfdf1613d73cdd84eae805239f55c4265c2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 11:43:43 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 6333852f00206cfb9320f4ddca685195a79341a9
+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 8dcc510ee404798a688574d57157eb9e1477ea44
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Jan 27 18:50:15 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 8e62595cc1af274f1c40868c5d7461c176982062
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Oct 27 23:28:24 2010 -0700
+
+    libXinerama 1.1.1
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d94e21941a296ed125d4704c31af020fd140fcbc
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Oct 27 23:27:21 2010 -0700
+
+    Sun's copyrights now belong to Oracle
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d3da9510deb14255ee7eabdecc3988af57441ee7
+Author: Jesse Adkins <jesserayadkins@gmail.com>
+Date:   Tue Sep 28 13:30:03 2010 -0700
+
+    Purge cvs tags.
+    
+    Signed-off-by: Jesse Adkins <jesserayadkins@gmail.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c09ed03c45c8141b620a49bce2dc19a2729b60b8
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Aug 16 20:06:56 2010 -0400
+
+    man: store shadow man pages in git rather than generating them
+    
+    Simplify the build process and the makefile.
+    
+    Local fix in CVS for bug 5628 is not required
+    as the problem has been fixed in
+    util-macros d9062e4077ebfd0985baf8418f3d0f111b9ddbba
+    
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ade2b02753362b178d7e926e18601ae2b0698532
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jul 7 16:38:03 2010 -0700
+
+    Use make rules instead of shell for loops to generate shadow man pages
+    
+    Allows parallel make and simpler build logs/error reporting
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2921352cfef9faf007f2b35aa06089425ba095ed
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Jul 7 16:32:00 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 2b5874a864152ac0466476b1c5b8ab0203887d20
+Author: Fernando Carrijo <fcarrijo@yahoo.com.br>
+Date:   Thu Jul 1 06:57:33 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 d8a51c48a4278b3481a5301be8ecb533fe87e9a7
+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 fa1772317219f2e2b4079c463f4139e02bec9853
+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 43b50ccdd50511aad7bdd1869b294813550f7741
+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 e528b336ce5aa66aa720fd94df4618f40a85b818
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jan 14 20:43:47 2010 -0800
+
+    Fill in COPYING with licenses from source files
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit e569f85315c0ff82a1481706f0736b85dc3bccf9
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jan 14 20:40:40 2010 -0800
+
+    Update Sun license notices to current X.Org standard form
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit a470f6392f4bd532e6e855445346f00e680983db
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Nov 27 20:56:04 2009 -0500
+
+    Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES
+    
+    Now that the INSTALL file is generated.
+    Allows running make maintainer-clean.
+
+commit 31f4af6528b6b45ea6f946f5ac97260f06c24071
+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 f23ac859c9d47158c9ef58b93361e43e8cd63db3
+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 94b6ea6665839bb399fe4befd3b6d1b20d128de8
+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 231ee8c9bbed45d89eed56e6c861af259b12f005
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Oct 22 12:34:19 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 968cb085c8e3fece7f10fe8e4c290f32e0b246b0
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Nov 2 14:58:54 2009 -0800
+
+    Fix PanroamiXOff typo in comment in panoramiXext.h
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 96c0d0e13c90e01c4335b64369adfac02ff8a148
+Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
+Date:   Wed Oct 21 12:47:25 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 ee877cebfea0773a91337439d32ece12444cf0a6
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Oct 2 13:27:04 2009 +1000
+
+    libXinerama 1.1
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit c5f1f903ddf1f2216bb31408caec3e87ea795dd9
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Fri Oct 2 13:26:17 2009 +1000
+
+    Require macros 1.3 for XORG_DEFAULT_OPTIONS
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 46e5273f34fd950cb4757583e06d5687d1f10407
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Aug 27 11:47:34 2009 +1000
+
+    libXinerama 1.0.99.1
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 0bfbff6d88be339f5837aa2fff016950d07a6bc5
+Author: Peter Hutterer <peter.hutterer@who-t.net>
+Date:   Thu Aug 27 11:46:33 2009 +1000
+
+    Require xineramaproto 1.1.99.1 to avoid header conflicts.
+    
+    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 90d4d23bf2e94721149ddc0a80093b10a82e8845
+Author: Benjamin Close <Benjamin.Close@clearchain.com>
+Date:   Fri Feb 13 14:48:50 2009 +1030
+
+    Proto major/minors shouldn't live in the extension header but the proto header
+    
+    Previously the Xserver was pulling in the extension header rather than the proto header
+    this led to issues when compiling the xserver. Instead we shift the proto numbers to
+    the proto header and tell the X server to use the proto header. Hence it's possible
+    to compile the server without the lib again.
+    
+    Signed-off-by: Benjamin Close <Benjamin.Close@clearchain.com>
+    Acked-by: Daniel Stone <daniel@fooishbar.org>
+    Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 9810140927d4aa646f585367215d6ca684ce60a4
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Mon Feb 2 20:34:34 2009 -0800
+
+    Add README with pointers to mailing list, bugzilla & git repos
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
+
+commit 39a19b89cb7bd226ec51000d4e8e7643ac076ce6
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Fri Jan 30 03:53:40 2009 -0200
+
+    panoramiXext.h is included in X Server build.
+    
+      The X Server build only requires the value of the macros
+    PANORAMIX_MAJOR_VERSION and PANORAMIX_MINOR_VERSION.
+
+commit 7c72e844a794a9cedd9e614e919f696b47ede5e5
+Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
+Date:   Thu Jan 29 19:42:06 2009 -0200
+
+    Janitor: ansification, make distcheck, compiler warnings.
+
+commit 8123c94eba27d1a3eb3f509a79c229ddfa1f881a
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date:   Mon May 19 22:56:50 2008 +0930
+
+    Add Xinerama.h and panoramiXext.h to includedir.
+    
+    Were previously part of xineramaproto, but they really belong here.
+    For a history of these files please refer to
+    git://anongit.freedesktop.org/git/xorg/proto/xineramaproto
+
+commit c5ac895a7dabe5a46e33e733771f20cc08e72d95
+Author: Peter Hutterer <peter@cs.unisa.edu.au>
+Date:   Mon May 19 17:43:19 2008 +0930
+
+    Rename parameters to clarify QueryVersion/QueryExtension.
+    
+    These parameters are not treated as input. Rename them to make the inner
+    workings slightly more obvious.
+    
+    X.Org Bug 14511 <http://bugs.freedesktop.org/show_bug.cgi?id=14511>
+
+commit cbfc4113a44053c2dfacd14475ff14f43817f3c1
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Thu Mar 6 15:42:56 2008 -0500
+
+    libXinerama 1.0.3
+
+commit 7c169beed2d8324c95385d248777f21c721b332e
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Sun Feb 24 20:30:03 2008 -0500
+
+    Bug #13660: XineramaQueryScreens() always modifies the 'number' outparameter.
+    
+    This makes the code match the man page.
+
+commit 52040eaaba626dd998f7a5421a923de0b0e06ad2
+Author: James Cloos <cloos@jhcloos.com>
+Date:   Thu Dec 6 15:51:17 2007 -0500
+
+    Add missing PHONY line for automatic ChangeLog generation
+
+commit 5362a27db8fddfb03ade3b2c622a2256d91de9eb
+Author: Brice Goglin <Brice.Goglin@ens-lyon.org>
+Date:   Wed Jul 25 21:41:28 2007 +0200
+
+    Fix typo in Xinerama.man
+    
+    Reported by Emanuele Rocca <ema@debian.org> in
+    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=432256
+
+commit 583d26d583bb0034ff91119ceefc08df64fbbc46
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Mar 16 16:26:41 2007 -0700
+
+    Version bump: 1.0.2
+
+commit 96c081ed52e3437ede0062eb7ccfb520879cbc0e
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Fri Mar 16 16:22:21 2007 -0700
+
+    Replace static ChangeLog with dist-hook to generate from git log
+
+commit 1a5b5c7e5f603528ff69468f8d6d73e2e30442a5
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Mar 1 16:56:14 2007 -0800
+
+    Add man page for Xinerama API functions
+
+commit 0062a3f12535043fd8d2dc70f41bd45fa6e8b495
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Mar 1 15:41:55 2007 -0800
+
+    Remove unneeded #include of <stdio.h>
+
+commit 36a4a6f58b95ce244741df939cccef4733d80b03
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 15 19:06:14 2007 -0800
+
+    Clear sparse warnings & error
+    
+    Xinerama.c:56:5: warning: incorrect type in initializer (incompatible argument 1 (different types))
+    Xinerama.c:68:8: error: symbol 'close_display' redeclared with different type (originally declared at Xinerama.c:48) - incompatible argument 1 (different types)
+    Xinerama.c:283:5: warning: Using plain integer as NULL pointer
+
+commit c98be137c711235fe5bff430e93222d2a47b5e6a
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 15 18:59:53 2007 -0800
+
+    Add support for source code checkers such as sparse & lint
+
+commit 269885f05a4aed0eb3ee192217fa8ec6494f90c5
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Feb 15 18:55:38 2007 -0800
+
+    Add *~ to .gitignore to skip over emacs/patch droppings
+
+commit e9214fe612d40bf5a792eda2dd9a52ef2bdba805
+Author: Alan Coopersmith <alan.coopersmith@sun.com>
+Date:   Thu Jul 13 14:59:00 2006 -0700
+
+    renamed: .cvsignore -> .gitignore
+
+commit 29feb54b5a0e9a0bc96f02f7f8f89384afbd7feb
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Dec 21 02:30:05 2005 +0000
+
+    Update package version for X11R7 release.
+
+commit 1da385cfa49d34cf38ec296738db9ecc8e5a2f02
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Mon Dec 19 16:28:27 2005 +0000
+
+    Stub COPYING files
+
+commit 78b498e1e7b92d59a16aa689cece7c1fdaf18eab
+Author: Kevin E Martin <kem@kem.org>
+Date:   Thu Dec 15 00:24:30 2005 +0000
+
+    Update package version number for final X11R7 release candidate.
+
+commit bf6d28d2dd4d6d20e6a8d165f22d2d8c17b16133
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 05:49:44 2005 +0000
+
+    Update package version number for X11R7 RC3 release.
+
+commit bacedae4107065e7b6617f3218f21a7321d8474c
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Dec 3 04:41:50 2005 +0000
+
+    Add check and cflags for malloc(0) returning NULL.
+
+commit d1078682cc64b0a669c6180839efd8a137b90d13
+Author: Kevin E Martin <kem@kem.org>
+Date:   Sat Nov 19 07:15:41 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 0af77179518266232a5e3b10f180325a21dd3343
+Author: Kevin E Martin <kem@kem.org>
+Date:   Wed Oct 19 02:48:11 2005 +0000
+
+    Update package version number for RC1 release.
+
+commit 219ac4ac54207f1d5ed334efade3335ff2c64add
+Author: Alan Coopersmith <Alan.Coopersmith@sun.com>
+Date:   Fri Aug 19 00:13:46 2005 +0000
+
+    More updates for Panoramix -> Xinerama rename
+
+commit 4306b9835f9015c38f8d5ec19526c8555a1b84cf
+Author: Adam Jackson <ajax@nwnk.net>
+Date:   Wed Aug 3 03:28:01 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 24aa28a9dad24944a006c4038c35f6302b5ea3b0
+Author: Kevin E Martin <kem@kem.org>
+Date:   Fri Jul 29 21:22:51 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 5468d892030e993a2fdd4c8177cc7cb193ba0411
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Sat Jul 16 07:14:52 2005 +0000
+
+    Set soversion to 1.0.0 using -version-number.
+
+commit 29971c16c1ad45dc8c958e12561e77e745e4a2fc
+Author: Daniel Stone <daniel@fooishbar.org>
+Date:   Tue Jul 12 07:56:48 2005 +0000
+
+    Change version to 1.1.0 and soversion to 1.0.0.
+
+commit e6417efb575017851e0e988ad99304094c36290c
+Author: Keith Packard <keithp@keithp.com>
+Date:   Sat Jul 9 06:42:31 2005 +0000
+
+    Add .cvsignore files Switch _la_CFLAGS for AM_CFLAGS to clean up directory
+
+commit 3835ed8e7aac1dfafa02ba6e33273523a6ef139f
+Author: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
+Date:   Tue Jun 21 15:41:36 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 2a6c0aa8f36dad9ff49385ef15c3dfc2529483b8
+Author: Søren Sandmann Pedersen <sandmann@daimi.au.dk>
+Date:   Fri Jun 10 19:33:53 2005 +0000
+
+    util/modular/modularizelibrary.sh: use rm -f instead of rm in one place
+        util/modular/addbuild.sh: Make it much faster by adding all the files
+        at once lib/Xinerama: check in the build system
+
+commit d7469261b17559d537660fbae0fc39fa1e37b6a2
+Author: Egbert Eich <eich@suse.de>
+Date:   Fri Apr 23 18:43:45 2004 +0000
+
+    Merging XORG-CURRENT into trunk
+
+commit c9662b6719b33f6a8dfee281fd93379ca6d4624b
+Author: Egbert Eich <eich@suse.de>
+Date:   Sun Mar 14 08:32:12 2004 +0000
+
+    Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004
+
+commit bbbb84282378baf72c0708933366168cbfec284e
+Author: Egbert Eich <eich@suse.de>
+Date:   Wed Mar 3 12:11:29 2004 +0000
+
+    Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004
+
+commit 787da2ac90290d601d0c2109c26bff9c3a66118f
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 13:35:33 2004 +0000
+
+    readding XFree86's cvs IDs
+
+commit 27f0b1858e9939afc9b9d064bea23d6ebfe0570d
+Author: Egbert Eich <eich@suse.de>
+Date:   Thu Feb 26 09:22:43 2004 +0000
+
+    Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004
+
+commit a89cc18ae1eb9cf612d6f4987d49541e008a0fb4
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:49 2003 +0000
+
+    XFree86 4.3.0.1
+
+commit d16fb988d427bf8c684a80fee18a4fe6c4d1d578
+Author: Kaleb Keithley <kaleb@freedesktop.org>
+Date:   Fri Nov 14 16:48:49 2003 +0000
+
+    Initial revision
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..d744d0f
--- /dev/null
@@ -0,0 +1,42 @@
+#
+#  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 = xinerama.pc
+
+MAINTAINERCLEANFILES = ChangeLog INSTALL
+
+.PHONY: ChangeLog INSTALL
+
+INSTALL:
+       $(INSTALL_CMD)
+
+ChangeLog:
+       $(CHANGELOG_CMD)
+
+dist-hook: ChangeLog INSTALL
+
+if LINT
+lint:
+       (cd src && $(MAKE) $(MFLAGS) lint)
+endif LINT
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..3972335
--- /dev/null
+++ b/README
@@ -0,0 +1,25 @@
+libXinerama - API for Xinerama extension to X11 Protocol
+
+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/libXinerama
+
+        http://cgit.freedesktop.org/xorg/lib/libXinerama
+
+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..545c946
--- /dev/null
@@ -0,0 +1,54 @@
+#  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([libXinerama], [1.1.2],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXinerama])
+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(XINERAMA, x11 xext xextproto [xineramaproto >= 1.1.99.1])
+
+# Allow checking code with lint, sparse, etc.
+XORG_WITH_LINT
+LINT_FLAGS="${LINT_FLAGS} ${XINERAMA_CFLAGS}"
+
+AC_CONFIG_FILES([Makefile
+               src/Makefile
+               man/Makefile
+               xinerama.pc])
+AC_OUTPUT
diff --git a/include/X11/extensions/Xinerama.h b/include/X11/extensions/Xinerama.h
new file mode 100644 (file)
index 0000000..8c0f829
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+
+Copyright 2003  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+#ifndef _Xinerama_h
+#define _Xinerama_h
+
+#include <X11/Xlib.h>
+
+typedef struct {
+   int   screen_number;
+   short x_org;
+   short y_org;
+   short width;
+   short height;
+} XineramaScreenInfo;
+
+_XFUNCPROTOBEGIN
+
+Bool XineramaQueryExtension (
+   Display *dpy,
+   int     *event_base,
+   int     *error_base
+);
+
+Status XineramaQueryVersion(
+   Display *dpy,
+   int     *major_versionp,
+   int     *minor_versionp
+);
+
+Bool XineramaIsActive(Display *dpy);
+
+
+/*
+   Returns the number of heads and a pointer to an array of
+   structures describing the position and size of the individual
+   heads.  Returns NULL and number = 0 if Xinerama is not active.
+
+   Returned array should be freed with XFree().
+*/
+
+XineramaScreenInfo *
+XineramaQueryScreens(
+   Display *dpy,
+   int     *number
+);
+
+_XFUNCPROTOEND
+
+#endif /* _Xinerama_h */
+
diff --git a/include/X11/extensions/panoramiXext.h b/include/X11/extensions/panoramiXext.h
new file mode 100644 (file)
index 0000000..8312a17
--- /dev/null
@@ -0,0 +1,85 @@
+/*****************************************************************
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+******************************************************************/
+/*
+ *     PanoramiX definitions
+ */
+
+/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
+
+#ifndef _panoramiXext_h
+#define _panoramiXext_h
+
+#include <X11/Xfuncproto.h>
+
+typedef struct {
+    Window  window;         /* PanoramiX window - may not exist */
+    int            screen;
+    int     State;          /* PanoramiXOff, PanoramiXOn */
+    int            width;          /* width of this screen */
+    int     height;        /* height of this screen */
+    int     ScreenCount;    /* real physical number of screens */
+    XID     eventMask;      /* selected events for this client */
+} XPanoramiXInfo;
+
+_XFUNCPROTOBEGIN
+
+extern Bool XPanoramiXQueryExtension (
+    Display *          /* dpy */,
+    int *              /* event_base_return */,
+    int *              /* error_base_return */
+);
+
+extern Status XPanoramiXQueryVersion(
+    Display *          /* dpy */,
+    int *              /* major_version_return */,
+    int *              /* minor_version_return */
+);
+
+extern XPanoramiXInfo *XPanoramiXAllocInfo (
+    void
+);
+
+extern Status XPanoramiXGetState (
+    Display *          /* dpy */,
+    Drawable           /* drawable */,
+    XPanoramiXInfo *   /* panoramiX_info */
+);
+
+extern Status XPanoramiXGetScreenCount (
+    Display *          /* dpy */,
+    Drawable           /* drawable */,
+    XPanoramiXInfo *   /* panoramiX_info */
+);
+
+extern Status XPanoramiXGetScreenSize (
+    Display *          /* dpy */,
+    Drawable           /* drawable */,
+    int                        /* screen_num */,
+    XPanoramiXInfo *   /* panoramiX_info */
+);
+
+_XFUNCPROTOEND
+
+#endif /* _panoramiXext_h */
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644 (file)
index 0000000..7a349ef
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+#
+
+libmandir = $(LIB_MAN_DIR)
+
+libman_PRE =                           \
+       Xinerama.man                    \
+       $(Xinerama_shadows:=.man)
+
+Xinerama_shadows =                     \
+       XineramaQueryExtension          \
+       XineramaQueryVersion            \
+       XineramaIsActive                \
+       XineramaQueryScreens
+
+EXTRA_DIST = $(libman_PRE)
+CLEANFILES = $(libman_DATA)
+
+libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@)
+
+SUFFIXES = .$(LIB_MAN_SUFFIX) .man
+
+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
+.man.$(LIB_MAN_SUFFIX):
+       $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
diff --git a/man/Xinerama.man b/man/Xinerama.man
new file mode 100644 (file)
index 0000000..3774131
--- /dev/null
@@ -0,0 +1,123 @@
+.\"
+.\" Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
+.\"
+.\" Permission is hereby granted, free of charge, to any person obtaining a
+.\" copy of this software and associated documentation files (the "Software"),
+.\" to deal in the Software without restriction, including without limitation
+.\" the rights to use, copy, modify, merge, publish, distribute, sublicense,
+.\" and/or sell copies of the Software, and to permit persons to whom the
+.\" Software is furnished to do so, subject to the following conditions:
+.\"
+.\" The above copyright notice and this permission notice (including the next
+.\" paragraph) shall be included in all copies or substantial portions of the
+.\" Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+.\" THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+.\" LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+.\" FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+.\" DEALINGS IN THE SOFTWARE.
+.\"
+.de TQ
+.br
+.ns
+.TP \\$1
+..
+.TH XINERAMA __libmansuffix__ __vendorversion__
+.SH NAME
+Xinerama \- API for Xinerama extension to X11 Protocol
+.SH SYNOPSIS
+\&#include <X11/extensions/Xinerama.h>
+.nf
+.sp
+Bool XineramaQueryExtension \^(\^Display *\fIdpy\fP,
+       int *\fIevent_base_return\fP, int *\fIerror_base_return\fP\^);
+.sp
+Status XineramaQueryVersion \^(\^Display *\fIdpy\fP,
+       int *\fImajor_version_return\fP,
+       int *\fIminor_version_return\fP\^);
+.sp
+Bool XineramaIsActive \^(\^Display *\fIdpy\fP\^);
+.sp
+XineramaScreenInfo * XineramaQueryScreens \^(\^Display *\fIdpy\fP,
+       int *\fInumber\fP\^);
+.fi
+.SH ARGUMENTS
+.IP \fIdisplay\fP 1i
+Specifies the connection to the X server.
+.IP \fIevent_base_return\fP 1i
+Specifies the return location for the assigned base event code
+.IP \fIerror_base_return\fP 1i
+Specifies the return location for the assigned base error code
+.IP \fImajor_version_return\fP 1i
+Returns the major version supported by the server
+.IP \fIminor_version_return\fP 1i
+Returns the minor version supported by the server
+.IP \fInumber\fP 1i
+Returns the number of entries in the returned XineramaScreenInfo array.
+.SH DESCRIPTION
+.B Xinerama
+is a simple library designed to interface the Xinerama Extension for
+retrieving information about physical output devices which may be combined
+into a single logical X screen.
+
+.SH FUNCTIONS
+
+.SS \fBXineramaQueryExtension()\fR
+
+.LP
+The XineramaQueryExtension function queries the Xserver to determine the
+availability of the Xinerama Extension. If the extension is available, the
+return value is True, and event_base_return and error_base_return are set to
+the base event number and base error number for the extension, respectively.
+Otherwise, the return value is False, and the values of event_base_return and
+error_base_return are undefined.
+.sp
+
+.SS \fBXineramaQueryVersion()\fR
+
+.LP
+The XineramaQueryVersion function returns the version of the Xinerama extension
+implemented by the Xserver. The version is returned in major_version_return
+and minor_version_return. The major version will be incremented for protocol
+incompatible changes, and the minor version will be incremented for small,
+upwardly compatible changes.
+.LP
+If the Xinerama library is compatible with the version returned by the
+server, it returns nonzero. If the server does not support the
+XINERAMA extension, or if there was an error during communications
+with the server, or if the server and library protocol versions are
+incompatible, it returns zero.
+.sp
+
+.SS \fBXineramaIsActive()\fR
+
+.LP
+The XineramaIsActive function returns a Boolean operator used to determine if
+Xinerama is activated on the screen. Returns True for active and False for
+not active.
+.sp
+
+.SS \fBXineramaQueryScreens()\fR
+
+.LP
+The \fBXineramaQueryScreens()\fR function returns info about each
+individual output device within the Xinerama Screen.  The integer
+pointed to by the \fInumber\fR argument is updated to the number of
+output devices listed in the returned array of \fIXineramaScreenInfo\fR
+structures.  \fBXineramaQueryScreens()\fR returns NULL and sets \fInumber\fR
+to 0 if Xinerama is not active.
+
+The pointer returned should be released with XFree(__libmansuffix__)
+when no longer needed.
+.sp
+
+.SH NOTE
+The original API provided for interacting with the XINERAMA extension used
+function names beginning with \fIXPanoramiX\fR.   That API is now deprecated
+and this API should be used instead in new software.
+
+
+
diff --git a/man/XineramaIsActive.man b/man/XineramaIsActive.man
new file mode 100644 (file)
index 0000000..bf86f34
--- /dev/null
@@ -0,0 +1 @@
+.so man__libmansuffix__/Xinerama.__libmansuffix__
diff --git a/man/XineramaQueryExtension.man b/man/XineramaQueryExtension.man
new file mode 100644 (file)
index 0000000..bf86f34
--- /dev/null
@@ -0,0 +1 @@
+.so man__libmansuffix__/Xinerama.__libmansuffix__
diff --git a/man/XineramaQueryScreens.man b/man/XineramaQueryScreens.man
new file mode 100644 (file)
index 0000000..bf86f34
--- /dev/null
@@ -0,0 +1 @@
+.so man__libmansuffix__/Xinerama.__libmansuffix__
diff --git a/man/XineramaQueryVersion.man b/man/XineramaQueryVersion.man
new file mode 100644 (file)
index 0000000..bf86f34
--- /dev/null
@@ -0,0 +1 @@
+.so man__libmansuffix__/Xinerama.__libmansuffix__
diff --git a/packaging/libXinerama.spec b/packaging/libXinerama.spec
new file mode 100644 (file)
index 0000000..294619a
--- /dev/null
@@ -0,0 +1,69 @@
+Summary: X.Org X11 libXinerama runtime library
+Name: libXinerama
+Version: 1.1.2
+Release: 1
+License: MIT
+Group: System Environment/Libraries
+URL: http://www.x.org
+
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig
+BuildRequires:  pkgconfig(xorg-macros)
+BuildRequires:  pkgconfig(xineramaproto)
+BuildRequires:  pkgconfig(xproto)
+BuildRequires: libX11-devel
+BuildRequires: libXext-devel
+
+%description
+X.Org X11 libXinerama runtime library
+
+%package devel
+Summary: X.Org X11 libXinerama development package
+Group: Development/Libraries
+Provides: libxinerama-devel 
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+X.Org X11 libXinerama development package
+
+%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}/libXinerama.so.1
+%{_libdir}/libXinerama.so.1.0.0
+
+%files devel
+%defattr(-,root,root,-)
+%{_libdir}/libXinerama.so
+%{_libdir}/pkgconfig/xinerama.pc
+#%{_mandir}/man3/*.3*
+%{_includedir}/X11/extensions/Xinerama.h
+%{_includedir}/X11/extensions/panoramiXext.h
\ No newline at end of file
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..c362ef1
--- /dev/null
@@ -0,0 +1,27 @@
+AM_CFLAGS = -I$(top_srcdir)/include \
+            -I$(top_srcdir)/include/X11 \
+            -I$(top_srcdir)/include/X11/extensions \
+            $(XINERAMA_CFLAGS) \
+            $(MALLOC_ZERO_CFLAGS) \
+            $(CWARNFLAGS)
+
+lib_LTLIBRARIES = libXinerama.la
+
+libXinerama_la_SOURCES = \
+         Xinerama.c
+
+libXinerama_la_LIBADD = $(XINERAMA_LIBS)
+
+libXinerama_la_LDFLAGS = -version-number 1:0:0 -no-undefined
+
+libXineramaincludedir = $(includedir)/X11/extensions
+libXineramainclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xinerama.h \
+                             $(top_srcdir)/include/X11/extensions/panoramiXext.h
+
+if LINT
+ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+               $(AM_CPPFLAGS) $(CPPFLAGS)
+
+lint:
+       $(LINT) $(ALL_LINT_FLAGS) $(libXinerama_la_SOURCES) $(XINERAMA_LIBS)
+endif LINT
diff --git a/src/Xinerama.c b/src/Xinerama.c
new file mode 100644 (file)
index 0000000..7d7e4d8
--- /dev/null
@@ -0,0 +1,313 @@
+/*****************************************************************
+Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
+BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of Digital Equipment Corporation
+shall not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Digital
+Equipment Corporation.
+******************************************************************/
+
+#include <X11/Xlibint.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/panoramiXext.h>
+#include <X11/extensions/panoramiXproto.h>
+#include <X11/extensions/Xinerama.h>
+
+
+static XExtensionInfo _panoramiX_ext_info_data;
+static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data;
+static const char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
+
+#define PanoramiXCheckExtension(dpy,i,val) \
+  XextCheckExtension (dpy, i, panoramiX_extension_name, val)
+#define PanoramiXSimpleCheckExtension(dpy,i) \
+  XextSimpleCheckExtension (dpy, i, panoramiX_extension_name)
+
+static int close_display(Display *dpy, XExtCodes *codes);
+
+static /* const */ XExtensionHooks panoramiX_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, panoramiX_ext_info,
+                                  panoramiX_extension_name,
+                                  &panoramiX_extension_hooks,
+                                  0, NULL)
+
+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, panoramiX_ext_info)
+
+
+
+/****************************************************************************
+ *                                                                          *
+ *                         PanoramiX public interfaces                         *
+ *                                                                          *
+ ****************************************************************************/
+
+Bool XPanoramiXQueryExtension (
+    Display *dpy,
+    int *event_base_return,
+    int *error_base_return
+)
+{
+    XExtDisplayInfo *info = find_display (dpy);
+
+    if (XextHasExtension(info)) {
+       *event_base_return = info->codes->first_event;
+       *error_base_return = info->codes->first_error;
+       return True;
+    } else {
+       return False;
+    }
+}
+
+
+Status XPanoramiXQueryVersion(
+    Display *dpy,
+    int     *major_version_return,
+    int     *minor_version_return
+)
+{
+    XExtDisplayInfo *info = find_display (dpy);
+    xPanoramiXQueryVersionReply            rep;
+    register xPanoramiXQueryVersionReq  *req;
+
+    PanoramiXCheckExtension (dpy, info, 0);
+
+    LockDisplay (dpy);
+    GetReq (PanoramiXQueryVersion, req);
+    req->reqType = info->codes->major_opcode;
+    req->panoramiXReqType = X_PanoramiXQueryVersion;
+    req->clientMajor = PANORAMIX_MAJOR_VERSION;
+    req->clientMinor = PANORAMIX_MINOR_VERSION;
+    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+       UnlockDisplay (dpy);
+       SyncHandle ();
+       return 0;
+    }
+    *major_version_return = rep.majorVersion;
+    *minor_version_return = rep.minorVersion;
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    return 1;
+}
+
+XPanoramiXInfo *XPanoramiXAllocInfo(void)
+{
+       return (XPanoramiXInfo *) Xmalloc (sizeof (XPanoramiXInfo));
+}
+
+Status XPanoramiXGetState (
+    Display            *dpy,
+    Drawable           drawable,
+    XPanoramiXInfo     *panoramiX_info
+)
+{
+    XExtDisplayInfo                    *info = find_display (dpy);
+    xPanoramiXGetStateReply    rep;
+    register xPanoramiXGetStateReq     *req;
+
+    PanoramiXCheckExtension (dpy, info, 0);
+
+    LockDisplay (dpy);
+    GetReq (PanoramiXGetState, req);
+    req->reqType = info->codes->major_opcode;
+    req->panoramiXReqType = X_PanoramiXGetState;
+    req->window = drawable;
+    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+       UnlockDisplay (dpy);
+       SyncHandle ();
+       return 0;
+    }
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    panoramiX_info->window = rep.window;
+    panoramiX_info->State = rep.state;
+    return 1;
+}
+
+Status XPanoramiXGetScreenCount (
+    Display            *dpy,
+    Drawable           drawable,
+    XPanoramiXInfo     *panoramiX_info
+)
+{
+    XExtDisplayInfo                    *info = find_display (dpy);
+    xPanoramiXGetScreenCountReply      rep;
+    register xPanoramiXGetScreenCountReq       *req;
+
+    PanoramiXCheckExtension (dpy, info, 0);
+
+    LockDisplay (dpy);
+    GetReq (PanoramiXGetScreenCount, req);
+    req->reqType = info->codes->major_opcode;
+    req->panoramiXReqType = X_PanoramiXGetScreenCount;
+    req->window = drawable;
+    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+       UnlockDisplay (dpy);
+       SyncHandle ();
+       return 0;
+    }
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    panoramiX_info->window = rep.window;
+    panoramiX_info->ScreenCount = rep.ScreenCount;
+    return 1;
+}
+
+Status XPanoramiXGetScreenSize (
+    Display            *dpy,
+    Drawable           drawable,
+    int                        screen_num,
+    XPanoramiXInfo     *panoramiX_info
+)
+{
+    XExtDisplayInfo                    *info = find_display (dpy);
+    xPanoramiXGetScreenSizeReply       rep;
+    register xPanoramiXGetScreenSizeReq        *req;
+
+    PanoramiXCheckExtension (dpy, info, 0);
+
+    LockDisplay (dpy);
+    GetReq (PanoramiXGetScreenSize, req);
+    req->reqType = info->codes->major_opcode;
+    req->panoramiXReqType = X_PanoramiXGetScreenSize;
+    req->window = drawable;
+    req->screen = screen_num;                  /* need to define */
+    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+       UnlockDisplay (dpy);
+       SyncHandle ();
+       return 0;
+    }
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    panoramiX_info->window = rep.window;
+    panoramiX_info->screen = rep.screen;
+    panoramiX_info->width =  rep.width;
+    panoramiX_info->height = rep.height;
+    return 1;
+}
+
+/*******************************************************************\
+  Alternate interface to make up for shortcomings in the original,
+  namely, the omission of the screen origin.  The new interface is
+  in the "Xinerama" namespace instead of "PanoramiX".
+\*******************************************************************/
+
+Bool XineramaQueryExtension (
+   Display *dpy,
+   int     *event_base_return,
+   int     *error_base_return
+)
+{
+   return XPanoramiXQueryExtension(dpy, event_base_return, error_base_return);
+}
+
+Status XineramaQueryVersion(
+   Display *dpy,
+   int     *major,
+   int     *minor
+)
+{
+   return XPanoramiXQueryVersion(dpy, major, minor);
+}
+
+Bool XineramaIsActive(Display *dpy)
+{
+    xXineramaIsActiveReply     rep;
+    xXineramaIsActiveReq       *req;
+    XExtDisplayInfo            *info = find_display (dpy);
+
+    if(!XextHasExtension(info))
+       return False;  /* server doesn't even have the extension */
+
+    LockDisplay (dpy);
+    GetReq (XineramaIsActive, req);
+    req->reqType = info->codes->major_opcode;
+    req->panoramiXReqType = X_XineramaIsActive;
+    if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+       UnlockDisplay (dpy);
+       SyncHandle ();
+       return False;
+    }
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    return rep.state;
+}
+
+XineramaScreenInfo *
+XineramaQueryScreens(
+   Display *dpy,
+   int     *number
+)
+{
+    XExtDisplayInfo            *info = find_display (dpy);
+    xXineramaQueryScreensReply rep;
+    xXineramaQueryScreensReq   *req;
+    XineramaScreenInfo         *scrnInfo = NULL;
+
+    PanoramiXCheckExtension (dpy, info, NULL);
+
+    LockDisplay (dpy);
+    GetReq (XineramaQueryScreens, req);
+    req->reqType = info->codes->major_opcode;
+    req->panoramiXReqType = X_XineramaQueryScreens;
+    if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) {
+       UnlockDisplay (dpy);
+       SyncHandle ();
+       return NULL;
+    }
+
+    if(rep.number) {
+       if((scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number))) {
+           xXineramaScreenInfo scratch;
+           int i;
+
+           for(i = 0; i < rep.number; i++) {
+               _XRead(dpy, (char*)(&scratch), sz_XineramaScreenInfo);
+               scrnInfo[i].screen_number = i;
+               scrnInfo[i].x_org         = scratch.x_org;
+               scrnInfo[i].y_org         = scratch.y_org;
+               scrnInfo[i].width         = scratch.width;
+               scrnInfo[i].height        = scratch.height;
+           }
+
+           *number = rep.number;
+       } else
+           _XEatData(dpy, rep.length << 2);
+    } else {
+       *number = 0;
+    }
+
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    return scrnInfo;
+}
diff --git a/xinerama.pc.in b/xinerama.pc.in
new file mode 100644 (file)
index 0000000..a2ffe1b
--- /dev/null
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: Xinerama
+Description: The Xinerama Library
+Version: @PACKAGE_VERSION@
+Requires: xineramaproto
+Requires.private: x11 xext
+Cflags: -I${includedir}
+Libs: -L${libdir} -lXinerama