void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y);
void (*type_set)(Ecore_Evas *ee, int type);
Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee);
+ void (*pre_post_swap_callback_set)(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e));
};
#endif
#endif
#include "ecore_evas_wayland_private.h"
+#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
+# include <Evas_Engine_Wayland_Egl.h>
+#endif
#define _smart_frame_type "ecore_evas_wl_frame"
return wdata->win;
}
+
+#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
+static void
+_ecore_evas_wayland_pre_post_swap_callback_set(const Ecore_Evas *ee, void *data, void (*pre_cb) (void *data, Evas *e), void (*post_cb) (void *data, Evas *e))
+{
+ Evas_Engine_Info_Wayland_Egl *einfo;
+
+ if (!(!strcmp(ee->driver, "wayland_egl"))) return;
+
+ if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas)))
+ {
+ einfo->callback.pre_swap = pre_cb;
+ einfo->callback.post_swap = post_cb;
+ einfo->callback.data = data;
+ if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
+ ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
+ }
+}
+#endif
+
static void
_ecore_evas_wayland_pointer_set(Ecore_Evas *ee EINA_UNUSED, int hot_x EINA_UNUSED, int hot_y EINA_UNUSED)
{
iface->type_set = _ecore_evas_wayland_type_set;
iface->window_get = _ecore_evas_wayland_window_get;
+#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
+ iface->pre_post_swap_callback_set =
+ _ecore_evas_wayland_pre_post_swap_callback_set;
+#endif
+
return iface;
}