ecore-wl2: Add support for binding various wayland interfaces
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
26844165a1
commit
54a0345503
|
@ -43,6 +43,40 @@ _cb_global_add(void *data, struct wl_registry *registry, unsigned int id, const
|
|||
}
|
||||
}
|
||||
|
||||
if (!strcmp(interface, "wl_compositor"))
|
||||
{
|
||||
ewd->wl.compositor =
|
||||
wl_registry_bind(registry, id, &wl_compositor_interface, 3);
|
||||
}
|
||||
else if (!strcmp(interface, "wl_subcompositor"))
|
||||
{
|
||||
ewd->wl.subcompositor =
|
||||
wl_registry_bind(registry, id, &wl_subcompositor_interface, 1);
|
||||
}
|
||||
else if (!strcmp(interface, "wl_shm"))
|
||||
{
|
||||
ewd->wl.shm =
|
||||
wl_registry_bind(registry, id, &wl_shm_interface, 1);
|
||||
}
|
||||
else if (!strcmp(interface, "wl_data_device_manager"))
|
||||
{
|
||||
ewd->wl.data_device_manager =
|
||||
wl_registry_bind(registry, id, &wl_data_device_manager_interface, 1);
|
||||
}
|
||||
else if (!strcmp(interface, "wl_shell"))
|
||||
{
|
||||
ewd->wl.wl_shell =
|
||||
wl_registry_bind(registry, id, &wl_shell_interface, 1);
|
||||
}
|
||||
else if ((!strcmp(interface, "xdg_shell")) &&
|
||||
(!getenv("EFL_WAYLAND_DONT_USE_XDG_SHELL")))
|
||||
{
|
||||
ewd->wl.xdg_shell =
|
||||
wl_registry_bind(registry, id, &xdg_shell_interface, 1);
|
||||
xdg_shell_use_unstable_version(ewd->wl.xdg_shell, XDG_VERSION);
|
||||
/* TODO: Add listener */
|
||||
}
|
||||
|
||||
/* allocate space for event structure */
|
||||
ev = calloc(1, sizeof(Ecore_Wl2_Event_Global));
|
||||
if (!ev) return;
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
# include "Ecore_Wl2.h"
|
||||
# include "Ecore_Input.h"
|
||||
|
||||
# include "xdg-shell-client-protocol.h"
|
||||
# define XDG_VERSION 5
|
||||
|
||||
extern int _ecore_wl2_log_dom;
|
||||
|
||||
# ifdef ECORE_WL2_DEFAULT_LOG_COLOR
|
||||
|
@ -44,6 +47,12 @@ struct _Ecore_Wl2_Display
|
|||
{
|
||||
struct wl_display *display;
|
||||
struct wl_registry *registry;
|
||||
struct wl_compositor *compositor;
|
||||
struct wl_subcompositor *subcompositor;
|
||||
struct wl_data_device_manager *data_device_manager;
|
||||
struct wl_shm *shm;
|
||||
struct wl_shell *wl_shell;
|
||||
struct xdg_shell *xdg_shell;
|
||||
} wl;
|
||||
|
||||
Ecore_Fd_Handler *fd_hdl;
|
||||
|
|
Loading…
Reference in New Issue