summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman.samsung@gmail.com>2018-10-22 10:20:28 -0500
committerDerek Foreman <derek.foreman.samsung@gmail.com>2018-12-14 09:52:01 -0600
commit73e5bb84a137e1b5472599b87caa2af85b35d787 (patch)
tree5a589b5c42b9b9f5686f8691930894b36e28b49c /src/lib/evas
parent6e11153ef7a89d1205736567eb7df2a16ec67369 (diff)
evas_object: Add function to test if an object is on a hardware plane
Signed-off-by: Derek Foreman <derek.foreman.samsung@gmail.com> Reviewed-by: Cedric BAIL <cedric.bail@free.fr> Differential Revision: https://phab.enlightenment.org/D7190
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/canvas/evas_object_image.c12
-rw-r--r--src/lib/evas/include/evas_inline.x8
-rw-r--r--src/lib/evas/include/evas_private.h1
3 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 594aa57e85..cd11d54914 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -54,6 +54,7 @@ static void evas_object_image_render_prepare(Evas_Object *obj, Evas_Obje
54 54
55static void evas_object_image_filled_resize_listener(void *data, Evas *eo_e, Evas_Object *eo_obj, void *einfo); 55static void evas_object_image_filled_resize_listener(void *data, Evas *eo_e, Evas_Object *eo_obj, void *einfo);
56 56
57static int evas_object_image_is_on_plane(Evas_Object *obj EINA_UNUSED, Evas_Object_Protected_Data *pd EINA_UNUSED, void *type_private_data);
57static const Evas_Object_Func object_func = 58static const Evas_Object_Func object_func =
58{ 59{
59 /* methods (compulsory) */ 60 /* methods (compulsory) */
@@ -73,7 +74,8 @@ static const Evas_Object_Func object_func =
73 evas_object_image_has_opaque_rect, 74 evas_object_image_has_opaque_rect,
74 evas_object_image_get_opaque_rect, 75 evas_object_image_get_opaque_rect,
75 evas_object_image_can_map, 76 evas_object_image_can_map,
76 evas_object_image_render_prepare // render_prepare 77 evas_object_image_render_prepare, // render_prepare
78 evas_object_image_is_on_plane,
77}; 79};
78 80
79static const Evas_Object_Image_Load_Opts default_load_opts = { 81static const Evas_Object_Image_Load_Opts default_load_opts = {
@@ -1743,6 +1745,14 @@ _evas_object_image_can_use_plane(Evas_Object_Protected_Data *obj,
1743 return EINA_TRUE; 1745 return EINA_TRUE;
1744} 1746}
1745 1747
1748static int
1749evas_object_image_is_on_plane(Evas_Object *obj EINA_UNUSED, Evas_Object_Protected_Data *pd EINA_UNUSED, void *type_private_data)
1750{
1751 Evas_Image_Data *o = type_private_data;
1752
1753 if (o->plane) return 1;
1754 return 0;
1755}
1746static void 1756static void
1747evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data, 1757evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data,
1748 void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async) 1758 void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async)
diff --git a/src/lib/evas/include/evas_inline.x b/src/lib/evas/include/evas_inline.x
index a2b96b1789..739a59b32d 100644
--- a/src/lib/evas/include/evas_inline.x
+++ b/src/lib/evas/include/evas_inline.x
@@ -118,6 +118,14 @@ evas_object_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
118} 118}
119 119
120static inline int 120static inline int
121evas_object_is_on_plane(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
122{
123 if (obj->func->is_on_plane)
124 return obj->func->is_on_plane(eo_obj, obj, obj->private_data);
125 return 0;
126}
127
128static inline int
121evas_event_freezes_through(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj) 129evas_event_freezes_through(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
122{ 130{
123 if (obj->freeze_events) return 1; 131 if (obj->freeze_events) return 1;
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 3d5020fdd6..db2498708a 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1260,6 +1260,7 @@ struct _Evas_Object_Func
1260// preparation - may include rendering content to buffer or loading data 1260// preparation - may include rendering content to buffer or loading data
1261// from disk or uploading to texture etc. 1261// from disk or uploading to texture etc.
1262 void (*render_prepare) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Eina_Bool do_async); 1262 void (*render_prepare) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Eina_Bool do_async);
1263 int (*is_on_plane) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data);
1263}; 1264};
1264 1265
1265struct _Evas_Func 1266struct _Evas_Func