efl_pack: split algin and padding property
authorMarcel Hollerbach <mail@marcel-hollerbach.de>
Wed, 24 Apr 2019 13:41:39 +0000 (15:41 +0200)
committerWoochanlee <wc0917.lee@samsung.com>
Tue, 30 Apr 2019 01:03:01 +0000 (10:03 +0900)
the pack interface is a general interface for how we pack things into a
container. the align and padding property has less to nothing to do with
this. Hence this commit splits the two properties into theire own
interface.

fix T7825

Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es>
Differential Revision: https://phab.enlightenment.org/D8699

33 files changed:
src/bin/elementary/test_evas_snapshot.c
src/bin/elementary/test_gfx_filters.c
src/bin/elementary/test_ui_box.c
src/bin/elementary/test_ui_pager.c
src/bin/elementary/test_ui_pager_scroll.c
src/bin/elementary/test_ui_relative_layout.c
src/bin/elementary/test_ui_tab_pager.c
src/bin/elementary/test_ui_table.c
src/examples/elementary/efl_ui_grid_example_1.c
src/lib/efl/Efl.h
src/lib/efl/interfaces/efl_gfx_arrangement.eo [new file with mode: 0644]
src/lib/efl/interfaces/efl_interfaces_main.c
src/lib/efl/interfaces/efl_pack.eo
src/lib/efl/interfaces/meson.build
src/lib/elementary/efl_page_indicator_icon.c
src/lib/elementary/efl_ui_box.c
src/lib/elementary/efl_ui_box.eo
src/lib/elementary/efl_ui_container_layout.c
src/lib/elementary/efl_ui_grid.c
src/lib/elementary/efl_ui_grid.eo
src/lib/elementary/efl_ui_list.c
src/lib/elementary/efl_ui_list.eo
src/lib/elementary/efl_ui_table.c
src/lib/elementary/efl_ui_table.eo
src/lib/elementary/elm_colorselector.c
src/tests/elementary/efl_ui_test_box.c
src/tests/elementary/efl_ui_test_box_flow.c
src/tests/elementary/efl_ui_test_box_stack.c
src/tests/elementary/efl_ui_test_table.c
src/tests/elementary/spec/efl_test_gfx_arrangement.c [new file with mode: 0644]
src/tests/elementary/spec/efl_test_pack.c
src/tests/elementary/spec/efl_ui_spec_suite.h
src/tests/elementary/spec/meson.build

index 855c33a..0d77307 100644 (file)
@@ -125,7 +125,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
                  efl_ui_win_autodel_set(efl_added, 1));
 
    table = efl_add(EFL_UI_TABLE_CLASS, win,
-                  efl_pack_padding_set(efl_added, 5, 5, 1));
+                  efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1));
    efl_content_set(win, table);
 
    // Objects below the snapshot
index 4937219..a52a95e 100644 (file)
@@ -387,9 +387,9 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
                      efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
                      efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
                      efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_FALSE),
-                     efl_pack_padding_set(efl_added, 5, 5, 1),
+                     efl_gfx_arrangement_content_padding_set(efl_added, 5, 5, 1),
                      efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
-                     efl_pack_align_set(efl_added, 0, 0.5));
+                     efl_gfx_arrangement_content_align_set(efl_added, 0, 0.5));
       efl_pack(box, box2);
 
       for (size_t k = 0; k < EINA_C_ARRAY_LENGTH(images); k++)
@@ -456,7 +456,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
                      efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
                      efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
                      efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
-                     efl_pack_align_set(efl_added, 0.5, 0.5));
+                     efl_gfx_arrangement_content_align_set(efl_added, 0.5, 0.5));
       efl_pack(flip, box2);
 
       // Note: No TEXT object with EO APIs
@@ -472,7 +472,7 @@ test_gfx_filters(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
                          efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
                          efl_gfx_hint_weight_set(efl_added, 1.0, 0.0),
                          efl_gfx_hint_fill_set(efl_added, EINA_TRUE, EINA_TRUE),
-                         efl_pack_align_set(efl_added, 0.5, 0.5));
+                         efl_gfx_arrangement_content_align_set(efl_added, 0.5, 0.5));
       efl_pack(flip, box2);
 
       const struct { const char *name, *code; } programs [] = {
index 0021be5..7423c2d 100644 (file)
@@ -76,7 +76,7 @@ padding_slider_cb(void *data, const Efl_Event *event)
    Eo *win = data, *box;
 
    box = efl_key_wref_get(win, "box");
-   efl_pack_padding_set(box, val, val, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(box, val, val, EINA_TRUE);
 }
 
 static void
@@ -97,8 +97,8 @@ alignh_slider_cb(void *data, const Efl_Event *event)
 
    box = efl_key_wref_get(win, "box");
    val = elm_slider_value_get(event->object);
-   efl_pack_align_get(box, NULL, &av);
-   efl_pack_align_set(box, val, av);
+   efl_gfx_arrangement_content_align_get(box, NULL, &av);
+   efl_gfx_arrangement_content_align_set(box, val, av);
 }
 
 static void
@@ -109,8 +109,8 @@ alignv_slider_cb(void *data, const Efl_Event *event)
 
    box = efl_key_wref_get(win, "box");
    val = elm_slider_value_get(event->object);
-   efl_pack_align_get(box, &ah, NULL);
-   efl_pack_align_set(box, ah, val);
+   efl_gfx_arrangement_content_align_get(box, &ah, NULL);
+   efl_gfx_arrangement_content_align_set(box, ah, val);
 }
 
 static void
@@ -240,7 +240,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
 
    vbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
-   efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
    efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
    elm_win_resize_object_add(win, vbox);
 
@@ -256,7 +256,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
    hbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
    efl_content_set(f, hbox);
-   efl_pack_padding_set(hbox, 10, 0, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(hbox, 10, 0, EINA_TRUE);
 
 
    /* weights radio group */
@@ -533,7 +533,7 @@ test_ui_box(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
    bx = efl_add(EFL_UI_BOX_CLASS, win,
                 efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
    efl_key_wref_set(win, "box", bx);
-   efl_pack_padding_set(bx, 10, 10, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(bx, 10, 10, EINA_TRUE);
    efl_gfx_hint_align_set(bx, 0.5, 0.5);
    efl_gfx_hint_weight_set(bx, 1, 1);
    efl_content_set(f, bx);
index 32bc1d7..3ca0309 100644 (file)
@@ -443,12 +443,12 @@ static void pack_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Pack", btn, NULL,
                                          efl_added, NULL));
 
    in_box1 = efl_add(EFL_UI_BOX_CLASS, box,
-                     efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                     efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                      efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
 
    sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
@@ -458,7 +458,7 @@ static void pack_cb(void *data,
                                         efl_ui_pager_current_page_get(pager)));
 
    in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
-                     efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                     efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                      efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
 
    sp2 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box2);
@@ -628,7 +628,7 @@ static void current_page_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                 elm_naviframe_item_push(navi, "Current Page", btn, NULL,
                                          efl_added, NULL));
 
@@ -674,7 +674,7 @@ static void indicator_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Indicator", btn, NULL,
                                          efl_added, NULL));
 
index 8df58c6..604bd7b 100644 (file)
@@ -495,7 +495,7 @@ static void padding_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Padding Size", btn, NULL,
                                          efl_added, NULL));
 
@@ -522,7 +522,7 @@ static void side_page_num_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                 elm_naviframe_item_push(navi, "Side Page Num", btn, NULL,
                                          efl_added, NULL));
 
@@ -555,12 +555,12 @@ static void pack_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Pack", btn, NULL,
                                          efl_added, NULL));
 
    in_box1 = efl_add(EFL_UI_BOX_CLASS, box,
-                     efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                     efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                      efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
 
    sp1 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box1,
@@ -570,7 +570,7 @@ static void pack_cb(void *data,
                                         efl_ui_pager_current_page_get(pager)));
 
    in_box2 = efl_add(EFL_UI_BOX_CLASS, box,
-                     efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                     efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                      efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
 
    sp2 = efl_add(EFL_UI_SPIN_BUTTON_CLASS, in_box2);
@@ -739,7 +739,7 @@ static void current_page_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                 elm_naviframe_item_push(navi, "Current Page", btn, NULL,
                                          efl_added, NULL));
 
@@ -787,7 +787,7 @@ static void scroll_block_cb(void *data,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                 elm_naviframe_item_push(navi, "Scroll Block", btn, NULL,
                                          efl_added, NULL));
 
@@ -826,7 +826,7 @@ static void loop_cb(void *data EINA_UNUSED,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                 elm_naviframe_item_push(navi, "Loop", btn, NULL,
                                          efl_added, NULL));
 
@@ -875,7 +875,7 @@ static void indicator_cb(void *data EINA_UNUSED,
                                         back_btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Indicator", btn, NULL,
                                          efl_added, NULL));
 
index 0e8bcbc..6834b66 100644 (file)
@@ -150,7 +150,7 @@ _setter_add(Eo *vbox, Eo *btn, Options option)
 
    hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
-                  efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
                   efl_pack(vbox, efl_added));
 
    efl_add(EFL_UI_TEXT_CLASS, hbox,
@@ -192,13 +192,13 @@ _button_frame_add(Eo *box, Eo *btn)
 
    vbox = efl_add(EFL_UI_BOX_CLASS, f,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
-                  efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
                   efl_gfx_hint_margin_set(efl_added, 2, 2, 2, 2),
                   efl_content_set(f, efl_added));
 
    hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
-                  efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
                   efl_pack(vbox, efl_added));
 
    efl_add(EFL_CANVAS_RECTANGLE_CLASS, hbox,
@@ -231,7 +231,7 @@ _button_frame_add(Eo *box, Eo *btn)
 
    hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
-                  efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
                   efl_pack(vbox, efl_added));
 
    efl_add(EFL_UI_TEXT_CLASS, hbox,
@@ -251,7 +251,7 @@ _button_frame_add(Eo *box, Eo *btn)
 
    hbox = efl_add(EFL_UI_BOX_CLASS, vbox,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
-                  efl_pack_padding_set(efl_added, 2, 2, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 2, 2, EINA_TRUE),
                   efl_pack(vbox, efl_added));
 
    efl_add(EFL_UI_TEXT_CLASS, hbox,
@@ -282,7 +282,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
 
    vbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL),
-                  efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                   efl_gfx_hint_margin_set(efl_added, 5, 5, 5, 5),
                   efl_content_set(win, efl_added));
 
@@ -294,7 +294,7 @@ test_ui_relative_layout(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, vo
 
    hbox = efl_add(EFL_UI_BOX_CLASS, f,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
-                  efl_pack_padding_set(efl_added, 10, 0, EINA_TRUE),
+                  efl_gfx_arrangement_content_padding_set(efl_added, 10, 0, EINA_TRUE),
                   efl_content_set(f, efl_added));
 
    /* contents */
index e2dfb92..3180b2a 100644 (file)
@@ -233,7 +233,7 @@ _current_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Current", btn, NULL, efl_added, NULL));
 
    sp = efl_add(EFL_UI_SPIN_BUTTON_CLASS, box,
@@ -338,7 +338,7 @@ _pack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Pack", btn, NULL, efl_added, NULL));
 
    /* Pack Begin */
@@ -366,7 +366,7 @@ _pack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_pack_end(box, efl_added));
 
    in_box = efl_add(EFL_UI_BOX_CLASS, box,
-                    efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                    efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                     efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
                     efl_pack_end(box, efl_added));
 
@@ -442,7 +442,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Unpack", btn, NULL, efl_added, NULL));
 
    /* Clear */
@@ -466,7 +466,7 @@ _unpack_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_pack_end(box, efl_added));
 
    in_box = efl_add(EFL_UI_BOX_CLASS, box,
-                    efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                    efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                     efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
                     efl_pack_end(box, efl_added));
 
@@ -537,7 +537,7 @@ _tab_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Tab", btn, NULL, efl_added, NULL));
 
    label_check = efl_add(EFL_UI_CHECK_CLASS, box,
@@ -590,7 +590,7 @@ _transition_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
                  efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _btn_cb, navi));
 
    box = efl_add(EFL_UI_BOX_CLASS, navi,
-                 efl_pack_padding_set(efl_added, 10, 10, EINA_TRUE),
+                 efl_gfx_arrangement_content_padding_set(efl_added, 10, 10, EINA_TRUE),
                  elm_naviframe_item_push(navi, "Transition", btn, NULL, efl_added, NULL));
 
    btn = efl_add(EFL_UI_BUTTON_CLASS, box,
index d11cefe..6d52887 100644 (file)
@@ -79,7 +79,7 @@ static void
 padding_slider_cb(void *data, const Efl_Event *event)
 {
    int val = elm_slider_value_get(event->object);
-   efl_pack_padding_set(data, val, val, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(data, val, val, EINA_TRUE);
 }
 
 static void
@@ -199,7 +199,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
 
    vbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
-   efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
    efl_gfx_hint_weight_set(vbox, 1, 1);
    efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
    elm_win_resize_object_add(win, vbox);
@@ -220,7 +220,7 @@ test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_
    hbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
    elm_object_content_set(f, hbox);
-   efl_pack_padding_set(hbox, 10, 0, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(hbox, 10, 0, EINA_TRUE);
 
 
    /* weights radio group */
@@ -568,7 +568,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
 
    vbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_DOWN));
-   efl_pack_padding_set(vbox, 10, 10, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(vbox, 10, 10, EINA_TRUE);
    efl_gfx_hint_margin_set(vbox, 5, 5, 5, 5);
    elm_win_resize_object_add(win, vbox);
    efl_gfx_entity_visible_set(vbox, 1);
@@ -589,7 +589,7 @@ test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
    hbox = efl_add(EFL_UI_BOX_CLASS, win,
                   efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL));
    elm_object_content_set(f, hbox);
-   efl_pack_padding_set(hbox, 5, 0, EINA_TRUE);
+   efl_gfx_arrangement_content_padding_set(hbox, 5, 0, EINA_TRUE);
    efl_gfx_entity_visible_set(hbox, 1);
 
    ico = elm_icon_add(win);
index 6fe455c..4e41224 100644 (file)
@@ -56,10 +56,10 @@ elm_main(int argc, char **argv)
    // TEST#1 : Create Grid
    gd->grid = grid = EoGenerate(EFL_UI_GRID_CLASS, box, (horiz ? EFL_UI_DIR_HORIZONTAL : EFL_UI_DIR_VERTICAL));
    efl_ui_grid_item_size_set(grid, EINA_SIZE2D(100, 120)); // 4X4
-   efl_pack_padding_set(grid, 5.0, 5.0, EINA_TRUE);
-   efl_pack_align_set(grid, 0.5, 0.5);
+   efl_gfx_arrangement_content_padding_set(grid, 5.0, 5.0, EINA_TRUE);
+   efl_gfx_arrangement_content_align_set(grid, 0.5, 0.5);
    efl_pack_end(box, grid);
-   
+
    // TEST#2 : Set Item Default Size
 
    Efl_Ui_Grid_Item *target = NULL;
index da582a4..9a21ee8 100644 (file)
@@ -166,6 +166,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
 #include "interfaces/efl_pack_layout.eo.h"
 #include "interfaces/efl_pack_linear.eo.h"
 #include "interfaces/efl_pack_table.eo.h"
+#include "interfaces/efl_gfx_arrangement.eo.h"
 
 /* Input and Output */
 #include "interfaces/efl_io_closer.eo.h"
diff --git a/src/lib/efl/interfaces/efl_gfx_arrangement.eo b/src/lib/efl/interfaces/efl_gfx_arrangement.eo
new file mode 100644 (file)
index 0000000..e991b8c
--- /dev/null
@@ -0,0 +1,26 @@
+interface @beta Efl.Gfx.Arrangement
+{
+   [[API common to all UI container objects.]]
+   methods
+   {
+      @property content_align {
+         [[Alignment of the container within its bounds]]
+         set {}
+         get {}
+         values {
+            align_horiz: double; [[Horizontal alignment]]
+            align_vert:  double; [[Vertical alignment]]
+         }
+      }
+      @property content_padding {
+         [[Padding between items contained in this object.]]
+         set {}
+         get {}
+         values {
+            pad_horiz: double; [[Horizontal padding]]
+            pad_vert:  double; [[Vertical padding]]
+            scalable:  bool; [[$true if scalable, $false otherwise]]
+         }
+      }
+   }
+}
index 279bf15..b3bbf4f 100644 (file)
@@ -56,7 +56,7 @@
 #include "interfaces/efl_pack_layout.eo.c"
 #include "interfaces/efl_pack_linear.eo.c"
 #include "interfaces/efl_pack_table.eo.c"
-
+#include "interfaces/efl_gfx_arrangement.eo.c"
 #include "interfaces/efl_model.eo.c"
 #include "interfaces/efl_interpolator.eo.c"
 #include "interfaces/efl_orientation.eo.c"
index 624a000..f6a9b3a 100644 (file)
@@ -37,24 +37,5 @@ interface @beta Efl.Pack extends Efl.Container
          }
          return: bool; [[$false if $subobj could not be packed.]]
       }
-      @property pack_align {
-         [[Alignment of the container within its bounds]]
-         set {}
-         get {}
-         values {
-            align_horiz: double; [[Horizontal alignment]]
-            align_vert:  double; [[Vertical alignment]]
-         }
-      }
-      @property pack_padding {
-         [[Padding between items contained in this object.]]
-         set {}
-         get {}
-         values {
-            pad_horiz: double; [[Horizontal padding]]
-            pad_vert:  double; [[Vertical padding]]
-            scalable:  bool; [[$true if scalable, $false otherwise]]
-         }
-      }
    }
 }
index ef75b3d..3efefbf 100644 (file)
@@ -72,6 +72,7 @@ pub_eo_files = [
   'efl_pack_layout.eo',
   'efl_pack_linear.eo',
   'efl_pack_table.eo',
+  'efl_gfx_arrangement.eo',
   'efl_ui_i18n.eo',
   'efl_ui_direction.eo',
   'efl_ui_direction_readonly.eo',
index 55326cf..835be5b 100644 (file)
@@ -148,7 +148,7 @@ _efl_page_indicator_icon_efl_page_indicator_bind(Eo *obj,
    if (spd->pager.obj)
      {
         efl_ui_direction_set(spd->idbox, EFL_UI_DIR_HORIZONTAL);
-        efl_pack_padding_set(spd->idbox, 15, 15, EINA_TRUE);
+        efl_gfx_arrangement_content_padding_set(spd->idbox, 15, 15, EINA_TRUE);
 
         pd->v = eina_value_float_new(0.0);
 
index 79e9d89..366f482 100644 (file)
@@ -394,7 +394,7 @@ _efl_ui_box_efl_ui_direction_direction_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box
 }
 
 EOLIAN static void
-_efl_ui_box_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v, Eina_Bool scalable)
+_efl_ui_box_efl_gfx_arrangement_content_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v, Eina_Bool scalable)
 {
    scalable = !!scalable;
    if (h < 0) h = 0;
@@ -412,7 +412,7 @@ _efl_ui_box_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, do
 }
 
 EOLIAN static void
-_efl_ui_box_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v, Eina_Bool *scalable)
+_efl_ui_box_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v, Eina_Bool *scalable)
 {
    if (scalable) *scalable = pd->pad.scalable;
    if (h) *h = pd->pad.h;
@@ -420,7 +420,7 @@ _efl_ui_box_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data
 }
 
 EOLIAN static void
-_efl_ui_box_efl_pack_pack_align_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v)
+_efl_ui_box_efl_gfx_arrangement_content_align_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, double v)
 {
    if (h < 0) h = -1;
    else if (h > 1) h = 1;
@@ -437,7 +437,7 @@ _efl_ui_box_efl_pack_pack_align_set(Eo *obj, Efl_Ui_Box_Data *pd, double h, doub
 }
 
 EOLIAN static void
-_efl_ui_box_efl_pack_pack_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v)
+_efl_ui_box_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Box_Data *pd, double *h, double *v)
 {
    if (h) *h = pd->align.h;
    if (v) *v = pd->align.v;
index 24f2928..fd5ea51 100644 (file)
@@ -1,5 +1,5 @@
 class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pack_Layout,
-                  Efl.Ui.Direction
+                  Efl.Ui.Direction, Efl.Gfx.Arrangement
 {
    [[The box widget.
 
@@ -8,8 +8,8 @@ class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pac
 
      By default, the box will use an internal function to set the layout to
      a single row, either vertical or horizontal. This layout is affected
-     by a number of parameters. The values given by @Efl.Pack.pack_padding.set
-     and @Efl.Pack.pack_align.set and the hints set to each object in the box.
+     by a number of parameters. The values given by @Efl.Gfx.Arrangement.content_padding.set
+     and @Efl.Gfx.Arrangement.content_align.set and the hints set to each object in the box.
 
      FIXME:
      THIS CLASS NEEDS GOOD UP TO DATE DOCUMENTATION. LEGACY BOX AND UI BOX
@@ -40,8 +40,8 @@ class @beta Efl.Ui.Box extends Efl.Ui.Widget implements Efl.Pack_Linear, Efl.Pac
       Efl.Pack.unpack_all;
       Efl.Pack.unpack;
       Efl.Pack.pack;
-      Efl.Pack.pack_padding { get; set; }
-      Efl.Pack.pack_align { get; set; }
+      Efl.Gfx.Arrangement.content_padding { get; set; }
+      Efl.Gfx.Arrangement.content_align { get; set; }
       Efl.Pack_Linear.pack_begin;
       Efl.Pack_Linear.pack_end;
       Efl.Pack_Linear.pack_before;
index 51934e7..770e55a 100644 (file)
@@ -118,12 +118,12 @@ _efl_ui_container_layout_init(Eo* obj, Efl_Ui_Container_Layout_Calc *calc)
                                      &calc[1].margin[0], &calc[1].margin[1]);
    calc[0].scale = calc[1].scale = efl_gfx_entity_scale_get(obj);
 
-   efl_pack_padding_get(obj, &calc[0].pad, &calc[1].pad, &pad_scalable);
+   efl_gfx_arrangement_content_padding_get(obj, &calc[0].pad, &calc[1].pad, &pad_scalable);
    calc[0].pad = pad_scalable ? (calc[0].pad * calc[0].scale) : calc[0].pad;
    calc[1].pad = pad_scalable ? (calc[1].pad * calc[1].scale) : calc[1].pad;
 
    // pack align is used if "no item has a weight"
-   efl_pack_align_get(obj, &calc[0].align, &calc[1].align);
+   efl_gfx_arrangement_content_align_get(obj, &calc[0].align, &calc[1].align);
    if (calc[0].align < 0)
      {
         calc[0].fill = EINA_TRUE;
index 8e0974d..8e40f1c 100644 (file)
@@ -1158,7 +1158,7 @@ _efl_ui_grid_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Grid_Data *pd)
 }
 
 EOLIAN static void
-_efl_ui_grid_efl_pack_pack_padding_set(Eo *obj EINA_UNUSED,
+_efl_ui_grid_efl_gfx_arrangement_content_padding_set(Eo *obj EINA_UNUSED,
                                        Efl_Ui_Grid_Data *pd,
                                        double h,
                                        double v,
@@ -1175,7 +1175,7 @@ _efl_ui_grid_efl_pack_pack_padding_set(Eo *obj EINA_UNUSED,
 }
 
 EOLIAN static void
-_efl_ui_grid_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED,
+_efl_ui_grid_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED,
                                        Efl_Ui_Grid_Data *pd,
                                        double *h,
                                        double *v,
@@ -1188,7 +1188,7 @@ _efl_ui_grid_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED,
 }
 
 EOLIAN static void
-_efl_ui_grid_efl_pack_pack_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double h, double v)
+_efl_ui_grid_efl_gfx_arrangement_content_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double h, double v)
 {
    pd->item.align.w = h;
    pd->item.align.h = v;
@@ -1196,7 +1196,7 @@ _efl_ui_grid_efl_pack_pack_align_set(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd,
 }
 
 EOLIAN static void
-_efl_ui_grid_efl_pack_pack_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double *h, double *v)
+_efl_ui_grid_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, double *h, double *v)
 {
    *h = pd->item.align.w;
    *v = pd->item.align.h;
index 6c70f36..54de96d 100644 (file)
@@ -7,7 +7,8 @@ class @beta Efl.Ui.Grid extends Efl.Ui.Layout_Base implements
                    Efl.Ui.Direction,
                    Efl.Ui.Clickable,
                    Efl.Ui.Selectable,
-                   Efl.Ui.Multi_Selectable
+                   Efl.Ui.Multi_Selectable,
+                   Efl.Gfx.Arrangement
 {
    [[Simple grid widget with Pack interface.]]
    methods {
@@ -84,8 +85,8 @@ class @beta Efl.Ui.Grid extends Efl.Ui.Layout_Base implements
       Efl.Pack_Linear.pack_content_get;
       Efl.Pack_Layout.layout_update;
       Efl.Pack_Layout.layout_request;
-      Efl.Pack.pack_padding { get; set; }
-      Efl.Pack.pack_align { get; set; }
+      Efl.Gfx.Arrangement.content_padding { get; set; }
+      Efl.Gfx.Arrangement.content_align { get; set; }
 
       //Efl.Ui.Scrollable
       Efl.Ui.Scrollable_Interactive.match_content { set; }
index 978aae3..27ed153 100644 (file)
@@ -880,36 +880,36 @@ _efl_ui_list_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_List_Data *pd)
 }
 
 EOLIAN static void
-_efl_ui_list_efl_pack_pack_padding_set(Eo *obj EINA_UNUSED,
+_efl_ui_list_efl_gfx_arrangement_content_padding_set(Eo *obj EINA_UNUSED,
                                        Efl_Ui_List_Data *pd,
                                        double h,
                                        double v,
                                        Eina_Bool scalable)
 {
-   efl_pack_padding_set(pd->box, h, v, scalable);
+   efl_gfx_arrangement_content_padding_set(pd->box, h, v, scalable);
 }
 
 EOLIAN static void
-_efl_ui_list_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED,
+_efl_ui_list_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED,
                                        Efl_Ui_List_Data *pd,
                                        double *h,
                                        double *v,
                                        Eina_Bool *scalable)
 {
-   efl_pack_padding_get(pd->box, h, v, scalable);
+   efl_gfx_arrangement_content_padding_get(pd->box, h, v, scalable);
 }
 
 /* FIXME: align could not work properly on the list
    EOLIAN static void
-   _efl_ui_list_efl_pack_pack_align_set(Eo *obj, Efl_Ui_List_Data *pd, double h, double v)
+   _efl_ui_list_efl_gfx_arrangement_content_align_set(Eo *obj, Efl_Ui_List_Data *pd, double h, double v)
    {
-   efl_pack_align_set(pd->box, h, v);
+   efl_gfx_arrangement_content_align_set(pd->box, h, v);
    }
 
    EOLIAN static void
-   _efl_ui_list_efl_pack_pack_align_get(Eo *obj EINA_UNUSED, Efl_Ui_List_Data *pd, double *h, double *v)
+   _efl_ui_list_efl_gfx_arrangement_content_align_get(Eo *obj EINA_UNUSED, Efl_Ui_List_Data *pd, double *h, double *v)
    {
-   efl_pack_align_get(pd->box, &h, &v);
+   efl_gfx_arrangement_content_align_get(pd->box, &h, &v);
    }
  */
 
index 8a77e37..d09288e 100644 (file)
@@ -6,7 +6,8 @@ class @beta Efl.Ui.List extends Efl.Ui.Layout_Base implements
                    Efl.Pack_Linear, Efl.Pack_Layout,
                    Efl.Ui.Clickable,
                    Efl.Ui.Selectable,
-                   Efl.Ui.Multi_Selectable
+                   Efl.Ui.Multi_Selectable,
+                   Efl.Gfx.Arrangement
 {
    [[Simple list widget with Pack interface.]]
    methods {
@@ -74,8 +75,7 @@ class @beta Efl.Ui.List extends Efl.Ui.Layout_Base implements
       Efl.Pack_Linear.pack_index_get;
       Efl.Pack_Layout.layout_update;
       Efl.Pack_Layout.layout_request;
-      Efl.Pack.pack_padding { get; set; }
-      //Efl.Pack.pack_align { get; set; }
+      Efl.Gfx.Arrangement.content_padding { get; set; }
 
       //Efl.Ui.Scrollable
       Efl.Ui.Scrollable_Interactive.match_content { set; }
index a3acc10..53560c1 100644 (file)
@@ -248,7 +248,7 @@ _efl_ui_table_efl_object_invalidate(Eo *obj, Efl_Ui_Table_Data *pd)
 }
 
 EOLIAN static void
-_efl_ui_table_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Table_Data *pd, double h, double v, Eina_Bool scalable)
+_efl_ui_table_efl_gfx_arrangement_content_padding_set(Eo *obj, Efl_Ui_Table_Data *pd, double h, double v, Eina_Bool scalable)
 {
    scalable = !!scalable;
    if (h < 0) h = 0;
@@ -266,7 +266,7 @@ _efl_ui_table_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Table_Data *pd, double h
 }
 
 EOLIAN static void
-_efl_ui_table_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd, double *h, double *v, Eina_Bool *scalable)
+_efl_ui_table_efl_gfx_arrangement_content_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd, double *h, double *v, Eina_Bool *scalable)
 {
    if (scalable) *scalable = pd->pad.scalable;
    if (h) *h = pd->pad.h;
@@ -274,7 +274,7 @@ _efl_ui_table_efl_pack_pack_padding_get(const Eo *obj EINA_UNUSED, Efl_Ui_Table_
 }
 
 EOLIAN static void
-_efl_ui_table_efl_pack_pack_align_set(Eo *obj, Efl_Ui_Table_Data *pd, double h, double v)
+_efl_ui_table_efl_gfx_arrangement_content_align_set(Eo *obj, Efl_Ui_Table_Data *pd, double h, double v)
 {
    if (h < 0) h = -1;
    else if (h > 1) h = 1;
@@ -291,7 +291,7 @@ _efl_ui_table_efl_pack_pack_align_set(Eo *obj, Efl_Ui_Table_Data *pd, double h,
 }
 
 EOLIAN static void
-_efl_ui_table_efl_pack_pack_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd, double *h, double *v)
+_efl_ui_table_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd, double *h, double *v)
 {
    if (h) *h = pd->align.h;
    if (v) *v = pd->align.v;
index e2d34bf..be5840b 100644 (file)
@@ -1,5 +1,5 @@
 class @beta Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pack_Layout,
-                   Efl.Ui.Direction
+                   Efl.Ui.Direction, Efl.Gfx.Arrangement
 {
    [[Efl UI table class]]
    methods {
@@ -30,8 +30,8 @@ class @beta Efl.Ui.Table extends Efl.Ui.Widget implements Efl.Pack_Table, Efl.Pa
       Efl.Pack.unpack_all;
       Efl.Pack.unpack;
       Efl.Pack.pack;
-      Efl.Pack.pack_padding { get; set; }
-      Efl.Pack.pack_align { get; set; }
+      Efl.Gfx.Arrangement.content_padding { get; set; }
+      Efl.Gfx.Arrangement.content_align { get; set; }
       Efl.Pack_Table.pack_table;
       Efl.Pack_Table.table_content_get;
       Efl.Pack_Table.table_contents_get;
index 1b3ebba..640db03 100644 (file)
@@ -1390,7 +1390,7 @@ _elm_colorselector_efl_ui_widget_theme_apply(Eo *obj, Elm_Colorselector_Data *sd
         if (vpadstr) v_pad = atoi(vpadstr);
 
         scale = efl_gfx_entity_scale_get(obj) * elm_config_scale_get() / edje_object_base_scale_get(wd->resize_obj);
-        efl_pack_padding_set(sd->palette_box, h_pad * scale, v_pad * scale, 0);
+        efl_gfx_arrangement_content_padding_set(sd->palette_box, h_pad * scale, v_pad * scale, 0);
 
         EINA_LIST_FOREACH(sd->items, elist, eo_item)
           {
@@ -2014,11 +2014,11 @@ _create_colorpalette(Evas_Object *obj)
    if (vpadstr) v_pad = atoi(vpadstr);
 
    scale = efl_gfx_entity_scale_get(obj) * elm_config_scale_get() / edje_object_base_scale_get(wd->resize_obj);
-   efl_pack_padding_set(sd->palette_box, h_pad * scale, v_pad * scale, 0);
+   efl_gfx_arrangement_content_padding_set(sd->palette_box, h_pad * scale, v_pad * scale, 0);
    /* TIZEN_ONLY(20161117): Fix palette align issue
-   efl_pack_align_set(sd->palette_box, 0.0, 0.0);
+   efl_gfx_arrangement_content_align_set(sd->palette_box, 0.0, 0.0);
    */
-   efl_pack_align_set(sd->palette_box, 0.5, 0.5);
+   efl_gfx_arrangement_content_align_set(sd->palette_box, 0.5, 0.5);
    /* END */
    if (!elm_layout_content_set(obj, "elm.palette", sd->palette_box))
      elm_layout_content_set(obj, "palette", sd->palette_box);
index ca9b0c1..a0fcb14 100644 (file)
@@ -252,7 +252,7 @@ EFL_START_TEST (efl_ui_box_layout_update)
 {
    int i, max_index = (sizeof(hints) / sizeof(Hint));
 
-   efl_pack_align_set(layout, 0.8, 0.2);
+   efl_gfx_arrangement_content_align_set(layout, 0.8, 0.2);
    efl_ui_direction_set(layout, EFL_UI_DIR_VERTICAL);
 
    Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, layout,
@@ -271,7 +271,7 @@ EFL_START_TEST (efl_ui_box_layout_update_pack)
    int i, max_index2, max_index3;
    Eo *btn, *btn2, *btn3;
 
-   efl_pack_align_set(layout, 0.8, 0.2);
+   efl_gfx_arrangement_content_align_set(layout, 0.8, 0.2);
    efl_ui_direction_set(layout, EFL_UI_DIR_VERTICAL);
 
    max_index2 = ((sizeof(hints2) / sizeof(Hint)) / 2);
@@ -502,34 +502,34 @@ EFL_START_TEST (efl_ui_box_properties)
    Eina_Bool b;
 
    //align test
-   efl_pack_align_get(layout, &h, &v);
+   efl_gfx_arrangement_content_align_get(layout, &h, &v);
    ck_assert(EINA_DBL_EQ(h, 0.5));
    ck_assert(EINA_DBL_EQ(v, 0.5));
 
-   efl_pack_align_set(layout, 0.3, 0.8234);
-   efl_pack_align_get(layout, &h, &v);
+   efl_gfx_arrangement_content_align_set(layout, 0.3, 0.8234);
+   efl_gfx_arrangement_content_align_get(layout, &h, &v);
    ck_assert(EINA_DBL_EQ(h, 0.3));
    ck_assert(EINA_DBL_EQ(v, 0.8234));
 
-   efl_pack_align_set(layout, -0.23, 123);
-   efl_pack_align_get(layout, &h, &v);
+   efl_gfx_arrangement_content_align_set(layout, -0.23, 123);
+   efl_gfx_arrangement_content_align_get(layout, &h, &v);
    ck_assert(EINA_DBL_EQ(h, -1));
    ck_assert(EINA_DBL_EQ(v, 1));
 
    //padding test
-   efl_pack_padding_get(layout, &h, &v, &b);
+   efl_gfx_arrangement_content_padding_get(layout, &h, &v, &b);
    ck_assert(EINA_DBL_EQ(h, 0.0));
    ck_assert(EINA_DBL_EQ(v, 0.0));
    ck_assert_int_eq(b, 0);
 
-   efl_pack_padding_set(layout, 0.3, 0.8234, 1);
-   efl_pack_padding_get(layout, &h, &v, &b);
+   efl_gfx_arrangement_content_padding_set(layout, 0.3, 0.8234, 1);
+   efl_gfx_arrangement_content_padding_get(layout, &h, &v, &b);
    ck_assert(EINA_DBL_EQ(h, 0.3));
    ck_assert(EINA_DBL_EQ(v, 0.8234));
    ck_assert_int_eq(b, 1);
 
-   efl_pack_padding_set(layout, -1.23, 123, 45);
-   efl_pack_padding_get(layout, &h, &v, &b);
+   efl_gfx_arrangement_content_padding_set(layout, -1.23, 123, 45);
+   efl_gfx_arrangement_content_padding_get(layout, &h, &v, &b);
    ck_assert(EINA_DBL_EQ(h, 0));
    ck_assert(EINA_DBL_EQ(v, 123));
    ck_assert_int_eq(b, 1);
index 4b4c7a0..d8ec8b2 100644 (file)
@@ -224,7 +224,7 @@ layout_setup()
    win = win_add();
 
    layout = efl_add(EFL_UI_BOX_FLOW_CLASS, win,
-                    efl_pack_align_set(efl_added, 0.8, 0.2),
+                    efl_gfx_arrangement_content_align_set(efl_added, 0.8, 0.2),
                     efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL));
 }
 
index dccbe1f..e025ed5 100644 (file)
@@ -133,7 +133,7 @@ layout_setup()
    win = win_add();
 
    layout = efl_add(EFL_UI_BOX_STACK_CLASS, win,
-                    efl_pack_align_set(efl_added, 0.8, 0.2),
+                    efl_gfx_arrangement_content_align_set(efl_added, 0.8, 0.2),
                     efl_ui_direction_set(efl_added, EFL_UI_DIR_VERTICAL));
 }
 
index 0762528..476be61 100644 (file)
@@ -279,7 +279,7 @@ EFL_START_TEST (efl_ui_table_layout_update)
 {
    int i, max_index = (sizeof(hints) / sizeof(Hint));
 
-   efl_pack_align_set(layout, 0.8, 0.2);
+   efl_gfx_arrangement_content_align_set(layout, 0.8, 0.2);
    efl_ui_direction_set(layout, EFL_UI_DIR_VERTICAL);
 
    Eo *btn = efl_add(EFL_UI_BUTTON_CLASS, layout,
@@ -298,7 +298,7 @@ EFL_START_TEST (efl_ui_table_layout_update_pack)
    int i, max_index2, max_index3;
    Eo *btn, *btn2, *btn3;
 
-   efl_pack_align_set(layout, 0.8, 0.2);
+   efl_gfx_arrangement_content_align_set(layout, 0.8, 0.2);
    efl_ui_direction_set(layout, EFL_UI_DIR_VERTICAL);
 
    max_index2 = ((sizeof(hints2) / sizeof(Hint)) / 2);
@@ -337,12 +337,12 @@ EFL_START_TEST (efl_ui_table_layout_update_matrix)
    int i, j, max_index = (sizeof(hints_matrix) / sizeof(Hint));
    Eo *btn[9];
 
-   efl_pack_align_set(layout, 0.8, 0.2);
+   efl_gfx_arrangement_content_align_set(layout, 0.8, 0.2);
    efl_ui_direction_set(layout, EFL_UI_DIR_VERTICAL);
 
    efl_gfx_hint_margin_set(layout, 10, 10, 20, 20);
    efl_ui_table_homogeneous_set(layout, 0, 1);
-   efl_pack_padding_set(layout, 10, 5, 0);
+   efl_gfx_arrangement_content_padding_set(layout, 10, 5, 0);
 
    for (i = 0; i < 3; i++)
      {
@@ -491,34 +491,34 @@ EFL_START_TEST (efl_ui_table_properties)
    Efl_Ui_Dir dirh, dirv;
 
    //align test
-   efl_pack_align_get(layout, &h, &v);
+   efl_gfx_arrangement_content_align_get(layout, &h, &v);
    ck_assert(EINA_DBL_EQ(h, 0.5));
    ck_assert(EINA_DBL_EQ(v, 0.5));
 
-   efl_pack_align_set(layout, 0.3, 0.8234);
-   efl_pack_align_get(layout, &h, &v);
+   efl_gfx_arrangement_content_align_set(layout, 0.3, 0.8234);
+   efl_gfx_arrangement_content_align_get(layout, &h, &v);
    ck_assert(EINA_DBL_EQ(h, 0.3));
    ck_assert(EINA_DBL_EQ(v, 0.8234));
 
-   efl_pack_align_set(layout, -0.23, 123);
-   efl_pack_align_get(layout, &h, &v);
+   efl_gfx_arrangement_content_align_set(layout, -0.23, 123);
+   efl_gfx_arrangement_content_align_get(layout, &h, &v);
    ck_assert(EINA_DBL_EQ(h, -1));
    ck_assert(EINA_DBL_EQ(v, 1));
 
    //padding test
-   efl_pack_padding_get(layout, &h, &v, &b);
+   efl_gfx_arrangement_content_padding_get(layout, &h, &v, &b);
    ck_assert(EINA_DBL_EQ(h, 0.0));
    ck_assert(EINA_DBL_EQ(v, 0.0));
    ck_assert_int_eq(b, 0);
 
-   efl_pack_padding_set(layout, 0.3, 0.8234, 1);
-   efl_pack_padding_get(layout, &h, &v, &b);
+   efl_gfx_arrangement_content_padding_set(layout, 0.3, 0.8234, 1);
+   efl_gfx_arrangement_content_padding_get(layout, &h, &v, &b);
    ck_assert(EINA_DBL_EQ(h, 0.3));
    ck_assert(EINA_DBL_EQ(v, 0.8234));
    ck_assert_int_eq(b, 1);
 
-   efl_pack_padding_set(layout, -1.23, 123, 45);
-   efl_pack_padding_get(layout, &h, &v, &b);
+   efl_gfx_arrangement_content_padding_set(layout, -1.23, 123, 45);
+   efl_gfx_arrangement_content_padding_get(layout, &h, &v, &b);
    ck_assert(EINA_DBL_EQ(h, 0));
    ck_assert(EINA_DBL_EQ(v, 123));
    ck_assert_int_eq(b, 1);
diff --git a/src/tests/elementary/spec/efl_test_gfx_arrangement.c b/src/tests/elementary/spec/efl_test_gfx_arrangement.c
new file mode 100644 (file)
index 0000000..ba213a5
--- /dev/null
@@ -0,0 +1,61 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+
+#include <Efl_Ui.h>
+#include "efl_ui_spec_suite.h"
+#include "suite_helpers.h"
+
+/* spec-meta-start
+      {"test-interface":"Efl.Gfx.Arrangement",
+       "test-widgets": ["Efl.Ui.Box", "Efl.Ui.Table"]}
+   spec-meta-end */
+
+EFL_START_TEST(pack_align)
+{
+#define TUPLE_CHECK(H,V,rh,rv) \
+  do { \
+   double v, h; \
+   efl_gfx_arrangement_content_align_set(widget, H, V); \
+   efl_gfx_arrangement_content_align_get(widget, &h, &v); \
+   ck_assert(v == rv); \
+   ck_assert(h == rh); \
+  } while(0);
+
+  TUPLE_CHECK(  1.0,   1.0,  1.0,  1.0);
+  TUPLE_CHECK(  0.0,   0.0,  0.0,  0.0);
+  TUPLE_CHECK(- 1.0, - 1.0, -1.0, -1.0);
+  TUPLE_CHECK(-42.0, -42.0, -1.0, -1.0);
+  TUPLE_CHECK( 42.0,  42.0,  1.0,  1.0);
+  TUPLE_CHECK(-42.0,  42.0, -1.0,  1.0);
+  TUPLE_CHECK( 42.0, -42.0,  1.0, -1.0);
+#undef TUPLE_CHECK
+}
+EFL_END_TEST
+
+EFL_START_TEST(pack_padding)
+{
+#define TUPLE_CHECK(H, V, rh, rv, S, rs) \
+  do { \
+   double v, h; \
+   Eina_Bool r; \
+   efl_gfx_arrangement_content_padding_set(widget, H, V, S); \
+   efl_gfx_arrangement_content_padding_get(widget, &h, &v, &r); \
+   ck_assert(v == rv); \
+   ck_assert(h == rh); \
+   ck_assert_int_eq(r, S); \
+  } while(0);
+
+  TUPLE_CHECK( 0.0, 0.0, 0.0, 0.0, EINA_TRUE, EINA_TRUE);
+  TUPLE_CHECK( -1.0, -123.0, 0.0, 0.0, EINA_FALSE, EINA_FALSE);
+  TUPLE_CHECK( -1.0,  123.0, 0.0, 123.0, EINA_FALSE, EINA_FALSE);
+#undef TUPLE_CHECK
+}
+EFL_END_TEST
+
+void
+efl_gfx_arrangement_behavior_test(TCase *tc)
+{
+   tcase_add_test(tc, pack_align);
+   tcase_add_test(tc, pack_padding);
+}
index 61b3baf..d71a1d1 100644 (file)
@@ -235,48 +235,6 @@ EFL_START_TEST(pack3)
 }
 EFL_END_TEST
 
-EFL_START_TEST(pack_align)
-{
-#define TUPLE_CHECK(H,V,rh,rv) \
-  do { \
-   double v, h; \
-   efl_pack_align_set(widget, H, V); \
-   efl_pack_align_get(widget, &h, &v); \
-   ck_assert(v == rv); \
-   ck_assert(h == rh); \
-  } while(0);
-
-  TUPLE_CHECK(  1.0,   1.0,  1.0,  1.0);
-  TUPLE_CHECK(  0.0,   0.0,  0.0,  0.0);
-  TUPLE_CHECK(- 1.0, - 1.0, -1.0, -1.0);
-  TUPLE_CHECK(-42.0, -42.0, -1.0, -1.0);
-  TUPLE_CHECK( 42.0,  42.0,  1.0,  1.0);
-  TUPLE_CHECK(-42.0,  42.0, -1.0,  1.0);
-  TUPLE_CHECK( 42.0, -42.0,  1.0, -1.0);
-#undef TUPLE_CHECK
-}
-EFL_END_TEST
-
-EFL_START_TEST(pack_padding)
-{
-#define TUPLE_CHECK(H, V, rh, rv, S, rs) \
-  do { \
-   double v, h; \
-   Eina_Bool r; \
-   efl_pack_padding_set(widget, H, V, S); \
-   efl_pack_padding_get(widget, &h, &v, &r); \
-   ck_assert(v == rv); \
-   ck_assert(h == rh); \
-   ck_assert_int_eq(r, S); \
-  } while(0);
-
-  TUPLE_CHECK( 0.0, 0.0, 0.0, 0.0, EINA_TRUE, EINA_TRUE);
-  TUPLE_CHECK( -1.0, -123.0, 0.0, 0.0, EINA_FALSE, EINA_FALSE);
-  TUPLE_CHECK( -1.0,  123.0, 0.0, 123.0, EINA_FALSE, EINA_FALSE);
-#undef TUPLE_CHECK
-}
-EFL_END_TEST
-
 EFL_START_TEST(evt_content_added)
 {
    Eina_Bool called = EINA_TRUE;
@@ -345,8 +303,6 @@ efl_pack_behavior_test(TCase *tc)
    tcase_add_test(tc, pack1);
    tcase_add_test(tc, pack2);
    tcase_add_test(tc, pack3);
-   tcase_add_test(tc, pack_align);
-   tcase_add_test(tc, pack_padding);
    tcase_add_test(tc, evt_content_added);
    tcase_add_test(tc, evt_content_removed);
    tcase_add_test(tc, child_killed);
index 6585fb5..03eed58 100644 (file)
@@ -13,6 +13,7 @@ extern Evas_Object *widget;
 void efl_pack_behavior_test(TCase *tc);
 void efl_pack_linear_behavior_test(TCase *tc);
 void efl_content_behavior_test(TCase *tc);
+void efl_gfx_arrangement_behavior_test(TCase *tc);
 
 void efl_test_container_content_equal(Efl_Ui_Widget **wid, unsigned int len);
 void efl_test_container_expect_evt_content_added(Efl_Ui_Widget *widget, const Efl_Event_Description *ev, Eina_Bool *flag, void *event_data);
index 6dfa87c..55c6e06 100644 (file)
@@ -3,6 +3,7 @@ efl_ui_suite_behavior_test_files = files([
   'efl_test_pack.c',
   'efl_test_pack_linear.c',
   'efl_test_content.c',
+  'efl_test_gfx_arrangement.c'
 ])
 
 efl_ui_suite_behavior_src = files([