using tizen-extension wayland protocol instead of including *protocol.c directly 36/44436/1
authorBoram Park <boram1288.park@samsung.com>
Mon, 20 Jul 2015 02:53:37 +0000 (11:53 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Jul 2015 01:03:00 +0000 (10:03 +0900)
Change-Id: I06543b77a354a9cbab4ae7cea72fa702ac343363

configure.ac
packaging/e-mod-tizen-wm-policy.spec
src/Makefile.am
src/e_mod_wl.c
src/e_tizen_policy_server_protocol.c [deleted file]
src/e_tizen_policy_server_protocol.h [deleted file]

index cacca03..2eccac5 100644 (file)
@@ -28,10 +28,6 @@ AC_PROG_LIBTOOL
 #AM_GNU_GETTEXT([external])
 #AM_GNU_GETTEXT_VERSION(0.14)
 
-PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
-AC_SUBST(ENLIGHTENMENT_CFLAGS)
-AC_SUBST(ENLIGHTENMENT_LIBS)
-
 have_wayland_only=no
 AC_ARG_ENABLE([wayland-only],
   AS_HELP_STRING([--enable-wayland-only],[enable wayland-only version of enlightenment @<:@default=disabled@:>@]),
@@ -43,6 +39,14 @@ if test "x${have_wayland_only}" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_WAYLAND_ONLY, [test "x${have_wayland_only}" = xyes])
 
+if test "x${have_wayland_only}" = "xyes"; then
+       PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment, tizen-extension-server])
+else
+       PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
+fi
+AC_SUBST(ENLIGHTENMENT_CFLAGS)
+AC_SUBST(ENLIGHTENMENT_LIBS)
+
 AC_CHECK_LIB(dl, dlopen, dlopen_libs=-ldl)
 AC_SUBST(dlopen_libs)
 
index 251c1bc..8d52ad6 100644 (file)
@@ -13,6 +13,7 @@ BuildRequires: pkgconfig(enlightenment)
 BuildRequires: pkgconfig(x11) 
 %endif
 %if %{with wayland}
+BuildRequires: pkgconfig(tizen-extension-server)
 BuildRequires: pkgconfig(eina)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(edje)
index 66b164f..75b322f 100644 (file)
@@ -24,8 +24,6 @@ module_la_SOURCES      = e_mod_config.c \
 if HAVE_WAYLAND_ONLY
 module_la_SOURCES += e_mod_wl.c \
                                         e_mod_wl.h \
-                                        e_tizen_policy_server_protocol.c \
-                                        e_tizen_policy_server_protocol.h \
                                         tizen_notification-server-protocol.h \
                                         tizen_notification-protocol.c \
                                         e_mod_rotation_wl.c \
index b0712b0..49a9bf1 100644 (file)
@@ -2,7 +2,7 @@
 #include "e_mod_notification.h"
 
 #include <wayland-server.h>
-#include "e_tizen_policy_server_protocol.h"
+#include <tizen-extension-server-protocol.h>
 #include "tizen_notification-server-protocol.h"
 
 typedef struct _Pol_Wayland
diff --git a/src/e_tizen_policy_server_protocol.c b/src/e_tizen_policy_server_protocol.c
deleted file mode 100644 (file)
index 6538a55..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface tizen_position_interface;
-extern const struct wl_interface tizen_visibility_interface;
-extern const struct wl_interface wl_surface_interface;
-
-static const struct wl_interface *types[] = {
-       NULL,
-       NULL,
-       &tizen_visibility_interface,
-       &wl_surface_interface,
-       &tizen_position_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       NULL,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       &wl_surface_interface,
-       NULL,
-       &wl_surface_interface,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-};
-
-static const struct wl_message tizen_policy_requests[] = {
-       { "get_visibility", "no", types + 2 },
-       { "get_position", "no", types + 4 },
-       { "activate", "o", types + 6 },
-       { "lower", "o", types + 7 },
-       { "focus_skip_set", "o", types + 8 },
-       { "focus_skip_unset", "o", types + 9 },
-       { "role_set", "os", types + 10 },
-       { "conformant_set", "o", types + 12 },
-       { "conformant_unset", "o", types + 13 },
-       { "conformant_get", "o", types + 14 },
-};
-
-static const struct wl_message tizen_policy_events[] = {
-       { "conformant", "ou", types + 15 },
-       { "conformant_area", "ouuiiii", types + 17 },
-};
-
-WL_EXPORT const struct wl_interface tizen_policy_interface = {
-       "tizen_policy", 1,
-       10, tizen_policy_requests,
-       2, tizen_policy_events,
-};
-
-static const struct wl_message tizen_visibility_requests[] = {
-       { "destroy", "", types + 0 },
-};
-
-static const struct wl_message tizen_visibility_events[] = {
-       { "notify", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_visibility_interface = {
-       "tizen_visibility", 1,
-       1, tizen_visibility_requests,
-       1, tizen_visibility_events,
-};
-
-static const struct wl_message tizen_position_requests[] = {
-       { "destroy", "", types + 0 },
-       { "set", "ii", types + 0 },
-};
-
-static const struct wl_message tizen_position_events[] = {
-       { "changed", "ii", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_position_interface = {
-       "tizen_position", 1,
-       2, tizen_position_requests,
-       1, tizen_position_events,
-};
-
diff --git a/src/e_tizen_policy_server_protocol.h b/src/e_tizen_policy_server_protocol.h
deleted file mode 100644 (file)
index c4eae41..0000000
+++ /dev/null
@@ -1,189 +0,0 @@
-#ifndef TIZEN_POLICY_SERVER_PROTOCOL_H
-#define TIZEN_POLICY_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_policy;
-struct tizen_position;
-struct tizen_visibility;
-struct wl_surface;
-
-extern const struct wl_interface tizen_policy_interface;
-extern const struct wl_interface tizen_position_interface;
-extern const struct wl_interface tizen_visibility_interface;
-extern const struct wl_interface wl_surface_interface;
-
-#ifndef TIZEN_POLICY_CONFORMANT_PART_ENUM
-#define TIZEN_POLICY_CONFORMANT_PART_ENUM
-enum tizen_policy_conformant_part {
-       TIZEN_POLICY_CONFORMANT_PART_INDICATOR = 0,
-       TIZEN_POLICY_CONFORMANT_PART_KEYBOARD = 1,
-       TIZEN_POLICY_CONFORMANT_PART_CLIPBOARD = 2,
-};
-#endif /* TIZEN_POLICY_CONFORMANT_PART_ENUM */
-
-struct tizen_policy_interface {
-       /**
-        * get_visibility - (none)
-        * @id: new visibility object
-        * @surface: surface object
-        */
-       void (*get_visibility)(struct wl_client *client,
-                              struct wl_resource *resource,
-                              uint32_t id,
-                              struct wl_resource *surface);
-       /**
-        * get_position - (none)
-        * @id: new position object
-        * @surface: surface object
-        */
-       void (*get_position)(struct wl_client *client,
-                            struct wl_resource *resource,
-                            uint32_t id,
-                            struct wl_resource *surface);
-       /**
-        * activate - (none)
-        * @surface: surface object
-        */
-       void (*activate)(struct wl_client *client,
-                        struct wl_resource *resource,
-                        struct wl_resource *surface);
-       /**
-        * lower - (none)
-        * @surface: surface object
-        */
-       void (*lower)(struct wl_client *client,
-                     struct wl_resource *resource,
-                     struct wl_resource *surface);
-       /**
-        * focus_skip_set - (none)
-        * @surface: surface object
-        */
-       void (*focus_skip_set)(struct wl_client *client,
-                              struct wl_resource *resource,
-                              struct wl_resource *surface);
-       /**
-        * focus_skip_unset - (none)
-        * @surface: surface object
-        */
-       void (*focus_skip_unset)(struct wl_client *client,
-                                struct wl_resource *resource,
-                                struct wl_resource *surface);
-       /**
-        * role_set - (none)
-        * @surface: surface object
-        * @role: (none)
-        */
-       void (*role_set)(struct wl_client *client,
-                        struct wl_resource *resource,
-                        struct wl_resource *surface,
-                        const char *role);
-       /**
-        * conformant_set - (none)
-        * @surface: surface object
-        */
-       void (*conformant_set)(struct wl_client *client,
-                              struct wl_resource *resource,
-                              struct wl_resource *surface);
-       /**
-        * conformant_unset - (none)
-        * @surface: surface object
-        */
-       void (*conformant_unset)(struct wl_client *client,
-                                struct wl_resource *resource,
-                                struct wl_resource *surface);
-       /**
-        * conformant_get - (none)
-        * @surface: surface object
-        */
-       void (*conformant_get)(struct wl_client *client,
-                              struct wl_resource *resource,
-                              struct wl_resource *surface);
-};
-
-#define TIZEN_POLICY_CONFORMANT        0
-#define TIZEN_POLICY_CONFORMANT_AREA   1
-
-#define TIZEN_POLICY_CONFORMANT_SINCE_VERSION  1
-#define TIZEN_POLICY_CONFORMANT_AREA_SINCE_VERSION     1
-
-static inline void
-tizen_policy_send_conformant(struct wl_resource *resource_, struct wl_resource *surface, uint32_t is_conformant)
-{
-       wl_resource_post_event(resource_, TIZEN_POLICY_CONFORMANT, surface, is_conformant);
-}
-
-static inline void
-tizen_policy_send_conformant_area(struct wl_resource *resource_, struct wl_resource *surface, uint32_t conformant_part, uint32_t state, int32_t x, int32_t y, int32_t w, int32_t h)
-{
-       wl_resource_post_event(resource_, TIZEN_POLICY_CONFORMANT_AREA, surface, conformant_part, state, x, y, w, h);
-}
-
-#ifndef TIZEN_VISIBILITY_VISIBILITY_ENUM
-#define TIZEN_VISIBILITY_VISIBILITY_ENUM
-enum tizen_visibility_visibility {
-       TIZEN_VISIBILITY_VISIBILITY_UNOBSCURED = 0,
-       TIZEN_VISIBILITY_VISIBILITY_PARTIALLY_OBSCURED = 1,
-       TIZEN_VISIBILITY_VISIBILITY_FULLY_OBSCURED = 2,
-};
-#endif /* TIZEN_VISIBILITY_VISIBILITY_ENUM */
-
-struct tizen_visibility_interface {
-       /**
-        * destroy - (none)
-        */
-       void (*destroy)(struct wl_client *client,
-                       struct wl_resource *resource);
-};
-
-#define TIZEN_VISIBILITY_NOTIFY        0
-
-#define TIZEN_VISIBILITY_NOTIFY_SINCE_VERSION  1
-
-static inline void
-tizen_visibility_send_notify(struct wl_resource *resource_, uint32_t visibility)
-{
-       wl_resource_post_event(resource_, TIZEN_VISIBILITY_NOTIFY, visibility);
-}
-
-struct tizen_position_interface {
-       /**
-        * destroy - (none)
-        */
-       void (*destroy)(struct wl_client *client,
-                       struct wl_resource *resource);
-       /**
-        * set - (none)
-        * @x: (none)
-        * @y: (none)
-        */
-       void (*set)(struct wl_client *client,
-                   struct wl_resource *resource,
-                   int32_t x,
-                   int32_t y);
-};
-
-#define TIZEN_POSITION_CHANGED 0
-
-#define TIZEN_POSITION_CHANGED_SINCE_VERSION   1
-
-static inline void
-tizen_position_send_changed(struct wl_resource *resource_, int32_t x, int32_t y)
-{
-       wl_resource_post_event(resource_, TIZEN_POSITION_CHANGED, x, y);
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif