#include <glib.h>
#include <malloc.h>
#ifdef WAYLAND
-#include <Ecore_Wayland.h>
+#define EFL_BETA_API_SUPPORT
+#include <Ecore_Wl2.h>
#include <input-method-client-protocol.h>
#else
#include <Ecore_X.h>
struct WaylandKeyboard
{
Ecore_Evas *ee;
- Ecore_Wl_Window *wl_win;
+ Ecore_Wl2_Window *wl_win;
struct wl_surface *surface;
struct wl_input_panel *ip;
Evas_Object *main_window = NATIVE_WINDOW_CAST(m_main_window);
#ifdef WAYLAND
- ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 0, 0, 0, portrait.width, portrait.height);
- ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 90, 0, 0, landscape.height, landscape.width);
- ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 180, 0, 0, portrait.width, portrait.height);
- ecore_wl_window_rotation_geometry_set(elm_win_wl_window_get(main_window), 270, 0, 0, landscape.height, landscape.width);
+ Ecore_Wl2_Window *wl_window = (Ecore_Wl2_Window *)elm_win_wl_window_get(main_window);
+ ecore_wl2_window_rotation_geometry_set(wl_window, 0, 0, 0, portrait.width, portrait.height);
+ ecore_wl2_window_rotation_geometry_set(wl_window, 90, 0, 0, landscape.height, landscape.width);
+ ecore_wl2_window_rotation_geometry_set(wl_window, 180, 0, 0, portrait.width, portrait.height);
+ ecore_wl2_window_rotation_geometry_set(wl_window, 270, 0, 0, landscape.height, landscape.width);
#else
/*
ecore_x_e_window_rotation_geometry_set(elm_win_xwindow_get(main_window), 0, 0, 0, portrait.width, portrait.height);
static bool
_wayland_setup(struct WaylandKeyboard *wlkb, Evas_Object *main_window)
{
- Eina_Inlist *globals;
+ Eina_Iterator *globals;
struct wl_registry *registry;
- Ecore_Wl_Global *global;
+ Ecore_Wl2_Global *global;
+ Ecore_Wl2_Display *ewd;
- if (!(registry = ecore_wl_registry_get()))
+ if (!(ewd = ecore_wl2_connected_display_get(NULL)))
return false;
- if (!(globals = ecore_wl_globals_get()))
+ if (!(registry = ecore_wl2_display_registry_get(ewd)))
return false;
- EINA_INLIST_FOREACH(globals, global)
+ if (!(globals = ecore_wl2_display_globals_get(ewd)))
+ return false;
+
+ EINA_ITERATOR_FOREACH(globals, global)
{
if (strcmp(global->interface, "wl_input_panel") == 0)
wlkb->ip = (wl_input_panel *)wl_registry_bind(registry, global->id, &wl_input_panel_interface, 1);
/* Set input panel surface */
LOGD("Setting up input panel\n");
- wlkb->wl_win = ecore_evas_wayland_window_get(wlkb->ee);
+ wlkb->wl_win = ecore_evas_wayland2_window_get(wlkb->ee);
if (!wlkb->wl_win) {
LOGW("Couldn't get wayland window\n");
return false;
}
- ecore_wl_window_type_set(wlkb->wl_win, ECORE_WL_WINDOW_TYPE_NONE);
- wlkb->surface = ecore_wl_window_surface_create(wlkb->wl_win);
- if (!wlkb->surface) {
+ ecore_wl2_window_type_set(wlkb->wl_win, ECORE_WL2_WINDOW_TYPE_NONE);
+ Ecore_Wl2_Surface *surface = ecore_wl2_surface_create(wlkb->wl_win, EINA_TRUE);
+ if (!surface) {
LOGW("Couldn't create surface\n");
return false;
}
+ wlkb->surface = ecore_wl2_window_surface_get(wlkb->wl_win);
+ if (!wlkb->surface) {
+ LOGW("Couldn't get surface\n");
+ return false;
+ }
+
wlkb->ips = wl_input_panel_get_input_panel_surface(wlkb->ip, wlkb->surface);
if (!wlkb->ips) {
LOGW("Couldn't get input panel surface\n");