.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "X11::Protocol::Ext::Composite 3" .TH X11::Protocol::Ext::Composite 3 2023-07-25 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME X11::Protocol::Ext::Composite \- off\-screen window contents .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 4 \& use X11::Protocol; \& my $X = X11::Protocol\->new; \& $X\->init_extension(\*(AqComposite\*(Aq) \& or print "Composite extension not available"; \& \& $X\->CompositeRedirectWindow ($mywindow, \*(AqAutomatic\*(Aq); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The Composite extension holds the full pixel contents of windows in off-screen storage, ready for things like \f(CWCopyArea()\fR. Normally the server only keeps the visible parts of a window, not areas overlapped or obscured. .PP In "Automatic" mode the visible parts of a window are displayed on screen as normal. The off-screen storage is then a little like the backing store feature, but just when one or more clients declare an interest in the full content. .PP In "Manual" mode the window contents are not drawn on screen, only kept off-screen. This mode is for use by special "composite manager" programs which might make a composite display (hence the name of the extension) of the overlapping windows with partial-transparency or shadowing effects. .PP There's nothing here to draw or combine to actually make a composite window result. When required that's done with the usual core protocol drawing or with drawing extensions such as RENDER (see X11::Protocol::Ext::RENDER). .SH REQUESTS .IX Header "REQUESTS" The following requests are made available with an \f(CWinit_extension()\fR, as per "EXTENSIONS" in X11::Protocol. .PP .Vb 1 \& my $is_available = $X\->init_extension(\*(AqComposite\*(Aq); .Ve .SS "Composite 0.1" .IX Subsection "Composite 0.1" .ie n .IP """($server_major, $server_minor) = $X\->CompositeQueryVersion ($client_major, $client_minor)""" 4 .el .IP "\f(CW($server_major, $server_minor) = $X\->CompositeQueryVersion ($client_major, $client_minor)\fR" 4 .IX Item "($server_major, $server_minor) = $X->CompositeQueryVersion ($client_major, $client_minor)" Negotiate a protocol version with the server. \f(CW$client_major\fR and \&\f(CW$client_minor\fR is what the client would like, the returned \&\f(CW$server_major\fR and \f(CW$server_minor\fR is what the server will do, which might be less than requested (but not more than). .Sp Actually the X.org server circa 1.10 will return a higher minor version than the client requests. .Sp The current code supports up to 0.3 and the intention is to automatically negotiate in \f(CWinit_extension()\fR if/when necessary. .ie n .IP """$X\->CompositeRedirectWindow ($window, $update)""" 4 .el .IP "\f(CW$X\->CompositeRedirectWindow ($window, $update)\fR" 4 .IX Item "$X->CompositeRedirectWindow ($window, $update)" .PD 0 .ie n .IP """$X\->CompositeRedirectSubwindows ($window, $update)""" 4 .el .IP "\f(CW$X\->CompositeRedirectSubwindows ($window, $update)\fR" 4 .IX Item "$X->CompositeRedirectSubwindows ($window, $update)" .ie n .IP """$X\->CompositeUnredirectWindow ($window, $update)""" 4 .el .IP "\f(CW$X\->CompositeUnredirectWindow ($window, $update)\fR" 4 .IX Item "$X->CompositeUnredirectWindow ($window, $update)" .ie n .IP """$X\->CompositeUnredirectSubwindows ($window, $update)""" 4 .el .IP "\f(CW$X\->CompositeUnredirectSubwindows ($window, $update)\fR" 4 .IX Item "$X->CompositeUnredirectSubwindows ($window, $update)" .PD Enable or disable a redirect of \f(CW$window\fR to off-screen storage. .Sp \&\f(CWWindow()\fR acts on just the given \f(CW$window\fR. \f(CWSubwindows()\fR acts on \&\f(CW$window\fR and also any subwindows it has now or in the future. The root window cannot be redirected. .Sp \&\f(CW$update\fR is string "Automatic" or "Manual". Only one client at a time may use Manual mode on a given \f(CW$window\fR (normally a "composite manager" program). .Sp Redirection is a per-client setting and is automatically unredirected if the client disconnects. An unredirect when not redirected is a \f(CW\*(C`BadValue\*(C'\fR error. Off-screen storage remains in effect while at least one current client has requested it. .ie n .IP """$X\->CompositeCreateRegionFromBorderClip ($region, $window)""" 4 .el .IP "\f(CW$X\->CompositeCreateRegionFromBorderClip ($region, $window)\fR" 4 .IX Item "$X->CompositeCreateRegionFromBorderClip ($region, $window)" Create \f(CW$region\fR (a new XID) as a server-side region object initialized to, umm, something about \f(CW$window\fR and its current border or visible parts or whatnot. .Sp Region objects are from XFIXES 2.0 (X11::Protocol::Ext::XFIXES). \&\f(CWCompositeCreateRegionFromBorderClip()\fR can be used without \&\f(CWinit_extension()\fR of XFIXES, but there's not much which can be done with a region except through XFIXES. .SS "Composite 0.2" .IX Subsection "Composite 0.2" .ie n .IP """$X\->CompositeNameWindowPixmap ($window, $pixmap)""" 4 .el .IP "\f(CW$X\->CompositeNameWindowPixmap ($window, $pixmap)\fR" 4 .IX Item "$X->CompositeNameWindowPixmap ($window, $pixmap)" Set \f(CW$pixmap\fR (a new XID) to refer to the off-screen storage of \f(CW$window\fR. \&\f(CW$window\fR must be viewable (mapped and all of its parents mapped) and must be redirected (by any client). .Sp .Vb 2 \& my $pixmap = $X\->new_rsrc; \& $X\->CompositeNameWindowPixmap ($window, $pixmap); .Ve .Sp \&\f(CW$pixmap\fR is released with \f(CWFreePixmap()\fR in the usual way. If \f(CW$window\fR or a parent is unmapped then \f(CW$pixmap\fR continues to exist, but it's association with \f(CW$window\fR is lost. If \f(CW$window\fR is mapped and redirected again later then it has a new off-screen storage and a new \&\f(CWCompositeNameWindowPixmap()\fR must be called to get a new pixmap for it. .SS "Composite 0.3" .IX Subsection "Composite 0.3" .ie n .IP """$overlay_window = $X\->CompositeGetOverlayWindow ($window)""" 4 .el .IP "\f(CW$overlay_window = $X\->CompositeGetOverlayWindow ($window)\fR" 4 .IX Item "$overlay_window = $X->CompositeGetOverlayWindow ($window)" Return the composite overlay window for the screen of \f(CW$window\fR. .Sp This window covers the whole screen and is always above ordinary windows but below any screen saver, and doesn't appear in a \f(CWQueryTree()\fR. It's created when the first client asks for it, and shared by any further clients who ask. .ie n .IP """$X\->CompositeReleaseOverlayWindow ($window)""" 4 .el .IP "\f(CW$X\->CompositeReleaseOverlayWindow ($window)\fR" 4 .IX Item "$X->CompositeReleaseOverlayWindow ($window)" Release the composite overlay window for the screen of \f(CW$window\fR. When all clients release it the overlay window is destroyed. .SH "SEE ALSO" .IX Header "SEE ALSO" X11::Protocol, X11::Protocol::Ext::XFIXES, X11::Protocol::Ext::DOUBLE_BUFFER .PP "Composite Extension", Version 0.4, 2007\-7\-3, \&\fI/usr/share/doc/x11proto\-composite\-dev/compositeproto.txt.gz\fR, \&\f(CW\*(C`http://cgit.freedesktop.org/xorg/proto/compositeproto/plain/compositeproto.txt\*(C'\fR .SH "HOME PAGE" .IX Header "HOME PAGE" .SH LICENSE .IX Header "LICENSE" Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde .PP X11\-Protocol\-Other is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. .PP X11\-Protocol\-Other is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with X11\-Protocol\-Other. If not, see .