From 5f2ac0f08fc54c9d8d147535f7dfec7272404692 Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Tue, 19 May 2015 11:05:49 +0900 Subject: [PATCH] remove 'transient_for' protocol from tizen_surface_extention Change-Id: I3c0fb04186a96d410bb224e8ff5d4fe291c679c6 Signed-off-by: Duna Oh --- src/modules/Makefile_wl_desktop_shell.mk | 4 +- src/modules/wl_desktop_shell/e_mod_main.c | 1 + src/modules/wl_desktop_shell/tizen_extension.xml | 9 ----- .../wl_desktop_shell/tizen_extension_protocol.c | 17 +------- .../tizen_extension_server_protocol.h | 26 +------------ .../wl_desktop_shell/tizen_transient_for.xml | 11 ++++++ .../tizen_transient_for_protocol.c | 24 ++++++++++++ .../tizen_transient_for_server_protocol.h | 45 ++++++++++++++++++++++ 8 files changed, 87 insertions(+), 50 deletions(-) create mode 100644 src/modules/wl_desktop_shell/tizen_transient_for.xml create mode 100644 src/modules/wl_desktop_shell/tizen_transient_for_protocol.c create mode 100644 src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h diff --git a/src/modules/Makefile_wl_desktop_shell.mk b/src/modules/Makefile_wl_desktop_shell.mk index 0ca0184..adc50c9 100644 --- a/src/modules/Makefile_wl_desktop_shell.mk +++ b/src/modules/Makefile_wl_desktop_shell.mk @@ -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) diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 87aaec9..91c9b75 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -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 diff --git a/src/modules/wl_desktop_shell/tizen_extension.xml b/src/modules/wl_desktop_shell/tizen_extension.xml index beaf450..e81ae0e 100644 --- a/src/modules/wl_desktop_shell/tizen_extension.xml +++ b/src/modules/wl_desktop_shell/tizen_extension.xml @@ -11,13 +11,4 @@ - - - - - - - - - diff --git a/src/modules/wl_desktop_shell/tizen_extension_protocol.c b/src/modules/wl_desktop_shell/tizen_extension_protocol.c index 5458776..3216ba7 100644 --- a/src/modules/wl_desktop_shell/tizen_extension_protocol.c +++ b/src/modules/wl_desktop_shell/tizen_extension_protocol.c @@ -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, -}; - diff --git a/src/modules/wl_desktop_shell/tizen_extension_server_protocol.h b/src/modules/wl_desktop_shell/tizen_extension_server_protocol.h index 11a0485..281c509 100644 --- a/src/modules/wl_desktop_shell/tizen_extension_server_protocol.h +++ b/src/modules/wl_desktop_shell/tizen_extension_server_protocol.h @@ -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 index 0000000..cc3c752 --- /dev/null +++ b/src/modules/wl_desktop_shell/tizen_transient_for.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + 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 index 0000000..ac60de6 --- /dev/null +++ b/src/modules/wl_desktop_shell/tizen_transient_for_protocol.c @@ -0,0 +1,24 @@ +#include +#include +#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 index 0000000..edbc14f --- /dev/null +++ b/src/modules/wl_desktop_shell/tizen_transient_for_server_protocol.h @@ -0,0 +1,45 @@ +#ifndef TIZEN_TRANSIENT_FOR_SERVER_PROTOCOL_H +#define TIZEN_TRANSIENT_FOR_SERVER_PROTOCOL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#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 -- 2.7.4