From b1b787915798966070dc30218321b0952790d373 Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Thu, 9 Nov 2023 15:11:11 +0900 Subject: [PATCH] add wtz-blur tizen protocol This protocol allows clients to have more control over blurring background of surface. Change-Id: I1a2b8f6f4794b51a6a03489c8628ca8f3130f4ff --- Makefile.am | 18 +++++++ protocol/tizen/wtz-blur.xml | 115 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 133 insertions(+) create mode 100644 protocol/tizen/wtz-blur.xml diff --git a/Makefile.am b/Makefile.am index b6d6c9b..1ed2be0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 index 0000000..f8f7580 --- /dev/null +++ b/protocol/tizen/wtz-blur.xml @@ -0,0 +1,115 @@ + + + + + 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. + + + + This protocol allows clients to have more control over blurring background + of surface. + + + + + A global allows clients to create wtz_blur_manager objects. + + + + + + + + + Destroy the blur object. + + + + + + Create a blur object for a surface. + + If the wl_surface already has a blur object associated, the + blur_exists protocol error is raised. + + + + + + + + + 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. + + + + + Destroy the blur object. + + On the next wl_surface.commit, the blur object state is withdrawn. + + + + + + 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. + + + + + + + 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. + + + + + + -- 2.7.4