From ff28b446a15afd4388d32ea1b2d79018dd2ad2c3 Mon Sep 17 00:00:00 2001 From: JunSeok Kim Date: Thu, 4 Jan 2018 10:30:57 +0000 Subject: [PATCH] Revert "tizen-surface: renew tizen-surface protocol path" This reverts commit 33eff399b78484dbc3d37db697a1cea6eaf1f73f. Change-Id: If74d2b160a0cac76222c8b66541dd528bf4b3bdf --- configure.ac | 2 +- packaging/efl.spec | 1 - src/Makefile_Evas.am | 3 +- src/modules/evas/engines/wayland_shm/evas_shm.c | 2 +- src/modules/evas/engines/wayland_shm/evas_tbmbuf.c | 2 +- .../engines/wayland_shm/tizen-surface-client.h | 118 +++++++++++++++++++++ .../engines/wayland_shm/tizen-surface-protocol.c | 37 +++++++ 7 files changed, 160 insertions(+), 5 deletions(-) create mode 100644 src/modules/evas/engines/wayland_shm/tizen-surface-client.h create mode 100644 src/modules/evas/engines/wayland_shm/tizen-surface-protocol.c diff --git a/configure.ac b/configure.ac index e400352..c9f19c8 100755 --- a/configure.ac +++ b/configure.ac @@ -3141,7 +3141,7 @@ EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eo]) EFL_INTERNAL_DEPEND_PKG([ECORE_WAYLAND], [eina]) EFL_DEPEND_PKG([ECORE_WAYLAND], [WAYLAND], - [wayland-client >= 1.3.0 wayland-cursor >= 1.3.0 xkbcommon >= 0.3.0 xdg-shell-client text-client tizen-extension-client tizen-surface-client wayland-tbm-client libtdm-client]) + [wayland-client >= 1.3.0 wayland-cursor >= 1.3.0 xkbcommon >= 0.3.0 xdg-shell-client text-client tizen-extension-client wayland-tbm-client libtdm-client]) EFL_EVAL_PKGS([ECORE_WAYLAND]) diff --git a/packaging/efl.spec b/packaging/efl.spec index d0d1323..9cf168d 100644 --- a/packaging/efl.spec +++ b/packaging/efl.spec @@ -28,7 +28,6 @@ BuildRequires: pkgconfig(xdg-shell-client) BuildRequires: pkgconfig(wayland-tbm-client) BuildRequires: pkgconfig(wayland-tbm-server) BuildRequires: pkgconfig(tizen-extension-client) -BuildRequires: pkgconfig(tizen-surface-client) BuildRequires: pkgconfig(tizen-remote-surface-client) Requires: libwayland-extension-client %endif diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 16edaa9..3e03a29 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -1185,7 +1185,8 @@ modules/evas/engines/wayland_shm/evas_engine.c \ modules/evas/engines/wayland_shm/evas_engine.h \ modules/evas/engines/wayland_shm/evas_shm.c \ modules/evas/engines/wayland_shm/evas_tbmbuf.c \ -modules/evas/engines/wayland_shm/evas_outbuf.c +modules/evas/engines/wayland_shm/evas_outbuf.c \ +modules/evas/engines/wayland_shm/tizen-surface-protocol.c if EVAS_STATIC_BUILD_WAYLAND_SHM lib_evas_libevas_la_SOURCES += $(WAYLAND_SHM_SOURCES) lib_evas_libevas_la_CPPFLAGS += @evas_engine_wayland_shm_cflags@ diff --git a/src/modules/evas/engines/wayland_shm/evas_shm.c b/src/modules/evas/engines/wayland_shm/evas_shm.c index b5018d0..abc4d57 100755 --- a/src/modules/evas/engines/wayland_shm/evas_shm.c +++ b/src/modules/evas/engines/wayland_shm/evas_shm.c @@ -3,7 +3,7 @@ #include "evas_engine.h" #include -#include +#include "tizen-surface-client.h" typedef struct _Shm_Pool Shm_Pool; struct _Shm_Pool diff --git a/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c b/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c index d620697..a931fc9 100644 --- a/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c +++ b/src/modules/evas/engines/wayland_shm/evas_tbmbuf.c @@ -8,7 +8,7 @@ #include #include -#include +#include "tizen-surface-client.h" #define KEY_WINDOW (unsigned long)(&key_window) #define KEY_WL_BUFFER (unsigned long)(&key_wl_buffer) diff --git a/src/modules/evas/engines/wayland_shm/tizen-surface-client.h b/src/modules/evas/engines/wayland_shm/tizen-surface-client.h new file mode 100644 index 0000000..6eaa459 --- /dev/null +++ b/src/modules/evas/engines/wayland_shm/tizen-surface-client.h @@ -0,0 +1,118 @@ +#ifndef TIZEN_SURFACE_CLIENT_PROTOCOL_H +#define TIZEN_SURFACE_CLIENT_PROTOCOL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include "wayland-client.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; + +#define TIZEN_SURFACE_SHM_GET_FLUSHER 0 + +#define TIZEN_SURFACE_SHM_GET_FLUSHER_SINCE_VERSION 1 + +static inline void +tizen_surface_shm_set_user_data(struct tizen_surface_shm *tizen_surface_shm, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) tizen_surface_shm, user_data); +} + +static inline void * +tizen_surface_shm_get_user_data(struct tizen_surface_shm *tizen_surface_shm) +{ + return wl_proxy_get_user_data((struct wl_proxy *) tizen_surface_shm); +} + +static inline uint32_t +tizen_surface_shm_get_version(struct tizen_surface_shm *tizen_surface_shm) +{ + return wl_proxy_get_version((struct wl_proxy *) tizen_surface_shm); +} + +static inline void +tizen_surface_shm_destroy(struct tizen_surface_shm *tizen_surface_shm) +{ + wl_proxy_destroy((struct wl_proxy *) tizen_surface_shm); +} + +static inline struct tizen_surface_shm_flusher * +tizen_surface_shm_get_flusher(struct tizen_surface_shm *tizen_surface_shm, struct wl_surface *surface) +{ + struct wl_proxy *id; + + id = wl_proxy_marshal_constructor((struct wl_proxy *) tizen_surface_shm, + TIZEN_SURFACE_SHM_GET_FLUSHER, &tizen_surface_shm_flusher_interface, NULL, surface); + + return (struct tizen_surface_shm_flusher *) id; +} + +struct tizen_surface_shm_flusher_listener { + /** + * flush - (none) + */ + void (*flush)(void *data, + struct tizen_surface_shm_flusher *tizen_surface_shm_flusher); + /** + * free_flush - (none) + * @since: 2 + */ + void (*free_flush)(void *data, + struct tizen_surface_shm_flusher *tizen_surface_shm_flusher); +}; + +static inline int +tizen_surface_shm_flusher_add_listener(struct tizen_surface_shm_flusher *tizen_surface_shm_flusher, + const struct tizen_surface_shm_flusher_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) tizen_surface_shm_flusher, + (void (**)(void)) listener, data); +} + +#define TIZEN_SURFACE_SHM_FLUSHER_DESTROY 0 + +#define TIZEN_SURFACE_SHM_FLUSHER_DESTROY_SINCE_VERSION 1 + +static inline void +tizen_surface_shm_flusher_set_user_data(struct tizen_surface_shm_flusher *tizen_surface_shm_flusher, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) tizen_surface_shm_flusher, user_data); +} + +static inline void * +tizen_surface_shm_flusher_get_user_data(struct tizen_surface_shm_flusher *tizen_surface_shm_flusher) +{ + return wl_proxy_get_user_data((struct wl_proxy *) tizen_surface_shm_flusher); +} + +static inline uint32_t +tizen_surface_shm_flusher_get_version(struct tizen_surface_shm_flusher *tizen_surface_shm_flusher) +{ + return wl_proxy_get_version((struct wl_proxy *) tizen_surface_shm_flusher); +} + +static inline void +tizen_surface_shm_flusher_destroy(struct tizen_surface_shm_flusher *tizen_surface_shm_flusher) +{ + wl_proxy_marshal((struct wl_proxy *) tizen_surface_shm_flusher, + TIZEN_SURFACE_SHM_FLUSHER_DESTROY); + + wl_proxy_destroy((struct wl_proxy *) tizen_surface_shm_flusher); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/modules/evas/engines/wayland_shm/tizen-surface-protocol.c b/src/modules/evas/engines/wayland_shm/tizen-surface-protocol.c new file mode 100644 index 0000000..bd5e8a6 --- /dev/null +++ b/src/modules/evas/engines/wayland_shm/tizen-surface-protocol.c @@ -0,0 +1,37 @@ +#include +#include +#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, +}; + -- 2.7.4