pax_global_header00006660000000000000000000000064121517672070014522gustar00rootroot0000000000000052 comment=6e1d1dc328ba8162bba2f4694e7f3c706a1491ff libXinerama-1.1.3/000075500000000000000000000000001215176720700137555ustar00rootroot00000000000000libXinerama-1.1.3/.gitignore000064400000000000000000000017541215176720700157540ustar00rootroot00000000000000# # X.Org module default exclusion patterns # The next section if for module specific patterns # # Do not edit the following section # GNU Build System (Autotools) aclocal.m4 autom4te.cache/ autoscan.log ChangeLog compile config.guess config.h config.h.in config.log config-ml.in config.py config.status config.status.lineno config.sub configure configure.scan depcomp .deps/ INSTALL install-sh .libs/ libtool libtool.m4 ltmain.sh lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 Makefile Makefile.in mdate-sh missing mkinstalldirs *.pc py-compile stamp-h? symlink-tree texinfo.tex ylwrap # Do not edit the following section # Edit Compile Debug Document Distribute *~ *.[0-9] *.[0-9]x *.bak *.bin core *.dll *.exe *-ISO*.bdf *-JIS*.bdf *-KOI8*.bdf *.kld *.ko *.ko.cmd *.lai *.l[oa] *.[oa] *.obj *.patch *.so *.pcf.gz *.pdb *.tar.bz2 *.tar.gz # # Add & Override patterns for libXinerama # # Edit the following section as needed # For example, !report.pc overrides *.pc. See 'man gitignore' # libXinerama-1.1.3/COPYING000064400000000000000000000067771215176720700150310ustar00rootroot00000000000000Copyright (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. libXinerama-1.1.3/Makefile.am000064400000000000000000000026241215176720700160150ustar00rootroot00000000000000# # 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 libXinerama-1.1.3/README000064400000000000000000000012701215176720700146350ustar00rootroot00000000000000libXinerama - 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 libXinerama-1.1.3/autogen.sh000075500000000000000000000003211215176720700157520ustar00rootroot00000000000000#! /bin/sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? if test -z "$NOCONFIGURE"; then $srcdir/configure "$@" fi libXinerama-1.1.3/configure.ac000064400000000000000000000042431215176720700162460ustar00rootroot00000000000000# 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.3], [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]) # 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]) # Check for _XEatDataWords function that may be patched into older Xlib releases SAVE_LIBS="$LIBS" LIBS="$XINERAMA_LIBS" AC_CHECK_FUNCS([_XEatDataWords]) LIBS="$SAVE_LIBS" # 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 libXinerama-1.1.3/include/000075500000000000000000000000001215176720700154005ustar00rootroot00000000000000libXinerama-1.1.3/include/X11/000075500000000000000000000000001215176720700157515ustar00rootroot00000000000000libXinerama-1.1.3/include/X11/extensions/000075500000000000000000000000001215176720700201505ustar00rootroot00000000000000libXinerama-1.1.3/include/X11/extensions/Xinerama.h000064400000000000000000000036541215176720700220750ustar00rootroot00000000000000/* 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 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 */ libXinerama-1.1.3/include/X11/extensions/panoramiXext.h000064400000000000000000000055151215176720700230060ustar00rootroot00000000000000/***************************************************************** 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 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 */ libXinerama-1.1.3/man/000075500000000000000000000000001215176720700145305ustar00rootroot00000000000000libXinerama-1.1.3/man/Makefile.am000064400000000000000000000032041215176720700165630ustar00rootroot00000000000000# # 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) < $< > $@ libXinerama-1.1.3/man/Xinerama.man000064400000000000000000000110311215176720700167650ustar00rootroot00000000000000.\" .\" 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 .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. libXinerama-1.1.3/man/XineramaIsActive.man000064400000000000000000000000621215176720700204170ustar00rootroot00000000000000.so man__libmansuffix__/Xinerama.__libmansuffix__ libXinerama-1.1.3/man/XineramaQueryExtension.man000064400000000000000000000000621215176720700217120ustar00rootroot00000000000000.so man__libmansuffix__/Xinerama.__libmansuffix__ libXinerama-1.1.3/man/XineramaQueryScreens.man000064400000000000000000000000621215176720700213400ustar00rootroot00000000000000.so man__libmansuffix__/Xinerama.__libmansuffix__ libXinerama-1.1.3/man/XineramaQueryVersion.man000064400000000000000000000000621215176720700213630ustar00rootroot00000000000000.so man__libmansuffix__/Xinerama.__libmansuffix__ libXinerama-1.1.3/src/000075500000000000000000000000001215176720700145445ustar00rootroot00000000000000libXinerama-1.1.3/src/Makefile.am000064400000000000000000000014711215176720700166030ustar00rootroot00000000000000AM_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 libXinerama-1.1.3/src/Xinerama.c000064400000000000000000000236741215176720700164700ustar00rootroot00000000000000/***************************************************************** 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. ******************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #ifndef HAVE__XEATDATAWORDS #include /* for LONG64 on 64-bit platforms */ #include static inline void _XEatDataWords(Display *dpy, unsigned long n) { # ifndef LONG64 if (n >= (ULONG_MAX >> 2)) _XIOError(dpy); # endif _XEatData (dpy, n << 2); } #endif 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; } /* * rep.number is a CARD32 so could be as large as 2^32 * The X11 protocol limits the total screen size to 64k x 64k, * and no screen can be smaller than a pixel. While technically * that means we could theoretically reach 2^32 screens, and that's * not even taking overlap into account, Xorg is currently limited * to 16 screens, and few known servers have a much higher limit, * so 1024 seems more than enough to prevent both integer overflow * and insane X server responses causing massive memory allocation. */ if ((rep.number > 0) && (rep.number <= 1024)) scrnInfo = Xmalloc(sizeof(XineramaScreenInfo) * rep.number); if (scrnInfo != NULL) { int i; for (i = 0; i < rep.number; i++) { xXineramaScreenInfo scratch; _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 { _XEatDataWords(dpy, rep.length); *number = 0; } UnlockDisplay (dpy); SyncHandle (); return scrnInfo; } libXinerama-1.1.3/xinerama.pc.in000064400000000000000000000004071215176720700165130ustar00rootroot00000000000000prefix=@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