1X11::Protocol::Ext::ComUpsoesritCeo(n3t)ributed Perl DocXu1m1e:n:tPartoitooncol::Ext::Composite(3)
2
3
4
6 X11::Protocol::Ext::Composite - off-screen window contents
7
9 use X11::Protocol;
10 my $X = X11::Protocol->new;
11 $X->init_extension('Composite')
12 or print "Composite extension not available";
13
14 $X->CompositeRedirectWindow ($mywindow, 'Automatic');
15
17 The Composite extension holds the full pixel contents of windows in
18 off-screen storage, ready for things like CopyArea(). Normally the
19 server only keeps the visible parts of a window, not areas overlapped
20 or obscured.
21
22 In "Automatic" mode the visible parts of a window are displayed on
23 screen as normal. The off-screen storage is then a little like the
24 backing store feature, but just when one or more clients declare an
25 interest in the full content.
26
27 In "Manual" mode the window contents are not drawn on screen, only kept
28 off-screen. This mode is for use by special "composite manager"
29 programs which might make a composite display (hence the name of the
30 extension) of the overlapping windows with partial-transparency or
31 shadowing effects.
32
33 There's nothing here to draw or combine to actually make a composite
34 window result. When required that's done with the usual core protocol
35 drawing or with drawing extensions such as RENDER (see
36 X11::Protocol::Ext::RENDER).
37
39 The following requests are made available with an init_extension(), as
40 per "EXTENSIONS" in X11::Protocol.
41
42 my $is_available = $X->init_extension('Composite');
43
44 Composite 0.1
45 "($server_major, $server_minor) = $X->CompositeQueryVersion
46 ($client_major, $client_minor)"
47 Negotiate a protocol version with the server. $client_major and
48 $client_minor is what the client would like, the returned
49 $server_major and $server_minor is what the server will do, which
50 might be less than requested (but not more than).
51
52 Actually the X.org server circa 1.10 will return a higher minor
53 version than the client requests.
54
55 The current code supports up to 0.3 and the intention is to
56 automatically negotiate in init_extension() if/when necessary.
57
58 "$X->CompositeRedirectWindow ($window, $update)"
59 "$X->CompositeRedirectSubwindows ($window, $update)"
60 "$X->CompositeUnredirectWindow ($window, $update)"
61 "$X->CompositeUnredirectSubwindows ($window, $update)"
62 Enable or disable a redirect of $window to off-screen storage.
63
64 Window() acts on just the given $window. Subwindows() acts on
65 $window and also any subwindows it has now or in the future. The
66 root window cannot be redirected.
67
68 $update is string "Automatic" or "Manual". Only one client at a
69 time may use Manual mode on a given $window (normally a "composite
70 manager" program).
71
72 Redirection is a per-client setting and is automatically
73 unredirected if the client disconnects. An unredirect when not
74 redirected is a "BadValue" error. Off-screen storage remains in
75 effect while at least one current client has requested it.
76
77 "$X->CompositeCreateRegionFromBorderClip ($region, $window)"
78 Create $region (a new XID) as a server-side region object
79 initialized to, umm, something about $window and its current border
80 or visible parts or whatnot.
81
82 Region objects are from XFIXES 2.0 (X11::Protocol::Ext::XFIXES).
83 CompositeCreateRegionFromBorderClip() can be used without
84 init_extension() of XFIXES, but there's not much which can be done
85 with a region except through XFIXES.
86
87 Composite 0.2
88 "$X->CompositeNameWindowPixmap ($window, $pixmap)"
89 Set $pixmap (a new XID) to refer to the off-screen storage of
90 $window. $window must be viewable (mapped and all of its parents
91 mapped) and must be redirected (by any client).
92
93 my $pixmap = $X->new_rsrc;
94 $X->CompositeNameWindowPixmap ($window, $pixmap);
95
96 $pixmap is released with FreePixmap() in the usual way. If $window
97 or a parent is unmapped then $pixmap continues to exist, but it's
98 association with $window is lost. If $window is mapped and
99 redirected again later then it has a new off-screen storage and a
100 new CompositeNameWindowPixmap() must be called to get a new pixmap
101 for it.
102
103 Composite 0.3
104 "$overlay_window = $X->CompositeGetOverlayWindow ($window)"
105 Return the composite overlay window for the screen of $window.
106
107 This window covers the whole screen and is always above ordinary
108 windows but below any screen saver, and doesn't appear in a
109 QueryTree(). It's created when the first client asks for it, and
110 shared by any further clients who ask.
111
112 "$X->CompositeReleaseOverlayWindow ($window)"
113 Release the composite overlay window for the screen of $window.
114 When all clients release it the overlay window is destroyed.
115
117 X11::Protocol, X11::Protocol::Ext::XFIXES,
118 X11::Protocol::Ext::DOUBLE_BUFFER
119
120 "Composite Extension", Version 0.4, 2007-7-3,
121 /usr/share/doc/x11proto-composite-dev/compositeproto.txt.gz,
122 "http://cgit.freedesktop.org/xorg/proto/compositeproto/plain/compositeproto.txt"
123
125 <http://user42.tuxfamily.org/x11-protocol-other/index.html>
126
128 Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde
129
130 X11-Protocol-Other is free software; you can redistribute it and/or
131 modify it under the terms of the GNU General Public License as
132 published by the Free Software Foundation; either version 3, or (at
133 your option) any later version.
134
135 X11-Protocol-Other is distributed in the hope that it will be useful,
136 but WITHOUT ANY WARRANTY; without even the implied warranty of
137 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
138 General Public License for more details.
139
140 You should have received a copy of the GNU General Public License along
141 with X11-Protocol-Other. If not, see <http://www.gnu.org/licenses/>.
142
143
144
145perl v5.36.0 2023-01-20 X11::Protocol::Ext::Composite(3)