diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-04-20 14:55:26 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-04-26 11:36:23 +0900 |
commit | 902950018be3682c0549174fc0c6d1c04141cd39 (patch) | |
tree | e909eb2fdd7b12dfbba38d8a8c4f16d9340398e5 /src | |
parent | 8c02bf5be65f6d8fa6c4659eb54746531fead1a4 (diff) | |
download | efl-902950018be3682c0549174fc0c6d1c04141cd39.tar.gz |
Efl: Introduce Efl.Container and unify APIs
This removes Efl.Pack_Named which had a terrible name,
removes Elm.Container which should have been renamed
Efl.Ui.Container anyway, and introduces an interface
Efl.Container instead.
The hierarchy tree is now changed as objects don't inherit
from Efl.Container (it's an interface, not a regular class)
but only implement it. Obviously it is very easy to
reintroduce an Efl.Ui.Container parent class if we need it,
but I guess it should have some actual logic. It's basically
part of what Elm.Widget already does.
Some function names have been modified to look better in C
with the efl_content prefix.
@feature
Diffstat (limited to 'src')
55 files changed, 261 insertions, 304 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am index dca49af7f9..3faf4501f2 100644 --- a/src/Makefile_Efl.am +++ b/src/Makefile_Efl.am @@ -25,11 +25,11 @@ efl_eolian_files = \ lib/efl/interfaces/efl_animator.eo \ lib/efl/interfaces/efl_orientation.eo \ lib/efl/interfaces/efl_flipable.eo \ + lib/efl/interfaces/efl_container.eo \ lib/efl/interfaces/efl_pack.eo \ lib/efl/interfaces/efl_pack_layout.eo \ lib/efl/interfaces/efl_pack_linear.eo \ lib/efl/interfaces/efl_pack_grid.eo \ - lib/efl/interfaces/efl_pack_named.eo \ lib/efl/interfaces/efl_vpath.eo \ lib/efl/interfaces/efl_vpath_manager.eo \ lib/efl/interfaces/efl_vpath_file.eo \ diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am index 5d4c856481..9755c88f05 100644 --- a/src/Makefile_Elementary.am +++ b/src/Makefile_Elementary.am @@ -19,7 +19,6 @@ elm_public_eolian_files = \ lib/elementary/elm_colorselector.eo \ lib/elementary/elm_combobox.eo \ lib/elementary/elm_conformant.eo \ - lib/elementary/elm_container.eo \ lib/elementary/elm_ctxpopup.eo \ lib/elementary/elm_datetime.eo \ lib/elementary/elm_dayselector.eo \ @@ -182,7 +181,6 @@ includesunstable_HEADERS = \ lib/elementary/elm_widget_clock.h \ lib/elementary/elm_widget_colorselector.h \ lib/elementary/elm_widget_conform.h \ - lib/elementary/elm_widget_container.h \ lib/elementary/elm_widget_combobox.h \ lib/elementary/elm_widget_ctxpopup.h \ lib/elementary/elm_widget_datetime.h \ @@ -323,7 +321,6 @@ includesub_HEADERS = \ lib/elementary/elm_conform.h \ lib/elementary/elm_conform_eo.h \ lib/elementary/elm_conform_legacy.h \ - lib/elementary/elm_container.h \ lib/elementary/elm_cursor.h \ lib/elementary/elm_datetime.h \ lib/elementary/elm_datetime_common.h \ @@ -552,7 +549,6 @@ lib_elementary_libelementary_la_SOURCES = \ lib/elementary/elc_combobox.c \ lib/elementary/elm_config.c \ lib/elementary/elm_conform.c \ - lib/elementary/elm_container.c \ lib/elementary/elm_datetime.c \ lib/elementary/elm_dayselector.c \ lib/elementary/elm_dbus_menu.c \ diff --git a/src/bin/elementary/test_ui_box.c b/src/bin/elementary/test_ui_box.c index e23ca1f043..0e287d2b1d 100644 --- a/src/bin/elementary/test_ui_box.c +++ b/src/bin/elementary/test_ui_box.c @@ -162,8 +162,8 @@ static void _custom_engine_layout_do(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, Efl_Pack *pack, const void *data EINA_UNUSED) { - Eina_Iterator *it = efl_pack_contents_get(pack); - int count = efl_pack_contents_count(pack), i = 0; + Eina_Iterator *it = efl_content_iterate(pack); + int count = efl_content_count(pack), i = 0; int px, py, pw, ph; Eo *sobj; diff --git a/src/bin/elementary/test_ui_grid.c b/src/bin/elementary/test_ui_grid.c index 7ab38fc2cf..956c676fb8 100644 --- a/src/bin/elementary/test_ui_grid.c +++ b/src/bin/elementary/test_ui_grid.c @@ -121,7 +121,7 @@ layout_updated_cb(void *data, const Eo_Event *event) int rows, cols, count; efl_pack_grid_size_get(event->obj, &cols, &rows); - count = efl_pack_contents_count(event->obj); + count = efl_content_count(event->obj); sprintf(buf, "%d items (%dx%d)", count, cols, rows); elm_object_text_set(o, buf); @@ -137,7 +137,7 @@ child_evt_cb(void *data, const Eo_Event *event) char buf[64]; efl_pack_grid_content_position_get(event->obj, it, &col, &row, &colspan, &rowspan); - if (event->desc == EFL_PACK_EVENT_CONTENT_ADDED) + if (event->desc == EFL_CONTAINER_EVENT_CONTENT_ADDED) sprintf(buf, "pack %d,%d %dx%d", col, row, colspan, rowspan); else sprintf(buf, "unpack %d,%d %dx%d", col, row, colspan, rowspan); @@ -166,7 +166,7 @@ _custom_engine_layout_do(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, efl_pack_grid_size_get(pack, &cols, &rows); if (!cols || !rows) goto end; - it = efl_pack_contents_get(pack); + it = efl_content_iterate(pack); EINA_ITERATOR_FOREACH(it, item) { if (efl_pack_grid_content_position_get(pack, item, &c, &r, &cs, &rs)) @@ -416,8 +416,8 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i efl_gfx_visible_set(o, 1); o = elm_label_add(win); - eo_event_callback_add(grid, EFL_PACK_EVENT_CONTENT_ADDED, child_evt_cb, o); - eo_event_callback_add(grid, EFL_PACK_EVENT_CONTENT_REMOVED, child_evt_cb, o); + eo_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o); + eo_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o); evas_object_size_hint_align_set(o, 0.5, 0); evas_object_size_hint_weight_set(o, 1, 1); efl_pack(bx, o); @@ -598,8 +598,8 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, efl_gfx_visible_set(o, 1); o = elm_label_add(win); - eo_event_callback_add(grid, EFL_PACK_EVENT_CONTENT_ADDED, child_evt_cb, o); - eo_event_callback_add(grid, EFL_PACK_EVENT_CONTENT_REMOVED, child_evt_cb, o); + eo_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o); + eo_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o); evas_object_size_hint_align_set(o, 0.5, 0); evas_object_size_hint_weight_set(o, 1, 1); efl_pack(bx, o); diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h index f1a02201dd..ce4399f000 100644 --- a/src/lib/efl/Efl.h +++ b/src/lib/efl/Efl.h @@ -117,11 +117,11 @@ static inline void efl_gfx_color16_type_set(Efl_Gfx_Color *color, #include "interfaces/efl_gfx.x" /* Packing & containers */ +#include "interfaces/efl_container.eo.h" #include "interfaces/efl_pack.eo.h" #include "interfaces/efl_pack_layout.eo.h" #include "interfaces/efl_pack_linear.eo.h" #include "interfaces/efl_pack_grid.eo.h" -#include "interfaces/efl_pack_named.eo.h" #else diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo new file mode 100644 index 0000000000..b4e0f0949a --- /dev/null +++ b/src/lib/efl/interfaces/efl_container.eo @@ -0,0 +1,50 @@ +interface Efl.Container (Efl.Gfx.Base) +{ + [[API common to all UI container objects.]] + legacy_prefix: null; + eo_prefix: efl_content; + methods { + @property content { + [[Swallowed sub-object contained in this object.]] + set { + return: bool; + } + get {} + keys { + part: const(char)*; [[the part in which to swallow the object]] + } + values { + content: Efl.Gfx.Base*; [[the object to swallow.]] + } + } + @property content_part_name { + [[The name of the part under which an object is swallowed.]] + get {} + keys { + content: Efl.Gfx.Base*; + } + values { + name: const(char)*; + } + } + content_unset { + [[Unswallow the object in the given part of the container and return it.]] + params { + @in name: const(char)* @nullable; + } + return: Efl.Gfx.Base*; + } + content_iterate { + [[Begin iterating over this object's contents.]] + return: free(own(iterator<Efl.Gfx.Base *> *), eina_iterator_free) @warn_unused; + } + content_count { + [[Returns the number of UI elements packed in this container.]] + return: int; + } + } + events { + content,added: Efl.Gfx.Base*; [[Sent after a new item was added.]] + content,removed: Efl.Gfx.Base*; [[Sent after an item was removed, before unref.]] + } +} diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c index 0899fd3947..8cf69b9be4 100644 --- a/src/lib/efl/interfaces/efl_interfaces_main.c +++ b/src/lib/efl/interfaces/efl_interfaces_main.c @@ -33,11 +33,11 @@ EAPI const Eo_Event_Description _EFL_GFX_CHANGED = EAPI const Eo_Event_Description _EFL_GFX_PATH_CHANGED = EO_EVENT_DESCRIPTION("Graphics path changed"); +#include "interfaces/efl_container.eo.c" #include "interfaces/efl_pack.eo.c" #include "interfaces/efl_pack_layout.eo.c" #include "interfaces/efl_pack_linear.eo.c" #include "interfaces/efl_pack_grid.eo.c" -#include "interfaces/efl_pack_named.eo.c" #include "interfaces/efl_model_base.eo.c" #include "interfaces/efl_animator.eo.c" diff --git a/src/lib/efl/interfaces/efl_pack.eo b/src/lib/efl/interfaces/efl_pack.eo index 720ff4d670..127fc4a38a 100644 --- a/src/lib/efl/interfaces/efl_pack.eo +++ b/src/lib/efl/interfaces/efl_pack.eo @@ -1,19 +1,11 @@ import eina_types; -interface Efl.Pack (Efl.Gfx.Base) +interface Efl.Pack (Efl.Container) { [[API common to all UI container objects.]] legacy_prefix: null; methods { - contents_get { - [[Begin iterating over this object's contents.]] - return: free(own(iterator<Efl.Gfx.Base *> *), eina_iterator_free) @warn_unused; - } - contents_count { - [[Returns the number of UI elements packed in this container.]] - return: int; - } pack_clear { [[Removes all packed contents, and unreferences them.]] } @@ -65,8 +57,6 @@ interface Efl.Pack (Efl.Gfx.Base) } } events { - content,added: Efl.Gfx.Base*; [[Sent after a new item was added.]] - content,removed: Efl.Gfx.Base*; [[Sent after an item was removed, before unref.]] - layout,updated; [[Sent after the layout was updated.]] + layout,updated; [[Sent after the layout was updated.]] } } diff --git a/src/lib/efl/interfaces/efl_pack_grid.eo b/src/lib/efl/interfaces/efl_pack_grid.eo index b1c235bee9..32bccd9a6a 100644 --- a/src/lib/efl/interfaces/efl_pack_grid.eo +++ b/src/lib/efl/interfaces/efl_pack_grid.eo @@ -15,7 +15,7 @@ interface Efl.Pack_Grid (Efl.Pack_Linear) rowspan: int @optional; [[0 means 1, -1 means @.grid_rows]] } } - grid_contents_at { + grid_content_iterate { [[Returns all objects at a given position in this grid.]] return: free(own(iterator<Efl.Gfx.Base *> *), eina_iterator_free); params { @@ -25,7 +25,7 @@ interface Efl.Pack_Grid (Efl.Pack_Linear) } } grid_content_at { - [[Returns the first child at position, see @.grid_contents_at.]] + [[Returns the first child at position, see @.grid_content_iterate.]] return: Efl.Gfx.Base*; params { @in col: int; diff --git a/src/lib/efl/interfaces/efl_pack_named.eo b/src/lib/efl/interfaces/efl_pack_named.eo deleted file mode 100644 index 3c71ef8b45..0000000000 --- a/src/lib/efl/interfaces/efl_pack_named.eo +++ /dev/null @@ -1,15 +0,0 @@ -interface Efl.Pack_Named (Efl.Pack) -{ - [[Common API for containers of named parts.]] - legacy_prefix: null; - eo_prefix: efl_pack; - methods { - pack_as /* @part */ { - [[Insert element in a named spot (swallow, part).]] - params { - part: const(char) *; - subobj: Efl.Gfx.Base *; - } - } - } -} diff --git a/src/lib/elementary/Elementary.h.in b/src/lib/elementary/Elementary.h.in index d67e227aed..6439a82ee2 100644 --- a/src/lib/elementary/Elementary.h.in +++ b/src/lib/elementary/Elementary.h.in @@ -205,7 +205,6 @@ EAPI extern Elm_Version *elm_version; #include <elm_colorselector.h> #include <elm_color_class.h> #include <elm_conform.h> -#include <elm_container.h> #include <elm_cursor.h> #include <elm_datetime.h> #include <elm_debug.h> diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index d89ff204c6..190a1e6ce9 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c @@ -29,7 +29,7 @@ _child_added_cb_proxy(void *data, const Eo_Event *event) Evas_Object *box = data; Evas_Object_Box_Option *opt = event->info; - eo_event_callback_call(box, EFL_PACK_EVENT_CONTENT_ADDED, opt->obj); + eo_event_callback_call(box, EFL_CONTAINER_EVENT_CONTENT_ADDED, opt->obj); return EINA_TRUE; } @@ -40,7 +40,7 @@ _child_removed_cb_proxy(void *data, const Eo_Event *event) Evas_Object *box = data; Evas_Object *child = event->info; - eo_event_callback_call(box, EFL_PACK_EVENT_CONTENT_REMOVED, child); + eo_event_callback_call(box, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child); return EINA_TRUE; } @@ -273,7 +273,7 @@ _efl_ui_box_eo_base_constructor(Eo *obj, Efl_Ui_Box_Data *pd) /* CLEAN API BELOW */ EOLIAN static int -_efl_ui_box_efl_pack_contents_count(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) +_efl_ui_box_efl_container_content_count(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) { Evas_Object_Box_Data *bd; @@ -537,7 +537,7 @@ _box_item_iterator_free(Box_Item_Iterator *it) } EOLIAN static Eina_Iterator * -_efl_ui_box_efl_pack_contents_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) +_efl_ui_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) { Box_Item_Iterator *it; diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo index 6e085a890e..8736b9ed7a 100644 --- a/src/lib/elementary/efl_ui_box.eo +++ b/src/lib/elementary/efl_ui_box.eo @@ -16,8 +16,8 @@ class Efl.Ui.Box (Elm.Widget, Efl.Pack_Linear, Efl.Pack_Layout) Elm.Widget.focus_next; // Packing interfaces - Efl.Pack.contents_get; - Efl.Pack.contents_count; + Efl.Container.content_iterate; + Efl.Container.content_count; Efl.Pack.pack_clear; Efl.Pack.unpack_all; Efl.Pack.unpack; diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index e0cec74bd4..62cb3f0824 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c @@ -464,7 +464,7 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj, eo_key_data_set(subobj, GRID_ITEM_KEY, gi); elm_widget_sub_object_add(obj, subobj); - eo_event_callback_call(obj, EFL_PACK_EVENT_CONTENT_ADDED, subobj); + eo_event_callback_call(obj, EFL_CONTAINER_EVENT_CONTENT_ADDED, subobj); eo_event_callback_array_add(subobj, subobj_callbacks(), obj); } @@ -584,7 +584,7 @@ _item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj) } end: - eo_event_callback_call(obj, EFL_PACK_EVENT_CONTENT_REMOVED, subobj); + eo_event_callback_call(obj, EFL_CONTAINER_EVENT_CONTENT_REMOVED, subobj); pd->items = (Grid_Item *) eina_inlist_remove(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi)); pd->count--; @@ -679,7 +679,7 @@ _grid_item_iterator_create(Eo *obj, Eina_List *list) } EOLIAN static Eina_Iterator * -_efl_ui_grid_efl_pack_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) +_efl_ui_grid_efl_container_content_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) { Eina_List *list; @@ -690,14 +690,14 @@ _efl_ui_grid_efl_pack_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) } EOLIAN static int -_efl_ui_grid_efl_pack_contents_count(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd) +_efl_ui_grid_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd) { return pd->count; } EOLIAN static Eina_Iterator * -_efl_ui_grid_efl_pack_grid_grid_contents_at(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, - int col, int row, Eina_Bool below) +_efl_ui_grid_efl_pack_grid_grid_content_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, + int col, int row, Eina_Bool below) { Eina_List *list, *atlist = NULL; Evas_Object *sobj; diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo index afa0e6bac9..a6ee16a074 100644 --- a/src/lib/elementary/efl_ui_grid.eo +++ b/src/lib/elementary/efl_ui_grid.eo @@ -17,8 +17,8 @@ class Efl.Ui.Grid (Elm.Widget, Efl.Pack_Grid, Efl.Pack_Layout) Elm.Widget.theme_apply; // Packing interface - Efl.Pack.contents_get; - Efl.Pack.contents_count; + Efl.Container.content_iterate; + Efl.Container.content_count; Efl.Pack.pack_clear; Efl.Pack.unpack_all; Efl.Pack.unpack; @@ -26,8 +26,8 @@ class Efl.Ui.Grid (Elm.Widget, Efl.Pack_Grid, Efl.Pack_Layout) Efl.Pack.pack_padding.get; Efl.Pack.pack_padding.set; Efl.Pack_Grid.pack_grid; - Efl.Pack_Grid.grid_contents_at; Efl.Pack_Grid.grid_content_at; + Efl.Pack_Grid.grid_content_iterate; Efl.Pack_Grid.grid_content_position.set; Efl.Pack_Grid.grid_content_position.get; Efl.Pack_Grid.grid_size.set; diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c index 0a4e370f07..3f725c1d36 100644 --- a/src/lib/elementary/elc_ctxpopup.c +++ b/src/lib/elementary/elc_ctxpopup.c @@ -773,13 +773,13 @@ _elm_ctxpopup_elm_widget_theme_apply(Eo *obj, Elm_Ctxpopup_Data *sd) /* kind of a big and tricky override here: an internal box will hold * the actual content. content aliases won't be of much help here */ EOLIAN static Eina_Bool -_elm_ctxpopup_elm_container_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part, Evas_Object *content) +_elm_ctxpopup_efl_container_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part, Evas_Object *content) { Eina_Bool int_ret = EINA_TRUE; if ((part) && (strcmp(part, "default"))) { - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); return int_ret; } @@ -807,13 +807,13 @@ _elm_ctxpopup_elm_container_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const ch } EOLIAN static Evas_Object* -_elm_ctxpopup_elm_container_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part) +_elm_ctxpopup_efl_container_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part) { if ((part) && (strcmp(part, "default"))) { Evas_Object *ret = NULL; - ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), part); + ret = efl_content_get(eo_super(obj, MY_CLASS), part); return ret; } @@ -821,13 +821,13 @@ _elm_ctxpopup_elm_container_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const ch } EOLIAN static Evas_Object* -_elm_ctxpopup_elm_container_content_unset(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part) +_elm_ctxpopup_efl_container_content_unset(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part) { Evas_Object *content = NULL; if ((part) && (strcmp(part, "default"))) { - content = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), part); + content = efl_content_unset(eo_super(obj, MY_CLASS), part); return content; } @@ -1131,7 +1131,7 @@ _elm_ctxpopup_evas_object_smart_add(Eo *obj, Elm_Ctxpopup_Data *priv) (priv->box, EVAS_CALLBACK_RESIZE, _on_content_resized, obj); /* box will be our content placeholder, thus the parent's version call */ - elm_obj_container_content_set(eo_super(obj, MY_CLASS), "elm.swallow.content", priv->box); + efl_content_set(eo_super(obj, MY_CLASS), "elm.swallow.content", priv->box); evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL); evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _on_hide, NULL); diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c index 6296d35503..5792a474c9 100644 --- a/src/lib/elementary/elc_fileselector_entry.c +++ b/src/lib/elementary/elc_fileselector_entry.c @@ -233,12 +233,12 @@ _elm_fileselector_entry_elm_layout_text_get(Eo *obj, Elm_Fileselector_Entry_Data } EOLIAN static Eina_Bool -_elm_fileselector_entry_elm_container_content_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, Evas_Object *content) +_elm_fileselector_entry_efl_container_content_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, Evas_Object *content) { if (part && strcmp(part, "button icon")) { Eina_Bool int_ret = EINA_FALSE; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); return int_ret; } @@ -248,12 +248,12 @@ _elm_fileselector_entry_elm_container_content_set(Eo *obj, Elm_Fileselector_Entr } EOLIAN static Evas_Object * -_elm_fileselector_entry_elm_container_content_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part) +_elm_fileselector_entry_efl_container_content_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part) { if (part && strcmp(part, "button icon")) { Evas_Object *ret = NULL; - ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), part); + ret = efl_content_get(eo_super(obj, MY_CLASS), part); return ret; } @@ -261,12 +261,12 @@ _elm_fileselector_entry_elm_container_content_get(Eo *obj, Elm_Fileselector_Entr } EOLIAN static Evas_Object * -_elm_fileselector_entry_elm_container_content_unset(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part) +_elm_fileselector_entry_efl_container_content_unset(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part) { if (part && strcmp(part, "button icon")) { Evas_Object *ret = NULL; - ret = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), part); + ret = efl_content_unset(eo_super(obj, MY_CLASS), part); return ret; } diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c index bb22c75f69..2f506bf363 100644 --- a/src/lib/elementary/elc_naviframe.c +++ b/src/lib/elementary/elc_naviframe.c @@ -1044,7 +1044,7 @@ _elm_naviframe_elm_layout_text_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, /* we have to keep a "manual" set here because of the callbacks on the * children */ EOLIAN static Eina_Bool -_elm_naviframe_elm_container_content_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part, Evas_Object *content) +_elm_naviframe_efl_container_content_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part, Evas_Object *content) { Elm_Object_Item *it; @@ -1060,7 +1060,7 @@ _elm_naviframe_elm_container_content_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UN } EOLIAN static Evas_Object* -_elm_naviframe_elm_container_content_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part) +_elm_naviframe_efl_container_content_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part) { Elm_Object_Item *it = elm_naviframe_top_item_get(obj); @@ -1070,7 +1070,7 @@ _elm_naviframe_elm_container_content_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UN } EOLIAN static Evas_Object* -_elm_naviframe_elm_container_content_unset(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part) +_elm_naviframe_efl_container_content_unset(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part) { Elm_Object_Item *it = elm_naviframe_top_item_get(obj); diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c index 7c1e2a7cbd..5c2cf73a99 100644 --- a/src/lib/elementary/elc_player.c +++ b/src/lib/elementary/elc_player.c @@ -577,7 +577,7 @@ _str_free(char *data) * layout */ EOLIAN static Eina_Bool -_elm_player_elm_container_content_set(Eo *obj, Elm_Player_Data *sd, const char *part, Evas_Object *content) +_elm_player_efl_container_content_set(Eo *obj, Elm_Player_Data *sd, const char *part, Evas_Object *content) { Eina_Bool int_ret = EINA_FALSE; double pos, length; @@ -585,11 +585,11 @@ _elm_player_elm_container_content_set(Eo *obj, Elm_Player_Data *sd, const char * if (part && strcmp(part, "video")) { - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); return int_ret; } if ((!part) || (!strcmp(part, "video"))) part = "elm.swallow.content"; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); if (!_elm_video_check(content)) return EINA_FALSE; if (sd->video == content) goto end; diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c index 212ac74872..22777f0c13 100644 --- a/src/lib/elementary/elc_popup.c +++ b/src/lib/elementary/elc_popup.c @@ -525,7 +525,7 @@ _elm_popup_elm_widget_sub_object_del(Eo *obj, Elm_Popup_Data *sd, Evas_Object *s { if (sobj == it->icon) { - elm_obj_container_content_unset(VIEW(it), CONTENT_PART); + efl_content_unset(VIEW(it), CONTENT_PART); elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,hidden", "elm"); it->icon = NULL; @@ -670,8 +670,8 @@ _create_scroller(Evas_Object *obj) _on_table_del, obj); if (!sd->scroll) { - elm_obj_container_content_set(sd->content_area, CONTENT_PART, sd->tbl); - elm_obj_container_content_set(sd->main_layout, CONTENT_PART, sd->content_area); + efl_content_set(sd->content_area, CONTENT_PART, sd->tbl); + efl_content_set(sd->main_layout, CONTENT_PART, sd->content_area); } //spacer @@ -787,7 +787,7 @@ _item_icon_set(Elm_Popup_Item_Data *it, { elm_widget_sub_object_add(WIDGET(it), it->icon); evas_object_data_set(it->icon, "_popup_icon_parent_item", it); - elm_obj_container_content_set(VIEW(it), CONTENT_PART, it->icon); + efl_content_set(VIEW(it), CONTENT_PART, it->icon); elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,visible", "elm"); } else @@ -831,7 +831,7 @@ _item_icon_unset(Elm_Popup_Item_Data *it) if (!it->icon) return NULL; elm_widget_sub_object_del(WIDGET(it), icon); evas_object_data_del(icon, "_popup_icon_parent_item"); - elm_obj_container_content_unset(VIEW(it), CONTENT_PART); + efl_content_unset(VIEW(it), CONTENT_PART); elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,hidden", "elm"); it->icon = NULL; @@ -1003,7 +1003,7 @@ _content_text_set(Evas_Object *obj, else { if (!sd->scroll) - elm_obj_container_content_set(sd->main_layout, CONTENT_PART, sd->content_area); + efl_content_set(sd->main_layout, CONTENT_PART, sd->content_area); else elm_object_content_set(sd->scr, sd->content_area); } @@ -1011,7 +1011,7 @@ _content_text_set(Evas_Object *obj, if (sd->text_content_obj) { - sd->text_content_obj = elm_obj_container_content_unset(sd->content_area, CONTENT_PART); + sd->text_content_obj = efl_content_unset(sd->content_area, CONTENT_PART); evas_object_del(sd->text_content_obj); sd->text_content_obj = NULL; } @@ -1029,7 +1029,7 @@ _content_text_set(Evas_Object *obj, (sd->text_content_obj, EVAS_HINT_EXPAND, 0.0); evas_object_size_hint_align_set (sd->text_content_obj, EVAS_HINT_FILL, EVAS_HINT_FILL); - elm_obj_container_content_set + efl_content_set (sd->content_area, CONTENT_PART, sd->text_content_obj); /* access */ @@ -1117,7 +1117,7 @@ _title_icon_set(Evas_Object *obj, sd->title_icon = icon; title_visibility_current = (sd->title_text) || (sd->title_icon); - elm_obj_container_content_set + efl_content_set (sd->main_layout, "elm.swallow.title.icon", sd->title_icon); if (sd->title_icon) @@ -1144,12 +1144,12 @@ _content_set(Evas_Object *obj, if (content) { if (!sd->scroll) - elm_obj_container_content_set + efl_content_set (sd->main_layout, CONTENT_PART, sd->content_area); else elm_object_content_set(sd->scr, sd->content_area); - elm_obj_container_content_set + efl_content_set (sd->content_area, CONTENT_PART, content); evas_object_event_callback_add @@ -1206,7 +1206,7 @@ _action_button_set(Evas_Object *obj, evas_object_event_callback_add (sd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _size_hints_changed_cb, sd->main_layout); - elm_obj_container_content_set + efl_content_set (sd->main_layout, "elm.swallow.action_area", sd->action_area); _visuals_set(obj); @@ -1222,7 +1222,7 @@ _action_button_set(Evas_Object *obj, } EOLIAN static Eina_Bool -_elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) +_elm_popup_efl_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) { unsigned int i; Eina_Bool ret = EINA_TRUE; @@ -1244,7 +1244,7 @@ _elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c _action_button_set(obj, content, i); } else - ret = elm_obj_container_content_set(_pd->main_layout, part, content); + ret = efl_content_set(_pd->main_layout, part, content); elm_layout_sizing_eval(obj); @@ -1279,7 +1279,7 @@ _action_button_get(const Evas_Object *obj, } EOLIAN static Evas_Object* -_elm_popup_elm_container_content_get(Eo *obj, Elm_Popup_Data *_pd, const char *part) +_elm_popup_efl_container_content_get(Eo *obj, Elm_Popup_Data *_pd, const char *part) { Evas_Object *content = NULL; unsigned int i; @@ -1298,7 +1298,7 @@ _elm_popup_elm_container_content_get(Eo *obj, Elm_Popup_Data *_pd, const char *p content = _action_button_get(obj, i); } else - content = elm_obj_container_content_get(_pd->main_layout, part); + content = efl_content_get(_pd->main_layout, part); if (!content) goto err; @@ -1322,7 +1322,7 @@ _content_unset(Evas_Object *obj) evas_object_event_callback_del (sd->content, EVAS_CALLBACK_DEL, _on_content_del); - content = elm_obj_container_content_unset(sd->content_area, CONTENT_PART); + content = efl_content_unset(sd->content_area, CONTENT_PART); sd->content = NULL; elm_layout_sizing_eval(obj); @@ -1340,14 +1340,14 @@ _title_icon_unset(Evas_Object *obj) if (!sd->title_icon) return NULL; icon = sd->title_icon; - elm_obj_container_content_unset(sd->main_layout, "elm.swallow.title.icon"); + efl_content_unset(sd->main_layout, "elm.swallow.title.icon"); sd->title_icon = NULL; return icon; } EOLIAN static Evas_Object* -_elm_popup_elm_container_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part) +_elm_popup_efl_container_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part) { Evas_Object *content = NULL; unsigned int i; @@ -1402,7 +1402,7 @@ _elm_popup_elm_widget_focus_next(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, Elm_Fo if (ao) items = eina_list_append(items, ao); } - base_it = elm_obj_container_content_objects_iterate(sd->main_layout); + base_it = efl_content_iterate(sd->main_layout); EINA_ITERATOR_FOREACH(base_it, ao) if (ao) items = eina_list_append(items, ao); eina_iterator_free(base_it); @@ -1440,7 +1440,7 @@ _elm_popup_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Popup_Data *sd, c if (ao) items = eina_list_append(items, ao); } - base_it = elm_obj_container_content_objects_iterate(sd->main_layout); + base_it = efl_content_iterate(sd->main_layout); EINA_ITERATOR_FOREACH(base_it, ao) if (ao) items = eina_list_append(items, ao); eina_iterator_free(base_it); @@ -1785,7 +1785,7 @@ _elm_popup_item_append(Eo *obj, Elm_Popup_Data *sd, const char *label, Evas_Obje if (sd->content || sd->text_content_obj) { prev_content = - elm_obj_container_content_get(sd->content_area, CONTENT_PART); + efl_content_get(sd->content_area, CONTENT_PART); evas_object_del(prev_content); } @@ -1826,14 +1826,14 @@ _elm_popup_scrollable_set(Eo *obj, Elm_Popup_Data *pd, Eina_Bool scroll) if (!pd->scroll) { - elm_obj_container_content_set(pd->content_area, CONTENT_PART, pd->tbl); - elm_obj_container_content_set(pd->main_layout, CONTENT_PART, pd->content_area); + efl_content_set(pd->content_area, CONTENT_PART, pd->tbl); + efl_content_set(pd->main_layout, CONTENT_PART, pd->content_area); if (pd->theme_scroll) elm_layout_signal_emit(pd->content_area, "elm,scroll,disable", "elm"); } else { - elm_obj_container_content_set(pd->main_layout, CONTENT_PART, pd->tbl); + efl_content_set(pd->main_layout, CONTENT_PART, pd->tbl); if (pd->theme_scroll) elm_layout_signal_emit(pd->content_area, "elm,scroll,enable", "elm"); } diff --git a/src/lib/elementary/elm_button.c b/src/lib/elementary/elm_button.c index 9de31b7448..1fb5b19efc 100644 --- a/src/lib/elementary/elm_button.c +++ b/src/lib/elementary/elm_button.c @@ -148,11 +148,11 @@ _elm_button_elm_widget_sub_object_del(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED, * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we * can changed the theme API */ EOLIAN static Eina_Bool -_elm_button_elm_container_content_set(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) +_elm_button_efl_container_content_set(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) { Eina_Bool int_ret = EINA_FALSE; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); if (!int_ret) return EINA_FALSE; _icon_signal_emit(obj); diff --git a/src/lib/elementary/elm_button.eo b/src/lib/elementary/elm_button.eo index 2c536396c8..5ee7dd1668 100644 --- a/src/lib/elementary/elm_button.eo +++ b/src/lib/elementary/elm_button.eo @@ -93,7 +93,7 @@ class Elm.Button (Elm.Layout, Evas.Clickable_Interface, Elm.Widget.theme_apply; Elm.Widget.sub_object_del; Elm.Widget.event; - Elm.Container.content.set; + Efl.Container.content.set; Elm.Layout.text_aliases.get; Elm.Layout.content_aliases.get; Elm.Layout.sizing_eval; diff --git a/src/lib/elementary/elm_container.c b/src/lib/elementary/elm_container.c deleted file mode 100644 index ef51efa296..0000000000 --- a/src/lib/elementary/elm_container.c +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef HAVE_CONFIG_H -# include "elementary_config.h" -#endif - -#include <Elementary.h> -#include "elm_priv.h" -#include "elm_widget_container.h" - -#define MY_CLASS ELM_CONTAINER_CLASS - -#define MY_CLASS_NAME "Elm_Container" - -#include "elm_container.eo.c" diff --git a/src/lib/elementary/elm_container.eo b/src/lib/elementary/elm_container.eo deleted file mode 100644 index 5ea444c2de..0000000000 --- a/src/lib/elementary/elm_container.eo +++ /dev/null @@ -1,45 +0,0 @@ -class Elm.Container (Elm.Widget) -{ - legacy_prefix: null; - eo_prefix: elm_obj_container; - data: null; - methods { - @property content { - [[Swallowed sub-object contained in this object.]] - set { - return: bool; - } - get {} - keys { - name: const(char)*; [[the part in which to swallow the object]] - } - values { - content: Evas.Object*; [[the object to swallow.]] - } - } - content_unset { - [[Unswallow the object in the given part of the container and return it.]] - params { - @in name: const(char)* @nullable; - } - return: Evas.Object *; - } - content_names_iterate { - [[Returns an iterator on all parts in this container that currently - hold a sub-object.]] - return: free(own(iterator<const(char)*> *), eina_iterator_free); - } - content_objects_iterate { - [[Returns an iterator on all swallowed objects in this container.]] - return: free(own(iterator<Evas.Object*> *), eina_iterator_free); - } - } - implements { - @virtual .content_unset; - @virtual .content.get; - @virtual .content.set; - @virtual .content_names_iterate; - @virtual .content_objects_iterate; - } - -} diff --git a/src/lib/elementary/elm_container.h b/src/lib/elementary/elm_container.h deleted file mode 100644 index d17409daae..0000000000 --- a/src/lib/elementary/elm_container.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifdef EFL_EO_API_SUPPORT -#include <elm_container.eo.h> -#endif -#ifndef EFL_NOLEGACY_API_SUPPORT -#include <elm_container.eo.legacy.h> -#endif diff --git a/src/lib/elementary/elm_ctxpopup.eo b/src/lib/elementary/elm_ctxpopup.eo index 41d5cff059..3cf82a6fd0 100644 --- a/src/lib/elementary/elm_ctxpopup.eo +++ b/src/lib/elementary/elm_ctxpopup.eo @@ -212,9 +212,9 @@ class Elm.Ctxpopup (Elm.Layout, Elm.Interface_Atspi_Widget_Action, Efl.Orientati Elm.Widget.translate; Elm.Widget.theme_apply; Elm.Widget.event; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; Elm.Layout.sub_object_add_enable; Elm.Layout.sizing_eval; Elm.Interface_Atspi_Widget_Action.elm_actions.get; diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c index 3f1b209105..052c4b3ef9 100644 --- a/src/lib/elementary/elm_dayselector.c +++ b/src/lib/elementary/elm_dayselector.c @@ -217,7 +217,7 @@ _item_find(const Evas_Object *obj, } EOLIAN static Eina_Bool -_elm_dayselector_elm_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item, Evas_Object *content) +_elm_dayselector_efl_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item, Evas_Object *content) { Eina_Bool int_ret = EINA_FALSE; @@ -239,7 +239,7 @@ _elm_dayselector_elm_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, co { snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it)); - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), buf, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), buf, content); if (!int_ret) return EINA_FALSE; if (!content) return EINA_TRUE; /* item deletion already handled */ @@ -255,7 +255,7 @@ _elm_dayselector_elm_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, co snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it)); - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), buf, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), buf, content); if (!int_ret) { eo_del(eo_it); @@ -299,7 +299,7 @@ _elm_dayselector_item_eo_base_constructor(Eo *eo_item, Elm_Dayselector_Item_Data } EOLIAN static Evas_Object* -_elm_dayselector_elm_container_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *item) +_elm_dayselector_efl_container_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *item) { int day; char buf[1024]; @@ -314,7 +314,7 @@ _elm_dayselector_elm_container_content_unset(Eo *obj, Elm_Dayselector_Data *sd, content = VIEW(it); - content = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), buf); + content = efl_content_unset(eo_super(obj, MY_CLASS), buf); if (!content) return NULL; sd->items = eina_list_remove(sd->items, it); diff --git a/src/lib/elementary/elm_dayselector.eo b/src/lib/elementary/elm_dayselector.eo index 2bb045c853..4704c7699c 100644 --- a/src/lib/elementary/elm_dayselector.eo +++ b/src/lib/elementary/elm_dayselector.eo @@ -153,8 +153,8 @@ class Elm.Dayselector (Elm.Layout) Elm.Widget.theme_apply; Elm.Widget.focus_direction_manager_is; Elm.Widget.translate; - Elm.Container.content_unset; - Elm.Container.content.set; + Efl.Container.content_unset; + Efl.Container.content.set; Elm.Layout.sizing_eval; } events { diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index a081fc45cc..b8c2cdccff 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -2993,10 +2993,10 @@ _elm_entry_elm_layout_signal_callback_del(Eo *obj, Elm_Entry_Data *sd, const cha } EOLIAN static Eina_Bool -_elm_entry_elm_container_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) +_elm_entry_efl_container_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) { Eina_Bool int_ret = EINA_FALSE; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); if (!int_ret) return EINA_FALSE; /* too bad entry does not follow the pattern @@ -3011,10 +3011,10 @@ _elm_entry_elm_container_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, c } EOLIAN static Evas_Object* -_elm_entry_elm_container_content_unset(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part) +_elm_entry_efl_container_content_unset(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part) { Evas_Object *ret = NULL; - ret = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), part); + ret = efl_content_unset(eo_super(obj, MY_CLASS), part); if (!ret) return NULL; /* too bad entry does not follow the pattern diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo index 1703e0fb67..aff72aa238 100644 --- a/src/lib/elementary/elm_entry.eo +++ b/src/lib/elementary/elm_entry.eo @@ -937,8 +937,8 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface, Elm.Widget.disable; Elm.Widget.sub_object_del; Elm.Widget.focus_next_manager_is; - Elm.Container.content_unset; - Elm.Container.content.set; + Efl.Container.content_unset; + Efl.Container.content.set; Elm.Layout.theme_enable; Elm.Layout.sizing_eval; Elm.Layout.text.get; diff --git a/src/lib/elementary/elm_fileselector_entry.eo b/src/lib/elementary/elm_fileselector_entry.eo index 4585de21dd..c96aa48a76 100644 --- a/src/lib/elementary/elm_fileselector_entry.eo +++ b/src/lib/elementary/elm_fileselector_entry.eo @@ -90,9 +90,9 @@ class Elm.Fileselector_Entry (Elm.Layout, Elm.Interface_Fileselector, Elm.Widget.focus_next; Elm.Widget.disable; Elm.Widget.focus_direction_manager_is; - Elm.Container.content.get; - Elm.Container.content_unset; - Elm.Container.content.set; + Efl.Container.content.get; + Efl.Container.content_unset; + Efl.Container.content.set; Elm.Layout.text.set; Elm.Layout.text.get; Elm.Layout.sizing_eval; diff --git a/src/lib/elementary/elm_flip.c b/src/lib/elementary/elm_flip.c index 89456902b8..ac1e11ff69 100644 --- a/src/lib/elementary/elm_flip.c +++ b/src/lib/elementary/elm_flip.c @@ -1771,7 +1771,7 @@ _flip_content_unset(Evas_Object *obj, } EOLIAN static Eina_Bool -_elm_flip_elm_container_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) +_elm_flip_efl_container_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) { if (!part || !strcmp(part, "front")) return _flip_content_set(obj, content, EINA_TRUE); @@ -1781,7 +1781,7 @@ _elm_flip_elm_container_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, con } EOLIAN static Evas_Object* -_elm_flip_elm_container_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, const char *part) +_elm_flip_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, const char *part) { if (!part || !strcmp(part, "front")) return sd->front.content; @@ -1791,7 +1791,7 @@ _elm_flip_elm_container_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, cons } EOLIAN static Evas_Object* -_elm_flip_elm_container_content_unset(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED, const char *part) +_elm_flip_efl_container_content_unset(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED, const char *part) { if (!part || !strcmp(part, "front")) return _flip_content_unset(obj, EINA_TRUE); diff --git a/src/lib/elementary/elm_flip.eo b/src/lib/elementary/elm_flip.eo index 39c6d0f0d8..29c9107382 100644 --- a/src/lib/elementary/elm_flip.eo +++ b/src/lib/elementary/elm_flip.eo @@ -33,7 +33,7 @@ enum Elm.Flip.Direction right [[Allows interaction with the right portion of the widget]] } -class Elm.Flip (Elm.Container) +class Elm.Flip (Elm.Widget, Efl.Container) { eo_prefix: elm_obj_flip; methods { @@ -238,9 +238,9 @@ class Elm.Flip (Elm.Container) Elm.Widget.focus_next_manager_is; Elm.Widget.focus_next; Elm.Widget.sub_object_del; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; } events { animate,begin; diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c index 26e8d738b4..2c2e51c8eb 100644 --- a/src/lib/elementary/elm_hover.c +++ b/src/lib/elementary/elm_hover.c @@ -396,7 +396,7 @@ _elm_hover_subs_del(Elm_Hover_Data *sd) } EOLIAN static Eina_Bool -_elm_hover_elm_container_content_set(Eo *obj, Elm_Hover_Data *sd, const char *swallow, Evas_Object *content) +_elm_hover_efl_container_content_set(Eo *obj, Elm_Hover_Data *sd, const char *swallow, Evas_Object *content) { Eina_Bool int_ret; @@ -434,7 +434,7 @@ _elm_hover_elm_container_content_set(Eo *obj, Elm_Hover_Data *sd, const char *sw } } - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), swallow, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), swallow, content); if (!int_ret) return EINA_FALSE; if (strstr(swallow, "elm.swallow.slot.")) @@ -455,7 +455,7 @@ end: } EOLIAN static Evas_Object* -_elm_hover_elm_container_content_get(Eo *obj, Elm_Hover_Data *sd, const char *swallow) +_elm_hover_efl_container_content_get(Eo *obj, Elm_Hover_Data *sd, const char *swallow) { Evas_Object *ret; ret = NULL; @@ -463,25 +463,25 @@ _elm_hover_elm_container_content_get(Eo *obj, Elm_Hover_Data *sd, const char *sw if (!swallow) return ret; if (!strcmp(swallow, "smart")) - ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), sd->smt_sub->swallow); + ret = efl_content_get(eo_super(obj, MY_CLASS), sd->smt_sub->swallow); else - ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), swallow); + ret = efl_content_get(eo_super(obj, MY_CLASS), swallow); return ret; } EOLIAN static Evas_Object* -_elm_hover_elm_container_content_unset(Eo *obj, Elm_Hover_Data *sd, const char *swallow) +_elm_hover_efl_container_content_unset(Eo *obj, Elm_Hover_Data *sd, const char *swallow) { Evas_Object *ret = NULL; if (!swallow) return NULL; if (!strcmp(swallow, "smart")) - ret = elm_obj_container_content_unset + ret = efl_content_unset (eo_super(obj, MY_CLASS), sd->smt_sub->swallow); else - ret = elm_obj_container_content_unset + ret = efl_content_unset (eo_super(obj, MY_CLASS), swallow); return ret; } diff --git a/src/lib/elementary/elm_hover.eo b/src/lib/elementary/elm_hover.eo index 2959366bec..2f6ca0d944 100644 --- a/src/lib/elementary/elm_hover.eo +++ b/src/lib/elementary/elm_hover.eo @@ -70,9 +70,9 @@ class Elm.Hover (Elm.Layout, Evas.Clickable_Interface, Elm.Interface_Atspi_Widge Elm.Widget.focus_direction_manager_is; Elm.Widget.focus_next_manager_is; Elm.Widget.sub_object_del; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; Elm.Layout.sizing_eval; Elm.Layout.content_aliases.get; Elm.Interface_Atspi_Widget_Action.elm_actions.get; diff --git a/src/lib/elementary/elm_inwin.c b/src/lib/elementary/elm_inwin.c index 6f1171c98a..b8eb25e0d6 100644 --- a/src/lib/elementary/elm_inwin.c +++ b/src/lib/elementary/elm_inwin.c @@ -140,7 +140,7 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) { ELM_INWIN_CHECK(obj); - elm_obj_container_content_set(obj, NULL, content); + efl_content_set(obj, NULL, content); } EAPI Evas_Object * @@ -148,7 +148,7 @@ elm_win_inwin_content_get(const Evas_Object *obj) { ELM_INWIN_CHECK(obj) NULL; Evas_Object *ret = NULL; - ret = elm_obj_container_content_get((Eo *)obj, NULL); + ret = efl_content_get((Eo *)obj, NULL); return ret; } @@ -157,7 +157,7 @@ elm_win_inwin_content_unset(Evas_Object *obj) { ELM_INWIN_CHECK(obj) NULL; Evas_Object *ret = NULL; - ret = elm_obj_container_content_unset(obj, NULL); + ret = efl_content_unset(obj, NULL); return ret; } diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c index 2995a32db4..7c3763cce1 100644 --- a/src/lib/elementary/elm_layout.c +++ b/src/lib/elementary/elm_layout.c @@ -973,12 +973,12 @@ elm_layout_content_set(Evas_Object *obj, { ELM_LAYOUT_CHECK(obj) EINA_FALSE; Eina_Bool ret = EINA_FALSE; - ret = elm_obj_container_content_set(obj, swallow, content); + ret = efl_content_set(obj, swallow, content); return ret; } EOLIAN static Eina_Bool -_elm_layout_elm_container_content_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *content) +_elm_layout_efl_container_content_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *content) { Elm_Layout_Sub_Object_Data *sub_d; const Eina_List *l; @@ -1051,12 +1051,12 @@ elm_layout_content_get(const Evas_Object *obj, { ELM_LAYOUT_CHECK(obj) NULL; Evas_Object *ret = NULL; - ret = elm_obj_container_content_get((Eo *) obj, swallow); + ret = efl_content_get((Eo *) obj, swallow); return ret; } EOLIAN static Evas_Object* -_elm_layout_elm_container_content_get(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part) +_elm_layout_efl_container_content_get(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part) { const Eina_List *l; Elm_Layout_Sub_Object_Data *sub_d; @@ -1078,12 +1078,12 @@ elm_layout_content_unset(Evas_Object *obj, { ELM_LAYOUT_CHECK(obj) NULL; Evas_Object *ret = NULL; - ret = elm_obj_container_content_unset(obj, swallow); + ret = efl_content_unset(obj, swallow); return ret; } EOLIAN static Evas_Object* -_elm_layout_elm_container_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part) +_elm_layout_efl_container_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part) { Elm_Layout_Sub_Object_Data *sub_d; const Eina_List *l; @@ -1140,19 +1140,7 @@ elm_layout_content_swallow_list_get(const Evas_Object *obj) } static Eina_Bool -_names_iterator_next(Elm_Layout_Sub_Iterator *it, void **data) -{ - Elm_Layout_Sub_Object_Data *sub; - - if (!eina_iterator_next(it->real_iterator, (void **)&sub)) - return EINA_FALSE; - - if (data) *data = (void*) sub->part; - return EINA_TRUE; -} - -static Eina_Bool -_objects_iterator_next(Elm_Layout_Sub_Iterator *it, void **data) +_sub_iterator_next(Elm_Layout_Sub_Iterator *it, void **data) { Elm_Layout_Sub_Object_Data *sub; @@ -1177,7 +1165,7 @@ _sub_iterator_free(Elm_Layout_Sub_Iterator *it) } static Eina_Iterator * -_sub_iterator_create(Eo *eo_obj, Elm_Layout_Smart_Data *sd, Eina_Bool objects) +_sub_iterator_create(Eo *eo_obj, Elm_Layout_Smart_Data *sd) { Elm_Layout_Sub_Iterator *it; @@ -1188,28 +1176,42 @@ _sub_iterator_create(Eo *eo_obj, Elm_Layout_Smart_Data *sd, Eina_Bool objects) it->real_iterator = eina_list_iterator_new(sd->subs); it->iterator.version = EINA_ITERATOR_VERSION; + it->iterator.next = FUNC_ITERATOR_NEXT(_sub_iterator_next); it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_sub_iterator_get_container); it->iterator.free = FUNC_ITERATOR_FREE(_sub_iterator_free); - - if (objects) - it->iterator.next = FUNC_ITERATOR_NEXT(_objects_iterator_next); - else - it->iterator.next = FUNC_ITERATOR_NEXT(_names_iterator_next); it->object = eo_obj; return &it->iterator; } EOLIAN static Eina_Iterator * -_elm_layout_elm_container_content_names_iterate(Eo *eo_obj, Elm_Layout_Smart_Data *sd) +_elm_layout_efl_container_content_iterate(Eo *eo_obj EINA_UNUSED, Elm_Layout_Smart_Data *sd) { - return _sub_iterator_create(eo_obj, sd, EINA_FALSE); + return _sub_iterator_create(eo_obj, sd); } -EOLIAN static Eina_Iterator * -_elm_layout_elm_container_content_objects_iterate(Eo *eo_obj, Elm_Layout_Smart_Data *sd) +EOLIAN static const char * +_elm_layout_efl_container_content_part_name_get(Eo *eo_obj EINA_UNUSED, + Elm_Layout_Smart_Data *sd, + Efl_Gfx_Base *content) +{ + Elm_Layout_Sub_Object_Data *sub; + Eina_List *l; + + EINA_LIST_FOREACH(sd->subs, l, sub) + if (sub->type == SWALLOW) + { + if (sub->obj == content) + return sub->part; + } + + return NULL; +} + +EOLIAN static int +_elm_layout_efl_container_content_count(Eo *eo_obj EINA_UNUSED, Elm_Layout_Smart_Data *sd) { - return _sub_iterator_create(eo_obj, sd, EINA_TRUE); + return eina_list_count(sd->subs); } EOLIAN static Eina_Bool diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo index f769f47fcf..a9904b84d3 100644 --- a/src/lib/elementary/elm_layout.eo +++ b/src/lib/elementary/elm_layout.eo @@ -17,7 +17,7 @@ struct Elm.Layout_Part_Alias_Description real_part: const(char)*; [[Target part name for the alias set on Elm.Layout_Part_Proxies_Description::real_part. An example of usage would be "default" on that field, with "elm.content.swallow" on this one]] } -class Elm.Layout (Elm.Container, Efl.File) +class Elm.Layout (Elm.Widget, Efl.Container, Efl.File) { eo_prefix: elm_obj_layout; data: Elm_Layout_Smart_Data; @@ -489,11 +489,12 @@ class Elm.Layout (Elm.Container, Efl.File) Elm.Widget.disable; Elm.Widget.sub_object_del; Elm.Widget.on_focus; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; - Elm.Container.content_names_iterate; - Elm.Container.content_objects_iterate; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; + Efl.Container.content_part_name.get; + Efl.Container.content_count; + Efl.Container.content_iterate; } events { theme,changed; diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c index b06dd3f2db..7049dd0a32 100644 --- a/src/lib/elementary/elm_mapbuf.c +++ b/src/lib/elementary/elm_mapbuf.c @@ -190,7 +190,7 @@ _elm_mapbuf_evas_object_smart_hide(Eo *obj, Elm_Mapbuf_Data *sd) } EOLIAN static Eina_Bool -_elm_mapbuf_elm_container_content_set(Eo *obj, Elm_Mapbuf_Data *sd, const char *part, Evas_Object *content) +_elm_mapbuf_efl_container_content_set(Eo *obj, Elm_Mapbuf_Data *sd, const char *part, Evas_Object *content) { ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); @@ -222,14 +222,14 @@ _elm_mapbuf_elm_container_content_set(Eo *obj, Elm_Mapbuf_Data *sd, const char * } EOLIAN static Evas_Object* -_elm_mapbuf_elm_container_content_get(Eo *obj EINA_UNUSED, Elm_Mapbuf_Data *sd, const char *part) +_elm_mapbuf_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Mapbuf_Data *sd, const char *part) { if (part && strcmp(part, "default")) return NULL; return sd->content; } EOLIAN static Evas_Object* -_elm_mapbuf_elm_container_content_unset(Eo *obj, Elm_Mapbuf_Data *sd, const char *part) +_elm_mapbuf_efl_container_content_unset(Eo *obj, Elm_Mapbuf_Data *sd, const char *part) { Evas_Object *content; if (part && strcmp(part, "default")) return NULL; diff --git a/src/lib/elementary/elm_mapbuf.eo b/src/lib/elementary/elm_mapbuf.eo index fcd048d4e2..3aa5f57b4b 100644 --- a/src/lib/elementary/elm_mapbuf.eo +++ b/src/lib/elementary/elm_mapbuf.eo @@ -1,4 +1,4 @@ -class Elm.Mapbuf (Elm.Container) +class Elm.Mapbuf (Elm.Widget, Efl.Container) { eo_prefix: elm_obj_mapbuf; methods { @@ -136,9 +136,9 @@ class Elm.Mapbuf (Elm.Container) Evas.Object_Smart.resize; Elm.Widget.theme_apply; Elm.Widget.sub_object_del; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; } } diff --git a/src/lib/elementary/elm_naviframe.eo b/src/lib/elementary/elm_naviframe.eo index fd11ed513c..5e499552cf 100644 --- a/src/lib/elementary/elm_naviframe.eo +++ b/src/lib/elementary/elm_naviframe.eo @@ -151,9 +151,9 @@ class Elm.Naviframe (Elm.Layout, Elm.Interface_Atspi_Widget_Action) Elm.Widget.translate; Elm.Widget.theme_apply; Elm.Widget.event; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; Elm.Layout.text.set; Elm.Layout.text.get; Elm.Layout.signal_emit; diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c index 2504e58b97..5314210124 100644 --- a/src/lib/elementary/elm_notify.c +++ b/src/lib/elementary/elm_notify.c @@ -371,7 +371,7 @@ _elm_notify_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, } EOLIAN static Eina_Bool -_elm_notify_elm_container_content_set(Eo *obj, Elm_Notify_Data *sd, const char *part, Evas_Object *content) +_elm_notify_efl_container_content_set(Eo *obj, Elm_Notify_Data *sd, const char *part, Evas_Object *content) { if (part && strcmp(part, "default")) return EINA_FALSE; if (sd->content == content) return EINA_TRUE; @@ -394,7 +394,7 @@ _elm_notify_elm_container_content_set(Eo *obj, Elm_Notify_Data *sd, const char * } EOLIAN static Evas_Object* -_elm_notify_elm_container_content_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, const char *part) +_elm_notify_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, const char *part) { if (part && strcmp(part, "default")) return NULL; @@ -402,7 +402,7 @@ _elm_notify_elm_container_content_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, } EOLIAN static Evas_Object* -_elm_notify_elm_container_content_unset(Eo *obj, Elm_Notify_Data *sd, const char *part) +_elm_notify_efl_container_content_unset(Eo *obj, Elm_Notify_Data *sd, const char *part) { Evas_Object *content; diff --git a/src/lib/elementary/elm_notify.eo b/src/lib/elementary/elm_notify.eo index 4530063ce1..37e75eae8b 100644 --- a/src/lib/elementary/elm_notify.eo +++ b/src/lib/elementary/elm_notify.eo @@ -1,4 +1,4 @@ -class Elm.Notify (Elm.Container) +class Elm.Notify (Elm.Widget, Efl.Container) { eo_prefix: elm_obj_notify; methods { @@ -92,9 +92,9 @@ class Elm.Notify (Elm.Container) Elm.Widget.sub_object_del; Elm.Widget.part_text.set; Elm.Widget.part_text.get; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; } events { block,clicked; diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c index 692649a30d..5d81e03996 100644 --- a/src/lib/elementary/elm_panel.c +++ b/src/lib/elementary/elm_panel.c @@ -247,7 +247,7 @@ _elm_panel_elm_widget_theme_apply(Eo *obj, Elm_Panel_Data *sd) if (edje_object_part_exists (wd->resize_obj, "elm.swallow.event")) - elm_obj_container_content_set(eo_super(obj, MY_CLASS), "elm.swallow.event", sd->event); + efl_content_set(eo_super(obj, MY_CLASS), "elm.swallow.event", sd->event); } elm_layout_sizing_eval(obj); @@ -910,7 +910,7 @@ _elm_panel_elm_widget_event(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED, Evas_Objec } EOLIAN static Eina_Bool -_elm_panel_elm_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *part, Evas_Object *content) +_elm_panel_efl_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *part, Evas_Object *content) { if (part) { @@ -923,7 +923,7 @@ _elm_panel_elm_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa if (strcmp(part, "default")) { Eina_Bool int_ret = EINA_TRUE; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); return int_ret; } } @@ -946,7 +946,7 @@ _elm_panel_elm_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa } EOLIAN static Evas_Object* -_elm_panel_elm_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *part) +_elm_panel_efl_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *part) { if (part) { @@ -959,7 +959,7 @@ _elm_panel_elm_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *pa if (strcmp(part, "default")) { Evas_Object *ret = NULL; - ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), part); + ret = efl_content_get(eo_super(obj, MY_CLASS), part); return ret; } } @@ -968,7 +968,7 @@ _elm_panel_elm_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *pa } EOLIAN static Evas_Object* -_elm_panel_elm_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char *part) +_elm_panel_efl_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char *part) { Evas_Object *ret = NULL; @@ -982,7 +982,7 @@ _elm_panel_elm_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char * } if (strcmp(part, "default")) { - ret = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), part); + ret = efl_content_unset(eo_super(obj, MY_CLASS), part); return ret; } } @@ -1039,7 +1039,7 @@ _elm_panel_evas_object_smart_add(Eo *obj, Elm_Panel_Data *priv) elm_coords_finger_size_adjust(1, &minw, 1, &minh); evas_object_size_hint_min_set(priv->event, minw, minh); - elm_obj_container_content_set(eo_super(obj, MY_CLASS), "elm.swallow.event", priv->event); + efl_content_set(eo_super(obj, MY_CLASS), "elm.swallow.event", priv->event); } } diff --git a/src/lib/elementary/elm_panel.eo b/src/lib/elementary/elm_panel.eo index 79afea564d..664f4b70ba 100644 --- a/src/lib/elementary/elm_panel.eo +++ b/src/lib/elementary/elm_panel.eo @@ -79,9 +79,9 @@ class Elm.Panel (Elm.Layout, Elm.Interface_Scrollable, Elm.Widget.access; Elm.Widget.event; Elm.Widget.on_focus_region; - Elm.Container.content.get; - Elm.Container.content_unset; - Elm.Container.content.set; + Efl.Container.content.get; + Efl.Container.content_unset; + Efl.Container.content.set; Elm.Layout.sizing_eval; Elm.Interface_Atspi_Widget_Action.elm_actions.get; } diff --git a/src/lib/elementary/elm_player.eo b/src/lib/elementary/elm_player.eo index 10faef1d2a..3457ef67a0 100644 --- a/src/lib/elementary/elm_player.eo +++ b/src/lib/elementary/elm_player.eo @@ -8,7 +8,7 @@ class Elm.Player (Elm.Layout, Elm.Interface_Atspi_Widget_Action) Evas.Object_Smart.del; Elm.Widget.theme_apply; Elm.Widget.event; - Elm.Container.content.set; + Efl.Container.content.set; Elm.Layout.sizing_eval; Elm.Interface_Atspi_Widget_Action.elm_actions.get; } diff --git a/src/lib/elementary/elm_popup.eo b/src/lib/elementary/elm_popup.eo index c302e9ea34..a36772cec8 100644 --- a/src/lib/elementary/elm_popup.eo +++ b/src/lib/elementary/elm_popup.eo @@ -177,9 +177,9 @@ class Elm.Popup (Elm.Layout, Elm.Interface_Atspi_Widget_Action) Elm.Widget.translate; Elm.Widget.sub_object_del; Elm.Widget.event; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; Elm.Layout.text.set; Elm.Layout.text.get; Elm.Layout.sizing_eval; diff --git a/src/lib/elementary/elm_progressbar.c b/src/lib/elementary/elm_progressbar.c index 5e8bd4693b..dc1a6d92cb 100644 --- a/src/lib/elementary/elm_progressbar.c +++ b/src/lib/elementary/elm_progressbar.c @@ -174,10 +174,10 @@ _elm_progressbar_elm_widget_sub_object_del(Eo *obj, Elm_Progressbar_Data *_pd EI * spot is elm.swallow.content, not elm.swallow.icon. Fix that * whenever we can changed the theme API */ EOLIAN static Eina_Bool -_elm_progressbar_elm_container_content_set(Eo *obj, Elm_Progressbar_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) +_elm_progressbar_efl_container_content_set(Eo *obj, Elm_Progressbar_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) { Eina_Bool int_ret = EINA_FALSE; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); if (!int_ret) return EINA_FALSE; _icon_signal_emit(obj); diff --git a/src/lib/elementary/elm_progressbar.eo b/src/lib/elementary/elm_progressbar.eo index 1739b0ec3c..e2e1bc754a 100644 --- a/src/lib/elementary/elm_progressbar.eo +++ b/src/lib/elementary/elm_progressbar.eo @@ -61,7 +61,7 @@ class Elm.Progressbar (Elm.Layout, Efl.Ui.Progress, Elm.Widget.focus_next_manager_is; Elm.Widget.focus_direction_manager_is; Elm.Widget.sub_object_del; - Elm.Container.content.set; + Efl.Container.content.set; Elm.Layout.text_aliases.get; Elm.Layout.content_aliases.get; Elm.Layout.sizing_eval; diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c index 91fa2972c4..b3a8ada4dd 100644 --- a/src/lib/elementary/elm_scroller.c +++ b/src/lib/elementary/elm_scroller.c @@ -758,12 +758,12 @@ _loop_content_set(Evas_Object *obj, Elm_Scroller_Data *sd, Evas_Object *content) } EOLIAN static Eina_Bool -_elm_scroller_elm_container_content_set(Eo *obj, Elm_Scroller_Data *sd, const char *part, Evas_Object *content) +_elm_scroller_efl_container_content_set(Eo *obj, Elm_Scroller_Data *sd, const char *part, Evas_Object *content) { if (part && strcmp(part, "default")) { Eina_Bool int_ret = EINA_FALSE; - int_ret = elm_obj_container_content_set(eo_super(obj, MY_CLASS), part, content); + int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); return int_ret; } @@ -803,12 +803,12 @@ _elm_scroller_elm_container_content_set(Eo *obj, Elm_Scroller_Data *sd, const ch } EOLIAN static Evas_Object* -_elm_scroller_elm_container_content_get(Eo *obj, Elm_Scroller_Data *sd, const char *part) +_elm_scroller_efl_container_content_get(Eo *obj, Elm_Scroller_Data *sd, const char *part) { if (part && strcmp(part, "default")) { Evas_Object *ret = NULL; - ret = elm_obj_container_content_get(eo_super(obj, MY_CLASS), part); + ret = efl_content_get(eo_super(obj, MY_CLASS), part); return ret; } @@ -816,12 +816,12 @@ _elm_scroller_elm_container_content_get(Eo *obj, Elm_Scroller_Data *sd, const ch } EOLIAN static Evas_Object* -_elm_scroller_elm_container_content_unset(Eo *obj, Elm_Scroller_Data *sd, const char *part) +_elm_scroller_efl_container_content_unset(Eo *obj, Elm_Scroller_Data *sd, const char *part) { Evas_Object *ret = NULL; if (part && strcmp(part, "default")) { - ret = elm_obj_container_content_unset(eo_super(obj, MY_CLASS), part); + ret = efl_content_unset(eo_super(obj, MY_CLASS), part); return ret; } diff --git a/src/lib/elementary/elm_scroller.eo b/src/lib/elementary/elm_scroller.eo index 3fdf2edf7e..35adcac261 100644 --- a/src/lib/elementary/elm_scroller.eo +++ b/src/lib/elementary/elm_scroller.eo @@ -70,9 +70,9 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable, Elm.Widget.focus_direction; Elm.Widget.sub_object_del; Elm.Widget.event; - Elm.Container.content.get; - Elm.Container.content.set; - Elm.Container.content_unset; + Efl.Container.content.get; + Efl.Container.content.set; + Efl.Container.content_unset; Elm.Layout.sizing_eval; Elm.Interface_Scrollable.page_size.set; Elm.Interface_Scrollable.policy.set; diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c index d118287358..d9c98da277 100644 --- a/src/lib/elementary/elm_toolbar.c +++ b/src/lib/elementary/elm_toolbar.c @@ -1714,7 +1714,7 @@ _elm_toolbar_item_elm_widget_item_part_content_set(Eo *eo_item EINA_UNUSED, Elm_ if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object")) { - elm_obj_container_content_set(VIEW(item), part, content); + efl_content_set(VIEW(item), part, content); return; } if (item->object == content) return; @@ -1737,7 +1737,7 @@ _elm_toolbar_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_To if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object")) { - content = elm_obj_container_content_get(VIEW(it), part); + content = efl_content_get(VIEW(it), part); if (content) return content; else return NULL; } @@ -1756,7 +1756,7 @@ _elm_toolbar_item_elm_widget_item_part_content_unset(Eo *eo_item EINA_UNUSED, El if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object")) { - o = elm_obj_container_content_unset(VIEW(item), part); + o = efl_content_unset(VIEW(item), part); return o; } diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c index 354ca38d7d..662a804d40 100644 --- a/src/lib/elementary/elm_widget.c +++ b/src/lib/elementary/elm_widget.c @@ -3657,7 +3657,7 @@ elm_widget_content_part_set(Evas_Object *obj, Evas_Object *content) { ELM_WIDGET_CHECK(obj); - elm_obj_container_content_set(obj, part, content); + efl_content_set(obj, part, content); } EAPI Evas_Object * @@ -3666,7 +3666,7 @@ elm_widget_content_part_get(const Evas_Object *obj, { ELM_WIDGET_CHECK(obj) NULL; Evas_Object *ret = NULL; - ret = elm_obj_container_content_get((Eo *) obj, part); + ret = efl_content_get((Eo *) obj, part); return ret; } @@ -3676,7 +3676,7 @@ elm_widget_content_part_unset(Evas_Object *obj, { ELM_WIDGET_CHECK(obj) NULL; Evas_Object *ret = NULL; - ret = elm_obj_container_content_unset(obj, part); + ret = efl_content_unset(obj, part); return ret; } diff --git a/src/lib/elementary/elm_widget_container.h b/src/lib/elementary/elm_widget_container.h index f62095a504..995f67ed5c 100644 --- a/src/lib/elementary/elm_widget_container.h +++ b/src/lib/elementary/elm_widget_container.h @@ -36,8 +36,6 @@ * - elm_object_part_content_unset() */ -#include "elm_container.eo.h" - /** * @} */ diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c index e90390afa4..6a9e4a3bb2 100644 --- a/src/tests/elementary/elm_test_layout.c +++ b/src/tests/elementary/elm_test_layout.c @@ -38,17 +38,17 @@ START_TEST(elm_layout_swallows) evas_object_show(ly); bt = eo_add(ELM_BUTTON_CLASS, ly); - fail_if(!elm_obj_container_content_set(ly, "element1", bt)); + fail_if(!efl_content_set(ly, "element1", bt)); ck_assert_ptr_eq(eo_parent_get(bt), ly); - bt = elm_obj_container_content_unset(ly, "element1"); + bt = efl_content_unset(ly, "element1"); ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt)); - fail_if(!elm_obj_container_content_set(ly, "element1", bt)); + fail_if(!efl_content_set(ly, "element1", bt)); ck_assert_ptr_eq(eo_parent_get(bt), ly); bt2 = eo_add(ELM_BUTTON_CLASS, ly); - fail_if(!elm_obj_container_content_set(ly, "element1", bt2)); + fail_if(!efl_content_set(ly, "element1", bt2)); ck_assert_ptr_eq(eo_parent_get(bt2), ly); /* bt is deleted at this point. */ ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt)); |