summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-06-14 14:59:57 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-06-14 16:27:42 +0900
commit8a0e74afa820769a4fe41a61a502cac96c9626e3 (patch)
tree27c5a3e4d55773fbed1d34356424d5d40be24947 /src/lib/evas
parent254f5ef772c42ba48b3286433d9e0d58fcb96c74 (diff)
evas: Move canvas events to a common interface
This merges window and evas events into a single name. Some events are marked as @beta as they shouldn't really be part of our EO API.
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/Evas_Eo.h2
-rw-r--r--src/lib/evas/canvas/efl_canvas.eo13
-rw-r--r--src/lib/evas/canvas/evas_callbacks.c15
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo17
-rw-r--r--src/lib/evas/canvas/evas_filter_mixin.c6
-rw-r--r--src/lib/evas/canvas/evas_main.c3
-rw-r--r--src/lib/evas/canvas/evas_object_vg.c4
7 files changed, 36 insertions, 24 deletions
diff --git a/src/lib/evas/Evas_Eo.h b/src/lib/evas/Evas_Eo.h
index f04bec5a79..7a499a5271 100644
--- a/src/lib/evas/Evas_Eo.h
+++ b/src/lib/evas/Evas_Eo.h
@@ -8,6 +8,8 @@
8#include "canvas/efl_ui_selectable.eo.h" 8#include "canvas/efl_ui_selectable.eo.h"
9#include "canvas/efl_ui_zoomable.eo.h" 9#include "canvas/efl_ui_zoomable.eo.h"
10 10
11#include "canvas/efl_canvas.eo.h"
12
11#include "canvas/evas_canvas.eo.h" 13#include "canvas/evas_canvas.eo.h"
12 14
13/** 15/**
diff --git a/src/lib/evas/canvas/efl_canvas.eo b/src/lib/evas/canvas/efl_canvas.eo
new file mode 100644
index 0000000000..8d0230e57c
--- /dev/null
+++ b/src/lib/evas/canvas/efl_canvas.eo
@@ -0,0 +1,13 @@
1interface Efl.Canvas ()
2{
3 [[Common interface for Window and some internal classes in EFL.]]
4 events {
5 focus,in;
6 focus,out;
7 object,focus,in: Efl.Gfx;
8 object,focus,out: Efl.Gfx;
9 render,pre;
10 render,post;
11 device,changed: Efl.Input.Device;
12 }
13}
diff --git a/src/lib/evas/canvas/evas_callbacks.c b/src/lib/evas/canvas/evas_callbacks.c
index 7e48ed2f8c..cfac1a06e6 100644
--- a/src/lib/evas/canvas/evas_callbacks.c
+++ b/src/lib/evas/canvas/evas_callbacks.c
@@ -1,4 +1,5 @@
1#define EVAS_OBJECT_BETA 1#define EVAS_OBJECT_BETA
2#define EVAS_CANVAS_BETA
2 3
3#include "evas_common_private.h" 4#include "evas_common_private.h"
4#include "evas_private.h" 5#include "evas_private.h"
@@ -40,17 +41,17 @@ static const Eo_Event_Description *_legacy_evas_callback_table[EVAS_CALLBACK_LAS
40 EVAS_OBJECT_EVENT_HOLD, 41 EVAS_OBJECT_EVENT_HOLD,
41 EFL_GFX_EVENT_CHANGE_SIZE_HINTS, 42 EFL_GFX_EVENT_CHANGE_SIZE_HINTS,
42 EFL_IMAGE_EVENT_PRELOAD, 43 EFL_IMAGE_EVENT_PRELOAD,
43 EVAS_CANVAS_EVENT_FOCUS_IN, 44 EFL_CANVAS_EVENT_FOCUS_IN,
44 EVAS_CANVAS_EVENT_FOCUS_OUT, 45 EFL_CANVAS_EVENT_FOCUS_OUT,
45 EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE, 46 EVAS_CANVAS_EVENT_RENDER_FLUSH_PRE,
46 EVAS_CANVAS_EVENT_RENDER_FLUSH_POST, 47 EVAS_CANVAS_EVENT_RENDER_FLUSH_POST,
47 EVAS_CANVAS_EVENT_OBJECT_FOCUS_IN, 48 EFL_CANVAS_EVENT_OBJECT_FOCUS_IN,
48 EVAS_CANVAS_EVENT_OBJECT_FOCUS_OUT, 49 EFL_CANVAS_EVENT_OBJECT_FOCUS_OUT,
49 EFL_IMAGE_EVENT_UNLOAD, 50 EFL_IMAGE_EVENT_UNLOAD,
50 EVAS_CANVAS_EVENT_RENDER_PRE, 51 EFL_CANVAS_EVENT_RENDER_PRE,
51 EVAS_CANVAS_EVENT_RENDER_POST, 52 EFL_CANVAS_EVENT_RENDER_POST,
52 EFL_IMAGE_EVENT_RESIZE, 53 EFL_IMAGE_EVENT_RESIZE,
53 EVAS_CANVAS_EVENT_DEVICE_CHANGED, 54 EFL_CANVAS_EVENT_DEVICE_CHANGED,
54 EVAS_CANVAS_EVENT_AXIS_UPDATE, 55 EVAS_CANVAS_EVENT_AXIS_UPDATE,
55 EVAS_CANVAS_EVENT_VIEWPORT_RESIZE 56 EVAS_CANVAS_EVENT_VIEWPORT_RESIZE
56}; 57};
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 71ec998fe9..8fd5aea395 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1,7 +1,7 @@
1import evas_types; 1import evas_types;
2import efl_event_types; 2import efl_event_types;
3 3
4class Evas.Canvas (Eo.Base, Evas.Common_Interface, Efl.Animator, 4class Evas.Canvas (Eo.Base, Efl.Canvas, Evas.Common_Interface, Efl.Animator,
5 Efl.Input.Interface) 5 Efl.Input.Interface)
6{ 6{
7 legacy_prefix: evas; 7 legacy_prefix: evas;
@@ -1198,16 +1198,9 @@ class Evas.Canvas (Eo.Base, Evas.Common_Interface, Efl.Animator,
1198 Evas.Common_Interface.evas.get; 1198 Evas.Common_Interface.evas.get;
1199 } 1199 }
1200 events { 1200 events {
1201 focus,in; 1201 render,flush,pre @beta;
1202 focus,out; 1202 render,flush,post @beta;
1203 object,focus,in; 1203 axis,update @beta;
1204 object,focus,out; 1204 viewport,resize @beta;
1205 render,pre;
1206 render,post;
1207 render,flush,pre;
1208 render,flush,post;
1209 device,changed;
1210 axis,update;
1211 viewport,resize;
1212 } 1205 }
1213} 1206}
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c b/src/lib/evas/canvas/evas_filter_mixin.c
index 88168bc0fa..0ffc324ea4 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -267,7 +267,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
267 { 267 {
268 // Post render callback is not required anymore 268 // Post render callback is not required anymore
269 Evas *e = obj->layer->evas->evas; 269 Evas *e = obj->layer->evas->evas;
270 eo_event_callback_del(e, EVAS_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj); 270 eo_event_callback_del(e, EFL_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj);
271 pd->has_cb = EINA_FALSE; 271 pd->has_cb = EINA_FALSE;
272 } 272 }
273 273
@@ -327,7 +327,7 @@ evas_filter_object_render(Eo *eo_obj, Evas_Object_Protected_Data *obj,
327 if (do_async && !pd->has_cb) 327 if (do_async && !pd->has_cb)
328 { 328 {
329 Evas *e = obj->layer->evas->evas; 329 Evas *e = obj->layer->evas->evas;
330 eo_event_callback_add(e, EVAS_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj); 330 eo_event_callback_add(e, EFL_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj);
331 pd->has_cb = EINA_TRUE; 331 pd->has_cb = EINA_TRUE;
332 } 332 }
333 evas_filter_context_post_run_callback_set(filter, _filter_cb, eo_obj); 333 evas_filter_context_post_run_callback_set(filter, _filter_cb, eo_obj);
@@ -629,7 +629,7 @@ finish:
629 if (pd->has_cb) 629 if (pd->has_cb)
630 { 630 {
631 Evas *e = obj->layer->evas->evas; 631 Evas *e = obj->layer->evas->evas;
632 eo_event_callback_del(e, EVAS_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj); 632 eo_event_callback_del(e, EFL_CANVAS_EVENT_RENDER_POST, _render_post_cb, eo_obj);
633 } 633 }
634 SLKD(pd->lck); 634 SLKD(pd->lck);
635 635
diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 1c0a5eea3c..16d3314465 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1,3 +1,5 @@
1#define EVAS_CANVAS_BETA
2
1#include "evas_common_private.h" 3#include "evas_common_private.h"
2#include "evas_private.h" 4#include "evas_private.h"
3//#include "evas_cs.h" 5//#include "evas_cs.h"
@@ -872,4 +874,5 @@ evas_output_viewport_get(const Evas *eo_e, Evas_Coord *x, Evas_Coord *y, Evas_Co
872 if (h) *h = e->viewport.h; 874 if (h) *h = e->viewport.h;
873} 875}
874 876
877#include "canvas/efl_canvas.eo.c"
875#include "canvas/evas_canvas.eo.c" 878#include "canvas/evas_canvas.eo.c"
diff --git a/src/lib/evas/canvas/evas_object_vg.c b/src/lib/evas/canvas/evas_object_vg.c
index 74c72fd4ef..0290a188ca 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -103,7 +103,7 @@ _evas_vg_eo_base_destructor(Eo *eo_obj, Evas_VG_Data *pd)
103 if (pd->engine_data) 103 if (pd->engine_data)
104 obj->layer->evas->engine.func->ector_free(pd->engine_data); 104 obj->layer->evas->engine.func->ector_free(pd->engine_data);
105 105
106 eo_event_callback_del(e, EVAS_CANVAS_EVENT_RENDER_POST, _cleanup_reference, pd); 106 eo_event_callback_del(e, EFL_CANVAS_EVENT_RENDER_POST, _cleanup_reference, pd);
107 107
108 eo_unref(pd->root); 108 eo_unref(pd->root);
109 pd->root = NULL; 109 pd->root = NULL;
@@ -138,7 +138,7 @@ _evas_vg_eo_base_finalize(Eo *obj, Evas_VG_Data *pd)
138 138
139 // TODO: If we start to have to many Evas_Object_VG per canvas, it may be nice 139 // TODO: If we start to have to many Evas_Object_VG per canvas, it may be nice
140 // to actually have one event per canvas and one array per canvas to. 140 // to actually have one event per canvas and one array per canvas to.
141 eo_event_callback_add(e, EVAS_CANVAS_EVENT_RENDER_POST, _cleanup_reference, pd); 141 eo_event_callback_add(e, EFL_CANVAS_EVENT_RENDER_POST, _cleanup_reference, pd);
142 142
143 return obj; 143 return obj;
144} 144}