diff options
author | Hermet Park <hermetpark@gmail.com> | 2018-10-11 13:46:36 +0900 |
---|---|---|
committer | Hermet Park <hermetpark@gmail.com> | 2018-10-11 13:46:37 +0900 |
commit | 27fd6a2eab6021c4859b8fbdfc01a90e1ba4748c (patch) | |
tree | 57300a6635d74c3a77b6df125dc793604ce0e136 /src/lib/evas/canvas | |
parent | f51f840b0e0e8f7e0bc290f001dd8c644e533ef6 (diff) | |
download | efl-27fd6a2eab6021c4859b8fbdfc01a90e1ba4748c.tar.gz |
evas: remove redundant internal functions.
Summary:
Since efl object is introduced, magic check is no more used.
Plus, remove redundant object functions interfaces
- type_id,
- visual_id,
- store
- unstore
Reviewers: #committers, bu5hm4n
Reviewed By: #committers, bu5hm4n
Subscribers: bu5hm4n, raster, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7153
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r-- | src/lib/evas/canvas/efl_canvas_vg_object.c | 22 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_image.c | 22 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_line.c | 23 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_polygon.c | 20 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_rectangle.c | 20 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_smart.c | 20 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_text.c | 22 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_textblock.c | 20 | ||||
-rw-r--r-- | src/lib/evas/canvas/evas_object_textgrid.c | 30 |
9 files changed, 2 insertions, 197 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c index 7db12f1f68..6aa798a058 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.c +++ b/src/lib/evas/canvas/efl_canvas_vg_object.c @@ -22,8 +22,6 @@ static void _efl_canvas_vg_render_pre(Evas_Object *eo_obj, static void _efl_canvas_vg_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int _efl_canvas_vg_id_get(Evas_Object *eo_obj); -static unsigned int _efl_canvas_vg_visual_id_get(Evas_Object *eo_obj); static void *_efl_canvas_vg_engine_data_get(Evas_Object *eo_obj); static int _efl_canvas_vg_is_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, @@ -39,14 +37,10 @@ static const Evas_Object_Func object_func = _efl_canvas_vg_render, _efl_canvas_vg_render_pre, _efl_canvas_vg_render_post, - _efl_canvas_vg_id_get, - _efl_canvas_vg_visual_id_get, _efl_canvas_vg_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, _efl_canvas_vg_is_opaque, _efl_canvas_vg_was_opaque, NULL, @@ -754,22 +748,6 @@ _efl_canvas_vg_render_post(Evas_Object *eo_obj EINA_UNUSED, evas_object_cur_prev(obj); } -static unsigned int -_efl_canvas_vg_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Vg_Object_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_VG; -} - -static unsigned int -_efl_canvas_vg_visual_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Vg_Object_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - static void * _efl_canvas_vg_engine_data_get(Evas_Object *eo_obj) { diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 896603301e..8aa9ded3b8 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -30,8 +30,6 @@ static void evas_object_image_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_image_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_image_visual_id_get(Evas_Object *eo_obj); static void *evas_object_image_engine_data_get(Evas_Object *eo_obj); static int evas_object_image_is_opaque(Evas_Object *eo_obj, @@ -63,14 +61,10 @@ static const Evas_Object_Func object_func = evas_object_image_render, evas_object_image_render_pre, evas_object_image_render_post, - evas_object_image_id_get, - evas_object_image_visual_id_get, evas_object_image_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_image_is_opaque, evas_object_image_was_opaque, evas_object_image_is_inside, @@ -2699,22 +2693,6 @@ evas_object_image_render_post(Evas_Object *eo_obj EINA_UNUSED, /* FIXME: copy strings across */ } -static unsigned int -evas_object_image_id_get(Evas_Object *eo_obj) -{ - Evas_Image_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_IMAGE; -} - -static unsigned int -evas_object_image_visual_id_get(Evas_Object *eo_obj) -{ - Evas_Image_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_IMAGE; -} - static void * evas_object_image_engine_data_get(Evas_Object *eo_obj) { diff --git a/src/lib/evas/canvas/evas_object_line.c b/src/lib/evas/canvas/evas_object_line.c index ef6cf14730..47adade454 100644 --- a/src/lib/evas/canvas/evas_object_line.c +++ b/src/lib/evas/canvas/evas_object_line.c @@ -39,8 +39,6 @@ static void evas_object_line_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_line_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_line_visual_id_get(Evas_Object *eo_obj); static void *evas_object_line_engine_data_get(Evas_Object *eo_obj); static int evas_object_line_is_opaque(Evas_Object *eo_obj, @@ -68,14 +66,10 @@ static const Evas_Object_Func object_func = evas_object_line_render, evas_object_line_render_pre, evas_object_line_render_post, - evas_object_line_id_get, - evas_object_line_visual_id_get, evas_object_line_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_line_is_opaque, evas_object_line_was_opaque, evas_object_line_is_inside, @@ -84,8 +78,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL // render_prepare }; /* the actual api call to add a rect */ @@ -358,20 +351,6 @@ evas_object_line_render_post(Evas_Object *eo_obj EINA_UNUSED, o->prev = o->cur; } -static unsigned int evas_object_line_id_get(Evas_Object *eo_obj) -{ - Evas_Line_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_LINE; -} - -static unsigned int evas_object_line_visual_id_get(Evas_Object *eo_obj) -{ - Evas_Line_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - static void *evas_object_line_engine_data_get(Evas_Object *eo_obj) { Evas_Line_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); diff --git a/src/lib/evas/canvas/evas_object_polygon.c b/src/lib/evas/canvas/evas_object_polygon.c index 8993f5fd0b..985420b14b 100644 --- a/src/lib/evas/canvas/evas_object_polygon.c +++ b/src/lib/evas/canvas/evas_object_polygon.c @@ -32,8 +32,6 @@ static void evas_object_polygon_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_polygon_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_polygon_visual_id_get(Evas_Object *eo_obj); static void *evas_object_polygon_engine_data_get(Evas_Object *eo_obj); static int evas_object_polygon_is_opaque(Evas_Object *eo_obj, @@ -58,14 +56,10 @@ static const Evas_Object_Func object_func = evas_object_polygon_render, evas_object_polygon_render_pre, evas_object_polygon_render_post, - evas_object_polygon_id_get, - evas_object_polygon_visual_id_get, evas_object_polygon_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_polygon_is_opaque, evas_object_polygon_was_opaque, evas_object_polygon_is_inside, @@ -416,20 +410,6 @@ evas_object_polygon_render_post(Evas_Object *eo_obj EINA_UNUSED, evas_object_cur_prev(obj); } -static unsigned int evas_object_polygon_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Polygon_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_POLYGON; -} - -static unsigned int evas_object_polygon_visual_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Polygon_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - static void *evas_object_polygon_engine_data_get(Evas_Object *eo_obj) { Efl_Canvas_Polygon_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); diff --git a/src/lib/evas/canvas/evas_object_rectangle.c b/src/lib/evas/canvas/evas_object_rectangle.c index ee9177bbb7..d2dd430b12 100644 --- a/src/lib/evas/canvas/evas_object_rectangle.c +++ b/src/lib/evas/canvas/evas_object_rectangle.c @@ -30,8 +30,6 @@ static void evas_object_rectangle_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_rectangle_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *eo_obj); static void *evas_object_rectangle_engine_data_get(Evas_Object *eo_obj); static int evas_object_rectangle_is_opaque(Evas_Object *eo_obj, @@ -58,14 +56,10 @@ static const Evas_Object_Func object_func = evas_object_rectangle_render, evas_object_rectangle_render_pre, evas_object_rectangle_render_post, - evas_object_rectangle_id_get, - evas_object_rectangle_visual_id_get, evas_object_rectangle_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_rectangle_is_opaque, evas_object_rectangle_was_opaque, NULL, @@ -303,20 +297,6 @@ evas_object_rectangle_was_opaque(Evas_Object *eo_obj EINA_UNUSED, return (obj->prev->cache.clip.a == 255) ? 1 : 0; } -static unsigned int evas_object_rectangle_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Rectangle_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_RECTANGLE; -} - -static unsigned int evas_object_rectangle_visual_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Rectangle_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - static void *evas_object_rectangle_engine_data_get(Evas_Object *eo_obj) { Efl_Canvas_Rectangle_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); diff --git a/src/lib/evas/canvas/evas_object_smart.c b/src/lib/evas/canvas/evas_object_smart.c index 52ad3cd7f0..11d8feb8cb 100644 --- a/src/lib/evas/canvas/evas_object_smart.c +++ b/src/lib/evas/canvas/evas_object_smart.c @@ -91,8 +91,6 @@ static void evas_object_smart_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_smart_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_smart_visual_id_get(Evas_Object *eo_obj); static void *evas_object_smart_engine_data_get(Evas_Object *eo_obj); static void _efl_canvas_group_group_paragraph_direction_set_internal(Eo *eo_obj, Evas_BiDi_Direction dir); @@ -104,8 +102,6 @@ static const Evas_Object_Func object_func = evas_object_smart_render, evas_object_smart_render_pre, evas_object_smart_render_post, - evas_object_smart_id_get, - evas_object_smart_visual_id_get, evas_object_smart_engine_data_get, /* these are optional. NULL = nothing */ NULL, @@ -118,8 +114,6 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, - NULL, NULL // render_prepare }; @@ -1737,20 +1731,6 @@ evas_object_smart_render_post(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Prote o->prev = o->cur; } -static unsigned int evas_object_smart_id_get(Evas_Object *eo_obj) -{ - Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SMART; -} - -static unsigned int evas_object_smart_visual_id_get(Evas_Object *eo_obj) -{ - Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_CONTAINER; -} - static void *evas_object_smart_engine_data_get(Evas_Object *eo_obj) { Evas_Smart_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); diff --git a/src/lib/evas/canvas/evas_object_text.c b/src/lib/evas/canvas/evas_object_text.c index 4474c85db6..07b8202fd3 100644 --- a/src/lib/evas/canvas/evas_object_text.c +++ b/src/lib/evas/canvas/evas_object_text.c @@ -103,8 +103,6 @@ static void evas_object_text_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_text_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_text_visual_id_get(Evas_Object *eo_obj); static void *evas_object_text_engine_data_get(Evas_Object *eo_obj); static int evas_object_text_is_opaque(Evas_Object *eo_obj, @@ -123,14 +121,10 @@ static const Evas_Object_Func object_func = evas_object_text_render, evas_object_text_render_pre, evas_object_text_render_post, - evas_object_text_id_get, - evas_object_text_visual_id_get, evas_object_text_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_text_is_opaque, evas_object_text_was_opaque, NULL, @@ -2165,22 +2159,6 @@ evas_object_text_render_post(Evas_Object *eo_obj EINA_UNUSED, evas_object_cur_prev(obj); } -static unsigned int -evas_object_text_id_get(Evas_Object *eo_obj) -{ - Evas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_TEXT; -} - -static unsigned int -evas_object_text_visual_id_get(Evas_Object *eo_obj) -{ - Evas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - static void * evas_object_text_engine_data_get(Evas_Object *eo_obj) { diff --git a/src/lib/evas/canvas/evas_object_textblock.c b/src/lib/evas/canvas/evas_object_textblock.c index 8be4865a7a..c0f963759d 100644 --- a/src/lib/evas/canvas/evas_object_textblock.c +++ b/src/lib/evas/canvas/evas_object_textblock.c @@ -695,8 +695,6 @@ static void evas_object_textblock_render_post(Evas_Object *eo_obj, void *type_private_data); static Evas_Object_Textblock_Node_Text *_evas_textblock_node_text_new(void); -static unsigned int evas_object_textblock_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_textblock_visual_id_get(Evas_Object *eo_obj); static void *evas_object_textblock_engine_data_get(Evas_Object *eo_obj); static int evas_object_textblock_is_opaque(Evas_Object *eo_obj, @@ -716,14 +714,10 @@ static const Evas_Object_Func object_func = evas_object_textblock_render, evas_object_textblock_render_pre, evas_object_textblock_render_post, - evas_object_textblock_id_get, - evas_object_textblock_visual_id_get, evas_object_textblock_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_textblock_is_opaque, evas_object_textblock_was_opaque, NULL, @@ -14869,20 +14863,6 @@ evas_object_textblock_render_post(Evas_Object *eo_obj EINA_UNUSED, _filter_output_cache_prune(obj, o); } -static unsigned int evas_object_textblock_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_TEXTBLOCK; -} - -static unsigned int evas_object_textblock_visual_id_get(Evas_Object *eo_obj) -{ - Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_CUSTOM; -} - static void *evas_object_textblock_engine_data_get(Evas_Object *eo_obj) { Efl_Canvas_Text_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); diff --git a/src/lib/evas/canvas/evas_object_textgrid.c b/src/lib/evas/canvas/evas_object_textgrid.c index 15a8dff5b3..52cfe66175 100644 --- a/src/lib/evas/canvas/evas_object_textgrid.c +++ b/src/lib/evas/canvas/evas_object_textgrid.c @@ -20,8 +20,6 @@ typedef struct _Evas_Object_Textgrid_Line Evas_Object_Textgrid_Line; struct _Evas_Textgrid_Data { - DATA32 magic; - struct { int w, h; int char_width; @@ -102,8 +100,6 @@ static void evas_object_textgrid_render_post(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, void *type_private_data); -static unsigned int evas_object_textgrid_id_get(Evas_Object *eo_obj); -static unsigned int evas_object_textgrid_visual_id_get(Evas_Object *eo_obj); static void *evas_object_textgrid_engine_data_get(Evas_Object *eo_obj); static int evas_object_textgrid_is_opaque(Evas_Object *eo_obj, @@ -120,14 +116,10 @@ static const Evas_Object_Func object_func = evas_object_textgrid_render, evas_object_textgrid_render_pre, evas_object_textgrid_render_post, - evas_object_textgrid_id_get, - evas_object_textgrid_visual_id_get, evas_object_textgrid_engine_data_get, /* these are optional. NULL = nothing */ NULL, NULL, - NULL, - NULL, evas_object_textgrid_is_opaque, evas_object_textgrid_was_opaque, NULL, @@ -136,8 +128,7 @@ static const Evas_Object_Func object_func = NULL, NULL, NULL, - NULL, // render_prepare - NULL + NULL // render_prepare }; /* all nice and private */ @@ -151,7 +142,6 @@ evas_object_textgrid_init(Evas_Object *eo_obj) obj->type = o_type; Evas_Textgrid_Data *o = obj->private_data; - o->magic = MAGIC_OBJ_TEXTGRID; o->prev.bitmap_scalable = o->cur.bitmap_scalable = EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR; o->prev = o->cur; eina_array_step_set(&o->cur.palette_standard, sizeof (Eina_Array), 16); @@ -230,8 +220,6 @@ evas_object_textgrid_free(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj E while ((c = eina_array_pop(&o->cur.palette_extended))) free(c); eina_array_flush(&o->cur.palette_extended); - - o->magic = 0; } EOLIAN static void @@ -827,22 +815,6 @@ evas_object_textgrid_render_post(Evas_Object *eo_obj EINA_UNUSED, o->prev = o->cur; } -static unsigned int -evas_object_textgrid_id_get(Evas_Object *eo_obj) -{ - Evas_Textgrid_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_TEXTGRID; -} - -static unsigned int -evas_object_textgrid_visual_id_get(Evas_Object *eo_obj) -{ - Evas_Textgrid_Data *o = efl_data_scope_get(eo_obj, MY_CLASS); - if (!o) return 0; - return MAGIC_OBJ_SHAPE; -} - static void * evas_object_textgrid_engine_data_get(Evas_Object *eo_obj) { |