diff options
author | Stefan Schmidt <s.schmidt@samsung.com> | 2015-03-20 13:28:08 +0100 |
---|---|---|
committer | Stefan Schmidt <stefan@osg.samsung.com> | 2015-06-29 17:09:57 +0200 |
commit | cb449adde6d992c42bb01ebae10cd76b544da8db (patch) | |
tree | 982a7e149e88bccbdab7a829a3803a0233bb4687 | |
parent | f74895c6b7ef5442b1143a6c1f2f9b860114603b (diff) | |
download | efl-cb449adde6d992c42bb01ebae10cd76b544da8db.tar.gz |
ecore_wl: Add generated session-recovery-protocol files to build
For now these are generated externally by wayland-scanner and added here.
Also keep the original xml protocol file here for now.
This covers the client side for applications while the server side code
sits with E as compositor.
-rw-r--r-- | src/Makefile_Ecore_Wayland.am | 4 | ||||
-rw-r--r-- | src/lib/ecore_wayland/session-recovery-client-protocol.h | 68 | ||||
-rw-r--r-- | src/lib/ecore_wayland/session-recovery-protocol.c | 23 | ||||
-rw-r--r-- | src/lib/ecore_wayland/session-recovery.xml | 12 |
4 files changed, 106 insertions, 1 deletions
diff --git a/src/Makefile_Ecore_Wayland.am b/src/Makefile_Ecore_Wayland.am index f9bb3621d2..6099f34cd4 100644 --- a/src/Makefile_Ecore_Wayland.am +++ b/src/Makefile_Ecore_Wayland.am @@ -21,7 +21,9 @@ lib/ecore_wayland/subsurface-client-protocol.h \ lib/ecore_wayland/ivi-application-protocol.c \ lib/ecore_wayland/ivi-application-client-protocol.h \ lib/ecore_wayland/xdg-shell-client-protocol.h \ -lib/ecore_wayland/xdg-shell-protocol.c +lib/ecore_wayland/xdg-shell-protocol.c \ +lib/ecore_wayland/session-recovery-client-protocol.h \ +lib/ecore_wayland/session-recovery-protocol.c lib_ecore_wayland_libecore_wayland_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ECORE_WAYLAND_CFLAGS@ lib_ecore_wayland_libecore_wayland_la_LIBADD = @ECORE_WAYLAND_LIBS@ diff --git a/src/lib/ecore_wayland/session-recovery-client-protocol.h b/src/lib/ecore_wayland/session-recovery-client-protocol.h new file mode 100644 index 0000000000..97848c8fec --- /dev/null +++ b/src/lib/ecore_wayland/session-recovery-client-protocol.h @@ -0,0 +1,68 @@ +#ifndef SESSION_RECOVERY_CLIENT_PROTOCOL_H +#define SESSION_RECOVERY_CLIENT_PROTOCOL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdint.h> +#include <stddef.h> +#include "wayland-client.h" + +struct wl_client; +struct wl_resource; + +struct session_recovery; + +extern const struct wl_interface session_recovery_interface; + +struct session_recovery_listener { + /** + * uuid - (none) + * @uuid: (none) + */ + void (*uuid)(void *data, + struct session_recovery *session_recovery, + const char *uuid); +}; + +static inline int +session_recovery_add_listener(struct session_recovery *session_recovery, + const struct session_recovery_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) session_recovery, + (void (**)(void)) listener, data); +} + +#define SESSION_RECOVERY_PROVIDE_UUID 0 + +static inline void +session_recovery_set_user_data(struct session_recovery *session_recovery, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) session_recovery, user_data); +} + +static inline void * +session_recovery_get_user_data(struct session_recovery *session_recovery) +{ + return wl_proxy_get_user_data((struct wl_proxy *) session_recovery); +} + +static inline void +session_recovery_destroy(struct session_recovery *session_recovery) +{ + wl_proxy_destroy((struct wl_proxy *) session_recovery); +} + +static inline void +session_recovery_provide_uuid(struct session_recovery *session_recovery, const char *uuid) +{ + wl_proxy_marshal((struct wl_proxy *) session_recovery, + SESSION_RECOVERY_PROVIDE_UUID, uuid); +} + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/src/lib/ecore_wayland/session-recovery-protocol.c b/src/lib/ecore_wayland/session-recovery-protocol.c new file mode 100644 index 0000000000..5e0a835f48 --- /dev/null +++ b/src/lib/ecore_wayland/session-recovery-protocol.c @@ -0,0 +1,23 @@ +#include <stdlib.h> +#include <stdint.h> +#include "wayland-util.h" + + +static const struct wl_interface *types[] = { + NULL, +}; + +static const struct wl_message session_recovery_requests[] = { + { "provide_uuid", "s", types + 0 }, +}; + +static const struct wl_message session_recovery_events[] = { + { "uuid", "s", types + 0 }, +}; + +WL_EXPORT const struct wl_interface session_recovery_interface = { + "session_recovery", 1, + 1, session_recovery_requests, + 1, session_recovery_events, +}; + diff --git a/src/lib/ecore_wayland/session-recovery.xml b/src/lib/ecore_wayland/session-recovery.xml new file mode 100644 index 0000000000..d996b6dae2 --- /dev/null +++ b/src/lib/ecore_wayland/session-recovery.xml @@ -0,0 +1,12 @@ +<protocol name="session_recovery"> + + <interface name="session_recovery" version="1"> + <request name="provide_uuid"> + <arg name="uuid" type="string"/> + </request> + <event name="uuid"> + <arg name="uuid" type="string"/> + </event> + </interface> + +</protocol> |