summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <devilhorns@comcast.net>2013-06-06 04:30:40 +0100
committerChris Michael <devilhorns@comcast.net>2013-06-06 04:42:57 +0100
commit6e54a050d8213ad807e7ca59ea970df635a47bdf (patch)
treec6d72dc7e3efeedc985ca31e4c785454daf94599
parent97a425b52d39afa250ed2fb46419dcfef032ce61 (diff)
Add pre_post_swap_callback_set to Wayland Interface for Ecore_Evas.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
Diffstat (limited to '')
-rw-r--r--src/lib/ecore_evas/ecore_evas_wayland.h1
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c28
2 files changed, 29 insertions, 0 deletions
diff --git a/src/lib/ecore_evas/ecore_evas_wayland.h b/src/lib/ecore_evas/ecore_evas_wayland.h
index 35d4fdd10b..00367efd9e 100644
--- a/src/lib/ecore_evas/ecore_evas_wayland.h
+++ b/src/lib/ecore_evas/ecore_evas_wayland.h
@@ -12,6 +12,7 @@ struct _Ecore_Evas_Interface_Wayland
12 void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y); 12 void (*pointer_set)(Ecore_Evas *ee, int hot_x, int hot_y);
13 void (*type_set)(Ecore_Evas *ee, int type); 13 void (*type_set)(Ecore_Evas *ee, int type);
14 Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee); 14 Ecore_Wl_Window* (*window_get)(const Ecore_Evas *ee);
15 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));
15}; 16};
16 17
17#endif 18#endif
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 172b8f371e..aa83cb0a37 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -3,6 +3,9 @@
3#endif 3#endif
4 4
5#include "ecore_evas_wayland_private.h" 5#include "ecore_evas_wayland_private.h"
6#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
7# include <Evas_Engine_Wayland_Egl.h>
8#endif
6 9
7#define _smart_frame_type "ecore_evas_wl_frame" 10#define _smart_frame_type "ecore_evas_wl_frame"
8 11
@@ -1334,6 +1337,26 @@ _ecore_evas_wayland_window_get(const Ecore_Evas *ee)
1334 return wdata->win; 1337 return wdata->win;
1335} 1338}
1336 1339
1340
1341#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
1342static void
1343_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))
1344{
1345 Evas_Engine_Info_Wayland_Egl *einfo;
1346
1347 if (!(!strcmp(ee->driver, "wayland_egl"))) return;
1348
1349 if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas)))
1350 {
1351 einfo->callback.pre_swap = pre_cb;
1352 einfo->callback.post_swap = post_cb;
1353 einfo->callback.data = data;
1354 if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
1355 ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
1356 }
1357}
1358#endif
1359
1337static void 1360static void
1338_ecore_evas_wayland_pointer_set(Ecore_Evas *ee EINA_UNUSED, int hot_x EINA_UNUSED, int hot_y EINA_UNUSED) 1361_ecore_evas_wayland_pointer_set(Ecore_Evas *ee EINA_UNUSED, int hot_x EINA_UNUSED, int hot_y EINA_UNUSED)
1339{ 1362{
@@ -1357,5 +1380,10 @@ _ecore_evas_wl_interface_new(void)
1357 iface->type_set = _ecore_evas_wayland_type_set; 1380 iface->type_set = _ecore_evas_wayland_type_set;
1358 iface->window_get = _ecore_evas_wayland_window_get; 1381 iface->window_get = _ecore_evas_wayland_window_get;
1359 1382
1383#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
1384 iface->pre_post_swap_callback_set =
1385 _ecore_evas_wayland_pre_post_swap_callback_set;
1386#endif
1387
1360 return iface; 1388 return iface;
1361} 1389}