using tizen-extension wayland protocol instead of including *protocol.c directly 43/44443/1
authorBoram Park <boram1288.park@samsung.com>
Mon, 20 Jul 2015 01:31:48 +0000 (10:31 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Jul 2015 14:00:06 +0000 (23:00 +0900)
Change-Id: I4f6ec5529b6da6cf5a255694b9cc4f806b5885cc

23 files changed:
configure.ac
packaging/enlightenment.spec
src/bin/Makefile.mk
src/bin/e_drm_buffer_pool.c
src/bin/e_drm_buffer_pool_server_protocol.c [deleted file]
src/bin/e_drm_buffer_pool_server_protocol.h [deleted file]
src/bin/e_pixmap.c
src/modules/Makefile_wl_desktop_shell.mk
src/modules/Makefile_wl_screenshot.mk
src/modules/wl_desktop_shell/e_desktop_shell_protocol.c [deleted file]
src/modules/wl_desktop_shell/e_desktop_shell_protocol.h [deleted file]
src/modules/wl_desktop_shell/e_mod_main.c
src/modules/wl_desktop_shell/e_scaler.c
src/modules/wl_desktop_shell/e_scaler_protocol.c [deleted file]
src/modules/wl_desktop_shell/e_scaler_protocol.h [deleted file]
src/modules/wl_desktop_shell/tizen_extension.xml
src/modules/wl_desktop_shell/tizen_extension_protocol.c
src/modules/wl_desktop_shell/tizen_extension_server_protocol.h
src/modules/wl_screenshot/e_mod_main.c
src/modules/wl_screenshot/e_screenshooter_client_protocol.c [deleted file]
src/modules/wl_screenshot/e_screenshooter_client_protocol.h [deleted file]
src/modules/wl_screenshot/e_screenshooter_server.c
src/modules/wl_screenshot/e_screenshooter_server_protocol.h [deleted file]

index 1d74877cba6d31b1694b17e86b3dbcd55cbb35a4..32488021346a527779a69936cb79adc60bc7c625 100644 (file)
@@ -838,7 +838,7 @@ AC_MSG_CHECKING([whether wayland EGL support is enabled])
 AC_MSG_RESULT([${e_cv_want_wayland_egl}])
 
 if test "x${e_cv_want_wayland_only}" != "xno" || test "x${e_cv_want_wayland_clients}" != "xno";then
-  PKG_CHECK_MODULES([WAYLAND], [ecore-wayland wayland-server >= 1.7.0 xkbcommon uuid],
+  PKG_CHECK_MODULES([WAYLAND], [ecore-wayland wayland-server >= 1.7.0 xkbcommon uuid xdg-shell-server scaler-server screenshooter-server screenshooter-client tizen-extension-server],
     [
       have_wayland=yes
       AC_DEFINE_UNQUOTED([HAVE_WAYLAND],[1],[enable wayland support])
index 41f1a06dd2acd29b6ce26891a538df985832793b..8ed3b07c4edec0ddd1ba8e74772c43264a4a1b63 100644 (file)
@@ -44,7 +44,11 @@ BuildRequires:  pkgconfig(xcb-keysyms)
 BuildRequires:  pkgconfig(ecore-x)
 %else
 BuildRequires:  pkgconfig(wayland-server)
-BuildRequires:  wayland-extension-server-devel
+BuildRequires:  pkgconfig(xdg-shell-server)
+BuildRequires:  pkgconfig(scaler-server)
+BuildRequires:  pkgconfig(screenshooter-server)
+BuildRequires:  pkgconfig(screenshooter-client)
+BuildRequires:  pkgconfig(tizen-extension-server)
 %endif
 
 
index 3a4009fd348d42cdaaf47f8f29c79dcf1d3c0247..9c63ee20dd3df669d2c1842011b8ab50047f16e0 100644 (file)
@@ -206,7 +206,6 @@ src/bin/e_zone.h
 if HAVE_WAYLAND
 ENLIGHTENMENTHEADERS += \
 src/bin/e_drm_buffer_pool.h \
-src/bin/e_drm_buffer_pool_server_protocol.h \
 src/bin/e_uuid_store.h \
 src/bin/e_comp_wl_data.h \
 src/bin/e_comp_wl_input.h \
@@ -381,7 +380,6 @@ endif
 if HAVE_WAYLAND
 enlightenment_src += \
 src/bin/e_drm_buffer_pool.c \
-src/bin/e_drm_buffer_pool_server_protocol.c \
 src/bin/e_uuid_store.c \
 src/bin/e_comp_wl_data.c \
 src/bin/e_comp_wl_input.c \
index b0f55b89a16f49ff2c853ec1f7c7e52114ddf4d4..3741b7facb9aadeb5a389a4036d32dd49e1bb451 100644 (file)
@@ -36,7 +36,7 @@
 #include <Ecore_Drm.h>
 #include "e.h"
 #include "e_drm_buffer_pool.h"
-#include "e_drm_buffer_pool_server_protocol.h"
+#include <tizen-extension-server-protocol.h>
 
 #undef MIN
 #define MIN(x,y) (((x)<(y))?(x):(y))
diff --git a/src/bin/e_drm_buffer_pool_server_protocol.c b/src/bin/e_drm_buffer_pool_server_protocol.c
deleted file mode 100644 (file)
index 7df3bc5..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_buffer_interface;
-
-static const struct wl_interface *types[] = {
-       NULL,
-       &wl_buffer_interface,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       &wl_buffer_interface,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-};
-
-static const struct wl_message tizen_buffer_pool_requests[] = {
-       { "authenticate", "u", types + 0 },
-       { "create_buffer", "nuiiuu", types + 1 },
-       { "create_planar_buffer", "niiuuiiuiiuii", types + 7 },
-};
-
-static const struct wl_message tizen_buffer_pool_events[] = {
-       { "device", "s", types + 0 },
-       { "authenticated", "", types + 0 },
-       { "capabilities", "u", types + 0 },
-       { "format", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_buffer_pool_interface = {
-       "tizen_buffer_pool", 1,
-       3, tizen_buffer_pool_requests,
-       4, tizen_buffer_pool_events,
-};
diff --git a/src/bin/e_drm_buffer_pool_server_protocol.h b/src/bin/e_drm_buffer_pool_server_protocol.h
deleted file mode 100644 (file)
index 934588c..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-#ifndef TIZEN_BUFFER_POOL_SERVER_PROTOCOL_H
-#define TIZEN_BUFFER_POOL_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_buffer_pool;
-
-extern const struct wl_interface tizen_buffer_pool_interface;
-
-#ifndef TIZEN_BUFFER_POOL_ERROR_ENUM
-#define TIZEN_BUFFER_POOL_ERROR_ENUM
-enum tizen_buffer_pool_error {
-       TIZEN_BUFFER_POOL_ERROR_INVALID_FORMAT = 0,
-       TIZEN_BUFFER_POOL_ERROR_INVALID_NAME = 1,
-};
-#endif /* TIZEN_BUFFER_POOL_ERROR_ENUM */
-
-#ifndef TIZEN_BUFFER_POOL_CAPABILITY_ENUM
-#define TIZEN_BUFFER_POOL_CAPABILITY_ENUM
-enum tizen_buffer_pool_capability {
-       TIZEN_BUFFER_POOL_CAPABILITY_DEFAULT = 0,
-       TIZEN_BUFFER_POOL_CAPABILITY_VIDEO = 0x1,
-       TIZEN_BUFFER_POOL_CAPABILITY_SCREENMIRROR = 0x2,
-};
-#endif /* TIZEN_BUFFER_POOL_CAPABILITY_ENUM */
-
-#ifndef TIZEN_BUFFER_POOL_FORMAT_ENUM
-#define TIZEN_BUFFER_POOL_FORMAT_ENUM
-enum tizen_buffer_pool_format {
-       TIZEN_BUFFER_POOL_FORMAT_C8 = 0x20203843,
-       TIZEN_BUFFER_POOL_FORMAT_RGB332 = 0x38424752,
-       TIZEN_BUFFER_POOL_FORMAT_BGR233 = 0x38524742,
-       TIZEN_BUFFER_POOL_FORMAT_XRGB4444 = 0x32315258,
-       TIZEN_BUFFER_POOL_FORMAT_XBGR4444 = 0x32314258,
-       TIZEN_BUFFER_POOL_FORMAT_RGBX4444 = 0x32315852,
-       TIZEN_BUFFER_POOL_FORMAT_BGRX4444 = 0x32315842,
-       TIZEN_BUFFER_POOL_FORMAT_ARGB4444 = 0x32315241,
-       TIZEN_BUFFER_POOL_FORMAT_ABGR4444 = 0x32314241,
-       TIZEN_BUFFER_POOL_FORMAT_RGBA4444 = 0x32314152,
-       TIZEN_BUFFER_POOL_FORMAT_BGRA4444 = 0x32314142,
-       TIZEN_BUFFER_POOL_FORMAT_XRGB1555 = 0x35315258,
-       TIZEN_BUFFER_POOL_FORMAT_XBGR1555 = 0x35314258,
-       TIZEN_BUFFER_POOL_FORMAT_RGBX5551 = 0x35315852,
-       TIZEN_BUFFER_POOL_FORMAT_BGRX5551 = 0x35315842,
-       TIZEN_BUFFER_POOL_FORMAT_ARGB1555 = 0x35315241,
-       TIZEN_BUFFER_POOL_FORMAT_ABGR1555 = 0x35314241,
-       TIZEN_BUFFER_POOL_FORMAT_RGBA5551 = 0x35314152,
-       TIZEN_BUFFER_POOL_FORMAT_BGRA5551 = 0x35314142,
-       TIZEN_BUFFER_POOL_FORMAT_RGB565 = 0x36314752,
-       TIZEN_BUFFER_POOL_FORMAT_BGR565 = 0x36314742,
-       TIZEN_BUFFER_POOL_FORMAT_RGB888 = 0x34324752,
-       TIZEN_BUFFER_POOL_FORMAT_BGR888 = 0x34324742,
-       TIZEN_BUFFER_POOL_FORMAT_XRGB8888 = 0x34325258,
-       TIZEN_BUFFER_POOL_FORMAT_XBGR8888 = 0x34324258,
-       TIZEN_BUFFER_POOL_FORMAT_RGBX8888 = 0x34325852,
-       TIZEN_BUFFER_POOL_FORMAT_BGRX8888 = 0x34325842,
-       TIZEN_BUFFER_POOL_FORMAT_ARGB8888 = 0x34325241,
-       TIZEN_BUFFER_POOL_FORMAT_ABGR8888 = 0x34324241,
-       TIZEN_BUFFER_POOL_FORMAT_RGBA8888 = 0x34324152,
-       TIZEN_BUFFER_POOL_FORMAT_BGRA8888 = 0x34324142,
-       TIZEN_BUFFER_POOL_FORMAT_XRGB2101010 = 0x30335258,
-       TIZEN_BUFFER_POOL_FORMAT_XBGR2101010 = 0x30334258,
-       TIZEN_BUFFER_POOL_FORMAT_RGBX1010102 = 0x30335852,
-       TIZEN_BUFFER_POOL_FORMAT_BGRX1010102 = 0x30335842,
-       TIZEN_BUFFER_POOL_FORMAT_ARGB2101010 = 0x30335241,
-       TIZEN_BUFFER_POOL_FORMAT_ABGR2101010 = 0x30334241,
-       TIZEN_BUFFER_POOL_FORMAT_RGBA1010102 = 0x30334152,
-       TIZEN_BUFFER_POOL_FORMAT_BGRA1010102 = 0x30334142,
-       TIZEN_BUFFER_POOL_FORMAT_YUYV = 0x56595559,
-       TIZEN_BUFFER_POOL_FORMAT_YVYU = 0x55595659,
-       TIZEN_BUFFER_POOL_FORMAT_UYVY = 0x59565955,
-       TIZEN_BUFFER_POOL_FORMAT_VYUY = 0x59555956,
-       TIZEN_BUFFER_POOL_FORMAT_AYUV = 0x56555941,
-       TIZEN_BUFFER_POOL_FORMAT_NV12 = 0x3231564e,
-       TIZEN_BUFFER_POOL_FORMAT_NV21 = 0x3132564e,
-       TIZEN_BUFFER_POOL_FORMAT_NV16 = 0x3631564e,
-       TIZEN_BUFFER_POOL_FORMAT_NV61 = 0x3136564e,
-       TIZEN_BUFFER_POOL_FORMAT_YUV410 = 0x39565559,
-       TIZEN_BUFFER_POOL_FORMAT_YVU410 = 0x39555659,
-       TIZEN_BUFFER_POOL_FORMAT_YUV411 = 0x31315559,
-       TIZEN_BUFFER_POOL_FORMAT_YVU411 = 0x31315659,
-       TIZEN_BUFFER_POOL_FORMAT_YUV420 = 0x32315559,
-       TIZEN_BUFFER_POOL_FORMAT_YVU420 = 0x32315659,
-       TIZEN_BUFFER_POOL_FORMAT_YUV422 = 0x36315559,
-       TIZEN_BUFFER_POOL_FORMAT_YVU422 = 0x36315659,
-       TIZEN_BUFFER_POOL_FORMAT_YUV444 = 0x34325559,
-       TIZEN_BUFFER_POOL_FORMAT_YVU444 = 0x34325659,
-       TIZEN_BUFFER_POOL_FORMAT_SN12 = 0x32314e53,
-       TIZEN_BUFFER_POOL_FORMAT_ST12 = 0x32315453,
-};
-#endif /* TIZEN_BUFFER_POOL_FORMAT_ENUM */
-
-struct tizen_buffer_pool_interface {
-       /**
-        * authenticate - (none)
-        * @id: (none)
-        */
-       void (*authenticate)(struct wl_client *client,
-                            struct wl_resource *resource,
-                            uint32_t id);
-       /**
-        * create_buffer - (none)
-        * @id: (none)
-        * @name: (none)
-        * @width: (none)
-        * @height: (none)
-        * @stride: (none)
-        * @format: (none)
-        */
-       void (*create_buffer)(struct wl_client *client,
-                             struct wl_resource *resource,
-                             uint32_t id,
-                             uint32_t name,
-                             int32_t width,
-                             int32_t height,
-                             uint32_t stride,
-                             uint32_t format);
-       /**
-        * create_planar_buffer - (none)
-        * @id: (none)
-        * @width: (none)
-        * @height: (none)
-        * @format: (none)
-        * @name0: (none)
-        * @offset0: (none)
-        * @stride0: (none)
-        * @name1: (none)
-        * @offset1: (none)
-        * @stride1: (none)
-        * @name2: (none)
-        * @offset2: (none)
-        * @stride2: (none)
-        */
-       void (*create_planar_buffer)(struct wl_client *client,
-                                    struct wl_resource *resource,
-                                    uint32_t id,
-                                    int32_t width,
-                                    int32_t height,
-                                    uint32_t format,
-                                    uint32_t name0,
-                                    int32_t offset0,
-                                    int32_t stride0,
-                                    uint32_t name1,
-                                    int32_t offset1,
-                                    int32_t stride1,
-                                    uint32_t name2,
-                                    int32_t offset2,
-                                    int32_t stride2);
-};
-
-#define TIZEN_BUFFER_POOL_DEVICE       0
-#define TIZEN_BUFFER_POOL_AUTHENTICATED        1
-#define TIZEN_BUFFER_POOL_CAPABILITIES 2
-#define TIZEN_BUFFER_POOL_FORMAT       3
-
-#define TIZEN_BUFFER_POOL_DEVICE_SINCE_VERSION 1
-#define TIZEN_BUFFER_POOL_AUTHENTICATED_SINCE_VERSION  1
-#define TIZEN_BUFFER_POOL_CAPABILITIES_SINCE_VERSION   1
-#define TIZEN_BUFFER_POOL_FORMAT_SINCE_VERSION 1
-
-static inline void
-tizen_buffer_pool_send_device(struct wl_resource *resource_, const char *name)
-{
-       wl_resource_post_event(resource_, TIZEN_BUFFER_POOL_DEVICE, name);
-}
-
-static inline void
-tizen_buffer_pool_send_authenticated(struct wl_resource *resource_)
-{
-       wl_resource_post_event(resource_, TIZEN_BUFFER_POOL_AUTHENTICATED);
-}
-
-static inline void
-tizen_buffer_pool_send_capabilities(struct wl_resource *resource_, uint32_t value)
-{
-       wl_resource_post_event(resource_, TIZEN_BUFFER_POOL_CAPABILITIES, value);
-}
-
-static inline void
-tizen_buffer_pool_send_format(struct wl_resource *resource_, uint32_t format)
-{
-       wl_resource_post_event(resource_, TIZEN_BUFFER_POOL_FORMAT, format);
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
index 8ac1ddc2dc6585215aa3a18c3c983f834a0c469f..5f8668f058c734418d2bfff26b6423beaf571236 100644 (file)
@@ -7,7 +7,7 @@
 # include "e_comp_x.h"
 #endif
 
-#include "e_drm_buffer_pool_server_protocol.h"
+#include <tizen-extension-server-protocol.h>
 
 static Eina_Hash *pixmaps[2] = {NULL};
 static Eina_Hash *res_ids = NULL;
index adc50c9c2a68bc47018b67d99fc5b18779b3c4a8..6d880c7300dba76f7eb3de921308b0edbb912156 100644 (file)
@@ -1,8 +1,6 @@
 EXTRA_DIST += src/modules/wl_desktop_shell/module.desktop.in \
 src/modules/wl_desktop_shell/e-module-wl_desktop_shell.edj \
-src/modules/wl_desktop_shell/module.desktop.in \
-src/modules/wl_desktop_shell/e_desktop_shell_protocol.h \
-src/modules/wl_desktop_shell/e_desktop_shell_protocol.c
+src/modules/wl_desktop_shell/module.desktop.in
 if USE_MODULE_WL_DESKTOP_SHELL
 wl_desktop_shelldir = $(MDIR)/wl_desktop_shell
 wl_desktop_shell_DATA = src/modules/wl_desktop_shell/e-module-wl_desktop_shell.edj \
@@ -18,12 +16,8 @@ src_modules_wl_desktop_shell_module_la_LDFLAGS = $(MOD_LDFLAGS)
 
 src_modules_wl_desktop_shell_module_la_SOURCES = \
   src/modules/wl_desktop_shell/e_mod_main.c \
-  src/modules/wl_desktop_shell/e_desktop_shell_protocol.c \
-  src/modules/wl_desktop_shell/e_desktop_shell_protocol.h \
   src/modules/wl_desktop_shell/e_scaler.c \
   src/modules/wl_desktop_shell/e_scaler.h \
-  src/modules/wl_desktop_shell/e_scaler_protocol.c \
-  src/modules/wl_desktop_shell/e_scaler_protocol.h \
   src/modules/wl_desktop_shell/tizen_extension_server_protocol.h \
   src/modules/wl_desktop_shell/tizen_extension_protocol.c \
   src/modules/wl_desktop_shell/tizen_subsurface_server_protocol.h \
index 9be71cd032c8bfaf688a0312bfa35939423ffa26..2cf0f78456b446114d12675244a6a880cd3b3b4c 100644 (file)
@@ -1,10 +1,7 @@
 EXTRA_DIST += src/modules/wl_screenshot/module.desktop.in \
 src/modules/wl_screenshot/e-module-wl_screenshot.edj \
-src/modules/wl_screenshot/e_screenshooter_client_protocol.h \
-src/modules/wl_screenshot/e_screenshooter_client_protocol.c \
 src/modules/wl_screenshot/e_screenshooter_server.h \
-src/modules/wl_screenshot/e_screenshooter_server.c \
-src/modules/wl_screenshot/e_screenshooter_server_protocol.h
+src/modules/wl_screenshot/e_screenshooter_server.c
 
 if USE_MODULE_WL_SCREENSHOT
 wl_screenshotdir = $(MDIR)/wl_screenshot
@@ -21,11 +18,8 @@ src_modules_wl_screenshot_module_la_LDFLAGS = $(MOD_LDFLAGS)
 
 src_modules_wl_screenshot_module_la_SOURCES = src/modules/wl_screenshot/e_mod_main.c \
                            src/modules/wl_screenshot/e_mod_main.h \
-                            src/modules/wl_screenshot/e_screenshooter_client_protocol.h \
-                            src/modules/wl_screenshot/e_screenshooter_client_protocol.c \
                             src/modules/wl_screenshot/e_screenshooter_server.h \
-                            src/modules/wl_screenshot/e_screenshooter_server.c \
-                            src/modules/wl_screenshot/e_screenshooter_server_protocol.h
+                            src/modules/wl_screenshot/e_screenshooter_server.c
 
 PHONIES += wl_screenshot install-wl_screenshot
 wl_screenshot: $(wl_screenshotpkg_LTLIBRARIES) $(wl_screenshot_DATA)
diff --git a/src/modules/wl_desktop_shell/e_desktop_shell_protocol.c b/src/modules/wl_desktop_shell/e_desktop_shell_protocol.c
deleted file mode 100644 (file)
index d09dd24..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include <wayland-util.h>
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wredundant-decls"
-
-extern const struct wl_interface wl_output_interface;
-extern const struct wl_interface wl_seat_interface;
-extern const struct wl_interface wl_surface_interface;
-extern const struct wl_interface xdg_popup_interface;
-extern const struct wl_interface xdg_surface_interface;
-
-#pragma GCC diagnostic pop
-
-static const struct wl_interface *types[] =
-{
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   &xdg_surface_interface,
-   &wl_surface_interface,
-   &xdg_popup_interface,
-   &wl_surface_interface,
-   &wl_surface_interface,
-   &wl_seat_interface,
-   NULL,
-   NULL,
-   NULL,
-   NULL,
-   &wl_surface_interface,
-   &wl_seat_interface,
-   NULL,
-   NULL,
-   NULL,
-   &wl_seat_interface,
-   NULL,
-   &wl_seat_interface,
-   NULL,
-   NULL,
-   &wl_output_interface,
-};
-
-static const struct wl_message xdg_shell_requests[] =
-{
-   { "use_unstable_version", "i", types + 0 },
-   { "get_xdg_surface", "no", types + 4 },
-   { "get_xdg_popup", "nooouiiu", types + 6 },
-   { "pong", "u", types + 0 },
-};
-
-static const struct wl_message xdg_shell_events[] =
-{
-   { "ping", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface xdg_shell_interface =
-{
-   "xdg_shell", 1,
-   4, xdg_shell_requests,
-   1, xdg_shell_events,
-};
-
-static const struct wl_message xdg_surface_requests[] =
-{
-   { "destroy", "", types + 0 },
-   { "set_parent", "?o", types + 14 },
-   { "set_title", "s", types + 0 },
-   { "set_app_id", "s", types + 0 },
-   { "show_window_menu", "ouii", types + 15 },
-   { "move", "ou", types + 19 },
-   { "resize", "ouu", types + 21 },
-   { "ack_configure", "u", types + 0 },
-   { "set_window_geometry", "iiii", types + 0 },
-   { "set_maximized", "", types + 0 },
-   { "unset_maximized", "", types + 0 },
-   { "set_fullscreen", "?o", types + 24 },
-   { "unset_fullscreen", "", types + 0 },
-   { "set_minimized", "", types + 0 },
-};
-
-static const struct wl_message xdg_surface_events[] =
-{
-   { "configure", "iiau", types + 0 },
-   { "close", "", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface xdg_surface_interface =
-{
-   "xdg_surface", 1,
-   14, xdg_surface_requests,
-   2, xdg_surface_events,
-};
-
-static const struct wl_message xdg_popup_requests[] =
-{
-   { "destroy", "", types + 0 },
-};
-
-static const struct wl_message xdg_popup_events[] =
-{
-   { "popup_done", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface xdg_popup_interface =
-{
-   "xdg_popup", 1,
-   1, xdg_popup_requests,
-   1, xdg_popup_events,
-};
diff --git a/src/modules/wl_desktop_shell/e_desktop_shell_protocol.h b/src/modules/wl_desktop_shell/e_desktop_shell_protocol.h
deleted file mode 100644 (file)
index 3cc1e70..0000000
+++ /dev/null
@@ -1,128 +0,0 @@
-#ifndef E_DESKTOP_SHELL_PROTOCOL_H
-# define E_DESKTOP_SHELL_PROTOCOL_H
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-# include <stdint.h>
-# include <stddef.h>
-# include <wayland-util.h>
-
-struct wl_client;
-struct wl_resource;
-
-struct xdg_shell;
-struct xdg_surface;
-struct xdg_popup;
-
-extern const struct wl_interface xdg_shell_interface;
-extern const struct wl_interface xdg_surface_interface;
-extern const struct wl_interface xdg_popup_interface;
-
-# ifndef XDG_SHELL_VERSION_ENUM
-#  define XDG_SHELL_VERSION_ENUM
-enum xdg_shell_version
-{
-   XDG_SHELL_VERSION_CURRENT = 4,
-};
-# endif
-
-struct xdg_shell_interface
-{
-   void (*use_unstable_version)(struct wl_client *client, struct wl_resource *resource, int32_t version);
-   void (*xdg_surface_get)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface_resource);
-   void (*xdg_popup_get)(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface_resource, struct wl_resource *parent_resource, struct wl_resource *seat_resource, uint32_t serial, int32_t x, int32_t y, uint32_t flags);
-   void (*pong)(struct wl_client *client, struct wl_resource *resource, uint32_t serial);
-};
-
-# define XDG_SHELL_PING 0
-# define XDG_SHELL_PING_SINCE_VERSION 1
-
-static inline void
-xdg_shell_send_ping(struct wl_resource *resource_, uint32_t serial)
-{
-   wl_resource_post_event(resource_, XDG_SHELL_PING, serial);
-}
-
-# ifndef XDG_SURFACE_RESIZE_EDGE_ENUM
-#  define XDG_SURFACE_RESIZE_EDGE_ENUM
-enum xdg_surface_resize_edge
-{
-   XDG_SURFACE_RESIZE_EDGE_NONE = 0,
-   XDG_SURFACE_RESIZE_EDGE_TOP = 1,
-   XDG_SURFACE_RESIZE_EDGE_BOTTOM = 2,
-   XDG_SURFACE_RESIZE_EDGE_LEFT = 4,
-   XDG_SURFACE_RESIZE_EDGE_TOP_LEFT = 5,
-   XDG_SURFACE_RESIZE_EDGE_BOTTOM_LEFT = 6,
-   XDG_SURFACE_RESIZE_EDGE_RIGHT = 8,
-   XDG_SURFACE_RESIZE_EDGE_TOP_RIGHT = 9,
-   XDG_SURFACE_RESIZE_EDGE_BOTTOM_RIGHT = 10,
-};
-# endif
-
-# ifndef XDG_SURFACE_STATE_ENUM
-#  define XDG_SURFACE_STATE_ENUM
-enum xdg_surface_state
-{
-   XDG_SURFACE_STATE_MAXIMIZED = 1,
-   XDG_SURFACE_STATE_FULLSCREEN = 2,
-   XDG_SURFACE_STATE_RESIZING = 3,
-   XDG_SURFACE_STATE_ACTIVATED = 4,
-};
-# endif
-
-struct xdg_surface_interface
-{
-   void (*destroy)(struct wl_client *client, struct wl_resource *resource);
-   void (*parent_set)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *parent_resource);
-   void (*title_set)(struct wl_client *client, struct wl_resource *resource, const char *title);
-   void (*app_id_set)(struct wl_client *client, struct wl_resource *resource, const char *id);
-   void (*window_menu_show)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat, uint32_t serial, int32_t x, int32_t y);
-   void (*move)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial);
-   void (*resize)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *seat_resource, uint32_t serial, uint32_t edges);
-   void (*ack_configure)(struct wl_client *client, struct wl_resource *resource, uint32_t serial);
-   void (*window_geometry_set)(struct wl_client *client, struct wl_resource *resource, int32_t x, int32_t y, int32_t w, int32_t h);
-   void (*maximized_set)(struct wl_client *client, struct wl_resource *resource);
-   void (*maximized_unset)(struct wl_client *client, struct wl_resource *resource);
-   void (*fullscreen_set)(struct wl_client *client, struct wl_resource *resource, struct wl_resource *output);
-   void (*fullscreen_unset)(struct wl_client *client, struct wl_resource *resource);
-   void (*minimized_set)(struct wl_client *client, struct wl_resource *resource);
-};
-
-# define XDG_SURFACE_CONFIGURE 0
-# define XDG_SURFACE_CLOSE 1
-# define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1
-# define XDG_SURFACE_CLOSE_SINCE_VERSION 1
-
-static inline void
-xdg_surface_send_configure(struct wl_resource *resource_, int32_t w, int32_t h, struct wl_array *states, uint32_t serial)
-{
-   wl_resource_post_event(resource_, XDG_SURFACE_CONFIGURE, w, h, states, serial);
-}
-
-static inline void
-xdg_surface_send_close(struct wl_resource *resource_)
-{
-   wl_resource_post_event(resource_, XDG_SURFACE_CLOSE);
-};
-
-struct xdg_popup_interface
-{
-   void (*destroy)(struct wl_client *client, struct wl_resource *resource);
-};
-
-# define XDG_POPUP_POPUP_DONE 0
-# define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1
-
-static inline void
-xdg_popup_send_popup_done(struct wl_resource *resource_, uint32_t serial)
-{
-   wl_resource_post_event(resource_, XDG_POPUP_POPUP_DONE, serial);
-};
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
index bfc699b68b16b536c6c46cd994dd2db9574ded88..98268547dd153939231c7cbde76fc56e3f745e0e 100644 (file)
@@ -1,7 +1,8 @@
 #define EXECUTIVE_MODE_ENABLED
 #define E_COMP_WL
 #include "e.h"
-#include "e_desktop_shell_protocol.h"
+#include <xdg-shell-server-protocol.h>
+#include <tizen-extension-server-protocol.h>
 #include "e_scaler.h"
 #include "tizen_extension_server_protocol.h"
 #include "tizen_subsurface_server_protocol.h"
@@ -1586,6 +1587,7 @@ _e_xdg_shell_cb_bind(struct wl_client *client, void *data, uint32_t version, uin
    wl_resource_set_dispatcher(res, _e_xdg_shell_cb_dispatch, NULL, cdata, NULL);
 }
 
+
 static void
 _e_tz_surf_ext_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
 {
@@ -1611,6 +1613,78 @@ _e_tz_surf_ext_cb_bind(struct wl_client *client, void *data, uint32_t version, u
    wl_resource_set_implementation(res, &_e_tz_surf_ext_interface, cdata, NULL);
 }
 
+static void
+_e_tz_surf_cb_tz_res_get(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *surface)
+{
+   struct wl_resource *res;
+   E_Pixmap *ep;
+   uint32_t res_id;
+
+   /* get the pixmap from this surface so we can find the client */
+   if (!(ep = wl_resource_get_user_data(surface)))
+     {
+        wl_resource_post_error(surface,
+                               WL_DISPLAY_ERROR_INVALID_OBJECT,
+                               "No Pixmap Set On Surface");
+        return;
+     }
+
+   /* make sure it's a wayland pixmap */
+   if (e_pixmap_type_get(ep) != E_PIXMAP_TYPE_WL) return;
+
+   /* find the window id for this pixmap */
+   res_id = e_pixmap_res_id_get(ep);
+
+   DBG("tizen resource id %" PRIu32, res_id);
+
+   /* try to create a tizen_gid */
+   if (!(res = wl_resource_create(client,
+                                  &tizen_resource_interface,
+                                  wl_resource_get_version(resource),
+                                  id)))
+     {
+        wl_resource_post_no_memory(resource);
+        return;
+     }
+
+   wl_resource_set_implementation(res,
+                                  &_e_tz_res_interface,
+                                  ep,
+                                  NULL);
+
+   tizen_resource_send_resource_id(res, res_id);
+}
+
+static const struct tizen_surface_interface  _e_tz_surf_interface =
+{
+   _e_tz_surf_cb_tz_res_get,
+};
+
+static void
+_e_tz_surf_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
+{
+   E_Comp_Data *cdata;
+   struct wl_resource *res;
+
+   if (!(cdata = data))
+     {
+        wl_client_post_no_memory(client);
+        return;
+     }
+
+   if (!(res = wl_resource_create(client,
+                                  &tizen_surface_interface,
+                                  MIN(version, 1),
+                                  id)))
+     {
+        ERR("Could not create tizen_surface resource: %m");
+        wl_client_post_no_memory(client);
+        return;
+     }
+
+   wl_resource_set_implementation(res, &_e_tz_surf_interface, cdata, NULL);
+}
+
 static void
 _e_tz_transient_for_cb_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
 {
@@ -1768,6 +1842,16 @@ e_modapi_init(E_Module *m)
         return NULL;
      }
 
+   if (!wl_global_create(cdata->wl.disp,
+                         &tizen_surface_interface,
+                         1,
+                         cdata,
+                         _e_tz_surf_cb_bind))
+     {
+        ERR("Could not create tizen_surface to wayland globals: %m");
+        return NULL;
+     }
+
    return m;
 }
 
index 3c4ae83c17818203fe4f6d6376b6bbe973fd8d9e..e34e70c0efd09f0efdd8913cc0aec620bc3c36e3 100644 (file)
@@ -1,7 +1,7 @@
 #define EXECUTIVE_MODE_ENABLED
 #define E_COMP_WL
 #include "e.h"
-#include "e_scaler_protocol.h"
+#include <scaler-server-protocol.h>
 
 static void
 _e_viewport_destroy(struct wl_resource *resource)
diff --git a/src/modules/wl_desktop_shell/e_scaler_protocol.c b/src/modules/wl_desktop_shell/e_scaler_protocol.c
deleted file mode 100644 (file)
index 8340c5c..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright © 2013-2014 Collabora, Ltd.
- *
- * Permission to use, copy, modify, distribute, and sell this
- * software and its documentation for any purpose is hereby granted
- * without fee, provided that the above copyright notice appear in
- * all copies and that both that copyright notice and this permission
- * notice appear in supporting documentation, and that the name of
- * the copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- * THIS SOFTWARE.
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_surface_interface;
-extern const struct wl_interface wl_viewport_interface;
-
-static const struct wl_interface *types[] = {
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       &wl_viewport_interface,
-       &wl_surface_interface,
-};
-
-static const struct wl_message wl_scaler_requests[] = {
-       { "destroy", "", types + 0 },
-       { "get_viewport", "no", types + 6 },
-};
-
-WL_EXPORT const struct wl_interface wl_scaler_interface = {
-       "wl_scaler", 2,
-       2, wl_scaler_requests,
-       0, NULL,
-};
-
-static const struct wl_message wl_viewport_requests[] = {
-       { "destroy", "", types + 0 },
-       { "set", "ffffii", types + 0 },
-       { "set_source", "2ffff", types + 0 },
-       { "set_destination", "2ii", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface wl_viewport_interface = {
-       "wl_viewport", 2,
-       4, wl_viewport_requests,
-       0, NULL,
-};
diff --git a/src/modules/wl_desktop_shell/e_scaler_protocol.h b/src/modules/wl_desktop_shell/e_scaler_protocol.h
deleted file mode 100644 (file)
index 67a45d3..0000000
+++ /dev/null
@@ -1,258 +0,0 @@
-/*
- * Copyright © 2013-2014 Collabora, Ltd.
- *
- * Permission to use, copy, modify, distribute, and sell this
- * software and its documentation for any purpose is hereby granted
- * without fee, provided that the above copyright notice appear in
- * all copies and that both that copyright notice and this permission
- * notice appear in supporting documentation, and that the name of
- * the copyright holders not be used in advertising or publicity
- * pertaining to distribution of the software without specific,
- * written prior permission.  The copyright holders make no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied
- * warranty.
- *
- * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
- * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
- * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
- * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
- * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
- * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
- * THIS SOFTWARE.
- */
-
-#ifndef SCALER_SERVER_PROTOCOL_H
-#define SCALER_SERVER_PROTOCOL_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-util.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct wl_scaler;
-struct wl_viewport;
-
-extern const struct wl_interface wl_scaler_interface;
-extern const struct wl_interface wl_viewport_interface;
-
-#ifndef WL_SCALER_ERROR_ENUM
-#define WL_SCALER_ERROR_ENUM
-enum wl_scaler_error {
-       WL_SCALER_ERROR_VIEWPORT_EXISTS = 0,
-};
-#endif /* WL_SCALER_ERROR_ENUM */
-
-/**
- * wl_scaler - surface cropping and scaling
- * @destroy: unbind from the cropping and scaling interface
- * @get_viewport: extend surface interface for crop and scale
- *
- * The global interface exposing surface cropping and scaling
- * capabilities is used to instantiate an interface extension for a
- * wl_surface object. This extended interface will then allow cropping and
- * scaling the surface contents, effectively disconnecting the direct
- * relationship between the buffer and the surface size.
- */
-struct wl_scaler_interface {
-       /**
-        * destroy - unbind from the cropping and scaling interface
-        *
-        * Informs the server that the client will not be using this
-        * protocol object anymore. This does not affect any other objects,
-        * wl_viewport objects included.
-        */
-       void (*destroy)(struct wl_client *client,
-                       struct wl_resource *resource);
-       /**
-        * get_viewport - extend surface interface for crop and scale
-        * @id: the new viewport interface id
-        * @surface: the surface
-        *
-        * Instantiate an interface extension for the given wl_surface to
-        * crop and scale its content. If the given wl_surface already has
-        * a wl_viewport object associated, the viewport_exists protocol
-        * error is raised.
-        */
-       void (*get_viewport)(struct wl_client *client,
-                            struct wl_resource *resource,
-                            uint32_t id,
-                            struct wl_resource *surface);
-};
-
-
-#ifndef WL_VIEWPORT_ERROR_ENUM
-#define WL_VIEWPORT_ERROR_ENUM
-enum wl_viewport_error {
-       WL_VIEWPORT_ERROR_BAD_VALUE = 0,
-};
-#endif /* WL_VIEWPORT_ERROR_ENUM */
-
-/**
- * wl_viewport - crop and scale interface to a wl_surface
- * @destroy: remove scaling and cropping from the surface
- * @set: set the crop and scale state
- * @set_source: set the source rectangle for cropping
- * @set_destination: set the surface size for scaling
- *
- * An additional interface to a wl_surface object, which allows the
- * client to specify the cropping and scaling of the surface contents.
- *
- * This interface allows to define the source rectangle (src_x, src_y,
- * src_width, src_height) from where to take the wl_buffer contents, and
- * scale that to destination size (dst_width, dst_height). This state is
- * double-buffered, and is applied on the next wl_surface.commit.
- *
- * The two parts of crop and scale state are independent: the source
- * rectangle, and the destination size. Initially both are unset, that is,
- * no scaling is applied. The whole of the current wl_buffer is used as the
- * source, and the surface size is as defined in wl_surface.attach.
- *
- * If the destination size is set, it causes the surface size to become
- * dst_width, dst_height. The source (rectangle) is scaled to exactly this
- * size. This overrides whatever the attached wl_buffer size is, unless the
- * wl_buffer is NULL. If the wl_buffer is NULL, the surface has no content
- * and therefore no size. Otherwise, the size is always at least 1x1 in
- * surface coordinates.
- *
- * If the source rectangle is set, it defines what area of the wl_buffer is
- * taken as the source. If the source rectangle is set and the destination
- * size is not set, the surface size becomes the source rectangle size
- * rounded up to the nearest integer. If the source size is already exactly
- * integers, this results in cropping without scaling.
- *
- * The coordinate transformations from buffer pixel coordinates up to the
- * surface-local coordinates happen in the following order: 1.
- * buffer_transform (wl_surface.set_buffer_transform) 2. buffer_scale
- * (wl_surface.set_buffer_scale) 3. crop and scale (wl_viewport.set*) This
- * means, that the source rectangle coordinates of crop and scale are given
- * in the coordinates after the buffer transform and scale, i.e. in the
- * coordinates that would be the surface-local coordinates if the crop and
- * scale was not applied.
- *
- * If the source rectangle is partially or completely outside of the
- * wl_buffer, then the surface contents are undefined (not void), and the
- * surface size is still dst_width, dst_height.
- *
- * The x, y arguments of wl_surface.attach are applied as normal to the
- * surface. They indicate how many pixels to remove from the surface size
- * from the left and the top. In other words, they are still in the
- * surface-local coordinate system, just like dst_width and dst_height are.
- *
- * If the wl_surface associated with the wl_viewport is destroyed, the
- * wl_viewport object becomes inert.
- *
- * If the wl_viewport object is destroyed, the crop and scale state is
- * removed from the wl_surface. The change will be applied on the next
- * wl_surface.commit.
- */
-struct wl_viewport_interface {
-       /**
-        * destroy - remove scaling and cropping from the surface
-        *
-        * The associated wl_surface's crop and scale state is removed.
-        * The change is applied on the next wl_surface.commit.
-        */
-       void (*destroy)(struct wl_client *client,
-                       struct wl_resource *resource);
-       /**
-        * set - set the crop and scale state
-        * @src_x: source rectangle x
-        * @src_y: source rectangle y
-        * @src_width: source rectangle width
-        * @src_height: source rectangle height
-        * @dst_width: surface width
-        * @dst_height: surface height
-        *
-        * Set both source rectangle and destination size of the
-        * associated wl_surface. See wl_viewport for the description, and
-        * relation to the wl_buffer size.
-        *
-        * The bad_value protocol error is raised if src_width or
-        * src_height is negative, or if dst_width or dst_height is not
-        * positive.
-        *
-        * The crop and scale state is double-buffered state, and will be
-        * applied on the next wl_surface.commit.
-        *
-        * Arguments dst_x and dst_y do not exist here, use the x and y
-        * arguments to wl_surface.attach. The x, y, dst_width, and
-        * dst_height define the surface-local coordinate system
-        * irrespective of the attached wl_buffer size.
-        */
-       void (*set)(struct wl_client *client,
-                   struct wl_resource *resource,
-                   wl_fixed_t src_x,
-                   wl_fixed_t src_y,
-                   wl_fixed_t src_width,
-                   wl_fixed_t src_height,
-                   int32_t dst_width,
-                   int32_t dst_height);
-       /**
-        * set_source - set the source rectangle for cropping
-        * @x: source rectangle x
-        * @y: source rectangle y
-        * @width: source rectangle width
-        * @height: source rectangle height
-        *
-        * Set the source rectangle of the associated wl_surface. See
-        * wl_viewport for the description, and relation to the wl_buffer
-        * size.
-        *
-        * If width is -1.0 and height is -1.0, the source rectangle is
-        * unset instead. Any other pair of values for width and height
-        * that contains zero or negative values raises the bad_value
-        * protocol error.
-        *
-        * The crop and scale state is double-buffered state, and will be
-        * applied on the next wl_surface.commit.
-        * @since: 2
-        */
-       void (*set_source)(struct wl_client *client,
-                          struct wl_resource *resource,
-                          wl_fixed_t x,
-                          wl_fixed_t y,
-                          wl_fixed_t width,
-                          wl_fixed_t height);
-       /**
-        * set_destination - set the surface size for scaling
-        * @width: surface width
-        * @height: surface height
-        *
-        * Set the destination size of the associated wl_surface. See
-        * wl_viewport for the description, and relation to the wl_buffer
-        * size.
-        *
-        * If width is -1 and height is -1, the destination size is unset
-        * instead. Any other pair of values for width and height that
-        * contains zero or negative values raises the bad_value protocol
-        * error.
-        *
-        * The crop and scale state is double-buffered state, and will be
-        * applied on the next wl_surface.commit.
-        *
-        * Arguments x and y do not exist here, use the x and y arguments
-        * to wl_surface.attach. The x, y, width, and height define the
-        * surface-local coordinate system irrespective of the attached
-        * wl_buffer size.
-        * @since: 2
-        */
-       void (*set_destination)(struct wl_client *client,
-                               struct wl_resource *resource,
-                               int32_t width,
-                               int32_t height);
-};
-
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
index e81ae0e02eb6a5ea9a0ee19420885b9e1aff8ee2..14a8347d671a4cfe0ac309a52903c0b1b85c2226 100644 (file)
@@ -1,14 +1,8 @@
 <protocol name="tizen_extension">
-   <interface name="tizen_resource" version="1">
-      <request name="destroy" type="destructor" /> 
-      <event name="resource_id">
-         <arg name="id" type="uint" /> 
-      </event>
-   </interface>
    <interface name="tizen_surface_extension" version="1">
       <request name="get_tizen_resource">
-         <arg name="id" type="new_id" interface="tizen_resource" /> 
-         <arg name="surface" type="object" interface="wl_surface" /> 
+         <arg name="id" type="new_id" interface="tizen_resource" />
+         <arg name="surface" type="object" interface="wl_surface" />
       </request>
    </interface>
 </protocol>
index 3216ba75a3ecb5d3b7424d641276a3e47c7c7b81..f9db487d533c35feeac79b2991cfc1bfe589f7c6 100644 (file)
@@ -6,27 +6,12 @@ extern const struct wl_interface tizen_resource_interface;
 extern const struct wl_interface wl_surface_interface;
 
 static const struct wl_interface *types[] = {
-       NULL,
        &tizen_resource_interface,
        &wl_surface_interface,
 };
 
-static const struct wl_message tizen_resource_requests[] = {
-       { "destroy", "", types + 0 },
-};
-
-static const struct wl_message tizen_resource_events[] = {
-       { "resource_id", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_resource_interface = {
-       "tizen_resource", 1,
-       1, tizen_resource_requests,
-       1, tizen_resource_events,
-};
-
 static const struct wl_message tizen_surface_extension_requests[] = {
-       { "get_tizen_resource", "no", types + 1 },
+       { "get_tizen_resource", "no", types + 0 },
 };
 
 WL_EXPORT const struct wl_interface tizen_surface_extension_interface = {
index 281c509bdd9a66a37a3e2c73234fed5fb2b68ee9..65ad55683fea981548bab57ac41287ef1c3d2cd2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef TIZEN_EXTENSION_SERVER_PROTOCOL_H
-#define TIZEN_EXTENSION_SERVER_PROTOCOL_H
+#ifndef TIZEN_EXT_SERVER_PROTOCOL_H
+#define TIZEN_EXT_SERVER_PROTOCOL_H
 
 #ifdef  __cplusplus
 extern "C" {
@@ -12,31 +12,9 @@ extern "C" {
 struct wl_client;
 struct wl_resource;
 
-struct tizen_resource;
 struct tizen_surface_extension;
-struct wl_surface;
 
-extern const struct wl_interface tizen_resource_interface;
 extern const struct wl_interface tizen_surface_extension_interface;
-extern const struct wl_interface wl_surface_interface;
-
-struct tizen_resource_interface {
-       /**
-        * destroy - (none)
-        */
-       void (*destroy)(struct wl_client *client,
-                       struct wl_resource *resource);
-};
-
-#define TIZEN_RESOURCE_RESOURCE_ID     0
-
-#define TIZEN_RESOURCE_RESOURCE_ID_SINCE_VERSION       1
-
-static inline void
-tizen_resource_send_resource_id(struct wl_resource *resource_, uint32_t id)
-{
-       wl_resource_post_event(resource_, TIZEN_RESOURCE_RESOURCE_ID, id);
-}
 
 struct tizen_surface_extension_interface {
        /**
index 4680be2181e91c11ab598542b5096d489cec090f..daa196eb86000f1a459a460ae3071ca796e38d9d 100644 (file)
@@ -2,7 +2,7 @@
 #include <wayland-client.h>
 #include <Ecore_Wayland.h>
 #include <sys/mman.h>
-#include "e_screenshooter_client_protocol.h"
+#include <screenshooter-client-protocol.h>
 #include "e_screenshooter_server.h"
 
 typedef struct _Instance Instance;
diff --git a/src/modules/wl_screenshot/e_screenshooter_client_protocol.c b/src/modules/wl_screenshot/e_screenshooter_client_protocol.c
deleted file mode 100644 (file)
index bc1a0c4..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_output_interface;
-extern const struct wl_interface wl_buffer_interface;
-
-static const struct wl_interface *types[] = {
-       &wl_output_interface,
-       &wl_buffer_interface,
-};
-
-static const struct wl_message screenshooter_requests[] = {
-       { "shoot", "oo", types + 0 },
-};
-
-static const struct wl_message screenshooter_events[] = 
-{
-       { "done", "", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface screenshooter_interface = {
-       "screenshooter", 1,
-       1, screenshooter_requests,
-       1, screenshooter_events,
-};
-
diff --git a/src/modules/wl_screenshot/e_screenshooter_client_protocol.h b/src/modules/wl_screenshot/e_screenshooter_client_protocol.h
deleted file mode 100644 (file)
index 34b747a..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef E_SCREENSHOOTER_CLIENT_PROTOCOL_H
-#define E_SCREENSHOOTER_CLIENT_PROTOCOL_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-util.h"
-
-struct wl_client;
-struct wl_resource;
-struct screenshooter;
-
-extern const struct wl_interface screenshooter_interface;
-
-struct screenshooter_listener 
-{
-   /** done event */
-   void (*done)(void *data, struct screenshooter *screenshooter);
-};
-
-static inline int
-screenshooter_add_listener(struct screenshooter *screenshooter,
-                          const struct screenshooter_listener *listener, void *data)
-{
-       return wl_proxy_add_listener((struct wl_proxy *) screenshooter,
-                                    (void (**)(void)) listener, data);
-}
-
-#define SCREENSHOOTER_SHOOT    0
-
-static inline void
-screenshooter_set_user_data(struct screenshooter *screenshooter, void *user_data)
-{
-       wl_proxy_set_user_data((struct wl_proxy *) screenshooter, user_data);
-}
-
-static inline void *
-screenshooter_get_user_data(struct screenshooter *screenshooter)
-{
-       return wl_proxy_get_user_data((struct wl_proxy *) screenshooter);
-}
-
-static inline void
-screenshooter_destroy(struct screenshooter *screenshooter)
-{
-       wl_proxy_destroy((struct wl_proxy *) screenshooter);
-}
-
-static inline void
-screenshooter_shoot(struct screenshooter *screenshooter, struct wl_output *output, struct wl_buffer *buffer)
-{
-       wl_proxy_marshal((struct wl_proxy *) screenshooter,
-                        SCREENSHOOTER_SHOOT, output, buffer);
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
index e29942af43b08c52b91266ef6b7ad0fa9c260538..55a88e316cf89dbb14e5873cfa6db87e3892fff6 100644 (file)
@@ -2,7 +2,7 @@
 #include "e.h"
 #include <wayland-server.h>
 #include <Ecore_Wayland.h>
-#include "e_screenshooter_server_protocol.h"
+#include <screenshooter-server-protocol.h>
 #include "e_screenshooter_server.h"
 
 static void
diff --git a/src/modules/wl_screenshot/e_screenshooter_server_protocol.h b/src/modules/wl_screenshot/e_screenshooter_server_protocol.h
deleted file mode 100644 (file)
index c0bc888..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-#ifndef E_SCREENSHOOTER_SERVER_PROTOCOL_H
-#define E_SCREENSHOOTER_SERVER_PROTOCOL_H
-
-#ifdef  __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-util.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct screenshooter;
-
-extern const struct wl_interface screenshooter_interface;
-
-struct screenshooter_interface {
-       /**
-        * shoot - (none)
-        * @output: (none)
-        * @buffer: (none)
-        */
-       void (*shoot)(struct wl_client *client,
-                     struct wl_resource *resource,
-                     struct wl_resource *output,
-                     struct wl_resource *buffer);
-};
-
-#define SCREENSHOOTER_DONE     0
-
-#define SCREENSHOOTER_DONE_SINCE_VERSION       1
-
-static inline void
-screenshooter_send_done(struct wl_resource *resource_)
-{
-       wl_resource_post_event(resource_, SCREENSHOOTER_DONE);
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif