Revert "tizen-surface: renew tizen-surface protocol path" 62/165862/2
authorJunSeok Kim <juns.kim@samsung.com>
Thu, 4 Jan 2018 10:31:10 +0000 (10:31 +0000)
committerDoyoun Kang <doyoun.kang@samsung.com>
Thu, 4 Jan 2018 22:58:24 +0000 (22:58 +0000)
This reverts commit 9133f07bc5aa0d2f8c57c2c90fb39831391dcef2.

Change-Id: I87e6d5959c34b75dbc1f80ec6143536ce86bda66

configure.ac
packaging/enlightenment.spec
src/bin/Makefile.mk
src/bin/e_pixmap.c
src/bin/tizen-surface-protocol.c [new file with mode: 0644]
src/bin/tizen-surface-server.h [new file with mode: 0644]
src/bin/tizen-surface.xml [new file with mode: 0644]

index d25f57d..d3db369 100755 (executable)
@@ -367,7 +367,7 @@ AC_MSG_RESULT([${have_shm_open}])
 AC_SUBST(SHM_OPEN_LIBS)
                            
 if test "x${e_cv_want_wayland_only}" != "xno" || test "x${e_cv_want_wayland_clients}" != "xno";then
-  PKG_CHECK_MODULES([WAYLAND], [wayland-server >= 1.8.0 xkbcommon uuid xdg-shell-server scaler-server screenshooter-server tizen-extension-server tizen-launch-server tizen-surface-server eom-server],
+  PKG_CHECK_MODULES([WAYLAND], [wayland-server >= 1.8.0 xkbcommon uuid xdg-shell-server scaler-server screenshooter-server tizen-extension-server tizen-launch-server eom-server],
     [
       have_wayland=yes
       AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
index 278368f..fb39470 100755 (executable)
@@ -39,7 +39,6 @@ BuildRequires:  pkgconfig(tizen-extension-server)
 BuildRequires:  pkgconfig(tizen-launch-server)
 BuildRequires:  pkgconfig(wayland-tbm-server)
 BuildRequires:  pkgconfig(tizen-remote-surface-server)
-BuildRequires:  pkgconfig(tizen-surface-server)
 BuildRequires:  pkgconfig(eom-server)
 BuildRequires:  pkgconfig(libtdm)
 BuildRequires:  pkgconfig(gbm)
index 622ac2d..bf2761a 100644 (file)
@@ -188,6 +188,7 @@ src/bin/session-recovery-server-protocol.h \
 src/bin/e_comp_wl_data.c \
 src/bin/e_comp_wl_input.c \
 src/bin/e_comp_wl.c \
+src/bin/tizen-surface-protocol.c \
 $(ENLIGHTENMENTHEADERS)
 
 if HAVE_WAYLAND_TBM
index 33f88f4..6f6912a 100644 (file)
@@ -3,7 +3,7 @@
 #include "e_comp_wl.h"
 #include <wayland-tbm-server.h>
 #include <tizen-extension-server-protocol.h>
-#include <tizen-surface-server-protocol.h>
+#include "tizen-surface-server.h"
 #ifndef EGL_TEXTURE_RGBA
 # define EGL_TEXTURE_RGBA 0x305E
 #endif
diff --git a/src/bin/tizen-surface-protocol.c b/src/bin/tizen-surface-protocol.c
new file mode 100644 (file)
index 0000000..bd5e8a6
--- /dev/null
@@ -0,0 +1,37 @@
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+extern const struct wl_interface tizen_surface_shm_flusher_interface;
+extern const struct wl_interface wl_surface_interface;
+
+static const struct wl_interface *types[] = {
+       &tizen_surface_shm_flusher_interface,
+       &wl_surface_interface,
+};
+
+static const struct wl_message tizen_surface_shm_requests[] = {
+       { "get_flusher", "no", types + 0 },
+};
+
+WL_EXPORT const struct wl_interface tizen_surface_shm_interface = {
+       "tizen_surface_shm", 2,
+       1, tizen_surface_shm_requests,
+       0, NULL,
+};
+
+static const struct wl_message tizen_surface_shm_flusher_requests[] = {
+       { "destroy", "", types + 0 },
+};
+
+static const struct wl_message tizen_surface_shm_flusher_events[] = {
+       { "flush", "", types + 0 },
+       { "free_flush", "2", types + 0 },
+};
+
+WL_EXPORT const struct wl_interface tizen_surface_shm_flusher_interface = {
+       "tizen_surface_shm_flusher", 2,
+       1, tizen_surface_shm_flusher_requests,
+       2, tizen_surface_shm_flusher_events,
+};
+
diff --git a/src/bin/tizen-surface-server.h b/src/bin/tizen-surface-server.h
new file mode 100644 (file)
index 0000000..14d7bca
--- /dev/null
@@ -0,0 +1,65 @@
+#ifndef TIZEN_SURFACE_SERVER_PROTOCOL_H
+#define TIZEN_SURFACE_SERVER_PROTOCOL_H
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-server.h"
+
+struct wl_client;
+struct wl_resource;
+
+struct tizen_surface_shm;
+struct tizen_surface_shm_flusher;
+struct wl_surface;
+
+extern const struct wl_interface tizen_surface_shm_interface;
+extern const struct wl_interface tizen_surface_shm_flusher_interface;
+
+struct tizen_surface_shm_interface {
+       /**
+        * get_flusher - (none)
+        * @id: 
+        * @surface: surface object
+        */
+       void (*get_flusher)(struct wl_client *client,
+                           struct wl_resource *resource,
+                           uint32_t id,
+                           struct wl_resource *surface);
+};
+
+
+struct tizen_surface_shm_flusher_interface {
+       /**
+        * destroy - (none)
+        */
+       void (*destroy)(struct wl_client *client,
+                       struct wl_resource *resource);
+};
+
+#define TIZEN_SURFACE_SHM_FLUSHER_FLUSH        0
+#define TIZEN_SURFACE_SHM_FLUSHER_FREE_FLUSH   1
+
+#define TIZEN_SURFACE_SHM_FLUSHER_FLUSH_SINCE_VERSION  1
+#define TIZEN_SURFACE_SHM_FLUSHER_FREE_FLUSH_SINCE_VERSION     2
+
+static inline void
+tizen_surface_shm_flusher_send_flush(struct wl_resource *resource_)
+{
+       wl_resource_post_event(resource_, TIZEN_SURFACE_SHM_FLUSHER_FLUSH);
+}
+
+static inline void
+tizen_surface_shm_flusher_send_free_flush(struct wl_resource *resource_)
+{
+       wl_resource_post_event(resource_, TIZEN_SURFACE_SHM_FLUSHER_FREE_FLUSH);
+}
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/bin/tizen-surface.xml b/src/bin/tizen-surface.xml
new file mode 100644 (file)
index 0000000..ad516c0
--- /dev/null
@@ -0,0 +1,16 @@
+<protocol name="tizen_surface">
+  <interface name="tizen_surface_shm" version="2">
+    <request name="get_flusher">
+      <arg name="id" type="new_id" interface="tizen_surface_shm_flusher" summary=""/>
+      <arg name="surface" type="object" interface="wl_surface" summary="surface object"/>
+    </request>
+  </interface>
+
+  <interface name="tizen_surface_shm_flusher" version="2">
+    <request name="destroy" type="destructor" />
+    <event name="flush">
+    </event>
+    <event name="free_flush" since="2">
+    </event>
+  </interface>
+</protocol>