add wtz_screen protocol 40/290240/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 9 Mar 2023 02:12:34 +0000 (11:12 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 22 Mar 2023 01:07:06 +0000 (10:07 +0900)
This protocol is the wayland extension protocol for the tizen-specific
screen. It supports the logical screen provided by Tizen Display Server.

Change-Id: I3c8e7e3739067ca6d4e79c8851eee711df688311

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

index 7b3306d..6773aa3 100644 (file)
@@ -383,6 +383,23 @@ libwtz_foreign_client_la_SOURCES = protocol/tizen/wtz-foreign-protocol.c
 libwtz_foreign_client_la_CFLAGS  = @WAYLAND_CLIENT_CFLAGS@
 libwtz_foreign_client_la_LIBADD  = @WAYLAND_CLIENT_LIBS@
 
+### wtz_screen
+protocol_LTLIBRARIES += \
+               libwtz-screen-server.la \
+               libwtz-screen-client.la
+pkgconfig_DATA += \
+        src/wtz-screen-server.pc \
+        src/wtz-screen-client.pc
+protocolinclude_HEADERS += \
+               protocol/tizen/wtz-screen-server-protocol.h \
+               protocol/tizen/wtz-screen-client-protocol.h
+libwtz_screen_server_la_SOURCES = protocol/tizen/wtz-screen-protocol.c
+libwtz_screen_server_la_CFLAGS  = @WAYLAND_SERVER_CFLAGS@
+libwtz_screen_server_la_LIBADD  = @WAYLAND_SERVER_LIBS@
+libwtz_screen_client_la_SOURCES = protocol/tizen/wtz-screen-protocol.c
+libwtz_screen_client_la_CFLAGS  = @WAYLAND_CLIENT_CFLAGS@
+libwtz_screen_client_la_LIBADD  = @WAYLAND_CLIENT_LIBS@
+
 ### wayland-protocols
 unstable_protocols = \
        protocol/unstable/pointer-gestures/pointer-gestures-unstable-v1.xml \
@@ -431,6 +448,7 @@ tizen_protocols = \
         protocol/tizen/fullscreen-shell.xml \
         protocol/tizen/tizen-policy-ext.xml \
                protocol/tizen/wtz-foreign.xml \
+               protocol/tizen/wtz-screen.xml \
        $(NULL)
 
 nobase_dist_pkgdata_DATA = \
diff --git a/protocol/tizen/wtz-screen.xml b/protocol/tizen/wtz-screen.xml
new file mode 100644 (file)
index 0000000..ac04982
--- /dev/null
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="wtz_screen">
+
+  <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="Protocol to describe screens">
+    This is the waylanad protocol for supporting tizen-specific screen which is
+    the logical screen provided by Tizen Display Server.
+  </description>
+
+  <interface name="wtz_screen" version="1">
+    <description summary="compositor logical region">
+      A screen describes rectangular area which can display on physical
+      output devices of the compositor geometry. This object is published
+      as global during start up, or when a compositor creates a screen.
+    </description>
+
+    <enum name="error">
+      <description summary="error type">
+        Type of error.
+      </description>
+      <entry name="none" value="0" summary="none"/>
+      <entry name="invalid_parameter" value="1" summary="invalid parameter"/>
+      <entry name="not_supported" value="2" summary="no support"/>
+    </enum>
+
+    <enum name="capability">
+      <description summary="screen capability types">
+        The functional capability type which a wtz_screen can support.
+      </description>
+      <entry name="none" value="0" summary="none"/>
+      <entry name="splitscreen" value="1" summary="splitscreen capatility"/>
+    </enum>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy the wtz_screen object">
+       Notify when the server that it is not going to use the wtz_screen
+       object anymore.
+      </description>
+    </request>
+
+    <event name="size">
+      <description summary="size of the screen">
+        The size event describes the size of the screen.
+        [TODO] example and scenario for this logical screen size event
+      </description>
+      <arg name="width" type="uint"
+       summary="screen width"/>
+      <arg name="height" type="uint"
+       summary="screen height"/>
+    </event>
+
+    <event name="name">
+      <description summary="name of this screen">
+       Many compositors will assign names to their screen, show them to the
+       user, allow them to be configured by name, etc.
+      </description>
+      <arg name="name" type="string" summary="screen name"/>
+    </event>
+
+     <event name="capabilities">
+      <description summary="an array of the capability which the screen support">
+       Notify the array of the screen capabilities. The clients get this event when it
+       binds the wtz_screen global resource.
+      </description>
+      <arg name="capabilities" type="array" summary="screen capabilities"/>
+    </event>
+
+    <request name="get_splitscreen">
+      <description summary="destroy the wtz_screen object">
+       Get the wtz_splitscreen when this wtz_screen has the splitscreen capability.
+       When it has no splitscreen capability, not_supported error is raised.
+      </description>
+      <arg name="id" type="new_id" interface="wtz_splitscreen" summary="the new wtz_splitscreen object"/>
+    </request>
+
+  </interface>
+
+  <interface name="wtz_splitscreen" version="1">
+    <description summary="the split screen">
+      The wtz_splitscreen is for managing split regions of the target wtz_screen.
+      This interface can get get_splitscreen request of the wtz_screen.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy wtz_splitscreen">
+        Destroy wtz_splitscreen.
+      </description>
+    </request>
+
+    <event name="region">
+      <description summary="the splitscreen region object">
+        Notify the splitscreen region that partial rectangle area of the wtz_screen.
+        The event can be repeated during all of the region information send to client.
+      </description>
+      <arg name="region" type="new_id" interface="wtz_splitscreen_region" summary="the splitscreen region object" />
+    </event>
+
+    <request name="activate">
+      <description summary="activate the splitscreen">
+        Activate the splitscreen.
+      </description>
+    </request>
+
+    <request name="deactivate">
+      <description summary="deactivate the splitscreen">
+        Deactivate the splitscreen.
+      </description>
+    </request>
+
+  </interface>
+
+  <interface name="wtz_splitscreen_region" version="1">
+    <description summary="the split screen region information">
+      The wtz_splitscreen_region interface for request and receive the information of the target region.
+      The interface only can get information.
+      And the setting of the splitscreen region is depends on the implementation of the display server.
+    </description>
+
+    <request name="destroy" type="destructor">
+      <description summary="destroy wtz_splitscreen_region">
+        Destroy wtz_splitscreen.
+      </description>
+    </request>
+
+    <event name="name">
+      <description summary="name of the wtz_splitscreen_region">
+        Send name of the wtz_splitscreen_region in a screen.
+      </description>
+      <arg name="name" type="string"/>
+    </event>
+
+    <event name="geometry">
+      <description summary="geometry of the wtz_splitscreen_region">
+        Send geometry of the wtz_splitscreen_region in a screen.
+      </description>
+      <arg name="x" type="uint"/>
+      <arg name="y" type="uint"/>
+      <arg name="w" type="uint"/>
+      <arg name="h" type="uint"/>
+    </event>
+
+    <request name="assign_appid">
+      <description summary="request to assign appid">
+        Request to assign appid to the splitscreen region.
+      </description>
+      <arg name="appid" type="string"/>
+    </request>
+
+  </interface>
+
+</protocol>