using tizen-extension wayland protocol instead of including *protocol.c directly 47/44447/1
authorBoram Park <boram1288.park@samsung.com>
Mon, 20 Jul 2015 10:41:21 +0000 (19:41 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Jul 2015 01:04:54 +0000 (10:04 +0900)
Change-Id: I14fed47b467157c604b2db4bad9bf939b345a6f5

configure.ac
packaging/e-mod-tizen-keyrouter.spec
protocol/keyrouter-protocol.c [deleted file]
protocol/keyrouter-protocol.h [deleted file]
protocol/wl_keyrouter.xml [deleted file]
src/Makefile.am
src/e_mod_main_wl.c

index 21dd3ea..3e75c67 100644 (file)
@@ -110,7 +110,7 @@ dnl ========================================================================
 # checks for wayland only argument
 dnl ========================================================================
 if test "x${have_wayland_only}" = "xyes"; then
-  PKG_CHECK_MODULES(WAYLAND, [wayland-server])
+  PKG_CHECK_MODULES(WAYLAND, [wayland-server, tizen-extension-server])
 fi
 
 release=$(pkg-config --variable=release enlightenment)
index 1e8fff6..9b8aab6 100644 (file)
@@ -20,6 +20,7 @@ BuildRequires:  pkgconfig(utilX)
 %endif
 %if %{with wayland}
 BuildRequires:  pkgconfig(wayland-server)
+BuildRequires:  pkgconfig(tizen-extension-server)
 %endif
 BuildRequires:  pkgconfig(dlog)
 %if "%{?profile}" == "common"
diff --git a/protocol/keyrouter-protocol.c b/protocol/keyrouter-protocol.c
deleted file mode 100644 (file)
index fc90d23..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdlib.h>
-#include <stdint.h>
-#include "wayland-util.h"
-
-extern const struct wl_interface wl_surface_interface;
-
-static const struct wl_interface *types[] = {
-       &wl_surface_interface,
-       NULL,
-       NULL,
-       &wl_surface_interface,
-       NULL,
-       &wl_surface_interface,
-       NULL,
-       &wl_surface_interface,
-       NULL,
-       NULL,
-       NULL,
-};
-
-static const struct wl_message wl_keyrouter_requests[] = {
-       { "set_keygrab", "?ouu", types + 0 },
-       { "unset_keygrab", "?ou", types + 3 },
-       { "get_keygrab_status", "?ou", types + 5 },
-};
-
-static const struct wl_message wl_keyrouter_events[] = {
-       { "keygrab_notify", "?ouuu", types + 7 },
-};
-
-WL_EXPORT const struct wl_interface wl_keyrouter_interface = {
-       "wl_keyrouter", 1,
-       3, wl_keyrouter_requests,
-       1, wl_keyrouter_events,
-};
-
diff --git a/protocol/keyrouter-protocol.h b/protocol/keyrouter-protocol.h
deleted file mode 100644 (file)
index 1f1a650..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#ifndef KEYROUTER_SERVER_PROTOCOL_H
-#define KEYROUTER_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 wl_keyrouter;
-
-extern const struct wl_interface wl_keyrouter_interface;
-
-#ifndef WL_KEYROUTER_ERROR_ENUM
-#define WL_KEYROUTER_ERROR_ENUM
-enum wl_keyrouter_error {
-       WL_KEYROUTER_ERROR_NONE = 0,
-       WL_KEYROUTER_ERROR_INVALID_SURFACE = 1,
-       WL_KEYROUTER_ERROR_INVALID_KEY = 2,
-       WL_KEYROUTER_ERROR_INVALID_MODE = 3,
-       WL_KEYROUTER_ERROR_GRABBED_ALREADY = 4,
-       WL_KEYROUTER_ERROR_NO_PERMISSION = 5,
-       WL_KEYROUTER_ERROR_NO_SYSTEM_RESOURCES = 6,
-};
-#endif /* WL_KEYROUTER_ERROR_ENUM */
-
-#ifndef WL_KEYROUTER_MODE_ENUM
-#define WL_KEYROUTER_MODE_ENUM
-/**
- * wl_keyrouter_mode - mode for a key grab
- * @WL_KEYROUTER_MODE_NONE: none
- * @WL_KEYROUTER_MODE_SHARED: mode to get a key grab with the other
- *     client surfaces when the focused client surface gets the key
- * @WL_KEYROUTER_MODE_TOPMOST: mode to get a key grab when the client
- *     surface is the top most surface
- * @WL_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE: mode to get a key grab
- *     exclusively, overridably regardless of the order in the surface stack
- * @WL_KEYROUTER_MODE_EXCLUSIVE: mode to get a key grab exclusively
- *     regardless of the order in surface stack
- *
- * This value is used to set a mode for a key grab. With this mode and
- * the order of the surface between surfaces' stack, the compositor will
- * determine the destination client surface.
- */
-enum wl_keyrouter_mode {
-       WL_KEYROUTER_MODE_NONE = 0,
-       WL_KEYROUTER_MODE_SHARED = 1,
-       WL_KEYROUTER_MODE_TOPMOST = 2,
-       WL_KEYROUTER_MODE_OVERRIDABLE_EXCLUSIVE = 3,
-       WL_KEYROUTER_MODE_EXCLUSIVE = 4,
-};
-#endif /* WL_KEYROUTER_MODE_ENUM */
-
-/**
- * wl_keyrouter - an interface to set each focus for each key
- * @set_keygrab: (none)
- * @unset_keygrab: (none)
- * @get_keygrab_status: (none)
- *
- * In tradition, all the keys in a keyboard and a device on which some
- * keys are attached will be sent to focus surface by default. Currently
- * it's possible to set up each focus for each key in a keyboard and a
- * device. Therefore, by setting a key grab for a surface, the owner of the
- * surface will get the key event when it has the key grab for the key.
- */
-struct wl_keyrouter_interface {
-       /**
-        * set_keygrab - (none)
-        * @surface: (none)
-        * @key: (none)
-        * @mode: (none)
-        */
-       void (*set_keygrab)(struct wl_client *client,
-                           struct wl_resource *resource,
-                           struct wl_resource *surface,
-                           uint32_t key,
-                           uint32_t mode);
-       /**
-        * unset_keygrab - (none)
-        * @surface: (none)
-        * @key: (none)
-        */
-       void (*unset_keygrab)(struct wl_client *client,
-                             struct wl_resource *resource,
-                             struct wl_resource *surface,
-                             uint32_t key);
-       /**
-        * get_keygrab_status - (none)
-        * @surface: (none)
-        * @key: (none)
-        */
-       void (*get_keygrab_status)(struct wl_client *client,
-                                  struct wl_resource *resource,
-                                  struct wl_resource *surface,
-                                  uint32_t key);
-};
-
-#define WL_KEYROUTER_KEYGRAB_NOTIFY    0
-
-#define WL_KEYROUTER_KEYGRAB_NOTIFY_SINCE_VERSION      1
-
-static inline void
-wl_keyrouter_send_keygrab_notify(struct wl_resource *resource_, struct wl_resource *surface, uint32_t key, uint32_t mode, uint32_t error)
-{
-       wl_resource_post_event(resource_, WL_KEYROUTER_KEYGRAB_NOTIFY, surface, key, mode, error);
-}
-
-#ifdef  __cplusplus
-}
-#endif
-
-#endif
diff --git a/protocol/wl_keyrouter.xml b/protocol/wl_keyrouter.xml
deleted file mode 100644 (file)
index 2ad1fd0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-<protocol name="wl_keyrouter">
-  <interface name="wl_keyrouter" version="1">
-    <description summary="an interface to set each focus for each key">
-      In tradition, all the keys in a keyboard and a device on which
-      some keys are attached will be sent to focus surface by default.
-      Currently it's possible to set up each focus for each key in a keyboard and a device.
-      Therefore, by setting a key grab for a surface, the owner of the
-      surface will get the key event when it has the key grab for the key.
-    </description>
-
-    <enum name="error">
-      <entry name="none" value="0" summary="no error"/>
-      <entry name="invalid_surface" value="1" summary="Given surface is invalid."/>
-      <entry name="invalid_key" value="2" summary="Given key is invalid."/>
-      <entry name="invalid_mode" value="3" summary="Given mode is invalid."/>
-      <entry name="grabbed_already" value="4" summary="The key has been grabbed already."/>
-      <entry name="no_permission" value="5" summary="The wl client has no permission to grab the key."/>
-      <entry name="no_system_resources" value="6" summary="System resources are insufficient."/>
-    </enum>
-
-    <enum name="mode">
-      <description summary="mode for a key grab">
-       This value is used to set a mode for a key grab. With this mode and
-       the order of the surface between surfaces' stack, the compositor will determine the destination client
-       surface.
-      </description>
-      <entry name="none" value="0" summary="none"/>
-      <entry name="shared" value="1"
-       summary="mode to get a key grab with the other client surfaces when the focused client surface gets the key"/>
-      <entry name="topmost" value="2"
-       summary="mode to get a key grab when the client surface is the top most surface"/>
-      <entry name="overridable_exclusive" value="3"
-       summary="mode to get a key grab exclusively, overridably regardless of the order in the surface stack"/>
-      <entry name="exclusive" value="4"
-       summary="mode to get a key grab exclusively regardless of the order in surface stack"/>
-    </enum>
-
-    <request name="set_keygrab">
-      <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
-      <arg name="key" type="uint"/>
-      <arg name="mode" type="uint"/>
-    </request>
-
-    <request name="unset_keygrab">
-      <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
-      <arg name="key" type="uint"/>
-    </request>
-
-    <request name="get_keygrab_status">
-       <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
-       <arg name="key" type="uint"/>
-    </request>
-
-    <event name="keygrab_notify">
-      <arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
-      <arg name="key" type="uint"/>
-      <arg name="mode" type="uint"/>
-      <arg name="error" type="uint"/>
-    </event>
-  </interface>
-</protocol>
-
index b683d75..e3b6f24 100644 (file)
@@ -7,9 +7,7 @@ pkgdir                 = $(libdir)/enlightenment/modules/$(MODULE)/$(MODULE_ARCH
 pkg_LTLIBRARIES        = module.la
 if WAYLAND_ONLY
 module_la_SOURCES      = e_mod_main_wl.c \
-                         e_mod_main_wl.h \
-                         $(top_srcdir)/protocol/keyrouter-protocol.c \
-                         $(top_srcdir)/protocol/keyrouter-protocol.h
+                         e_mod_main_wl.h
 module_la_CFLAGS       = @ENLIGHTENMENT_CFLAGS@ @WAYLAND_CFLAGS@ -DHAVE_WAYLAND_ONLY
 module_la_LDFLAGS      = -module -avoid-version @WAYLAND_LIBS@ @ENLIGHTENMENT_LIBS@
 else
index 8189b39..00f936a 100644 (file)
@@ -1,7 +1,7 @@
 #define E_COMP_WL
 #include "e.h"
 #include "e_mod_main_wl.h"
-#include "protocol/keyrouter-protocol.h"
+#include <tizen-extension-server-protocol.h>
 #include <string.h>
 
 E_KeyrouterPtr krt;