From c7aa3b2f83bfed886cf5bcd53dea21d0c9d11a99 Mon Sep 17 00:00:00 2001 From: Amitesh Singh Date: Tue, 5 Dec 2017 15:29:07 +0900 Subject: [PATCH] edje: rename intf Efl.Canvas.Layout_Calc to Efl.Layout.Calc --- src/Makefile_Edje.am | 2 +- src/lib/edje/Edje_Eo.h | 2 +- src/lib/edje/edje_legacy.c | 14 +++++++------- src/lib/edje/edje_object.eo | 14 +++++++------- src/lib/edje/edje_private.h | 2 +- src/lib/edje/edje_smart.c | 2 +- src/lib/edje/edje_util.c | 14 +++++++------- .../edje/{efl_canvas_layout_calc.eo => efl_layout_calc.eo} | 2 +- src/lib/elementary/efl_ui_image.c | 8 ++++---- src/lib/elementary/efl_ui_image.eo | 6 +++--- src/lib/elementary/efl_ui_layout.c | 8 ++++---- src/lib/elementary/efl_ui_layout.eo | 6 +++--- src/tests/edje/edje_test_edje.c | 4 ++-- 13 files changed, 42 insertions(+), 42 deletions(-) rename src/lib/edje/{efl_canvas_layout_calc.eo => efl_layout_calc.eo} (99%) diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index 2c1921a..e87c45e 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -2,7 +2,7 @@ ### Library edje_eolian_files = \ - lib/edje/efl_canvas_layout_calc.eo \ + lib/edje/efl_layout_calc.eo \ lib/edje/efl_layout_signal.eo \ lib/edje/efl_canvas_layout_group.eo \ lib/edje/edje_object.eo \ diff --git a/src/lib/edje/Edje_Eo.h b/src/lib/edje/Edje_Eo.h index 9f3c7bc..cd2465e 100644 --- a/src/lib/edje/Edje_Eo.h +++ b/src/lib/edje/Edje_Eo.h @@ -1,6 +1,6 @@ #include -#include "efl_canvas_layout_calc.eo.h" +#include "efl_layout_calc.eo.h" #include "efl_layout_signal.eo.h" #include "efl_canvas_layout_group.eo.h" #include "edje_object.eo.h" diff --git a/src/lib/edje/edje_legacy.c b/src/lib/edje/edje_legacy.c index 700d17c..526b31a 100644 --- a/src/lib/edje/edje_legacy.c +++ b/src/lib/edje/edje_legacy.c @@ -1090,13 +1090,13 @@ edje_object_part_text_insert(Eo *obj, const char *part, const char *text) EAPI void edje_object_update_hints_set(Edje_Object *obj, Eina_Bool update) { - efl_canvas_layout_calc_auto_update_hints_set(obj, update); + efl_layout_calc_auto_update_hints_set(obj, update); } EAPI Eina_Bool edje_object_update_hints_get(const Edje_Object *obj) { - return efl_canvas_layout_calc_auto_update_hints_get(obj); + return efl_layout_calc_auto_update_hints_get(obj); } EAPI void @@ -1118,7 +1118,7 @@ edje_object_size_min_restricted_calc(Edje_Object *obj, int *minw, int *minh, int if (minh) *minh = sz.h; return; } - sz = efl_canvas_layout_calc_size_min(obj, EINA_SIZE2D(restrictedw, restrictedh)); + sz = efl_layout_calc_size_min(obj, EINA_SIZE2D(restrictedw, restrictedh)); if (minw) *minw = sz.w; if (minh) *minh = sz.h; } @@ -1130,7 +1130,7 @@ edje_object_parts_extends_calc(Edje_Object *obj, int *x, int *y, int *w, int *h) Edje *ed; ed = _edje_fetch(obj); - if (ed) r = efl_canvas_layout_calc_parts_extends(obj); + if (ed) r = efl_layout_calc_parts_extends(obj); if (x) *x = r.x; if (y) *y = r.y; if (w) *w = r.w; @@ -1141,19 +1141,19 @@ edje_object_parts_extends_calc(Edje_Object *obj, int *x, int *y, int *w, int *h) EAPI int edje_object_freeze(Edje_Object *obj) { - return efl_canvas_layout_calc_freeze(obj); + return efl_layout_calc_freeze(obj); } EAPI int edje_object_thaw(Edje_Object *obj) { - return efl_canvas_layout_calc_thaw(obj); + return efl_layout_calc_thaw(obj); } EAPI void edje_object_calc_force(Edje_Object *obj) { - efl_canvas_layout_calc_force(obj); + efl_layout_calc_force(obj); } EAPI void diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo index af514c5..a23fb94 100644 --- a/src/lib/edje/edje_object.eo +++ b/src/lib/edje/edje_object.eo @@ -3,7 +3,7 @@ import edje_types; // FIXME: This EO doc needs a direct link to the "edcref" doc class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part, - Efl.Observer, Efl.Ui.Base, Efl.Canvas.Layout_Calc, + Efl.Observer, Efl.Ui.Base, Efl.Layout.Calc, Efl.Layout.Signal, Efl.Canvas.Layout_Group, Efl.Player, Efl.Gfx.Color_Class, Efl.Gfx.Text_Class, Efl.Gfx.Size_Class) @@ -109,12 +109,12 @@ class Edje.Object (Efl.Canvas.Group, Efl.File, Efl.Container, Efl.Part, Efl.Gfx.Size_Class.size_class { get; set; } Efl.Gfx.Size_Class.size_class_del; Efl.Canvas.Group.group_calculate; - Efl.Canvas.Layout_Calc.calc_auto_update_hints { get; set; } - Efl.Canvas.Layout_Calc.calc_size_min; - Efl.Canvas.Layout_Calc.calc_parts_extends; - Efl.Canvas.Layout_Calc.calc_freeze; - Efl.Canvas.Layout_Calc.calc_thaw; - Efl.Canvas.Layout_Calc.calc_force; + Efl.Layout.Calc.calc_auto_update_hints { get; set; } + Efl.Layout.Calc.calc_size_min; + Efl.Layout.Calc.calc_parts_extends; + Efl.Layout.Calc.calc_freeze; + Efl.Layout.Calc.calc_thaw; + Efl.Layout.Calc.calc_force; Efl.Canvas.Layout_Group.group_size_min { get; } Efl.Canvas.Layout_Group.group_size_max { get; } Efl.Canvas.Layout_Group.group_data { get; } diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index c5238b3..eae37b8 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -42,7 +42,7 @@ // auto_unref #define EDJE_OBJECT_BETA #define EFL_CANVAS_OBJECT_PROTECTED -#define EFL_CANVAS_LAYOUT_CALC_PROTECTED +#define EFL_LAYOUT_CALC_PROTECTED #include #include diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index 662d4f5..2a029d7 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -544,6 +544,6 @@ _edje_object_efl_player_play_speed_get(Eo *obj EINA_UNUSED, Edje *pd) #include "edje_object.eo.c" #include "edje_global.eo.c" -#include "efl_canvas_layout_calc.eo.c" +#include "efl_layout_calc.eo.c" #include "efl_layout_signal.eo.c" #include "efl_canvas_layout_group.eo.c" diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 47ee13d..d941b82 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -460,7 +460,7 @@ _edje_object_efl_canvas_layout_group_group_data_get(Eo *obj EINA_UNUSED, Edje *e } EOLIAN int -_edje_object_efl_canvas_layout_calc_calc_freeze(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_layout_calc_calc_freeze(Eo *obj EINA_UNUSED, Edje *ed) { unsigned short i; @@ -478,7 +478,7 @@ _edje_object_efl_canvas_layout_calc_calc_freeze(Eo *obj EINA_UNUSED, Edje *ed) } EOLIAN int -_edje_object_efl_canvas_layout_calc_calc_thaw(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_layout_calc_calc_thaw(Eo *obj EINA_UNUSED, Edje *ed) { unsigned short i; @@ -3344,7 +3344,7 @@ _edje_object_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Edj } EOLIAN void -_edje_object_efl_canvas_layout_calc_calc_force(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_layout_calc_calc_force(Eo *obj EINA_UNUSED, Edje *ed) { int pf, pf2; @@ -3367,7 +3367,7 @@ _edje_object_efl_canvas_layout_calc_calc_force(Eo *obj EINA_UNUSED, Edje *ed) } EOLIAN Eina_Rectangle -_edje_object_efl_canvas_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje *ed) { Evas_Coord xx1 = INT_MAX, yy1 = INT_MAX; Evas_Coord xx2 = 0, yy2 = 0, w = 0, h = 0; @@ -3407,7 +3407,7 @@ _edje_object_efl_canvas_layout_calc_calc_parts_extends(Eo *obj EINA_UNUSED, Edje } EOLIAN Eina_Size2D -_edje_object_efl_canvas_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Edje *ed, Eina_Size2D restricted) +_edje_object_efl_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Edje *ed, Eina_Size2D restricted) { const int CALC_COUNT_LIMIT = 255; @@ -5040,7 +5040,7 @@ edje_object_preload(Eo *obj, Eina_Bool cancel) } EOLIAN void -_edje_object_efl_canvas_layout_calc_calc_auto_update_hints_set(Eo *obj EINA_UNUSED, Edje *ed, Eina_Bool update) +_edje_object_efl_layout_calc_calc_auto_update_hints_set(Eo *obj EINA_UNUSED, Edje *ed, Eina_Bool update) { if (!ed) return; if (ed->update_hints == !!update) return; @@ -5054,7 +5054,7 @@ _edje_object_efl_canvas_layout_calc_calc_auto_update_hints_set(Eo *obj EINA_UNUS } EOLIAN Eina_Bool -_edje_object_efl_canvas_layout_calc_calc_auto_update_hints_get(Eo *obj EINA_UNUSED, Edje *ed) +_edje_object_efl_layout_calc_calc_auto_update_hints_get(Eo *obj EINA_UNUSED, Edje *ed) { return ed->update_hints; } diff --git a/src/lib/edje/efl_canvas_layout_calc.eo b/src/lib/edje/efl_layout_calc.eo similarity index 99% rename from src/lib/edje/efl_canvas_layout_calc.eo rename to src/lib/edje/efl_layout_calc.eo index 1ed6fdf..d196e9a 100644 --- a/src/lib/edje/efl_canvas_layout_calc.eo +++ b/src/lib/edje/efl_layout_calc.eo @@ -1,6 +1,6 @@ import eina_types; -interface Efl.Canvas.Layout_Calc +interface Efl.Layout.Calc { [[This interface defines a common set of APIs used to trigger calculations with layout objects. diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 292875d..63933d8 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -5,7 +5,7 @@ #define EFL_ACCESS_IMAGE_PROTECTED #define EFL_ACCESS_PROTECTED #define EFL_ACCESS_WIDGET_ACTION_PROTECTED -#define EFL_CANVAS_LAYOUT_CALC_PROTECTED +#define EFL_LAYOUT_CALC_PROTECTED #include @@ -1190,17 +1190,17 @@ _efl_ui_image_efl_canvas_layout_group_group_size_max_get(Eo *obj EINA_UNUSED, Ef } EOLIAN static void -_efl_ui_image_efl_canvas_layout_calc_calc_force(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) +_efl_ui_image_efl_layout_calc_calc_force(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd) { if (sd->edje) edje_object_calc_force(sd->img); } EOLIAN static Eina_Size2D -_efl_ui_image_efl_canvas_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, Eina_Size2D restricted) +_efl_ui_image_efl_layout_calc_calc_size_min(Eo *obj EINA_UNUSED, Efl_Ui_Image_Data *sd, Eina_Size2D restricted) { if (sd->edje) - return efl_canvas_layout_calc_size_min(sd->img, restricted); + return efl_layout_calc_size_min(sd->img, restricted); else { // Ignore restricted here? Combine with min? Hmm... diff --git a/src/lib/elementary/efl_ui_image.eo b/src/lib/elementary/efl_ui_image.eo index 3e6f1e6..9065496 100644 --- a/src/lib/elementary/efl_ui_image.eo +++ b/src/lib/elementary/efl_ui_image.eo @@ -47,7 +47,7 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.File, Efl.Image, Efl.Image.Load, Efl.Player, Efl.Gfx.View, Efl.Access.Image, Efl.Access.Widget.Action, Efl.Orientation, Efl.Flipable, - Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Canvas.Layout_Calc, + Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Layout.Calc, Efl.Canvas.Layout_Group, Efl.Layout.Signal) { [[ Efl UI image class]] @@ -141,8 +141,8 @@ class Efl.Ui.Image (Elm.Widget, Efl.Ui.Clickable, Efl.Ui.Draggable, Efl.Canvas.Layout_Group.group_size_min { get; } Efl.Canvas.Layout_Group.group_size_max { get; } //Efl.Canvas.Layout_Group.group_data { get; } - Efl.Canvas.Layout_Calc.calc_size_min; - Efl.Canvas.Layout_Calc.calc_force; + Efl.Layout.Calc.calc_size_min; + Efl.Layout.Calc.calc_force; Efl.Canvas.Object.clip { set; } Efl.Canvas.Group.group_member_add; Efl.Ui.Draggable.drag_target { get; set; } diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c index f1efc08..c86c636 100644 --- a/src/lib/elementary/efl_ui_layout.c +++ b/src/lib/elementary/efl_ui_layout.c @@ -1599,7 +1599,7 @@ elm_layout_sizing_restricted_eval(Eo *obj, Eina_Bool w, Eina_Bool h) } EOLIAN static int -_efl_ui_layout_efl_canvas_layout_calc_calc_freeze(Eo *obj, Efl_Ui_Layout_Data *sd) +_efl_ui_layout_efl_layout_calc_calc_freeze(Eo *obj, Efl_Ui_Layout_Data *sd) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0); @@ -1611,7 +1611,7 @@ _efl_ui_layout_efl_canvas_layout_calc_calc_freeze(Eo *obj, Efl_Ui_Layout_Data *s } EOLIAN static int -_efl_ui_layout_efl_canvas_layout_calc_calc_thaw(Eo *obj, Efl_Ui_Layout_Data *sd) +_efl_ui_layout_efl_layout_calc_calc_thaw(Eo *obj, Efl_Ui_Layout_Data *sd) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, 0); @@ -2247,13 +2247,13 @@ elm_layout_part_cursor_unset(Eo *obj, const char *part) EAPI int elm_layout_freeze(Evas_Object *obj) { - return efl_canvas_layout_calc_freeze(obj); + return efl_layout_calc_freeze(obj); } EAPI int elm_layout_thaw(Evas_Object *obj) { - return efl_canvas_layout_calc_thaw(obj); + return efl_layout_calc_thaw(obj); } void diff --git a/src/lib/elementary/efl_ui_layout.eo b/src/lib/elementary/efl_ui_layout.eo index 44cd39f..45b163c 100644 --- a/src/lib/elementary/efl_ui_layout.eo +++ b/src/lib/elementary/efl_ui_layout.eo @@ -1,6 +1,6 @@ class Efl.Ui.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File, Efl.Ui.View, Efl.Ui.Model.Connect, Efl.Ui.Model.Factory.Connect, - Efl.Canvas.Layout_Calc, Efl.Layout.Signal, + Efl.Layout.Calc, Efl.Layout.Signal, Efl.Canvas.Layout_Group) { [[Elementary layout class]] @@ -48,8 +48,8 @@ class Efl.Ui.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File, Efl.File.file { get; set; } Efl.File.mmap { get; set; } Efl.Canvas.Group.group_calculate; - Efl.Canvas.Layout_Calc.calc_freeze; - Efl.Canvas.Layout_Calc.calc_thaw; + Efl.Layout.Calc.calc_freeze; + Efl.Layout.Calc.calc_thaw; Efl.Layout.Signal.signal_callback_add; Efl.Layout.Signal.signal_callback_del; Efl.Layout.Signal.signal_emit; diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c index 4d83f48..a8dbbf3 100644 --- a/src/tests/edje/edje_test_edje.c +++ b/src/tests/edje/edje_test_edje.c @@ -155,8 +155,8 @@ START_TEST(edje_test_calculate_parens) obj = edje_object_add(evas); - /* A negative test case for efl_canvas_layout_calc_parts_extends */ - rect = efl_canvas_layout_calc_parts_extends(obj); + /* A negative test case for efl_layout_calc_parts_extends */ + rect = efl_layout_calc_parts_extends(obj); fail_if(rect.w < 0 || rect.h < 0); fail_unless(edje_object_file_set(obj, test_layout_get("test_parens.edj"), "test_group")); -- 2.7.4