diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-04-26 15:21:21 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2016-04-26 16:48:55 +0900 |
commit | ff8ee0143223681cb55ce5386b8fb8f126bf2b90 (patch) | |
tree | 2d8e72c1f5a686f915abda6c19c6eb8cf639a6db /src | |
parent | 49dde632bc0c4b98609d85f1f46587b292778b16 (diff) |
Efl: Rename some packing functions and return bool
This renames some APIs from Efl.Pack in order to try and
make them more sensible. Feedback welcome.
Also, most APIs now return bool, where false is quite unlikely
to happen.
Diffstat (limited to '')
-rw-r--r-- | src/bin/elementary/test_ui_grid.c | 6 | ||||
-rw-r--r-- | src/lib/edje/edje_containers.c | 79 | ||||
-rw-r--r-- | src/lib/edje/efl_canvas_layout_internal_box.eo | 10 | ||||
-rw-r--r-- | src/lib/edje/efl_canvas_layout_internal_table.eo | 6 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_pack.eo | 5 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_pack_grid.eo | 14 | ||||
-rw-r--r-- | src/lib/efl/interfaces/efl_pack_linear.eo | 74 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_box.c | 106 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_box.eo | 13 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_grid.c | 61 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_grid.eo | 15 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_layout_internal_box.eo | 10 | ||||
-rw-r--r-- | src/lib/elementary/efl_ui_layout_internal_table.eo | 6 | ||||
-rw-r--r-- | src/lib/elementary/elm_layout.c | 2 | ||||
-rw-r--r-- | src/lib/elementary/elm_layout_pack.c | 60 | ||||
-rw-r--r-- | src/lib/elementary/elm_win.c | 4 | ||||
-rw-r--r-- | src/tests/edje/edje_test_edje.c | 14 |
17 files changed, 229 insertions, 256 deletions
diff --git a/src/bin/elementary/test_ui_grid.c b/src/bin/elementary/test_ui_grid.c index 956c676fb8..59a1da9e36 100644 --- a/src/bin/elementary/test_ui_grid.c +++ b/src/bin/elementary/test_ui_grid.c | |||
@@ -136,7 +136,7 @@ child_evt_cb(void *data, const Eo_Event *event) | |||
136 | int col, row, colspan, rowspan; | 136 | int col, row, colspan, rowspan; |
137 | char buf[64]; | 137 | char buf[64]; |
138 | 138 | ||
139 | efl_pack_grid_content_position_get(event->obj, it, &col, &row, &colspan, &rowspan); | 139 | efl_pack_grid_position_get(event->obj, it, &col, &row, &colspan, &rowspan); |
140 | if (event->desc == EFL_CONTAINER_EVENT_CONTENT_ADDED) | 140 | if (event->desc == EFL_CONTAINER_EVENT_CONTENT_ADDED) |
141 | sprintf(buf, "pack %d,%d %dx%d", col, row, colspan, rowspan); | 141 | sprintf(buf, "pack %d,%d %dx%d", col, row, colspan, rowspan); |
142 | else | 142 | else |
@@ -169,7 +169,7 @@ _custom_engine_layout_do(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED, | |||
169 | it = efl_content_iterate(pack); | 169 | it = efl_content_iterate(pack); |
170 | EINA_ITERATOR_FOREACH(it, item) | 170 | EINA_ITERATOR_FOREACH(it, item) |
171 | { | 171 | { |
172 | if (efl_pack_grid_content_position_get(pack, item, &c, &r, &cs, &rs)) | 172 | if (efl_pack_grid_position_get(pack, item, &c, &r, &cs, &rs)) |
173 | { | 173 | { |
174 | int x, y, mw, mh; | 174 | int x, y, mw, mh; |
175 | 175 | ||
@@ -615,7 +615,7 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, | |||
615 | efl_gfx_visible_set(f, 1); | 615 | efl_gfx_visible_set(f, 1); |
616 | 616 | ||
617 | efl_pack_grid_columns_set(grid, 4); | 617 | efl_pack_grid_columns_set(grid, 4); |
618 | efl_pack_directions_set(grid, EFL_ORIENT_RIGHT, EFL_ORIENT_DOWN); | 618 | efl_pack_grid_directions_set(grid, EFL_ORIENT_RIGHT, EFL_ORIENT_DOWN); |
619 | evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); | 619 | evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); |
620 | elm_object_content_set(f, grid); | 620 | elm_object_content_set(f, grid); |
621 | evas_object_show(grid); | 621 | evas_object_show(grid); |
diff --git a/src/lib/edje/edje_containers.c b/src/lib/edje/edje_containers.c index 89bf2f708b..75d61c4a53 100644 --- a/src/lib/edje/edje_containers.c +++ b/src/lib/edje/edje_containers.c | |||
@@ -70,16 +70,16 @@ _efl_canvas_layout_internal_box_eo_base_finalize(Eo *obj, Edje_Box_Data *pd) | |||
70 | 70 | ||
71 | /* Legacy features */ | 71 | /* Legacy features */ |
72 | 72 | ||
73 | EOLIAN static void | 73 | EOLIAN static Eina_Bool |
74 | _efl_canvas_layout_internal_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Edje_Box_Data *pd) | 74 | _efl_canvas_layout_internal_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Edje_Box_Data *pd) |
75 | { | 75 | { |
76 | _edje_part_box_remove_all(pd->ed, pd->part, EINA_TRUE); | 76 | return _edje_part_box_remove_all(pd->ed, pd->part, EINA_TRUE); |
77 | } | 77 | } |
78 | 78 | ||
79 | EOLIAN static void | 79 | EOLIAN static Eina_Bool |
80 | _efl_canvas_layout_internal_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Edje_Box_Data *pd) | 80 | _efl_canvas_layout_internal_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Edje_Box_Data *pd) |
81 | { | 81 | { |
82 | _edje_part_box_remove_all(pd->ed, pd->part, EINA_FALSE); | 82 | return _edje_part_box_remove_all(pd->ed, pd->part, EINA_FALSE); |
83 | } | 83 | } |
84 | 84 | ||
85 | EOLIAN static Eina_Bool | 85 | EOLIAN static Eina_Bool |
@@ -90,22 +90,22 @@ _efl_canvas_layout_internal_box_efl_pack_unpack(Eo *obj EINA_UNUSED, Edje_Box_Da | |||
90 | return (removed == subobj); | 90 | return (removed == subobj); |
91 | } | 91 | } |
92 | 92 | ||
93 | EOLIAN static void | 93 | EOLIAN static Eina_Bool |
94 | _efl_canvas_layout_internal_box_efl_pack_pack(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base *subobj) | 94 | _efl_canvas_layout_internal_box_efl_pack_pack(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base *subobj) |
95 | { | 95 | { |
96 | _edje_part_box_append(pd->ed, pd->part, subobj); | 96 | return _edje_part_box_append(pd->ed, pd->part, subobj); |
97 | } | 97 | } |
98 | 98 | ||
99 | EOLIAN static void | 99 | EOLIAN static Eina_Bool |
100 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base *subobj) | 100 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base *subobj) |
101 | { | 101 | { |
102 | _edje_part_box_prepend(pd->ed, pd->part, subobj); | 102 | return _edje_part_box_prepend(pd->ed, pd->part, subobj); |
103 | } | 103 | } |
104 | 104 | ||
105 | EOLIAN static void | 105 | EOLIAN static Eina_Bool |
106 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base *subobj) | 106 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base *subobj) |
107 | { | 107 | { |
108 | _edje_part_box_append(pd->ed, pd->part, subobj); | 108 | return _edje_part_box_append(pd->ed, pd->part, subobj); |
109 | } | 109 | } |
110 | 110 | ||
111 | EOLIAN static Eina_Bool | 111 | EOLIAN static Eina_Bool |
@@ -120,18 +120,20 @@ _efl_canvas_layout_internal_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, | |||
120 | return _edje_part_box_insert_after(pd->ed, pd->part, subobj, existing); | 120 | return _edje_part_box_insert_after(pd->ed, pd->part, subobj, existing); |
121 | } | 121 | } |
122 | 122 | ||
123 | EOLIAN static void | 123 | EOLIAN static Eina_Bool |
124 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_insert(Eo *obj, Edje_Box_Data *pd, Efl_Gfx_Base *subobj, int index) | 124 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_at(Eo *obj, Edje_Box_Data *pd, Efl_Gfx_Base *subobj, int index) |
125 | { | 125 | { |
126 | int cnt = efl_content_count(obj); | 126 | int cnt = efl_content_count(obj); |
127 | if ((index < 0) && ((-index) <= (cnt + 1))) | ||
128 | index = cnt + index + 1; | ||
127 | if ((index >= 0) && (index < cnt)) | 129 | if ((index >= 0) && (index < cnt)) |
128 | _edje_part_box_insert_at(pd->ed, pd->part, subobj, index); | 130 | return _edje_part_box_insert_at(pd->ed, pd->part, subobj, index); |
129 | else | 131 | else |
130 | _edje_part_box_append(pd->ed, pd->part, subobj); | 132 | return _edje_part_box_append(pd->ed, pd->part, subobj); |
131 | } | 133 | } |
132 | 134 | ||
133 | EOLIAN static Efl_Gfx_Base * | 135 | EOLIAN static Efl_Gfx_Base * |
134 | _efl_canvas_layout_internal_box_efl_pack_linear_content_at_remove(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, int index) | 136 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_unpack_at(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, int index) |
135 | { | 137 | { |
136 | if (index < 0) index += efl_content_count(obj); | 138 | if (index < 0) index += efl_content_count(obj); |
137 | return _edje_part_box_remove_at(pd->ed, pd->part, index); | 139 | return _edje_part_box_remove_at(pd->ed, pd->part, index); |
@@ -140,7 +142,7 @@ _efl_canvas_layout_internal_box_efl_pack_linear_content_at_remove(Eo *obj EINA_U | |||
140 | /* New APIs with Eo */ | 142 | /* New APIs with Eo */ |
141 | 143 | ||
142 | EOLIAN static Efl_Gfx_Base * | 144 | EOLIAN static Efl_Gfx_Base * |
143 | _efl_canvas_layout_internal_box_efl_pack_linear_content_at_get(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, int index) | 145 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, int index) |
144 | { | 146 | { |
145 | if (index < 0) index += efl_content_count(obj); | 147 | if (index < 0) index += efl_content_count(obj); |
146 | return _edje_part_box_content_at(pd->ed, pd->part, index); | 148 | return _edje_part_box_content_at(pd->ed, pd->part, index); |
@@ -153,7 +155,7 @@ _efl_canvas_layout_internal_box_efl_container_content_remove(Eo *obj, Edje_Box_D | |||
153 | } | 155 | } |
154 | 156 | ||
155 | EOLIAN static int | 157 | EOLIAN static int |
156 | _efl_canvas_layout_internal_box_efl_pack_linear_content_index_get(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, Efl_Gfx_Base * subobj) | 158 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Edje_Box_Data *pd, const Efl_Gfx_Base * subobj) |
157 | { | 159 | { |
158 | Evas_Object_Box_Option *opt; | 160 | Evas_Object_Box_Option *opt; |
159 | Evas_Object_Box_Data *priv; | 161 | Evas_Object_Box_Data *priv; |
@@ -237,7 +239,7 @@ _efl_canvas_layout_internal_box_efl_container_content_count(Eo *obj EINA_UNUSED, | |||
237 | } | 239 | } |
238 | 240 | ||
239 | EOLIAN static Efl_Orient | 241 | EOLIAN static Efl_Orient |
240 | _efl_canvas_layout_internal_box_efl_pack_linear_direction_get(Eo *obj EINA_UNUSED, Edje_Box_Data *pd) | 242 | _efl_canvas_layout_internal_box_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Edje_Box_Data *pd) |
241 | { | 243 | { |
242 | const Edje_Part_Description_Box *desc = | 244 | const Edje_Part_Description_Box *desc = |
243 | (Edje_Part_Description_Box *) pd->rp->chosen_description; | 245 | (Edje_Part_Description_Box *) pd->rp->chosen_description; |
@@ -308,16 +310,16 @@ _efl_canvas_layout_internal_table_efl_container_content_remove(Eo *obj, Edje_Tab | |||
308 | return efl_pack_unpack(obj, content); | 310 | return efl_pack_unpack(obj, content); |
309 | } | 311 | } |
310 | 312 | ||
311 | EOLIAN static void | 313 | EOLIAN static Eina_Bool |
312 | _efl_canvas_layout_internal_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Edje_Table_Data *pd) | 314 | _efl_canvas_layout_internal_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Edje_Table_Data *pd) |
313 | { | 315 | { |
314 | _edje_part_table_clear(pd->ed, pd->part, EINA_TRUE); | 316 | return _edje_part_table_clear(pd->ed, pd->part, EINA_TRUE); |
315 | } | 317 | } |
316 | 318 | ||
317 | EOLIAN static void | 319 | EOLIAN static Eina_Bool |
318 | _efl_canvas_layout_internal_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Edje_Table_Data *pd) | 320 | _efl_canvas_layout_internal_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Edje_Table_Data *pd) |
319 | { | 321 | { |
320 | _edje_part_table_clear(pd->ed, pd->part, EINA_FALSE); | 322 | return _edje_part_table_clear(pd->ed, pd->part, EINA_FALSE); |
321 | } | 323 | } |
322 | 324 | ||
323 | EOLIAN static Eina_Bool | 325 | EOLIAN static Eina_Bool |
@@ -326,14 +328,14 @@ _efl_canvas_layout_internal_table_efl_pack_unpack(Eo *obj EINA_UNUSED EINA_UNUSE | |||
326 | return _edje_part_table_unpack(pd->ed, pd->part, subobj); | 328 | return _edje_part_table_unpack(pd->ed, pd->part, subobj); |
327 | } | 329 | } |
328 | 330 | ||
329 | EOLIAN static void | 331 | EOLIAN static Eina_Bool |
330 | _efl_canvas_layout_internal_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, Efl_Gfx_Base *subobj, int col, int row, int colspan, int rowspan) | 332 | _efl_canvas_layout_internal_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, Efl_Gfx_Base *subobj, int col, int row, int colspan, int rowspan) |
331 | { | 333 | { |
332 | _edje_part_table_pack(pd->ed, pd->part, subobj, col, row, colspan, rowspan); | 334 | return _edje_part_table_pack(pd->ed, pd->part, subobj, col, row, colspan, rowspan); |
333 | } | 335 | } |
334 | 336 | ||
335 | EOLIAN static Efl_Gfx_Base * | 337 | EOLIAN static Efl_Gfx_Base * |
336 | _efl_canvas_layout_internal_table_efl_pack_grid_grid_content_at(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, int col, int row) | 338 | _efl_canvas_layout_internal_table_efl_pack_grid_grid_content_get(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, int col, int row) |
337 | { | 339 | { |
338 | return _edje_part_table_child_get(pd->ed, pd->part, col, row); | 340 | return _edje_part_table_child_get(pd->ed, pd->part, col, row); |
339 | } | 341 | } |
@@ -391,7 +393,7 @@ _table_item_iterator_free(Part_Item_Iterator *it) | |||
391 | } | 393 | } |
392 | 394 | ||
393 | EOLIAN static Eina_Iterator * | 395 | EOLIAN static Eina_Iterator * |
394 | _efl_canvas_layout_internal_table_efl_pack_grid_grid_content_iterate(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, int col, int row, Eina_Bool below) | 396 | _efl_canvas_layout_internal_table_efl_pack_grid_grid_contents_get(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, int col, int row, Eina_Bool below) |
395 | { | 397 | { |
396 | Evas_Object *sobj; | 398 | Evas_Object *sobj; |
397 | Eina_Iterator *it; | 399 | Eina_Iterator *it; |
@@ -433,7 +435,7 @@ _efl_canvas_layout_internal_table_efl_pack_grid_grid_content_iterate(Eo *obj EIN | |||
433 | } | 435 | } |
434 | 436 | ||
435 | EOLIAN static Eina_Bool | 437 | EOLIAN static Eina_Bool |
436 | _efl_canvas_layout_internal_table_efl_pack_grid_grid_content_position_get(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, Efl_Gfx_Base * subobj, int *col, int *row, int *colspan, int *rowspan) | 438 | _efl_canvas_layout_internal_table_efl_pack_grid_grid_position_get(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, Efl_Gfx_Base * subobj, int *col, int *row, int *colspan, int *rowspan) |
437 | { | 439 | { |
438 | unsigned short c, r, cs, rs; | 440 | unsigned short c, r, cs, rs; |
439 | Eina_Bool ret; | 441 | Eina_Bool ret; |
@@ -469,8 +471,7 @@ EAPI Eina_Bool | |||
469 | edje_object_part_box_append(Edje_Object *obj, const char *part, Evas_Object *child) | 471 | edje_object_part_box_append(Edje_Object *obj, const char *part, Evas_Object *child) |
470 | { | 472 | { |
471 | Eo *box = PART_BOX_GET(obj, part, EINA_FALSE); | 473 | Eo *box = PART_BOX_GET(obj, part, EINA_FALSE); |
472 | efl_pack_end(box, child); | 474 | return efl_pack_end(box, child); |
473 | return EINA_TRUE; | ||
474 | } | 475 | } |
475 | 476 | ||
476 | EAPI Eina_Bool | 477 | EAPI Eina_Bool |
@@ -499,15 +500,14 @@ EAPI Eina_Bool | |||
499 | edje_object_part_box_insert_at(Edje_Object *obj, const char *part, Evas_Object *child, unsigned int pos) | 500 | edje_object_part_box_insert_at(Edje_Object *obj, const char *part, Evas_Object *child, unsigned int pos) |
500 | { | 501 | { |
501 | Eo *box = PART_BOX_GET(obj, part, EINA_FALSE); | 502 | Eo *box = PART_BOX_GET(obj, part, EINA_FALSE); |
502 | efl_pack_insert(box, child, pos); | 503 | return efl_pack_at(box, child, pos); |
503 | return EINA_TRUE; | ||
504 | } | 504 | } |
505 | 505 | ||
506 | EAPI Evas_Object * | 506 | EAPI Evas_Object * |
507 | edje_object_part_box_remove_at(Edje_Object *obj, const char *part, unsigned int pos) | 507 | edje_object_part_box_remove_at(Edje_Object *obj, const char *part, unsigned int pos) |
508 | { | 508 | { |
509 | Eo *box = PART_BOX_GET(obj, part, NULL); | 509 | Eo *box = PART_BOX_GET(obj, part, NULL); |
510 | return efl_pack_content_at_remove(box, pos); | 510 | return efl_pack_unpack_at(box, pos); |
511 | } | 511 | } |
512 | 512 | ||
513 | EAPI Evas_Object * | 513 | EAPI Evas_Object * |
@@ -524,10 +524,9 @@ edje_object_part_box_remove_all(Edje_Object *obj, const char *part, Eina_Bool cl | |||
524 | { | 524 | { |
525 | Eo *box = PART_BOX_GET(obj, part, EINA_FALSE); | 525 | Eo *box = PART_BOX_GET(obj, part, EINA_FALSE); |
526 | if (clear) | 526 | if (clear) |
527 | efl_pack_clear(box); | 527 | return efl_pack_clear(box); |
528 | else | 528 | else |
529 | efl_pack_unpack_all(box); | 529 | return efl_pack_unpack_all(box); |
530 | return EINA_TRUE; | ||
531 | } | 530 | } |
532 | 531 | ||
533 | #ifdef DEBUG | 532 | #ifdef DEBUG |
@@ -550,8 +549,7 @@ EAPI Eina_Bool | |||
550 | edje_object_part_table_pack(Edje_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) | 549 | edje_object_part_table_pack(Edje_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) |
551 | { | 550 | { |
552 | Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE); | 551 | Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE); |
553 | efl_pack_grid(table, child_obj, col, row, colspan, rowspan); | 552 | return efl_pack_grid(table, child_obj, col, row, colspan, rowspan); |
554 | return EINA_TRUE; | ||
555 | } | 553 | } |
556 | 554 | ||
557 | EAPI Eina_Bool | 555 | EAPI Eina_Bool |
@@ -566,7 +564,7 @@ EAPI Evas_Object * | |||
566 | edje_object_part_table_child_get(const Edje_Object *obj, const char *part, unsigned int col, unsigned int row) | 564 | edje_object_part_table_child_get(const Edje_Object *obj, const char *part, unsigned int col, unsigned int row) |
567 | { | 565 | { |
568 | Eo *table = PART_TABLE_GET(obj, part, NULL); | 566 | Eo *table = PART_TABLE_GET(obj, part, NULL); |
569 | return efl_pack_grid_content_at(table, col, row); | 567 | return efl_pack_grid_content_get(table, col, row); |
570 | } | 568 | } |
571 | 569 | ||
572 | EAPI Eina_Bool | 570 | EAPI Eina_Bool |
@@ -581,10 +579,9 @@ edje_object_part_table_clear(Edje_Object *obj, const char *part, Eina_Bool clear | |||
581 | { | 579 | { |
582 | Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE); | 580 | Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE); |
583 | if (clear) | 581 | if (clear) |
584 | efl_pack_clear(table); | 582 | return efl_pack_clear(table); |
585 | else | 583 | else |
586 | efl_pack_unpack_all(table); | 584 | return efl_pack_unpack_all(table); |
587 | return EINA_TRUE; | ||
588 | } | 585 | } |
589 | 586 | ||
590 | #include "efl_canvas_layout_internal_box.eo.c" | 587 | #include "efl_canvas_layout_internal_box.eo.c" |
diff --git a/src/lib/edje/efl_canvas_layout_internal_box.eo b/src/lib/edje/efl_canvas_layout_internal_box.eo index eba515c91f..0a5e788b65 100644 --- a/src/lib/edje/efl_canvas_layout_internal_box.eo +++ b/src/lib/edje/efl_canvas_layout_internal_box.eo | |||
@@ -30,10 +30,10 @@ class Efl.Canvas.Layout_Internal.Box (Eo.Base, Efl.Pack_Linear) | |||
30 | Efl.Pack_Linear.pack_end; | 30 | Efl.Pack_Linear.pack_end; |
31 | Efl.Pack_Linear.pack_before; | 31 | Efl.Pack_Linear.pack_before; |
32 | Efl.Pack_Linear.pack_after; | 32 | Efl.Pack_Linear.pack_after; |
33 | Efl.Pack_Linear.pack_insert; | 33 | Efl.Pack_Linear.pack_at; |
34 | Efl.Pack_Linear.content_at.get; | 34 | Efl.Pack_Linear.pack_content_get; |
35 | Efl.Pack_Linear.content_at_remove; | 35 | Efl.Pack_Linear.pack_unpack_at; |
36 | Efl.Pack_Linear.content_index.get; | 36 | Efl.Pack_Linear.pack_index_get; |
37 | Efl.Pack_Linear.direction.get; | 37 | Efl.Pack_Linear.pack_direction.get; |
38 | } | 38 | } |
39 | } | 39 | } |
diff --git a/src/lib/edje/efl_canvas_layout_internal_table.eo b/src/lib/edje/efl_canvas_layout_internal_table.eo index 09a6f5cf3a..e661b51666 100644 --- a/src/lib/edje/efl_canvas_layout_internal_table.eo +++ b/src/lib/edje/efl_canvas_layout_internal_table.eo | |||
@@ -26,9 +26,9 @@ class Efl.Canvas.Layout_Internal.Table (Eo.Base, Efl.Pack_Grid) | |||
26 | Efl.Pack.unpack_all; | 26 | Efl.Pack.unpack_all; |
27 | Efl.Pack.unpack; | 27 | Efl.Pack.unpack; |
28 | Efl.Pack_Grid.pack_grid; | 28 | Efl.Pack_Grid.pack_grid; |
29 | Efl.Pack_Grid.grid_content_at; | 29 | Efl.Pack_Grid.grid_content_get; |
30 | Efl.Pack_Grid.grid_content_iterate; | 30 | Efl.Pack_Grid.grid_contents_get; |
31 | Efl.Pack_Grid.grid_content_position.get; | 31 | Efl.Pack_Grid.grid_position.get; |
32 | Efl.Pack_Grid.grid_size.get; | 32 | Efl.Pack_Grid.grid_size.get; |
33 | Efl.Pack_Grid.grid_columns.get; | 33 | Efl.Pack_Grid.grid_columns.get; |
34 | Efl.Pack_Grid.grid_rows.get; | 34 | Efl.Pack_Grid.grid_rows.get; |
diff --git a/src/lib/efl/interfaces/efl_pack.eo b/src/lib/efl/interfaces/efl_pack.eo index 127fc4a38a..76ffc48386 100644 --- a/src/lib/efl/interfaces/efl_pack.eo +++ b/src/lib/efl/interfaces/efl_pack.eo | |||
@@ -8,19 +8,21 @@ interface Efl.Pack (Efl.Container) | |||
8 | { | 8 | { |
9 | pack_clear { | 9 | pack_clear { |
10 | [[Removes all packed contents, and unreferences them.]] | 10 | [[Removes all packed contents, and unreferences them.]] |
11 | return: bool; | ||
11 | } | 12 | } |
12 | unpack_all { | 13 | unpack_all { |
13 | [[Removes all packed contents, without unreferencing them. | 14 | [[Removes all packed contents, without unreferencing them. |
14 | 15 | ||
15 | Use with caution. | 16 | Use with caution. |
16 | ]] | 17 | ]] |
18 | return: bool; | ||
17 | } | 19 | } |
18 | unpack { | 20 | unpack { |
19 | [[Removes an existing item from the container, without deleting it.]] | 21 | [[Removes an existing item from the container, without deleting it.]] |
20 | return: bool; [[$false if $subobj wasn't a child or can't be removed]] | ||
21 | params { | 22 | params { |
22 | subobj: own(Efl.Gfx.Base *); | 23 | subobj: own(Efl.Gfx.Base *); |
23 | } | 24 | } |
25 | return: bool; [[$false if $subobj wasn't a child or can't be removed]] | ||
24 | } | 26 | } |
25 | pack { | 27 | pack { |
26 | [[Adds an item to this container. | 28 | [[Adds an item to this container. |
@@ -35,6 +37,7 @@ interface Efl.Pack (Efl.Container) | |||
35 | params { | 37 | params { |
36 | subobj: own(Efl.Gfx.Base *); | 38 | subobj: own(Efl.Gfx.Base *); |
37 | } | 39 | } |
40 | return: bool; [[$false if $subobj could not be packed.]] | ||
38 | } | 41 | } |
39 | @property pack_align { | 42 | @property pack_align { |
40 | [[Alignment of the container within its bounds]] | 43 | [[Alignment of the container within its bounds]] |
diff --git a/src/lib/efl/interfaces/efl_pack_grid.eo b/src/lib/efl/interfaces/efl_pack_grid.eo index 32bccd9a6a..9b2b184ca0 100644 --- a/src/lib/efl/interfaces/efl_pack_grid.eo +++ b/src/lib/efl/interfaces/efl_pack_grid.eo | |||
@@ -14,8 +14,9 @@ interface Efl.Pack_Grid (Efl.Pack_Linear) | |||
14 | colspan: int @optional; [[0 means 1, -1 means @.grid_columns]] | 14 | colspan: int @optional; [[0 means 1, -1 means @.grid_columns]] |
15 | rowspan: int @optional; [[0 means 1, -1 means @.grid_rows]] | 15 | rowspan: int @optional; [[0 means 1, -1 means @.grid_rows]] |
16 | } | 16 | } |
17 | return: bool; | ||
17 | } | 18 | } |
18 | grid_content_iterate { | 19 | grid_contents_get { |
19 | [[Returns all objects at a given position in this grid.]] | 20 | [[Returns all objects at a given position in this grid.]] |
20 | return: free(own(iterator<Efl.Gfx.Base *> *), eina_iterator_free); | 21 | return: free(own(iterator<Efl.Gfx.Base *> *), eina_iterator_free); |
21 | params { | 22 | params { |
@@ -24,17 +25,16 @@ interface Efl.Pack_Grid (Efl.Pack_Linear) | |||
24 | @in below: bool @optional; [[If $true get objects spanning over this cell.]] | 25 | @in below: bool @optional; [[If $true get objects spanning over this cell.]] |
25 | } | 26 | } |
26 | } | 27 | } |
27 | grid_content_at { | 28 | grid_content_get { |
28 | [[Returns the first child at position, see @.grid_content_iterate.]] | 29 | [[Returns a child at a given position, see @.grid_contents_get.]] |
29 | return: Efl.Gfx.Base*; | 30 | return: Efl.Gfx.Base*; |
30 | params { | 31 | params { |
31 | @in col: int; | 32 | @in col: int; |
32 | @in row: int; | 33 | @in row: int; |
33 | } | 34 | } |
34 | } | 35 | } |
35 | @property grid_content_position { | 36 | @property grid_position { |
36 | [[position and span of the $subobj in this container, may be modified to move the $subobj]] | 37 | [[position and span of the $subobj in this container, may be modified to move the $subobj]] |
37 | set { [[same as grid_pack]] } | ||
38 | get { return: bool; [[returns false if item is not a child]] } | 38 | get { return: bool; [[returns false if item is not a child]] } |
39 | keys { | 39 | keys { |
40 | subobj: Efl.Gfx.Base*; | 40 | subobj: Efl.Gfx.Base*; |
@@ -69,10 +69,10 @@ interface Efl.Pack_Grid (Efl.Pack_Linear) | |||
69 | rows: int; | 69 | rows: int; |
70 | } | 70 | } |
71 | } | 71 | } |
72 | @property directions { | 72 | @property grid_directions { |
73 | [[Primary and secondary up/left/right/down orientations for linear apis. | 73 | [[Primary and secondary up/left/right/down orientations for linear apis. |
74 | 74 | ||
75 | Default is right and down. Overrides @Efl.Pack_Linear.direction. | 75 | Default is right and down. Overrides @Efl.Pack_Linear.pack_direction. |
76 | ]] | 76 | ]] |
77 | set {} | 77 | set {} |
78 | get {} | 78 | get {} |
diff --git a/src/lib/efl/interfaces/efl_pack_linear.eo b/src/lib/efl/interfaces/efl_pack_linear.eo index 4a9f696a0f..3ff3f017b6 100644 --- a/src/lib/efl/interfaces/efl_pack_linear.eo +++ b/src/lib/efl/interfaces/efl_pack_linear.eo | |||
@@ -10,59 +10,72 @@ interface Efl.Pack_Linear (Efl.Pack) | |||
10 | pack_begin { | 10 | pack_begin { |
11 | [[Prepend an object at the beginning of this container. | 11 | [[Prepend an object at the beginning of this container. |
12 | 12 | ||
13 | This is the same as @.pack_insert($subobj, 0). | 13 | This is the same as @.pack_at($subobj, 0). |
14 | ]] | 14 | ]] |
15 | params { | 15 | params { |
16 | @in subobj: own(Efl.Gfx.Base *); | 16 | @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]] |
17 | } | 17 | } |
18 | return: bool; [[$false if $subobj could not be packed]] | ||
18 | } | 19 | } |
19 | pack_end { | 20 | pack_end { |
20 | [[Append object at the end of this container. | 21 | [[Append object at the end of this container. |
21 | 22 | ||
22 | This is the same as @.pack_insert($subobj, -1). | 23 | This is the same as @.pack_at($subobj, -1). |
23 | ]] | 24 | ]] |
24 | params { | 25 | params { |
25 | @in subobj: own(Efl.Gfx.Base *); | 26 | @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]] |
26 | } | 27 | } |
28 | return: bool; [[$false if $subobj could not be packed]] | ||
27 | } | 29 | } |
28 | pack_before { | 30 | pack_before { |
29 | [[Prepend item before other sub object.]] | 31 | [[Prepend item before other sub object.]] |
30 | return: bool @warn_unused; [[returns $false if $existing could not be found]] | ||
31 | params { | 32 | params { |
32 | @in subobj: own(Efl.Gfx.Base *); | 33 | @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]] |
33 | @in existing: const(Efl.Gfx.Base)*; | 34 | @in existing: const(Efl.Gfx.Base)*; [[Item to refer to.]] |
34 | } | 35 | } |
36 | return: bool; [[$false if $existing could not be found or $subobj | ||
37 | could not be packed]] | ||
35 | } | 38 | } |
36 | pack_after { | 39 | pack_after { |
37 | [[Append item after other sub object.]] | 40 | [[Append item after other sub object.]] |
38 | return: bool @warn_unused; [[returns $false if $existing could not be found]] | ||
39 | params { | 41 | params { |
40 | @in subobj: own(Efl.Gfx.Base *); | 42 | @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]] |
41 | @in existing: const(Efl.Gfx.Base)*; | 43 | @in existing: const(Efl.Gfx.Base)*; [[Item to refer to.]] |
42 | } | 44 | } |
45 | return: bool; [[$false if $existing could not be found or $subobj | ||
46 | could not be packed]] | ||
43 | } | 47 | } |
44 | pack_insert { | 48 | pack_at { |
45 | [[Inserts $subobj at the specified $index. If $index is not valid, appends.]] | 49 | [[Inserts $subobj at the specified $index. |
50 | |||
51 | Valid range: -$count to +$count. -1 refers to the last element. | ||
52 | Out of range indices will trigger an append. | ||
53 | ]] | ||
46 | params { | 54 | params { |
47 | @in subobj: own(Efl.Gfx.Base *); | 55 | @in subobj: own(Efl.Gfx.Base *); [[Item to pack.]] |
48 | @in index: int; | 56 | @in index: int; [[A position.]] |
49 | } | 57 | } |
58 | return: bool; [[$false if $subobj could not be packed]] | ||
50 | } | 59 | } |
51 | @property content_at { | 60 | pack_content_get { |
52 | [[Content at a given index in this container. | 61 | [[Content at a given index in this container. |
53 | 62 | ||
54 | Index -1 refers to the last item. | 63 | Index -1 refers to the last item. The valid range is -(count - 1) to |
64 | (count - 1). | ||
55 | ]] | 65 | ]] |
56 | /* set {} - can be defined */ | 66 | params { |
57 | get {} | ||
58 | keys { | ||
59 | index: int; | 67 | index: int; |
60 | } | 68 | } |
61 | values { | 69 | return: Efl.Gfx.Base *; [[The object contained at the given $index.]] |
62 | subobj: Efl.Gfx.Base *; | 70 | } |
71 | pack_index_get { | ||
72 | [[Get the index of a child in this container.]] | ||
73 | params { | ||
74 | subobj: const(Efl.Gfx.Base)*; [[An object contained in this pack.]] | ||
63 | } | 75 | } |
76 | return: int(-1); [[-1 in case of failure, or the index of this item.]] | ||
64 | } | 77 | } |
65 | content_at_remove { | 78 | pack_unpack_at { |
66 | [[Pop out item at specified $index. | 79 | [[Pop out item at specified $index. |
67 | 80 | ||
68 | Equivalent to unpack(content_at($index)). | 81 | Equivalent to unpack(content_at($index)). |
@@ -72,22 +85,7 @@ interface Efl.Pack_Linear (Efl.Pack) | |||
72 | } | 85 | } |
73 | return: Efl.Gfx.Base*; [[The child item if it could be removed.]] | 86 | return: Efl.Gfx.Base*; [[The child item if it could be removed.]] |
74 | } | 87 | } |
75 | @property content_index { | 88 | @property pack_direction { |
76 | [[Index of the child in this container, may be modified to move the $subobj.]] | ||
77 | set { | ||
78 | |||
79 | return: bool; [[Returns $false if $subobj is not a child. | ||
80 | Negative values can be used to refer to the end.]] | ||
81 | } | ||
82 | get {} | ||
83 | keys { | ||
84 | subobj: Efl.Gfx.Base *; | ||
85 | } | ||
86 | values { | ||
87 | index: int; | ||
88 | } | ||
89 | } | ||
90 | @property direction { | ||
91 | [[Primary up/left/right/down orientation. Default is right.]] | 89 | [[Primary up/left/right/down orientation. Default is right.]] |
92 | set {} | 90 | set {} |
93 | get {} | 91 | get {} |
diff --git a/src/lib/elementary/efl_ui_box.c b/src/lib/elementary/efl_ui_box.c index 3bc0fe7893..157b462d57 100644 --- a/src/lib/elementary/efl_ui_box.c +++ b/src/lib/elementary/efl_ui_box.c | |||
@@ -283,32 +283,40 @@ _efl_ui_box_efl_container_content_count(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED | |||
283 | return bd ? eina_list_count(bd->children) : 0; | 283 | return bd ? eina_list_count(bd->children) : 0; |
284 | } | 284 | } |
285 | 285 | ||
286 | EOLIAN static void | 286 | EOLIAN static Eina_Bool |
287 | _efl_ui_box_efl_pack_pack_clear(Eo *obj, Efl_Ui_Box_Data *pd) | 287 | _efl_ui_box_efl_pack_pack_clear(Eo *obj, Efl_Ui_Box_Data *pd) |
288 | { | 288 | { |
289 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 289 | Eina_Bool ret; |
290 | 290 | ||
291 | evas_object_box_remove_all(wd->resize_obj, EINA_TRUE); | 291 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); |
292 | |||
293 | ret = evas_object_box_remove_all(wd->resize_obj, EINA_TRUE); | ||
292 | _sizing_eval(obj, pd); | 294 | _sizing_eval(obj, pd); |
295 | |||
296 | return ret; | ||
293 | } | 297 | } |
294 | 298 | ||
295 | EOLIAN static void | 299 | EOLIAN static Eina_Bool |
296 | _efl_ui_box_efl_pack_unpack_all(Eo *obj, Efl_Ui_Box_Data *pd) | 300 | _efl_ui_box_efl_pack_unpack_all(Eo *obj, Efl_Ui_Box_Data *pd) |
297 | { | 301 | { |
298 | Evas_Object_Box_Data *bd; | 302 | Evas_Object_Box_Data *bd; |
299 | Evas_Object_Box_Option *opt; | 303 | Evas_Object_Box_Option *opt; |
300 | Eina_List *l; | 304 | Eina_List *l; |
301 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 305 | Eina_Bool ret; |
306 | |||
307 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); | ||
302 | 308 | ||
303 | /* set this to block _sizing_eval() calls */ | 309 | /* set this to block _sizing_eval() calls */ |
304 | pd->delete_me = EINA_TRUE; | 310 | pd->delete_me = EINA_TRUE; |
305 | bd = evas_object_smart_data_get(wd->resize_obj); | 311 | bd = evas_object_smart_data_get(wd->resize_obj); |
306 | EINA_LIST_FOREACH (bd->children, l, opt) | 312 | EINA_LIST_FOREACH(bd->children, l, opt) |
307 | elm_widget_sub_object_del(obj, opt->obj); | 313 | elm_widget_sub_object_del(obj, opt->obj); |
308 | pd->delete_me = EINA_FALSE; | 314 | pd->delete_me = EINA_FALSE; |
309 | 315 | ||
310 | evas_object_box_remove_all(wd->resize_obj, EINA_FALSE); | 316 | ret = evas_object_box_remove_all(wd->resize_obj, EINA_FALSE); |
311 | _sizing_eval(obj, pd); | 317 | _sizing_eval(obj, pd); |
318 | |||
319 | return ret; | ||
312 | } | 320 | } |
313 | 321 | ||
314 | EOLIAN static Eina_Bool | 322 | EOLIAN static Eina_Bool |
@@ -326,28 +334,36 @@ _efl_ui_box_efl_pack_unpack(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Gfx_Base *subobj) | |||
326 | return ret; | 334 | return ret; |
327 | } | 335 | } |
328 | 336 | ||
329 | EOLIAN static void | 337 | EOLIAN static Eina_Bool |
330 | _efl_ui_box_efl_pack_pack(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj) | 338 | _efl_ui_box_efl_pack_pack(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj) |
331 | { | 339 | { |
332 | efl_pack_end(obj, subobj); | 340 | return efl_pack_end(obj, subobj); |
333 | } | 341 | } |
334 | 342 | ||
335 | EOLIAN static void | 343 | EOLIAN static Eina_Bool |
336 | _efl_ui_box_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj) | 344 | _efl_ui_box_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj) |
337 | { | 345 | { |
338 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 346 | Eina_Bool ret; |
339 | 347 | ||
340 | elm_widget_sub_object_add(obj, subobj); | 348 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); |
341 | evas_object_box_append(wd->resize_obj, subobj); | 349 | |
350 | ret = elm_widget_sub_object_add(obj, subobj); | ||
351 | ret &= (evas_object_box_append(wd->resize_obj, subobj) != NULL); | ||
352 | |||
353 | return ret; | ||
342 | } | 354 | } |
343 | 355 | ||
344 | EOLIAN static void | 356 | EOLIAN static Eina_Bool |
345 | _efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Gfx_Base *subobj) | 357 | _efl_ui_box_efl_pack_linear_pack_begin(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED, Efl_Gfx_Base *subobj) |
346 | { | 358 | { |
347 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 359 | Eina_Bool ret; |
348 | 360 | ||
349 | elm_widget_sub_object_add(obj, subobj); | 361 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); |
350 | evas_object_box_prepend(wd->resize_obj, subobj); | 362 | |
363 | ret = elm_widget_sub_object_add(obj, subobj); | ||
364 | ret &= (evas_object_box_prepend(wd->resize_obj, subobj) != NULL); | ||
365 | |||
366 | return ret; | ||
351 | } | 367 | } |
352 | 368 | ||
353 | EOLIAN static Eina_Bool | 369 | EOLIAN static Eina_Bool |
@@ -384,20 +400,21 @@ _efl_ui_box_efl_pack_linear_pack_after(Eo *obj, Efl_Ui_Box_Data *_pd EINA_UNUSED | |||
384 | return EINA_TRUE; | 400 | return EINA_TRUE; |
385 | } | 401 | } |
386 | 402 | ||
387 | EOLIAN static void | 403 | EOLIAN static Eina_Bool |
388 | _efl_ui_box_efl_pack_linear_pack_insert(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, | 404 | _efl_ui_box_efl_pack_linear_pack_at(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, |
389 | Efl_Gfx_Base *subobj, int index) | 405 | Efl_Gfx_Base *subobj, int index) |
390 | { | 406 | { |
391 | if (!index) | 407 | if (!index) |
392 | efl_pack_begin(obj, subobj); | 408 | return efl_pack_begin(obj, subobj); |
393 | else if (index == -1) | 409 | else if (index == -1) |
394 | efl_pack_end(obj, subobj); | 410 | return efl_pack_end(obj, subobj); |
395 | else | 411 | else |
396 | { | 412 | { |
397 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | ||
398 | Evas_Object_Box_Data *bd; | 413 | Evas_Object_Box_Data *bd; |
399 | int cnt; | 414 | int cnt; |
400 | 415 | ||
416 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); | ||
417 | |||
401 | bd = evas_object_smart_data_get(wd->resize_obj); | 418 | bd = evas_object_smart_data_get(wd->resize_obj); |
402 | cnt = eina_list_count(bd ? bd->children : NULL); | 419 | cnt = eina_list_count(bd ? bd->children : NULL); |
403 | if (!cnt) | 420 | if (!cnt) |
@@ -407,7 +424,7 @@ _efl_ui_box_efl_pack_linear_pack_insert(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED | |||
407 | index %= cnt; | 424 | index %= cnt; |
408 | if (index < 0) index += cnt; | 425 | if (index < 0) index += cnt; |
409 | } | 426 | } |
410 | evas_object_box_insert_at(wd->resize_obj, subobj, index); | 427 | return (evas_object_box_insert_at(wd->resize_obj, subobj, index) != NULL); |
411 | } | 428 | } |
412 | } | 429 | } |
413 | 430 | ||
@@ -418,7 +435,7 @@ _box_item(Evas_Object_Box_Option *opt) | |||
418 | } | 435 | } |
419 | 436 | ||
420 | EOLIAN static Efl_Gfx_Base * | 437 | EOLIAN static Efl_Gfx_Base * |
421 | _efl_ui_box_efl_pack_linear_content_at_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, | 438 | _efl_ui_box_efl_pack_linear_pack_content_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, |
422 | int index) | 439 | int index) |
423 | { | 440 | { |
424 | Evas_Object_Box_Data *bd; | 441 | Evas_Object_Box_Data *bd; |
@@ -449,12 +466,12 @@ _efl_ui_box_efl_pack_linear_content_at_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNU | |||
449 | } | 466 | } |
450 | 467 | ||
451 | EOLIAN static Efl_Gfx_Base * | 468 | EOLIAN static Efl_Gfx_Base * |
452 | _efl_ui_box_efl_pack_linear_content_at_remove(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, | 469 | _efl_ui_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, |
453 | int index) | 470 | int index) |
454 | { | 471 | { |
455 | Efl_Gfx_Base *content; | 472 | Efl_Gfx_Base *content; |
456 | 473 | ||
457 | content = efl_pack_content_at_get(obj, index); | 474 | content = efl_pack_content_get(obj, index); |
458 | if (!content) return NULL; | 475 | if (!content) return NULL; |
459 | 476 | ||
460 | if (!efl_pack_unpack(obj, content)) | 477 | if (!efl_pack_unpack(obj, content)) |
@@ -464,8 +481,8 @@ _efl_ui_box_efl_pack_linear_content_at_remove(Eo *obj, Efl_Ui_Box_Data *pd EINA_ | |||
464 | } | 481 | } |
465 | 482 | ||
466 | EOLIAN static int | 483 | EOLIAN static int |
467 | _efl_ui_box_efl_pack_linear_content_index_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, | 484 | _efl_ui_box_efl_pack_linear_pack_index_get(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, |
468 | Efl_Gfx_Base *subobj) | 485 | const Efl_Gfx_Base *subobj) |
469 | { | 486 | { |
470 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, -1); | 487 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, -1); |
471 | Evas_Object_Box_Data *bd; | 488 | Evas_Object_Box_Data *bd; |
@@ -490,35 +507,6 @@ end: | |||
490 | return -1; | 507 | return -1; |
491 | } | 508 | } |
492 | 509 | ||
493 | EOLIAN static Eina_Bool | ||
494 | _efl_ui_box_efl_pack_linear_content_index_set(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED, | ||
495 | Efl_Gfx_Base *subobj, int index) | ||
496 | { | ||
497 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); | ||
498 | Evas_Object_Box_Data *bd; | ||
499 | int cnt; | ||
500 | |||
501 | if (evas_object_smart_parent_get(subobj) != wd->resize_obj) | ||
502 | { | ||
503 | ERR("object %p (%s) is not a child of %p (%s)", | ||
504 | subobj, eo_class_name_get(subobj), obj, eo_class_name_get(obj)); | ||
505 | return EINA_FALSE; | ||
506 | } | ||
507 | |||
508 | bd = evas_object_smart_data_get(wd->resize_obj); | ||
509 | cnt = eina_list_count(bd->children); | ||
510 | if (!cnt) | ||
511 | { | ||
512 | efl_pack(obj, subobj); | ||
513 | return EINA_TRUE; | ||
514 | } | ||
515 | |||
516 | index %= cnt; | ||
517 | if (index < 0) index += index; | ||
518 | |||
519 | return (evas_object_box_insert_at(wd->resize_obj, subobj, index) != NULL); | ||
520 | } | ||
521 | |||
522 | EOLIAN static void | 510 | EOLIAN static void |
523 | _efl_ui_box_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) | 511 | _efl_ui_box_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUSED) |
524 | { | 512 | { |
@@ -575,7 +563,7 @@ _efl_ui_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Box_Data *pd EINA_UNUS | |||
575 | } | 563 | } |
576 | 564 | ||
577 | EOLIAN static void | 565 | EOLIAN static void |
578 | _efl_ui_box_efl_pack_linear_direction_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Orient dir) | 566 | _efl_ui_box_efl_pack_linear_pack_direction_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Orient dir) |
579 | { | 567 | { |
580 | switch (dir) | 568 | switch (dir) |
581 | { | 569 | { |
@@ -595,7 +583,7 @@ _efl_ui_box_efl_pack_linear_direction_set(Eo *obj, Efl_Ui_Box_Data *pd, Efl_Orie | |||
595 | } | 583 | } |
596 | 584 | ||
597 | EOLIAN static Efl_Orient | 585 | EOLIAN static Efl_Orient |
598 | _efl_ui_box_efl_pack_linear_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd) | 586 | _efl_ui_box_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd) |
599 | { | 587 | { |
600 | return pd->orient; | 588 | return pd->orient; |
601 | } | 589 | } |
diff --git a/src/lib/elementary/efl_ui_box.eo b/src/lib/elementary/efl_ui_box.eo index cce2956ab3..ccf865c8db 100644 --- a/src/lib/elementary/efl_ui_box.eo +++ b/src/lib/elementary/efl_ui_box.eo | |||
@@ -30,13 +30,12 @@ class Efl.Ui.Box (Elm.Widget, Efl.Pack_Linear, Efl.Pack_Layout) | |||
30 | Efl.Pack_Linear.pack_end; | 30 | Efl.Pack_Linear.pack_end; |
31 | Efl.Pack_Linear.pack_before; | 31 | Efl.Pack_Linear.pack_before; |
32 | Efl.Pack_Linear.pack_after; | 32 | Efl.Pack_Linear.pack_after; |
33 | Efl.Pack_Linear.pack_insert; | 33 | Efl.Pack_Linear.pack_at; |
34 | Efl.Pack_Linear.content_at.get; | 34 | Efl.Pack_Linear.pack_content_get; |
35 | Efl.Pack_Linear.content_at_remove; | 35 | Efl.Pack_Linear.pack_unpack_at; |
36 | Efl.Pack_Linear.content_index.get; | 36 | Efl.Pack_Linear.pack_index_get; |
37 | Efl.Pack_Linear.content_index.set; | 37 | Efl.Pack_Linear.pack_direction.set; |
38 | Efl.Pack_Linear.direction.set; | 38 | Efl.Pack_Linear.pack_direction.get; |
39 | Efl.Pack_Linear.direction.get; | ||
40 | 39 | ||
41 | // Custom layouts | 40 | // Custom layouts |
42 | Efl.Pack_Layout.layout_update; | 41 | Efl.Pack_Layout.layout_update; |
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_grid.c index 62cb3f0824..bc13d964c7 100644 --- a/src/lib/elementary/efl_ui_grid.c +++ b/src/lib/elementary/efl_ui_grid.c | |||
@@ -407,13 +407,14 @@ _subobj_del_cb(void *data, const Eo_Event *event) | |||
407 | return EO_CALLBACK_CONTINUE; | 407 | return EO_CALLBACK_CONTINUE; |
408 | } | 408 | } |
409 | 409 | ||
410 | static void | 410 | static Eina_Bool |
411 | _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj, | 411 | _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj, |
412 | int col, int row, int colspan, int rowspan, Eina_Bool linear) | 412 | int col, int row, int colspan, int rowspan, Eina_Bool linear) |
413 | { | 413 | { |
414 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | ||
415 | Grid_Item *gi = NULL; | 414 | Grid_Item *gi = NULL; |
416 | 415 | ||
416 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); | ||
417 | |||
417 | if (col < 0) col = 0; | 418 | if (col < 0) col = 0; |
418 | if (row < 0) row = 0; | 419 | if (row < 0) row = 0; |
419 | 420 | ||
@@ -468,35 +469,21 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj, | |||
468 | eo_event_callback_array_add(subobj, subobj_callbacks(), obj); | 469 | eo_event_callback_array_add(subobj, subobj_callbacks(), obj); |
469 | } | 470 | } |
470 | 471 | ||
471 | evas_object_table_pack(wd->resize_obj, subobj, col, row, colspan, rowspan); | 472 | return evas_object_table_pack(wd->resize_obj, subobj, col, row, colspan, rowspan); |
472 | } | 473 | } |
473 | 474 | ||
474 | EOLIAN static void | 475 | EOLIAN static Eina_Bool |
475 | _efl_ui_grid_efl_pack_grid_pack_grid(Eo *obj, Efl_Ui_Grid_Data *pd, | 476 | _efl_ui_grid_efl_pack_grid_pack_grid(Eo *obj, Efl_Ui_Grid_Data *pd, |
476 | Efl_Gfx_Base *subobj, | 477 | Efl_Gfx_Base *subobj, |
477 | int col, int row, int colspan, int rowspan) | 478 | int col, int row, int colspan, int rowspan) |
478 | { | 479 | { |
479 | EINA_SAFETY_ON_NULL_RETURN(subobj); | 480 | EINA_SAFETY_ON_NULL_RETURN_VAL(subobj, EINA_FALSE); |
480 | |||
481 | _pack_at(obj, pd, subobj, col, row, colspan, rowspan, EINA_FALSE); | ||
482 | } | ||
483 | |||
484 | EOLIAN static void | ||
485 | _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) | ||
486 | { | ||
487 | EINA_SAFETY_ON_NULL_RETURN(subobj); | ||
488 | |||
489 | if (obj != elm_widget_parent_widget_get(subobj)) | ||
490 | { | ||
491 | ERR("object %p is not a child of %p", subobj, obj); | ||
492 | return; | ||
493 | } | ||
494 | 481 | ||
495 | _pack_at(obj, pd, subobj, col, row, colspan, rowspan, EINA_FALSE); | 482 | return _pack_at(obj, pd, subobj, col, row, colspan, rowspan, EINA_FALSE); |
496 | } | 483 | } |
497 | 484 | ||
498 | EOLIAN static Eina_Bool | 485 | EOLIAN static Eina_Bool |
499 | _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) | 486 | _efl_ui_grid_efl_pack_grid_grid_position_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Evas_Object *subobj, int *col, int *row, int *colspan, int *rowspan) |
500 | { | 487 | { |
501 | int c = -1, r = -1, cs = 0, rs = 0; | 488 | int c = -1, r = -1, cs = 0, rs = 0; |
502 | Grid_Item *gi; | 489 | Grid_Item *gi; |
@@ -528,7 +515,7 @@ end: | |||
528 | } | 515 | } |
529 | 516 | ||
530 | EOLIAN static Efl_Gfx_Base * | 517 | EOLIAN static Efl_Gfx_Base * |
531 | _efl_ui_grid_efl_pack_grid_grid_content_at(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int col, int row) | 518 | _efl_ui_grid_efl_pack_grid_grid_content_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int col, int row) |
532 | { | 519 | { |
533 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); | 520 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL); |
534 | 521 | ||
@@ -608,20 +595,22 @@ _efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj | |||
608 | return EINA_FALSE; | 595 | return EINA_FALSE; |
609 | } | 596 | } |
610 | 597 | ||
611 | EOLIAN static void | 598 | EOLIAN static Eina_Bool |
612 | _efl_ui_grid_efl_pack_pack_clear(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) | 599 | _efl_ui_grid_efl_pack_pack_clear(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) |
613 | { | 600 | { |
614 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 601 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); |
615 | 602 | ||
616 | evas_object_table_clear(wd->resize_obj, EINA_TRUE); | 603 | evas_object_table_clear(wd->resize_obj, EINA_TRUE); |
604 | return EINA_TRUE; | ||
617 | } | 605 | } |
618 | 606 | ||
619 | EOLIAN static void | 607 | EOLIAN static Eina_Bool |
620 | _efl_ui_grid_efl_pack_unpack_all(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) | 608 | _efl_ui_grid_efl_pack_unpack_all(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED) |
621 | { | 609 | { |
622 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); | 610 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); |
623 | 611 | ||
624 | evas_object_table_clear(wd->resize_obj, EINA_FALSE); | 612 | evas_object_table_clear(wd->resize_obj, EINA_FALSE); |
613 | return EINA_TRUE; | ||
625 | } | 614 | } |
626 | 615 | ||
627 | EOLIAN static void | 616 | EOLIAN static void |
@@ -696,7 +685,7 @@ _efl_ui_grid_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data * | |||
696 | } | 685 | } |
697 | 686 | ||
698 | EOLIAN static Eina_Iterator * | 687 | EOLIAN static Eina_Iterator * |
699 | _efl_ui_grid_efl_pack_grid_grid_content_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, | 688 | _efl_ui_grid_efl_pack_grid_grid_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, |
700 | int col, int row, Eina_Bool below) | 689 | int col, int row, Eina_Bool below) |
701 | { | 690 | { |
702 | Eina_List *list, *atlist = NULL; | 691 | Eina_List *list, *atlist = NULL; |
@@ -724,7 +713,7 @@ _efl_ui_grid_efl_pack_grid_grid_content_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EI | |||
724 | } | 713 | } |
725 | 714 | ||
726 | EOLIAN static void | 715 | EOLIAN static void |
727 | _efl_ui_grid_efl_pack_linear_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient orient) | 716 | _efl_ui_grid_efl_pack_linear_pack_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient orient) |
728 | { | 717 | { |
729 | EINA_SAFETY_ON_FALSE_RETURN((orient % 90) == 0); | 718 | EINA_SAFETY_ON_FALSE_RETURN((orient % 90) == 0); |
730 | 719 | ||
@@ -744,13 +733,13 @@ _efl_ui_grid_efl_pack_linear_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Or | |||
744 | } | 733 | } |
745 | 734 | ||
746 | EOLIAN static Efl_Orient | 735 | EOLIAN static Efl_Orient |
747 | _efl_ui_grid_efl_pack_linear_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd) | 736 | _efl_ui_grid_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd) |
748 | { | 737 | { |
749 | return pd->dir1; | 738 | return pd->dir1; |
750 | } | 739 | } |
751 | 740 | ||
752 | EOLIAN static void | 741 | EOLIAN static void |
753 | _efl_ui_grid_efl_pack_grid_directions_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient primary, Efl_Orient secondary) | 742 | _efl_ui_grid_efl_pack_grid_grid_directions_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Orient primary, Efl_Orient secondary) |
754 | { | 743 | { |
755 | EINA_SAFETY_ON_FALSE_RETURN((primary % 90) == 0); | 744 | EINA_SAFETY_ON_FALSE_RETURN((primary % 90) == 0); |
756 | EINA_SAFETY_ON_FALSE_RETURN((secondary % 90) == 0); | 745 | EINA_SAFETY_ON_FALSE_RETURN((secondary % 90) == 0); |
@@ -778,7 +767,7 @@ _efl_ui_grid_efl_pack_grid_directions_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ori | |||
778 | } | 767 | } |
779 | 768 | ||
780 | EOLIAN static void | 769 | EOLIAN static void |
781 | _efl_ui_grid_efl_pack_grid_directions_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Efl_Orient *primary, Efl_Orient *secondary) | 770 | _efl_ui_grid_efl_pack_grid_grid_directions_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Efl_Orient *primary, Efl_Orient *secondary) |
782 | { | 771 | { |
783 | if (primary) *primary = pd->dir1; | 772 | if (primary) *primary = pd->dir1; |
784 | if (secondary) *secondary = pd->dir2; | 773 | if (secondary) *secondary = pd->dir2; |
@@ -845,17 +834,17 @@ _efl_ui_grid_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data * | |||
845 | return pd->req_rows; | 834 | return pd->req_rows; |
846 | } | 835 | } |
847 | 836 | ||
848 | EOLIAN static void | 837 | EOLIAN static Eina_Bool |
849 | _efl_ui_grid_efl_pack_pack(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj) | 838 | _efl_ui_grid_efl_pack_pack(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Efl_Gfx_Base *subobj) |
850 | { | 839 | { |
851 | /* this is just an alias */ | 840 | /* this is just an alias */ |
852 | efl_pack_end(obj, subobj); | 841 | return efl_pack_end(obj, subobj); |
853 | } | 842 | } |
854 | 843 | ||
855 | EOLIAN static void | 844 | EOLIAN static Eina_Bool |
856 | _efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj) | 845 | _efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Base *subobj) |
857 | { | 846 | { |
858 | EINA_SAFETY_ON_NULL_RETURN(subobj); | 847 | EINA_SAFETY_ON_NULL_RETURN_VAL(subobj, EINA_FALSE); |
859 | 848 | ||
860 | int col = pd->last_col; | 849 | int col = pd->last_col; |
861 | int row = pd->last_row; | 850 | int row = pd->last_row; |
@@ -885,7 +874,7 @@ _efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx_Bas | |||
885 | pd->last_row = row; | 874 | pd->last_row = row; |
886 | 875 | ||
887 | DBG("packing new obj at %d,%d", col, row); | 876 | DBG("packing new obj at %d,%d", col, row); |
888 | _pack_at(obj, pd, subobj, col, row, 1, 1, EINA_TRUE); | 877 | return _pack_at(obj, pd, subobj, col, row, 1, 1, EINA_TRUE); |
889 | } | 878 | } |
890 | 879 | ||
891 | #include "efl_ui_grid.eo.c" | 880 | #include "efl_ui_grid.eo.c" |
diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_grid.eo index a6ee16a074..775273b855 100644 --- a/src/lib/elementary/efl_ui_grid.eo +++ b/src/lib/elementary/efl_ui_grid.eo | |||
@@ -26,21 +26,20 @@ class Efl.Ui.Grid (Elm.Widget, Efl.Pack_Grid, Efl.Pack_Layout) | |||
26 | Efl.Pack.pack_padding.get; | 26 | Efl.Pack.pack_padding.get; |
27 | Efl.Pack.pack_padding.set; | 27 | Efl.Pack.pack_padding.set; |
28 | Efl.Pack_Grid.pack_grid; | 28 | Efl.Pack_Grid.pack_grid; |
29 | Efl.Pack_Grid.grid_content_at; | 29 | Efl.Pack_Grid.grid_content_get; |
30 | Efl.Pack_Grid.grid_content_iterate; | 30 | Efl.Pack_Grid.grid_contents_get; |
31 | Efl.Pack_Grid.grid_content_position.set; | 31 | Efl.Pack_Grid.grid_position.get; |
32 | Efl.Pack_Grid.grid_content_position.get; | ||
33 | Efl.Pack_Grid.grid_size.set; | 32 | Efl.Pack_Grid.grid_size.set; |
34 | Efl.Pack_Grid.grid_size.get; | 33 | Efl.Pack_Grid.grid_size.get; |
35 | Efl.Pack_Grid.grid_columns.set; | 34 | Efl.Pack_Grid.grid_columns.set; |
36 | Efl.Pack_Grid.grid_columns.get; | 35 | Efl.Pack_Grid.grid_columns.get; |
37 | Efl.Pack_Grid.grid_rows.set; | 36 | Efl.Pack_Grid.grid_rows.set; |
38 | Efl.Pack_Grid.grid_rows.get; | 37 | Efl.Pack_Grid.grid_rows.get; |
39 | Efl.Pack_Grid.directions.set; | 38 | Efl.Pack_Grid.grid_directions.set; |
40 | Efl.Pack_Grid.directions.get; | 39 | Efl.Pack_Grid.grid_directions.get; |
41 | Efl.Pack_Linear.pack_end; | 40 | Efl.Pack_Linear.pack_end; |
42 | Efl.Pack_Linear.direction.set; | 41 | Efl.Pack_Linear.pack_direction.set; |
43 | Efl.Pack_Linear.direction.get; | 42 | Efl.Pack_Linear.pack_direction.get; |
44 | 43 | ||
45 | // Custom layouts | 44 | // Custom layouts |
46 | Efl.Pack_Layout.layout_update; | 45 | Efl.Pack_Layout.layout_update; |
diff --git a/src/lib/elementary/efl_ui_layout_internal_box.eo b/src/lib/elementary/efl_ui_layout_internal_box.eo index 3efb952282..3ba8b8f98c 100644 --- a/src/lib/elementary/efl_ui_layout_internal_box.eo +++ b/src/lib/elementary/efl_ui_layout_internal_box.eo | |||
@@ -31,10 +31,10 @@ class Efl.Ui.Layout_Internal.Box (Eo.Base, Efl.Pack_Linear) | |||
31 | Efl.Pack_Linear.pack_end; | 31 | Efl.Pack_Linear.pack_end; |
32 | Efl.Pack_Linear.pack_before; | 32 | Efl.Pack_Linear.pack_before; |
33 | Efl.Pack_Linear.pack_after; | 33 | Efl.Pack_Linear.pack_after; |
34 | Efl.Pack_Linear.pack_insert; | 34 | Efl.Pack_Linear.pack_at; |
35 | Efl.Pack_Linear.content_at.get; | 35 | Efl.Pack_Linear.pack_content_get; |
36 | Efl.Pack_Linear.content_at_remove; | 36 | Efl.Pack_Linear.pack_unpack_at; |
37 | Efl.Pack_Linear.content_index.get; | 37 | Efl.Pack_Linear.pack_index_get; |
38 | Efl.Pack_Linear.direction.get; | 38 | Efl.Pack_Linear.pack_direction.get; |
39 | } | 39 | } |
40 | } | 40 | } |
diff --git a/src/lib/elementary/efl_ui_layout_internal_table.eo b/src/lib/elementary/efl_ui_layout_internal_table.eo index 19c9bbaa49..cd6b6d2af4 100644 --- a/src/lib/elementary/efl_ui_layout_internal_table.eo +++ b/src/lib/elementary/efl_ui_layout_internal_table.eo | |||
@@ -27,9 +27,9 @@ class Efl.Ui.Layout_Internal.Table (Eo.Base, Efl.Pack_Grid) | |||
27 | Efl.Pack.unpack_all; | 27 | Efl.Pack.unpack_all; |
28 | Efl.Pack.unpack; | 28 | Efl.Pack.unpack; |
29 | Efl.Pack_Grid.pack_grid; | 29 | Efl.Pack_Grid.pack_grid; |
30 | Efl.Pack_Grid.grid_content_at; | 30 | Efl.Pack_Grid.grid_content_get; |
31 | Efl.Pack_Grid.grid_content_iterate; | 31 | Efl.Pack_Grid.grid_contents_get; |
32 | Efl.Pack_Grid.grid_content_position.get; | 32 | Efl.Pack_Grid.grid_position.get; |
33 | Efl.Pack_Grid.grid_size.get; | 33 | Efl.Pack_Grid.grid_size.get; |
34 | Efl.Pack_Grid.grid_columns.get; | 34 | Efl.Pack_Grid.grid_columns.get; |
35 | Efl.Pack_Grid.grid_rows.get; | 35 | Efl.Pack_Grid.grid_rows.get; |
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c index e3e515fce2..522b432174 100644 --- a/src/lib/elementary/elm_layout.c +++ b/src/lib/elementary/elm_layout.c | |||
@@ -1942,7 +1942,7 @@ elm_layout_box_insert_at(Elm_Layout *obj, const char *part, Evas_Object *child, | |||
1942 | { | 1942 | { |
1943 | Eo *box = efl_content_get(obj, part); | 1943 | Eo *box = efl_content_get(obj, part); |
1944 | if (!box) return EINA_FALSE; | 1944 | if (!box) return EINA_FALSE; |
1945 | efl_pack_insert(box, child, pos); | 1945 | efl_pack_at(box, child, pos); |
1946 | return EINA_TRUE; | 1946 | return EINA_TRUE; |
1947 | } | 1947 | } |
1948 | 1948 | ||
diff --git a/src/lib/elementary/elm_layout_pack.c b/src/lib/elementary/elm_layout_pack.c index 2b6a234f09..13c27276f3 100644 --- a/src/lib/elementary/elm_layout_pack.c +++ b/src/lib/elementary/elm_layout_pack.c | |||
@@ -167,16 +167,16 @@ _efl_ui_layout_internal_box_efl_container_content_remove(Eo *obj, Efl_Ui_Layout_ | |||
167 | return efl_pack_unpack(obj, content); | 167 | return efl_pack_unpack(obj, content); |
168 | } | 168 | } |
169 | 169 | ||
170 | EOLIAN static void | 170 | EOLIAN static Eina_Bool |
171 | _efl_ui_layout_internal_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) | 171 | _efl_ui_layout_internal_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) |
172 | { | 172 | { |
173 | _elm_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_TRUE); | 173 | return _elm_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_TRUE); |
174 | } | 174 | } |
175 | 175 | ||
176 | EOLIAN static void | 176 | EOLIAN static Eina_Bool |
177 | _efl_ui_layout_internal_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) | 177 | _efl_ui_layout_internal_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) |
178 | { | 178 | { |
179 | _elm_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_FALSE); | 179 | return _elm_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_FALSE); |
180 | } | 180 | } |
181 | 181 | ||
182 | EOLIAN static Eina_Bool | 182 | EOLIAN static Eina_Bool |
@@ -185,22 +185,22 @@ _efl_ui_layout_internal_box_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_B | |||
185 | return _elm_layout_box_remove(pd->obj, pd->sd, pd->part, subobj) != NULL; | 185 | return _elm_layout_box_remove(pd->obj, pd->sd, pd->part, subobj) != NULL; |
186 | } | 186 | } |
187 | 187 | ||
188 | EOLIAN static void | 188 | EOLIAN static Eina_Bool |
189 | _efl_ui_layout_internal_box_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) | 189 | _efl_ui_layout_internal_box_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) |
190 | { | 190 | { |
191 | _elm_layout_box_append(pd->obj, pd->sd, pd->part, subobj); | 191 | return _elm_layout_box_append(pd->obj, pd->sd, pd->part, subobj); |
192 | } | 192 | } |
193 | 193 | ||
194 | EOLIAN static void | 194 | EOLIAN static Eina_Bool |
195 | _efl_ui_layout_internal_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) | 195 | _efl_ui_layout_internal_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) |
196 | { | 196 | { |
197 | _elm_layout_box_prepend(pd->obj, pd->sd, pd->part, subobj); | 197 | return _elm_layout_box_prepend(pd->obj, pd->sd, pd->part, subobj); |
198 | } | 198 | } |
199 | 199 | ||
200 | EOLIAN static void | 200 | EOLIAN static Eina_Bool |
201 | _efl_ui_layout_internal_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) | 201 | _efl_ui_layout_internal_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) |
202 | { | 202 | { |
203 | _elm_layout_box_append(pd->obj, pd->sd, pd->part, subobj); | 203 | return _elm_layout_box_append(pd->obj, pd->sd, pd->part, subobj); |
204 | } | 204 | } |
205 | 205 | ||
206 | EOLIAN static Eina_Bool | 206 | EOLIAN static Eina_Bool |
@@ -215,10 +215,10 @@ _efl_ui_layout_internal_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, Efl_ | |||
215 | const Efl_Gfx_Base *other; | 215 | const Efl_Gfx_Base *other; |
216 | int index; | 216 | int index; |
217 | 217 | ||
218 | index = efl_pack_content_index_get(pd->pack, (Efl_Gfx_Base *) existing); | 218 | index = efl_pack_index_get(pd->pack, existing); |
219 | if (index < 0) return EINA_FALSE; | 219 | if (index < 0) return EINA_FALSE; |
220 | 220 | ||
221 | other = efl_pack_content_at_get(pd->pack, index + 1); | 221 | other = efl_pack_content_get(pd->pack, index + 1); |
222 | if (other) | 222 | if (other) |
223 | return _elm_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, other); | 223 | return _elm_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, other); |
224 | 224 | ||
@@ -226,14 +226,14 @@ _efl_ui_layout_internal_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, Efl_ | |||
226 | return EINA_TRUE; | 226 | return EINA_TRUE; |
227 | } | 227 | } |
228 | 228 | ||
229 | EOLIAN static void | 229 | EOLIAN static Eina_Bool |
230 | _efl_ui_layout_internal_box_efl_pack_linear_pack_insert(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj, int index) | 230 | _efl_ui_layout_internal_box_efl_pack_linear_pack_at(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj, int index) |
231 | { | 231 | { |
232 | _elm_layout_box_insert_at(pd->obj, pd->sd, pd->part, subobj, index); | 232 | return _elm_layout_box_insert_at(pd->obj, pd->sd, pd->part, subobj, index); |
233 | } | 233 | } |
234 | 234 | ||
235 | EOLIAN static Efl_Gfx_Base * | 235 | EOLIAN static Efl_Gfx_Base * |
236 | _efl_ui_layout_internal_box_efl_pack_linear_content_at_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, int index) | 236 | _efl_ui_layout_internal_box_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, int index) |
237 | { | 237 | { |
238 | Evas_Object_Box_Option *opt; | 238 | Evas_Object_Box_Option *opt; |
239 | Evas_Object_Box_Data *priv; | 239 | Evas_Object_Box_Data *priv; |
@@ -245,11 +245,11 @@ _efl_ui_layout_internal_box_efl_pack_linear_content_at_get(Eo *obj EINA_UNUSED, | |||
245 | } | 245 | } |
246 | 246 | ||
247 | EOLIAN static Efl_Gfx_Base * | 247 | EOLIAN static Efl_Gfx_Base * |
248 | _efl_ui_layout_internal_box_efl_pack_linear_content_at_remove(Eo *obj, Efl_Ui_Layout_Box_Data *pd, int index) | 248 | _efl_ui_layout_internal_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Layout_Box_Data *pd, int index) |
249 | { | 249 | { |
250 | Efl_Gfx_Base *subobj; | 250 | Efl_Gfx_Base *subobj; |
251 | 251 | ||
252 | subobj = efl_pack_content_at_get(pd->pack, index); | 252 | subobj = efl_pack_content_get(pd->pack, index); |
253 | if (!subobj) return NULL; | 253 | if (!subobj) return NULL; |
254 | if (efl_pack_unpack(obj, subobj)) | 254 | if (efl_pack_unpack(obj, subobj)) |
255 | return subobj; | 255 | return subobj; |
@@ -259,13 +259,13 @@ _efl_ui_layout_internal_box_efl_pack_linear_content_at_remove(Eo *obj, Efl_Ui_La | |||
259 | } | 259 | } |
260 | 260 | ||
261 | EOLIAN static int | 261 | EOLIAN static int |
262 | _efl_ui_layout_internal_box_efl_pack_linear_content_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Base *subobj) | 262 | _efl_ui_layout_internal_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, const Efl_Gfx_Base *subobj) |
263 | { | 263 | { |
264 | return efl_pack_content_index_get(pd->pack, subobj); | 264 | return efl_pack_index_get(pd->pack, subobj); |
265 | } | 265 | } |
266 | 266 | ||
267 | EOLIAN static Efl_Orient | 267 | EOLIAN static Efl_Orient |
268 | _efl_ui_layout_internal_box_efl_pack_linear_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) | 268 | _efl_ui_layout_internal_box_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) |
269 | { | 269 | { |
270 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_ORIENT_NONE); | 270 | ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_ORIENT_NONE); |
271 | 271 | ||
@@ -318,16 +318,16 @@ _efl_ui_layout_internal_table_efl_container_content_remove(Eo *obj, Efl_Ui_Layou | |||
318 | return efl_pack_unpack(obj, content); | 318 | return efl_pack_unpack(obj, content); |
319 | } | 319 | } |
320 | 320 | ||
321 | EOLIAN static void | 321 | EOLIAN static Eina_Bool |
322 | _efl_ui_layout_internal_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) | 322 | _efl_ui_layout_internal_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) |
323 | { | 323 | { |
324 | _elm_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_TRUE); | 324 | return _elm_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_TRUE); |
325 | } | 325 | } |
326 | 326 | ||
327 | EOLIAN static void | 327 | EOLIAN static Eina_Bool |
328 | _efl_ui_layout_internal_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) | 328 | _efl_ui_layout_internal_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) |
329 | { | 329 | { |
330 | _elm_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_FALSE); | 330 | return _elm_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_FALSE); |
331 | } | 331 | } |
332 | 332 | ||
333 | EOLIAN static Eina_Bool | 333 | EOLIAN static Eina_Bool |
@@ -337,20 +337,20 @@ _efl_ui_layout_internal_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout | |||
337 | return _elm_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj; | 337 | return _elm_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj; |
338 | } | 338 | } |
339 | 339 | ||
340 | EOLIAN static void | 340 | EOLIAN static Eina_Bool |
341 | _efl_ui_layout_internal_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Base *subobj, int col, int row, int colspan, int rowspan) | 341 | _efl_ui_layout_internal_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Base *subobj, int col, int row, int colspan, int rowspan) |
342 | { | 342 | { |
343 | _elm_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan); | 343 | return _elm_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan); |
344 | } | 344 | } |
345 | 345 | ||
346 | EOLIAN static Efl_Gfx_Base * | 346 | EOLIAN static Efl_Gfx_Base * |
347 | _efl_ui_layout_internal_table_efl_pack_grid_grid_content_at(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row) | 347 | _efl_ui_layout_internal_table_efl_pack_grid_grid_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row) |
348 | { | 348 | { |
349 | return evas_object_table_child_get(pd->pack, col, row); | 349 | return evas_object_table_child_get(pd->pack, col, row); |
350 | } | 350 | } |
351 | 351 | ||
352 | EOLIAN static Eina_Iterator * | 352 | EOLIAN static Eina_Iterator * |
353 | _efl_ui_layout_internal_table_efl_pack_grid_grid_content_iterate(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row, Eina_Bool below) | 353 | _efl_ui_layout_internal_table_efl_pack_grid_grid_contents_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row, Eina_Bool below) |
354 | { | 354 | { |
355 | // contents at col,row - see also Efl.Ui.Grid or edje_containers.c | 355 | // contents at col,row - see also Efl.Ui.Grid or edje_containers.c |
356 | // not reusing edje's iterator because the container would be wrong | 356 | // not reusing edje's iterator because the container would be wrong |
@@ -378,7 +378,7 @@ _efl_ui_layout_internal_table_efl_pack_grid_grid_content_iterate(Eo *obj EINA_UN | |||
378 | } | 378 | } |
379 | 379 | ||
380 | EOLIAN static Eina_Bool | 380 | EOLIAN static Eina_Bool |
381 | _efl_ui_layout_internal_table_efl_pack_grid_grid_content_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Base * subobj, int *col, int *row, int *colspan, int *rowspan) | 381 | _efl_ui_layout_internal_table_efl_pack_grid_grid_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Base * subobj, int *col, int *row, int *colspan, int *rowspan) |
382 | { | 382 | { |
383 | unsigned short c, r, cs, rs; | 383 | unsigned short c, r, cs, rs; |
384 | Eina_Bool ret; | 384 | Eina_Bool ret; |
diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c index 195b1096d7..0dd09b8d8c 100644 --- a/src/lib/elementary/elm_win.c +++ b/src/lib/elementary/elm_win.c | |||
@@ -4164,7 +4164,7 @@ elm_win_util_dialog_add(Evas_Object *parent, const char *name, const char *title | |||
4164 | return win; | 4164 | return win; |
4165 | } | 4165 | } |
4166 | 4166 | ||
4167 | EOLIAN static void | 4167 | EOLIAN static Eina_Bool |
4168 | _elm_win_efl_pack_pack(Eo *obj, Elm_Win_Data *sd, Efl_Gfx_Base *subobj) | 4168 | _elm_win_efl_pack_pack(Eo *obj, Elm_Win_Data *sd, Efl_Gfx_Base *subobj) |
4169 | { | 4169 | { |
4170 | Eina_Bool ret; | 4170 | Eina_Bool ret; |
@@ -4175,7 +4175,7 @@ _elm_win_efl_pack_pack(Eo *obj, Elm_Win_Data *sd, Efl_Gfx_Base *subobj) | |||
4175 | if (!ret) | 4175 | if (!ret) |
4176 | ERR("could not add sub object %p to window %p", subobj, obj); | 4176 | ERR("could not add sub object %p to window %p", subobj, obj); |
4177 | 4177 | ||
4178 | //return ret; | 4178 | return ret; |
4179 | } | 4179 | } |
4180 | 4180 | ||
4181 | EOLIAN static Eina_Bool | 4181 | EOLIAN static Eina_Bool |
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c index 5fd77b86e7..c9b42eb4ee 100644 --- a/src/tests/edje/edje_test_edje.c +++ b/src/tests/edje/edje_test_edje.c | |||
@@ -521,7 +521,7 @@ START_TEST(edje_test_box_eoapi) | |||
521 | efl_pack_begin(box, sobjs[1]); | 521 | efl_pack_begin(box, sobjs[1]); |
522 | efl_pack_before(box, sobjs[0], sobjs[1]); | 522 | efl_pack_before(box, sobjs[0], sobjs[1]); |
523 | efl_pack_after(box, sobjs[4], sobjs[3]); | 523 | efl_pack_after(box, sobjs[4], sobjs[3]); |
524 | efl_pack_insert(box, sobjs[2], 2); | 524 | efl_pack_at(box, sobjs[2], 2); |
525 | fail_if(efl_content_count(box) != 5); | 525 | fail_if(efl_content_count(box) != 5); |
526 | 526 | ||
527 | it = efl_content_iterate(box); | 527 | it = efl_content_iterate(box); |
@@ -536,8 +536,8 @@ START_TEST(edje_test_box_eoapi) | |||
536 | fail_if(efl_content_count(box) != 0); | 536 | fail_if(efl_content_count(box) != 0); |
537 | 537 | ||
538 | efl_pack(box, sobjs[1]); | 538 | efl_pack(box, sobjs[1]); |
539 | efl_pack_insert(box, sobjs[0], 0); | 539 | efl_pack_at(box, sobjs[0], 0); |
540 | efl_pack_insert(box, sobjs[2], -1); | 540 | efl_pack_at(box, sobjs[2], -1); |
541 | it = efl_content_iterate(box); | 541 | it = efl_content_iterate(box); |
542 | i = 0; | 542 | i = 0; |
543 | EINA_ITERATOR_FOREACH(it, sobj) | 543 | EINA_ITERATOR_FOREACH(it, sobj) |
@@ -547,9 +547,9 @@ START_TEST(edje_test_box_eoapi) | |||
547 | 547 | ||
548 | fail_if(!efl_content_remove(box, sobjs[0])); | 548 | fail_if(!efl_content_remove(box, sobjs[0])); |
549 | fail_if(efl_content_count(box) != 2); | 549 | fail_if(efl_content_count(box) != 2); |
550 | fail_if(!efl_pack_content_at_remove(box, 1)); | 550 | fail_if(!efl_pack_unpack_at(box, 1)); |
551 | fail_if(efl_content_count(box) != 1); | 551 | fail_if(efl_content_count(box) != 1); |
552 | fail_if(efl_pack_content_index_get(box, sobjs[1]) != 0); | 552 | fail_if(efl_pack_index_get(box, sobjs[1]) != 0); |
553 | 553 | ||
554 | efl_pack_clear(box); | 554 | efl_pack_clear(box); |
555 | fail_if(efl_content_count(box) != 0); | 555 | fail_if(efl_content_count(box) != 0); |
@@ -661,7 +661,7 @@ START_TEST(edje_test_table_eoapi) | |||
661 | 661 | ||
662 | /* items have a text part "text" containing their position */ | 662 | /* items have a text part "text" containing their position */ |
663 | sprintf(buf, "%d,%d", k, l); | 663 | sprintf(buf, "%d,%d", k, l); |
664 | sobj = efl_pack_grid_content_at(table, k, l); | 664 | sobj = efl_pack_grid_content_get(table, k, l); |
665 | fail_if(!sobj); | 665 | fail_if(!sobj); |
666 | //txt = efl_part_text_get(sobj, "text"); | 666 | //txt = efl_part_text_get(sobj, "text"); |
667 | txt = edje_object_part_text_get(sobj, "text"); | 667 | txt = edje_object_part_text_get(sobj, "text"); |
@@ -685,7 +685,7 @@ START_TEST(edje_test_table_eoapi) | |||
685 | it = efl_content_iterate(table); | 685 | it = efl_content_iterate(table); |
686 | EINA_ITERATOR_FOREACH(it, sobj) | 686 | EINA_ITERATOR_FOREACH(it, sobj) |
687 | { | 687 | { |
688 | efl_pack_grid_content_position_get(table, sobj, &k, &l, &cs, &rs); | 688 | efl_pack_grid_position_get(table, sobj, &k, &l, &cs, &rs); |
689 | fail_if(cs != 1); | 689 | fail_if(cs != 1); |
690 | fail_if(rs != 1); | 690 | fail_if(rs != 1); |
691 | if (l >= 2) | 691 | if (l >= 2) |