summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--src/Makefile_Ecore_Wl2.am8
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h2
-rw-r--r--src/lib/ecore_wl2/session-recovery.c32
-rw-r--r--src/lib/ecore_wl2/session-recovery.h97
-rw-r--r--src/wayland_protocol/session-recovery.xml21
6 files changed, 32 insertions, 132 deletions
diff --git a/.gitignore b/.gitignore
index b00829a17d..8c3822897c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,3 +77,7 @@ Session.vim
/src/modules/evas/engines/gl_common/shader_3d/evas_3d_shaders.x
/src/scripts/eo/eo_debug
/src/bin/ecore_con/efl_net_proxy_helper
+
+#Once all protocols are generated these will use wildcards
+/src/lib/ecore_wl2/session-recovery-client-protocol.h
+/src/lib/ecore_wl2/session-recovery-protocol.c
diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index 7ffc2efedd..7ad1662e0c 100644
--- a/src/Makefile_Ecore_Wl2.am
+++ b/src/Makefile_Ecore_Wl2.am
@@ -10,8 +10,8 @@ dist_installed_ecorewl2mainheaders_DATA = lib/ecore_wl2/Ecore_Wl2.h
lib_ecore_wl2_libecore_wl2_la_SOURCES = \
lib/ecore_wl2/teamwork_protocol.c \
lib/ecore_wl2/teamwork_protocol.h \
-lib/ecore_wl2/session-recovery.h \
-lib/ecore_wl2/session-recovery.c \
+lib/ecore_wl2/session-recovery-client-protocol.h \
+lib/ecore_wl2/session-recovery-protocol.c \
lib/ecore_wl2/subsurface-client-protocol.h \
lib/ecore_wl2/subsurface-protocol.c \
lib/ecore_wl2/xdg-shell-client-protocol.h \
@@ -37,4 +37,8 @@ lib_ecore_wl2_libecore_wl2_la_LIBADD = @ECORE_WL2_LIBS@
lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@
lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
+BUILT_SOURCES += \
+ lib/ecore_wl2/session-recovery-protocol.c \
+ lib/ecore_wl2/session-recovery-client-protocol.h
+
endif
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 49b80f8d3f..ff9a09eb22 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -18,7 +18,7 @@
# include "xdg-shell-client-protocol.h"
# define XDG_VERSION 5
-# include "session-recovery.h"
+# include "session-recovery-client-protocol.h"
# include "zxdg-shell-client-protocol.h"
diff --git a/src/lib/ecore_wl2/session-recovery.c b/src/lib/ecore_wl2/session-recovery.c
deleted file mode 100644
index 47ecbb9759..0000000000
--- a/src/lib/ecore_wl2/session-recovery.c
+++ /dev/null
@@ -1,32 +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,
- &wl_surface_interface,
- NULL,
- &wl_surface_interface,
- NULL,
- &wl_surface_interface,
- NULL,
-};
-
-static const struct wl_message zwp_e_session_recovery_requests[] = {
- { "get_uuid", "o", types + 0 },
- { "set_uuid", "os", types + 1 },
- { "destroy_uuid", "os", types + 3 },
-};
-
-static const struct wl_message zwp_e_session_recovery_events[] = {
- { "create_uuid", "os", types + 5 },
-};
-
-WL_EXPORT const struct wl_interface zwp_e_session_recovery_interface = {
- "zwp_e_session_recovery", 1,
- 3, zwp_e_session_recovery_requests,
- 1, zwp_e_session_recovery_events,
-};
-
diff --git a/src/lib/ecore_wl2/session-recovery.h b/src/lib/ecore_wl2/session-recovery.h
deleted file mode 100644
index 980d37fd81..0000000000
--- a/src/lib/ecore_wl2/session-recovery.h
+++ /dev/null
@@ -1,97 +0,0 @@
-#ifndef E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
-#define E_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 wl_surface;
-struct zwp_e_session_recovery;
-
-extern const struct wl_interface zwp_e_session_recovery_interface;
-
-struct zwp_e_session_recovery_listener {
- /**
- * create_uuid - (none)
- * @surface: (none)
- * @uuid: (none)
- */
- void (*create_uuid)(void *data,
- struct zwp_e_session_recovery *zwp_e_session_recovery,
- struct wl_surface *surface,
- const char *uuid);
-};
-
-static inline int
-zwp_e_session_recovery_add_listener(struct zwp_e_session_recovery *zwp_e_session_recovery,
- const struct zwp_e_session_recovery_listener *listener, void *data)
-{
- return wl_proxy_add_listener((struct wl_proxy *) zwp_e_session_recovery,
- (void (**)(void)) listener, data);
-}
-
-#define ZWP_E_SESSION_RECOVERY_GET_UUID 0
-#define ZWP_E_SESSION_RECOVERY_SET_UUID 1
-#define ZWP_E_SESSION_RECOVERY_DESTROY_UUID 2
-
-#define ZWP_E_SESSION_RECOVERY_GET_UUID_SINCE_VERSION 1
-#define ZWP_E_SESSION_RECOVERY_SET_UUID_SINCE_VERSION 1
-#define ZWP_E_SESSION_RECOVERY_DESTROY_UUID_SINCE_VERSION 1
-
-static inline void
-zwp_e_session_recovery_set_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery, void *user_data)
-{
- wl_proxy_set_user_data((struct wl_proxy *) zwp_e_session_recovery, user_data);
-}
-
-static inline void *
-zwp_e_session_recovery_get_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery)
-{
- return wl_proxy_get_user_data((struct wl_proxy *) zwp_e_session_recovery);
-}
-
-static inline uint32_t
-zwp_e_session_recovery_get_version(struct zwp_e_session_recovery *zwp_e_session_recovery)
-{
- return wl_proxy_get_version((struct wl_proxy *) zwp_e_session_recovery);
-}
-
-static inline void
-zwp_e_session_recovery_destroy(struct zwp_e_session_recovery *zwp_e_session_recovery)
-{
- wl_proxy_destroy((struct wl_proxy *) zwp_e_session_recovery);
-}
-
-static inline void
-zwp_e_session_recovery_get_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface)
-{
- wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
- ZWP_E_SESSION_RECOVERY_GET_UUID, surface);
-}
-
-static inline void
-zwp_e_session_recovery_set_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface, const char *uuid)
-{
- wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
- ZWP_E_SESSION_RECOVERY_SET_UUID, surface, uuid);
-}
-
-static inline void
-zwp_e_session_recovery_destroy_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface, const char *uuid)
-{
- wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
- ZWP_E_SESSION_RECOVERY_DESTROY_UUID, surface, uuid);
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/wayland_protocol/session-recovery.xml b/src/wayland_protocol/session-recovery.xml
new file mode 100644
index 0000000000..3109413bb2
--- /dev/null
+++ b/src/wayland_protocol/session-recovery.xml
@@ -0,0 +1,21 @@
+<protocol name="e_session_recovery">
+
+ <interface name="zwp_e_session_recovery" version="1">
+ <request name="get_uuid">
+ <arg name="surface" type="object" interface="wl_surface"/>
+ </request>
+ <request name="set_uuid">
+ <arg name="surface" type="object" interface="wl_surface"/>
+ <arg name="uuid" type="string"/>
+ </request>
+ <request name="destroy_uuid">
+ <arg name="surface" type="object" interface="wl_surface"/>
+ <arg name="uuid" type="string"/>
+ </request>
+ <event name="create_uuid">
+ <arg name="surface" type="object" interface="wl_surface"/>
+ <arg name="uuid" type="string"/>
+ </event>
+ </interface>
+
+</protocol>