Added 'tizen-remote-surface' protocol 73/87973/1
authorMinJeong Kim <minjjj.kim@samsung.com>
Mon, 12 Sep 2016 10:25:56 +0000 (19:25 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Mon, 12 Sep 2016 10:47:58 +0000 (19:47 +0900)
Change-Id: I50d4a3af36080c5c66e8bf774b2ed7b6f89b4372
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
Makefile.am
configure.ac
packaging/libwayland-tbm.spec
protocol/tizen-remote-surface.xml [new file with mode: 0644]
src/Makefile.am
tizen-remote-surface-client.pc.in [new file with mode: 0644]
tizen-remote-surface-server.pc.in [new file with mode: 0644]

index 241a644..d23ca26 100644 (file)
@@ -5,5 +5,7 @@ SUBDIRS = src tool
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = \
        wayland-tbm-server.pc \
-       wayland-tbm-client.pc
+       wayland-tbm-client.pc \
+       tizen-remote-surface-server.pc \
+       tizen-remote-surface-client.pc
 
index e34de7a..54020ab 100644 (file)
@@ -25,7 +25,9 @@ AC_CONFIG_FILES([
     src/Makefile
     test/Makefile
     tool/Makefile
-       wayland-tbm-server.pc
-       wayland-tbm-client.pc
+    wayland-tbm-server.pc
+    wayland-tbm-client.pc
+    tizen-remote-surface-server.pc
+    tizen-remote-surface-client.pc
 ])
 AC_OUTPUT
index 4d4708d..de0f93d 100644 (file)
@@ -75,12 +75,14 @@ cp -af COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
 %manifest %{name}.manifest
 %{TZ_SYS_RO_SHARE}/license/%{name}
 %_libdir/libwayland-tbm-server.so.0*
+%_libdir/libtizen-remote-surface-server.so.0*
 
 %files -n libwayland-tbm-client
 %defattr(-,root,root)
 %manifest %{name}.manifest
 %{TZ_SYS_RO_SHARE}/license/%{name}
 %_libdir/libwayland-tbm-client.so.0*
+%_libdir/libtizen-remote-surface-client.so.0*
 %{_bindir}/wayland-tbm-monitor
 
 %files devel
@@ -89,6 +91,9 @@ cp -af COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
 %_includedir/wayland-tbm*.h
 %_libdir/libwayland-tbm*.so
 %_libdir/pkgconfig/wayland-tbm*.pc
+%_includedir/tizen-remote-surface*.h
+%_libdir/*tizen-remote-surface*.so
+%_libdir/pkgconfig/tizen-remote-surface*.pc
 %doc README TODO
 
 %changelog
diff --git a/protocol/tizen-remote-surface.xml b/protocol/tizen-remote-surface.xml
new file mode 100644 (file)
index 0000000..20ad4a7
--- /dev/null
@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<protocol name="tizen_remote_surface">
+  <interface name="tizen_remote_surface_manager" version="1">
+     <description summary="manager of tizen_remote_surface">
+        A manager of tizen_remote_surface. Thie object is in charge of
+        creating tizen_remote_surface_provider and tizen_remote_surface and
+        provide additional operations for those objects.
+     </description>
+     <request name="create_provider">
+        <description summary="create nea remote surface provider">
+           Ask manager to create a new remote surface provider.
+           A wl_surface is required for making remote surface provider.
+        </description>
+        <arg name="id" type="new_id" interface="tizen_remote_surface_provider" />
+        <arg name="surface" type="object" interface="wl_surface" />
+     </request>
+
+     <request name="create_surface">
+        <description summary="create new remote surface">
+           Ask manager to create a new remote surface.
+           resource_id is required to identify this remote surface is what provider of
+           and wl_tbm object is used to remote buffer for this remote surface.
+        </description>
+        <arg name="id" type="new_id" interface="tizen_remote_surface" />
+        <arg name="resource_id" type="uint" />
+       <arg name="tbm" type="object" interface="wl_tbm" />
+     </request>
+
+     <request name="bind_surface">
+        <description summary="bind a remote surface and a wl_surface">
+           Combining a remote surface object into a wl_surface object.
+        </description>
+        <arg name="surface" type="object" interface="wl_surface" />
+        <arg name="remote_surface" type="object" interface="tizen_remote_surface" />
+     </request>
+  </interface>
+
+  <interface name="tizen_remote_surface_provider" version="1">
+     <description summary="a provider of remote buffer source">
+        A provider client. Surfaces of providers are not included on compositing,
+        Instead of that its attached buffer is used for creating remote buffer
+        and the remote buffer is delivered to remote surfaces.
+     </description>
+     <request name="destroy" type="destructor" />
+
+     <!-- for id -->
+     <event name="resource_id">
+        <description summary="announce resource id of provider">
+           Announce resource id of this provider.
+        </description>
+        <arg name="resource_id" type="uint" />
+     </event>
+
+     <!-- for visibility -->
+     <event name="visibility">
+        <description summary="notify of visibility change">
+           Notify of visibility chages.
+           This provider's visibility is determined by its remote surfaces.
+        </description>
+        <arg name="visibility" type="uint" enum="visibility_type"/>
+     </event>
+
+     <enum name="visibility_type">
+        <entry name="visible" value="0" />
+        <entry name="invisible" value="1" />
+     </enum>
+  </interface>
+
+  <interface name="tizen_remote_surface" version="1">
+     <request name="destroy" type="destructor" />
+
+     <!-- for buffer update -->
+     <request name="redirect">
+        <description summary="request redirect of provider's buffer"/>
+     </request>
+     <request name="unredirect">
+        <description summary="request unredirect of provider's buffer"/>
+     </request>
+
+     <event name="update_buffer">
+        <description summary="deliver updated buffer of provider">
+           When selected provider of a remote surface sent wl_surface.commit,
+           server deliver a remote buffer is created using a buffer of the
+           provider.
+        </description>
+        <arg name="buffer" type="object" interface="wl_buffer" />
+        <arg name="time" type="uint" />
+     </event>
+
+     <!-- for event transference -->
+     <request name="transfer_mouse_event">
+        <arg name="event_type" type="uint" enum="event_type"/>
+        <arg name="device" type="int" />
+        <arg name="button" type="int" />
+        <arg name="x" type="int" />
+        <arg name="y" type="int" />
+        <arg name="radius_x" type="fixed" />
+        <arg name="radius_y" type="fixed" />
+        <arg name="pressure" type="fixed" />
+        <arg name="angle" type="fixed" />
+        <arg name="class" type="uint" />
+        <arg name="subclass" type="uint" />
+        <arg name="identifier" type="string" />
+        <arg name="time" type="uint" />
+     </request>
+
+     <request name="transfer_mouse_wheel">
+        <arg name="direction" type="uint" />
+        <arg name="z" type="int" />
+        <arg name="class" type="uint" />
+        <arg name="subclass" type="uint" />
+        <arg name="identifier" type="string" />
+        <arg name="time" type="uint" />
+     </request>
+
+     <request name="transfer_touch_event">
+        <arg name="event_type" type="uint" enum="event_type"/>
+        <arg name="device" type="int" />
+        <arg name="button" type="int" />
+        <arg name="x" type="int" />
+        <arg name="y" type="int" />
+        <arg name="radius_x" type="fixed" />
+        <arg name="radius_y" type="fixed" />
+        <arg name="pressure" type="fixed" />
+        <arg name="angle" type="fixed" />
+        <arg name="class" type="uint" />
+        <arg name="subclass" type="uint" />
+        <arg name="identifier" type="string" />
+        <arg name="time" type="uint" />
+     </request>
+
+     <request name="transfer_touch_cancel" />
+
+     <request name="transfer_key_event">
+        <arg name="event_type" type="uint" enum="event_type"/>
+        <arg name="keycode" type="int" />
+        <arg name="class" type="uint" />
+        <arg name="subclass" type="uint" />
+        <arg name="identifier" type="string" />
+        <arg name="time" type="uint" />
+     </request>
+
+     <enum name="event_type">
+        <entry name="none" value="0" />
+        <entry name="mouse_down" value="1" />
+        <entry name="mouse_up" value="2" />
+        <entry name="mouse_move" value="3" />
+        <entry name="touch_down" value="4" />
+        <entry name="touch_up" value="5" />
+        <entry name="touch_move" value="6" />
+        <entry name="key_down" value="7" />
+        <entry name="key_up" value="8" />
+     </enum>
+
+     <!-- for visibility transference -->
+     <request name="transfer_visibility">
+        <description summary="notify of visibility change of remote surface" />
+        <arg name="visibility" type="uint" enum="visibility_type" />
+     </request>
+
+     <enum name="visibility_type">
+        <entry name="visible" value="0" />
+        <entry name="invisible" value="1" />
+     </enum>
+
+     <!-- for notify of provider's ejection -->
+     <event name="missing">
+        <description summary="notify of leave of provider" />
+     </event>
+  </interface>
+</protocol>
index d32ac41..710d66b 100644 (file)
@@ -57,6 +57,20 @@ nodist_libwayland_tbm_client_la_SOURCES =            \
 %-client-protocol.h : $(top_srcdir)/protocol/%.xml
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(wayland_scanner) client-header < $< > $@
 
+### tizen-remote-surface
+lib_LTLIBRARIES += \
+    libtizen-remote-surface-server.la \
+    libtizen-remote-surface-client.la
+include_HEADERS += \
+    tizen-remote-surface-server-protocol.h \
+    tizen-remote-surface-client-protocol.h
+libtizen_remote_surface_server_la_SOURCES = tizen-remote-surface-protocol.c
+libtizen_remote_surface_server_la_CFLAGS  = @WL_TBM_SERVER_CFLAGS@
+libtizen_remote_surface_server_la_LIBADD  = @WL_TBM_SERVER_LIBS@
+libtizen_remote_surface_client_la_SOURCES = tizen-remote-surface-protocol.c
+libtizen_remote_surface_client_la_CFLAGS  = @WL_TBM_CLIENT_CFLAGS@
+libtizen_remote_surface_client_la_LIBADD  = @WL_TBM_CLIENT_LIBS@
+
 BUILT_SOURCES = \
        $(nodist_libwayland_tbm_server_la_SOURCES)      \
        $(nodist_libwayland_tbm_client_la_SOURCES)
diff --git a/tizen-remote-surface-client.pc.in b/tizen-remote-surface-client.pc.in
new file mode 100644 (file)
index 0000000..7ed8a07
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: tizen-remote-surface
+Description: Remote Surface Protocol for TIZEN
+Version: 1.0.0
+Requires: wayland-client wayland-tbm-client
+Libs: -L${libdir} -ltizen-remote-surface-client
+Cflags: -I${includedir}
diff --git a/tizen-remote-surface-server.pc.in b/tizen-remote-surface-server.pc.in
new file mode 100644 (file)
index 0000000..dcc302c
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: tizen-remote-surface
+Description: Remote Surface Protocol for TIZEN
+Version: 1.0.0
+Requires: wayland-server wayland-tbm-server
+Libs: -L${libdir} -ltizen-remote-surface-server
+Cflags: -I${includedir}