add wtz-blur tizen protocol 57/301357/4
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 9 Nov 2023 06:11:11 +0000 (15:11 +0900)
committerchangyeon lee <cyeon.lee@samsung.com>
Fri, 26 Jan 2024 02:36:25 +0000 (02:36 +0000)
This protocol allows clients to have more control over blurring background
of surface.

Change-Id: I1a2b8f6f4794b51a6a03489c8628ca8f3130f4ff

Makefile.am
protocol/tizen/wtz-blur.xml [new file with mode: 0644]

index b6d6c9b..1ed2be0 100644 (file)
@@ -425,6 +425,23 @@ libwtz_blender_client_la_SOURCES = protocol/tizen/wtz-blender-protocol.c
 libwtz_blender_client_la_CFLAGS  = @WAYLAND_CLIENT_CFLAGS@
 libwtz_blender_client_la_LIBADD  = @WAYLAND_CLIENT_LIBS@
 
+### wtz_blur
+protocol_LTLIBRARIES += \
+        libwtz-blur-server.la \
+        libwtz-blur-client.la
+pkgconfig_DATA += \
+        src/wtz-blur-server.pc \
+        src/wtz-blur-client.pc
+protocolinclude_HEADERS += \
+        protocol/tizen/wtz-blur-server-protocol.h \
+        protocol/tizen/wtz-blur-client-protocol.h
+libwtz_blur_server_la_SOURCES = protocol/tizen/wtz-blur-protocol.c
+libwtz_blur_server_la_CFLAGS  = @WAYLAND_SERVER_CFLAGS@
+libwtz_blur_server_la_LIBADD  = @WAYLAND_SERVER_LIBS@
+libwtz_blur_client_la_SOURCES = protocol/tizen/wtz-blur-protocol.c
+libwtz_blur_client_la_CFLAGS  = @WAYLAND_CLIENT_CFLAGS@
+libwtz_blur_client_la_LIBADD  = @WAYLAND_CLIENT_LIBS@
+
 ### wtz_foreign
 protocol_LTLIBRARIES += \
                libwtz-foreign-server.la \
@@ -548,6 +565,7 @@ tizen_protocols = \
                protocol/tizen/wtz-screen.xml \
                protocol/tizen/wtz-shell.xml \
                protocol/tizen/wtz-blender.xml \
+               protocol/tizen/wtz-blur.xml \
        $(NULL)
 
 nobase_dist_pkgdata_DATA = \
diff --git a/protocol/tizen/wtz-blur.xml b/protocol/tizen/wtz-blur.xml
new file mode 100644 (file)
index 0000000..f8f7580
--- /dev/null
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="wtz_blur">
+
+  <copyright>
+    Copyright © 2023 Samsung Electronics Co., Ltd.
+
+    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>
+
+  <description summary="surface blur">
+    This protocol allows clients to have more control over blurring background
+    of surface.
+  </description>
+
+  <interface name="wtz_blur_manager" version="1">
+    <description summary="surface binding">
+        A global allows clients to create wtz_blur_manager objects.
+    </description>
+
+    <enum name="error">
+      <entry name="blur_exists" value="1"
+        summary="blur object already exists for this surface"/>
+    </enum>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the blur">
+        Destroy the blur object.
+      </description>
+    </request>
+
+    <request name="get_blur">
+      <description summary="create a blur object for a surface">
+        Create a blur object for a surface.
+
+        If the wl_surface already has a blur object associated, the
+        blur_exists protocol error is raised.
+      </description>
+      <arg name="id" type="new_id" interface="wtz_blur"
+        summary="the new blur object"/>
+      <arg name="surface" type="object" interface="wl_surface"
+        summary="the surface to associate the blur object to"/>
+    </request>
+  </interface>
+
+  <interface name="wtz_blur" version="1">
+    <description summary="advanced surface blurring">
+      A surface extension interface for setting a blurring background
+      to the surface.
+
+      Use of this interface has no effect on the surface's opaque region
+      as set by wl_surface.set_opaque_region.
+
+      If the wl_surface associated with the wtz_blur is destroyed,
+      the wtz_blur object becomes inert.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the blur object">
+        Destroy the blur object.
+
+        On the next wl_surface.commit, the blur object state is withdrawn.
+      </description>
+    </request>
+
+    <request name="set_region">
+      <description summary="set the blur region">
+        Set the blur region applied to the surface for compositing.
+
+        The blur region is specified in the surface-local coordinates.
+
+        The blur region is double-buffered state, and will be applied on the
+        next wl_surface.commit.
+
+        The initial value for an blur region is infinite. That means the
+        whole surface background will be blurred. Setting the pending blur region
+        has copy semantics, and the wl_region object can be destroyed
+        immediately. A NULL wl_region causes the blur region to be set
+        to infinite.
+      </description>
+      <arg name="region" type="object" interface="wl_region" allow-null="true"
+           summary="blur region of the surface"/>
+    </request>
+
+    <request name="set_radius">
+      <description summary="set the blur radius">
+        Set the blur radius for compositing the surface.
+
+        The blur radius is double-buffered state, and will be applied on
+        the next wl_surface.commit.
+
+        The initial value for an blur radius is zero. That means a blurring
+        background will be disabled.
+      </description>
+      <arg name="radius" type="uint" summary="blur radius"/>
+    </request>
+  </interface>
+
+</protocol>