pax_global_header00006660000000000000000000000064114622063200014506gustar00rootroot0000000000000052 comment=8898782b98457292057d249ab9e40cfc2fed7d8d libXcomposite-0.4.3/000075500000000000000000000000001146220632000143315ustar00rootroot00000000000000libXcomposite-0.4.3/.gitignore000064400000000000000000000017561146220632000163320ustar00rootroot00000000000000# # X.Org module default exclusion patterns # The next section if for module specific patterns # # Do not edit the following section # GNU Build System (Autotools) aclocal.m4 autom4te.cache/ autoscan.log ChangeLog compile config.guess config.h config.h.in config.log config-ml.in config.py config.status config.status.lineno config.sub configure configure.scan depcomp .deps/ INSTALL install-sh .libs/ libtool libtool.m4 ltmain.sh lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 Makefile Makefile.in mdate-sh missing mkinstalldirs *.pc py-compile stamp-h? symlink-tree texinfo.tex ylwrap # Do not edit the following section # Edit Compile Debug Document Distribute *~ *.[0-9] *.[0-9]x *.bak *.bin core *.dll *.exe *-ISO*.bdf *-JIS*.bdf *-KOI8*.bdf *.kld *.ko *.ko.cmd *.lai *.l[oa] *.[oa] *.obj *.patch *.so *.pcf.gz *.pdb *.tar.bz2 *.tar.gz # # Add & Override patterns for libXcomposite # # Edit the following section as needed # For example, !report.pc overrides *.pc. See 'man gitignore' # libXcomposite-0.4.3/AUTHORS000064400000000000000000000000221146220632000153730ustar00rootroot00000000000000Keith Packard, HP libXcomposite-0.4.3/COPYING000064400000000000000000000042761146220632000153750ustar00rootroot00000000000000 Copyright © 2001,2003 Keith Packard Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Keith Packard not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Keith Packard makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. libXcomposite-0.4.3/Makefile.am000064400000000000000000000026111146220632000163650ustar00rootroot00000000000000# # Copyright © 2003 Keith Packard, Noah Levitt # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of Keith Packard not be used in # advertising or publicity pertaining to distribution of the software without # specific, written prior permission. Keith Packard makes no # representations about the suitability of this software for any purpose. It # is provided "as is" without express or implied warranty. # # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR # CONSEQUENTIAL COMPOSITES OR ANY COMPOSITES WHATSOEVER RESULTING FROM LOSS OF USE, # DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER # TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. SUBDIRS = src man pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xcomposite.pc MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) dist-hook: ChangeLog INSTALL libXcomposite-0.4.3/README000064400000000000000000000013221146220632000152070ustar00rootroot00000000000000libXcomposite - client library for the Composite extension to the X11 protocol All questions regarding this software should be directed at the Xorg mailing list: http://lists.freedesktop.org/mailman/listinfo/xorg Please submit bug reports to the Xorg bugzilla: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg The master development code repository can be found at: git://anongit.freedesktop.org/git/xorg/lib/libXcomposite http://cgit.freedesktop.org/xorg/lib/libXcomposite For patch submission instructions, see: http://www.x.org/wiki/Development/Documentation/SubmittingPatches For more information on the git code manager, see: http://wiki.x.org/wiki/GitPage libXcomposite-0.4.3/autogen.sh000075500000000000000000000003031146220632000163260ustar00rootroot00000000000000#! /bin/sh srcdir=`dirname $0` test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? $srcdir/configure --enable-maintainer-mode "$@" libXcomposite-0.4.3/configure.ac000064400000000000000000000057021146220632000166230ustar00rootroot00000000000000dnl dnl Copyright © 2003 Keith Packard, Noah Levitt dnl dnl Permission to use, copy, modify, distribute, and sell this software and its dnl documentation for any purpose is hereby granted without fee, provided that dnl the above copyright notice appear in all copies and that both that dnl copyright notice and this permission notice appear in supporting dnl documentation, and that the name of Keith Packard not be used in dnl advertising or publicity pertaining to distribution of the software without dnl specific, written prior permission. Keith Packard makes no dnl representations about the suitability of this software for any purpose. It dnl is provided "as is" without express or implied warranty. dnl dnl KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO dnl EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR dnl CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, dnl DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER dnl TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR dnl PERFORMANCE OF THIS SOFTWARE. dnl dnl Process this file with autoconf to create configure. AC_PREREQ([2.60]) dnl dnl Version should match the current XComposite version. XCompositeQueryVersion dnl returns the version from xcompositewire.h, NOT the version we set here. dnl But we try to keep these the same. Note that the library has an extra dnl digit in the version number to track changes which don't affect the dnl protocol, so Xcomposite version l.n.m corresponds to protocol version l.n dnl that 'revision' number appears in Xcomposite.h and has to be manually dnl synchronized. dnl AC_INIT(libXcomposite, [0.4.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXcomposite) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) XORG_MACROS_VERSION(1.8) AM_CONFIG_HEADER(config.h) # Check for progs AC_PROG_CC AC_PROG_LIBTOOL XORG_DEFAULT_OPTIONS XORG_WITH_XMLTO(0.0.20) # Determine if the source for man pages is available # It may already be present (tarball) or can be generated using xmlto AM_CONDITIONAL([INSTALL_MANPAGES], [test -f "$srcdir/man/Xcomposite.man" || test "x$have_xmlto" = xyes]) # Check compositeext configuration, strip extra digits from package version to # find the required protocol version if test "$VERSION" = "" ; then VERSION=$PACKAGE_VERSION; fi COMPOSITEEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`] AC_SUBST(COMPOSITEEXT_VERSION) PKG_CHECK_MODULES(XCOMPOSITE, [compositeproto >= $COMPOSITEEXT_VERSION] x11) PKG_CHECK_MODULES(XFIXES, xfixes) AC_OUTPUT([Makefile src/Makefile man/Makefile xcomposite.pc]) libXcomposite-0.4.3/include/000075500000000000000000000000001146220632000157545ustar00rootroot00000000000000libXcomposite-0.4.3/include/X11/000075500000000000000000000000001146220632000163255ustar00rootroot00000000000000libXcomposite-0.4.3/include/X11/extensions/000075500000000000000000000000001146220632000205245ustar00rootroot00000000000000libXcomposite-0.4.3/include/X11/extensions/Xcomposite.h000064400000000000000000000073731146220632000230410ustar00rootroot00000000000000/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _XCOMPOSITE_H_ #define _XCOMPOSITE_H_ #include #include #include /* * This revision number also appears in configure.ac, they have * to be manually synchronized */ #define XCOMPOSITE_MAJOR COMPOSITE_MAJOR #define XCOMPOSITE_MINOR COMPOSITE_MINOR #define XCOMPOSITE_REVISION 2 #define XCOMPOSITE_VERSION ((XCOMPOSITE_MAJOR * 10000) + (XCOMPOSITE_MINOR * 100) + (XCOMPOSITE_REVISION)) _XFUNCPROTOBEGIN Bool XCompositeQueryExtension (Display *dpy, int *event_base_return, int *error_base_return); Status XCompositeQueryVersion (Display *dpy, int *major_version_return, int *minor_version_return); int XCompositeVersion (void); void XCompositeRedirectWindow (Display *dpy, Window window, int update); void XCompositeRedirectSubwindows (Display *dpy, Window window, int update); void XCompositeUnredirectWindow (Display *dpy, Window window, int update); void XCompositeUnredirectSubwindows (Display *dpy, Window window, int update); XserverRegion XCompositeCreateRegionFromBorderClip (Display *dpy, Window window); Pixmap XCompositeNameWindowPixmap (Display *dpy, Window window); Window XCompositeGetOverlayWindow (Display *dpy, Window window); void XCompositeReleaseOverlayWindow (Display *dpy, Window window); _XFUNCPROTOEND #endif /* _XCOMPOSITE_H_ */ libXcomposite-0.4.3/man/000075500000000000000000000000001146220632000151045ustar00rootroot00000000000000libXcomposite-0.4.3/man/.gitignore000064400000000000000000000001121146220632000170660ustar00rootroot00000000000000# Xcomposite.man is generated by xmlto from Xcomposite.xml Xcomposite.man libXcomposite-0.4.3/man/Makefile.am000064400000000000000000000021521146220632000171400ustar00rootroot00000000000000libmandir = $(LIB_MAN_DIR) libman_xml = Xcomposite.xml libman_PRE = $(libman_xml:xml=man) \ $(Xcomposite_shadows:=.man) Xcomposite_shadows = \ XCompositeQueryExtension \ XCompositeQueryVersion \ XCompositeVersion \ XCompositeRedirectWindow \ XCompositeRedirectSubwindows \ XCompositeUnredirectWindow \ XCompositeUnredirectSubwindows \ XCompositeCreateRegionFromBorderClip \ XCompositeNameWindowPixmap \ XCompositeGetOverlayWindow \ XCompositeReleaseOverlayWindow if INSTALL_MANPAGES libman_DATA = $(libman_PRE:man=@LIB_MAN_SUFFIX@) endif EXTRA_DIST = $(libman_PRE) $(libman_xml) CLEANFILES = $(libman_DATA) MAINTAINERCLEANFILES = $(libman_xml:xml=man) SUFFIXES = .$(LIB_MAN_SUFFIX) .man .xml # String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure .man.$(LIB_MAN_SUFFIX): $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ # Generate nroff sources from DocBook/xml dist-hook: $(libman_PRE) if HAVE_XMLTO .xml.man: $(AM_V_GEN)$(XMLTO) man $< && mv $*.__libmansuffix__ $@ else .xml.man: @echo "WARNING: configure did not find xmlto, cannot create $@ without it" endif libXcomposite-0.4.3/man/XCompositeCreateRegionFromBorderClip.man000064400000000000000000000000641146220632000247550ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeGetOverlayWindow.man000064400000000000000000000000641146220632000230650ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeNameWindowPixmap.man000064400000000000000000000000641146220632000230430ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeQueryExtension.man000064400000000000000000000000641146220632000226160ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeQueryVersion.man000064400000000000000000000000641146220632000222670ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeRedirectSubwindows.man000064400000000000000000000000641146220632000234420ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeRedirectWindow.man000064400000000000000000000000641146220632000225450ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeReleaseOverlayWindow.man000064400000000000000000000000641146220632000237260ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeUnredirectSubwindows.man000064400000000000000000000000641146220632000240050ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeUnredirectWindow.man000064400000000000000000000000641146220632000231100ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/XCompositeVersion.man000064400000000000000000000000641146220632000212410ustar00rootroot00000000000000.so man__libmansuffix__/Xcomposite.__libmansuffix__ libXcomposite-0.4.3/man/Xcomposite.xml000064400000000000000000000417201146220632000177640ustar00rootroot00000000000000 X Composite Extension Library __vendorversion__ 23 April 2007 KeithPackard Extension specification and implementation keithp@keithp.com DeronJohnson Overlay Window specification and implementation deron.johnson@sun.com Xcomposite __libmansuffix__ Xcomposite X Composite Extension library #include <X11/extensions/Xcomposite.h> Bool XCompositeQueryExtension Display *dpy int *event_base_return int *error_base_return Status XCompositeQueryVersion Display *dpy int *major_version_return int *minor_version_return int XCompositeVersion void XCompositeRedirectWindow Display *dpy Window window int update void XCompositeRedirectSubwindows Display *dpy Window window int update void XCompositeUnredirectWindow Display *dpy Window window int update void XCompositeUnredirectSubwindows Display *dpy Window window int update XserverRegion XCompositeCreateRegionFromBorderClip Display *dpy Window window Pixmap XCompositeNameWindowPixmap Display *dpy Window window Window XCompositeGetOverlayWindow Display *dpy Window window void XCompositeReleaseOverlayWindow Display *dpy Window window Description The composite extension provides several related mechanisms: Per-hierarchy storage The rendering of an entire hierarchy of windows is redirected to off-screen storage. The pixels of that hierarchy are available whenever it is viewable. Storage is automatically reallocated when the top level window changes size. Contents beyond the geometry of the top window are not preserved. Automatic shadow update When a hierarchy is rendered off-screen, the X server provides an automatic mechanism for presenting those contents within the parent window. The implementation is free to make this update lag behind actual rendering operations by an unspecified amount of time. This automatic update mechanism may be disabled so that the parent window contents can be completely determined by an external application. Composite Overlay Window Version 0.3 of the protocol adds the Composite Overlay Window, which provides compositing managers with a surface on which to draw without interference. This window is always above normal windows and is always below the screen saver window. It is an InputOutput window whose width and height are the screen dimensions. Its visual is the root visual and its border width is zero. Attempts to redirect it using the composite extension are ignored. This window does not appear in the reply of the QueryTree request. It is also an override redirect window. These last two features make it invisible to window managers and other X11 clients. The only way to access the XID of this window is via the CompositeGetOverlayWindow request. Initially, the Composite Overlay Window is unmapped. Parent window clipping Version 0.4 of the protocol modifies the semantics of parent window clipping in the presence of manual redirected children. With this version, the area in the parent covered by manual redirected children is left in the parent clip list instead of being removed as in older versions. Per-hierarchy storage may be created for individual windows or for all children of a window. Manual shadow update may be selected by only a single application for each window; manual update may also be selected on a per-window basis or for each child of a window. Detecting when to update may be done with the Damage extension. The off-screen storage includes the window contents, its borders and the contents of all descendants. Arguments display Pointer to the Display structure returned from XOpenDisplay for the connection to the X server. event_base_return Pointer to integer where the base value for Composite Extension events will be stored. error_base_return Pointer to integer where the base value for Composite Extension errors will be stored. major_version_return Pointer to integer where the major version of the Composite Extension supported by the X server will be stored. minor_version_return Pointer to integer where the minor version of the Composite Extension supported by the X server will be stored. window Specifies the window ID to operate on. update Specifies the mode for updating the window contents. Must be either CompositeRedirectAutomatic or CompositeRedirectManual. Functions XCompositeQueryExtension XCompositeQueryExtension determines if the Composite Extension is available on the given display. It returns True if the extension is supported, otherwise False. If the extension is present, the base values for events and errors are returned, and can be used to decode incoming event and error values. XCompositeQueryVersion XCompositeQueryVersion determines if the X Server supports a version of the X Composite Extension which is compatible with the client library. A non-zero Status is returned if a compatible version of the extension is supported, otherwise a zero Status is returned. If the extension is supported, the major and minor version numbers are returned to indicate the level of Composite Extension support. No other XComposite functions (except XCompositeQueryExtension) may be called before this function. If a client violates this rule, the effects of all subsequent XComposite calls that it makes are undefined. XCompositeVersion XCompositeVersion returns the version of the X Composite library. The version number is encoded as:
(major * 10000) + (minor * 100) + revision
For example, version 1.4.6 would be encoded as the integer 10406.
XCompositeRedirectWindow XCompositeRedirectWindow requests the X server to direct the hierarchy starting at window to off-screen storage. The update argument specifies whether the contents are mirrored to the parent window automatically or not. Only one client at a time may specify an update type of CompositeRedirectManual, another attempt will result in a BadAccess error. When all clients enabling redirection terminate, the redirection will automatically be disabled. The root window may not be redirected. Doing so results in a BadMatch error. Specifying an invalid window id will result in a BadWindow error. XCompositeRedirectSubwindows XCompositeRedirectSubwindows requests the X server to redirect hierarchies starting at all current and future children of window as in XCompositeRedirectWindow. If update is CompositeRedirectManual, then painting of the window background during window manipulation and ClearArea requests is inhibited. XCompositeUnredirectWindow XCompositeUnredirectWindow requests the X server to terminate redirection of window. If the specified window was not selected for redirection by the current client, a BadValue error results. XCompositeUnredirectSubwindows XCompositeUnredirectWindow requests the X server to terminate redirection of all children of window. If the specified window was not selected for sub-redirection by the current client, a BadValue error results. XCompositeCreateRegionFromBorderClip XCompositeCreateRegionFromBorderClip creates a region containing the "usual" border clip value; that is the area of the window clipped against siblings and the parent. This region can be used to restrict rendering to suitable areas while updating only a single window. The region is copied at the moment the request is executed; future changes to the window hierarchy will not be reflected in this region. XCompositeNameWindowPixmap XCompositeNameWindowPixmap creates and returns a pixmap id that serves as a reference to the off-screen storage for window. This pixmap will remain allocated until freed, even if the window is unmapped, reconfigured or destroyed. However, the window will get a new pixmap allocated each time it is mapped or resized, so this function will need to be reinvoked for the client to continue to refer to the storage holding the current window contents. Generates a BadMatch error if window is not redirected or is not visible. The X server must support at least version 0.2 of the Composite Extension for XCompositeNameWindowPixmap. XCompositeGetOverlayWindow XCompositeGetOverlayWindow returns the window ID of the Composite Overlay Window for the screen specified by the argument window. This function notifies the X server that the client wishes to use the Composite Overlay Window of this screen. If this Composite Overlay Window has not yet been mapped, it is mapped by this request. The Composite Overlay Window for a particular screen will be unmapped when all clients who have called this function have either called XCompositeReleaseOverlayWindow for that screen, or terminated their connection to the X server. The X server must support at least version 0.3 of the Composite Extension for XCompositeGetOverlayWindow. XCompositeReleaseOverlayWindow This request specifies that the client is no longer using the Composite Overlay Window on the screen specified by the argument window. A screen's Composite Overlay Window is unmapped when there are no longer any clients using it. The X server must support at least version 0.3 of the Composite Extension for XCompositeReleaseOverlayWindow.
libXcomposite-0.4.3/src/000075500000000000000000000000001146220632000151205ustar00rootroot00000000000000libXcomposite-0.4.3/src/Makefile.am000064400000000000000000000031311146220632000171520ustar00rootroot00000000000000# # Copyright © 2003 Keith Packard, Noah Levitt # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of Keith Packard not be used in # advertising or publicity pertaining to distribution of the software without # specific, written prior permission. Keith Packard makes no # representations about the suitability of this software for any purpose. It # is provided "as is" without express or implied warranty. # # KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, # INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO # EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR # CONSEQUENTIAL COMPOSITES OR ANY COMPOSITES 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. AM_CFLAGS = $(CWARNFLAGS) $(XCOMPOSITE_CFLAGS) $(XFIXES_CFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/include lib_LTLIBRARIES = libXcomposite.la libXcomposite_la_SOURCES = \ xcompositeint.h \ Xcomposite.c libXcomposite_la_LIBADD = $(XCOMPOSITE_LIBS) libXcomposite_la_LDFLAGS = -version-number 1:0:0 -no-undefined libXcompositeincludedir = $(includedir)/X11/extensions libXcompositeinclude_HEADERS = $(top_srcdir)/include/X11/extensions/Xcomposite.h libXcomposite-0.4.3/src/Xcomposite.c000064400000000000000000000267121146220632000174260ustar00rootroot00000000000000/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #include "xcompositeint.h" XCompositeExtInfo XCompositeExtensionInfo; const char XCompositeExtensionName[] = COMPOSITE_NAME; /* * XCompositeExtRemoveDisplay - remove the indicated display from the * extension object. (Replaces XextRemoveDisplay.) */ static int XCompositeExtRemoveDisplay (XCompositeExtInfo *extinfo, Display *dpy) { XCompositeExtDisplayInfo *info, *prev; /* * locate this display and its back link so that it can be removed */ _XLockMutex(_Xglobal_lock); prev = NULL; for (info = extinfo->head; info; info = info->next) { if (info->display == dpy) break; prev = info; } if (!info) { _XUnlockMutex(_Xglobal_lock); return 0; /* hmm, actually an error */ } /* * remove the display from the list; handles going to zero */ if (prev) prev->next = info->next; else extinfo->head = info->next; extinfo->ndisplays--; if (info == extinfo->cur) extinfo->cur = NULL; /* flush cache */ _XUnlockMutex(_Xglobal_lock); Xfree ((char *) info); return 1; } static int XCompositeCloseDisplay (Display *dpy, XExtCodes *codes) { return XCompositeExtRemoveDisplay (&XCompositeExtensionInfo, dpy); } /* * XCompositeExtAddDisplay - add a display to this extension. (Replaces * XextAddDisplay) */ static XCompositeExtDisplayInfo * XCompositeExtAddDisplay (XCompositeExtInfo *extinfo, Display *dpy, const char *ext_name) { XCompositeExtDisplayInfo *info; info = (XCompositeExtDisplayInfo *) Xmalloc (sizeof (XCompositeExtDisplayInfo)); if (!info) return NULL; info->display = dpy; info->codes = XInitExtension (dpy, ext_name); /* * if the server has the extension, then we can initialize the * appropriate function vectors */ if (info->codes) { xCompositeQueryVersionReply rep; xCompositeQueryVersionReq *req; XESetCloseDisplay (dpy, info->codes->extension, XCompositeCloseDisplay); /* * Get the version info */ LockDisplay (dpy); GetReq (CompositeQueryVersion, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeQueryVersion; req->majorVersion = COMPOSITE_MAJOR; req->minorVersion = COMPOSITE_MINOR; if (!_XReply (dpy, (xReply *) &rep, 0, xTrue)) { UnlockDisplay (dpy); SyncHandle (); Xfree(info); return NULL; } info->major_version = rep.majorVersion; info->minor_version = rep.minorVersion; UnlockDisplay (dpy); SyncHandle (); } else { /* The server doesn't have this extension. * Use a private Xlib-internal extension to hang the close_display * hook on so that the "cache" (extinfo->cur) is properly cleaned. * (XBUG 7955) */ XExtCodes *codes = XAddExtension(dpy); if (!codes) { XFree(info); return NULL; } XESetCloseDisplay (dpy, codes->extension, XCompositeCloseDisplay); } /* * now, chain it onto the list */ _XLockMutex(_Xglobal_lock); info->next = extinfo->head; extinfo->head = info; extinfo->cur = info; extinfo->ndisplays++; _XUnlockMutex(_Xglobal_lock); return info; } /* * XCompositeExtFindDisplay - look for a display in this extension; keeps a * cache of the most-recently used for efficiency. (Replaces * XextFindDisplay.) */ static XCompositeExtDisplayInfo * XCompositeExtFindDisplay (XCompositeExtInfo *extinfo, Display *dpy) { XCompositeExtDisplayInfo *info; /* * see if this was the most recently accessed display */ if ((info = extinfo->cur) && info->display == dpy) return info; /* * look for display in list */ _XLockMutex(_Xglobal_lock); for (info = extinfo->head; info; info = info->next) { if (info->display == dpy) { extinfo->cur = info; /* cache most recently used */ _XUnlockMutex(_Xglobal_lock); return info; } } _XUnlockMutex(_Xglobal_lock); return NULL; } XCompositeExtDisplayInfo * XCompositeFindDisplay (Display *dpy) { XCompositeExtDisplayInfo *info; info = XCompositeExtFindDisplay (&XCompositeExtensionInfo, dpy); if (!info) info = XCompositeExtAddDisplay (&XCompositeExtensionInfo, dpy, XCompositeExtensionName); return info; } Bool XCompositeQueryExtension (Display *dpy, int *event_base_return, int *error_base_return) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); if (XCompositeHasExtension(info)) { *event_base_return = info->codes->first_event; *error_base_return = info->codes->first_error; return True; } else return False; } Status XCompositeQueryVersion (Display *dpy, int *major_version_return, int *minor_version_return) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); XCompositeCheckExtension (dpy, info, 0); *major_version_return = info->major_version; *minor_version_return = info->minor_version; return 1; } int XCompositeVersion (void) { return XCOMPOSITE_VERSION; } void XCompositeRedirectWindow (Display *dpy, Window window, int update) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeRedirectWindowReq *req; XCompositeSimpleCheckExtension (dpy, info); LockDisplay (dpy); GetReq (CompositeRedirectWindow, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeRedirectWindow; req->window = window; req->update = update; UnlockDisplay (dpy); SyncHandle (); } void XCompositeRedirectSubwindows (Display *dpy, Window window, int update) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeRedirectSubwindowsReq *req; XCompositeSimpleCheckExtension (dpy, info); LockDisplay (dpy); GetReq (CompositeRedirectSubwindows, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeRedirectSubwindows; req->window = window; req->update = update; UnlockDisplay (dpy); SyncHandle (); } void XCompositeUnredirectWindow (Display *dpy, Window window, int update) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeUnredirectWindowReq *req; XCompositeSimpleCheckExtension (dpy, info); LockDisplay (dpy); GetReq (CompositeUnredirectWindow, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeUnredirectWindow; req->window = window; req->update = update; UnlockDisplay (dpy); SyncHandle (); } void XCompositeUnredirectSubwindows (Display *dpy, Window window, int update) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeUnredirectSubwindowsReq *req; XCompositeSimpleCheckExtension (dpy, info); LockDisplay (dpy); GetReq (CompositeUnredirectSubwindows, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeUnredirectSubwindows; req->window = window; req->update = update; UnlockDisplay (dpy); SyncHandle (); } XserverRegion XCompositeCreateRegionFromBorderClip (Display *dpy, Window window) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeCreateRegionFromBorderClipReq *req; XserverRegion region; XCompositeCheckExtension (dpy, info, 0); LockDisplay (dpy); GetReq (CompositeCreateRegionFromBorderClip, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeCreateRegionFromBorderClip; req->window = window; region = req->region = XAllocID (dpy); UnlockDisplay (dpy); SyncHandle (); return region; } Pixmap XCompositeNameWindowPixmap (Display *dpy, Window window) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeNameWindowPixmapReq *req; Pixmap pixmap; XCompositeCheckExtension (dpy, info, 0); LockDisplay (dpy); GetReq (CompositeNameWindowPixmap, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeNameWindowPixmap; req->window = window; pixmap = req->pixmap = XAllocID (dpy); UnlockDisplay (dpy); SyncHandle (); return pixmap; } Window XCompositeGetOverlayWindow (Display *dpy, Window window) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeGetOverlayWindowReq *req; xCompositeGetOverlayWindowReply rep; XCompositeCheckExtension (dpy, info, 0); LockDisplay (dpy); GetReq (CompositeGetOverlayWindow, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeGetOverlayWindow; req->window = window; if (!_XReply (dpy, (xReply *) &rep, 0, xFalse)) { UnlockDisplay (dpy); SyncHandle (); return 0; } UnlockDisplay (dpy); SyncHandle (); return rep.overlayWin; } void XCompositeReleaseOverlayWindow (Display *dpy, Window window) { XCompositeExtDisplayInfo *info = XCompositeFindDisplay (dpy); xCompositeReleaseOverlayWindowReq *req; XCompositeSimpleCheckExtension (dpy, info); LockDisplay (dpy); GetReq (CompositeReleaseOverlayWindow, req); req->reqType = info->codes->major_opcode; req->compositeReqType = X_CompositeReleaseOverlayWindow; req->window = window; UnlockDisplay (dpy); SyncHandle (); } libXcomposite-0.4.3/src/xcompositeint.h000064400000000000000000000072211146220632000202000ustar00rootroot00000000000000/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Copyright © 2003 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting * documentation, and that the name of Keith Packard not be used in * advertising or publicity pertaining to distribution of the software without * specific, written prior permission. Keith Packard makes no * representations about the suitability of this software for any purpose. It * is provided "as is" without express or implied warranty. * * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ #ifndef _XCOMPOSITEINT_H_ #define _XCOMPOSITEINT_H_ #include #include #include #include #include #include typedef struct _XCompositeExtDisplayInfo { struct _XCompositeExtDisplayInfo *next; /* keep a linked list */ Display *display; /* which display this is */ XExtCodes *codes; /* the extension protocol codes */ int major_version; /* -1 means we don't know */ int minor_version; /* -1 means we don't know */ } XCompositeExtDisplayInfo; /* replaces XExtensionInfo */ typedef struct _XCompositeExtInfo { XCompositeExtDisplayInfo *head; /* start of the list */ XCompositeExtDisplayInfo *cur; /* most recently used */ int ndisplays; /* number of displays */ } XCompositeExtInfo; extern XCompositeExtInfo XCompositeExtensionInfo; extern const char XCompositeExtensionName[]; XCompositeExtDisplayInfo * XCompositeFindDisplay (Display *dpy); #define XCompositeHasExtension(i) ((i) && ((i)->codes)) #define XCompositeCheckExtension(dpy,i,val) \ if (!XCompositeHasExtension(i)) { return val; } #define XCompositeSimpleCheckExtension(dpy,i) \ if (!XCompositeHasExtension(i)) { return; } #endif /* _XCOMPOSITEINT_H_ */ libXcomposite-0.4.3/xcomposite.pc.in000064400000000000000000000004701146220632000174550ustar00rootroot00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: Xcomposite Description: X Composite Extension Library Version: @PACKAGE_VERSION@ Requires: xproto compositeproto >= @COMPOSITEEXT_VERSION@ Requires.private: x11 xfixes Cflags: -I${includedir} Libs: -L${libdir} -lXcomposite