forked from enlightenment/enlightenment
Start on shell surface creation.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
03346a3d19
commit
10e9f1264d
|
@ -4,11 +4,12 @@
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static void _e_desktop_shell_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSED);
|
static void _e_desktop_shell_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSED);
|
||||||
static void _e_desktop_shell_cb_bind(struct wl_client *client, void *data, unsigned int version EINA_UNUSED, unsigned int id);
|
static void _e_desktop_shell_cb_bind(struct wl_client *client, void *data, unsigned int version EINA_UNUSED, unsigned int id);
|
||||||
|
static void _e_desktop_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *resource, unsigned int id, struct wl_resource *surface_resource);
|
||||||
|
|
||||||
/* local wayland interfaces */
|
/* local wayland interfaces */
|
||||||
static const struct wl_shell_interface _e_desktop_shell_interface =
|
static const struct wl_shell_interface _e_desktop_shell_interface =
|
||||||
{
|
{
|
||||||
NULL // shell_surface_get
|
_e_desktop_shell_cb_shell_surface_get
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop" };
|
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Wl_Desktop" };
|
||||||
|
@ -31,7 +32,7 @@ e_modapi_init(E_Module *m)
|
||||||
wl_signal_add(&_e_comp->signals.destroy, &shell->wl.destroy_listener);
|
wl_signal_add(&_e_comp->signals.destroy, &shell->wl.destroy_listener);
|
||||||
|
|
||||||
/* set a reference to this shell in the compositor */
|
/* set a reference to this shell in the compositor */
|
||||||
_e_comp->shell_interface.shell = shell;
|
shell->compositor->shell_interface.shell = shell;
|
||||||
|
|
||||||
/* try to add this shell to the globals */
|
/* try to add this shell to the globals */
|
||||||
if (!(global =
|
if (!(global =
|
||||||
|
@ -51,11 +52,12 @@ err:
|
||||||
_e_comp->shell_interface.shell = NULL;
|
_e_comp->shell_interface.shell = NULL;
|
||||||
|
|
||||||
/* remove the destroy signal */
|
/* remove the destroy signal */
|
||||||
wl_list_remove(&_e_comp->signals.destroy->listener_list,
|
wl_list_remove(&shell->wl.destroy_listener.link);
|
||||||
&shell->wl.destroy_listener->link);
|
|
||||||
|
|
||||||
/* free the allocated structure */
|
/* free the allocated structure */
|
||||||
E_FREE(shell);
|
E_FREE(shell);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI int
|
EAPI int
|
||||||
|
@ -74,11 +76,10 @@ _e_desktop_shell_cb_destroy(struct wl_listener *listener, void *data EINA_UNUSED
|
||||||
shell = container_of(listener, E_Desktop_Shell, wl.destroy_listener);
|
shell = container_of(listener, E_Desktop_Shell, wl.destroy_listener);
|
||||||
|
|
||||||
/* reset compositor shell interface */
|
/* reset compositor shell interface */
|
||||||
_e_comp->shell_interface.shell = NULL;
|
shell->compositor->shell_interface.shell = NULL;
|
||||||
|
|
||||||
/* remove the destroy signal */
|
/* remove the destroy signal */
|
||||||
wl_list_remove(&_e_comp->signals.destroy->listener_list,
|
wl_list_remove(&shell->wl.destroy_listener.link);
|
||||||
&shell->wl.destroy_listener->link);
|
|
||||||
|
|
||||||
/* free the allocated structure */
|
/* free the allocated structure */
|
||||||
E_FREE(shell);
|
E_FREE(shell);
|
||||||
|
@ -99,3 +100,14 @@ _e_desktop_shell_cb_bind(struct wl_client *client, void *data, unsigned int vers
|
||||||
|
|
||||||
/* TODO: finish */
|
/* TODO: finish */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_e_desktop_shell_cb_shell_surface_get(struct wl_client *client, struct wl_resource *resource, unsigned int id, struct wl_resource *surface_resource)
|
||||||
|
{
|
||||||
|
E_Surface *es;
|
||||||
|
|
||||||
|
printf("Desktop_Shell: Shell Surface Get\n");
|
||||||
|
|
||||||
|
/* try to cast the resource to our structure */
|
||||||
|
if (!(es = surface_resource->data)) return;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue