--- a/open-src/common/pc-files/build_32/xext.pc Wed Mar 12 13:22:28 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-prefix=/usr/openwin
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
-
-Name: Xext
-Description: Misc X Extension Library
-Version: 0.0
-Requires: xextproto
-Requires.private: x11 xau
-Cflags: -I${includedir}
-Libs: -L${libdir} -R${libdir} -lXext
--- a/open-src/common/pc-files/build_64/xext.pc Wed Mar 12 13:22:28 2008 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-prefix=/usr/openwin
-exec_prefix=${prefix}
-libdir=${exec_prefix}/lib/64
-includedir=${prefix}/include
-
-Name: Xext
-Description: Misc X Extension Library
-Version: 0.0
-Requires: xextproto
-Requires.private: x11 xau
-Cflags: -I${includedir}
-Libs: -L${libdir} -R${libdir} -lXext
--- a/open-src/lib/Makefile Wed Mar 12 13:22:28 2008 -0700
+++ b/open-src/lib/Makefile Wed Mar 12 17:08:43 2008 -0700
@@ -28,7 +28,7 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
-# @(#)Makefile 1.16 08/03/06
+# @(#)Makefile 1.17 08/03/12
#
###############################################################################
@@ -51,6 +51,7 @@
libXau \
libXdmcp \
libX11 \
+ libXext \
libfontenc \
libICE \
libSM \
@@ -63,6 +64,7 @@
libXrender \
libXdamage \
libXcursor \
+ libXevie \
libXfont \
libXft \
libXi \
@@ -71,6 +73,7 @@
libxkbui \
libXrandr \
libXres \
+ libXScrnSaver \
libXtst \
libXv \
libXvMC \
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXScrnSaver/Makefile Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,60 @@
+###############################################################################
+#
+# libXScrnSaver 1.x Makefile
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# 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, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# 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
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# @(#)Makefile 1.1 08/03/12
+#
+
+# Package name used in tarballs
+LIB_MODULE=libXScrnSaver
+
+# Version number (used in path names)
+LIB_VERS=1.1.2
+
+# Patches to apply to source after unpacking, in order
+SOURCE_PATCHES =
+
+# Library name (used for specfiles/mapfiles)
+LIBNAME=Xss
+
+# Man pages to apply Sun footer to & attributes to list
+SUNTOUCHED_MANPAGES=man/*.man
+SUN_PACKAGE=SUNWxwplt
+LIB_STABILITY=Committed
+LIB_MAN_SUFFIX=3Xss
+
+# Library built in tree
+LIB_BUILT=$(SOURCE_DIR)/src/.libs/libXss.so.1.0.0
+
+# pkg-config files that need to have -R added
+FIX_PC_FILES=xscrnsaver.pc.in
+
+include ../Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXevie/Makefile Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,63 @@
+###############################################################################
+#
+# Xevie 1.x Makefile
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# 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, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# 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
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# @(#)Makefile 1.1 08/03/12
+#
+
+# Package name used in tarballs
+LIB_MODULE=libXevie
+
+# Version number (used in path names)
+LIB_VERS=1.0.2
+
+# Patches to apply to source after unpacking, in order
+SOURCE_PATCHES =
+
+# Library name (used for specfiles/mapfiles)
+LIBNAME=Xevie
+
+# Man pages to apply Sun footer to & attributes to list
+SUNTOUCHED_MANPAGES=man/*.man
+SUN_PACKAGE=SUNWxwplt
+LIB_STABILITY=Volatile
+LIB_MAN_SUFFIX=3Xevie
+
+# Library built in tree
+LIB_BUILT=$(SOURCE_DIR)/src/.libs/libXevie.so.1.0.0
+
+# pkg-config files that need to have -R added
+FIX_PC_FILES=xevie.pc.in
+
+# Link with version mapfile
+LIB_ADD_LD_OPTIONS = -M $(PWD)/mapfile-vers
+
+include ../Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXevie/mapfile-vers Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,40 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# 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
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+
+SUNW_1.1 {
+ global:
+ XevieQueryVersion;
+ XevieStart;
+ XevieEnd;
+ XevieSendEvent;
+ XevieSelectInput;
+ local:
+ *;
+};
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/Makefile Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,91 @@
+###############################################################################
+#
+# Xext 1.x Makefile
+#
+# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# 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, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# 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
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+# @(#)Makefile 1.1 08/03/12
+#
+
+# Package name used in tarballs
+LIB_MODULE=libXext
+
+# Version number (used in path names)
+LIB_VERS=1.0.4
+
+# Patches to apply to source after unpacking, in order
+SOURCE_PATCHES = \
+ shm.patch \
+ sun-exts.patch
+
+# Library name (used for specfiles/mapfiles)
+LIBNAME=Xext
+
+# Man pages to apply Sun footer to & attributes to list
+SUNTOUCHED_MANPAGES=man/*.man
+SUN_PACKAGE=SUNWxwplt
+LIB_STABILITY=Committed
+LIB_MAN_SUFFIX=3Xext
+
+# Library built in tree
+LIB_BUILT=$(SOURCE_DIR)/src/.libs/libXext.so.0
+
+# pkg-config files that need to have -R added
+FIX_PC_FILES=xext.pc.in
+
+# Command line options to GNU autoconf configure script
+LIB_ADD_CONFIG_OPTS = --with-lint --enable-lint-library
+
+# Enable Solaris-specific code
+LIB_ADD_CPPFLAGS = -DSUNSOFT
+
+# Link with version mapfile and libraries that contain sources that used
+# to be in libXext
+LIB_ADD_LD_OPTIONS = -M $(PWD)/mapfile-vers
+
+# Regenerate Makefile.in's from Makefile.am's after patching them
+AUTORECONF=true
+
+### Rules specific to this directory:
+
+# Merge in additional sources from sun-src directory
+add-sun-src:: $(LNDIR)
+ mkdir -p $(SOURCE_DIR)
+ (cd $(SOURCE_DIR) && $(LNDIR) ../../sun-src)
+
+source_gen:: add-sun-src
+
+DESTDIR=$(PROTODIR)
+INSTDIR=$(DESTDIR)$(X11_INCLUDES_DIR)/X11/extensions
+
+install_gen::
+ mkdir -p $(INSTDIR)
+ cp -pf sun-src/include/X11/extensions/*.h $(INSTDIR)/
+
+include ../Makefile.inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/mapfile-vers Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,272 @@
+#
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# 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, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# 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
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL EXTS, OR ANY EXTS 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.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+
+SUNW_1.1 {
+ global:
+
+# AllPlanes.c
+ XAllPlanesQueryExtension;
+ XAllPlanesQueryVersion;
+ XAllPlanesDrawLines;
+ XAllPlanesDrawPoints;
+ XAllPlanesDrawRectangles;
+ XAllPlanesDrawSegments;
+ XAllPlanesFillRectangles;
+
+# DPMS.c
+ DPMSQueryExtension;
+ DPMSGetVersion;
+ DPMSCapable;
+ DPMSSetTimeouts;
+ DPMSGetTimeouts;
+ DPMSEnable;
+ DPMSDisable;
+ DPMSForceLevel;
+ DPMSInfo;
+
+# FBPM.c
+ FBPMQueryExtension;
+ FBPMGetVersion;
+ FBPMCapable;
+ FBPMDisable;
+ FBPMEnable;
+ FBPMForceLevel;
+ FBPMInfo;
+
+# MITMisc.c
+ XMITMiscQueryExtension;
+ XMITMiscSetBugMode;
+ XMITMiscGetBugMode;
+
+# TransOvl.c
+ XSolarisOvlQueryExtension;
+ XSolarisOvlQueryVersion;
+ XSolarisOvlCreateWindow;
+ XSolarisOvlCopyAreaAndPaintType;
+ XSolarisOvlCopyPaintType;
+ XSolarisOvlGetPaintType;
+ XSolarisOvlIsOverlayWindow;
+ XSolarisOvlSelectPair;
+ XSolarisOvlSelectPartner;
+ XSolarisOvlSetPaintType;
+ XSolarisOvlSetWindowTransparent;
+
+# XAppgroup.c
+ XagQueryVersion;
+ XagCreateEmbeddedApplicationGroup;
+ XagCreateNonembeddedApplicationGroup;
+ XagDestroyApplicationGroup;
+ XagGetApplicationGroupAttributes;
+ XagQueryApplicationGroup;
+ XagCreateAssociation;
+ XagDestroyAssociation;
+
+# XEVI.c
+ XeviQueryExtension;
+ XeviQueryVersion;
+ XeviGetVisualInfo;
+
+# XGrabWin.c
+ XGetRetainedPath;
+ XGrabColormap;
+ XGrabRetainedWindow;
+ XGrabWindow;
+ XUnGrabColormap;
+ XUnGrabRetainedWindow;
+ XUnGrabWindow;
+
+# XLbx.c
+ XLbxQueryExtension;
+ XLbxGetEventBase;
+ XLbxQueryVersion;
+
+# XMultibuf.c
+ XmbufQueryExtension;
+ XmbufGetVersion;
+ XmbufCreateBuffers;
+ XmbufDestroyBuffers;
+ XmbufDisplayBuffers;
+ XmbufGetWindowAttributes;
+ XmbufChangeWindowAttributes;
+ XmbufGetBufferAttributes;
+ XmbufChangeBufferAttributes;
+ XmbufGetScreenInfo;
+ XmbufCreateStereoWindow;
+ XmbufClearBufferArea;
+
+# XPanoramiX.c
+ XPanoramiXQueryExtension;
+ XPanoramiXQueryVersion;
+ XPanoramiXAllocInfo;
+ XPanoramiXGetScreenCount;
+ XPanoramiXGetScreenSize;
+ XPanoramiXGetState;
+
+# XSecurity.c
+ XSecurityQueryExtension;
+ XSecurityAllocXauth;
+ XSecurityFreeXauth;
+ XSecurityGenerateAuthorization;
+ XSecurityRevokeAuthorization;
+
+# XShape.c
+ XShapeQueryExtension;
+ XShapeQueryVersion;
+ XShapeCombineRegion;
+ XShapeCombineRectangles;
+ XShapeCombineMask;
+ XShapeCombineShape;
+ XShapeOffsetShape;
+ XShapeQueryExtents;
+ XShapeSelectInput;
+ XShapeInputSelected;
+ XShapeGetRectangles;
+
+# XShm.c
+ XShmQueryExtension;
+ XShmGetEventBase;
+ XShmQueryVersion;
+ XShmPixmapFormat;
+ XShmAttach;
+ XShmDetach;
+ XShmCreateImage;
+ XShmPutImage;
+ XShmGetImage;
+ XShmCreatePixmap;
+
+# XSync.c
+ XSyncQueryExtension;
+ XSyncInitialize;
+ XSyncListSystemCounters;
+ XSyncFreeSystemCounterList;
+ XSyncCreateCounter;
+ XSyncSetCounter;
+ XSyncChangeCounter;
+ XSyncDestroyCounter;
+ XSyncQueryCounter;
+ XSyncAwait;
+ XSyncCreateAlarm;
+ XSyncDestroyAlarm;
+ XSyncQueryAlarm;
+ XSyncChangeAlarm;
+ XSyncSetPriority;
+ XSyncGetPriority;
+ XSyncIntToValue;
+ XSyncIntsToValue;
+ XSyncValueGreaterThan;
+ XSyncValueLessThan;
+ XSyncValueGreaterOrEqual;
+ XSyncValueLessOrEqual;
+ XSyncValueEqual;
+ XSyncValueIsNegative;
+ XSyncValueIsZero;
+ XSyncValueIsPositive;
+ XSyncValueLow32;
+ XSyncValueHigh32;
+ XSyncValueAdd;
+ XSyncValueSubtract;
+ XSyncMaxValue;
+ XSyncMinValue;
+
+# XTestExt1.c
+ XTestFakeInput;
+ XTestGetInput;
+ XTestStopInput;
+ XTestReset;
+ XTestQueryInputSize;
+ XTestPressKey;
+ XTestPressButton;
+ XTestMovePointer;
+ XTestFlush;
+
+# Xcup.c
+ XcupQueryVersion;
+ XcupGetReservedColormapEntries;
+ XcupStoreColors;
+
+# Xdbe.c
+ XdbeQueryExtension;
+ XdbeAllocateBackBufferName;
+ XdbeDeallocateBackBufferName;
+ XdbeSwapBuffers;
+ XdbeBeginIdiom;
+ XdbeEndIdiom;
+ XdbeGetVisualInfo;
+ XdbeFreeVisualInfo;
+ XdbeGetBackBufferAttributes;
+
+# Xevie extension moved to libXevie:
+ XevieQueryVersion = FUNCTION FILTER libXevie.so.1;
+ XevieStart = FUNCTION FILTER libXevie.so.1;
+ XevieSelectInput = FUNCTION FILTER libXevie.so.1;
+ XevieSendEvent = FUNCTION FILTER libXevie.so.1;
+ XevieEnd = FUNCTION FILTER libXevie.so.1;
+
+# XScreenSaver extesion moved to libXss:
+ XScreenSaverQueryInfo = FUNCTION FILTER libXss.so.1;
+ XScreenSaverQueryVersion = FUNCTION FILTER libXss.so.1;
+ XScreenSaverQueryExtension = FUNCTION FILTER libXss.so.1;
+ XScreenSaverGetRegistered = FUNCTION FILTER libXss.so.1;
+ XScreenSaverSetAttributes = FUNCTION FILTER libXss.so.1;
+ XScreenSaverSelectInput = FUNCTION FILTER libXss.so.1;
+ XScreenSaverRegister = FUNCTION FILTER libXss.so.1;
+ XScreenSaverUnsetAttributes = FUNCTION FILTER libXss.so.1;
+ XScreenSaverUnregister = FUNCTION FILTER libXss.so.1;
+ XScreenSaverAllocInfo = FUNCTION FILTER libXss.so.1;
+
+ local:
+ *;
+};
+
+SUNWprivate {
+ global:
+
+# SolarisIA extension moved to libX11:
+ XSolarisIAQueryExtension = FUNCTION FILTER libX11.so.4;
+ XSolarisIAQueryVersion = FUNCTION FILTER libX11.so.4;
+ XSolarisIASetProcessInfo = FUNCTION FILTER libX11.so.4;
+ XSolarisIAGetProcessInfo = FUNCTION FILTER libX11.so.4;
+
+# XPanoramix.c
+ XGetXineramaInfo;
+ XineramaGetInfo;
+ XineramaGetState;
+ XineramaGetCenterHint;
+
+# extutil.c
+ XextCreateExtension;
+ XextDestroyExtension;
+ XextAddDisplay;
+ XextFindDisplay;
+ XextRemoveDisplay;
+ XSetExtensionErrorHandler;
+ XMissingExtension;
+};
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/shm.patch Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,125 @@
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+# Use subject to license terms.
+#
+# 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, and/or sell copies of the Software, and to permit persons
+# to whom the Software is furnished to do so, provided that the above
+# copyright notice(s) and this permission notice appear in all copies of
+# the Software and that both the above copyright notice(s) and this
+# permission notice appear in supporting documentation.
+#
+# 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
+# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+# INDIRECT OR CONSEQUENTIAL EXTS, OR ANY EXTS 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.
+#
+# Except as contained in this notice, the name of a copyright holder
+# shall not be used in advertising or otherwise to promote the sale, use
+# or other dealings in this Software without prior written authorization
+# of the copyright holder.
+#
+
+diff -urp -x '*~' -x '*.orig' src/XShm.c src/XShm.c
+--- src/XShm.c 2006-07-11 11:05:14.000000000 -0700
++++ src/XShm.c 2007-12-04 17:30:36.150780000 -0800
+@@ -43,6 +43,13 @@ in this Software without prior written a
+ #include <X11/extensions/Xext.h>
+ #include <X11/extensions/extutil.h>
+
++#ifdef SUNSOFT
++#include <fcntl.h>
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <ucred.h>
++#endif
++
+ static XExtensionInfo _shm_info_data;
+ static XExtensionInfo *shm_info = &_shm_info_data;
+ static /* const */ char *shm_extension_name = SHMNAME;
+@@ -140,6 +144,46 @@ event_to_wire (Display *dpy, XEvent *re,
+ return False;
+ }
+
++#ifdef SUNSOFT
++/*
++ * Function to determine if a connection is local or not.
++ * Returns: 0 for remote, 1 for local
++ */
++
++static int
++LocalConnection(Display *dpy)
++{
++ int c = ConnectionNumber(dpy);
++ int rv = 0;
++ struct stat statbuf;
++ ucred_t *ucred = NULL;
++
++ if (c >= 0) {
++ /*
++ * First stat the connection fd. If we succeed and the type of file
++ * is a FIFO, then we must be local.
++ */
++ if ((fstat(c, &statbuf) >= 0) && S_ISFIFO(statbuf.st_mode)) {
++ return 1;
++ }
++
++ /*
++ * Then call getpeerucred - if it succeeds, the other end of the
++ * connection must be on the same machine (though possibly in a
++ * different zone).
++ */
++ if (getpeerucred(c, &ucred) == 0) {
++ if (ucred_getzoneid(ucred) != -1) {
++ rv = 1;
++ }
++ ucred_free(ucred);
++ }
++ }
++
++ return rv;
++}
++#endif /* SUNSOFT */
++
+ /*****************************************************************************
+ * *
+ * public Shared Memory Extension routines *
+@@ -149,6 +192,15 @@ event_to_wire (Display *dpy, XEvent *re,
+ Bool XShmQueryExtension (Display *dpy /* int *event_basep, *error_basep */)
+ {
+ XExtDisplayInfo *info = find_display (dpy);
++#ifdef SUNSOFT
++ /*
++ * Sun Mod -- if we're dealing with a remote connection, then the
++ * shared memory extension is not valid. Sigh -- this should really
++ * be in the server somewhere... Required for pipe transport PIPECONN
++ */
++ if(!LocalConnection(dpy))
++ return False;
++#endif /* SUNSOFT */
+
+ if (XextHasExtension(info)) {
+ /* *event_basep = info->codes->first_event;
+@@ -181,6 +233,15 @@ Bool XShmQueryVersion(
+ XExtDisplayInfo *info = find_display (dpy);
+ xShmQueryVersionReply rep;
+ register xShmQueryVersionReq *req;
++#ifdef SUNSOFT
++ /*
++ * Sun Mod -- if we're dealing with a remote connection, then the
++ * shared memory extension is not valid. Sigh -- this should really
++ * be in the server somewhere...
++ */
++ if(!LocalConnection(dpy))
++ return False;
++#endif /* SUNSOFT */
+
+ ShmCheckExtension (dpy, info, False);
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-exts.patch Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,33 @@
+--- man/Makefile.am 2006-10-24 17:06:07.000000000 -0700
++++ man/Makefile.am 2008-03-12 14:45:59.307182000 -0700
+@@ -3,6 +3,16 @@
+ LIB_MAN_DIR_SUFFIX = $(LIB_MAN_DIR:@mandir@/man%=%)
+
+ libman_PRE = \
++ XReadScreen.man \
++ XSolarisOvlCopyAreaAndPaintType.man \
++ XSolarisOvlCopyPaintType.man \
++ XSolarisOvlCreateWindow.man \
++ XSolarisOvlGetPaintType.man \
++ XSolarisOvlIsOverlayWindow.man \
++ XSolarisOvlSelectPair.man \
++ XSolarisOvlSelectPartner.man \
++ XSolarisOvlSetPaintType.man \
++ XSolarisOvlSetWindowTransparent.man \
+ DBE.man \
+ DPMSCapable.man \
+ DPMSDisable.man \
+--- src/Makefile.am 2006-07-11 11:05:14.000000000 -0700
++++ src/Makefile.am 2007-12-04 18:44:47.118475000 -0800
+@@ -20,6 +20,11 @@
+ XTestExt1.c \
+ Xcup.c \
+ Xdbe.c \
++ AllPlanes.c \
++ FBPM.c \
++ TransOvl.c \
++ XGrabWin.c \
++ XPanoramiX.c \
+ extutil.c \
+ globals.c
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/include/X11/extensions/xinerama.h Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,44 @@
+/* Copyright 2000 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * 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
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+/* Xinerama header file */
+
+#ifndef _XINERAMA_H_
+#define _XINERAMA_H_
+
+#define MAXFRAMEBUFFERS 16
+#define XINERAMA_PLACE_TOP 1
+#define XINERAMA_PLACE_BOTTOM 2
+#define XINERAMA_PLACE_RIGHT 4
+#define XINERAMA_PLACE_LEFT 8
+
+Bool XineramaGetState(Display*, int);
+Status XineramaGetInfo(Display*, int, XRectangle*, unsigned char*, int*);
+Status XineramaGetCenterHint(Display*, int, int*, int*);
+
+#endif /* _XINERAMA_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XReadScreen.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,150 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XReadScreen __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XReadScreen" "" "\f3XReadScreen\f1(3) \(em returns the displayed colors in a rectangle of the screen.
+.SH NAME
+XReadScreen \- returns the displayed colors in a rectangle of the screen
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3XImage *\f1
+.B XReadScreen
+.B (Display
+.I *display,
+.B Window
+.I w,
+.B int
+.I x,
+.B int
+.I y,
+.B unsigned int
+.I width,
+.B unsigned int
+.I height,
+.B Bool
+.I includeCursor)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I w
+Specifies the window from whose screen the data is read.
+.TP
+.I x, y
+Specify the X and Y coordinates of the upper-left corner
+of the rectangle relative to the origin of the window
+.I w.
+.TP
+.I width, height
+Specify the width and height of the rectangle.
+.TP
+.I includeCursor
+Specifies whether the cursor image is to be included in the colors returned.
+.SH DESCRIPTION
+This routine provides access to the colors displayed on the screen of the given
+window. On some types of advanced display devices, the displayed colors can be
+a composite of the data contained in several different frame stores and these
+frame stores can be of different depth and visual types.
+.LP
+In addition, there can be overlay/underlay window pairs in which part of the
+underlay is visible beneath the overlay. Because the data returned by
+.B XGetImage
+is undefined for portions of the rectangle that have different depths,
+.B XGetImage
+is inadequate to return a picture of the what user is actually seeing on the
+screen. In addition,
+.B XGetImage
+cannot composite pixel information for an overlay/underlay window pair because
+the pixel information lies in different drawables.
+.B XReadScreen
+addresses these problems.
+.LP
+Rather than returning pixel information,
+.B XReadScreen
+returns color information-the actual displayed colors visible on the screen.
+It returns the color information from any window within the boundaries of the
+specified rectangle. Unlike
+.B XGetImage,
+the returned contents of visible regions of inferior or overlapping windows of
+a different depth than the specified window's depth are not undefined.
+Instead, the actual displayed colors for these windows is returned.
+.LP
+\f3Note:\f1 The colors returned are the ones that would be displayed if an
+unlimited number of hardware color LUTs were available on the screen. Thus, the
+colors returned are the theoretical display colors. If colormap flashing is
+present on the screen because there aren't enough hardware color LUTs to
+display all of the software colormaps simultaneously, the returned colors may
+be different from the colors that are actually displayed.
+.LP
+If
+.I w
+is an overlay window, the overlay color information is returned everywhere
+there is opaque paint in the specified rectangle. The color information of
+the underlay is returned everywhere there is transparent paint in the overlay.
+In general, since this underlay can be an overlay window containing transparent
+paint, the color information for a coordinate (x, y) which contains transparent
+paint is the youngest non-inferior that has opaque paint at (x, y).
+.LP
+The color data is returned as an
+.B XImage.
+The returned image has the same width and height as the arguments specified.
+The format of the image is
+.B ZPixmap.
+The depth of the image is 24 and the bits_per_pixel is 32.
+The most significant 8 bits of color information for each color channel
+(red, green blue) will be returned in the bit positions defined by
+.I red_mask,
+.I green_mask,
+and
+.I blue_mask
+in the
+.B XImage.
+The values of the following attributes of the
+.B XImage
+are server dependent:
+.I byte_order, bitmap_unit,
+.I bitmap_bit_order,
+.I bitmap_pad,
+.I bytes_per_line,
+.I red_mask,
+.I green_mask,
+.I blue_mask.
+.LP
+If
+.I includeCursor
+is
+.SB True,
+the cursor image is included in the returned colors. Otherwise, it is excluded.
+.LP
+Note that the borders of the argument window (and other windows) can be included
+and read with this request.
+.LP
+If a problem occurs,
+.B XReadScreen
+returns NULL.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlCopyAreaAndPaintType.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,350 @@
+'\" t
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlCopyAreaAndPaintType __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlCopyAreaAndPaintType" "" "\f3XSolarisOvlCopyAreaAndPaintType\f1(3) \(em copies the given area and paint type data
+.SH NAME
+XSolarisOvlCopyAreaAndPaintType \- copies the given area and paint type data
+from one pair of drawables to another
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3void\f1 5n
+.B XSolarisOvlCopyPaintType
+.B (Display
+.I *display,
+.B Drawable
+.I colorsrc,
+.B Drawable
+.I painttypesrc,
+.B Drawable
+.I colordst,
+.B Drawable
+.I painttypedst,
+.B GC
+.I colorgc,
+.B GC
+.I painttypegc,
+.B int
+.I colorsrc_x,
+.B int
+.I colorsrc_y,
+.B int
+.I painttypesrc_x,
+.B int
+.I painttypesrc_y,
+.B unsigned
+.I int width,
+.B unsigned
+.I int height,
+.B int
+.I colordst_x,
+.B int
+.I colordst_y,
+.B int
+.I painttypedst_x,
+.B int
+.I painttypedst_y,
+.B unsigned long
+.I action,
+.B unsigned long
+.I plane)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I colorsrc
+The color information source drawable.
+.TP
+.I painttypesrc
+The paint type information source drawable.
+.TP
+.I colordst
+The color information destination drawable.
+.TP
+.I painttypedst
+The paint type information destination drawable.
+If
+.I colordst
+is an overlay, this drawable will be ignored.
+.TP
+.I colorgc
+The GC to use for the color information copy.
+.TP
+.I painttypegc
+The GC to use to fill areas in painttypedst. If
+.I colordst/painttypedst
+is an overlay, this GC will be ignored.
+.TP
+.I colorsrc_x, colorsrc_y
+The X and Y coordinates of the upper-left corner of the source rectangle
+for color information relative to the origin of the color source drawable.
+.TP
+.I painttypesrc_x, painttypesrc_y
+The X and Y coordinates of the upper-left corner of the source rectangle
+for paint type information relative to the origin of the paint type source
+drawable.
+.TP
+.I width, height
+The dimensions in pixels of all the source and destination rectangles.
+.TP
+.I colordst_x, colordst_y
+The X and Y coordinates of the upper-left corner of the destination
+rectangle for color information relative to the origin of the color
+destination drawable.
+.TP
+.I painttypedst_x, painttypedst_y
+The X and Y coordinates of the upper-left corner of the destination
+rectangle for paint type information relative to the origin of the
+paint type destination drawable. If
+.I colordst/painttypedst
+is an overlay,
+.I colordst_x
+and
+.I colordst_y
+will be used.
+.TP
+.I action
+Specifies which paint type data is to be copied. This can be one of
+.B XSolarisOvlCopyOpaque,
+.B XSolarisOvlCopyTransparent,
+or
+.B XSolarisOvlCopyAll.
+.TP
+.I plane
+Specifies the source bit-plane in
+.I painttypesrc
+to be used as paint type information when
+.I painttypesrc
+is not an overlay.
+.SH DESCRIPTION
+This routine copies the specified area of
+.I colorsrc
+to the specified area of
+.I colordst.
+If
+.I colordst
+is not an overlay, it also fills the specified areas of
+.I painttypedst
+according to the paint type information specified in
+.I painttypesrc.
+.LP
+.I colorsrc
+can be any depth drawable or an overlay window.
+.I painttypesrc
+can be any drawable or an overlay window. If
+.I painttypesrc
+is not an overlay window, the bit-plane of
+.I painttypesrc
+specified in
+.I plane
+is treated as if it were paint type data and it is used for the copy.
+.I plane
+must have only one bit set in this case.
+.I colordst
+can be any drawable, but must be of the same depth and have the same root as
+.I colorsrc,
+otherwise
+.SB BadMatch
+is generated. If
+.I colordst
+is an overlay, then
+.I painttypedst
+is ignored, otherwise
+.I painttypedst
+can be any type of drawable.
+.LP
+The following table summarizes the possible combinations of sources and
+destinations and their respective actions. The left side of the table shows
+the possible
+.I colorsrc/painttypesrc
+combinations and the top of the table shows the possible
+.I colordst/painttypedst
+combinations. The actions, A1-A8, are explained below the table.
+An Impossible entry in the table indicates that the given combination is
+impossible since the
+.I painttypedst
+is ignored when the
+.I colordst
+is an overlay.
+.LP
+.TS
+center, box;
+lfB | lfB lfB lfB lfB
+lfB | lfB lfB lfB lfB
+l | l l l l .
+ Overlay/ Overlay/ Drawable/ Drawable/
+ Overlay Drawable Overlay Drawable
+_
+overlay/overlay A1 Impossible A5 A5
+overlay/drawable A2 Impossible A6 A6
+drawable/overlay A3 Impossible A7 A7
+drawable/drawable A4 Impossible A8 A8
+.TE
+.LP
+.HP
+A1\(emThe paint type information from
+.I painttypesrc
+is used as a mask to copy the color information from
+.I colorsrc
+to
+.I colordst.
+Opaque pixels in
+.I painttypesrc
+cause the corresponding pixel in
+.I colorsrc
+to be copied to
+.I colordst,
+transparent pixels cause the corresponding pixel in
+.I colordst
+to be made transparent. If a transparent pixel from
+.I colorsrc
+is copied to
+.I colordst,
+the actual color transferred will be undefined.
+.HP
+A2\(emSame as A1 except that the paint type information is extracted
+from the bit-plane of
+.I painttypesrc
+specified by
+.I plane.
+A bit value of 1 indicates an opaque pixel whereas a bit value of 0
+indicates transparent.
+.HP
+A3\(emSame as A1 except that a non-overlay drawable is used to obtain
+the color information so there will be no undefined colors due to
+transparent pixels.
+.HP
+A4\(emSame as A3 except that the paint type information is taken from
+the specified bit-plane of
+.I painttypesrc
+as in A2.
+.HP
+A5\(emThe paint type information from
+.I painttypesrc
+is used as a mask to copy the color information from
+.I colorsrc to
+.I colordst
+as in A1. In addition, the paint type information controls rendering to
+the
+.I painttypedst
+drawable as in
+.BR XSolarisOvlCopyPaintType (3) .
+.HP
+A6\(emSame as A5 except that the paint type information is taken from the
+specified bit-plane of
+.I painttypesrc
+as in A2.
+.HP
+A7\(emSame as A5 except that there will be no undefined colors due to
+transparent color source pixels.
+.HP
+A8\(emSame as A7 except that the paint type information is taken from the
+specified bit-plane of
+.I painttypesrc
+as in A2.
+.LP
+The
+.I action
+argument specifies whether opaque paint
+(\f3XSolarisOvlCopyOpaque\f1), transparent paint
+(\f3XSolarisOvlCopyTransparent\f1), or both
+(\f3XSolarisOvlCopyAll\f1) should be copied. This allows a client to
+accumulate opaque or transparent paint.
+.LP
+.I NoExpose
+and
+.I GraphicsExpose
+events are generated in the same manner as
+.BR XSolarisOvlCopyPaintType (3) .
+.LP
+If an overlay is used for the
+.I colordst
+argument, the
+.I painttypedst, painttypegc,
+.I painttypedst_x
+and
+.I painttypedst_y
+arguments will all be ignored. A NULL pointer can be used for
+.I painttypegc
+and a value of None can be used for
+.I painttypedst.
+The overlay will have the exact paint type defined by the pixels in the area
+specified in
+.I painttypesrc.
+The color information copy will not affect the destination paint type.
+.LP
+You can use
+.B XSolarisOvlCopyAreaAndPaintType
+to combine an image in the client's memory space (consisting of color and/or
+paint type information) with a rectangle of the specified overlay window.
+To do this, first move the image and paint type data into the server: use
+.B XPutImage
+to copy the data into 2 pixmaps of the appropriate depths.
+Then call
+.B XSolarisOvlCopyAreaAndPaintType
+with the color and paint type drawables to copy information to the overlay.
+.LP
+You can also use
+.B XSolarisOvlCopyAreaAndPaintType
+to retrieve pixel information (color and/or paint type information) from a
+specified drawable. To do this, call
+.B XSolarisOvlCopyAreaAndPaintType
+with two separable destination drawables. Then call
+.B XGetImage
+on each of the drawables, to get the data from the server into the client's
+memory space.
+.LP
+This function uses these GC components from colorgc: function, plane-mask,
+subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin, and clip-mask.
+If
+.I colordst
+is not an overlay then this function will use these GC components from
+.I painttypegc:
+function, plane-mask, fill-style, subwindow-mode, clip-x-origin, clip-y-origin,
+and clip-mask. In addition, it may also use these GC mode-dependent components:
+foreground, background, tile, stipple, tile-stipple-x-origin, and
+tile-stipple-y-origin.
+.LP
+.B XSolarisOvlCopyAreaAndPaintType
+can generate
+.SB BadDrawable,
+.SB BadGC,
+.SB BadMatch,
+and
+.SB BadValue
+errors.
+.SH ERRORS
+.LP
+.nf
+.SB BadDrawable
+.SB BadGC
+.SB BadMatch
+.SB BadValue
+.fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlCopyPaintType.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,208 @@
+'\" t
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlCopyPaintType __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlCopyPaintType" "" "\f3XSolarisOvlCopyPaintType\f1(3) \(em renders opaque and transparent paint
+.SH NAME
+XSolarisOvlCreateWindow \- renders opaque and transparent paint into the
+destination drawable based on the paint type attributes of the pixels in
+the source drawable
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3void\f1 5n
+.B XSolarisOvlCopyPaintType
+.B (Display
+.I *display,
+.B Drawable
+.I src,
+.B Drawable
+.I dst,
+.B GC
+.I gc,
+.B int
+.I src_x,
+.B int
+.I src_y,
+.B unsigned
+.I int width,
+.B unsigned
+.I int height,
+.B int
+.I dest_x,
+.B int
+.I dest_y,
+.B unsigned long
+.I action,
+.B unsigned long
+.I plane)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I src
+Specifies the source drawable from which to obtain the paint type information.
+.TP
+.I dst
+Specifies the destination drawable.
+.TP
+.I gc
+Specifies the GC.
+.TP
+.I src_x, src_y
+Specify the
+.I x
+and
+.I y
+coordinates of the upper-left corner of the source rectangle relative to
+the origin of the source drawable.
+.TP
+.I width, height
+Specify the width and height of both the source and destination rectangles.
+.TP
+.I dest_x, dest_y
+Specify the
+.I x
+and
+.I y
+coordinates of the upper-left corner of the destination rectangle relative
+to the origin of the destination drawable.
+.TP
+.I action
+Specifies which paint type data is to be copied. This can be one of
+.B XSolarisOvlCopyOpaque,
+.B XSolarisOvlCopyTransparent,
+or
+.B XSolarisOvlCopyAll.
+.TP
+.I plane
+Specifies the bit-plane of the
+.I src
+drawable to be used as paint type information when the source is not
+an overlay.
+.SH DESCRIPTION
+This routine uses the paint type information of the specified rectangle of
+.I src
+to control a fill operation in the specified rectangle of
+.I dst.
+.I src
+and
+.I dst
+can be any type of drawable. If
+.I src is an overlay, the paint type attribute of its pixels is used as the
+source of the copy, and the color information is ignored. If
+.I src
+is any other type of drawable, the bit-plane specified in
+.I plane
+is treated as if it were paint type data and it is used for the copy.
+.I plane
+must have only one bit set in this case. The following table summarizes
+the possible combinations of
+.I src
+and
+.I dst
+and their actions. The left side of the table shows the possible
+.I src
+combinations. The top of the table shows the possible
+.I dst
+combinations. The actions, A1-A4, are explained below the table.
+.LP
+.TS
+center, box;
+lfB | lfB lfB
+l | l l .
+Source/Destination Overlay Drawable
+_
+overlay A1 A2
+drawable A3 A4
+.TE
+.LP
+.HP
+A1\(emOpaque pixels in the source overlay cause the corresponding pixels in the
+destination to be filled with opaque color as specified by the fill
+attributes of the GC. Transparent pixels in the source cause the
+corresponding pixels in the destination to be filled with transparent paint.
+.HP
+A2\(emOpaque pixels in the source overlay cause the corresponding pixels in the
+destination to be filled according to the fill attributes of the GC.
+Transparent pixels in the source overlay cause the corresponding pixels in the
+destination to be filled according to the same fill attributes of the GC,
+but with the foreground and background pixels swapped.
+.HP
+A3\(emThe pixels in the destination overlay are filled with opaque paint or made
+transparent as in A1 above depending on the bit values of the source drawable's
+plane. Bit values of 1 in the source are treated as if they were opaque
+pixels and bit values of 0 are treated as if they were transparent.
+.HP
+A4\(emThe pixels in the destination drawable are filled with paint as in A2 above
+depending on the bit values of the source drawable's plane. Bit values of 1
+in the source bit plane are treated as if they were opaque pixels and bit
+values of 0 are treated as if they were transparent.
+.LP
+The
+.I action
+argument specifies whether opaque paint
+(\f3XSolarisOvlCopyOpaque\f1), transparent paint
+(\f3XSolarisOvlCopyTransparent\f1), or both
+(\f3XSolarisOvlCopyAll\f1) should be operated upon. This allows a client
+to accumulate opaque or transparent paint.
+.LP
+.I src
+and
+.I dst
+must have the same screen, or a
+.SB BadMatch
+error results.
+.LP
+If portions of the source rectangle are obscured or are outside the
+boundaries of the source drawable, the server generates exposure events,
+using the same semantics as
+.B XCopyArea.
+.LP
+This routine uses these GC components: function, plane-mask, fill-style,
+subwindow-mode, graphics-exposures, clip-x-origin, clip-y-origin, and clip-mask.
+It might use these GC mode-dependent components: foreground, background, tile,
+stipple, tile-stipple-x-origin, tile-stipple-y-origin.
+.LP
+.B XSolarisOvlCopyPaintType
+can generate
+.SB BadDrawable,
+.SB BadGC,
+.SB BadMatch,
+and
+.SB BadValue
+errors.
+.SH ERRORS
+.LP
+.nf
+.SB BadDrawable
+.SB BadGC
+.SB BadMatch
+.SB BadValue
+.fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlCreateWindow.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,105 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlCreateWindow __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlCreateWindow" "" "\f3XSolarisOvlCreateWindow\f1(3) \(em creates an overlay window" ""
+.SH NAME
+XSolarisOvlCreateWindow \- creates an overlay window
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3Window\f1 9n
+.B XSolarisOvlCreateWindow
+.B (Display
+.I *display,
+.B Window
+.I parent,
+.B int
+.I x,
+.B int
+.I y,
+.B unsigned
+.I int width,
+.B unsigned
+.I int height,
+.B unsigned
+.I int border_width,
+.B int
+.I depth,
+.B unsigned
+.I int class,
+.B Visual
+.I *visual,
+.B unsigned long
+.I valuemask,
+.B XSetWindowAttributes
+.I *attr)
+.SH Arguments
+The arguments for this routine are exactly the same as
+XCreateWindow.
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I parent
+Specifies the parent window.
+.TP
+.I x, y
+Specifies the coordinates of the upper-left pixel of this window,
+relative to the parent window.
+.TP
+.I width, height
+Specifies the width and height, in pixels, of the window.
+.TP
+.I border_width
+Specifies the width, in pixels, of the window's borders.
+.TP
+.I depth
+Specifies the depth of the window.
+.TP
+.I class
+Specifies the class of the window. If it is not
+.B InputOutput,
+the window will not be an overlay window.
+.TP
+.I visual
+Specifies a pointer to the visual structure for this window.
+.TP
+.I valuemask
+Specifies which window attributes are defined in the attr argument.
+.TP
+.I attr
+Specifies the attributes of the window.
+.SH DESCRIPTION
+This routine creates an overlay window with the given characteristics.
+It behaves exactly as its counterpart
+.B XCreateWindow,
+except the newly created window can be rendered into with both opaque
+and transparent paint, and the background is transparent.
+.SH SEE ALSO
+.LP
+.BR XCreateWindow (3)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlGetPaintType.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,65 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlGetPaintType __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlGetPaintType" "" "\f3XSolarisOvlGetPaintType\f1(3) \(em gets the current paint type set in the GC.
+.SH NAME
+XSolarisOvlGetPaintType \- gets the current paint type set in the GC
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3XSolarisOvlPaintType\f1
+.B XSolarisOvlGetPaintType
+.B (Display
+.I *display,
+.B GC
+.I gc)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I gc
+The GC to be inquired from.
+.SH DESCRIPTION
+This routine returns the current element of type
+.B XSolarisOvlPaintType
+associated with the given
+.I gc.
+.LP
+.B XSolarisOvlPaintType
+defines the paint type in each GC.
+An enumeration defining two types of selections that can be done in
+.B XSolarisOvlPaintType
+.sp .5
+.nf
+typedef enum {
+ XSolarisOvlPaintTransparent,
+ XSolarisOvlPaintOpaque,
+.br
+} XSolarisOvlPaintType;
+.fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlIsOverlayWindow.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,54 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlIsOverlayWindow __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlIsOverlayWindow" "" "\f3XSolarisOvlIsOverlayWindow\f1(3) \(em indicates whether a given window is an overlay window
+.SH NAME
+XSolarisOvlIsOverlayWindow \- indicates whether a given window is an overlay window
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3Bool\f1 5n
+.B XSolarisOvlIsOverlayWindow
+.B (Display
+.I *display,
+.B Window
+.I w)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I w
+Specifies the window.
+.SH DESCRIPTION
+Returns
+.SB True
+if the given window
+.I w
+is an overlay window. Otherwise returns
+.SB False.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlSelectPair.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,210 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlSelectPair __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlSelectPair" "" "\f3XSolarisOvlSelectPair\f1(3) \(em selects an optimal overlay/underlay visual pair that best meets the criteria.
+.SH NAME
+XSolarisOvlSelectPair \- selects an optimal overlay/underlay visual pair that best meets the criteria
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3XSolarisOvlSelectStatus\f1
+.B XSolarisOvlSelectPair
+.B (Display
+.I *display,
+.B int
+.I screen,
+.B int
+.I numCriteria,
+.B XSolarisOvlPairCriteria
+.I *pCriteria,
+.B XVisualInfo
+.I *ovVisinfoReturn,
+.B XVisualInfo
+.I *unVisinfoReturn,
+.B unsigned long
+.I *unmetOvCriteriaReturn,
+.B unsigned long
+.I *unmetUnCriteriaReturn)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I screen
+An integer specifying the screen on which the visuals are to be searched.
+.TP
+.I numCriteria
+The number of
+.B XSolarisOvlPairCriteria
+structures in the
+.I pCriteria
+array.
+.TP
+.I pCriteria
+An array of pair criteria structures in priority order from high to low
+specifying the criteria to be used in selecting the pair.
+.TP
+.I ovVisinfoReturn
+A pointer to a caller provided
+.I XVisualInfo
+structure. On successful return, this structure contains a description of
+the chosen overlay visual.
+.TP
+.I unVisinfoReturn
+A pointer to a caller provided
+.I XVisualInfo
+structure. On successful return, this structure contains a description of
+the chosen underlay visual.
+.TP
+.I unmetOvCriteriaReturn
+A pointer to a bitmask that describes the criteria that were not satisfied
+for the overlay visual. This return argument is only meaningful when the
+routine returns a value of
+.B XSolarisOvlQualifiedSuccess,
+or
+.B XSolarisOvlCriteriaFailure.
+.TP
+.I unmetUnCriteriaReturn
+A pointer to a bitmask that describes the criteria that were not satisfied
+for the underlay visual. This return argument is only meaningful when the
+routine returns a value of
+.B XSolarisOvlQualifiedSuccess,
+or
+.B XSolarisOvlCriteriaFailure.
+.SH Argument Types
+.LP
+See the Description section for a full description of how these types
+should be used.
+.TP
+.B XSolarisOvlPairCriteria
+A structure defining various criteria to be used during visual selection,
+along with indications of the stringency of the criteria.
+.LP
+.nf
+typedef struct {
+.br
+ XSolarisOvlVisualCriteriaoverlayCriteria;
+ XSolarisOvlVisualCriteriaunderlayCriteria;
+.br
+} XSolarisOvlPairCriteria;
+.fi
+.LP
+.B XSolarisOvlVisualCriteria
+is defined in the specification of
+.BR XSolarisOvlSelectPartner (3) .
+.SH Return Types
+.TP
+.B XSolarisOvlSelectStatus
+Refer to the specification of
+.BR XSolarisOvlSelectPartner (3)
+for the definition of this type.
+.LP
+.B XSolarisOvlSuccess
+is returned if the search is completely successful in finding a pair that
+meets all hard and soft criteria of one of the
+.B XSolarisOvlPairCriteria
+structures.
+.LP
+.B XSolarisOvlQualifiedSuccess
+is returned if the chosen pair satisfies all hard criteria of one of the
+.B XSolarisOvlPairCriteria
+structures, but doesn't meet all soft criteria. In this case,
+.I unmetOvCriteriaReturn
+and
+.I unmetUnCriteriaReturn
+contains the logical OR of the soft criteria that were not met for the overlay
+and underlay, respectively.
+.LP
+.B XSolarisOvlCriteriaFailure
+indicates that no pair could be found that meets all the hard criteria of any
+of the
+.B XSolarisOvlPairCriteria
+structures. In this case,
+.I unmetOvCriteriaReturn
+and
+.I unmetUnCriteriaReturn
+contains the logical OR of the hard criteria that were not met by the
+.B XSolarisOvlPairCriteria
+structure with the fewest hard failures, for the overlay and underlay,
+respectively.
+.LP
+.B XSolarisOvlFailure
+is returned if some other error is encountered besides criteria match failure.
+.SH DESCRIPTION
+.LP
+This routine is similar to
+.BR XSolarisOvlSelectPartner (3) .
+However, instead of selecting a partner visual given another visual, this
+routine simultaneously selects both the overlay and underlay visual from the
+set of all visual pairs for the given screen. The pair selected will be the
+one that best matches the given criteria.
+.LP
+The client is assured that, short of X errors not related to overlays,
+it can successfully create windows with the returned visuals.
+.LP
+This routine searches through all optimal visual pairs for a given screen,
+and then through all pairs of visuals (optimal and non-optimal), applying the
+specified criteria. These criteria are specified in
+.I pCriteria.
+Each element of
+.I pCriteria
+specifies criteria for both the overlay and underlay. It returns a success or
+failure status depending on whether it finds a pair that meets all the given
+criteria.
+.LP
+The selected pair will have an overlay that satisfies all the hard criteria
+specified for the overlay. The pair will have an underlay visual that
+satisfies all the hard criteria for the underlay. The attributes of the
+overlay visual are returned in
+.I ovVisinfoReturn.
+Likewise, the attributes of the underlay visual are specified in
+.I unVisinfoReturn.
+If two or more pairs are found that meet all of the hard criteria (both
+overlay and underlay) and the same number of soft criteria (either overlay or
+underlay), one of them will be chosen and returned. It is implementation
+dependent which one is chosen.
+.LP
+Like
+.BR XSolarisOvlSelectPartner (3) ,
+.B XSolarisOvlSelectPair
+supports a degradation sequence of criteria sets. This means that multiple
+criteria sets can be specified in a single call. First, an attempt is made
+to find a pair matching the first criteria set for both the overlay and the
+underlay. If a pair is found which meets all of the hard criteria of the first
+set, this pair is chosen. If no pair meets all hard criteria of the first set,
+a search is performed using the second criteria set. This process continues
+until either a pair is found that meets the all of the hard criteria of some
+criteria set, or all sets have been used to search. This degradation sequence
+allows clients to specify the criteria for the most preferred pair as the
+first criteria set. Pairs that are acceptable but which are less desirable can
+be specified in criteria sets following the first. This allows the search to
+proceed through a progressive relaxation in the client's requirements for the
+pair with a single subroutine call.
+.LP
+The criteria masks that can be specified are described in the specification of
+.BR XSolarisOvlSelectPartner (3) .
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlSelectPartner.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,338 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlSelectPartner __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlSelectPartner" "" "\f3XSolarisOvlSelectPartner\f1(3) \(em returns the overlay/underlay visual that best meets the criteria
+.SH NAME
+XSolarisOvlSelectPartner \- returns the overlay/underlay visual that best meets the criteria
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3XSolarisOvlSelectStatus\f1
+.B XSolarisOvlSelectPartner
+.B (Display
+.I *display,
+.B int
+.I screen,
+.B VisualID
+.I vid,
+.B XSolarisOvlSelectType
+.I seltype,
+.B int
+.I numCriteria,
+.B XSolarisOvlVisualCriteria
+.I *pCriteria,
+.B XVisualInfo
+.I *visinfoReturn,
+.B unsigned long
+.I *unmetCriteriaReturn)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I screen
+An integer specifying the screen for the visual
+.I vid.
+.TP
+.I vid
+The XID of the visual to find a partner for.
+.TP
+.I seltype
+The type of selection that is to be done.
+.TP
+.I numCriteria
+The number of
+.B XSolarisOvlVisualCriteria
+structures in the
+.I pCriteria array.
+.TP
+.I pCriteria
+An array of criteria structures in priority order from high to low
+specifying the criteria to be used in selecting the visual.
+.TP
+.I visinfoReturn
+A pointer to a caller provided
+.B XVisualInfo
+structure. On successful return, this structure contains a description
+of the chosen visual.
+.TP
+.I unmetCriteriaReturn
+A pointer to a bitmask that describes the criteria that were not satisfied.
+This return argument is only meaningful when the routine returns a value of
+.B XSolarisOvlQualifiedSuccess,
+or
+.B XSolarisOvlCriteriaFailure.
+.SH Argument Types
+.LP
+See the
+.B XSolarisOvlSelectPartner
+Description section for a full description of how these types should be used.
+.LP
+.B XSolarisOvlSelectType
+.LP
+An enumeration defining two types of selections that can be done in
+.B XSolarisOvlSelectPartner.
+.sp .5
+.nf
+.nf
+typedef enum {
+.br
+ XSolarisOvlSelectBestOverlay,
+ XSolarisOvlSelectBestUnderlay,
+.br
+} XSolarisOvlSelectType;
+.fi
+.LP
+.B XSolarisOvlVisualCriteria
+.LP
+A structure defining various criteria to be used during visual selection, along
+with indications of the stringency of the criteria.
+.sp .5
+.nf
+typedef struct {
+.br
+ unsigned long hardCriteriaMask;
+ unsigned long softCriteriaMask
+ int c_class;
+ unsigned int depth;
+ unsigned int minColors;
+ unsigned int minRed;
+ unsigned int minGreen;
+ unsigned int minBlue;
+ unsigned int minBitsPerRGB;
+ unsigned int minBuffers;
+.br
+} XSolarisOvlVisualCriteria;
+.fi
+.LP
+.I hardCriteriaMask
+and
+.I softCriteriaMask
+are bitmasks whose values can be the logical OR of any of the following
+bitmasks:
+.LP
+.nf
+#define XSolarisOvlVisualClass (1L<<0)
+#define XSolarisOvlDepth (1L<<1)
+#define XSolarisOvlMinColors (1L<<2)
+#define XSolarisOvlMinRed (1L<<3)
+#define XSolarisOvlMinGreen (1L<<4)
+#define XSolarisOvlMinBlue (1L<<5)
+#define XSolarisOvlMinBitsPerRGB (1L<<6)
+#define XSolarisOvlMinBuffers (1L<<7)
+#define XSolarisOvlUnsharedPixels (1L<<8)
+#define XSolarisOvlUnsharedColors (1L<<9)
+#define XSolarisOvlPreferredPartner (1L<<10)
+.fi
+.LP
+These are described in the
+.B XSolarisOvlSelectPartner
+Description documentation that follows.
+.SH Return Types
+.LP
+.B XSolarisOvlSelectStatus
+.LP
+A value that indicates whether the routine succeeded in finding a visual and,
+if it failed, the reason for the failure. The return value can be one of:
+.sp .5
+.nf
+typedef enum {
+.br
+ XSolarisOvlSuccess,
+ XSolarisOvlQualifiedSuccess,
+ XSolarisOvlCriteriaFailure,
+ XSolarisOvlFailure,
+.br
+} XSolarisOvlSelectStatus;
+.fi
+.LP
+.B XSolarisOvlSuccess
+is returned if the search is completely successful in finding a visual that
+meets all hard and soft criteria of one of the
+.B XSolarisOvlVisualCriteria
+structure.
+.LP
+.B XSolarisOvlQualifiedSuccess
+is returned if the chosen visual satisfies all hard criteria of one of the
+.B XSolarisOvlVisualCriteria
+structure, but doesn't meet all soft criteria. In this case,
+.I unmetCriteriaReturn
+contains the logical OR of the soft criteria that were not met.
+.LP
+.B XSolarisOvlCriteriaFailure
+indicates that no visual could be found that meets all the hard criteria of any
+of the
+.B XSolarisOvlVisualCriteria
+structures. In this case,
+.I unmetCriteriaReturn
+contains the logical OR of the hard criteria that were not met for the
+.B XSolarisOvlVisualCriteria
+structure with the fewest hard criteria not met.
+.LP
+.B XSolarisOvlFailure
+is returned if some other error is encountered besides criteria match failure.
+.SH DESCRIPTION
+.LP
+Portable applications using overlays may wish to search for an appropriate
+overlay visual to use for a given underlay visual, or vice-versa.
+Each X screen supporting the overlay extension defines a set of overlay
+visuals whose windows are best for use as children of underlay windows.
+For each underlay visual, there is a set of
+.I optimal
+overlay visuals.
+Together, all combinations of underlay visuals and their optimal overlay
+visuals form the set of optimal overlay/underlay pairs for that screen.
+The overlay and underlay visuals of an optimal pair are said to be
+.I partners
+of each other.
+.LP
+.B XSolarisOvlSelectPartner
+allows the client to select, given an underlay visual, an
+.I optimal
+overlay that meets certain criteria. Inversely, it also allows the client to
+select an optimal underlay visual given an overlay visual.
+.LP
+The client is assured that, short of X errors not related to overlays, it can
+successfully create a window with the returned visual.
+.LP
+This routine searches through the optimal partners of the given visual,
+applying the criteria specified in
+.I pCriteria.
+It returns a success or failure status depending on whether it finds a visual
+that meets the criteria.
+.LP
+A criterion can be one of two types:
+.IP 1. 3n
+Hard Criterion
+.sp .5
+A criterion that must be satisfied. Only visuals that meet hard criteria
+are candidates for successful matches.
+.IP 2. 3n
+Soft Criterion
+.sp .5
+A desirable criterion, but one which is not required. The visual that matches
+all hard criteria and the most soft criteria is chosen. Its attributes are
+returned in
+.I visinfoReturn.
+If two or more visuals are found that meet all of the hard criteria and the
+same number of soft criteria, one of them will be chosen and returned.
+It is implementation dependent which one is chosen.
+.LP
+.B XSolarisOvlSelectPartner
+supports a degradation sequence of criteria sets. This means that multiple
+criteria sets can be specified in a single call. First, an attempt is made
+to find a visual matching the first criteria set. If a visual is found which
+meets all of the hard criteria of the first set, this visual is chosen.
+If no visual met all hard criteria of the first set, a search is performed
+using the second criteria set. This process continues until either a visual
+is found that meets the hard criteria of some criteria set, or all sets have
+been used to search. This degradation sequence allows clients to specify the
+criteria for the most preferred visual as the first criteria set. Visuals
+that are acceptable but which are less desirable can be specified in criteria
+sets following the first. This allows the search to proceed through a
+progressive relaxation in the client's requirements for the visual with a
+single subroutine call.
+.LP
+Any of the possible criteria can be specified either as a hard or soft
+criteria for a particular criteria set. For a given set,
+.I hardCriteriaMask
+is the logical OR of the criteria bitmasks that are to be applied as hard
+criteria during the search. Likewise,
+.I softCriteriaMask
+is the logical OR of the soft criteria bitmasks.
+.LP
+Some criteria have values associated with them. These values are provided by
+other data members in the
+.B XSolarisOvlVisualCriteria
+structure. In the criteria descriptions which follow, these data members are
+mentioned where applicable.
+.LP
+.B XSolarisOvlVisualClass
+specifies that the client desires the selected visual to have a specific visual
+class. The required class is specified in
+.I c_class.
+.LP
+The following criteria interact within one another:
+.B XSolarisOvlDepth,
+.B XSolarisOvlMinColors,
+.B XSolarisOvlMinRed,
+.B XSolarisOvlMinGreen,
+and
+.B XSolarisOvlMinBlue.
+Typically, only some subset of these should be specified.
+.B XSolarisOvlDepth
+specifies that the depth of the selected visual is to be equal to depth.
+.B XSolarisOvlMinColors
+specifies that the selected visual is to have at least minColors number of
+total displayable colors.
+.B XSolarisOvlMinRed,
+.B XSolarisOvlMinGreen,
+and
+.B XSolarisOvlMinBlue
+can be used to indicate more specific color requirements for
+.I DirectColor
+or
+.I TrueColor
+visuals. Their corresponding values are specified in
+.I minRed, minGreen,
+and
+.I minBlue,
+respectively. These indicate that the selected visual must have at least the
+specified number of reds, greens, and/or blues.
+.LP
+.B XSolarisOvlMinBitsPerRGB
+specifies that the selected visual is to have at least
+.I minBitsPerRGB
+of color channel output from colormaps created on that visual.
+.LP
+.B XSolarisOvlMinBuffers
+specifies that the client desires the selected visual to be able to be
+assigned at least
+.I minBuffers
+number of accelerated MBX image buffers.
+.LP
+.B XSolarisOvlUnsharedPixels
+selects partner visuals whose window pixels don't lie in the same drawing
+plane groups as the window pixels of the argument visual
+.I vid.
+If a visual uses the same drawing plane group as the argument visual it is
+not matched by this criterion.
+.LP
+.B XSolarisOvlUnsharedColors
+selects partner visuals whose window pixel colors can be displayed simultaneously
+when the overlay/underlay window pair has the colormap focus. If a visual
+shares the same color LUT pool and that pool has only one color LUT in it as
+the argument visual it is not matched by this criterion.
+.LP
+If either
+.I hardCriteriaMask
+of a criteria set is to 0, any visual will match that criteria set with a hard
+match. Likewise, setting the
+.I softCriteriaMask
+of a criteria set to 0, is sufficient to guarantee at least a soft match for
+that criteria set.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlSetPaintType.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,74 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlSetPaintType __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlSetPaintType" "" "\f3XSolarisOvlSetPaintType\f1(3) \(em specifies the type of paint rendered by subsequent Xlib drawing with the given GC.
+.SH NAME
+XSolarisOvlSetPaintType \- specifies the type of paint rendered by subsequent Xlib drawing with the given GC
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3void\f1 5n
+.B XSolarisOvlSetPaintType
+.B (Display
+.I *display,
+.B GC
+.I gc,
+.B XSolarisOvlPaintType
+.I paintType)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I gc
+Specifies the affected GC.
+.TP
+.I paintType
+Specifies the type of paint rendered by subsequent Xlib drawing
+routines using the specified GC.
+.SH DESCRIPTION
+This routine controls the type of paint rendered by an Xlib GC.
+It controls whether Xlib drawing routines using this GC produce
+pixels on overlay windows that are opaque or transparent.
+The paint type specified applies to the GC until it is changed by
+another call to this routine. The paint type attribute applies to
+both the foreground and background GC attributes.
+If the value of
+.I paintType
+is
+.B XSolarisOvlPaintOpaque,
+the pixels generated by subsequent Xlib drawing routines with this
+GC will be opaque. This means the pixels will obscure underlying pixels.
+If the value of
+.I paintType
+is
+.B XSolarisOvlPaintTransparent,
+the pixels generated by subsequent Xlib drawing routines with this GC
+will be transparent. This means that, for these pixels, the color of the
+underlying pixels will be displayed.
+By default, a GC renders opaque paint.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/man/XSolarisOvlSetWindowTransparent.man Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,67 @@
+.\" Copyright 2008 Sun Microsystems, Inc. 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 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 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.
+.\"
+.\" Except as contained in this notice, the names of the copyright holders
+.\" shall not be used in advertising or otherwise to promote the sale, use
+.\" or other dealings in this Software without prior written authorization
+.\" from said copyright holders.
+.\"
+.TH XSolarisOvlSetWindowTransparent __libmansuffix__ __xorgversion__ "X FUNCTIONS"
+.IX "XSolarisOvlSetWindowTransparent" "" "\f3XSolarisOvlSetWindowTransparent\f1(3) \(em sets the background state of an overlay window to be transparent.
+.SH NAME
+XSolarisOvlSetWindowTransparent \- sets the background state of an overlay window to be transparent
+.SH SYNOPSIS
+.LP
+\&#include <X11/extensions/transovl.h>
+
+.IP \f3void\f1 5n
+.B XSolarisOvlSetWindowTransparent
+.B (Display
+.I *display,
+.B Window
+.I w)
+.SH Arguments
+.TP
+.I display
+Specifies the connection to the X server.
+.TP
+.I w
+Specifies the window.
+.SH DESCRIPTION
+This routine sets the background state of the given overlay to be transparent.
+Any background rendering that occurs after this request will cause the
+background to be transparent. Use
+.BR XChangeWindowAttributes (3) ,
+.BR XSetWindowBackground (3) ,
+or
+.BR XSetWindowBackgroundPixmap (3)
+to change background state to any other value.
+.LP
+If
+.I w
+is not an overlay window,
+.SB BadMatch
+is generated.
+.SH ERRORS
+.LP
+.nf
+.SB BadMatch
+.fi
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/src/AllPlanes.c Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,321 @@
+/* Copyright 2008 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * 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
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#pragma ident "@(#)AllPlanes.c 35.6 08/03/12 SMI"
+
+/*
+ * AllPlanes.c - the client side interface to the SUN_ALLPLANES extension.
+ */
+
+#define NEED_EVENTS
+#define NEED_REPLIES
+#include <stdio.h>
+#include <X11/Xlibint.h>
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/allplanesstr.h>
+
+static int close_display();
+
+static XExtensionInfo *ext_info;
+static char *ext_name = ALLPLANESNAME;
+static XExtensionHooks ext_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_CLOSE_DISPLAY(close_display,
+ ext_info)
+
+static
+XEXT_GENERATE_FIND_DISPLAY(find_display,
+ ext_info, ext_name, &ext_hooks,
+ AllPlanesNumberEvents, NULL)
+
+#define AllPlanesCheckExtension(dpy,i,val) \
+ XextCheckExtension (dpy, i, ext_name, val)
+#define AllPlanesSimpleCheckExtension(dpy,i) \
+ XextSimpleCheckExtension (dpy, i, ext_name)
+
+/**********************************************************************/
+
+Bool
+XAllPlanesQueryExtension(dpy, event_basep, error_basep)
+ Display *dpy;
+ int *event_basep,
+ *error_basep;
+{
+ XExtDisplayInfo *info = find_display(dpy);
+
+ if (XextHasExtension(info)) {
+ *event_basep = info->codes->first_event;
+ *error_basep = info->codes->first_error;
+ return True;
+ } else {
+ return False;
+ }
+}
+
+
+Status
+XAllPlanesQueryVersion(dpy, major_versionp, minor_versionp)
+ Display *dpy;
+ int *major_versionp,
+ *minor_versionp;
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xAllPlanesQueryVersionReply rep;
+ xAllPlanesQueryVersionReq *req;
+
+ AllPlanesCheckExtension(dpy, info, 0);
+
+ LockDisplay(dpy);
+ GetReq(AllPlanesQueryVersion, req);
+ req->reqType = info->codes->major_opcode;
+ req->allplanesReqType = X_AllPlanesQueryVersion;
+ if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 0;
+ }
+ *major_versionp = rep.majorVersion;
+ *minor_versionp = rep.minorVersion;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+}
+
+
+void
+XAllPlanesDrawPoints(dpy, d, points, n_points, mode)
+ Display *dpy;
+ Drawable d;
+ XPoint *points;
+ int n_points;
+ int mode; /* CoordMode */
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xAllPlanesPolyPointReq *req;
+ long nbytes;
+ int n;
+ int xoff,
+ yoff;
+ XPoint pt;
+
+ AllPlanesSimpleCheckExtension(dpy, info);
+
+ xoff = yoff = 0;
+ LockDisplay(dpy);
+ while (n_points) {
+ GetReq(AllPlanesPolyPoint, req);
+ req->reqType = info->codes->major_opcode;
+ req->allplanesReqType = X_AllPlanesPolyPoint;
+ req->drawable = d;
+ req->coordMode = mode;
+ n = n_points;
+ if (n > (dpy->max_request_size - req->length))
+ n = dpy->max_request_size - req->length;
+ req->length += n;
+ nbytes = ((long) n) << 2;
+ if (xoff || yoff) {
+ pt.x = xoff + points->x;
+ pt.y = yoff + points->y;
+ Data16(dpy, (short *) &pt, 4);
+ if (nbytes > 4) {
+ Data16(dpy, (short *) (points + 1), nbytes - 4);
+ }
+ } else {
+ Data16(dpy, (short *) points, nbytes);
+ }
+ n_points -= n;
+ if (n_points && (mode == CoordModePrevious)) {
+ XPoint *pptr = points;
+ points += n;
+ while (pptr != points) {
+ xoff += pptr->x;
+ yoff += pptr->y;
+ pptr++;
+ }
+ } else
+ points += n;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
+
+
+void
+XAllPlanesDrawLines(dpy, d, points, npoints, mode)
+ Display *dpy;
+ Drawable d;
+ XPoint *points;
+ int npoints;
+ int mode;
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xAllPlanesPolyLineReq *req;
+ long len;
+
+ AllPlanesSimpleCheckExtension(dpy, info);
+
+ LockDisplay(dpy);
+ GetReq(AllPlanesPolyLine, req);
+ req->reqType = info->codes->major_opcode;
+ req->allplanesReqType = X_AllPlanesPolyLine;
+ req->drawable = d;
+ req->coordMode = mode;
+ if ((req->length + npoints) > 65535)
+ npoints = 65535 - req->length; /* force BadLength, if possible */
+ req->length += npoints;
+ /* each point is 2 16-bit integers */
+ len = npoints << 2;
+ Data16(dpy, (short *) points, len);
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
+
+
+void
+XAllPlanesDrawSegments(dpy, d, segments, nsegments)
+ Display *dpy;
+ Drawable d;
+ XSegment *segments;
+ int nsegments;
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xAllPlanesPolySegmentReq *req;
+ long len;
+ int n;
+
+ AllPlanesSimpleCheckExtension(dpy, info);
+
+ LockDisplay(dpy);
+ while (nsegments) {
+ GetReq(AllPlanesPolySegment, req);
+ req->reqType = info->codes->major_opcode;
+ req->allplanesReqType = X_AllPlanesPolySegment;
+ req->drawable = d;
+ n = nsegments;
+ len = ((long) n) << 1;
+ if (len > (dpy->max_request_size - req->length)) {
+ n = (dpy->max_request_size - req->length) >> 1;
+ len = ((long) n) << 1;
+ }
+ req->length += len;
+ len <<= 2;
+ Data16(dpy, (short *) segments, len);
+ nsegments -= n;
+ segments += n;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
+
+
+void
+XAllPlanesDrawRectangles(dpy, d, rects, n_rects)
+ Display *dpy;
+ Drawable d;
+ XRectangle *rects;
+ int n_rects;
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xAllPlanesPolyRectangleReq *req;
+ long len;
+ int n;
+
+ AllPlanesSimpleCheckExtension(dpy, info);
+
+ LockDisplay(dpy);
+ while (n_rects) {
+ GetReq(AllPlanesPolyRectangle, req);
+ req->reqType = info->codes->major_opcode;
+ req->allplanesReqType = X_AllPlanesPolyRectangle;
+ req->drawable = d;
+ n = n_rects;
+ len = ((long) n) << 1;
+ if (len > (dpy->max_request_size - req->length)) {
+ n = (dpy->max_request_size - req->length) >> 1;
+ len = ((long) n) << 1;
+ }
+ req->length += len;
+ len <<= 2;
+ Data16(dpy, (short *) rects, len);
+ n_rects -= n;
+ rects += n;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
+
+
+void
+XAllPlanesFillRectangles(dpy, d, rectangles, n_rects)
+ Display *dpy;
+ Drawable d;
+ XRectangle *rectangles;
+ int n_rects;
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xAllPlanesPolyFillRectangleReq *req;
+ long len;
+ int n;
+
+ AllPlanesSimpleCheckExtension(dpy, info);
+
+ LockDisplay(dpy);
+ while (n_rects) {
+ GetReq(AllPlanesPolyFillRectangle, req);
+ req->reqType = info->codes->major_opcode;
+ req->allplanesReqType = X_AllPlanesPolyFillRectangle;
+ req->drawable = d;
+ n = n_rects;
+ len = ((long) n) << 1;
+ if (len > (dpy->max_request_size - req->length)) {
+ n = (dpy->max_request_size - req->length) >> 1;
+ len = ((long) n) << 1;
+ }
+ req->length += len;
+ len <<= 2;
+ Data16(dpy, (short *) rectangles, len);
+ n_rects -= n;
+ rectangles += n;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/src/FBPM.c Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,263 @@
+/*
+ * Copyright 2008 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * 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
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#pragma ident "@(#)FBPM.c 1.7 08/03/12 SMI"
+
+#define NEED_REPLIES
+#include <X11/Xlibint.h>
+#include <X11/extensions/fbpm.h>
+#include <X11/extensions/fbpmstr.h>
+#include <X11/extensions/Xext.h>
+#include <X11/extensions/extutil.h>
+#include <stdio.h>
+
+static XExtensionInfo _fbpm_info_data;
+static XExtensionInfo *fbpm_info = &_fbpm_info_data;
+static char *fbpm_extension_name = FBPMExtensionName;
+
+#define FBPMCheckExtension(dpy,i,val) \
+ XextCheckExtension (dpy, i, fbpm_extension_name, val)
+
+/*****************************************************************************
+ * *
+ * private utility routines *
+ * *
+ *****************************************************************************/
+
+static int close_display();
+static /* const */ XExtensionHooks fbpm_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, fbpm_info,
+ fbpm_extension_name,
+ &fbpm_extension_hooks, FBPMNumberEvents,
+ NULL)
+
+static XEXT_GENERATE_CLOSE_DISPLAY (close_display, fbpm_info)
+
+/*****************************************************************************
+ * *
+ * public routines *
+ * *
+ *****************************************************************************/
+
+Bool FBPMQueryExtension (dpy, event_basep, error_basep)
+ Display *dpy;
+ int *event_basep, *error_basep;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+
+ if (XextHasExtension(info)) {
+ *event_basep = info->codes->first_event;
+ *error_basep = info->codes->first_error;
+ return True;
+ } else {
+ return False;
+ }
+#else
+ return False;
+#endif
+}
+
+Status FBPMGetVersion(dpy, major_versionp, minor_versionp)
+ Display *dpy;
+ int *major_versionp, *minor_versionp;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+ xFBPMGetVersionReply rep;
+ register xFBPMGetVersionReq *req;
+
+ FBPMCheckExtension (dpy, info, 0);
+
+ LockDisplay (dpy);
+ GetReq (FBPMGetVersion, req);
+ req->reqType = info->codes->major_opcode;
+ req->fbpmReqType = X_FBPMGetVersion;
+ if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) {
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return 0;
+ }
+ *major_versionp = rep.majorVersion;
+ *minor_versionp = rep.minorVersion;
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+Bool FBPMCapable(dpy)
+ Display *dpy;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+ register xFBPMCapableReq *req;
+ xFBPMCapableReply rep;
+
+ FBPMCheckExtension (dpy, info, 0);
+
+ LockDisplay(dpy);
+ GetReq(FBPMCapable, req);
+ req->reqType = info->codes->major_opcode;
+ req->fbpmReqType = X_FBPMCapable;
+
+ if (!_XReply(dpy, (xReply *)&rep, 0, xFalse)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.capable;
+#else
+ return False;
+#endif
+}
+
+
+Bool FBPMEnable(dpy,state)
+ Display *dpy;
+ int state;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+ register xFBPMEnableReq *req;
+
+ FBPMCheckExtension (dpy, info, 0);
+ LockDisplay(dpy);
+ GetReq(FBPMEnable, req);
+ req->reqType = info->codes->major_opcode;
+ req->fbpmReqType = X_FBPMEnable;
+ req->level = state;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return True;
+#else
+ return False;
+#endif
+}
+
+Status FBPMDisable(dpy)
+ Display *dpy;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+ register xFBPMDisableReq *req;
+
+ FBPMCheckExtension (dpy, info, 0);
+ LockDisplay(dpy);
+ GetReq(FBPMDisable, req);
+ req->reqType = info->codes->major_opcode;
+ req->fbpmReqType = X_FBPMDisable;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+#else
+ return 0;
+#endif
+}
+Status FBPMForceLevel(dpy, level)
+ Display *dpy;
+ CARD16 level;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+ register xFBPMForceLevelReq *req;
+
+ FBPMCheckExtension (dpy, info, 0);
+
+ if ((level != FBPMModeOn) &&
+ (level != FBPMModeStandby) &&
+ (level != FBPMModeSuspend) &&
+ (level != FBPMModeOff))
+ return BadValue;
+
+ LockDisplay(dpy);
+ GetReq(FBPMForceLevel, req);
+ req->reqType = info->codes->major_opcode;
+ req->fbpmReqType = X_FBPMForceLevel;
+ req->level = level;
+
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+Status FBPMInfo(dpy, state, onoff)
+ Display *dpy;
+ CARD16 *state;
+ BOOL *onoff;
+{
+#ifndef FBPM_STUB
+ XExtDisplayInfo *info = find_display (dpy);
+ register xFBPMInfoReq *req;
+ xFBPMInfoReply rep;
+
+ FBPMCheckExtension (dpy, info, 0);
+
+ LockDisplay(dpy);
+ GetReq(FBPMInfo, req);
+ req->reqType = info->codes->major_opcode;
+ req->fbpmReqType = X_FBPMInfo;
+
+ if (!_XReply(dpy, (xReply *)&rep, 0, xTrue)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 0;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ *state = rep.power_level;
+ *onoff = rep.state;
+ return 1;
+#else
+ return 0;
+#endif
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/src/TransOvl.c Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,1441 @@
+/* Copyright 2008 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * 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
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#pragma ident "@(#)TransOvl.c 1.6 08/03/12 SMI"
+
+/*
+ * TransOvl.c - the client side interface to the Transparent Overlays
+ * extension.
+ */
+
+#define NEED_EVENTS
+#define NEED_REPLIES
+#include <X11/Xlibint.h>
+#include <X11/Xutil.h>
+#include <X11/extensions/extutil.h>
+#include <X11/extensions/transovlstr.h>
+#include <X11/extensions/multibuf.h>
+
+typedef struct {
+ XExtData extdata;
+ int numVisPairs;
+ Bool pairsRestricted;
+ int visdatatypes;
+} XOvlScrExtData;
+
+typedef struct {
+ VisualID vid;
+ Visual *vis;
+ int depth;
+} XOvlVisInfo;
+
+typedef struct {
+ XOvlVisInfo overlay;
+ XOvlVisInfo underlay;
+} XOvlVisPair;
+
+#ifdef _LP64
+#define XOvlMBXBuffers (1L << 0)
+#define XOvlSharedPixels (1L << 1)
+#define XOvlSharedColors (1L << 2)
+
+#define XOVL_MAX_BUFFERS (~0L)
+#define XOVL_ALL_PLANES (~0L)
+#define XOVL_ANY_POOL (~0L)
+#else /* _LP64 */
+#define XOvlMBXBuffers (1 << 0)
+#define XOvlSharedPixels (1 << 1)
+#define XOvlSharedColors (1 << 2)
+
+#define XOVL_MAX_BUFFERS (~0)
+#define XOVL_ALL_PLANES (~0)
+#define XOVL_ANY_POOL (~0)
+#endif /* _LP64 */
+
+typedef struct {
+ XExtData extdata;
+ int datatypes;
+ int numBuffers;
+ unsigned long ovplanes;
+ unsigned long unplanes;
+ unsigned long clutpool;
+ int clutcount;
+} XOvlVisExtData;
+
+typedef struct {
+ XExtData extdata;
+ XSolarisOvlPaintType paintType;
+} XOvlGCExtData;
+
+typedef struct {
+ int screen;
+ XOvlVisInfo candidate;
+ XOvlVisInfo partner;
+ Bool partnerpreferred;
+ XSolarisOvlSelectType searchtype;
+ unsigned long hardfailures;
+ unsigned long softfailures;
+ int numhardfailures;
+ int numsoftfailures;
+} XOvlVisualMatch;
+
+typedef struct {
+ int nDepths;
+ Depth *pDepths;
+ int depth;
+ int nVisuals;
+ Visual *pVisuals;
+} XOvlVisEnumData;
+
+static int close_display();
+
+static XExtensionInfo *ext_info;
+static char *ext_name = OVLNAME;
+static XExtensionHooks ext_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_CLOSE_DISPLAY(close_display,
+ ext_info)
+
+static
+XEXT_GENERATE_FIND_DISPLAY(find_display,
+ ext_info, ext_name, &ext_hooks,
+ OvlNumberEvents, NULL)
+
+#define OvlCheckExtension(dpy,i,val) \
+ XextCheckExtension (dpy, i, ext_name, val)
+#define OvlSimpleCheckExtension(dpy,i) \
+ XextSimpleCheckExtension (dpy, i, ext_name)
+
+
+/**********************************************************************/
+
+/*
+ * The utility function _XVIDtoVisual could be used, but we already
+ * know the screen structure where the visual is to be found, so there
+ * is no need to scan all the screens on the display. This procedure
+ * performs a more direct scan for the visual.
+ */
+static Bool
+find_visual(
+ Screen *scr,
+ VisualID vid,
+ Visual **visReturn,
+ int *depthReturn
+)
+{
+ Depth *depth;
+ Visual *vis;
+
+ for (depth = scr->depths; depth < (scr->depths + scr->ndepths); depth++) {
+ if (depth->visuals) {
+ for (vis = depth->visuals;
+ vis < (depth->visuals + depth->nvisuals);
+ vis++)
+ {
+ if (vis->visualid == vid) {
+ *visReturn = vis;
+ *depthReturn = depth->depth;
+ return True;
+ }
+ }
+ }
+ }
+ return False;
+}
+
+
+static void
+vis_enum_init(
+ Screen *scr,
+ XOvlVisEnumData *visEnumData
+)
+{
+ visEnumData->nDepths = scr->ndepths;
+ visEnumData->pDepths = scr->depths;
+ visEnumData->depth = 0;
+ visEnumData->nVisuals = 0;
+ visEnumData->pVisuals = NULL;
+}
+
+
+static Bool
+vis_enum_next(
+ XOvlVisEnumData *visEnumData,
+ Visual **visReturn,
+ int *depthReturn
+)
+{
+ int ndepths;
+ Depth *depth;
+
+ if (!visEnumData->nVisuals) {
+ ndepths = visEnumData->nDepths;
+ depth = visEnumData->pDepths;
+ while (ndepths) {
+ if (depth->visuals) {
+ break;
+ }
+ ndepths--;
+ depth++;
+ }
+ if (!ndepths) {
+ return False;
+ }
+ visEnumData->nDepths = ndepths - 1;
+ visEnumData->pDepths = depth + 1;
+ visEnumData->depth = depth->depth;
+ visEnumData->nVisuals = depth->nvisuals;
+ visEnumData->pVisuals = depth->visuals;
+ }
+ visEnumData->nVisuals--;
+ *visReturn = visEnumData->pVisuals++;
+ *depthReturn = visEnumData->depth;
+ return True;
+}
+
+
+static XOvlScrExtData *
+find_screendata(
+ Display *dpy,
+ int screen,
+ XExtDisplayInfo *info
+)
+{
+ XOvlScrExtData *scrextdata;
+ Screen *scr;
+ xOvlGetPartnersReq *req;
+ xOvlGetPartnersReply rep;
+ unsigned long nbytes;
+ unsigned long numPairs;
+ XOvlVisPair *vispairs,
+ *vispair;
+ XOvlVidPair vidpair;
+ XEDataObject obj;
+
+ obj.screen = scr = ScreenOfDisplay(dpy, screen);
+ scrextdata = (XOvlScrExtData *)
+ XFindOnExtensionList(XEHeadOfExtensionList(obj),
+ info->codes->extension);
+ if (!scrextdata) {
+ GetReq(OvlGetPartners, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlGetPartners;
+ req->screen = screen;
+ if (_XReply(dpy, (xReply *)(&rep), 0, xFalse)) {
+ numPairs = rep.numPairs;
+ nbytes = numPairs * sizeof(XOvlVisPair);
+ scrextdata = Xmalloc(sizeof(XOvlScrExtData));
+ vispairs = (XOvlVisPair *)Xmalloc(nbytes);
+ if (scrextdata && vispairs) {
+ scrextdata->extdata.number = info->codes->extension;
+ scrextdata->extdata.free_private = NULL;
+ scrextdata->extdata.private_data = (char *)vispairs;
+ scrextdata->numVisPairs = rep.numPairs;
+ scrextdata->pairsRestricted = rep.restricted;
+ /* BugId: 4126680 - Purify detects reads in uninitialized
+ memory generating random results. culprit was id'd to
+ be the uninitialized field visdatatypes */
+ scrextdata->visdatatypes = 0;
+ vispair = vispairs;
+ while (numPairs--) {
+ _XRead(dpy, (char *)(&vidpair), sizeof(vidpair));
+ vispair->overlay.vid = vidpair.overlayVid;
+ vispair->underlay.vid = vidpair.underlayVid;
+ if ( !find_visual(scr, vidpair.overlayVid,
+ &vispair->overlay.vis,
+ &vispair->overlay.depth)
+ || !find_visual(scr, vidpair.underlayVid,
+ &vispair->underlay.vis,
+ &vispair->underlay.depth))
+ {
+ Xfree(vispairs);
+ Xfree(scrextdata);
+ scrextdata = NULL;
+ if (numPairs) {
+ nbytes = numPairs * sizeof(XOvlVidPair);
+ _XEatData(dpy, nbytes);
+ }
+ break;
+ }
+ vispair++;
+ }
+ if (scrextdata) {
+ XAddToExtensionList(XEHeadOfExtensionList(obj),
+ &(scrextdata->extdata));
+ }
+ } else {
+ Xfree(scrextdata);
+ Xfree(vispairs);
+ nbytes = numPairs * sizeof(XOvlVidPair);
+ _XEatData(dpy, nbytes);
+ scrextdata = NULL;
+ }
+ }
+ }
+ return scrextdata;
+}
+
+
+static XOvlVisExtData *
+find_visdata(
+ Visual *vis,
+ XExtDisplayInfo *info
+)
+{
+ XOvlVisExtData *visextdata;
+ XEDataObject obj;
+
+ obj.visual = vis;
+ visextdata = (XOvlVisExtData *)
+ XFindOnExtensionList(XEHeadOfExtensionList(obj),
+ info->codes->extension);
+ if (!visextdata) {
+ visextdata = Xmalloc(sizeof(XOvlVisExtData));
+ if (visextdata) {
+ visextdata->extdata.number = info->codes->extension;
+ visextdata->extdata.free_private = NULL;
+ visextdata->extdata.private_data = NULL;
+ visextdata->datatypes = 0;
+ XAddToExtensionList(XEHeadOfExtensionList(obj),
+ &(visextdata->extdata));
+ }
+ }
+
+ return visextdata;
+}
+
+
+static int
+bitcount(
+ unsigned long mask
+)
+{
+ int count;
+
+ count = 0;
+ while (mask) {
+ count++;
+ mask &= (mask - 1);
+ }
+ return count;
+}
+
+
+static int
+GetNumMBXBuffers(
+ Display *dpy,
+ int screen,
+ Visual *candidateVis,
+ XExtDisplayInfo *info)
+{
+ XOvlVisExtData *candidateData;
+ XOvlScrExtData *scrextdata;
+ int i,
+ nmono,
+ nstereo;
+ XmbufBufferInfo *mono_info,
+ *stereo_info;
+ Visual *vis;
+ int depth;
+ XOvlVisExtData *visextdata;
+ Screen *scr;
+
+ candidateData = find_visdata(candidateVis, info);
+ if (!candidateData) {
+ /*
+ * Cannot store data for this visual, assume the worst case.
+ */
+ return 0;
+ }
+ if (!(candidateData->datatypes & XOvlMBXBuffers)) {
+ scrextdata = find_screendata(dpy, screen, info);
+ if (!(scrextdata->visdatatypes & XOvlMBXBuffers)) {
+ /*
+ * We haven't queried the MBX extension for the buffer
+ * data on this screen yet. Call XmbufGetScreenInfo
+ * and fill in the data for all the returned visuals.
+ */
+ scr = ScreenOfDisplay(dpy, screen);
+ scrextdata->visdatatypes |= XOvlMBXBuffers;
+ XmbufGetScreenInfo(dpy, RootWindow(dpy, screen),
+ &nmono, &mono_info,
+ &nstereo, &stereo_info);
+ for (i = 0; i < nmono; i++) {
+ if (find_visual(scr, mono_info[i].visualid, &vis, &depth)) {
+ visextdata = find_visdata(vis, info);
+ if (visextdata) {
+ visextdata->numBuffers = mono_info[i].max_buffers;
+ if (!visextdata->numBuffers) {
+ visextdata->numBuffers = XOVL_MAX_BUFFERS;
+ }
+ visextdata->datatypes |= XOvlMBXBuffers;
+ } else {
+ /*
+ * We were unable to finish the query, so mark
+ * the data as unqueried so we can try again later.
+ */
+ scrextdata->visdatatypes &= ~XOvlMBXBuffers;
+ }
+ }
+ }
+ XFree(mono_info);
+ XFree(stereo_info);
+ }
+ if (!(candidateData->datatypes & XOvlMBXBuffers)) {
+ /*
+ * No data was returned from MBX for this visual,
+ * so fill in a default value. Only mark the
+ * data valid if the server query completed.
+ */
+ candidateData->numBuffers = 0;
+ if (scrextdata->visdatatypes & XOvlMBXBuffers) {
+ candidateData->datatypes |= XOvlMBXBuffers;
+ }
+ }
+ }
+
+ return candidateData->numBuffers;
+}
+
+
+static Bool
+CheckSharedPixels(
+ Display *dpy,
+ int screen,
+ XSolarisOvlSelectType searchtype,
+ Visual *candidateVis,
+ Visual *partnerVis,
+ XExtDisplayInfo *info)
+{
+ XOvlVisExtData *candidateData,
+ *partnerData;
+ XOvlScrExtData *scrextdata;
+ Screen *scr;
+ xOvlGetSharedPixelsReq *req;
+ xOvlGetSharedPixelsReply rep;
+ unsigned int i;
+ XOvlPGInfo pginfo;
+ Visual *vis;
+ int depth;
+ XOvlVisExtData *visextdata;
+ unsigned long commonplanes;
+
+ candidateData = find_visdata(candidateVis, info);
+ partnerData = find_visdata(partnerVis, info);
+ if (!candidateData || !partnerData) {
+ /*
+ * Cannot store data for these visuals, assume the worst case.
+ */
+ return True;
+ }
+ if ( !(candidateData->datatypes & XOvlSharedPixels)
+ || !( partnerData->datatypes & XOvlSharedPixels))
+ {
+ scrextdata = find_screendata(dpy, screen, info);
+ if (!(scrextdata->visdatatypes & XOvlSharedPixels)) {
+ /*
+ * We haven't queried the server for plane group data
+ * on this screen yet. Send the query and fill in
+ * the data for the visuals indicated in the reply.
+ */
+ scr = ScreenOfDisplay(dpy, screen);
+ scrextdata->visdatatypes |= XOvlSharedPixels;
+ GetReq(OvlGetSharedPixels, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlGetSharedPixels;
+ req->screen = screen;
+ if (_XReply(dpy, (xReply *)(&rep), 0, xFalse)) {
+ for (i = 0; i < rep.numPGInfos; i++) {
+ _XRead(dpy, (char *)(&pginfo), sizeof(pginfo));
+ if (find_visual(scr, pginfo.vid, &vis, &depth)) {
+ visextdata = find_visdata(vis, info);
+ if (visextdata) {
+ visextdata->ovplanes = pginfo.ovplanes;
+ visextdata->unplanes = pginfo.unplanes;
+ visextdata->datatypes |= XOvlSharedPixels;
+ } else {
+ /*
+ * We were unable to finish the query, so mark
+ * the data as unqueried so we can try again later.
+ */
+ scrextdata->visdatatypes &= ~XOvlSharedPixels;
+ }
+ }
+ }
+ }
+ }
+ if (!(candidateData->datatypes & XOvlSharedPixels)) {
+ /*
+ * No data was returned from the server for this
+ * visual, so fill in a default value. Only mark
+ * the data valid if the server query completed.
+ */
+ candidateData->ovplanes = XOVL_ALL_PLANES;
+ candidateData->unplanes = XOVL_ALL_PLANES;
+ if (scrextdata->visdatatypes & XOvlSharedPixels) {
+ candidateData->datatypes |= XOvlSharedPixels;
+ }
+ }
+ if (!(partnerData->datatypes & XOvlSharedPixels)) {
+ /*
+ * No data was returned from the server for this
+ * visual, so fill in a default value. Only mark
+ * the data valid if the server query completed.
+ */
+ partnerData->ovplanes = XOVL_ALL_PLANES;
+ partnerData->unplanes = XOVL_ALL_PLANES;
+ if (scrextdata->visdatatypes & XOvlSharedPixels) {
+ partnerData->datatypes |= XOvlSharedPixels;
+ }
+ }
+ }
+
+ if (searchtype == XSolarisOvlSelectBestOverlay) {
+ commonplanes = candidateData->ovplanes & partnerData->unplanes;
+ } else {
+ commonplanes = candidateData->unplanes & partnerData->ovplanes;
+ }
+ return commonplanes ? True : False;
+}
+
+
+static Bool
+CheckSharedColors(
+ Display *dpy,
+ int screen,
+ Visual *candidateVis,
+ Visual *partnerVis,
+ XExtDisplayInfo *info)
+{
+ XOvlVisExtData *candidateData,
+ *partnerData;
+ XOvlScrExtData *scrextdata;
+ Screen *scr;
+ xOvlGetSharedColorsReq *req;
+ xOvlGetSharedColorsReply rep;
+ unsigned int i;
+ XOvlClutInfo clutinfo;
+ Visual *vis;
+ int depth;
+ XOvlVisExtData *visextdata;
+
+ candidateData = find_visdata(candidateVis, info);
+ partnerData = find_visdata(partnerVis, info);
+ if (!candidateData || !partnerData) {
+ /*
+ * Cannot store data for these visuals, assume the worst case.
+ */
+ return True;
+ }
+ if ( !(candidateData->datatypes & XOvlSharedColors)
+ || !( partnerData->datatypes & XOvlSharedColors))
+ {
+ scrextdata = find_screendata(dpy, screen, info);
+ if (!(scrextdata->visdatatypes & XOvlSharedColors)) {
+ /*
+ * We haven't queried the server for clut pool data
+ * on this screen yet. Send the query and fill in
+ * the data for the visuals indicated in the reply.
+ */
+ scr = ScreenOfDisplay(dpy, screen);
+ scrextdata->visdatatypes |= XOvlSharedColors;
+ GetReq(OvlGetSharedColors, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlGetSharedColors;
+ req->screen = screen;
+ if (_XReply(dpy, (xReply *)(&rep), 0, xFalse)) {
+ for (i = 0; i < rep.numClutInfos; i++) {
+ _XRead(dpy, (char *)(&clutinfo), sizeof(clutinfo));
+ if (find_visual(scr, clutinfo.vid, &vis, &depth)) {
+ visextdata = find_visdata(vis, info);
+ if (visextdata) {
+ visextdata->clutpool = (1 << clutinfo.pool);
+ visextdata->clutcount = clutinfo.count;
+ visextdata->datatypes |= XOvlSharedColors;
+ } else {
+ /*
+ * We were unable to finish the query, so mark
+ * the data as unqueried so we can try again later.
+ */
+ scrextdata->visdatatypes &= ~XOvlSharedColors;
+ }
+ }
+ }
+ }
+ }
+ if (!(candidateData->datatypes & XOvlSharedColors)) {
+ /*
+ * No data was returned from the server for this
+ * visual, so fill in a default value. Only mark
+ * the data valid if the server query completed.
+ */
+ candidateData->clutpool = XOVL_ANY_POOL;
+ candidateData->clutcount = 1;
+ if (scrextdata->visdatatypes & XOvlSharedColors) {
+ candidateData->datatypes |= XOvlSharedColors;
+ }
+ }
+ if (!(partnerData->datatypes & XOvlSharedColors)) {
+ /*
+ * No data was returned from the server for this
+ * visual, so fill in a default value. Only mark
+ * the data valid if the server query completed.
+ */
+ partnerData->clutpool = XOVL_ANY_POOL;
+ partnerData->clutcount = 1;
+ if (scrextdata->visdatatypes & XOvlSharedColors) {
+ partnerData->datatypes |= XOvlSharedColors;
+ }
+ }
+ }
+
+ return ( (candidateData->clutpool & partnerData->clutpool)
+ && candidateData->clutcount <= 1)
+ ? True
+ : False;
+}
+
+
+static void
+ComputeVisualMatch(
+ Display *dpy,
+ XOvlVisualMatch *match,
+ XSolarisOvlVisualCriteria *pCriteria,
+ XExtDisplayInfo *info)
+{
+ Visual *vis = match->candidate.vis;
+ unsigned long hardmask,
+ softmask,
+ mask;
+ unsigned long hardfailures,
+ softfailures;
+
+ hardmask = pCriteria->hardCriteriaMask;
+ softmask = pCriteria->softCriteriaMask;
+ mask = hardmask | softmask;
+ hardfailures = 0;
+ softfailures = 0;
+
+ if ( (mask & XSolarisOvlVisualClass)
+ && (vis->class != pCriteria->c_class))
+ {
+ hardfailures |= hardmask & XSolarisOvlVisualClass;
+ softfailures |= softmask & XSolarisOvlVisualClass;
+ }
+ if ( (mask & XSolarisOvlDepth)
+ && (match->candidate.depth != pCriteria->depth))
+ {
+ hardfailures |= hardmask & XSolarisOvlDepth;
+ softfailures |= softmask & XSolarisOvlDepth;
+ }
+ if ( (mask & XSolarisOvlMinColors)
+ && (vis->map_entries < pCriteria->minColors))
+ {
+ hardfailures |= hardmask & XSolarisOvlMinColors;
+ softfailures |= softmask & XSolarisOvlMinColors;
+ }
+ if ( (mask & XSolarisOvlMinRed)
+ && ((1 << bitcount(vis->red_mask)) < pCriteria->minRed))
+ {
+ hardfailures |= hardmask & XSolarisOvlMinRed;
+ softfailures |= softmask & XSolarisOvlMinRed;
+ }
+ if ( (mask & XSolarisOvlMinGreen)
+ && ((1 << bitcount(vis->green_mask)) < pCriteria->minGreen))
+ {
+ hardfailures |= hardmask & XSolarisOvlMinGreen;
+ softfailures |= softmask & XSolarisOvlMinGreen;
+ }
+ if ( (mask & XSolarisOvlMinBlue)
+ && ((1 << bitcount(vis->blue_mask)) < pCriteria->minBlue))
+ {
+ hardfailures |= hardmask & XSolarisOvlMinBlue;
+ softfailures |= softmask & XSolarisOvlMinBlue;
+ }
+ if ( (mask & XSolarisOvlMinBitsPerRGB)
+ && (vis->bits_per_rgb < pCriteria->minBitsPerRGB))
+ {
+ hardfailures |= hardmask & XSolarisOvlMinBitsPerRGB;
+ softfailures |= softmask & XSolarisOvlMinBitsPerRGB;
+ }
+ if ( (mask & XSolarisOvlMinBuffers)
+ && ( GetNumMBXBuffers(dpy, match->screen, vis, info)
+ < pCriteria->minBuffers))
+ {
+ hardfailures |= hardmask & XSolarisOvlMinBuffers;
+ softfailures |= softmask & XSolarisOvlMinBuffers;
+ }
+ if ( (mask & XSolarisOvlUnsharedPixels)
+ && CheckSharedPixels(dpy, match->screen, match->searchtype,
+ vis, match->partner.vis, info))
+ {
+ hardfailures |= hardmask & XSolarisOvlUnsharedPixels;
+ softfailures |= softmask & XSolarisOvlUnsharedPixels;
+ }
+ if ( (mask & XSolarisOvlUnsharedColors)
+ && CheckSharedColors(dpy, match->screen,
+ vis, match->partner.vis, info))
+ {
+ hardfailures |= hardmask & XSolarisOvlUnsharedColors;
+ softfailures |= softmask & XSolarisOvlUnsharedColors;
+ }
+ if ( (mask & XSolarisOvlPreferredPartner)
+ && (!match->partnerpreferred))
+ {
+ hardfailures |= hardmask & XSolarisOvlPreferredPartner;
+ softfailures |= softmask & XSolarisOvlPreferredPartner;
+ }
+ match->hardfailures = hardfailures;
+ match->numhardfailures = bitcount(hardfailures);
+ match->softfailures = softfailures;
+ match->numsoftfailures = bitcount(softfailures);
+}
+
+
+#define XSolarisOvlAllCriteria \
+ (XSolarisOvlVisualClass | \
+ XSolarisOvlDepth | \
+ XSolarisOvlMinColors | \
+ XSolarisOvlMinRed | \
+ XSolarisOvlMinGreen | \
+ XSolarisOvlMinBlue | \
+ XSolarisOvlMinBitsPerRGB | \
+ XSolarisOvlMinBuffers | \
+ XSolarisOvlUnsharedPixels | \
+ XSolarisOvlUnsharedColors | \
+ XSolarisOvlPreferredPartner)
+
+static void
+SetWorstMatch(
+ XOvlVisualMatch *match
+)
+{
+ match->hardfailures = XSolarisOvlAllCriteria;
+ match->softfailures = XSolarisOvlAllCriteria;
+ match->numhardfailures =
+ match->numsoftfailures =
+ bitcount(XSolarisOvlAllCriteria);
+}
+
+
+#define IsPerfectMatch(pm) (!((pm)->hardfailures | (pm)->softfailures))
+
+#define IsQualifiedMatch(pm) (!(pm)->hardfailures)
+
+#define IsBetterMatch(pm1, pm2) \
+ ( ((pm1)->numhardfailures < (pm2)->numhardfailures) \
+ || ( ((pm1)->numhardfailures == (pm2)->numhardfailures) \
+ && ((pm1)->numsoftfailures < (pm2)->numsoftfailures)))
+
+
+#define IsPerfectPair(povm, punm) \
+ (IsPerfectMatch(povm) && IsPerfectMatch(punm))
+
+#define IsQualifiedPair(povm, punm) \
+ (IsQualifiedMatch(povm) && IsQualifiedMatch(punm))
+
+#define IsBetterPair(povm1, punm1, povm2, punm2) \
+ ( ( ((povm1)->numhardfailures + (punm1)->numhardfailures) \
+ < ((povm2)->numhardfailures + (punm2)->numhardfailures)) \
+ || ( ( ((povm1)->numhardfailures + (punm1)->numhardfailures) \
+ == ((povm2)->numhardfailures + (punm2)->numhardfailures)) \
+ && ( ((povm1)->numsoftfailures + (punm1)->numsoftfailures) \
+ < ((povm2)->numsoftfailures + (punm2)->numsoftfailures))))
+
+
+static void
+set_visinfo(
+ XVisualInfo *visinfoReturn,
+ XOvlVisualMatch *match
+)
+{
+ Visual *vis = match->candidate.vis;
+
+ visinfoReturn->visual = vis;
+ visinfoReturn->visualid = match->candidate.vid;
+ visinfoReturn->screen = match->screen;
+ visinfoReturn->depth = match->candidate.depth;
+ visinfoReturn->class = vis->class;
+ visinfoReturn->red_mask = vis->red_mask;
+ visinfoReturn->green_mask = vis->green_mask;
+ visinfoReturn->blue_mask = vis->blue_mask;
+ visinfoReturn->colormap_size = vis->map_entries;
+ visinfoReturn->bits_per_rgb = vis->bits_per_rgb;
+}
+
+/**********************************************************************/
+
+Bool
+XSolarisOvlQueryExtension(
+ Display *dpy,
+ int *event_basep,
+ int *error_basep
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+
+ if (XextHasExtension(info)) {
+ *event_basep = info->codes->first_event;
+ *error_basep = info->codes->first_error;
+ return True;
+ } else {
+ return False;
+ }
+}
+
+
+Status
+XSolarisOvlQueryVersion(
+ Display *dpy,
+ int *major_versionp,
+ int *minor_versionp)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xOvlQueryVersionReply rep;
+ xOvlQueryVersionReq *req;
+
+ OvlCheckExtension(dpy, info, 0);
+
+ LockDisplay(dpy);
+ GetReq(OvlQueryVersion, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlQueryVersion;
+ if (!_XReply(dpy, (xReply *)(&rep), 0, xTrue)) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 0;
+ }
+ *major_versionp = rep.majorVersion;
+ *minor_versionp = rep.minorVersion;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+}
+
+
+Window
+XSolarisOvlCreateWindow(
+ Display *dpy,
+ Window parent,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
+ unsigned int border_width,
+ int depth,
+ unsigned int class,
+ Visual *visual,
+ unsigned long valuemask,
+ XSetWindowAttributes *attr
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ Window wid;
+ xOvlCreateWindowReq *req;
+
+ /*
+ * REMIND: Is there a proper return value to indicate error?
+ */
+ OvlCheckExtension(dpy, info, (Window) 0);
+
+ LockDisplay(dpy);
+ GetReq(OvlCreateWindow, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlCreateWindow;
+ req->parent = parent;
+ req->x = x;
+ req->y = y;
+ req->width = width;
+ req->height = height;
+ req->borderWidth = border_width;
+ req->depth = depth;
+ req->class = class;
+ if (visual == CopyFromParent) {
+ req->visual = CopyFromParent;
+ } else {
+ req->visual = visual->visualid;
+ }
+ wid = req->wid = XAllocID(dpy);
+ valuemask &= AllMaskBits;
+ if (req->mask = valuemask) {
+
+/* BugId 4130905 - There were only 3 args to this call instead of 4 -
+the last argument attr was missing - causing Bad Xerror Request. When
+the client lin libXext was recompiled, the bus error caused the
+client code to fail. Big change between 2.6 and 2.7 file. */
+
+ _XProcessWindowAttributes(dpy, (xChangeWindowAttributesReq *)req,
+ valuemask, attr);
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return wid;
+}
+
+
+Bool
+XSolarisOvlIsOverlayWindow(
+ Display *dpy,
+ Window w
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xOvlIsOverlayWindowReq *req;
+ xOvlIsOverlayWindowReply rep;
+
+ OvlCheckExtension(dpy, info, False);
+
+ LockDisplay(dpy);
+ GetReq(OvlIsOverlayWindow, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlIsOverlayWindow;
+ req->wid = w;
+ if (_XReply (dpy, (xReply *)(&rep), 0, xTrue) == 0) {
+ rep.isoverlay = False;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.isoverlay;
+}
+
+
+void
+XSolarisOvlSetWindowTransparent(
+ Display *dpy,
+ Window w)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xOvlSetWindowTransparentReq *req;
+
+ OvlSimpleCheckExtension(dpy, info);
+
+ LockDisplay(dpy);
+ GetReq(OvlSetWindowTransparent, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlSetWindowTransparent;
+ req->wid = w;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return;
+}
+
+
+Status
+XSolarisOvlSetPaintType(
+ Display *dpy,
+ GC gc,
+ XSolarisOvlPaintType paintType
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ XOvlGCExtData *gcextdata;
+ xOvlSetPaintTypeReq *req;
+ XEDataObject obj;
+
+ OvlCheckExtension(dpy, info, 0);
+
+ LockDisplay(dpy);
+ obj.gc = gc;
+ gcextdata = (XOvlGCExtData *)
+ XFindOnExtensionList(XEHeadOfExtensionList(obj),
+ info->codes->extension);
+ if (!gcextdata) {
+ if (paintType == XSolarisOvlPaintOpaque) {
+ /*
+ * No use creating an extension structure just to hold
+ * the default value.
+ */
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+ }
+ gcextdata = Xmalloc(sizeof(XOvlGCExtData));
+ if (!gcextdata) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 0;
+ }
+ gcextdata->extdata.number = info->codes->extension;
+ gcextdata->extdata.free_private = NULL;
+ gcextdata->extdata.private_data = NULL;
+ gcextdata->paintType = XSolarisOvlPaintOpaque;
+ XAddToExtensionList(XEHeadOfExtensionList(obj), &(gcextdata->extdata));
+ }
+ if (gcextdata->paintType != paintType) {
+ gcextdata->paintType = paintType;
+ FlushGC(dpy, gc);
+ GetReq(OvlSetPaintType, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlSetPaintType;
+ req->gc = gc->gid;
+ req->paintType = paintType;
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+}
+
+
+XSolarisOvlPaintType
+XSolarisOvlGetPaintType(
+ Display *dpy,
+ GC gc
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ XOvlGCExtData *gcextdata;
+ XSolarisOvlPaintType paintType;
+ XEDataObject obj;
+
+ OvlCheckExtension(dpy, info, XSolarisOvlPaintOpaque);
+
+ LockDisplay(dpy);
+ obj.gc = gc;
+ gcextdata = (XOvlGCExtData *)
+ XFindOnExtensionList(XEHeadOfExtensionList(obj),
+ info->codes->extension);
+ paintType = (gcextdata) ? gcextdata->paintType : XSolarisOvlPaintOpaque;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return paintType;
+}
+
+
+Status
+XSolarisOvlCopyPaintType(
+ Display *dpy,
+ Drawable src,
+ Drawable dst,
+ GC gc,
+ int src_x,
+ int src_y,
+ unsigned int width,
+ unsigned int height,
+ int dest_x,
+ int dest_y,
+ unsigned long action_mask,
+ unsigned long planemask
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xOvlCopyPaintTypeReq *req;
+
+ OvlCheckExtension(dpy, info, 0);
+
+ LockDisplay(dpy);
+ FlushGC(dpy, gc);
+ GetReq(OvlCopyPaintType, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlCopyPaintType;
+ req->srcDrawable = src;
+ req->dstDrawable = dst;
+ req->gc = gc->gid;
+ req->srcX = src_x;
+ req->srcY = src_y;
+ req->destX = dest_x;
+ req->destY = dest_y;
+ req->width = width;
+ req->height = height;
+ req->action_mask = action_mask;
+ req->bitPlane = planemask;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+}
+
+
+Status
+XSolarisOvlCopyAreaAndPaintType(
+ Display *dpy,
+ Drawable colorSrc,
+ Drawable paintTypeSrc,
+ Drawable colorDst,
+ Drawable paintTypeDst,
+ GC colorGC,
+ GC paintTypeGC,
+ int colorSrcX,
+ int colorSrcY,
+ int paintTypeSrcX,
+ int paintTypeSrcY,
+ unsigned int width,
+ unsigned int height,
+ int colorDstX,
+ int colorDstY,
+ int paintTypeDstX,
+ int paintTypeDstY,
+ unsigned long action_mask,
+ unsigned long planemask)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xOvlCopyAreaAndPaintTypeReq *req;
+
+ OvlCheckExtension(dpy, info, 0);
+
+ LockDisplay(dpy);
+ FlushGC(dpy, colorGC);
+ if (paintTypeGC && (paintTypeGC != colorGC))
+ FlushGC(dpy, paintTypeGC);
+ GetReq(OvlCopyAreaAndPaintType, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlCopyAreaAndPaintType;
+ req->colorSrc = colorSrc;
+ req->paintTypeSrc = paintTypeSrc;
+ req->colorDst = colorDst;
+ req->paintTypeDst = paintTypeDst;
+ req->colorGC = colorGC->gid;
+ req->paintTypeGC = (paintTypeGC) ? paintTypeGC->gid : None;
+ req->colorSrcX = colorSrcX;
+ req->colorSrcY = colorSrcY;
+ req->paintTypeSrcX = paintTypeSrcX;
+ req->paintTypeSrcY = paintTypeSrcY;
+ req->colorDstX = colorDstX;
+ req->colorDstY = colorDstY;
+ req->paintTypeDstX = paintTypeDstX;
+ req->paintTypeDstY = paintTypeDstY;
+ req->width = width;
+ req->height = height;
+ req->action_mask = action_mask;
+ req->bitPlane = planemask;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return 1;
+}
+
+
+XImage *
+XReadScreen(
+ Display *dpy,
+ Window w,
+ int x,
+ int y,
+ unsigned int width,
+ unsigned int height,
+ Bool includeCursor
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ xOvlReadScreenReq *req;
+ xOvlReadScreenReply rep;
+ char *data;
+ long nbytes;
+ XImage *image;
+
+ OvlCheckExtension(dpy, info, NULL);
+
+ LockDisplay(dpy);
+ GetReq (OvlReadScreen, req);
+ req->reqType = info->codes->major_opcode;
+ req->ovlReqType = X_OvlReadScreen;
+ req->window = w;
+ req->x = x;
+ req->y = y;
+ req->width = width;
+ req->height = height;
+ req->includeCursor = includeCursor;
+
+ if ( (_XReply(dpy, (xReply *)(&rep), 0, xFalse) == 0)
+ || (rep.length == 0))
+ {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return NULL;
+ }
+ nbytes = (long)rep.length << 2;
+ data = (char *)Xmalloc((size_t)nbytes);
+ if (!data) {
+ _XEatData(dpy, (unsigned long)nbytes);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return NULL;
+ }
+ _XReadPad (dpy, data, nbytes);
+ image = XCreateImage(dpy, None,
+ 24, ZPixmap, 0, data, width, height,
+ dpy->bitmap_pad, 0);
+ if (image) {
+ image->red_mask = READSCREEN_REDMASK;
+ image->green_mask = READSCREEN_GREENMASK;
+ image->blue_mask = READSCREEN_BLUEMASK;
+ } else {
+ Xfree(data);
+ }
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return image;
+}
+
+
+XSolarisOvlSelectStatus
+XSolarisOvlSelectPartner(
+ Display *dpy,
+ int screen,
+ VisualID vid,
+ XSolarisOvlSelectType vistype,
+ int numCriteria,
+ XSolarisOvlVisualCriteria *pCriteria,
+ XVisualInfo *visinfoReturn,
+ unsigned long *unmetCriteriaReturn
+)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ Screen *scr;
+ XOvlScrExtData *scrextdata;
+ XOvlVisPair *vispair;
+ int i,
+ j;
+ Depth *depth;
+ XOvlVisInfo partner;
+ XOvlVisualMatch curMatch,
+ betterMatch,
+ bestMatch;
+ XOvlVisEnumData visEnumData;
+ unsigned long hardpreferred,
+ softpreferred;
+
+ OvlCheckExtension(dpy, info, XSolarisOvlFailure);
+
+ LockDisplay(dpy);
+ scr = ScreenOfDisplay(dpy, screen);
+ scrextdata = find_screendata(dpy, screen, info);
+ if (!scrextdata) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlFailure;
+ }
+ curMatch.screen = screen;
+ curMatch.partner.vid = vid;
+ if (!find_visual(scr, vid, &curMatch.partner.vis, &curMatch.partner.depth))
+ {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlFailure;
+ }
+ curMatch.searchtype = vistype;
+ SetWorstMatch(&bestMatch);
+ for (i = numCriteria; i > 0; --i) {
+ SetWorstMatch(&betterMatch);
+ curMatch.partnerpreferred = True;
+ vispair = (XOvlVisPair *)(scrextdata->extdata.private_data);
+ for (j = scrextdata->numVisPairs; j > 0; --j) {
+ if (vid ==
+ ((vistype == XSolarisOvlSelectBestOverlay)
+ ? (vispair->underlay.vid)
+ : (vispair->overlay.vid)))
+ {
+ curMatch.candidate = (vistype == XSolarisOvlSelectBestOverlay)
+ ? vispair->overlay
+ : vispair->underlay;
+ ComputeVisualMatch(dpy, &curMatch, pCriteria, info);
+ if (IsPerfectMatch(&curMatch)) {
+ set_visinfo(visinfoReturn, &curMatch);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlSuccess;
+ }
+ if (IsBetterMatch(&curMatch, &betterMatch)) {
+ betterMatch = curMatch;
+ }
+ }
+ vispair++;
+ }
+ if (!scrextdata->pairsRestricted) {
+ curMatch.partnerpreferred = False;
+ vis_enum_init(scr, &visEnumData);
+ while (vis_enum_next(&visEnumData,
+ &curMatch.candidate.vis,
+ &curMatch.candidate.depth))
+ {
+ curMatch.candidate.vid = curMatch.candidate.vis->visualid;
+ ComputeVisualMatch(dpy, &curMatch, pCriteria, info);
+ if (IsPerfectMatch(&curMatch)) {
+ set_visinfo(visinfoReturn, &curMatch);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlSuccess;
+ }
+ if (IsBetterMatch(&curMatch, &betterMatch)) {
+ betterMatch = curMatch;
+ }
+ }
+ }
+ if (IsQualifiedMatch(&betterMatch)) {
+ set_visinfo(visinfoReturn, &betterMatch);
+ *unmetCriteriaReturn = betterMatch.softfailures;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlQualifiedSuccess;
+ }
+ if (IsBetterMatch(&betterMatch, &bestMatch)) {
+ bestMatch = betterMatch;
+ }
+ pCriteria++;
+ }
+ *unmetCriteriaReturn = bestMatch.hardfailures | bestMatch.softfailures;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlCriteriaFailure;
+}
+
+
+XSolarisOvlSelectStatus
+XSolarisOvlSelectPair(
+ Display *dpy,
+ int screen,
+ int numCriteria,
+ XSolarisOvlPairCriteria *pCriteria,
+ XVisualInfo *ovVisinfoReturn,
+ XVisualInfo *unVisinfoReturn,
+ unsigned long *unmetOvCriteriaReturn,
+ unsigned long *unmetUnCriteriaReturn)
+{
+ XExtDisplayInfo *info = find_display(dpy);
+ Screen *scr;
+ XOvlScrExtData *scrextdata;
+ XOvlVisPair *vispair;
+ int i,
+ j;
+ XOvlVisualMatch curOvMatch, curUnMatch,
+ betterOvMatch, betterUnMatch,
+ bestOvMatch, bestUnMatch;
+ XOvlVisEnumData ovVisEnumData, unVisEnumData;
+
+ OvlCheckExtension(dpy, info, XSolarisOvlFailure);
+ LockDisplay(dpy);
+ scr = ScreenOfDisplay(dpy, screen);
+ scrextdata = find_screendata(dpy, screen, info);
+ if (!scrextdata) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlFailure;
+ }
+ curOvMatch.screen = curUnMatch.screen = screen;
+ curOvMatch.searchtype = XSolarisOvlSelectBestUnderlay;
+ curUnMatch.searchtype = XSolarisOvlSelectBestOverlay;
+ SetWorstMatch(&bestOvMatch);
+ SetWorstMatch(&bestUnMatch);
+ for (i = numCriteria; i > 0; --i) {
+ SetWorstMatch(&betterOvMatch);
+ SetWorstMatch(&betterUnMatch);
+ curOvMatch.partnerpreferred = curUnMatch.partnerpreferred = True;
+ vispair = (XOvlVisPair *)(scrextdata->extdata.private_data);
+ for (j = scrextdata->numVisPairs; j > 0; --j) {
+ curOvMatch.candidate = curUnMatch.partner = vispair->overlay;
+ curOvMatch.partner = curUnMatch.candidate = vispair->underlay;
+ ComputeVisualMatch(dpy, &curOvMatch,
+ &pCriteria->overlayCriteria, info);
+ ComputeVisualMatch(dpy, &curUnMatch,
+ &pCriteria->underlayCriteria, info);
+ if (IsPerfectPair(&curOvMatch, &curUnMatch)) {
+ set_visinfo(unVisinfoReturn, &curUnMatch);
+ set_visinfo(ovVisinfoReturn, &curOvMatch);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlSuccess;
+ }
+ if (IsBetterPair(&curOvMatch, &curUnMatch,
+ &betterOvMatch, &betterUnMatch))
+ {
+ betterOvMatch = curOvMatch;
+ betterUnMatch = curUnMatch;
+ }
+ vispair++;
+ }
+ if (!scrextdata->pairsRestricted) {
+ curOvMatch.partnerpreferred = False;
+ curUnMatch.partnerpreferred = False;
+ vis_enum_init(scr, &ovVisEnumData);
+ while (vis_enum_next(&ovVisEnumData,
+ &curOvMatch.candidate.vis,
+ &curOvMatch.candidate.depth))
+ {
+ curOvMatch.candidate.vid = curOvMatch.candidate.vis->visualid;
+ curUnMatch.partner = curOvMatch.candidate;
+ vis_enum_init(scr, &unVisEnumData);
+ while (vis_enum_next(&unVisEnumData,
+ &curUnMatch.candidate.vis,
+ &curUnMatch.candidate.depth))
+ {
+ curUnMatch.candidate.vid =
+ curUnMatch.candidate.vis->visualid;
+ curOvMatch.partner = curUnMatch.candidate;
+ ComputeVisualMatch(dpy, &curOvMatch,
+ &pCriteria->overlayCriteria, info);
+ ComputeVisualMatch(dpy, &curUnMatch,
+ &pCriteria->underlayCriteria, info);
+ if (IsPerfectPair(&curOvMatch, &curUnMatch)) {
+ set_visinfo(unVisinfoReturn, &curUnMatch);
+ set_visinfo(ovVisinfoReturn, &curOvMatch);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlSuccess;
+ }
+ if (IsBetterPair(&curOvMatch, &curUnMatch,
+ &betterOvMatch, &betterUnMatch))
+ {
+ betterOvMatch = curOvMatch;
+ betterUnMatch = curUnMatch;
+ }
+ }
+ }
+ }
+ if (IsQualifiedPair(&betterOvMatch, &betterUnMatch)) {
+ set_visinfo(ovVisinfoReturn, &betterOvMatch);
+ set_visinfo(unVisinfoReturn, &betterUnMatch);
+ *unmetOvCriteriaReturn = betterOvMatch.softfailures;
+ *unmetUnCriteriaReturn = betterUnMatch.softfailures;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlQualifiedSuccess;
+ }
+ if (IsBetterPair(&betterOvMatch, &betterUnMatch,
+ &bestOvMatch, &bestUnMatch))
+ {
+ bestOvMatch = betterOvMatch;
+ bestUnMatch = betterUnMatch;
+ }
+ pCriteria++;
+ }
+ *unmetOvCriteriaReturn = bestOvMatch.hardfailures|bestOvMatch.softfailures;
+ *unmetUnCriteriaReturn = bestUnMatch.hardfailures|bestUnMatch.softfailures;
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return XSolarisOvlCriteriaFailure;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/src/XGrabWin.c Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,336 @@
+/* Copyright 2008 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * 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
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#ifndef lint
+static char sccsid[] = "@(#)XGrabWin.c 35.5 08/03/12 SMI";
+#endif
+/*-
+ *-----------------------------------------------------------------------
+ * XGrabWin.c - X11 Client Side interface to Window Grabber.
+ *
+ * This code uses the standard R3 extension mechanism for sending the grab or
+ * ungrab window requests. If the extension isn't present, it uses the un-used
+ * protocol if the server is from Sun.
+ *
+ * The global state is only relevant to one display. Multiple displays
+ * will have to be implemented via arrays of global data.
+ *-----------------------------------------------------------------------
+ */
+#define NEED_REPLIES
+#define NEED_EVENTS
+
+#include <string.h>
+#include <unistd.h>
+
+#include <X11/Xlibint.h> /* from usr.lib/libX11 */
+#include <X11/Xproto.h> /* from usr.lib/libX11/include */
+#include <X11/extensions/dgast.h>
+
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <sys/types.h>
+ /* Unused requests */
+#define X_GrabWindow 125 /* should be in Xproto.h */
+#define X_UnGrabWindow 126 /* just before X_NoOperation */
+
+#define BadCookie 0
+
+static int X_WxExtensionCode;
+
+static int WxError (Display *dpy,int mc);
+
+static enum {
+ NOT_INITIALIZED,
+ USE_EXTENSION,
+ USE_EXTRA_PROTOCOL,
+ NOT_LOCAL_HOST
+ } WxInitialized = NOT_INITIALIZED;
+
+static void
+Initialize(dpy)
+ Display *dpy;
+{
+ int tmp;
+
+ if (dpy->display_name[0] != ':') {
+ char hostname[64];
+
+ gethostname(hostname,64);
+ if (strncmp("unix",dpy->display_name,4) &&
+ strncmp("localhost",dpy->display_name,9) &&
+ strncmp(hostname,dpy->display_name,strlen(hostname))) {
+ WxInitialized = NOT_LOCAL_HOST;
+ return;
+ }
+ }
+
+ if (XQueryExtension(dpy, "SunWindowGrabber",&X_WxExtensionCode,
+ &tmp, &tmp))
+ WxInitialized = USE_EXTENSION;
+ else if (!strcmp(dpy->vendor,"X11/NeWS - Sun Microsystems Inc."))
+ WxInitialized = USE_EXTRA_PROTOCOL;
+}
+
+int
+XGrabWindow(dpy, win)
+ Display *dpy;
+ Window win;
+{
+ xResourceReq *req;
+ xGenericReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, win, req);
+ req->pad = X_WxGrab;
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.data00;
+ case USE_EXTRA_PROTOCOL:
+ LockDisplay(dpy);
+ GetResReq(GrabWindow, win, req);
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return (rep.data00); /* GrabToken */
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxGrab);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+int
+XUnGrabWindow(dpy, win)
+ Display *dpy;
+ Window win;
+{
+ xResourceReq *req;
+ xGenericReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, win, req);
+ req->pad = X_WxUnGrab;
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.data00; /* Status */
+ case USE_EXTRA_PROTOCOL:
+ LockDisplay(dpy);
+ GetResReq(UnGrabWindow, win, req);
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return (rep.data00); /* Status */
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxUnGrab);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+
+int
+XGrabColormap(dpy, cmap)
+ Display *dpy;
+ Colormap cmap;
+{
+ xResourceReq *req;
+ xGenericReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, cmap, req);
+ req->pad = X_WxGrabColormap;
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.data00;
+ case USE_EXTRA_PROTOCOL:
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxGrabColormap);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+int
+XUnGrabColormap(dpy, cmap)
+ Display *dpy;
+ Colormap cmap;
+{
+ xResourceReq *req;
+ xGenericReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, cmap, req);
+ req->pad = X_WxUnGrabColormap;
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.data00; /* Status */
+ case USE_EXTRA_PROTOCOL:
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxGrabColormap);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+
+int
+XGrabRetainedWindow(dpy, win)
+ Display *dpy;
+ Window win;
+{
+ xResourceReq *req;
+ xGenericReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, win, req);
+ req->pad = X_WxGrabRetained;
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.data00;
+ case USE_EXTRA_PROTOCOL:
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxGrabRetained);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+int
+XUnGrabRetainedWindow(dpy, win)
+ Display *dpy;
+ Window win;
+{
+ xResourceReq *req;
+ xGenericReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, win, req);
+ req->pad = X_WxUnGrabRetained;
+ (void) _XReply(dpy, (xReply *) &rep, 0, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return rep.data00; /* Status */
+ case USE_EXTRA_PROTOCOL:
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxUnGrabRetained);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+
+int
+XGetRetainedPath(dpy, win, path)
+ Display *dpy;
+ Window win;
+ char *path;
+{
+ xResourceReq *req;
+ xOWGXRtndPathReply rep;
+
+ if (WxInitialized == NOT_INITIALIZED)
+ Initialize(dpy);
+
+ switch (WxInitialized) {
+ case USE_EXTENSION:
+ LockDisplay(dpy);
+ GetResReq(WxExtensionCode, win, req);
+ req->pad = X_WxGetRetainedPath;
+ (void) _XReply(dpy, (xReply *) &rep,
+ (SIZEOF(xOWGXRtndPathReply) - SIZEOF(xReply)) >> 2, xFalse);
+ UnlockDisplay(dpy);
+ SyncHandle();
+ strcpy(path, rep.path);
+ return;
+ case USE_EXTRA_PROTOCOL:
+ case NOT_INITIALIZED:
+ WxError(dpy,X_WxGetRetainedPath);
+ case NOT_LOCAL_HOST:
+ return BadCookie;
+ }
+}
+
+
+
+
+
+static int
+WxError (dpy,mc)
+ Display *dpy;
+ int mc;
+{
+ XErrorEvent event;
+ extern int (*_XErrorFunction)();
+
+ event.display = dpy;
+ event.type = X_Error;
+ event.error_code = BadImplementation;
+ event.request_code = 0xff; /* Means that we were requesting an extension*/
+ event.minor_code = mc;
+ event.serial = dpy->request;
+ if (_XErrorFunction != NULL) {
+ return ((*_XErrorFunction)(dpy, &event));
+ }
+ exit(1);
+ /*NOTREACHED*/
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/open-src/lib/libXext/sun-src/src/XPanoramiX.c Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,682 @@
+/* $TOG: XPanoramiX.c /main/2 1997/11/16 08:45:41 kaleb $ */
+/*****************************************************************
+
+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.
+
+******************************************************************/
+/* Copyright 2008 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * 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
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ */
+
+#define NEED_EVENTS
+#define NEED_REPLIES
+#include <X11/Xlibint.h>
+#include <X11/Xutil.h>
+#include <X11/Xresource.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>
+
+Bool XGetXineramaInfo(Display *dpy, int screen_number, XID VirtualWID, XineramaInfo *info);
+
+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();
+static Bool wire_to_event();
+static Status event_to_wire();
+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)
+
+
+
+#ifdef SUNSOFT
+struct XineramaExtVersionInfo
+{
+ int major_vers, minor_vers;
+};
+
+/**** Code taken from xc/include/extensions/Xinerama.h in Xorg for
+ compatibility with XFree86 & Xorg protocols ****/
+
+static 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().
+*/
+typedef struct {
+ int screen_number;
+ short x_org;
+ short y_org;
+ short width;
+ short height;
+} XineramaScreenInfo;
+
+static XineramaScreenInfo *
+XineramaQueryScreens(
+ Display *dpy,
+ int *number
+);
+
+#endif
+
+/****************************************************************************
+ * *
+ * PanoramiX public interfaces *
+ * *
+ ****************************************************************************/
+
+Bool XPanoramiXQueryExtension (dpy, event_basep, error_basep)
+ Display *dpy;
+ int *event_basep, *error_basep;
+{
+ XExtDisplayInfo *info = find_display (dpy);
+
+ if (XextHasExtension(info)) {
+ *event_basep = info->codes->first_event;
+ *error_basep = info->codes->first_error;
+ return True;
+ } else {
+ return False;
+ }
+}
+
+
+Status XPanoramiXQueryVersion(dpy, major_versionp, minor_versionp)
+ Display *dpy;
+ int *major_versionp, *minor_versionp;
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ xPanoramiXQueryVersionReply rep;
+ register xPanoramiXQueryVersionReq *req;
+
+#ifdef SUNSOFT
+ struct XineramaExtVersionInfo *vinfo;
+
+ if (info->data != NULL) {
+ vinfo = (struct XineramaExtVersionInfo *) info->data;
+
+ *major_versionp = vinfo->major_vers;
+ *minor_versionp = vinfo->minor_vers;
+ return 1;
+ }
+#endif
+
+ 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_versionp = rep.majorVersion;
+ *minor_versionp = rep.minorVersion;
+#ifdef SUNSOFT /* Cache version info */
+ vinfo = Xmalloc(sizeof(struct XineramaExtVersionInfo));
+
+ if (vinfo != NULL) {
+ vinfo->major_vers = rep.majorVersion;
+ vinfo->minor_vers = rep.minorVersion;
+ info->data = (XPointer) vinfo;
+ }
+#endif
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return 1;
+}
+
+XPanoramiXInfo *XPanoramiXAllocInfo()
+{
+ return (XPanoramiXInfo *) Xmalloc (sizeof (XPanoramiXInfo));
+}
+
+Status XPanoramiXGetState (dpy, drawable, panoramiX_info)
+ 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 (dpy, drawable, panoramiX_info)
+ 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 (dpy, drawable, screen_num, panoramiX_info)
+ 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;
+}
+
+
+/* new api for xinerama */
+
+Bool XineramaGetState(Display * display, int screen_number)
+{
+ XExtDisplayInfo *info = find_display (display);
+
+ /* screen_number may seem like hyper-bogus stuff, but:
+ it may be possible to have 2 xinerama screen sets on
+ one server */
+
+ if(screen_number)
+ return False; /* no no, must say zero */
+
+ if(!XextHasExtension(info))
+ return False;
+ else
+ {
+ int maj, min;
+
+ if (XPanoramiXQueryVersion(display, &maj, &min) == 0) {
+ return False;
+ }
+ if ((maj == 1) && (min >= 0)) {
+ return XineramaIsActive(display);
+ } else {
+ return True; /* can't check in 1.0 protocol */
+ }
+ }
+}
+
+Status XineramaGetInfo(Display * display, int screen_number, XRectangle *
+ framebuffer_rects, unsigned char * framebuffer_hints, int *
+ num_framebuffers )
+
+{
+ int framebuffercount; /* number of fb's we know about */
+ int i; /* fortran */
+ Window win;
+ int x = 0, y = 0;
+ int maj, min;
+
+ if(!XineramaGetState(display, screen_number))
+ return 0;
+
+ if (XPanoramiXQueryVersion(display, &maj, &min) == 0) {
+ return 0;
+ }
+ if ((maj == 1) && (min >= 0)) {
+ /* Use XFree86/Xorg extended protocol */
+ XineramaScreenInfo *xsi;
+
+ xsi = XineramaQueryScreens(display, &framebuffercount);
+ if (xsi == NULL || framebuffercount == 0) {
+ return 0;
+ }
+ for (i = 0; i < framebuffercount ; i++) {
+ framebuffer_rects[i].x = xsi[i].x_org;
+ framebuffer_rects[i].y = xsi[i].y_org;
+ framebuffer_rects[i].width = xsi[i].width;
+ framebuffer_rects[i].height = xsi[i].height;
+ }
+ XFree(xsi);
+ } else {
+ /* Use Sun extended protocol */
+ XPanoramiXInfo panoramiX_info;
+ XineramaInfo *info; /* list of screen x,y etc */
+
+ /* get the count of screens that we need to know about
+ NOTE: screen_number implies a set of fb's for this
+ working surface */
+
+ win = 0;
+
+ XPanoramiXGetScreenCount(display, win, &panoramiX_info);
+
+ if(!panoramiX_info.ScreenCount) {
+ return 0;
+ }
+ framebuffercount = panoramiX_info.ScreenCount;
+
+ /* Make sure not to overflow buffers if X server has more screens
+ than we expect */
+ if (framebuffercount > MAXSCREEN)
+ framebuffercount = MAXSCREEN;
+
+ info = malloc(sizeof(XineramaInfo));
+
+ if(!info)
+ return 0;
+
+ /* now read the servers list of frame buffers */
+
+ if(!XGetXineramaInfo(display,screen_number,
+ (XID) RootWindow(display,screen_number),info))
+ {
+ free(info);
+ return 0;
+ }
+
+
+ for(i = 0; i < framebuffercount; i++)
+ {
+ framebuffer_rects[i].x = info->subs[i].dx;
+ framebuffer_rects[i].y = info->subs[i].dy;
+ framebuffer_rects[i].width = info->subs[i].wdx;
+ framebuffer_rects[i].height = info->subs[i].wdy;
+ }
+
+ free(info);
+ }
+
+ *num_framebuffers = framebuffercount;
+
+ /* assume the start up and list are in the same order */
+
+ for(i = 0; i < framebuffercount; i++)
+ {
+ framebuffer_hints[i] = 0;
+ if (i > 0) /* fb0 never gets a hint */
+ {
+ if (framebuffer_rects[i].x > x) { /* right */
+ if (framebuffer_rects[i].y == y)
+ framebuffer_hints[i] = XINERAMA_PLACE_RIGHT;
+ }
+ else if (framebuffer_rects[i].x == x) { /* up/down */
+ if (framebuffer_rects[i].y > y)
+ framebuffer_hints[i] = XINERAMA_PLACE_TOP;
+ else if (framebuffer_rects[i].y < y)
+ framebuffer_hints[i] = XINERAMA_PLACE_BOTTOM;
+ } else if (framebuffer_rects[i].x < x) { /* left */
+ if (framebuffer_rects[i].y == y)
+ framebuffer_hints[i] = XINERAMA_PLACE_LEFT;
+ }
+ }
+ x = framebuffer_rects[i].x;
+ y = framebuffer_rects[i].y;
+
+ }
+ return framebuffercount;
+}
+
+Bool
+XGetXineramaInfo(Display *dpy ,int screen_number,XID VirtualWID,XineramaInfo *info )
+{
+ xXineramaInfoReq *req;
+ xXineramaInfoReply *rep;
+ XExtDisplayInfo *Extinfo = find_display (dpy);
+
+ if(!XineramaGetState(dpy, screen_number))
+ return False;
+
+ rep = malloc(sizeof(xXineramaInfoReply));
+
+ LockDisplay(dpy);
+ GetReq(XineramaInfo, req);
+ req->reqType = Extinfo->codes->major_opcode;
+ req->xXineramaReqType = X_XineramaInfo;
+ req->visual = VirtualWID;
+
+ if (!_XReply(dpy, (xReply *)rep, (sizeof(xXineramaInfoReply)-32) >> 2
+,
+ xFalse))
+ {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ Xfree(rep);
+ return NULL;
+ }
+ info->wid = VirtualWID;
+ memcpy(&info->subs[0],&rep->subs[0],(MAXSCREEN-1) * sizeof(SubWID));
+ UnlockDisplay(dpy);
+ SyncHandle();
+ free(rep);
+ return 1;
+}
+
+Status XineramaGetCenterHint(Display* display, int screen_number,
+ int* xret, int* yret)
+{
+ int x = -1;
+ int y = -1;
+ int fb = -1;
+ int fbs;
+ XrmDatabase xrdb;
+ XrmValue value;
+ char* vtype;
+ char buffer[20];
+ XRectangle rects[MAXSCREEN];
+ unsigned char hints[MAXSCREEN];
+ Bool xiGetState, xiGetInfo;
+ long n;
+
+
+ if (screen_number)
+ return 0; /* don't yet support multiple Xinerama screens */
+
+ xiGetState = XineramaGetState(display, screen_number);
+ xiGetInfo = XineramaGetInfo(display, screen_number, rects, hints, &fbs);
+
+ if (xrdb = XrmGetDatabase(display))
+ {
+ if (XrmGetResource(xrdb, "xineramaDefaultFramebuffer",
+ "XineramaDefaultFramebuffer", &vtype, &value))
+ {
+ if (value.size < sizeof(buffer)) {
+ strncpy(buffer, value.addr, value.size);
+ buffer[value.size] = 0;
+ errno = 0;
+ n = strtol(buffer, (char **)NULL, 10);
+ if ( ! ((n == 0) && (errno == EINVAL)) )
+ fb = n;
+ }
+ }
+
+ if (!xiGetState || !xiGetInfo)
+ fbs = 1;
+ if ((fb < 0) || (fb >= fbs)) /* fb value not valid */
+ {
+ if (XrmGetResource(xrdb, "xineramaCenterHintX", "XineramaCenterHintX",
+ &vtype, &value))
+ {
+ if (value.size < sizeof(buffer)) {
+ strncpy(buffer, value.addr, value.size);
+ buffer[value.size] = 0;
+ errno = 0;
+ n = strtol(buffer, (char **)NULL, 10);
+ if ( ! ((n == 0) && (errno == EINVAL)) )
+ x = n;
+ }
+ }
+ if (XrmGetResource(xrdb, "xineramaCenterHintY", "XineramaCenterHintY",
+ &vtype, &value))
+ {
+ if (value.size < sizeof(buffer)) {
+ strncpy(buffer, value.addr, value.size);
+ buffer[value.size] = 0;
+ errno = 0;
+ n = strtol(buffer, (char **)NULL, 10);
+ if ( ! ((n == 0) && (errno == EINVAL)) )
+ y = n;
+ }
+ }
+ }
+ }
+
+ if (!xiGetState)
+ {
+ /* Xinerama is not active, so there's only one framebuffer */
+ /* (for screen 0). Return appropriate values anyway. */
+
+ if (fb == 0) /* assume screen == fb == 0. Code only supports one screen.*/
+ {
+ *xret = (WidthOfScreen(ScreenOfDisplay(display, 0))) / 2;
+ *yret = (HeightOfScreen(ScreenOfDisplay(display, 0))) / 2;
+ }
+ else
+ {
+ if ((x >= 0) && (x < WidthOfScreen(ScreenOfDisplay(display, 0))))
+ *xret = x;
+ else
+ *xret = (WidthOfScreen(ScreenOfDisplay(display, 0))) / 2;
+
+ if ((y >= 0) && (y < HeightOfScreen(ScreenOfDisplay(display, 0))))
+ *yret = y;
+ else
+ *yret = (HeightOfScreen(ScreenOfDisplay(display, 0))) / 2;
+ }
+ }
+ else
+ {
+ /* Xinerama is active, so do the right thing. */
+
+ if (!xiGetInfo)
+ return 0;
+
+ if ((fb > -1) && (fb < fbs)) /* if fb has a legal value */
+ {
+ *xret = rects[fb].x + (rects[fb].width / 2);
+ *yret = rects[fb].y + (rects[fb].height / 2);
+ }
+ else
+ {
+ if ((x >= 0) && (x < WidthOfScreen(ScreenOfDisplay(display, 0))))
+ *xret = x;
+ else
+ *xret = (WidthOfScreen(ScreenOfDisplay(display, 0))) / 2;
+
+ if ((y >= 0) && (y < HeightOfScreen(ScreenOfDisplay(display, 0))))
+ *yret = y;
+ else
+ *yret = (HeightOfScreen(ScreenOfDisplay(display, 0))) / 2;
+ }
+ }
+ return 1;
+}
+
+/**** Code taken from xc/lib/Xinerama/Xinerama.c in Xorg for compatibility with
+ XFree86 & Xorg Xinerama 1.1 protocol ****/
+
+/*******************************************************************\
+ 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".
+\*******************************************************************/
+
+static
+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;
+}
+
+static
+XineramaScreenInfo *
+XineramaQueryScreens(
+ Display *dpy,
+ int *number
+)
+{
+ XExtDisplayInfo *info = find_display (dpy);
+ xXineramaQueryScreensReply rep;
+ xXineramaQueryScreensReq *req;
+ XineramaScreenInfo *scrnInfo = NULL;
+
+ PanoramiXCheckExtension (dpy, info, 0);
+
+ 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);
+ }
+
+ UnlockDisplay (dpy);
+ SyncHandle ();
+ return scrnInfo;
+}
+
+
+
--- a/packages/SUNWxwinc/copyright.add Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwinc/copyright.add Wed Mar 12 17:08:43 2008 -0700
@@ -143,6 +143,10 @@
include lib/libXdmcp/COPYING
------------------------------------------------------------------------------
+Files from the lib/libXevie package are covered by the following notice:
+
+include lib/libXevie/COPYING
+------------------------------------------------------------------------------
Files from the lib/libXfixes package are covered by the following notice:
include lib/libXfixes/COPYING
--- a/packages/SUNWxwinc/prototype Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwinc/prototype Wed Mar 12 17:08:43 2008 -0700
@@ -27,7 +27,7 @@
# of the copyright holder.
#
#
-# ident "@(#)prototype 35.82 08/03/10 SMI"
+# ident "@(#)prototype 35.83 08/03/12 SMI"
#
# X Window System include files
@@ -340,8 +340,6 @@
f none openwin/share/include/X11/extensions/XKBrules.h 0644 root bin
f none openwin/share/include/X11/extensions/XKM.h 0644 root bin
f none openwin/share/include/X11/extensions/XKMformat.h 0644 root bin
-f none openwin/share/include/X11/extensions/Xevie.h 0644 root bin
-f none openwin/share/include/X11/extensions/xinerama.h 0644 root bin
f none openwin/share/include/X11/extensions/Xtsol.h 0644 root bin
f none openwin/share/include/X11/extensions/Xtsolproto.h 0644 root bin
@@ -491,6 +489,14 @@
s none openwin/share/include/X11/extensions/Xdamage.h=../../../../../X11/include/X11/extensions/Xdamage.h
f none X11/include/X11/extensions/Xdamage.h 0444 root bin
+# open-src/lib/libXevie
+s none openwin/share/include/X11/extensions/Xevie.h=../../../../../X11/include/X11/extensions/Xevie.h
+f none X11/include/X11/extensions/Xevie.h 0444 root bin
+
+# open-src/lib/libXext
+s none openwin/share/include/X11/extensions/xinerama.h=../../../../../X11/include/X11/extensions/xinerama.h
+f none X11/include/X11/extensions/xinerama.h 0444 root bin
+
# open-src/lib/libXfixes
s none openwin/share/include/X11/extensions/Xfixes.h=../../../../../X11/include/X11/extensions/Xfixes.h
f none X11/include/X11/extensions/Xfixes.h 0444 root bin
--- a/packages/SUNWxwplt/copyright.add Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwplt/copyright.add Wed Mar 12 17:08:43 2008 -0700
@@ -282,6 +282,14 @@
include lib/libXdmcp/COPYING
------------------------------------------------------------------------------
+Files from the lib/libXevie package are covered by the following notice:
+
+include lib/libXevie/COPYING
+------------------------------------------------------------------------------
+Files from the lib/libXext package are covered by the following notice:
+
+include lib/libXext/COPYING
+------------------------------------------------------------------------------
Files from the lib/libXfixes package are covered by the following notice:
include lib/libXfixes/COPYING
@@ -314,6 +322,10 @@
include lib/libXres/COPYING
------------------------------------------------------------------------------
+Files from the lib/libXScrnSaver package are covered by the following notice:
+
+include lib/libXScrnSaver/COPYING
+------------------------------------------------------------------------------
Files from the lib/libXt package are covered by the following notice:
include lib/libXt/COPYING
--- a/packages/SUNWxwplt/prototype_com Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwplt/prototype_com Wed Mar 12 17:08:43 2008 -0700
@@ -26,7 +26,7 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
-# "@(#)prototype_com 35.168 08/03/07 Sun Microsystems"
+# "@(#)prototype_com 35.169 08/03/12 Sun Microsystems"
#
# X Window System required core package
@@ -197,8 +197,6 @@
s none openwin/lib/rgb.dir=X11/rgb.dir
s none openwin/lib/rgb.txt=X11/rgb.txt
-f none openwin/lib/libXext.so.0 0755 root bin
-s none openwin/lib/libXext.so=./libXext.so.0
s none openwin/lib/libXaw.so=./libXaw.so.5
f none openwin/lib/libXaw.so.5 0755 root bin
f none openwin/lib/libXaw.so.4 0755 root bin
@@ -273,6 +271,16 @@
s none X11/lib/libXdmcp.so=./libXdmcp.so.6
f none X11/lib/libXdmcp.so.6 0555 root bin
+# open-src/lib/libXevie (never delivered into /usr/openwin/lib)
+s none X11/lib/libXevie.so=./libXevie.so.1
+f none X11/lib/libXevie.so.1 0555 root bin
+
+# open-src/lib/libXext
+s none openwin/lib/libXext.so=./libXext.so.0
+s none openwin/lib/libXext.so.0=../../X11/lib/libXext.so.0
+s none X11/lib/libXext.so=./libXext.so.0
+f none X11/lib/libXext.so.0 0555 root bin
+
# open-src/lib/libXfixes (never delivered into /usr/openwin/lib)
s none X11/lib/libXfixes.so=./libXfixes.so.1
f none X11/lib/libXfixes.so.1 0555 root bin
@@ -309,6 +317,10 @@
s none X11/lib/libXrender.so=./libXrender.so.1
f none X11/lib/libXrender.so.1 0755 root bin
+# open-src/lib/libXss (never delivered into /usr/openwin/lib)
+s none X11/lib/libXss.so=./libXss.so.1
+f none X11/lib/libXss.so.1 0555 root bin
+
# open-src/lib/libXt
s none openwin/lib/libXt.so=./libXt.so.4
s none openwin/lib/libXt.so.4=../../X11/lib/libXt.so.4
@@ -371,6 +383,16 @@
s none X11/lib/$plat_64/libXdmcp.so=./libXdmcp.so.6
f none X11/lib/$plat_64/libXdmcp.so.6 0555 root bin
+# open-src/lib/libXevie (never delivered into /usr/openwin/lib)
+s none X11/lib/$plat_64/libXevie.so=./libXevie.so.1
+f none X11/lib/$plat_64/libXevie.so.1 0555 root bin
+
+# open-src/lib/libXext
+s none openwin/lib/$plat_64/libXext.so=./libXext.so.0
+s none openwin/lib/$plat_64/libXext.so.0=../../../X11/lib/64/libXext.so.0
+s none X11/lib/$plat_64/libXext.so=./libXext.so.0
+f none X11/lib/$plat_64/libXext.so.0 0555 root bin
+
# open-src/lib/libXfixes (never delivered into /usr/openwin/lib)
s none X11/lib/$plat_64/libXfixes.so=./libXfixes.so.1
f none X11/lib/$plat_64/libXfixes.so.1 0555 root bin
@@ -407,6 +429,10 @@
s none X11/lib/$plat_64/libXrender.so=./libXrender.so.1
f none X11/lib/$plat_64/libXrender.so.1 0755 root bin
+# open-src/lib/libXss (never delivered into /usr/openwin/lib)
+s none X11/lib/$plat_64/libXss.so=./libXss.so.1
+f none X11/lib/$plat_64/libXss.so.1 0555 root bin
+
# open-src/lib/libXt
s none openwin/lib/$plat_64/libXt.so=./libXt.so.4
s none openwin/lib/$plat_64/libXt.so.4=../../X11/lib/64/libXt.so.4
@@ -1070,8 +1096,6 @@
!search $HOME/openwin/lib/$plat_64
d none openwin/lib/$plat_64 0755 root bin
s none openwin/lib/64=$plat_64
-f none openwin/lib/$plat_64/libXext.so.0 0755 root bin
-s none openwin/lib/$plat_64/libXext.so=./libXext.so.0
s none openwin/lib/$plat_64/libXaw.so=./libXaw.so.5
f none openwin/lib/$plat_64/libXaw.so.5 0755 root bin
s none openwin/lib/$plat_64/libXp.so=./libXp.so.1
--- a/packages/SUNWxwpmn/copyright.add Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwpmn/copyright.add Wed Mar 12 17:08:43 2008 -0700
@@ -1,7 +1,3 @@
-------------------------------------------------------------------------------
-Files from the app/xrefresh package are covered by the following notice:
-
-include app/xrefresh/COPYING
------------------------------------------------------------------------------
Files from the lib/libX11 package are covered by the following notice:
@@ -15,6 +11,14 @@
include lib/libXcomposite/COPYING
------------------------------------------------------------------------------
+Files from the lib/libXevie package are covered by the following notice:
+
+include lib/libXevie/COPYING
+------------------------------------------------------------------------------
+Files from the lib/libXext package are covered by the following notice:
+
+include lib/libXext/COPYING
+------------------------------------------------------------------------------
Files from the lib/libXi package are covered by the following notice:
include lib/libXi/COPYING
@@ -27,6 +31,10 @@
include lib/libXmu/COPYING
------------------------------------------------------------------------------
+Files from the lib/libXScrnSaver package are covered by the following notice:
+
+include lib/libXScrnSaver/COPYING
+------------------------------------------------------------------------------
Files from the lib/libXt package are covered by the following notice:
include lib/libXt/COPYING
--- a/packages/SUNWxwpmn/prototype Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwpmn/prototype Wed Mar 12 17:08:43 2008 -0700
@@ -26,7 +26,7 @@
# or other dealings in this Software without prior written authorization
# of the copyright holder.
#
-# "@(#)prototype 35.42 08/03/07 Sun Microsystems"
+# "@(#)prototype 35.43 08/03/12 Sun Microsystems"
#
# X Window System programmers man pages
@@ -862,71 +862,90 @@
f none X11/share/man/man3X11/XwcTextPerCharExtents.3X11 0444 root bin
f none X11/share/man/man3X11/XwcTextPropertyToTextList.3X11 0444 root bin
-!search $HOME/openwin/share/man/man3Xext
-d none openwin/share/man/man3Xext 0755 root bin
-f none openwin/share/man/man3Xext/DBE.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSCapable.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSDisable.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSEnable.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSForceLevel.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSGetTimeouts.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSGetVersion.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSInfo.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSQueryExtension.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/DPMSSetTimeouts.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XReadScreen.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShape.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeCombineMask.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeCombineRectangles.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeCombineRegion.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeCombineShape.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeGetRectangles.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeInputSelected.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeOffsetShape.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeQueryExtension.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeQueryExtents.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeQueryVersion.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XShapeSelectInput.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlCopyAreaAndPaintType.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlCopyPaintType.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlCreateWindow.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlGetPaintType.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlIsOverlayWindow.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlSelectPair.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlSelectPartner.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlSetPaintType.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XSolarisOvlSetWindowTransparent.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XcupGetReservedColormapEntries.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XcupQueryVersion.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XcupStoreColors.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeAllocateBackBufferName.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeBeginIdiom.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeDeallocateBackBufferName.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeEndIdiom.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeFreeVisualInfo.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeGetBackBufferAttributes.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeGetVisualInfo.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeQueryExtension.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XdbeSwapBuffers.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/Xevi.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/Xevie.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XevieQueryVersion.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XevieStart.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XevieSelectInput.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XevieSendEvent.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XevieEnd.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/Xmbuf.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufChangeBufferAttributes.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufChangeWindowAttributes.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufCreateBuffers.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufCreateStereoWindow.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufDestroyBuffers.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufDisplayBuffers.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufGetBufferAttributes.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufGetScreenInfo.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufGetVersion.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufGetWindowAttributes.3Xext 0444 root bin
-f none openwin/share/man/man3Xext/XmbufQueryExtension.3Xext 0444 root bin
+# open-src/lib/libXevie
+!search $HOME/X11/share/man/man3Xevie
+d none X11/share/man/man3Xevie 0755 root bin
+f none X11/share/man/man3Xevie/Xevie.3Xevie 0444 root bin
+f none X11/share/man/man3Xevie/XevieEnd.3Xevie 0444 root bin
+f none X11/share/man/man3Xevie/XevieQueryVersion.3Xevie 0444 root bin
+f none X11/share/man/man3Xevie/XevieSelectInput.3Xevie 0444 root bin
+f none X11/share/man/man3Xevie/XevieSendEvent.3Xevie 0444 root bin
+f none X11/share/man/man3Xevie/XevieStart.3Xevie 0444 root bin
+
+# open-src/lib/libXext
+!search $HOME/X11/share/man/man3Xext
+d none X11/share/man/man3Xext 0755 root bin
+f none X11/share/man/man3Xext/DBE.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSCapable.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSDisable.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSEnable.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSForceLevel.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSGetTimeouts.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSGetVersion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSInfo.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSQueryExtension.3Xext 0444 root bin
+f none X11/share/man/man3Xext/DPMSSetTimeouts.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XReadScreen.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShape.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeCombineMask.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeCombineRectangles.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeCombineRegion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeCombineShape.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeGetRectangles.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeInputSelected.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeOffsetShape.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeQueryExtension.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeQueryExtents.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeQueryVersion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShapeSelectInput.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShm.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmAttach.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmCreateImage.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmCreatePixmap.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmDetach.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmGetEventBase.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmGetImage.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmPixmapFormat.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmPutImage.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmQueryExtension.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XShmQueryVersion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlCopyAreaAndPaintType.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlCopyPaintType.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlCreateWindow.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlGetPaintType.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlIsOverlayWindow.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlSelectPair.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlSelectPartner.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlSetPaintType.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XSolarisOvlSetWindowTransparent.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XcupGetReservedColormapEntries.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XcupQueryVersion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XcupStoreColors.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeAllocateBackBufferName.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeBeginIdiom.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeDeallocateBackBufferName.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeEndIdiom.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeFreeVisualInfo.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeGetBackBufferAttributes.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeGetVisualInfo.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeQueryExtension.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XdbeSwapBuffers.3Xext 0444 root bin
+f none X11/share/man/man3Xext/Xevi.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XeviGetVisualInfo.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XeviQueryExtension.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XeviQueryVersion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/Xmbuf.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufChangeBufferAttributes.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufChangeWindowAttributes.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufCreateBuffers.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufCreateStereoWindow.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufDestroyBuffers.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufDisplayBuffers.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufGetBufferAttributes.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufGetScreenInfo.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufGetVersion.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufGetWindowAttributes.3Xext 0444 root bin
+f none X11/share/man/man3Xext/XmbufQueryExtension.3Xext 0444 root bin
!search $HOME/X11/share/man/man3XRes
d none X11/share/man/man3XRes 0755 root bin
@@ -1017,6 +1036,23 @@
f none openwin/share/man/man3Xp/XpStartPage.3Xp 0444 root bin
f none openwin/share/man/man3Xp/libXp.3Xp 0444 root bin
+# open-src/lib/libXScrnSaver
+!search $HOME/X11/share/man/man3Xss
+d none X11/share/man/man3Xss 0755 root bin
+f none X11/share/man/man3Xss/XScreenSaverAllocInfo.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverGetRegistered.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverQueryExtension.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverQueryInfo.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverQueryVersion.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverRegister.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverSelectInput.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverSetAttributes.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverSuspend.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverUnregister.3Xss 0444 root bin
+f none X11/share/man/man3Xss/XScreenSaverUnsetAttributes.3Xss 0444 root bin
+f none X11/share/man/man3Xss/Xss.3Xss 0444 root bin
+
+# open-src/lib/libXt
!search $HOME/X11/share/man/man3Xt
d none X11/share/man/man3Xt 0755 root bin
f none X11/share/man/man3Xt/MenuPopdown.3Xt 0444 root bin
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/packages/SUNWxwslb/copyright.add Wed Mar 12 17:08:43 2008 -0700
@@ -0,0 +1,20 @@
+------------------------------------------------------------------------------
+Files from the lib/libX11 package are covered by the following notice:
+
+include lib/libX11/COPYING
+------------------------------------------------------------------------------
+Files from the lib/libXau package are covered by the following notice:
+
+include lib/libXau/COPYING
+------------------------------------------------------------------------------
+Files from the lib/libXaw package are covered by the following notice:
+
+include lib/libXaw/COPYING
+------------------------------------------------------------------------------
+Files from the lib/libXext package are covered by the following notice:
+
+include lib/libXext/COPYING
+------------------------------------------------------------------------------
+Files from the lib/libXmu package are covered by the following notice:
+
+include lib/libXmu/COPYING
--- a/packages/SUNWxwslb/prototype_com Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwslb/prototype_com Wed Mar 12 17:08:43 2008 -0700
@@ -27,7 +27,7 @@
# of the copyright holder.
#
#
-# ident "@(#)prototype_com 35.20 08/03/10 SMI"
+# ident "@(#)prototype_com 35.21 08/03/12 SMI"
#
# X Window System lint libraries
@@ -44,20 +44,23 @@
d none openwin/lib 0755 root bin
s none openwin/lib/llib-lX11.ln=../../X11/lib/llib-lX11.ln
s none openwin/lib/llib-lXau.ln=../../X11/lib/llib-lXau.ln
+s none openwin/lib/llib-lXext.ln=../../X11/lib/llib-lXext.ln
f none openwin/lib/llib-lXaw.ln 0755 root bin
-f none openwin/lib/llib-lXext.ln 0755 root bin
!search $HOME/X11/lib
d none X11/lib 0755 root bin
f none X11/lib/llib-lX11.ln 0555 root bin
f none X11/lib/llib-lXau.ln 0555 root bin
-f none X11/lib/llib-lXmu.ln 0755 root bin
-f none X11/lib/llib-lXmuu.ln 0755 root bin
+f none X11/lib/llib-lXext.ln 0555 root bin
+f none X11/lib/llib-lXmu.ln 0555 root bin
+f none X11/lib/llib-lXmuu.ln 0555 root bin
+
!search $HOME/X11/lib/$plat_64
d none X11/lib/$plat_64 0755 root bin
f none X11/lib/$plat_64/llib-lX11.ln 0555 root bin
f none X11/lib/$plat_64/llib-lXau.ln 0555 root bin
+f none X11/lib/$plat_64/llib-lXext.ln 0555 root bin
f none X11/lib/$plat_64/llib-lXmu.ln 0555 root bin
f none X11/lib/$plat_64/llib-lXmuu.ln 0555 root bin
--- a/packages/SUNWxwslb/prototype_sparc Wed Mar 12 13:22:28 2008 -0700
+++ b/packages/SUNWxwslb/prototype_sparc Wed Mar 12 17:08:43 2008 -0700
@@ -30,7 +30,7 @@
###########################################################################
#
-# @(#)prototype_sparc 1.10 08/03/07 SMI
+# @(#)prototype_sparc 1.11 08/03/12 SMI
#
# X Window System 64-bit lint libraries
@@ -40,4 +40,4 @@
!search $HOME/lib/sparcv9
d none openwin/lib/sparcv9 0755 root bin
f none openwin/lib/sparcv9/llib-lXaw.ln 0755 root bin
-f none openwin/lib/sparcv9/llib-lXext.ln 0755 root bin
+