SDL
103 строки · 4.6 Кб
1<?xml version="1.0" encoding="UTF-8"?>
2<protocol name="alpha_modifier_v1">3<copyright>4Copyright © 2024 Xaver Hugl
5
6Permission is hereby granted, free of charge, to any person obtaining a
7copy of this software and associated documentation files (the "Software"),
8to deal in the Software without restriction, including without limitation
9the rights to use, copy, modify, merge, publish, distribute, sublicense,
10and/or sell copies of the Software, and to permit persons to whom the
11Software is furnished to do so, subject to the following conditions:
12
13The above copyright notice and this permission notice (including the next
14paragraph) shall be included in all copies or substantial portions of the
15Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23DEALINGS IN THE SOFTWARE.
24</copyright>25
26<interface name="wp_alpha_modifier_v1" version="1">27<description summary="surface alpha modifier manager">28This interface allows a client to set a factor for the alpha values on a
29surface, which can be used to offload such operations to the compositor,
30which can in turn for example offload them to KMS.
31
32Warning! The protocol described in this file is currently in the testing
33phase. Backward compatible changes may be added together with the
34corresponding interface version bump. Backward incompatible changes can
35only be done by creating a new major version of the extension.
36</description>37
38<request name="destroy" type="destructor">39<description summary="destroy the alpha modifier manager object">40Destroy the alpha modifier manager. This doesn't destroy objects
41created with the manager.
42</description>43</request>44
45<enum name="error">46<entry name="already_constructed" value="0"47summary="wl_surface already has a alpha modifier object"/>48</enum>49
50<request name="get_surface">51<description summary="create a new toplevel decoration object">52Create a new alpha modifier surface object associated with the
53given wl_surface. If there is already such an object associated with
54the wl_surface, the already_constructed error will be raised.
55</description>56<arg name="id" type="new_id" interface="wp_alpha_modifier_surface_v1"/>57<arg name="surface" type="object" interface="wl_surface"/>58</request>59</interface>60
61<interface name="wp_alpha_modifier_surface_v1" version="1">62<description summary="alpha modifier object for a surface">63This interface allows the client to set a factor for the alpha values on
64a surface, which can be used to offload such operations to the compositor.
65The default factor is UINT32_MAX.
66
67This object has to be destroyed before the associated wl_surface. Once the
68wl_surface is destroyed, all request on this object will raise the
69no_surface error.
70</description>71
72<enum name="error">73<entry name="no_surface" value="0" summary="wl_surface was destroyed"/>74</enum>75
76<request name="destroy" type="destructor">77<description summary="destroy the alpha modifier object">78This destroys the object, and is equivalent to set_multiplier with
79a value of UINT32_MAX, with the same double-buffered semantics as
80set_multiplier.
81</description>82</request>83
84<request name="set_multiplier">85<description summary="specify the alpha multiplier">86Sets the alpha multiplier for the surface. The alpha multiplier is
87double-buffered state, see wl_surface.commit for details.
88
89This factor is applied in the compositor's blending space, as an
90additional step after the processing of per-pixel alpha values for the
91wl_surface. The exact meaning of the factor is thus undefined, unless
92the blending space is specified in a different extension.
93
94This multiplier is applied even if the buffer attached to the
95wl_surface doesn't have an alpha channel; in that case an alpha value
96of one is used instead.
97
98Zero means completely transparent, UINT32_MAX means completely opaque.
99</description>100<arg name="factor" type="uint"/>101</request>102</interface>103</protocol>104