summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@osg.samsung.com>2015-12-18 14:51:04 +0100
committerStefan Schmidt <stefan@osg.samsung.com>2015-12-18 14:51:04 +0100
commit337939ef14e2c158251c355f99d1d8b854665e78 (patch)
treea2779211c930eb26bc071290dc51dc498ecdec61 /src/lib/ecore_wayland
parent1b6a400a29df00493f6799b20470f45f91af8846 (diff)
ecore_wayland: rename session recovery to align namespace
Align out extension naming with other unstable wayland protocols. The unstable protocols from the wayland-protocols repo are prefixed with a zwp additionally we keep a e prefix for now as we are still developing this here. No functional change, just rename. Pointed out by Derek that the session-recovery interface name is a bit to generic here.
Diffstat (limited to 'src/lib/ecore_wayland')
-rw-r--r--src/lib/ecore_wayland/ecore_wl.c6
-rw-r--r--src/lib/ecore_wayland/ecore_wl_private.h2
-rw-r--r--src/lib/ecore_wayland/ecore_wl_window.c10
-rw-r--r--src/lib/ecore_wayland/session-recovery-client-protocol.h38
-rw-r--r--src/lib/ecore_wayland/session-recovery-protocol.c12
-rw-r--r--src/lib/ecore_wayland/session-recovery.xml4
6 files changed, 36 insertions, 36 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl.c b/src/lib/ecore_wayland/ecore_wl.c
index 9dc8c9b7b0..7cd352edeb 100644
--- a/src/lib/ecore_wayland/ecore_wl.c
+++ b/src/lib/ecore_wayland/ecore_wl.c
@@ -524,7 +524,7 @@ _ecore_wl_shutdown(Eina_Bool close)
524 _ecore_wl_xkb_shutdown(_ecore_wl_disp); 524 _ecore_wl_xkb_shutdown(_ecore_wl_disp);
525 525
526 if (_ecore_wl_disp->wl.session_recovery) 526 if (_ecore_wl_disp->wl.session_recovery)
527 session_recovery_destroy(_ecore_wl_disp->wl.session_recovery); 527 zwp_e_session_recovery_destroy(_ecore_wl_disp->wl.session_recovery);
528#ifdef USE_IVI_SHELL 528#ifdef USE_IVI_SHELL
529 if (_ecore_wl_disp->wl.ivi_application) 529 if (_ecore_wl_disp->wl.ivi_application)
530 ivi_application_destroy(_ecore_wl_disp->wl.ivi_application); 530 ivi_application_destroy(_ecore_wl_disp->wl.ivi_application);
@@ -675,10 +675,10 @@ _ecore_wl_cb_handle_global(void *data, struct wl_registry *registry, unsigned in
675 _ecore_wl_output_add(ewd, id); 675 _ecore_wl_output_add(ewd, id);
676 else if (!strcmp(interface, "wl_seat")) 676 else if (!strcmp(interface, "wl_seat"))
677 _ecore_wl_input_add(ewd, id); 677 _ecore_wl_input_add(ewd, id);
678 else if (!strcmp(interface, "session_recovery") && getenv("EFL_WAYLAND_SESSION_RECOVERY")) 678 else if (!strcmp(interface, "zwp_e_session_recovery") && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
679 { 679 {
680 ewd->wl.session_recovery = 680 ewd->wl.session_recovery =
681 wl_registry_bind(registry, id, &session_recovery_interface, 1); 681 wl_registry_bind(registry, id, &zwp_e_session_recovery_interface, 1);
682 } 682 }
683#ifdef USE_IVI_SHELL 683#ifdef USE_IVI_SHELL
684 else if (!strcmp(interface, "ivi_application")) 684 else if (!strcmp(interface, "ivi_application"))
diff --git a/src/lib/ecore_wayland/ecore_wl_private.h b/src/lib/ecore_wayland/ecore_wl_private.h
index 589f9f9524..a100b440e5 100644
--- a/src/lib/ecore_wayland/ecore_wl_private.h
+++ b/src/lib/ecore_wayland/ecore_wl_private.h
@@ -73,7 +73,7 @@ struct _Ecore_Wl_Display
73 struct wl_shell *shell; 73 struct wl_shell *shell;
74 struct xdg_shell *xdg_shell; 74 struct xdg_shell *xdg_shell;
75 struct wl_shell *desktop_shell; 75 struct wl_shell *desktop_shell;
76 struct session_recovery *session_recovery; 76 struct zwp_e_session_recovery *session_recovery;
77# ifdef USE_IVI_SHELL 77# ifdef USE_IVI_SHELL
78 struct ivi_application *ivi_application; 78 struct ivi_application *ivi_application;
79# endif 79# endif
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index 44a3ef4d74..39764d42e7 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -15,7 +15,7 @@ static char *_ecore_wl_window_id_str_get(unsigned int win_id);
15static void _ecore_xdg_handle_surface_configure(void *data, struct xdg_surface *xdg_surface, int32_t width, int32_t height,struct wl_array *states, uint32_t serial); 15static void _ecore_xdg_handle_surface_configure(void *data, struct xdg_surface *xdg_surface, int32_t width, int32_t height,struct wl_array *states, uint32_t serial);
16static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface); 16static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface);
17static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup); 17static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup);
18static void _ecore_session_recovery_uuid(void *data, struct session_recovery *session_recovery, const char *uuid); 18static void _ecore_session_recovery_uuid(void *data, struct zwp_e_session_recovery *session_recovery, const char *uuid);
19 19
20/* local variables */ 20/* local variables */
21static Eina_Hash *_windows = NULL; 21static Eina_Hash *_windows = NULL;
@@ -39,7 +39,7 @@ static const struct xdg_popup_listener _ecore_xdg_popup_listener =
39 _ecore_xdg_handle_popup_done, 39 _ecore_xdg_handle_popup_done,
40}; 40};
41 41
42static const struct session_recovery_listener _ecore_session_recovery_listener = 42static const struct zwp_e_session_recovery_listener _ecore_session_recovery_listener =
43{ 43{
44 _ecore_session_recovery_uuid, 44 _ecore_session_recovery_uuid,
45}; 45};
@@ -403,12 +403,12 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win)
403 403
404 if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY")) 404 if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
405 { 405 {
406 session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery, 406 zwp_e_session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
407 &_ecore_session_recovery_listener, win); 407 &_ecore_session_recovery_listener, win);
408 if (!uuid_is_null(win->uuid)) 408 if (!uuid_is_null(win->uuid))
409 { 409 {
410 uuid_unparse(win->uuid, uuid); 410 uuid_unparse(win->uuid, uuid);
411 session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid); 411 zwp_e_session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
412 } 412 }
413 } 413 }
414 win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface); 414 win->surface_id = wl_proxy_get_id((struct wl_proxy *)win->surface);
@@ -1102,7 +1102,7 @@ _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup)
1102} 1102}
1103 1103
1104static void 1104static void
1105_ecore_session_recovery_uuid(void *data EINA_UNUSED, struct session_recovery *session_recovery, const char *uuid) 1105_ecore_session_recovery_uuid(void *data EINA_UNUSED, struct zwp_e_session_recovery *session_recovery, const char *uuid)
1106{ 1106{
1107 Ecore_Wl_Window *win; 1107 Ecore_Wl_Window *win;
1108 char uuid_string[37]; 1108 char uuid_string[37];
diff --git a/src/lib/ecore_wayland/session-recovery-client-protocol.h b/src/lib/ecore_wayland/session-recovery-client-protocol.h
index 97848c8fec..24057471fb 100644
--- a/src/lib/ecore_wayland/session-recovery-client-protocol.h
+++ b/src/lib/ecore_wayland/session-recovery-client-protocol.h
@@ -1,5 +1,5 @@
1#ifndef SESSION_RECOVERY_CLIENT_PROTOCOL_H 1#ifndef E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
2#define SESSION_RECOVERY_CLIENT_PROTOCOL_H 2#define E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
3 3
4#ifdef __cplusplus 4#ifdef __cplusplus
5extern "C" { 5extern "C" {
@@ -12,53 +12,53 @@ extern "C" {
12struct wl_client; 12struct wl_client;
13struct wl_resource; 13struct wl_resource;
14 14
15struct session_recovery; 15struct zwp_e_session_recovery;
16 16
17extern const struct wl_interface session_recovery_interface; 17extern const struct wl_interface zwp_e_session_recovery_interface;
18 18
19struct session_recovery_listener { 19struct zwp_e_session_recovery_listener {
20 /** 20 /**
21 * uuid - (none) 21 * uuid - (none)
22 * @uuid: (none) 22 * @uuid: (none)
23 */ 23 */
24 void (*uuid)(void *data, 24 void (*uuid)(void *data,
25 struct session_recovery *session_recovery, 25 struct zwp_e_session_recovery *zwp_e_session_recovery,
26 const char *uuid); 26 const char *uuid);
27}; 27};
28 28
29static inline int 29static inline int
30session_recovery_add_listener(struct session_recovery *session_recovery, 30zwp_e_session_recovery_add_listener(struct zwp_e_session_recovery *zwp_e_session_recovery,
31 const struct session_recovery_listener *listener, void *data) 31 const struct zwp_e_session_recovery_listener *listener, void *data)
32{ 32{
33 return wl_proxy_add_listener((struct wl_proxy *) session_recovery, 33 return wl_proxy_add_listener((struct wl_proxy *) zwp_e_session_recovery,
34 (void (**)(void)) listener, data); 34 (void (**)(void)) listener, data);
35} 35}
36 36
37#define SESSION_RECOVERY_PROVIDE_UUID 0 37#define ZWP_E_SESSION_RECOVERY_PROVIDE_UUID 0
38 38
39static inline void 39static inline void
40session_recovery_set_user_data(struct session_recovery *session_recovery, void *user_data) 40zwp_e_session_recovery_set_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery, void *user_data)
41{ 41{
42 wl_proxy_set_user_data((struct wl_proxy *) session_recovery, user_data); 42 wl_proxy_set_user_data((struct wl_proxy *) zwp_e_session_recovery, user_data);
43} 43}
44 44
45static inline void * 45static inline void *
46session_recovery_get_user_data(struct session_recovery *session_recovery) 46zwp_e_session_recovery_get_user_data(struct zwp_e_session_recovery *zwp_e_session_recovery)
47{ 47{
48 return wl_proxy_get_user_data((struct wl_proxy *) session_recovery); 48 return wl_proxy_get_user_data((struct wl_proxy *) zwp_e_session_recovery);
49} 49}
50 50
51static inline void 51static inline void
52session_recovery_destroy(struct session_recovery *session_recovery) 52zwp_e_session_recovery_destroy(struct zwp_e_session_recovery *zwp_e_session_recovery)
53{ 53{
54 wl_proxy_destroy((struct wl_proxy *) session_recovery); 54 wl_proxy_destroy((struct wl_proxy *) zwp_e_session_recovery);
55} 55}
56 56
57static inline void 57static inline void
58session_recovery_provide_uuid(struct session_recovery *session_recovery, const char *uuid) 58zwp_e_session_recovery_provide_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, const char *uuid)
59{ 59{
60 wl_proxy_marshal((struct wl_proxy *) session_recovery, 60 wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
61 SESSION_RECOVERY_PROVIDE_UUID, uuid); 61 ZWP_E_SESSION_RECOVERY_PROVIDE_UUID, uuid);
62} 62}
63 63
64#ifdef __cplusplus 64#ifdef __cplusplus
diff --git a/src/lib/ecore_wayland/session-recovery-protocol.c b/src/lib/ecore_wayland/session-recovery-protocol.c
index 5e0a835f48..32ddbcbefe 100644
--- a/src/lib/ecore_wayland/session-recovery-protocol.c
+++ b/src/lib/ecore_wayland/session-recovery-protocol.c
@@ -7,17 +7,17 @@ static const struct wl_interface *types[] = {
7 NULL, 7 NULL,
8}; 8};
9 9
10static const struct wl_message session_recovery_requests[] = { 10static const struct wl_message zwp_e_session_recovery_requests[] = {
11 { "provide_uuid", "s", types + 0 }, 11 { "provide_uuid", "s", types + 0 },
12}; 12};
13 13
14static const struct wl_message session_recovery_events[] = { 14static const struct wl_message zwp_e_session_recovery_events[] = {
15 { "uuid", "s", types + 0 }, 15 { "uuid", "s", types + 0 },
16}; 16};
17 17
18WL_EXPORT const struct wl_interface session_recovery_interface = { 18WL_EXPORT const struct wl_interface zwp_e_session_recovery_interface = {
19 "session_recovery", 1, 19 "zwp_e_session_recovery", 1,
20 1, session_recovery_requests, 20 1, zwp_e_session_recovery_requests,
21 1, session_recovery_events, 21 1, zwp_e_session_recovery_events,
22}; 22};
23 23
diff --git a/src/lib/ecore_wayland/session-recovery.xml b/src/lib/ecore_wayland/session-recovery.xml
index d996b6dae2..469871e261 100644
--- a/src/lib/ecore_wayland/session-recovery.xml
+++ b/src/lib/ecore_wayland/session-recovery.xml
@@ -1,6 +1,6 @@
1<protocol name="session_recovery"> 1<protocol name="e_session_recovery">
2 2
3 <interface name="session_recovery" version="1"> 3 <interface name="zwp_e_session_recovery" version="1">
4 <request name="provide_uuid"> 4 <request name="provide_uuid">
5 <arg name="uuid" type="string"/> 5 <arg name="uuid" type="string"/>
6 </request> 6 </request>