forked from enlightenment/efl
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
This commit is contained in:
parent
6e11153ef7
commit
73e5bb84a1
|
@ -54,6 +54,7 @@ static void evas_object_image_render_prepare(Evas_Object *obj, Evas_Obje
|
||||||
|
|
||||||
static void evas_object_image_filled_resize_listener(void *data, Evas *eo_e, Evas_Object *eo_obj, void *einfo);
|
static void evas_object_image_filled_resize_listener(void *data, Evas *eo_e, Evas_Object *eo_obj, void *einfo);
|
||||||
|
|
||||||
|
static int evas_object_image_is_on_plane(Evas_Object *obj EINA_UNUSED, Evas_Object_Protected_Data *pd EINA_UNUSED, void *type_private_data);
|
||||||
static const Evas_Object_Func object_func =
|
static const Evas_Object_Func object_func =
|
||||||
{
|
{
|
||||||
/* methods (compulsory) */
|
/* methods (compulsory) */
|
||||||
|
@ -73,7 +74,8 @@ static const Evas_Object_Func object_func =
|
||||||
evas_object_image_has_opaque_rect,
|
evas_object_image_has_opaque_rect,
|
||||||
evas_object_image_get_opaque_rect,
|
evas_object_image_get_opaque_rect,
|
||||||
evas_object_image_can_map,
|
evas_object_image_can_map,
|
||||||
evas_object_image_render_prepare // render_prepare
|
evas_object_image_render_prepare, // render_prepare
|
||||||
|
evas_object_image_is_on_plane,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const Evas_Object_Image_Load_Opts default_load_opts = {
|
static const Evas_Object_Image_Load_Opts default_load_opts = {
|
||||||
|
@ -1743,6 +1745,14 @@ _evas_object_image_can_use_plane(Evas_Object_Protected_Data *obj,
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
evas_object_image_is_on_plane(Evas_Object *obj EINA_UNUSED, Evas_Object_Protected_Data *pd EINA_UNUSED, void *type_private_data)
|
||||||
|
{
|
||||||
|
Evas_Image_Data *o = type_private_data;
|
||||||
|
|
||||||
|
if (o->plane) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
static void
|
static void
|
||||||
evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data,
|
evas_object_image_render(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data,
|
||||||
void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async)
|
void *engine, void *output, void *context, void *surface, int x, int y, Eina_Bool do_async)
|
||||||
|
|
|
@ -117,6 +117,14 @@ evas_object_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
evas_object_is_on_plane(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
||||||
|
{
|
||||||
|
if (obj->func->is_on_plane)
|
||||||
|
return obj->func->is_on_plane(eo_obj, obj, obj->private_data);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static inline int
|
static inline int
|
||||||
evas_event_freezes_through(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
evas_event_freezes_through(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1260,6 +1260,7 @@ struct _Evas_Object_Func
|
||||||
// preparation - may include rendering content to buffer or loading data
|
// preparation - may include rendering content to buffer or loading data
|
||||||
// from disk or uploading to texture etc.
|
// from disk or uploading to texture etc.
|
||||||
void (*render_prepare) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Eina_Bool do_async);
|
void (*render_prepare) (Evas_Object *obj, Evas_Object_Protected_Data *pd, Eina_Bool do_async);
|
||||||
|
int (*is_on_plane) (Evas_Object *obj, Evas_Object_Protected_Data *pd, void *type_private_data);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Evas_Func
|
struct _Evas_Func
|
||||||
|
|
Loading…
Reference in New Issue