summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-01-17 16:29:06 -0600
committerDerek Foreman <derekf@osg.samsung.com>2017-01-18 13:04:47 -0600
commit26ec54c169a1609188fad1b0e3b2b2f03fa4c3fe (patch)
tree5c6a9123d6e30a1d6b9caaffa2c56d3fd1ba4206
parent553751cb40b79f23b9c8e4d057c2f15feb2c52bf (diff)
ecore_wl2: Auto generate session-recovery protocol
Check in the latest session-recovery xml and remove the checked in generated files.
Diffstat (limited to '')
-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 b00829a..8c38228 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,3 +77,7 @@ Session.vim
77/src/modules/evas/engines/gl_common/shader_3d/evas_3d_shaders.x 77/src/modules/evas/engines/gl_common/shader_3d/evas_3d_shaders.x
78/src/scripts/eo/eo_debug 78/src/scripts/eo/eo_debug
79/src/bin/ecore_con/efl_net_proxy_helper 79/src/bin/ecore_con/efl_net_proxy_helper
80
81#Once all protocols are generated these will use wildcards
82/src/lib/ecore_wl2/session-recovery-client-protocol.h
83/src/lib/ecore_wl2/session-recovery-protocol.c
diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am
index 7ffc2ef..7ad1662 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
10lib_ecore_wl2_libecore_wl2_la_SOURCES = \ 10lib_ecore_wl2_libecore_wl2_la_SOURCES = \
11lib/ecore_wl2/teamwork_protocol.c \ 11lib/ecore_wl2/teamwork_protocol.c \
12lib/ecore_wl2/teamwork_protocol.h \ 12lib/ecore_wl2/teamwork_protocol.h \
13lib/ecore_wl2/session-recovery.h \ 13lib/ecore_wl2/session-recovery-client-protocol.h \
14lib/ecore_wl2/session-recovery.c \ 14lib/ecore_wl2/session-recovery-protocol.c \
15lib/ecore_wl2/subsurface-client-protocol.h \ 15lib/ecore_wl2/subsurface-client-protocol.h \
16lib/ecore_wl2/subsurface-protocol.c \ 16lib/ecore_wl2/subsurface-protocol.c \
17lib/ecore_wl2/xdg-shell-client-protocol.h \ 17lib/ecore_wl2/xdg-shell-client-protocol.h \
@@ -37,4 +37,8 @@ lib_ecore_wl2_libecore_wl2_la_LIBADD = @ECORE_WL2_LIBS@
37lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@ 37lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@
38lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ 38lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
39 39
40BUILT_SOURCES += \
41 lib/ecore_wl2/session-recovery-protocol.c \
42 lib/ecore_wl2/session-recovery-client-protocol.h
43
40endif 44endif
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 49b80f8..ff9a09e 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -18,7 +18,7 @@
18# include "xdg-shell-client-protocol.h" 18# include "xdg-shell-client-protocol.h"
19# define XDG_VERSION 5 19# define XDG_VERSION 5
20 20
21# include "session-recovery.h" 21# include "session-recovery-client-protocol.h"
22 22
23# include "zxdg-shell-client-protocol.h" 23# include "zxdg-shell-client-protocol.h"
24 24
diff --git a/src/lib/ecore_wl2/session-recovery.c b/src/lib/ecore_wl2/session-recovery.c
deleted file mode 100644
index 47ecbb9..0000000
--- a/src/lib/ecore_wl2/session-recovery.c
+++ /dev/null
@@ -1,32 +0,0 @@
1#include <stdlib.h>
2#include <stdint.h>
3#include "wayland-util.h"
4
5extern const struct wl_interface wl_surface_interface;
6
7static const struct wl_interface *types[] = {
8 &wl_surface_interface,
9 &wl_surface_interface,
10 NULL,
11 &wl_surface_interface,
12 NULL,
13 &wl_surface_interface,
14 NULL,
15};
16
17static const struct wl_message zwp_e_session_recovery_requests[] = {
18 { "get_uuid", "o", types + 0 },
19 { "set_uuid", "os", types + 1 },
20 { "destroy_uuid", "os", types + 3 },
21};
22
23static const struct wl_message zwp_e_session_recovery_events[] = {
24 { "create_uuid", "os", types + 5 },
25};
26
27WL_EXPORT const struct wl_interface zwp_e_session_recovery_interface = {
28 "zwp_e_session_recovery", 1,
29 3, zwp_e_session_recovery_requests,
30 1, zwp_e_session_recovery_events,
31};
32
diff --git a/src/lib/ecore_wl2/session-recovery.h b/src/lib/ecore_wl2/session-recovery.h
deleted file mode 100644
index 980d37f..0000000
--- a/src/lib/ecore_wl2/session-recovery.h
+++ /dev/null
@@ -1,97 +0,0 @@
1#ifndef E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
2#define E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdint.h>
9#include <stddef.h>
10#include "wayland-client.h"
11
12struct wl_client;
13struct wl_resource;
14
15struct wl_surface;
16struct zwp_e_session_recovery;
17
18extern const struct wl_interface zwp_e_session_recovery_interface;
19
20struct zwp_e_session_recovery_listener {
21 /**
22 * create_uuid - (none)
23 * @surface: (none)
24 * @uuid: (none)
25 */
26 void (*create_uuid)(void *data,
27 struct zwp_e_session_recovery *zwp_e_session_recovery,
28 struct wl_surface *surface,
29 const char *uuid);
30};
31
32static inline int
33zwp_e_session_recovery_add_listener(struct zwp_e_session_recovery *zwp_e_session_recovery,
34 const struct zwp_e_session_recovery_listener *listener, void *data)
35{
36 return wl_proxy_add_listener((struct wl_proxy *) zwp_e_session_recovery,
37 (void (**)(void)) listener, data);
38}
39
40#define ZWP_E_SESSION_RECOVERY_GET_UUID 0
41#define ZWP_E_SESSION_RECOVERY_SET_UUID 1
42#define ZWP_E_SESSION_RECOVERY_DESTROY_UUID 2
43
44#define ZWP_E_SESSION_RECOVERY_GET_UUID_SINCE_VERSION 1
45#define ZWP_E_SESSION_RECOVERY_SET_UUID_SINCE_VERSION 1
46#define ZWP_E_SESSION_RECOVERY_DESTROY_UUID_SINCE_VERSION 1
47
48static inline void
49zwp_e_session_recovery_set_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery, void *user_data)
50{
51 wl_proxy_set_user_data((struct wl_proxy *) zwp_e_session_recovery, user_data);
52}
53
54static inline void *
55zwp_e_session_recovery_get_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery)
56{
57 return wl_proxy_get_user_data((struct wl_proxy *) zwp_e_session_recovery);
58}
59
60static inline uint32_t
61zwp_e_session_recovery_get_version(struct zwp_e_session_recovery *zwp_e_session_recovery)
62{
63 return wl_proxy_get_version((struct wl_proxy *) zwp_e_session_recovery);
64}
65
66static inline void
67zwp_e_session_recovery_destroy(struct zwp_e_session_recovery *zwp_e_session_recovery)
68{
69 wl_proxy_destroy((struct wl_proxy *) zwp_e_session_recovery);
70}
71
72static inline void
73zwp_e_session_recovery_get_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface)
74{
75 wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
76 ZWP_E_SESSION_RECOVERY_GET_UUID, surface);
77}
78
79static inline void
80zwp_e_session_recovery_set_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface, const char *uuid)
81{
82 wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
83 ZWP_E_SESSION_RECOVERY_SET_UUID, surface, uuid);
84}
85
86static inline void
87zwp_e_session_recovery_destroy_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, struct wl_surface *surface, const char *uuid)
88{
89 wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
90 ZWP_E_SESSION_RECOVERY_DESTROY_UUID, surface, uuid);
91}
92
93#ifdef __cplusplus
94}
95#endif
96
97#endif
diff --git a/src/wayland_protocol/session-recovery.xml b/src/wayland_protocol/session-recovery.xml
new file mode 100644
index 0000000..3109413
--- /dev/null
+++ b/src/wayland_protocol/session-recovery.xml
@@ -0,0 +1,21 @@
1<protocol name="e_session_recovery">
2
3 <interface name="zwp_e_session_recovery" version="1">
4 <request name="get_uuid">
5 <arg name="surface" type="object" interface="wl_surface"/>
6 </request>
7 <request name="set_uuid">
8 <arg name="surface" type="object" interface="wl_surface"/>
9 <arg name="uuid" type="string"/>
10 </request>
11 <request name="destroy_uuid">
12 <arg name="surface" type="object" interface="wl_surface"/>
13 <arg name="uuid" type="string"/>
14 </request>
15 <event name="create_uuid">
16 <arg name="surface" type="object" interface="wl_surface"/>
17 <arg name="uuid" type="string"/>
18 </event>
19 </interface>
20
21</protocol>