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.
This commit is contained in:
Stefan Schmidt 2015-12-18 14:51:04 +01:00
parent 1b6a400a29
commit 337939ef14
6 changed files with 36 additions and 36 deletions

View File

@ -524,7 +524,7 @@ _ecore_wl_shutdown(Eina_Bool close)
_ecore_wl_xkb_shutdown(_ecore_wl_disp);
if (_ecore_wl_disp->wl.session_recovery)
session_recovery_destroy(_ecore_wl_disp->wl.session_recovery);
zwp_e_session_recovery_destroy(_ecore_wl_disp->wl.session_recovery);
#ifdef USE_IVI_SHELL
if (_ecore_wl_disp->wl.ivi_application)
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
_ecore_wl_output_add(ewd, id);
else if (!strcmp(interface, "wl_seat"))
_ecore_wl_input_add(ewd, id);
else if (!strcmp(interface, "session_recovery") && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
else if (!strcmp(interface, "zwp_e_session_recovery") && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
{
ewd->wl.session_recovery =
wl_registry_bind(registry, id, &session_recovery_interface, 1);
wl_registry_bind(registry, id, &zwp_e_session_recovery_interface, 1);
}
#ifdef USE_IVI_SHELL
else if (!strcmp(interface, "ivi_application"))

View File

@ -73,7 +73,7 @@ struct _Ecore_Wl_Display
struct wl_shell *shell;
struct xdg_shell *xdg_shell;
struct wl_shell *desktop_shell;
struct session_recovery *session_recovery;
struct zwp_e_session_recovery *session_recovery;
# ifdef USE_IVI_SHELL
struct ivi_application *ivi_application;
# endif

View File

@ -15,7 +15,7 @@ static char *_ecore_wl_window_id_str_get(unsigned int win_id);
static 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);
static void _ecore_xdg_handle_surface_delete(void *data, struct xdg_surface *xdg_surface);
static void _ecore_xdg_handle_popup_done(void *data, struct xdg_popup *xdg_popup);
static void _ecore_session_recovery_uuid(void *data, struct session_recovery *session_recovery, const char *uuid);
static void _ecore_session_recovery_uuid(void *data, struct zwp_e_session_recovery *session_recovery, const char *uuid);
/* local variables */
static Eina_Hash *_windows = NULL;
@ -39,7 +39,7 @@ static const struct xdg_popup_listener _ecore_xdg_popup_listener =
_ecore_xdg_handle_popup_done,
};
static const struct session_recovery_listener _ecore_session_recovery_listener =
static const struct zwp_e_session_recovery_listener _ecore_session_recovery_listener =
{
_ecore_session_recovery_uuid,
};
@ -403,12 +403,12 @@ ecore_wl_window_surface_create(Ecore_Wl_Window *win)
if (_ecore_wl_disp->wl.session_recovery && getenv("EFL_WAYLAND_SESSION_RECOVERY"))
{
session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
zwp_e_session_recovery_add_listener(_ecore_wl_disp->wl.session_recovery,
&_ecore_session_recovery_listener, win);
if (!uuid_is_null(win->uuid))
{
uuid_unparse(win->uuid, uuid);
session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
zwp_e_session_recovery_provide_uuid(_ecore_wl_disp->wl.session_recovery, uuid);
}
}
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)
}
static void
_ecore_session_recovery_uuid(void *data EINA_UNUSED, struct session_recovery *session_recovery, const char *uuid)
_ecore_session_recovery_uuid(void *data EINA_UNUSED, struct zwp_e_session_recovery *session_recovery, const char *uuid)
{
Ecore_Wl_Window *win;
char uuid_string[37];

View File

@ -1,5 +1,5 @@
#ifndef SESSION_RECOVERY_CLIENT_PROTOCOL_H
#define SESSION_RECOVERY_CLIENT_PROTOCOL_H
#ifndef E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
#define E_SESSION_RECOVERY_CLIENT_PROTOCOL_H
#ifdef __cplusplus
extern "C" {
@ -12,53 +12,53 @@ extern "C" {
struct wl_client;
struct wl_resource;
struct session_recovery;
struct zwp_e_session_recovery;
extern const struct wl_interface session_recovery_interface;
extern const struct wl_interface zwp_e_session_recovery_interface;
struct session_recovery_listener {
struct zwp_e_session_recovery_listener {
/**
* uuid - (none)
* @uuid: (none)
*/
void (*uuid)(void *data,
struct session_recovery *session_recovery,
struct zwp_e_session_recovery *zwp_e_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)
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 *) session_recovery,
return wl_proxy_add_listener((struct wl_proxy *) zwp_e_session_recovery,
(void (**)(void)) listener, data);
}
#define SESSION_RECOVERY_PROVIDE_UUID 0
#define ZWP_E_SESSION_RECOVERY_PROVIDE_UUID 0
static inline void
session_recovery_set_user_data(struct session_recovery *session_recovery, void *user_data)
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 *) session_recovery, user_data);
wl_proxy_set_user_data((struct wl_proxy *) zwp_e_session_recovery, user_data);
}
static inline void *
session_recovery_get_user_data(struct session_recovery *session_recovery)
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 *) session_recovery);
return wl_proxy_get_user_data((struct wl_proxy *) zwp_e_session_recovery);
}
static inline void
session_recovery_destroy(struct session_recovery *session_recovery)
zwp_e_session_recovery_destroy(struct zwp_e_session_recovery *zwp_e_session_recovery)
{
wl_proxy_destroy((struct wl_proxy *) session_recovery);
wl_proxy_destroy((struct wl_proxy *) zwp_e_session_recovery);
}
static inline void
session_recovery_provide_uuid(struct session_recovery *session_recovery, const char *uuid)
zwp_e_session_recovery_provide_uuid(struct zwp_e_session_recovery *zwp_e_session_recovery, const char *uuid)
{
wl_proxy_marshal((struct wl_proxy *) session_recovery,
SESSION_RECOVERY_PROVIDE_UUID, uuid);
wl_proxy_marshal((struct wl_proxy *) zwp_e_session_recovery,
ZWP_E_SESSION_RECOVERY_PROVIDE_UUID, uuid);
}
#ifdef __cplusplus

View File

@ -7,17 +7,17 @@ static const struct wl_interface *types[] = {
NULL,
};
static const struct wl_message session_recovery_requests[] = {
static const struct wl_message zwp_e_session_recovery_requests[] = {
{ "provide_uuid", "s", types + 0 },
};
static const struct wl_message session_recovery_events[] = {
static const struct wl_message zwp_e_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,
WL_EXPORT const struct wl_interface zwp_e_session_recovery_interface = {
"zwp_e_session_recovery", 1,
1, zwp_e_session_recovery_requests,
1, zwp_e_session_recovery_events,
};

View File

@ -1,6 +1,6 @@
<protocol name="session_recovery">
<protocol name="e_session_recovery">
<interface name="session_recovery" version="1">
<interface name="zwp_e_session_recovery" version="1">
<request name="provide_uuid">
<arg name="uuid" type="string"/>
</request>