add wtz-output protocol 75/317275/9
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 30 Dec 2024 02:20:09 +0000 (11:20 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 6 Feb 2025 07:56:38 +0000 (07:56 +0000)
wtz-output protocol provide the interface which support tizen-specific
information and rquests accoding the display output.

Change-Id: I48bb5dcf817c7cf6fa50b8dc75cd893ff6c125d5

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

index c7b0db4f1f1e4d10b6579bec2cdd25ee461e990e..b5c2dc3fdedf0f581c3161485edcdbcfe0b5597b 100644 (file)
@@ -544,6 +544,22 @@ libwtz_video_shell_client_la_SOURCES = protocol/tizen/wtz-video-shell-protocol.c
 libwtz_video_shell_client_la_CFLAGS  = @WAYLAND_CLIENT_CFLAGS@
 libwtz_video_shell_client_la_LIBADD  = @WAYLAND_CLIENT_LIBS@
 
+### wtz_output
+protocol_LTLIBRARIES += \
+               libwtz-output-server.la \
+               libwtz-output-client.la
+pkgconfig_DATA += \
+        src/wtz-output-server.pc \
+        src/wtz-output-client.pc
+protocolinclude_HEADERS += \
+               protocol/tizen/wtz-output-server-protocol.h \
+               protocol/tizen/wtz-output-client-protocol.h
+libwtz_output_server_la_SOURCES = protocol/tizen/wtz-output-protocol.c
+libwtz_output_server_la_CFLAGS  = @WAYLAND_SERVER_CFLAGS@
+libwtz_output_server_la_LIBADD  = @WAYLAND_SERVER_LIBS@
+libwtz_output_client_la_SOURCES = protocol/tizen/wtz-output-protocol.c
+libwtz_output_client_la_CFLAGS  = @WAYLAND_CLIENT_CFLAGS@
+libwtz_output_client_la_LIBADD  = @WAYLAND_CLIENT_LIBS@
 
 ### wayland-protocols
 unstable_protocols = \
@@ -602,6 +618,7 @@ tizen_protocols = \
                protocol/tizen/wtz-blender.xml \
                protocol/tizen/wtz-blur.xml \
                protocol/tizen/wtz-video-shell.xml \
+               protocol/tizen/wtz-output.xml \
        $(NULL)
 
 nobase_dist_pkgdata_DATA = \
diff --git a/protocol/tizen/wtz-output.xml b/protocol/tizen/wtz-output.xml
new file mode 100644 (file)
index 0000000..8d7d784
--- /dev/null
@@ -0,0 +1,83 @@
+<protocol name="wtz-output">
+
+  <copyright>
+    Copyright © 2025 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="Protocol to describe tizen output">
+    This is the waylanad protocol for supporting tizen outputs.
+  </description>
+
+  <interface name="wtz_output_manager" version="1">
+    <description summary="create tizen-style outputs">
+      wtz_output_manager is a global factory interface for wtz_output objects.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the wtz_output_manager object">
+       Destroy this wtz_output_manager object.
+       Notify when it is not going to use the wtz_output_manager
+       object anymore.
+      </description>
+    </request>
+
+    <request name="get_output">
+      <description summary="create a tizen output from a output">
+       This creates a wtz_output for the given output.
+      </description>
+      <arg name="id" type="new_id" interface="wtz_output"/>
+      <arg name="output" type="object" interface="wl_output"/>
+    </request>
+  </interface>
+
+  <interface name="wtz_output" version="1">
+    <description summary="tizen-specific user interface output">
+      An interface that may be implemented by a wl_output, for
+      implementations that provide a tizen-specific user interface.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the wtz_output">
+        Destroy the wtz_output object.
+      </description>
+    </request>
+
+    <request name="set_primary">
+      <description summary="set the primary output">
+        Set the primary output.
+      </description>
+    </request>
+
+    <request name="set_mode">
+      <description summary="set the mode with the given information">
+       This sets the mode of the output with the given information. The flags
+       describe properties of an output mode.  They are defined in wl_output interface.
+      </description>
+      <arg name="width" type="int" summary="width of the mode in hardware units"/>
+      <arg name="height" type="int" summary="height of the mode in hardware units"/>
+      <arg name="refresh" type="int" summary="vertical refresh rate in mHz"/>
+      <arg name="flags" type="uint" enum="mode" summary="bitfield of mode flags"/>
+    </request>
+
+  </interface>
+
+ </protocol>