remove 'transient_for' protocol from tizen_surface_extention 73/39573/1
authorDuna Oh <duna.oh@samsung.com>
Tue, 19 May 2015 02:05:49 +0000 (11:05 +0900)
committerDuna Oh <duna.oh@samsung.com>
Tue, 19 May 2015 02:06:08 +0000 (11:06 +0900)
Change-Id: I3c0fb04186a96d410bb224e8ff5d4fe291c679c6
Signed-off-by: Duna Oh <duna.oh@samsung.com>
src/modules/Makefile_wl_desktop_shell.mk
src/modules/wl_desktop_shell/e_mod_main.c
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_desktop_shell/tizen_transient_for.xml [new file with mode: 0644]
src/modules/wl_desktop_shell/tizen_transient_for_protocol.c [new file with mode: 0644]
src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h [new file with mode: 0644]

index 0ca0184..adc50c9 100644 (file)
@@ -27,7 +27,9 @@ src_modules_wl_desktop_shell_module_la_SOURCES = \
   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 \
-  src/modules/wl_desktop_shell/tizen_subsurface_protocol.c
+  src/modules/wl_desktop_shell/tizen_subsurface_protocol.c \
+  src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h \
+  src/modules/wl_desktop_shell/tizen_transient_for_protocol.c
 
 PHONIES += wl_desktop_shell install-wl_desktop_shell
 wl_desktop_shell: $(wl_desktop_shellpkg_LTLIBRARIES) $(wl_desktop_shell_DATA)
index 87aaec9..91c9b75 100644 (file)
@@ -5,6 +5,7 @@
 #include "e_scaler.h"
 #include "tizen_extension_server_protocol.h"
 #include "tizen_subsurface_server_protocol.h"
+#include "tizen_transient_for_server_protocol.h"
 
 #define XDG_SERVER_VERSION 4
 
index beaf450..e81ae0e 100644 (file)
          <arg name="surface" type="object" interface="wl_surface" /> 
       </request>
    </interface>
-   <interface name="tizen_transient_for" version="1">
-      <request name="set">
-         <arg name="child_id" type="uint" />
-         <arg name="parent_id" type="uint" />
-      </request>
-      <event name="done">
-         <arg name="child_id" type="uint"/>
-      </event>
-   </interface>
 </protocol>
index 5458776..3216ba7 100644 (file)
@@ -7,7 +7,6 @@ extern const struct wl_interface wl_surface_interface;
 
 static const struct wl_interface *types[] = {
        NULL,
-       NULL,
        &tizen_resource_interface,
        &wl_surface_interface,
 };
@@ -27,7 +26,7 @@ WL_EXPORT const struct wl_interface tizen_resource_interface = {
 };
 
 static const struct wl_message tizen_surface_extension_requests[] = {
-       { "get_tizen_resource", "no", types + 2 },
+       { "get_tizen_resource", "no", types + 1 },
 };
 
 WL_EXPORT const struct wl_interface tizen_surface_extension_interface = {
@@ -36,17 +35,3 @@ WL_EXPORT const struct wl_interface tizen_surface_extension_interface = {
        0, NULL,
 };
 
-static const struct wl_message tizen_transient_for_requests[] = {
-       { "set", "uu", types + 0 },
-};
-
-static const struct wl_message tizen_transient_for_events[] = {
-       { "done", "u", types + 0 },
-};
-
-WL_EXPORT const struct wl_interface tizen_transient_for_interface = {
-       "tizen_transient_for", 1,
-       1, tizen_transient_for_requests,
-       1, tizen_transient_for_events,
-};
-
index 11a0485..281c509 100644 (file)
@@ -14,11 +14,11 @@ struct wl_resource;
 
 struct tizen_resource;
 struct tizen_surface_extension;
-struct tizen_transient_for;
+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 tizen_transient_for_interface;
+extern const struct wl_interface wl_surface_interface;
 
 struct tizen_resource_interface {
        /**
@@ -51,28 +51,6 @@ struct tizen_surface_extension_interface {
 };
 
 
-struct tizen_transient_for_interface {
-       /**
-        * set - (none)
-        * @child_id: (none)
-        * @parent_id: (none)
-        */
-       void (*set)(struct wl_client *client,
-                   struct wl_resource *resource,
-                   uint32_t child_id,
-                   uint32_t parent_id);
-};
-
-#define TIZEN_TRANSIENT_FOR_DONE       0
-
-#define TIZEN_TRANSIENT_FOR_DONE_SINCE_VERSION 1
-
-static inline void
-tizen_transient_for_send_done(struct wl_resource *resource_, uint32_t child_id)
-{
-       wl_resource_post_event(resource_, TIZEN_TRANSIENT_FOR_DONE, child_id);
-}
-
 #ifdef  __cplusplus
 }
 #endif
diff --git a/src/modules/wl_desktop_shell/tizen_transient_for.xml b/src/modules/wl_desktop_shell/tizen_transient_for.xml
new file mode 100644 (file)
index 0000000..cc3c752
--- /dev/null
@@ -0,0 +1,11 @@
+<protocol name="tizen_transient_for">
+   <interface name="tizen_transient_for" version="1">
+      <request name="set">
+         <arg name="child_id" type="uint" />
+         <arg name="parent_id" type="uint" />
+      </request>
+      <event name="done">
+         <arg name="child_id" type="uint"/>
+      </event>
+   </interface>
+</protocol>
diff --git a/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c b/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c
new file mode 100644 (file)
index 0000000..ac60de6
--- /dev/null
@@ -0,0 +1,24 @@
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+
+static const struct wl_interface *types[] = {
+       NULL,
+       NULL,
+};
+
+static const struct wl_message tizen_transient_for_requests[] = {
+       { "set", "uu", types + 0 },
+};
+
+static const struct wl_message tizen_transient_for_events[] = {
+       { "done", "u", types + 0 },
+};
+
+WL_EXPORT const struct wl_interface tizen_transient_for_interface = {
+       "tizen_transient_for", 1,
+       1, tizen_transient_for_requests,
+       1, tizen_transient_for_events,
+};
+
diff --git a/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h b/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h
new file mode 100644 (file)
index 0000000..edbc14f
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef TIZEN_TRANSIENT_FOR_SERVER_PROTOCOL_H
+#define TIZEN_TRANSIENT_FOR_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_transient_for;
+
+extern const struct wl_interface tizen_transient_for_interface;
+
+struct tizen_transient_for_interface {
+       /**
+        * set - (none)
+        * @child_id: (none)
+        * @parent_id: (none)
+        */
+       void (*set)(struct wl_client *client,
+                   struct wl_resource *resource,
+                   uint32_t child_id,
+                   uint32_t parent_id);
+};
+
+#define TIZEN_TRANSIENT_FOR_DONE       0
+
+#define TIZEN_TRANSIENT_FOR_DONE_SINCE_VERSION 1
+
+static inline void
+tizen_transient_for_send_done(struct wl_resource *resource_, uint32_t child_id)
+{
+       wl_resource_post_event(resource_, TIZEN_TRANSIENT_FOR_DONE, child_id);
+}
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif