summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorCedric Bail <cedric@osg.samsung.com>2018-04-02 15:11:44 -0700
committerCedric Bail <cedric@osg.samsung.com>2018-04-02 15:12:31 -0700
commit1ca196fbcd5aea30cf1d97190c7525262e9e4664 (patch)
treedd7a0e4cddedcb2059aceee37bf0fe352e46833b /src/lib/ecore_evas/ecore_evas.c
parenta44697c37a304c0d4d574b6772775c6936869e24 (diff)
ecore_evas: add a hook interceptor for evas_new, will be useful for a portable Exactness.
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 9a9fbac..50eb36d 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -5085,6 +5085,14 @@ ecore_evas_callback_device_mouse_in_set(Ecore_Evas *ee,
5085 ee->func.fn_device_mouse_in = func; 5085 ee->func.fn_device_mouse_in = func;
5086} 5086}
5087 5087
5088static Evas *(*replacement_new)(int w, int h) = NULL;
5089
5090EAPI void
5091ecore_evas_callback_new_set(Evas *(*func)(int w, int h))
5092{
5093 replacement_new = func;
5094}
5095
5088EAPI Evas * 5096EAPI Evas *
5089ecore_evas_evas_new(Ecore_Evas *ee, int w, int h) 5097ecore_evas_evas_new(Ecore_Evas *ee, int w, int h)
5090{ 5098{
@@ -5092,7 +5100,8 @@ ecore_evas_evas_new(Ecore_Evas *ee, int w, int h)
5092 5100
5093 if (ee->evas) return ee->evas; 5101 if (ee->evas) return ee->evas;
5094 5102
5095 e = evas_new(); 5103 if (replacement_new) e = replacement_new(w, h);
5104 else e = evas_new();
5096 if (!e) return NULL; 5105 if (!e) return NULL;
5097 5106
5098 ee->evas = e; 5107 ee->evas = e;