add wtz-blender tizen protocol
[platform/core/uifw/wayland-extension.git] / protocol / tizen / wtz-blender.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="wtz_blender">
3
4   <copyright>
5     Copyright 2023 Samsung Electronics co., Ltd. All Rights Reserved.
6
7     Permission to use, copy, modify, distribute, and sell this
8     software and its documentation for any purpose is hereby granted
9     without fee, provided that the above copyright notice appear in
10     all copies and that both that copyright notice and this permission
11     notice appear in supporting documentation, and that the name of
12     the copyright holders not be used in advertising or publicity
13     pertaining to distribution of the software without specific,
14     written prior permission.  The copyright holders make no
15     representations about the suitability of this software for any
16     purpose.  It is provided "as is" without express or implied
17     warranty.
18
19     THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
20     SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
21     FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
22     SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23     WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
24     AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
25     ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
26     THIS SOFTWARE.
27   </copyright>
28
29   <description summary="surface blending">
30     This protocol allows clients to have more control over alpha compositing
31     of surface contents.
32   </description>
33
34   <interface name="wtz_blender" version="1">
35     <description summary="surface binding">
36         A global allows clients to create wtz_blend objects.
37     </description>
38
39     <enum name="error">
40       <entry name="blend_exists" value="1"
41         summary="blend object already exists for this surface"/>
42     </enum>
43
44     <request name="destroy" type="destructor">
45       <description summary="destroy the blender">
46         Destroy the blender object.
47       </description>
48     </request>
49
50     <request name="get_blend">
51       <description summary="create a blend object for a surface">
52         Create a blend object for a surface.
53
54         If the wl_surface already has a blend object associated, the
55         blend_exists protocol error is raised.
56       </description>
57       <arg name="id" type="new_id" interface="wtz_blend"
58         summary="the new blend object"/>
59       <arg name="surface" type="object" interface="wl_surface"
60         summary="the surface to associate the blend object to"/>
61     </request>
62   </interface>
63
64   <interface name="wtz_blend" version="1">
65     <description summary="advanced surface blending">
66       A surface extension interface for setting a global alpha value applied
67       to the whole surface.
68
69       When the blend object is created its its alpha value is UINT32_MAX
70       (ie, opaque).
71
72       Use of this interface has no effect on the surface's opaque region
73       as set by wl_surface.set_opaque_region. Clients must make sure to set
74       their opaque region correctly to prevent repaint artifacts.
75
76       The blend object must be destroyed before the wl_surface, otherwise the
77       defunct protocol error is raised.
78     </description>
79
80     <enum name="error">
81       <entry name="defunct" value="1" summary="surface destroyed before blend"/>
82     </enum>
83
84     <request name="destroy" type="destructor">
85       <description summary="destroy the blend object">
86         Destroy the blend object.
87
88         On the next wl_surface.commit, the blend object state is withdrawn.
89       </description>
90     </request>
91
92     <request name="set_alpha">
93       <description summary="set the alpha value">
94         Set the alpha value applied to the whole surface for compositing. This
95         alpha value is applied as an additional step after the processing of
96         per-pixel alpha values for the wl_surface.
97
98         Zero means completely transparent, UINT32_MAX means completely opaque.
99
100         The alpha value is double-buffered state, and will be applied on the
101         next wl_surface.commit.
102       </description>
103       <arg name="value" type="uint" summary="alpha value"/>
104     </request>
105   </interface>
106
107 </protocol>