aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-04-19 17:43:28 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-04-20 11:15:53 +0900
commit2d946d03ae58fbbd415c6e52c2d89cf8f017bf08 (patch)
tree84135cbdb76b161ad44fec333b870422207a6bb4 /src/lib/elementary
parentelm_text/box: Use real widgets to show off box layout (diff)
downloadefl-2d946d03ae58fbbd415c6e52c2d89cf8f017bf08.tar.gz
Efl.Pack: Rename methods and properties
- Children are now contents - Efl.Pack_Layout is now a separate class and merges Pack_Engine. - Removed dumb class Efl.Pack_Item - Updated docs - Added pack_ or grid_ prefixes to some methods
Diffstat (limited to 'src/lib/elementary')
-rw-r--r--src/lib/elementary/efl_ui_box.c184
-rw-r--r--src/lib/elementary/efl_ui_box.eo32
-rw-r--r--src/lib/elementary/efl_ui_box_flow.c2
-rw-r--r--src/lib/elementary/efl_ui_box_flow.eo4
-rw-r--r--src/lib/elementary/efl_ui_box_private.h2
-rw-r--r--src/lib/elementary/efl_ui_grid.c142
-rw-r--r--src/lib/elementary/efl_ui_grid.eo41
7 files changed, 250 insertions, 157 deletions
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c
index 79fb089972..d89ff204c6 100644
--- a/src/lib/elementary/efl_ui_box.c
+++ b/src/lib/elementary/efl_ui_box.c
@@ -19,6 +19,7 @@ static void *
_efl_ui_box_list_data_get(const Eina_List *list)
{
Evas_Object_Box_Option *opt = eina_list_data_get(list);
+
return opt->obj;
}
@@ -27,7 +28,8 @@ _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_CHILD_ADDED, opt->obj);
+
+ eo_event_callback_call(box, EFL_PACK_EVENT_CONTENT_ADDED, opt->obj);
return EINA_TRUE;
}
@@ -37,7 +39,8 @@ _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_CHILD_REMOVED, child);
+
+ eo_event_callback_call(box, EFL_PACK_EVENT_CONTENT_REMOVED, child);
return EINA_TRUE;
}
@@ -62,7 +65,7 @@ _efl_ui_box_elm_widget_focus_next(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Elm
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
Evas_Object_Box_Data *bd =
- evas_object_smart_data_get(wd->resize_obj);
+ evas_object_smart_data_get(wd->resize_obj);
items = bd->children;
list_data_get = _efl_ui_box_list_data_get;
@@ -91,7 +94,7 @@ _efl_ui_box_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *_pd
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
Evas_Object_Box_Data *bd =
- evas_object_smart_data_get(wd->resize_obj);
+ evas_object_smart_data_get(wd->resize_obj);
items = bd->children;
list_data_get = _efl_ui_box_list_data_get;
@@ -99,7 +102,7 @@ _efl_ui_box_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *_pd
if (!items) return EINA_FALSE;
}
return elm_widget_focus_list_direction_get
- (obj, base, items, list_data_get, degree, direction, direction_item, weight);
+ (obj, base, items, list_data_get, degree, direction, direction_item, weight);
}
static void
@@ -136,7 +139,7 @@ _on_size_hints_changed(void *data, Evas *e EINA_UNUSED,
if (obj == resizeobj)
efl_pack_layout_request(obj);
else
- _sizing_eval(data, pd);
+ _sizing_eval(data, pd);
}
static void
@@ -149,38 +152,37 @@ _evas_box_custom_layout(Evas_Object *evas_box EINA_UNUSED,
}
EOLIAN static void
-_efl_ui_box_efl_pack_layout_update(Eo *obj, Efl_Ui_Box_Data *pd)
+_efl_ui_box_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Box_Data *pd)
{
- efl_pack_engine_layout_do(pd->layout_engine, obj, pd->layout_data);
+ efl_pack_layout_do(pd->layout_engine, obj, pd->layout_data);
eo_event_callback_call(obj, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
}
EOLIAN static void
-_efl_ui_box_efl_pack_engine_layout_do(Eo *klass EINA_UNUSED,
+_efl_ui_box_efl_pack_layout_layout_do(Eo *klass EINA_UNUSED,
void *_pd EINA_UNUSED,
Eo *obj, const void *data EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
Evas_Object_Box_Data *bd;
- bd = eo_data_scope_get(wd->resize_obj, EVAS_BOX_CLASS);
+ bd = evas_object_smart_data_get(wd->resize_obj);
_efl_ui_box_custom_layout(obj, bd);
}
-EOLIAN static Eina_Bool
-_efl_ui_box_efl_pack_layout_engine_set(Eo *obj, Efl_Ui_Box_Data *pd,
- const Eo_Class *klass, const void *data)
+EOLIAN static void
+_efl_ui_box_efl_pack_layout_layout_engine_set(Eo *obj, Efl_Ui_Box_Data *pd,
+ const Eo_Class *klass, const void *data)
{
pd->layout_engine = klass ? klass : eo_class_get(obj);
pd->layout_data = data;
efl_pack_layout_request(obj);
_sizing_eval(obj, pd);
- return EINA_TRUE;
}
EOLIAN static void
-_efl_ui_box_efl_pack_layout_engine_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd,
- const Eo_Class **klass, const void **data)
+_efl_ui_box_efl_pack_layout_layout_engine_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd,
+ const Eo_Class **klass, const void **data)
{
if (klass) *klass = pd->layout_engine;
if (data) *data = pd->layout_data;
@@ -213,8 +215,8 @@ _efl_ui_box_evas_object_smart_add(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED)
evas_obj_smart_add(eo_super(obj, MY_CLASS));
elm_widget_sub_object_parent_add(obj);
- eo_event_callback_add(wd->resize_obj, EFL_PACK_EVENT_CHILD_ADDED, _child_added_cb_proxy, obj);
- eo_event_callback_add(wd->resize_obj, EFL_PACK_EVENT_CHILD_REMOVED, _child_removed_cb_proxy, obj);
+ eo_event_callback_add(wd->resize_obj, EVAS_BOX_EVENT_CHILD_ADDED, _child_added_cb_proxy, obj);
+ eo_event_callback_add(wd->resize_obj, EVAS_BOX_EVENT_CHILD_REMOVED, _child_removed_cb_proxy, obj);
elm_widget_can_focus_set(obj, EINA_FALSE);
elm_widget_highlight_ignore_set(obj, EINA_TRUE);
@@ -233,8 +235,8 @@ _efl_ui_box_evas_object_smart_del(Eo *obj, Efl_Ui_Box_Data *sd)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
evas_object_event_callback_del_full
- (wd->resize_obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _on_size_hints_changed, obj);
+ (wd->resize_obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _on_size_hints_changed, obj);
/* let's make our box object the *last* to be processed, since it
* may (smart) parent other sub objects here */
@@ -243,7 +245,7 @@ _efl_ui_box_evas_object_smart_del(Eo *obj, Efl_Ui_Box_Data *sd)
if (child == wd->resize_obj)
{
wd->subobjs =
- eina_list_demote_list(wd->subobjs, l);
+ eina_list_demote_list(wd->subobjs, l);
break;
}
}
@@ -251,14 +253,6 @@ _efl_ui_box_evas_object_smart_del(Eo *obj, Efl_Ui_Box_Data *sd)
evas_obj_smart_del(eo_super(obj, MY_CLASS));
}
-EAPI Evas_Object *
-efl_ui_box_add(Evas_Object *parent)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
- Evas_Object *obj = eo_add(MY_CLASS, parent);
- return obj;
-}
-
EOLIAN static Eo *
_efl_ui_box_eo_base_constructor(Eo *obj, Efl_Ui_Box_Data *pd)
{
@@ -290,11 +284,12 @@ _efl_ui_box_efl_pack_contents_count(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
}
EOLIAN static void
-_efl_ui_box_efl_pack_clear(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
+_efl_ui_box_efl_pack_pack_clear(Eo *obj, Efl_Ui_Box_Data *pd)
{
- /* EINA_TRUE means to delete objects as well */
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+
evas_object_box_remove_all(wd->resize_obj, EINA_TRUE);
+ _sizing_eval(obj, pd);
}
EOLIAN static void
@@ -312,14 +307,12 @@ _efl_ui_box_efl_pack_unpack_all(Eo *obj, Efl_Ui_Box_Data *pd)
elm_widget_sub_object_del(obj, opt->obj);
pd->delete_me = EINA_FALSE;
- /* EINA_FALSE means do not delete objects */
evas_object_box_remove_all(wd->resize_obj, EINA_FALSE);
- /* update size hints */
_sizing_eval(obj, pd);
}
EOLIAN static Eina_Bool
-_efl_ui_box_efl_pack_unpack(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Pack_Item *subobj)
+_efl_ui_box_efl_pack_unpack(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Base *subobj)
{
Eina_Bool ret = EINA_FALSE;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -334,13 +327,13 @@ _efl_ui_box_efl_pack_unpack(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Pack_Item *subobj)
}
EOLIAN static void
-_efl_ui_box_efl_pack_pack(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Pack_Item *subobj)
+_efl_ui_box_efl_pack_pack(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj)
{
efl_pack_end(obj, subobj);
}
EOLIAN static void
-_efl_ui_box_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Pack_Item *subobj)
+_efl_ui_box_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -349,7 +342,7 @@ _efl_ui_box_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, E
}
EOLIAN static void
-_efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Pack_Item *subobj)
+_efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Gfx_Base *subobj)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -358,7 +351,7 @@ _efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED
}
EOLIAN static Eina_Bool
-_efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Pack_Item *subobj, const Efl_Pack_Item *existing)
+_efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Gfx_Base *subobj, const Efl_Gfx_Base *existing)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -375,7 +368,7 @@ _efl_ui_box_efl_pack_linear_pack_before(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSE
}
EOLIAN static Eina_Bool
-_efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Pack_Item *subobj, const Efl_Pack_Item *existing)
+_efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Gfx_Base *subobj, const Efl_Gfx_Base *existing)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -391,14 +384,42 @@ _efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED
return EINA_TRUE;
}
-static inline Efl_Pack_Item *
+EOLIAN static void
+_efl_ui_box_efl_pack_linear_pack_insert(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED,
+ Efl_Gfx_Base *subobj, int index)
+{
+ if (!index)
+ efl_pack_begin(obj, subobj);
+ else if (index == -1)
+ efl_pack_end(obj, subobj);
+ else
+ {
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+ Evas_Object_Box_Data *bd;
+ int cnt;
+
+ bd = evas_object_smart_data_get(wd->resize_obj);
+ cnt = eina_list_count(bd ? bd->children : NULL);
+ if (!cnt)
+ index = 0;
+ else
+ {
+ index %= cnt;
+ if (index < 0) index += cnt;
+ }
+ evas_object_box_insert_at(wd->resize_obj, subobj, index);
+ }
+}
+
+static inline Efl_Gfx_Base *
_box_item(Evas_Object_Box_Option *opt)
{
return opt ? opt->obj : NULL;
}
-EOLIAN static Efl_Pack_Item *
-_efl_ui_box_efl_pack_linear_child_at_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, int index)
+EOLIAN static Efl_Gfx_Base *
+_efl_ui_box_efl_pack_linear_content_at_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED,
+ int index)
{
Evas_Object_Box_Data *bd;
int cnt;
@@ -415,7 +436,7 @@ _efl_ui_box_efl_pack_linear_child_at_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSE
cnt = eina_list_count(bd->children);
if (!cnt) return NULL;
- if (index >= cnt)
+ if (index >= (cnt - 1))
return _box_item(eina_list_last_data_get(bd->children));
else if (index <= (-cnt))
return _box_item(eina_list_data_get(bd->children));
@@ -427,25 +448,64 @@ _efl_ui_box_efl_pack_linear_child_at_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSE
return _box_item(eina_list_nth(bd->children, index));
}
-EOLIAN static void
-_efl_ui_box_efl_pack_linear_child_at_set(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, int index, Efl_Pack_Item *subobj)
+EOLIAN static int
+_efl_ui_box_efl_pack_linear_content_index_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED,
+ Efl_Gfx_Base *subobj)
{
- if (!index)
- efl_pack_begin(obj, subobj);
- else if (index == -1)
- efl_pack_end(obj, subobj);
- else
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, -1);
+ Evas_Object_Box_Data *bd;
+ Evas_Object_Box_Option *opt;
+ Eina_List *l;
+ int k = 0;
+
+ if (evas_object_smart_parent_get(subobj) != wd->resize_obj)
+ goto end;
+
+ bd = evas_object_smart_data_get(wd->resize_obj);
+ EINA_LIST_FOREACH(bd->children, l, opt)
{
- Efl_Pack_Item *other = efl_pack_child_at_get(obj, index);
- if (!other)
- efl_pack_end(obj, subobj);
- else
- efl_pack_after(obj, subobj, other);
+ if (opt->obj == subobj)
+ return k;
+ k++;
+ }
+
+end:
+ ERR("object %p (%s) is not a child of %p (%s)",
+ subobj, eo_class_name_get(subobj), obj, eo_class_name_get(obj));
+ return -1;
+}
+
+EOLIAN static Eina_Bool
+_efl_ui_box_efl_pack_linear_content_index_set(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED,
+ Efl_Gfx_Base *subobj, int index)
+{
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
+ Evas_Object_Box_Data *bd;
+ int cnt;
+
+ if (evas_object_smart_parent_get(subobj) != wd->resize_obj)
+ {
+ ERR("object %p (%s) is not a child of %p (%s)",
+ subobj, eo_class_name_get(subobj), obj, eo_class_name_get(obj));
+ return EINA_FALSE;
}
+
+ bd = evas_object_smart_data_get(wd->resize_obj);
+ cnt = eina_list_count(bd->children);
+ if (!cnt)
+ {
+ efl_pack(obj, subobj);
+ return EINA_TRUE;
+ }
+
+ index %= cnt;
+ if (index < 0) index += index;
+
+ return (evas_object_box_insert_at(wd->resize_obj, subobj, index) != NULL);
}
EOLIAN static void
-_efl_ui_box_efl_pack_layout_request(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
+_efl_ui_box_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
{
evas_object_smart_need_recalculate_set(obj, EINA_TRUE);
}
@@ -453,7 +513,7 @@ _efl_ui_box_efl_pack_layout_request(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
static Eina_Bool
_box_item_iterator_next(Box_Item_Iterator *it, void **data)
{
- Efl_Pack_Item *sub;
+ Efl_Gfx_Base *sub;
if (!eina_iterator_next(it->real_iterator, (void **) &sub))
return EINA_FALSE;
@@ -477,7 +537,7 @@ _box_item_iterator_free(Box_Item_Iterator *it)
}
EOLIAN static Eina_Iterator *
-_efl_ui_box_efl_pack_contents_iterate(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
+_efl_ui_box_efl_pack_contents_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED)
{
Box_Item_Iterator *it;
@@ -510,7 +570,7 @@ _efl_ui_box_efl_pack_linear_direction_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Orie
break;
case EFL_ORIENT_RIGHT:
- //case EFL_ORIENT_LEFT:
+ //case EFL_ORIENT_LEFT:
default:
pd->orient = EFL_ORIENT_RIGHT;
break;
@@ -526,7 +586,7 @@ _efl_ui_box_efl_pack_linear_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *
}
EOLIAN static void
-_efl_ui_box_efl_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v, Eina_Bool scalable)
+_efl_ui_box_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v, Eina_Bool scalable)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -542,11 +602,11 @@ _efl_ui_box_efl_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double
evas_object_box_padding_set(wd->resize_obj, h * scale, v * scale);
}
else
- evas_object_box_padding_set(wd->resize_obj, h, v);
+ evas_object_box_padding_set(wd->resize_obj, h, v);
}
EOLIAN static void
-_efl_ui_box_efl_pack_padding_get(Eo *obj, Efl_Ui_Box_Data *pd, double *h, double *v, Eina_Bool *scalable)
+_efl_ui_box_efl_pack_pack_padding_get(Eo *obj, Efl_Ui_Box_Data *pd, double *h, double *v, Eina_Bool *scalable)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo
index 2ef5a76d1c..6e085a890e 100644
--- a/src/lib/elementary/efl_ui_box.eo
+++ b/src/lib/elementary/efl_ui_box.eo
@@ -1,10 +1,10 @@
-class Efl.Ui.Box (Elm.Widget, Efl.Pack_Engine, Efl.Pack_Linear)
+class Efl.Ui.Box (Elm.Widget, Efl.Pack_Linear, Efl.Pack_Layout)
{
legacy_prefix: null;
implements {
Eo.Base.constructor;
- // smart obj
+ // Smart obj
Evas.Object_Smart.add;
Evas.Object_Smart.del;
Evas.Object_Smart.calculate;
@@ -15,31 +15,33 @@ class Efl.Ui.Box (Elm.Widget, Efl.Pack_Engine, Efl.Pack_Linear)
Elm.Widget.focus_direction_manager_is;
Elm.Widget.focus_next;
- Efl.Pack.contents_iterate;
+ // Packing interfaces
+ Efl.Pack.contents_get;
Efl.Pack.contents_count;
- Efl.Pack.clear;
+ Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
Efl.Pack.pack;
- Efl.Pack.padding.get;
- Efl.Pack.padding.set;
+ Efl.Pack.pack_padding.get;
+ Efl.Pack.pack_padding.set;
Efl.Pack.pack_align.get;
Efl.Pack.pack_align.set;
- Efl.Pack.layout_update;
- Efl.Pack.layout_request;
- Efl.Pack.layout_engine.get;
- Efl.Pack.layout_engine.set;
Efl.Pack_Linear.pack_begin;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.pack_before;
Efl.Pack_Linear.pack_after;
- Efl.Pack_Linear.child_at.get;
- Efl.Pack_Linear.child_at.set;
- //Efl.Pack_Linear.child_index.get;
- //Efl.Pack_Linear.child_index.set;
+ Efl.Pack_Linear.pack_insert;
+ Efl.Pack_Linear.content_at.get;
+ Efl.Pack_Linear.content_index.get;
+ Efl.Pack_Linear.content_index.set;
Efl.Pack_Linear.direction.set;
Efl.Pack_Linear.direction.get;
- Efl.Pack_Engine.layout_do;
+ // Custom layouts
+ Efl.Pack_Layout.layout_update;
+ Efl.Pack_Layout.layout_request;
+ Efl.Pack_Layout.layout_engine.get;
+ Efl.Pack_Layout.layout_engine.set;
+ Efl.Pack_Layout.layout_do;
}
}
diff --git a/src/lib/elementary/efl_ui_box_flow.c b/src/lib/elementary/efl_ui_box_flow.c
index e3db2549a2..2dbc2cbdaa 100644
--- a/src/lib/elementary/efl_ui_box_flow.c
+++ b/src/lib/elementary/efl_ui_box_flow.c
@@ -42,7 +42,7 @@ _efl_ui_box_flow_box_flow_max_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Flow_Data
}
EOLIAN static void
-_efl_ui_box_flow_efl_pack_engine_layout_do(Eo_Class *klass EINA_UNUSED,
+_efl_ui_box_flow_efl_pack_layout_layout_do(Eo_Class *klass EINA_UNUSED,
void *_pd EINA_UNUSED,
Eo *obj, const void *data)
{
diff --git a/src/lib/elementary/efl_ui_box_flow.eo b/src/lib/elementary/efl_ui_box_flow.eo
index 9357a8e3ff..733e74259a 100644
--- a/src/lib/elementary/efl_ui_box_flow.eo
+++ b/src/lib/elementary/efl_ui_box_flow.eo
@@ -4,7 +4,7 @@ struct Efl.Ui.Box_Flow_Params {
max_size: bool;
}
-class Efl.Ui.Box_Flow (Efl.Ui.Box, Efl.Pack_Engine)
+class Efl.Ui.Box_Flow (Efl.Ui.Box, Efl.Pack_Layout)
{
[[A custom layout engine for @Efl.Ui.Box.]]
legacy_prefix: null;
@@ -26,6 +26,6 @@ class Efl.Ui.Box_Flow (Efl.Ui.Box, Efl.Pack_Engine)
}
implements {
Eo.Base.constructor;
- Efl.Pack_Engine.layout_do;
+ Efl.Pack_Layout.layout_do;
}
}
diff --git a/src/lib/elementary/efl_ui_box_private.h b/src/lib/elementary/efl_ui_box_private.h
index 39a7a64b7a..dcff646f11 100644
--- a/src/lib/elementary/efl_ui_box_private.h
+++ b/src/lib/elementary/efl_ui_box_private.h
@@ -5,7 +5,7 @@
# include "elementary_config.h"
#endif
-#define EFL_PACK_PROTECTED
+#define EFL_PACK_LAYOUT_PROTECTED
#include <Elementary.h>
#include "elm_priv.h"
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c
index b8a7ee06a2..1a43e3278f 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_grid.c
@@ -2,7 +2,7 @@
# include "elementary_config.h"
#endif
-#define EFL_PACK_PROTECTED
+#define EFL_PACK_LAYOUT_PROTECTED
#include <Elementary.h>
#include "elm_priv.h"
@@ -19,7 +19,7 @@ typedef struct _Grid_Item Grid_Item;
typedef struct _Custom_Table_Data Custom_Table_Data;
static Eina_Bool _subobj_del_cb(void *data, const Eo_Event *event);
-static void _item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj);
+static void _item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj);
#define GRID_ITEM_KEY "__grid_item"
@@ -27,7 +27,7 @@ struct _Grid_Item
{
EINA_INLIST;
- Efl_Pack_Item *object;
+ Efl_Gfx_Base *object;
int col_span, row_span;
int col, row;
@@ -104,7 +104,7 @@ _efl_ui_grid_elm_widget_focus_next(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, El
else
{
items = evas_object_table_children_get
- (wd->resize_obj);
+ (wd->resize_obj);
list_data_get = eina_list_data_get;
list_free = eina_list_free;
@@ -145,7 +145,7 @@ _efl_ui_grid_elm_widget_focus_direction(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSE
else
{
items = evas_object_table_children_get
- (wd->resize_obj);
+ (wd->resize_obj);
list_data_get = eina_list_data_get;
list_free = eina_list_free;
@@ -153,7 +153,7 @@ _efl_ui_grid_elm_widget_focus_direction(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSE
}
int_ret = elm_widget_focus_list_direction_get
- (obj, base, items, list_data_get, degree, direction, direction_item, weight);
+ (obj, base, items, list_data_get, degree, direction, direction_item, weight);
if (list_free)
list_free((Eina_List *)items);
@@ -196,9 +196,9 @@ _sizing_eval(Evas_Object *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
evas_object_size_hint_min_get
- (wd->resize_obj, &minw, &minh);
+ (wd->resize_obj, &minw, &minh);
evas_object_size_hint_max_get
- (wd->resize_obj, &maxw, &maxh);
+ (wd->resize_obj, &maxw, &maxh);
evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh);
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
@@ -250,33 +250,32 @@ _custom_table_calc(Eo *obj, Custom_Table_Data *pd)
}
/* End of custom table class */
-EOLIAN Eina_Bool
-_efl_ui_grid_efl_pack_layout_engine_set(Eo *obj, Efl_Ui_Grid_Data *pd, const Eo_Class *engine, const void *data)
+EOLIAN static void
+_efl_ui_grid_efl_pack_layout_layout_engine_set(Eo *obj, Efl_Ui_Grid_Data *pd, const Eo_Class *engine, const void *data)
{
pd->layout_engine = engine ? engine : eo_class_get(obj);
pd->layout_data = data;
efl_pack_layout_request(obj);
- return EINA_TRUE;
}
-EOLIAN void
-_efl_ui_grid_efl_pack_layout_engine_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, const Eo_Class **engine, const void **data)
+EOLIAN static void
+_efl_ui_grid_efl_pack_layout_layout_engine_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, const Eo_Class **engine, const void **data)
{
if (engine) *engine = pd->layout_engine;
if (data) *data = pd->layout_data;
}
EOLIAN static void
-_efl_ui_grid_efl_pack_layout_update(Eo *obj, Efl_Ui_Grid_Data *pd)
+_efl_ui_grid_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Grid_Data *pd)
{
_sizing_eval(obj, pd);
- efl_pack_engine_layout_do(pd->layout_engine, obj, pd->layout_data);
+ efl_pack_layout_do(pd->layout_engine, obj, pd->layout_data);
}
EOLIAN static void
-_efl_ui_grid_efl_pack_engine_layout_do(Eo *klass EINA_UNUSED,
- void *_pd EINA_UNUSED,
- Eo *obj, const void *data EINA_UNUSED)
+_efl_ui_grid_efl_pack_layout_layout_do(Eo *klass EINA_UNUSED,
+ void *_pd EINA_UNUSED,
+ Eo *obj, const void *data EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -310,7 +309,7 @@ _efl_ui_grid_evas_object_smart_add(Eo *obj, Efl_Ui_Grid_Data *pd)
elm_widget_resize_object_set(obj, table, EINA_TRUE);
evas_object_event_callback_add
- (table, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _table_size_hints_changed, obj);
+ (table, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _table_size_hints_changed, obj);
evas_obj_smart_add(eo_super(obj, MY_CLASS));
@@ -329,8 +328,8 @@ _efl_ui_grid_evas_object_smart_del(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
evas_object_event_callback_del_full
- (wd->resize_obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _table_size_hints_changed, obj);
+ (wd->resize_obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _table_size_hints_changed, obj);
/* let's make our table object the *last* to be processed, since it
* may (smart) parent other sub objects here */
@@ -339,7 +338,7 @@ _efl_ui_grid_evas_object_smart_del(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
if (child == wd->resize_obj)
{
wd->subobjs =
- eina_list_demote_list(wd->subobjs, l);
+ eina_list_demote_list(wd->subobjs, l);
break;
}
}
@@ -367,7 +366,7 @@ _efl_ui_grid_eo_base_constructor(Eo *obj, Efl_Ui_Grid_Data *pd)
EOLIAN static void
-_efl_ui_grid_efl_pack_padding_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, double h, double v, Eina_Bool scalable)
+_efl_ui_grid_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, double h, double v, Eina_Bool scalable)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -382,11 +381,11 @@ _efl_ui_grid_efl_pack_padding_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, dou
evas_object_table_padding_set(wd->resize_obj, h * scale, v * scale);
}
else
- evas_object_table_padding_set(wd->resize_obj, h, v);
+ evas_object_table_padding_set(wd->resize_obj, h, v);
}
EOLIAN static void
-_efl_ui_grid_efl_pack_padding_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, double *h, double *v, Eina_Bool *scalable)
+_efl_ui_grid_efl_pack_pack_padding_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, double *h, double *v, Eina_Bool *scalable)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -411,7 +410,7 @@ _subobj_del_cb(void *data, const Eo_Event *event)
}
static void
-_pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj,
+_pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj,
int col, int row, int colspan, int rowspan, Eina_Bool linear)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -467,7 +466,7 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *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_CHILD_ADDED, subobj);
+ eo_event_callback_call(obj, EFL_PACK_EVENT_CONTENT_ADDED, subobj);
eo_event_callback_array_add(subobj, subobj_callbacks, obj);
}
@@ -476,7 +475,7 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj,
EOLIAN static void
_efl_ui_grid_efl_pack_grid_pack_grid(Eo *obj, Efl_Ui_Grid_Data *pd,
- Efl_Pack_Item *subobj,
+ Efl_Gfx_Base *subobj,
int col, int row, int colspan, int rowspan)
{
EINA_SAFETY_ON_NULL_RETURN(subobj);
@@ -485,7 +484,7 @@ _efl_ui_grid_efl_pack_grid_pack_grid(Eo *obj, Efl_Ui_Grid_Data *pd,
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_pack_child_position_set(Eo *obj, Efl_Ui_Grid_Data *pd, Evas_Object *subobj, int col, int row, int colspan, int rowspan)
+_efl_ui_grid_efl_pack_grid_grid_content_position_set(Eo *obj, Efl_Ui_Grid_Data *pd, Evas_Object *subobj, int col, int row, int colspan, int rowspan)
{
EINA_SAFETY_ON_NULL_RETURN(subobj);
@@ -499,7 +498,7 @@ _efl_ui_grid_efl_pack_grid_pack_child_position_set(Eo *obj, Efl_Ui_Grid_Data *pd
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_grid_pack_child_position_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Evas_Object *subobj, int *col, int *row, int *colspan, int *rowspan)
+_efl_ui_grid_efl_pack_grid_grid_content_position_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Evas_Object *subobj, int *col, int *row, int *colspan, int *rowspan)
{
int c = -1, r = -1, cs = 0, rs = 0;
Grid_Item *gi;
@@ -530,8 +529,8 @@ end:
return ret;
}
-EOLIAN static Efl_Pack_Item *
-_efl_ui_grid_efl_pack_grid_pack_child_at(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int col, int row)
+EOLIAN static Efl_Gfx_Base *
+_efl_ui_grid_efl_pack_grid_grid_content_at(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int col, int row)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
@@ -539,7 +538,7 @@ _efl_ui_grid_efl_pack_grid_pack_child_at(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUS
}
static void
-_item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj)
+_item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj)
{
Grid_Item *gi = eo_key_data_get(subobj, GRID_ITEM_KEY);
Grid_Item *gi2, *last = NULL;
@@ -587,7 +586,7 @@ _item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj)
}
end:
- eo_event_callback_call(obj, EFL_PACK_EVENT_CHILD_REMOVED, subobj);
+ eo_event_callback_call(obj, EFL_PACK_EVENT_CONTENT_REMOVED, subobj);
pd->items = (Grid_Item *)
eina_inlist_remove(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi));
pd->count--;
@@ -596,7 +595,7 @@ end:
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj)
+_efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -612,7 +611,7 @@ _efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subob
}
EOLIAN static void
-_efl_ui_grid_efl_pack_clear(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_grid_efl_pack_pack_clear(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -627,8 +626,8 @@ _efl_ui_grid_efl_pack_unpack_all(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
evas_object_table_clear(wd->resize_obj, EINA_FALSE);
}
-EOLIAN void
-_efl_ui_grid_efl_pack_layout_request(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+EOLIAN static void
+_efl_ui_grid_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
{
evas_object_smart_need_recalculate_set(obj, EINA_TRUE);
}
@@ -636,7 +635,7 @@ _efl_ui_grid_efl_pack_layout_request(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
static Eina_Bool
_grid_item_iterator_next(Grid_Item_Iterator *it, void **data)
{
- Efl_Pack_Item *sub;
+ Efl_Gfx_Base *sub;
if (!eina_iterator_next(it->real_iterator, (void **) &sub))
return EINA_FALSE;
@@ -659,19 +658,18 @@ _grid_item_iterator_free(Grid_Item_Iterator *it)
free(it);
}
-EOLIAN static Eina_Iterator *
-_efl_ui_grid_efl_pack_contents_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+static inline Eina_Iterator *
+_grid_item_iterator_create(Eo *obj, Eina_List *list)
{
Grid_Item_Iterator *it;
-
- ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
+ if (!list) return NULL;
it = calloc(1, sizeof(*it));
if (!it) return NULL;
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
- it->list = evas_object_table_children_get(wd->resize_obj);
+ it->list = list;
it->real_iterator = eina_list_iterator_new(it->list);
it->iterator.version = EINA_ITERATOR_VERSION;
it->iterator.next = FUNC_ITERATOR_NEXT(_grid_item_iterator_next);
@@ -682,21 +680,49 @@ _efl_ui_grid_efl_pack_contents_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED
return &it->iterator;
}
+EOLIAN static Eina_Iterator *
+_efl_ui_grid_efl_pack_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+{
+ Eina_List *list;
+
+ ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
+
+ list = evas_object_table_children_get(wd->resize_obj);
+ return _grid_item_iterator_create(obj, list);
+}
+
EOLIAN static int
_efl_ui_grid_efl_pack_contents_count(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
{
return pd->count;
}
-EOLIAN static Eina_List *
-_efl_ui_grid_efl_pack_grid_pack_children_at(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int col, int row)
+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)
{
- Eina_List *l = NULL;
+ Eina_List *list, *atlist = NULL;
+ Evas_Object *sobj;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
- /* FIXME: only one item returned */
- return eina_list_append(l, evas_object_table_child_get(wd->resize_obj, col, row));
+ list = evas_object_table_children_get(wd->resize_obj);
+ EINA_LIST_FREE(list, sobj)
+ {
+ Grid_Item *gi = eo_key_data_get(sobj, GRID_ITEM_KEY);
+ if (!gi) continue;
+
+ if ((gi->col == col) && (gi->row == row))
+ atlist = eina_list_append(atlist, sobj);
+ else if (below)
+ {
+ if ((gi->col <= col) && (gi->col + gi->col_span >= col) &&
+ (gi->row <= row) && (gi->row + gi->row_span >= row))
+ atlist = eina_list_append(atlist, sobj);
+ }
+ }
+
+ return _grid_item_iterator_create(obj, atlist);
}
EOLIAN static void
@@ -713,7 +739,7 @@ _efl_ui_grid_efl_pack_linear_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Or
if (!_horiz(pd->dir1))
pd->dir2 = EFL_ORIENT_RIGHT;
else
- pd->dir2 = EFL_ORIENT_DOWN;
+ pd->dir2 = EFL_ORIENT_DOWN;
}
efl_pack_layout_request(obj);
@@ -775,12 +801,12 @@ _efl_ui_grid_efl_pack_grid_grid_size_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUS
EOLIAN static void
_efl_ui_grid_efl_pack_grid_grid_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd EINA_UNUSED, int *cols, int *rows)
{
- if (cols) *cols = efl_pack_columns_get(obj);
- if (rows) *rows = efl_pack_rows_get(obj);
+ if (cols) *cols = efl_pack_grid_columns_get(obj);
+ if (rows) *rows = efl_pack_grid_rows_get(obj);
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_columns_set(Eo *obj, Efl_Ui_Grid_Data *pd, int columns)
+_efl_ui_grid_efl_pack_grid_grid_columns_set(Eo *obj, Efl_Ui_Grid_Data *pd, int columns)
{
pd->req_cols = columns;
@@ -788,7 +814,7 @@ _efl_ui_grid_efl_pack_grid_columns_set(Eo *obj, Efl_Ui_Grid_Data *pd, int column
}
EOLIAN static int
-_efl_ui_grid_efl_pack_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
+_efl_ui_grid_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
{
if (!pd->req_cols)
{
@@ -801,7 +827,7 @@ _efl_ui_grid_efl_pack_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_rows_set(Eo *obj, Efl_Ui_Grid_Data *pd, int rows)
+_efl_ui_grid_efl_pack_grid_grid_rows_set(Eo *obj, Efl_Ui_Grid_Data *pd, int rows)
{
pd->req_rows = rows;
@@ -809,7 +835,7 @@ _efl_ui_grid_efl_pack_grid_rows_set(Eo *obj, Efl_Ui_Grid_Data *pd, int rows)
}
EOLIAN static int
-_efl_ui_grid_efl_pack_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
+_efl_ui_grid_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
{
if (!pd->req_rows)
{
@@ -822,14 +848,14 @@ _efl_ui_grid_efl_pack_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
}
EOLIAN static void
-_efl_ui_grid_efl_pack_pack(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Efl_Pack_Item *subobj)
+_efl_ui_grid_efl_pack_pack(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj)
{
/* this is just an alias */
efl_pack_end(obj, subobj);
}
EOLIAN static void
-_efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Pack_Item *subobj)
+_efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj)
{
EINA_SAFETY_ON_NULL_RETURN(subobj);
diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo
index 839d7a24a9..afa0e6bac9 100644
--- a/src/lib/elementary/efl_ui_grid.eo
+++ b/src/lib/elementary/efl_ui_grid.eo
@@ -1,47 +1,52 @@
-class Efl.Ui.Grid (Elm.Widget, Efl.Pack_Grid, Efl.Pack_Engine)
+class Efl.Ui.Grid (Elm.Widget, Efl.Pack_Grid, Efl.Pack_Layout)
{
+ legacy_prefix: null;
implements {
Eo.Base.constructor;
+ // Smart obj
Evas.Object_Smart.add;
Evas.Object_Smart.del;
Evas.Object_Smart.calculate;
+ // Focus
Elm.Widget.focus_direction;
Elm.Widget.focus_next_manager_is;
Elm.Widget.focus_direction_manager_is;
Elm.Widget.focus_next;
Elm.Widget.theme_apply;
- Efl.Pack.contents_iterate;
+ // Packing interface
+ Efl.Pack.contents_get;
Efl.Pack.contents_count;
- Efl.Pack.clear;
+ Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
Efl.Pack.pack;
- Efl.Pack.padding.get;
- Efl.Pack.padding.set;
- Efl.Pack.layout_update;
- Efl.Pack.layout_request;
+ Efl.Pack.pack_padding.get;
+ Efl.Pack.pack_padding.set;
Efl.Pack_Grid.pack_grid;
- Efl.Pack_Grid.pack_children_at;
- Efl.Pack_Grid.pack_child_at;
- Efl.Pack_Grid.pack_child_position.set;
- Efl.Pack_Grid.pack_child_position.get;
+ Efl.Pack_Grid.grid_contents_at;
+ Efl.Pack_Grid.grid_content_at;
+ Efl.Pack_Grid.grid_content_position.set;
+ Efl.Pack_Grid.grid_content_position.get;
Efl.Pack_Grid.grid_size.set;
Efl.Pack_Grid.grid_size.get;
- Efl.Pack_Grid.columns.set;
- Efl.Pack_Grid.columns.get;
- Efl.Pack_Grid.rows.set;
- Efl.Pack_Grid.rows.get;
+ Efl.Pack_Grid.grid_columns.set;
+ Efl.Pack_Grid.grid_columns.get;
+ Efl.Pack_Grid.grid_rows.set;
+ Efl.Pack_Grid.grid_rows.get;
Efl.Pack_Grid.directions.set;
Efl.Pack_Grid.directions.get;
Efl.Pack_Linear.pack_end;
Efl.Pack_Linear.direction.set;
Efl.Pack_Linear.direction.get;
- Efl.Pack.layout_engine.get;
- Efl.Pack.layout_engine.set;
- Efl.Pack_Engine.layout_do;
+ // Custom layouts
+ Efl.Pack_Layout.layout_update;
+ Efl.Pack_Layout.layout_request;
+ Efl.Pack_Layout.layout_engine.get;
+ Efl.Pack_Layout.layout_engine.set;
+ Efl.Pack_Layout.layout_do;
}
}