diff options
author | Keith Packard <keithp@keithp.com> | 2010-04-06 14:17:20 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-04-06 14:17:20 -0700 |
commit | 2778f679ce342147d6c5871920342a2f861080dc (patch) | |
tree | 56602949df32dd037f5ade210a5b9fd3af57281a | |
parent | 743a0a92147566a8283514aa0f22346f5f9e93e0 (diff) | |
parent | 2432bd8da01c8da74c3a1b0c7ea2c2207380ecd1 (diff) |
Merge remote branch 'compositeproto/master'
-rw-r--r-- | compositeproto/.gitignore | 78 | ||||
-rw-r--r-- | compositeproto/AUTHORS | 1 | ||||
-rw-r--r-- | compositeproto/COPYING | 41 | ||||
-rw-r--r-- | compositeproto/Makefile.am | 43 | ||||
-rw-r--r-- | compositeproto/README | 33 | ||||
-rwxr-xr-x | compositeproto/autogen.sh | 12 | ||||
-rw-r--r-- | compositeproto/composite.h | 71 | ||||
-rw-r--r-- | compositeproto/compositeproto.h | 192 | ||||
-rw-r--r-- | compositeproto/compositeproto.pc.in | 9 | ||||
-rw-r--r-- | compositeproto/compositeproto.txt | 339 | ||||
-rw-r--r-- | compositeproto/configure.ac | 37 |
11 files changed, 856 insertions, 0 deletions
diff --git a/compositeproto/.gitignore b/compositeproto/.gitignore new file mode 100644 index 0000000..896b3f5 --- /dev/null +++ b/compositeproto/.gitignore @@ -0,0 +1,78 @@ +# +# 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 compositeproto +# +# Edit the following section as needed +# For example, !report.pc overrides *.pc. See 'man gitignore' +# diff --git a/compositeproto/AUTHORS b/compositeproto/AUTHORS new file mode 100644 index 0000000..8e18f9b --- /dev/null +++ b/compositeproto/AUTHORS @@ -0,0 +1 @@ +Keith Packard, HP diff --git a/compositeproto/COPYING b/compositeproto/COPYING new file mode 100644 index 0000000..23c1a6c --- /dev/null +++ b/compositeproto/COPYING @@ -0,0 +1,41 @@ +Copyright © 2006 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 (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. + diff --git a/compositeproto/Makefile.am b/compositeproto/Makefile.am new file mode 100644 index 0000000..5a14884 --- /dev/null +++ b/compositeproto/Makefile.am @@ -0,0 +1,43 @@ +# +# 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 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. + +compositedir = $(includedir)/X11/extensions +composite_HEADERS = \ + composite.h \ + compositeproto.h + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = compositeproto.pc + +dist_doc_DATA = compositeproto.txt + + +MAINTAINERCLEANFILES = ChangeLog INSTALL + +.PHONY: ChangeLog INSTALL + +INSTALL: + $(INSTALL_CMD) + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog INSTALL diff --git a/compositeproto/README b/compositeproto/README new file mode 100644 index 0000000..66b40a4 --- /dev/null +++ b/compositeproto/README @@ -0,0 +1,33 @@ + Composite Extension + Version 0.1 + 2003-11-04 + +This package contains header files and documentation for the composite +extension. Library and server implementations are separate. + +Keith Packard +keithp@keithp.com + +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/proto/compositeproto + + http://cgit.freedesktop.org/xorg/proto/compositeproto + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + diff --git a/compositeproto/autogen.sh b/compositeproto/autogen.sh new file mode 100755 index 0000000..904cd67 --- /dev/null +++ b/compositeproto/autogen.sh @@ -0,0 +1,12 @@ +#! /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 "$@" diff --git a/compositeproto/composite.h b/compositeproto/composite.h new file mode 100644 index 0000000..7725321 --- /dev/null +++ b/compositeproto/composite.h @@ -0,0 +1,71 @@ +/* + * Copyright © 2006 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 (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 _COMPOSITE_H_ +#define _COMPOSITE_H_ + +#include <X11/extensions/xfixeswire.h> + +#define COMPOSITE_NAME "Composite" +#define COMPOSITE_MAJOR 0 +#define COMPOSITE_MINOR 4 + +#define CompositeRedirectAutomatic 0 +#define CompositeRedirectManual 1 + +#define X_CompositeQueryVersion 0 +#define X_CompositeRedirectWindow 1 +#define X_CompositeRedirectSubwindows 2 +#define X_CompositeUnredirectWindow 3 +#define X_CompositeUnredirectSubwindows 4 +#define X_CompositeCreateRegionFromBorderClip 5 +#define X_CompositeNameWindowPixmap 6 +#define X_CompositeGetOverlayWindow 7 +#define X_CompositeReleaseOverlayWindow 8 + +#define CompositeNumberRequests (X_CompositeReleaseOverlayWindow + 1) + +#define CompositeNumberEvents 0 + +#endif /* _COMPOSITE_H_ */ diff --git a/compositeproto/compositeproto.h b/compositeproto/compositeproto.h new file mode 100644 index 0000000..aa6cd8a --- /dev/null +++ b/compositeproto/compositeproto.h @@ -0,0 +1,192 @@ +/* + * Copyright © 2006 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 (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 _COMPOSITEPROTO_H_ +#define _COMPOSITEPROTO_H_ + +#include <X11/Xmd.h> +#include <X11/extensions/composite.h> + +#define Window CARD32 +#define Region CARD32 +#define Pixmap CARD32 + +/* + * requests and replies + */ +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xCompositeQueryVersionReq; + +#define sz_xCompositeQueryVersionReq 12 + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; +} xCompositeQueryVersionReply; + +#define sz_xCompositeQueryVersionReply 32 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeRedirectWindowReq; + +#define sz_xCompositeRedirectWindowReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeRedirectSubwindowsReq; + +#define sz_xCompositeRedirectSubwindowsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeUnredirectWindowReq; + +#define sz_xCompositeUnredirectWindowReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; + CARD8 update; + CARD8 pad1; + CARD16 pad2 B16; +} xCompositeUnredirectSubwindowsReq; + +#define sz_xCompositeUnredirectSubwindowsReq 12 + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Region region B32; + Window window B32; +} xCompositeCreateRegionFromBorderClipReq; + +#define sz_xCompositeCreateRegionFromBorderClipReq 12 + +/* Version 0.2 additions */ + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length; + Window window B32; + Pixmap pixmap B32; +} xCompositeNameWindowPixmapReq; + +#define sz_xCompositeNameWindowPixmapReq 12 + +/* Version 0.3 additions */ + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; +} xCompositeGetOverlayWindowReq; + +#define sz_xCompositeGetOverlayWindowReq sizeof(xCompositeGetOverlayWindowReq) + +typedef struct { + BYTE type; /* X_Reply */ + BYTE pad1; + CARD16 sequenceNumber B16; + CARD32 length B32; + Window overlayWin B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xCompositeGetOverlayWindowReply; + +#define sz_xCompositeGetOverlayWindowReply sizeof(xCompositeGetOverlayWindowReply) + +typedef struct { + CARD8 reqType; + CARD8 compositeReqType; + CARD16 length B16; + Window window B32; +} xCompositeReleaseOverlayWindowReq; + +#define sz_xCompositeReleaseOverlayWindowReq sizeof(xCompositeReleaseOverlayWindowReq) + +#undef Window +#undef Region +#undef Pixmap + +#endif /* _COMPOSITEPROTO_H_ */ diff --git a/compositeproto/compositeproto.pc.in b/compositeproto/compositeproto.pc.in new file mode 100644 index 0000000..6348022 --- /dev/null +++ b/compositeproto/compositeproto.pc.in @@ -0,0 +1,9 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: CompositeExt +Description: Composite extension headers +Version: @PACKAGE_VERSION@ +Cflags: -I${includedir} diff --git a/compositeproto/compositeproto.txt b/compositeproto/compositeproto.txt new file mode 100644 index 0000000..4b86621 --- /dev/null +++ b/compositeproto/compositeproto.txt @@ -0,0 +1,339 @@ + Composite Extension + Version 0.4 + 2007-7-3 + Keith Packard + keithp@keithp.com + Deron Johnson + deron.johnson@sun.com + +1. Introduction + +Many user interface operations would benefit from having pixel contents of +window hierarchies available without respect to sibling and antecedent +clipping. In addition, placing control over the composition of these pixel +contents into a final screen image in an external application will enable +a flexible system for dynamic application content presentation. + +2. Acknowledgements + +This small extension has been brewing for several years, contributors to +both early prototypes and the final design include: + + + Bill Haneman for motivating the ability to magnify occluded windows + with his work on accessibility + + + Carsten Haitzler for Enlightenment, the original eye-candy window + manager which demonstrated that clever hacks are an awfully + close substitute for changes in the underlying system. + + + Jim Gettys for key insights into the relationship between damage + events and per-window pixmap usage + + + Mike Harris and Owen Taylor for figuring out what to call it. + + + Deron Johnson for the Looking Glass implementation and + a prototype of the coordinate transformation mechanism. + + + Ryan Lortie for helping figure out reasonable parent clipping + semantics in the presense of manual redirected children. + +3. Architecture + +The composite extension provides three related mechanisms: + + 1. 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. + + 2. 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. + + 3. External parent - child pointer coordinate transformation. + When a hierarchy is under manual compositing, the relationship + of coordinates within the parent to those in the child may + not be known within the X server. This mechanism provides + for redirection of these transformations through a client. + +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. + +3.1 NameWindowPixmap + +Version 0.2 of the protocol introduces a mechanism for associating an XID +with the off-screen pixmap used to store these contents. This can be used +to hold onto window contents after the window is unmapped (and hence animate +it's disappearance), and also to access the border of the window, which is +not reachable through the Window ID itself. A new pixmap is created each +time the window is mapped or resized; as these events are nicely signalled +with existing events, no additional notification is needed. The old pixmap +will remain allocated as long as the Pixmap ID is left valid, it is +important that the client use the FreePixmap request when it is done with +the contents and to create a new name for the newly allocated pixmap. + +In automatic update mode, the X server is itself responsible for presenting +the child window contents within the parent. It seems reasonable, then, for +rendering to the parent window to be clipped so as not to interfere with any +child window content. In an environment with a mixure of manual and +automatic updating windows, rendering to the parent in the area nominally +occupied by a manual update window should be able to affect parent pixel +values in those areas, but such rendering should be clipped to automatic +update windows, and presumably to other manual update windows managed by +other applications. In any of these cases, it should be easy to ensure that +rendering has no effect on any non-redirected windows. + +Instead of attempting to define new clipping modes for rendering, the +Composite extension instead defines ClipByChildren rendering to the parent +to exclude regions occupied by redirected windows (either automatic or +manual). The CreateRegionFromBorderClip request can be used along with +IncludeInferiors clipping modes to restrict manual shadow updates to the +apporpriate region of the screen. Bracketing operations with +GrabServer/UngrabServer will permit atomic sequences that can update the +screen without artifact. As all of these operations are asynchronous, +network latency should not adversely affect update latency. + +3.2 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. + +CompositeGetOverlayWindow returns the XID of the Composite Overlay +Window. If the window has not yet been mapped, it is mapped by this +request. When all clients who have called this request have terminated +their X11 connections the window is unmapped. + +Composite managers may render directly to the Composite Overlay +Window, or they may reparent other windows to be children of this +window and render to these. Multiple clients may render to the +Composite Overlay Window, create child windows of it, reshape it, and +redefine its input region, but the specific arbitration rules followed +by these clients is not defined by this specification; these policies +should be defined by the clients themselves. + +3.3 Clipping semantics redefined + +Version 0.4 of the protocol changes the semantics of clipping in the +presense of manual redirect children. In version 0.3, a parent was always +clipped to child windows, independent of the kind of redirection going on. +With version 0.4, the parent is no longer clipped to child windows which are +manually redirected. This means the parent can draw in the child region without using +IncludeInferiors mode, and (perhaps more importantly), it will receive +expose events in those regions caused by other actions. This new behaviour +is not selectable. + +4. Errors + +The composite extension does not define any new errors. + +5. Types + + UPDATETYPE { Automatic, Manual } + + CompositeCoordinate + child: Window + x, y: CARD16 + +7. Extension Initialization + +The client must negotiate the version of the extension before executing +extension requests. Otherwise, the server will return BadRequest for any +operations other than QueryVersion. + + QueryVersion + + client-major-version: CARD32 + client-minor-version: CARD32 + + -> + + major-version: CARD32 + minor-version: CARD32 + + The client sends the highest supported version to the server and + the server sends the highest version it supports, but no higher than + the requested version. Major versions changes can introduce + incompatibilities in existing functionality, minor version + changes introduce only backward compatible changes. It is + the client's responsibility to ensure that the server supports + a version which is compatible with its expectations. Servers + are encouraged to support multiple versions of the extension. + +8. Hierarchy Redirection + + RedirectWindow + + window: Window + update: UPDATETYPE + + errors: Window, Access, Match + + The hierarchy starting at 'window' is directed to off-screen + storage. 'update' specifies whether the contents are mirrored to + the parent window automatically or not. Only one client may specify + an update type of Manual, another attempt will result in an + Access 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 Match + error. + + RedirectSubwindows + + window: Window + update UPDATETYPE + + errors: Window, Access + + Hierarchies starting at all current and future children of window + will be redirected as in RedirectWindow. If update is Manual, + then painting of the window background during window manipulation + and ClearArea requests is inhibited. + + UnredirectWindow: + + window: Window + + errors: Window, Value + + Redirection of the specified window will be terminated. If + the specified window was not selected for redirection by the + current client, a 'Value' error results. + + UnredirectWindows: + + window: Window + + errors: Window, Value + + Redirection of all children of window will be terminated. If + the specified window was not selected for sub-redirection by the + current client, a 'Value' error results. + +9. Clip lists + + CreateRegionFromBorderClip + + region: Region + window: Window + + errors: Window, IDChoice + + This request 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. + +10. Associating a Pixmap ID with the off-screen storage (0.2 and later) + + NameWindowPixmap + + window: Window + pixmap: Pixmap + + errors: Window, Match, IDChoice + + This request makes 'pixmap' a reference to the off-screen storage + for 'window'. This pixmap will remain allocated until freed, even + if 'window' is unmapped, reconfigured or destroyed. However, + 'window' will get a new pixmap allocated each time it is + mapped or resized, so this request will need to be reinvoked for + the client to continue to refer to the storage holding the current + window contents. Generates a 'Match' error if 'window' is not + redirected or is not visible. + +11. Composite Overlay Window (0.3 and later) + + CompositeGetOverlayWindow + + window: Window + + -> + + overlayWin: Window + + This request returns the XID of the Composite Overlay Window for + the screen specified by the argument 'window'. This request + indicates 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 invoked this request have + also invoked CompositeReleaseOverlayWindow for that screen. Also, + CompositeReleaseOverlayWindow for a screen will be implicitly + called when a client using the Composite Overlay Window on that + screen terminates its X11 connection. + + + CompositeReleaseOverlayWindow + + window: Window + + 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. + +12. External coordinate transformation (0.4 and later) + + RedirectCoordinate + + window: Window + redirect: BOOL + + errors: Window, Access + + If 'redirect' is TRUE, the requesting client is placed in charge of + coordinate transformations between 'window' and its children. If + 'redirect' is FALSE, any such redirection is disabled. Any + transformations needed by the server will be delivered to the + requesting client in TransformCoordinateNotify events and the + requesting client must reply with matching TransformCoordinate + requests for the server to continue with the operation. + + Generates an 'Access' error if another client has + redirected coordinates for 'window'. + + TransformCoordinate + + window: Window + serialNumber: CARD32 + x, y: INT16 + coordinates: LISTofCompositeCoordinate + + This provides the transformation data needed by the server for a + single TransformCoordinateNotify event. 'serialNumber' must match + the serial number delivered in the event. 'x' and 'y' represent the + coordinate from the event relative to the 'window'. 'coordinates' + represent the coordinate from the event relative to each child + listed. Any children not listed in 'coordinates' are given the + default transformation using the child window position within the + parent as a simple translation. + + The result of this is that any pointer data seen by means of + the protocol will appear to reflect the transformation + performed by this request. diff --git a/compositeproto/configure.ac b/compositeproto/configure.ac new file mode 100644 index 0000000..45969f7 --- /dev/null +++ b/compositeproto/configure.ac @@ -0,0 +1,37 @@ +dnl +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]) +AC_INIT([CompositeProto], [0.4.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + compositeproto.pc]) + |