summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Lee <sh10233.lee@samsung.com>2017-12-19 14:13:58 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 14:25:08 +0900
commit0f16a0671008a324d8e1b523fb16ce7b5c1acd6c (patch)
treed5dabf48cdae006c2d9ec2edcb845803acdcef1f
parent85b2a8669a321495967d5d45737fcb94f137d979 (diff)
downloadefl-0f16a0671008a324d8e1b523fb16ce7b5c1acd6c.tar.gz
interface : change efl_pack_grid and efl_ui_grid to efl_pack_table and efl_ui_table
Summary: Change name of 'grid' to 'table' for matching on common ui naming and avoiding confusion with 'gengrid' and 'grid view'. grid will be introduced as grid image view after. Test Plan: checked make & make install checked make check - there are errors but not related with these changes. checked make examples - there are errors in cxx but not related with these changes. checked make discheck - failed test in elementary_test with Efl.Ui.Table and Table_static. Reviewers: raster, cedric, jpeg, felipealmeida Differential Revision: https://phab.enlightenment.org/D5668
-rw-r--r--src/Makefile_Efl.am2
-rw-r--r--src/Makefile_Elementary.am14
-rw-r--r--src/bin/elementary/test.c12
-rw-r--r--src/bin/elementary/test_evas_snapshot.c34
-rw-r--r--src/bin/elementary/test_ui_popup.c20
-rw-r--r--src/bin/elementary/test_ui_scroller.c10
-rw-r--r--src/bin/elementary/test_ui_table.c (renamed from src/bin/elementary/test_ui_grid.c)124
-rw-r--r--src/bin/elementary/test_ui_table_static.c (renamed from src/bin/elementary/test_grid_static.c)82
-rw-r--r--src/examples/elementary/table_cxx_example_01.cc8
-rw-r--r--src/examples/elementary/table_cxx_example_02.cc8
-rw-r--r--src/lib/edje/edje_part_table.c20
-rw-r--r--src/lib/edje/efl_canvas_layout_part_table.eo16
-rw-r--r--src/lib/efl/CMakeLists.txt2
-rw-r--r--src/lib/efl/Efl.h2
-rw-r--r--src/lib/efl/interfaces/efl_interfaces_main.c2
-rw-r--r--src/lib/efl/interfaces/efl_pack_table.eo (renamed from src/lib/efl/interfaces/efl_pack_grid.eo)38
-rw-r--r--src/lib/elementary/Efl_Ui.h4
-rw-r--r--src/lib/elementary/Elementary.h4
-rw-r--r--src/lib/elementary/efl_ui_layout.c2
-rw-r--r--src/lib/elementary/efl_ui_layout_pack.c16
-rw-r--r--src/lib/elementary/efl_ui_layout_part_table.eo16
-rw-r--r--src/lib/elementary/efl_ui_table.c (renamed from src/lib/elementary/efl_ui_grid.c)152
-rw-r--r--src/lib/elementary/efl_ui_table.eo (renamed from src/lib/elementary/efl_ui_grid.eo)20
-rw-r--r--src/lib/elementary/efl_ui_table_private.h (renamed from src/lib/elementary/efl_ui_grid_private.h)22
-rw-r--r--src/lib/elementary/efl_ui_table_static.c (renamed from src/lib/elementary/efl_ui_grid_static.c)26
-rw-r--r--src/lib/elementary/efl_ui_table_static.eo (renamed from src/lib/elementary/efl_ui_grid_static.eo)4
-rw-r--r--src/tests/edje/edje_test_edje.c10
27 files changed, 335 insertions, 335 deletions
diff --git a/src/Makefile_Efl.am b/src/Makefile_Efl.am
index 1ab8eef152..a1c31b8784 100644
--- a/src/Makefile_Efl.am
+++ b/src/Makefile_Efl.am
@@ -53,7 +53,7 @@ efl_eolian_files = \
lib/efl/interfaces/efl_pack.eo \
lib/efl/interfaces/efl_pack_layout.eo \
lib/efl/interfaces/efl_pack_linear.eo \
- lib/efl/interfaces/efl_pack_grid.eo \
+ lib/efl/interfaces/efl_pack_table.eo \
lib/efl/interfaces/efl_vpath.eo \
lib/efl/interfaces/efl_vpath_manager.eo \
lib/efl/interfaces/efl_vpath_file.eo \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index c54181e049..090a12ca05 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -30,8 +30,8 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_box.eo \
lib/elementary/efl_ui_box_flow.eo \
lib/elementary/efl_ui_box_stack.eo \
- lib/elementary/efl_ui_grid.eo \
- lib/elementary/efl_ui_grid_static.eo \
+ lib/elementary/efl_ui_table.eo \
+ lib/elementary/efl_ui_table_static.eo \
lib/elementary/efl_ui_text_interactive.eo \
lib/elementary/efl_ui_text.eo \
lib/elementary/efl_ui_popup.eo \
@@ -730,9 +730,9 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/efl_ui_popup_alert_scroll.c \
lib/elementary/efl_ui_popup_alert_text.c \
lib/elementary/efl_ui_popup_anchor.c \
- lib/elementary/efl_ui_grid.c \
- lib/elementary/efl_ui_grid_static.c \
- lib/elementary/efl_ui_grid_private.h \
+ lib/elementary/efl_ui_table.c \
+ lib/elementary/efl_ui_table_static.c \
+ lib/elementary/efl_ui_table_private.h \
lib/elementary/efl_ui_text.c \
lib/elementary/efl_ui_clock.c \
lib/elementary/efl_ui_clock_private.h \
@@ -889,7 +889,7 @@ bin/elementary/test_glview_simple.c \
bin/elementary/test_glview.c \
bin/elementary/test_glview_manygears.c \
bin/elementary/test_grid.c \
-bin/elementary/test_grid_static.c \
+bin/elementary/test_ui_table_static.c \
bin/elementary/test_hover.c \
bin/elementary/test_hoversel.c \
bin/elementary/test_icon.c \
@@ -945,7 +945,7 @@ bin/elementary/test_transit.c \
bin/elementary/test_transit_bezier.c \
bin/elementary/test_ui_box.c \
bin/elementary/test_ui_clock.c \
-bin/elementary/test_ui_grid.c \
+bin/elementary/test_ui_table.c \
bin/elementary/test_ui_popup.c \
bin/elementary/test_ui_textpath.c \
bin/elementary/test_video.c \
diff --git a/src/bin/elementary/test.c b/src/bin/elementary/test.c
index eb5591300f..eeb8275db2 100644
--- a/src/bin/elementary/test.c
+++ b/src/bin/elementary/test.c
@@ -151,8 +151,8 @@ void test_table5(void *data, Evas_Object *obj, void *event_info);
void test_table6(void *data, Evas_Object *obj, void *event_info);
void test_table7(void *data, Evas_Object *obj, void *event_info);
void test_table8(void *data, Evas_Object *obj, void *event_info);
-void test_ui_grid(void *data, Evas_Object *obj, void *event_info);
-void test_ui_grid_linear(void *data, Evas_Object *obj, void *event_info);
+void test_ui_table(void *data, Evas_Object *obj, void *event_info);
+void test_ui_table_linear(void *data, Evas_Object *obj, void *event_info);
void test_gengrid(void *data, Evas_Object *obj, void *event_info);
void test_gengrid2(void *data, Evas_Object *obj, void *event_info);
void test_gengrid3(void *data, Evas_Object *obj, void *event_info);
@@ -264,7 +264,7 @@ void test_win_socket(void *data, Evas_Object *obj, void *event_info);
void test_win_plug(void *data, Evas_Object *obj, void *event_info);
void test_win_wm_rotation(void *data, Evas_Object *obj, void *event_info);
void test_grid(void *data, Evas_Object *obj, void *event_info);
-void test_grid_static(void *data, Evas_Object *obj, void *event_info);
+void test_ui_table_static(void *data, Evas_Object *obj, void *event_info);
void test_glview_simple(void *data, Evas_Object *obj, void *event_info);
void test_glview(void *data, Evas_Object *obj, void *event_info);
void test_glview_manygears(void *data, Evas_Object *obj, void *event_info);
@@ -803,9 +803,9 @@ add_tests:
//------------------------------//
ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Box", test_ui_box);
- ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Grid", test_ui_grid);
- ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Grid (Linear API)", test_ui_grid_linear);
- ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Grid_Static", test_grid_static);
+ ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table", test_ui_table);
+ ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table (Linear API)", test_ui_table_linear);
+ ADD_TEST_EO(NULL, "Containers", "Efl.Ui.Table_Static", test_ui_table_static);
//------------------------------//
ADD_TEST_EO(NULL, "Events", "Event Refeed", test_events);
diff --git a/src/bin/elementary/test_evas_snapshot.c b/src/bin/elementary/test_evas_snapshot.c
index a6d41eb59e..48cd8a38ea 100644
--- a/src/bin/elementary/test_evas_snapshot.c
+++ b/src/bin/elementary/test_evas_snapshot.c
@@ -3,7 +3,7 @@
#endif
#include <Elementary.h>
-#define GRID_SIZE 10
+#define TABLE_SIZE 10
static const char *images[] = { "plant_01.jpg", "rock_01.jpg",
"rock_02.jpg", "sky_01.jpg", "sky_04.jpg",
@@ -38,10 +38,10 @@ _anim_toggle(void *data, const Efl_Event *ev EINA_UNUSED)
{
Eina_Iterator *it;
Eo *win = data;
- Eo *grid, *o;
+ Eo *table, *o;
- grid = efl_key_wref_get(win, "grid");
- it = efl_content_iterate(grid);
+ table = efl_key_wref_get(win, "table");
+ it = efl_content_iterate(table);
EINA_ITERATOR_FOREACH(it, o)
{
if (efl_isa(o, EFL_PLAYER_INTERFACE) && efl_player_playable_get(o))
@@ -115,27 +115,27 @@ _toggle_map(void *data, const Efl_Event *ev EINA_UNUSED)
void
test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
- Eo *win, *grid, *o, *snap, *box;
+ Eo *win, *table, *o, *snap, *box;
const char *path;
win = efl_add(EFL_UI_WIN_CLASS, NULL,
efl_text_set(efl_added, "Evas Snapshot"),
efl_ui_win_autodel_set(efl_added, 1));
- grid = efl_add(EFL_UI_GRID_CLASS, win,
+ table = efl_add(EFL_UI_TABLE_CLASS, win,
efl_pack_padding_set(efl_added, 5, 5, 1));
- efl_content_set(win, grid);
+ efl_content_set(win, table);
// Objects below the snapshot
- for (int c = 0; c < GRID_SIZE; c++)
- for (int r = 0; r < GRID_SIZE; r++)
+ for (int c = 0; c < TABLE_SIZE; c++)
+ for (int r = 0; r < TABLE_SIZE; r++)
{
- int id = rnd[((r * GRID_SIZE) + c) % EINA_C_ARRAY_LENGTH(rnd)]
+ int id = rnd[((r * TABLE_SIZE) + c) % EINA_C_ARRAY_LENGTH(rnd)]
% EINA_C_ARRAY_LENGTH(images);
path = eina_slstr_printf("%s/images/%s", elm_app_data_dir_get(), images[id]);
o = _image_create(win, path);
- efl_pack_grid(grid, o, r, c, 1, 1);
+ efl_pack_table(table, o, r, c, 1, 1);
}
_anim_toggle(win, NULL);
@@ -143,14 +143,14 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
snap = efl_add(EFL_CANVAS_SNAPSHOT_CLASS, win,
efl_gfx_filter_program_set(efl_added, filter, "filter"),
efl_gfx_filter_data_set(efl_added, "radius", "tonumber(5)", EINA_TRUE),
- efl_pack_grid(grid, efl_added, 1, 1, GRID_SIZE - 2, GRID_SIZE - 2));
+ efl_pack_table(table, efl_added, 1, 1, TABLE_SIZE - 2, TABLE_SIZE - 2));
// Objects above snapshot
// 1. Opaque rect, not changing
o = evas_object_rectangle_add(win);
evas_object_color_set(o, 32, 32, 96, 255);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 2, GRID_SIZE / 2, GRID_SIZE - 4, GRID_SIZE / 2 - 2);
+ efl_pack_table(table, o, 2, TABLE_SIZE / 2, TABLE_SIZE - 4, TABLE_SIZE / 2 - 2);
evas_object_show(o);
// 2. Non-opaque animated object
@@ -161,7 +161,7 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
elm_progressbar_pulse_set(o, EINA_TRUE);
elm_progressbar_pulse(o, EINA_TRUE);
evas_object_show(o);
- efl_pack_grid(grid, o, 0, 0, GRID_SIZE, GRID_SIZE);
+ efl_pack_table(table, o, 0, 0, TABLE_SIZE, TABLE_SIZE);
// Controls
efl_add(EFL_UI_SLIDER_CLASS, win,
@@ -170,13 +170,13 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
elm_slider_value_set(efl_added, 5),
elm_slider_unit_format_set(efl_added, "%.0f px"),
efl_gfx_size_hint_weight_set(efl_added, 1.0, 0.0),
- efl_pack_grid(grid, efl_added, 0, GRID_SIZE, GRID_SIZE, 1),
+ efl_pack_table(table, efl_added, 0, TABLE_SIZE, TABLE_SIZE, 1),
efl_event_callback_add(efl_added, EFL_UI_SLIDER_EVENT_CHANGED, _radius_set, win));
box = efl_add(EFL_UI_BOX_CLASS, win,
efl_ui_direction_set(efl_added, EFL_UI_DIR_HORIZONTAL),
efl_gfx_size_hint_align_set(efl_added, -1.0, -1.0),
- efl_pack_grid(grid, efl_added, 0, GRID_SIZE + 1, GRID_SIZE, 1));
+ efl_pack_table(table, efl_added, 0, TABLE_SIZE + 1, TABLE_SIZE, 1));
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Toggle animation"),
@@ -203,6 +203,6 @@ test_evas_snapshot(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *e
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _close_do, win));
efl_key_wref_set(win, "snap", snap);
- efl_key_wref_set(win, "grid", grid);
+ efl_key_wref_set(win, "table", table);
efl_gfx_size_set(win, EINA_SIZE2D(400, 400));
}
diff --git a/src/bin/elementary/test_ui_popup.c b/src/bin/elementary/test_ui_popup.c
index 5f57e79179..9839c175c1 100644
--- a/src/bin/elementary/test_ui_popup.c
+++ b/src/bin/elementary/test_ui_popup.c
@@ -1047,50 +1047,50 @@ test_ui_popup_anchor(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _anchor_unset_cb, efl_ui_popup);
efl_content_set(efl_part(layout, "anchor_none"), btn);
- Eo *grid = efl_add(EFL_UI_GRID_CLASS, efl_ui_popup);
- efl_gfx_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ Eo *table = efl_add(EFL_UI_TABLE_CLASS, efl_ui_popup);
+ efl_gfx_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Center Align");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(70, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _center_align_cb, p_data);
- efl_pack_grid(grid, btn, 0, 0, 2, 1);
+ efl_pack_table(table, btn, 0, 0, 2, 1);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Top Align");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(70, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _top_align_cb, p_data);
- efl_pack_grid(grid, btn, 2, 0, 2, 1);
+ efl_pack_table(table, btn, 2, 0, 2, 1);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Bottom Align");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(70, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _bottom_align_cb, p_data);
- efl_pack_grid(grid, btn, 4, 0, 2, 1);
+ efl_pack_table(table, btn, 4, 0, 2, 1);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Left Align");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _left_align_cb, p_data);
- efl_pack_grid(grid, btn, 0, 1, 3, 1);
+ efl_pack_table(table, btn, 0, 1, 3, 1);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Right Align");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _right_align_cb, p_data);
- efl_pack_grid(grid, btn, 3, 1, 3, 1);
+ efl_pack_table(table, btn, 3, 1, 3, 1);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Position Set");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _position_set_cb, p_data);
- efl_pack_grid(grid, btn, 0, 2, 3, 1);
+ efl_pack_table(table, btn, 0, 2, 3, 1);
btn = efl_add(EFL_UI_BUTTON_CLASS, efl_ui_popup);
efl_text_set(btn, "Resize");
efl_gfx_size_hint_min_set(btn, EINA_SIZE2D(100, 35));
efl_event_callback_add(btn, EFL_UI_EVENT_CLICKED, _popup_resize_cb, p_data);
- efl_pack_grid(grid, btn, 3, 2, 3, 1);
+ efl_pack_table(table, btn, 3, 2, 3, 1);
- efl_content_set(efl_ui_popup, grid);
+ efl_content_set(efl_ui_popup, table);
}
diff --git a/src/bin/elementary/test_ui_scroller.c b/src/bin/elementary/test_ui_scroller.c
index 460ba41d05..275e9ee045 100644
--- a/src/bin/elementary/test_ui_scroller.c
+++ b/src/bin/elementary/test_ui_scroller.c
@@ -83,7 +83,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_pack(bx, efl_added));
}
- gd = efl_add(EFL_UI_GRID_CLASS, bx,
+ gd = efl_add(EFL_UI_TABLE_CLASS, bx,
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
efl_gfx_size_hint_align_set(efl_added, 0.5, 0),
efl_pack(bx, efl_added));
@@ -91,14 +91,14 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_add(EFL_CANVAS_RECTANGLE_CLASS, win,
efl_gfx_color_set(efl_added, 0, 0, 0, 0),
efl_gfx_size_hint_min_set(efl_added, EINA_SIZE2D(200, 120)),
- efl_pack_grid(gd, efl_added, 0, 0, 1, 1));
+ efl_pack_table(gd, efl_added, 0, 0, 1, 1));
sc3 = efl_add(EFL_UI_SCROLLER_CLASS, win,
efl_gfx_size_hint_weight_set(efl_added, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND),
efl_gfx_size_hint_align_set(efl_added, EVAS_HINT_FILL, EVAS_HINT_FILL),
- efl_pack_grid(gd, efl_added, 0, 0, 1, 1));
+ efl_pack_table(gd, efl_added, 0, 0, 1, 1));
- gd2 = efl_add(EFL_UI_GRID_CLASS, sc3,
+ gd2 = efl_add(EFL_UI_TABLE_CLASS, sc3,
efl_content_set(sc3, efl_added));
for (j = 0; j < 16; j++)
@@ -108,7 +108,7 @@ test_efl_ui_scroller(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
efl_add(EFL_UI_BUTTON_CLASS, win,
efl_text_set(efl_added, "Both"),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _bt_clicked, NULL),
- efl_pack_grid(gd2, efl_added, i, j, 1, 1));
+ efl_pack_table(gd2, efl_added, i, j, 1, 1));
}
}
diff --git a/src/bin/elementary/test_ui_grid.c b/src/bin/elementary/test_ui_table.c
index eba4eadb6c..d16047577a 100644
--- a/src/bin/elementary/test_ui_grid.c
+++ b/src/bin/elementary/test_ui_table.c
@@ -25,43 +25,43 @@ weights_cb(void *data, const Efl_Event *event)
EFL_OBJECT_OP_FUNC(efl_pack_layout_update, _custom_layout_update));
Weight_Mode mode = elm_radio_state_value_get(event->object);
- Eo *grid = data;
+ Eo *table = data;
if (mode != CUSTOM)
- efl_object_override(grid, NULL);
+ efl_object_override(table, NULL);
switch (mode)
{
case NONE:
- efl_gfx_size_hint_align_set(grid, 0.5, 0.5);
+ efl_gfx_size_hint_align_set(table, 0.5, 0.5);
for (int i = 0; i < 7; i++)
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
break;
case NONE_BUT_FILL:
- efl_gfx_size_hint_align_set(grid, -1, -1);
+ efl_gfx_size_hint_align_set(table, -1, -1);
for (int i = 0; i < 7; i++)
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
break;
case EQUAL:
- efl_gfx_size_hint_align_set(grid, 0.5, 0.5);
+ efl_gfx_size_hint_align_set(table, 0.5, 0.5);
for (int i = 0; i < 7; i++)
efl_gfx_size_hint_weight_set(objects[i], 1, 1);
break;
case ONE:
- efl_gfx_size_hint_align_set(grid, 0.5, 0.5);
+ efl_gfx_size_hint_align_set(table, 0.5, 0.5);
for (int i = 0; i < 6; i++)
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
efl_gfx_size_hint_weight_set(objects[6], 1, 1);
break;
case TWO:
- efl_gfx_size_hint_align_set(grid, 0.5, 0.5);
+ efl_gfx_size_hint_align_set(table, 0.5, 0.5);
for (int i = 0; i < 5; i++)
efl_gfx_size_hint_weight_set(objects[i], 0, 0);
efl_gfx_size_hint_weight_set(objects[5], 1, 1);
efl_gfx_size_hint_weight_set(objects[6], 1, 1);
break;
case CUSTOM:
- efl_object_override(grid, &custom_layout_ops);
+ efl_object_override(table, &custom_layout_ops);
break;
}
}
@@ -103,7 +103,7 @@ layout_updated_cb(void *data, const Efl_Event *event)
char buf[64];
int rows, cols, count;
- efl_pack_grid_size_get(event->object, &cols, &rows);
+ efl_pack_table_size_get(event->object, &cols, &rows);
count = efl_content_count(event->object);
sprintf(buf, "%d items (%dx%d)", count, cols, rows);
elm_object_text_set(o, buf);
@@ -117,7 +117,7 @@ child_evt_cb(void *data, const Efl_Event *event)
int col, row, colspan, rowspan;
char buf[64];
- efl_pack_grid_position_get(event->object, it, &col, &row, &colspan, &rowspan);
+ efl_pack_table_position_get(event->object, it, &col, &row, &colspan, &rowspan);
if (event->desc == EFL_CONTAINER_EVENT_CONTENT_ADDED)
sprintf(buf, "pack %d,%d %dx%d", col, row, colspan, rowspan);
else
@@ -128,7 +128,7 @@ child_evt_cb(void *data, const Efl_Event *event)
static void
_custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
{
- /* Example custom layout for grid:
+ /* Example custom layout for table:
* divide space into regions of same size, place objects in center of their
* cells using their min size
* Note: This is a TERRIBLE layout function (disregards align, weig.ht, ...)
@@ -141,13 +141,13 @@ _custom_layout_update(Eo *pack, void *_pd EINA_UNUSED)
g = efl_gfx_geometry_get(pack);
- efl_pack_grid_size_get(pack, &cols, &rows);
+ efl_pack_table_size_get(pack, &cols, &rows);
if (!cols || !rows) goto end;
it = efl_content_iterate(pack);
EINA_ITERATOR_FOREACH(it, item)
{
- if (efl_pack_grid_position_get(pack, item, &c, &r, &cs, &rs))
+ if (efl_pack_table_position_get(pack, item, &c, &r, &cs, &rs))
{
Eina_Rect m;
@@ -167,12 +167,12 @@ end:
}
void
-test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+test_ui_table(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
- Evas_Object *win, *bx, *o, *vbox, *f, *hbox, *chk, *grid;
+ Evas_Object *win, *bx, *o, *vbox, *f, *hbox, *chk, *table;
int i = 0;
- win = elm_win_util_standard_add("ui-grid", "Efl.Ui.Grid");
+ win = elm_win_util_standard_add("ui-table", "Efl.Ui.Table");
elm_win_autodel_set(win, EINA_TRUE);
efl_gfx_size_set(win, EINA_SIZE2D(600, 400));
@@ -185,7 +185,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
// create here to pass in cb
- grid = efl_add(EFL_UI_GRID_CLASS, win);
+ table = efl_add(EFL_UI_TABLE_CLASS, win);
/* controls */
@@ -210,15 +210,15 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
chk = o = elm_radio_add(win);
elm_object_text_set(o, "No weight");
- efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, grid);
+ efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
efl_gfx_size_hint_align_set(o, 0, 0.5);
elm_radio_state_value_set(o, NONE);
efl_pack(bx, o);
efl_gfx_visible_set(o, 1);
o = elm_radio_add(win);
- elm_object_text_set(o, "No weight + grid fill");
- efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, grid);
+ elm_object_text_set(o, "No weight + table fill");
+ efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
efl_gfx_size_hint_align_set(o, 0, 0.5);
elm_radio_state_value_set(o, NONE_BUT_FILL);
elm_radio_group_add(o, chk);
@@ -227,7 +227,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
o = elm_radio_add(win);
elm_object_text_set(o, "Equal weights");
- efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, grid);
+ efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
efl_gfx_size_hint_align_set(o, 0, 0.5);
elm_radio_state_value_set(o, EQUAL);
elm_radio_group_add(o, chk);
@@ -236,7 +236,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
o = elm_radio_add(win);
elm_object_text_set(o, "One weight only");
- efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, grid);
+ efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
efl_gfx_size_hint_align_set(o, 0, 0.5);
elm_radio_state_value_set(o, ONE);
elm_radio_group_add(o, chk);
@@ -245,7 +245,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
o = elm_radio_add(win);
elm_object_text_set(o, "Two weights");
- efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, grid);
+ efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
efl_gfx_size_hint_align_set(o, 0, 0.5);
elm_radio_state_value_set(o, TWO);
elm_radio_group_add(o, chk);
@@ -254,7 +254,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
o = elm_radio_add(win);
elm_object_text_set(o, "Custom layout");
- efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, grid);
+ efl_event_callback_add(o, EFL_UI_RADIO_EVENT_CHANGED, weights_cb, table);
efl_gfx_size_hint_align_set(o, 0, 0.5);
elm_radio_state_value_set(o, CUSTOM);
elm_radio_group_add(o, chk);
@@ -308,7 +308,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
elm_slider_horizontal_set(o, 0);
efl_gfx_size_hint_align_set(o, 0.5, -1);
efl_gfx_size_hint_weight_set(o, 1, 1);
- efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, padding_slider_cb, grid);
+ efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, padding_slider_cb, table);
elm_slider_min_max_set(o, 0, 40);
elm_slider_inverted_set(o, 1);
elm_slider_value_set(o, 10);
@@ -334,7 +334,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
elm_slider_horizontal_set(o, 0);
efl_gfx_size_hint_align_set(o, 0.5, -1);
efl_gfx_size_hint_weight_set(o, 1, 1);
- efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, margin_slider_cb, grid);
+ efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, margin_slider_cb, table);
elm_slider_min_max_set(o, 0, 40);
elm_slider_inverted_set(o, 1);
elm_slider_value_set(o, 10);
@@ -360,7 +360,7 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
elm_slider_horizontal_set(o, 0);
efl_gfx_size_hint_align_set(o, 0.5, -1);
efl_gfx_size_hint_weight_set(o, 1, 1);
- efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, btnmargins_slider_cb, grid);
+ efl_event_callback_add(o, EFL_UI_SLIDER_EVENT_CHANGED, btnmargins_slider_cb, table);
elm_slider_min_max_set(o, 0, 40);
elm_slider_inverted_set(o, 1);
elm_slider_value_set(o, 10);
@@ -381,13 +381,13 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
efl_gfx_visible_set(o, 1);
o = elm_label_add(win);
- efl_event_callback_add(grid, EFL_PACK_EVENT_LAYOUT_UPDATED, layout_updated_cb, o);
+ efl_event_callback_add(table, EFL_PACK_EVENT_LAYOUT_UPDATED, layout_updated_cb, o);
efl_pack(bx, o);
efl_gfx_visible_set(o, 1);
o = elm_label_add(win);
- efl_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o);
- efl_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o);
+ efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o);
+ efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o);
efl_gfx_size_hint_align_set(o, 0.5, 0);
efl_gfx_size_hint_weight_set(o, 1, 1);
efl_pack(bx, o);
@@ -402,55 +402,55 @@ test_ui_grid(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_i
efl_pack(vbox, f);
efl_gfx_visible_set(f, 1);
- efl_gfx_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_content_set(f, grid);
- efl_gfx_visible_set(grid, 1);
+ efl_gfx_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_content_set(f, table);
+ efl_gfx_visible_set(table, 1);
objects[i++] = o = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_gfx_size_hint_min_set(o, EINA_SIZE2D(10, 10));
efl_gfx_color_set(o, 64, 96, 128, 255);
- efl_pack_grid(grid, o, 0, 0, 3, 1);
+ efl_pack_table(table, o, 0, 0, 3, 1);
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Button 1");
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 0, 0, 1, 1);
+ efl_pack_table(table, o, 0, 0, 1, 1);
efl_gfx_visible_set(o, 1);
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Button 2");
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 1, 0, 1, 1);
+ efl_pack_table(table, o, 1, 0, 1, 1);
efl_gfx_visible_set(o, 1);
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Button 3");
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 2, 0, 1, 1);
+ efl_pack_table(table, o, 2, 0, 1, 1);
efl_gfx_visible_set(o, 1);
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Button 4");
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 0, 1, 2, 1);
+ efl_pack_table(table, o, 0, 1, 2, 1);
efl_gfx_visible_set(o, 1);
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Button 5");
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 2, 1, 1, 2);
+ efl_pack_table(table, o, 2, 1, 1, 2);
efl_gfx_visible_set(o, 1);
objects[i++] = o = elm_button_add(win);
elm_object_text_set(o, "Button 6");
efl_gfx_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
efl_gfx_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
- efl_pack_grid(grid, o, 0, 2, 2, 1);
+ efl_pack_table(table, o, 0, 2, 2, 1);
efl_gfx_visible_set(o, 1);
efl_gfx_visible_set(win, 1);
@@ -474,29 +474,29 @@ remove_cb(void *data EINA_UNUSED, const Efl_Event *ev)
static void
append_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Eo *grid = data;
- Eo *o = elm_button_add(grid);
+ Eo *table = data;
+ Eo *o = elm_button_add(table);
elm_object_text_set(o, btn_text("appended"));
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
elm_object_tooltip_text_set(o, "Click to unpack");
- efl_pack_end(grid, o);
+ efl_pack_end(table, o);
efl_gfx_visible_set(o, 1);
}
static void
clear_cb(void *data, const Efl_Event *ev EINA_UNUSED)
{
- Eo *grid = data;
- efl_pack_clear(grid);
+ Eo *table = data;
+ efl_pack_clear(table);
}
void
-test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
+test_ui_table_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- Evas_Object *win, *o, *vbox, *f, *hbox, *grid, *ico, *bx;
+ Evas_Object *win, *o, *vbox, *f, *hbox, *table, *ico, *bx;
- win = elm_win_util_standard_add("ui-grid-linear", "Efl.Ui.Grid Linear APIs");
+ win = elm_win_util_standard_add("ui-table-linear", "Efl.Ui.Table Linear APIs");
elm_win_autodel_set(win, EINA_TRUE);
efl_gfx_size_set(win, EINA_SIZE2D(600, 400));
@@ -509,7 +509,7 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
// create here to pass in cb
- grid = efl_add(EFL_UI_GRID_CLASS, win);
+ table = efl_add(EFL_UI_TABLE_CLASS, win);
/* controls */
@@ -531,7 +531,7 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
o = elm_button_add(win);
elm_object_content_set(o, ico);
elm_object_text_set(o, "Append");
- efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, append_cb, grid);
+ efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, append_cb, table);
efl_pack(hbox, o);
efl_gfx_visible_set(o, 1);
@@ -540,7 +540,7 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
o = elm_button_add(win);
elm_object_content_set(o, ico);
elm_object_text_set(o, "Clear");
- efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, clear_cb, grid);
+ efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, clear_cb, table);
efl_pack(hbox, o);
efl_gfx_visible_set(o, 1);
@@ -559,13 +559,13 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
efl_gfx_visible_set(o, 1);
o = elm_label_add(win);
- efl_event_callback_add(grid, EFL_PACK_EVENT_LAYOUT_UPDATED, layout_updated_cb, o);
+ efl_event_callback_add(table, EFL_PACK_EVENT_LAYOUT_UPDATED, layout_updated_cb, o);
efl_pack(bx, o);
efl_gfx_visible_set(o, 1);
o = elm_label_add(win);
- efl_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o);
- efl_event_callback_add(grid, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o);
+ efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_ADDED, child_evt_cb, o);
+ efl_event_callback_add(table, EFL_CONTAINER_EVENT_CONTENT_REMOVED, child_evt_cb, o);
efl_gfx_size_hint_align_set(o, 0.5, 0);
efl_gfx_size_hint_weight_set(o, 1, 1);
efl_pack(bx, o);
@@ -580,28 +580,28 @@ test_ui_grid_linear(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
efl_pack(vbox, f);
efl_gfx_visible_set(f, 1);
- efl_pack_grid_columns_set(grid, 4);
- efl_pack_grid_direction_set(grid, EFL_UI_DIR_RIGHT, EFL_UI_DIR_DOWN);
- efl_gfx_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_content_set(f, grid);
- efl_gfx_visible_set(grid, 1);
+ efl_pack_table_columns_set(table, 4);
+ efl_pack_table_direction_set(table, EFL_UI_DIR_RIGHT, EFL_UI_DIR_DOWN);
+ efl_gfx_size_hint_weight_set(table, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_object_content_set(f, table);
+ efl_gfx_visible_set(table, 1);
o = elm_button_add(win);
elm_object_text_set(o, btn_text(NULL));
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
- efl_pack(grid, o);
+ efl_pack(table, o);
efl_gfx_visible_set(o, 1);
o = elm_button_add(win);
elm_object_text_set(o, btn_text(NULL));
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
- efl_pack(grid, o);
+ efl_pack(table, o);
efl_gfx_visible_set(o, 1);
o = elm_button_add(win);
elm_object_text_set(o, btn_text(NULL));
efl_event_callback_add(o, EFL_UI_EVENT_CLICKED, remove_cb, NULL);
- efl_pack(grid, o);
+ efl_pack(table, o);
efl_gfx_visible_set(o, 1);
efl_gfx_visible_set(win, 1);
diff --git a/src/bin/elementary/test_grid_static.c b/src/bin/elementary/test_ui_table_static.c
index 108d7d7831..8681e7ae93 100644
--- a/src/bin/elementary/test_grid_static.c
+++ b/src/bin/elementary/test_ui_table_static.c
@@ -6,7 +6,7 @@
struct _Api_Data
{
- Eo *grid;
+ Eo *table;
Eo *child;
};
typedef struct _Api_Data Api_Data;
@@ -20,10 +20,10 @@ typedef struct _api_data api_data;
enum _api_state
{
- GRID_PACK_SET,
- GRID_UNPACK,
- GRID_SIZE,
- GRID_CLEAR,
+ TABLE_PACK_SET,
+ TABLE_UNPACK,
+ TABLE_SIZE,
+ TABLE_CLEAR,
API_STATE_LAST
};
typedef enum _api_state api_state;
@@ -36,27 +36,27 @@ set_api_state(api_data *api)
switch(api->state)
{ /* Put all api-changes under switch */
- case GRID_PACK_SET: /* 0 */
- efl_pack_grid(dt->grid, dt->child, 5, 15, 60, 40);
+ case TABLE_PACK_SET: /* 0 */
+ efl_pack_table(dt->table, dt->child, 5, 15, 60, 40);
break;
- case GRID_UNPACK: /* 1 */
- efl_pack_unpack(dt->grid, dt->child);
+ case TABLE_UNPACK: /* 1 */
+ efl_pack_unpack(dt->table, dt->child);
efl_del(dt->child);
break;
- case GRID_SIZE: /* 2 */
- efl_pack_grid_size_get(dt->grid, &w, &h);
+ case TABLE_SIZE: /* 2 */
+ efl_pack_table_size_get(dt->table, &w, &h);
printf("size w=<%d> h=<%d>\n", w, h);
- w = h = 100; /* grid size returns wrong values */
+ w = h = 100; /* table size returns wrong values */
w += 30;
h += 10;
- efl_pack_grid_size_set(dt->grid, w, h);
+ efl_pack_table_size_set(dt->table, w, h);
break;
- case GRID_CLEAR: /* 3 */
- efl_pack_clear(dt->grid);
+ case TABLE_CLEAR: /* 3 */
+ efl_pack_clear(dt->table);
break;
default:
@@ -80,16 +80,16 @@ _api_bt_clicked(void *data, const Efl_Event *ev)
}
static void
-_ch_grid(void *data, const Efl_Event *ev)
+_ch_table(void *data, const Efl_Event *ev)
{
- Eo *gd = data;
+ Eo *table = data;
int x, y, w, h;
- // FIXME: old elm_grid API doesn't need grid object
+ // FIXME: old elm_table API doesn't need table object
//elm_grid_pack_get(obj, &x, &y, &w, &h);
//elm_grid_pack_set(obj, x - 1, y - 1, w + 2, h + 2);
- efl_pack_grid_position_get(gd, ev->object, &x, &y, &w, &h);
- efl_pack_grid(gd, ev->object, x - 1, y - 1, w + 2, h + 2);
+ efl_pack_table_position_get(table, ev->object, &x, &y, &w, &h);
+ efl_pack_table(table, ev->object, x - 1, y - 1, w + 2, h + 2);
}
static void
@@ -99,20 +99,20 @@ _win_del(void *data, const Efl_Event *ev EINA_UNUSED)
}
void
-test_grid_static(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+test_ui_table_static(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
- Eo *win, *gd, *bt, *rc, *en;
+ Eo *win, *table, *bt, *rc, *en;
api_data *api = calloc(1, sizeof(*api));
win = efl_add(EFL_UI_WIN_CLASS, NULL,
- efl_ui_win_name_set(efl_added, "grid"),
- efl_text_set(efl_added, "Grid"),
+ efl_ui_win_name_set(efl_added, "table"),
+ efl_text_set(efl_added, "Table"),
efl_ui_win_autodel_set(efl_added, EINA_TRUE),
efl_event_callback_add(efl_added, EFL_EVENT_DEL, _win_del, api));
- gd = efl_add(EFL_UI_GRID_STATIC_CLASS, win);
- efl_content_set(win, gd);
- api->data.grid = gd;
+ table = efl_add(EFL_UI_TABLE_STATIC_CLASS, win);
+ efl_content_set(win, table);
+ api->data.table = table;
/* FIXME: EO-ify entry & button & test_set! */
@@ -120,69 +120,69 @@ test_grid_static(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
elm_entry_scrollable_set(en, EINA_TRUE);
elm_object_text_set(en, "Entry text");
elm_entry_single_line_set(en, EINA_TRUE);
- efl_pack_grid(gd, en, 50, 10, 40, 10);
+ efl_pack_table(table, en, 50, 10, 40, 10);
efl_gfx_visible_set(en, 1);
en = elm_entry_add(win);
elm_entry_scrollable_set(en, EINA_TRUE);
elm_object_text_set(en, "Entry text 2");
elm_entry_single_line_set(en, EINA_TRUE);
- efl_pack_grid(gd, en, 60, 20, 30, 10);
+ efl_pack_table(table, en, 60, 20, 30, 10);
efl_gfx_visible_set(en, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Next API function");
efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _api_bt_clicked, api);
- efl_pack_grid(gd, bt, 30, 0, 40, 10);
+ efl_pack_table(table, bt, 30, 0, 40, 10);
elm_object_disabled_set(bt, api->state == API_STATE_LAST);
efl_gfx_visible_set(bt, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button");
- efl_pack_grid(gd, bt, 0, 0, 20, 20);
+ efl_pack_table(table, bt, 0, 0, 20, 20);
efl_gfx_visible_set(bt, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button");
- efl_pack_grid(gd, bt, 10, 10, 40, 20);
+ efl_pack_table(table, bt, 10, 10, 40, 20);
api->data.child = bt;
efl_gfx_visible_set(bt, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button");
- efl_pack_grid(gd, bt, 10, 30, 20, 50);
+ efl_pack_table(table, bt, 10, 30, 20, 50);
efl_gfx_visible_set(bt, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Button");
- efl_pack_grid(gd, bt, 80, 80, 20, 20);
+ efl_pack_table(table, bt, 80, 80, 20, 20);
efl_gfx_visible_set(bt, 1);
bt = elm_button_add(win);
elm_object_text_set(bt, "Change");
- efl_pack_grid(gd, bt, 40, 40, 20, 20);
- efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _ch_grid, gd);
+ efl_pack_table(table, bt, 40, 40, 20, 20);
+ efl_event_callback_add(bt, EFL_UI_EVENT_CLICKED, _ch_table, table);
efl_gfx_visible_set(bt, 1);
rc = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_gfx_color_set(rc, 128, 0, 0, 128);
- efl_pack_grid(gd, rc, 40, 70, 20, 10);
+ efl_pack_table(table, rc, 40, 70, 20, 10);
rc = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_gfx_color_set(rc, 0, 128, 0, 128);
- efl_pack_grid(gd, rc, 60, 70, 10, 10);
+ efl_pack_table(table, rc, 60, 70, 10, 10);
rc = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_gfx_color_set(rc, 0, 0, 128, 128);
- efl_pack_grid(gd, rc, 40, 80, 10, 10);
+ efl_pack_table(table, rc, 40, 80, 10, 10);
rc = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_gfx_color_set(rc, 128, 0, 128, 128);
- efl_pack_grid(gd, rc, 50, 80, 10, 10);
+ efl_pack_table(table, rc, 50, 80, 10, 10);
rc = efl_add(EFL_CANVAS_RECTANGLE_CLASS, win);
efl_gfx_color_set(rc, 128, 64, 0, 128);
- efl_pack_grid(gd, rc, 60, 80, 10, 10);
+ efl_pack_table(table, rc, 60, 80, 10, 10);
efl_gfx_size_set(win, EINA_SIZE2D(480, 480));
}
diff --git a/src/examples/elementary/table_cxx_example_01.cc b/src/examples/elementary/table_cxx_example_01.cc
index c0155c3c32..883eef07ab 100644
--- a/src/examples/elementary/table_cxx_example_01.cc
+++ b/src/examples/elementary/table_cxx_example_01.cc
@@ -21,18 +21,18 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl::ui::Text label(instantiate, win);
label.text_set("label 0");
- table.pack_grid(label, 0, 0, 1, 1);
+ table.pack_table(label, 0, 0, 1, 1);
efl::ui::Text label1(instantiate, win);
label1.text_set("label 1");
- table.pack_grid(label1, 1, 0, 1, 1);
+ table.pack_table(label1, 1, 0, 1, 1);
efl::ui::Text label2(instantiate, win);
label2.text_set("label 2");
- table.pack_grid(label2, 0, 1, 1, 1);
+ table.pack_table(label2, 0, 1, 1, 1);
efl::ui::Text label3(instantiate, win);
label3.text_set("label 3");
- table.pack_grid(label3, 1, 1, 1, 1);
+ table.pack_table(label3, 1, 1, 1, 1);
}
EFL_MAIN()
diff --git a/src/examples/elementary/table_cxx_example_02.cc b/src/examples/elementary/table_cxx_example_02.cc
index d37e6f307b..71b9da2ab9 100644
--- a/src/examples/elementary/table_cxx_example_02.cc
+++ b/src/examples/elementary/table_cxx_example_02.cc
@@ -21,21 +21,21 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev EINA_UNUSED)
efl::canvas::Rectangle rect(instantiate, win);
rect.color_set(255, 0, 0, 255);
rect.hint_min_set({100, 50});
- table.pack_grid(rect, 0, 0, 2, 1);
+ table.pack_table(rect, 0, 0, 2, 1);
efl::canvas::Rectangle rect2(instantiate, win);
rect2.color_set(0, 255, 0, 255);
rect2.hint_min_set({50, 100});
- table.pack_grid(rect2, 0, 1, 1, 2);
+ table.pack_table(rect2, 0, 1, 1, 2);
efl::canvas::Rectangle rect3(instantiate, win);
rect3.color_set(0, 0, 255, 255);
rect3.hint_min_set({50, 50});
- table.pack_grid(rect3, 1, 1, 1, 1);
+ table.pack_table(rect3, 1, 1, 1, 1);
efl::canvas::Rectangle rect4(instantiate, win);
rect4.color_set(255, 255, 0, 255);
rect4.hint_min_set({50, 50});
- table.pack_grid(rect4, 1, 2, 1, 1);
+ table.pack_table(rect4, 1, 2, 1, 1);
}
EFL_MAIN()
diff --git a/src/lib/edje/edje_part_table.c b/src/lib/edje/edje_part_table.c
index 3fd7c61689..87c694f2bf 100644
--- a/src/lib/edje/edje_part_table.c
+++ b/src/lib/edje/edje_part_table.c
@@ -105,28 +105,28 @@ _efl_canvas_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, void *_pd EIN
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_part_table_efl_pack_grid_pack_grid(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
+_efl_canvas_layout_part_table_efl_pack_table_pack_table(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
{
PROXY_DATA_GET(obj, pd);
return _edje_part_table_pack(pd->ed, pd->part, subobj, col, row, colspan, rowspan);
}
EOLIAN static Efl_Gfx *
-_efl_canvas_layout_part_table_efl_pack_grid_grid_content_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row)
+_efl_canvas_layout_part_table_efl_pack_table_table_content_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row)
{
PROXY_DATA_GET(obj, pd);
return _edje_part_table_child_get(pd->ed, pd->part, col, row);
}
EOLIAN static void
-_efl_canvas_layout_part_table_efl_pack_grid_grid_size_get(Eo *obj, void *_pd EINA_UNUSED, int *cols, int *rows)
+_efl_canvas_layout_part_table_efl_pack_table_table_size_get(Eo *obj, void *_pd EINA_UNUSED, int *cols, int *rows)
{
PROXY_DATA_GET(obj, pd);
_edje_part_table_col_row_size_get(pd->ed, pd->part, cols, rows);
}
EOLIAN static int
-_efl_canvas_layout_part_table_efl_pack_grid_grid_columns_get(Eo *obj, void *_pd EINA_UNUSED)
+_efl_canvas_layout_part_table_efl_pack_table_table_columns_get(Eo *obj, void *_pd EINA_UNUSED)
{
PROXY_DATA_GET(obj, pd);
int cols = 0, rows = 0;
@@ -135,7 +135,7 @@ _efl_canvas_layout_part_table_efl_pack_grid_grid_columns_get(Eo *obj, void *_pd
}
EOLIAN static int
-_efl_canvas_layout_part_table_efl_pack_grid_grid_rows_get(Eo *obj, void *_pd EINA_UNUSED)
+_efl_canvas_layout_part_table_efl_pack_table_table_rows_get(Eo *obj, void *_pd EINA_UNUSED)
{
PROXY_DATA_GET(obj, pd);
int cols = 0, rows = 0;
@@ -174,7 +174,7 @@ _table_item_iterator_free(Part_Item_Iterator *it)
}
EOLIAN static Eina_Iterator *
-_efl_canvas_layout_part_table_efl_pack_grid_grid_contents_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row, Eina_Bool below)
+_efl_canvas_layout_part_table_efl_pack_table_table_contents_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row, Eina_Bool below)
{
Evas_Object *sobj;
Eina_Iterator *it;
@@ -217,7 +217,7 @@ _efl_canvas_layout_part_table_efl_pack_grid_grid_contents_get(Eo *obj, void *_pd
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_part_table_efl_pack_grid_grid_position_get(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
+_efl_canvas_layout_part_table_efl_pack_table_table_position_get(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
{
unsigned short c, r, cs, rs;
Eina_Bool ret;
@@ -315,14 +315,14 @@ EAPI Eina_Bool
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)
{
Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE);
- return efl_pack_grid(table, child_obj, col, row, colspan, rowspan);
+ return efl_pack_table(table, child_obj, col, row, colspan, rowspan);
}
EAPI Eina_Bool
edje_object_part_table_col_row_size_get(const Edje_Object *obj, const char *part, int *cols, int *rows)
{
Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE);
- efl_pack_grid_size_get(table, cols, rows);
+ efl_pack_table_size_get(table, cols, rows);
return EINA_TRUE;
}
@@ -330,7 +330,7 @@ EAPI Evas_Object *
edje_object_part_table_child_get(const Edje_Object *obj, const char *part, unsigned int col, unsigned int row)
{
Eo *table = PART_TABLE_GET(obj, part, NULL);
- return efl_pack_grid_content_get(table, col, row);
+ return efl_pack_table_content_get(table, col, row);
}
EAPI Eina_Bool
diff --git a/src/lib/edje/efl_canvas_layout_part_table.eo b/src/lib/edje/efl_canvas_layout_part_table.eo
index 17979895ea..67fd559938 100644
--- a/src/lib/edje/efl_canvas_layout_part_table.eo
+++ b/src/lib/edje/efl_canvas_layout_part_table.eo
@@ -1,4 +1,4 @@
-class Efl.Canvas.Layout.Part_Table (Efl.Canvas.Layout.Part, Efl.Pack.Grid)
+class Efl.Canvas.Layout.Part_Table (Efl.Canvas.Layout.Part, Efl.Pack.Table)
{
[[Represents a Table created as part of a layout.
@@ -13,12 +13,12 @@ class Efl.Canvas.Layout.Part_Table (Efl.Canvas.Layout.Part, Efl.Pack.Grid)
Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
- Efl.Pack.Grid.pack_grid;
- Efl.Pack.Grid.grid_content_get;
- Efl.Pack.Grid.grid_contents_get;
- Efl.Pack.Grid.grid_position { get; }
- Efl.Pack.Grid.grid_size { get; }
- Efl.Pack.Grid.grid_columns { get; }
- Efl.Pack.Grid.grid_rows { get; }
+ Efl.Pack.Table.pack_table;
+ Efl.Pack.Table.table_content_get;
+ Efl.Pack.Table.table_contents_get;
+ Efl.Pack.Table.table_position { get; }
+ Efl.Pack.Table.table_size { get; }
+ Efl.Pack.Table.table_columns { get; }
+ Efl.Pack.Table.table_rows { get; }
}
}
diff --git a/src/lib/efl/CMakeLists.txt b/src/lib/efl/CMakeLists.txt
index e6efc3b680..6ed0752ebd 100644
--- a/src/lib/efl/CMakeLists.txt
+++ b/src/lib/efl/CMakeLists.txt
@@ -42,7 +42,7 @@ set(PUBLIC_EO_FILES
interfaces/efl_observer.eo
interfaces/efl_orientation.eo
interfaces/efl_pack.eo
- interfaces/efl_pack_grid.eo
+ interfaces/efl_pack_table.eo
interfaces/efl_pack_layout.eo
interfaces/efl_pack_linear.eo
interfaces/efl_part.eo
diff --git a/src/lib/efl/Efl.h b/src/lib/efl/Efl.h
index 263e991bef..bb22f9716c 100644
--- a/src/lib/efl/Efl.h
+++ b/src/lib/efl/Efl.h
@@ -154,7 +154,7 @@ typedef Efl_Gfx_Path_Command_Type Efl_Gfx_Path_Command;
#include "interfaces/efl_pack.eo.h"
#include "interfaces/efl_pack_layout.eo.h"
#include "interfaces/efl_pack_linear.eo.h"
-#include "interfaces/efl_pack_grid.eo.h"
+#include "interfaces/efl_pack_table.eo.h"
/* Input and Output */
#include "interfaces/efl_io_closer.eo.h"
diff --git a/src/lib/efl/interfaces/efl_interfaces_main.c b/src/lib/efl/interfaces/efl_interfaces_main.c
index ec7366c1ee..af61237416 100644
--- a/src/lib/efl/interfaces/efl_interfaces_main.c
+++ b/src/lib/efl/interfaces/efl_interfaces_main.c
@@ -56,7 +56,7 @@
#include "interfaces/efl_pack.eo.c"
#include "interfaces/efl_pack_layout.eo.c"
#include "interfaces/efl_pack_linear.eo.c"
-#include "interfaces/efl_pack_grid.eo.c"
+#include "interfaces/efl_pack_table.eo.c"
#include "interfaces/efl_model.eo.c"
#include "interfaces/efl_animator.eo.c"
diff --git a/src/lib/efl/interfaces/efl_pack_grid.eo b/src/lib/efl/interfaces/efl_pack_table.eo
index 3cd9cb27e8..4159fad19c 100644
--- a/src/lib/efl/interfaces/efl_pack_grid.eo
+++ b/src/lib/efl/interfaces/efl_pack_table.eo
@@ -1,44 +1,44 @@
import efl_gfx_types;
-interface Efl.Pack.Grid (Efl.Pack.Linear)
+interface Efl.Pack.Table (Efl.Pack.Linear)
{
- [[2D containers aligned on a grid with rows and columns]]
+ [[2D containers aligned on a table with rows and columns]]
eo_prefix: efl_pack;
methods {
- pack_grid {
- [[Pack object at a given location in the grid.
+ pack_table {
+ [[Pack object at a given location in the table.
When this container is deleted, it will request deletion on the
given $subobj. Use @Efl.Pack.unpack to remove $subobj from this
container without deleting it.
]]
params {
- subobj: Efl.Gfx; [[A child object to pack in this grid.]]
+ subobj: Efl.Gfx; [[A child object to pack in this table.]]
col: int; [[Column number]]
row: int; [[Row number]]
- colspan: int @optional; [[0 means 1, -1 means @.grid_columns]]
- rowspan: int @optional; [[0 means 1, -1 means @.grid_rows]]
+ colspan: int @optional; [[0 means 1, -1 means @.table_columns]]
+ rowspan: int @optional; [[0 means 1, -1 means @.table_rows]]
}
return: bool; [[$true on success, $false otherwise]]
}
- grid_contents_get {
- [[Returns all objects at a given position in this grid.]]
- return: iterator<Efl.Gfx> @owned; [[Iterator to grid contents]]
+ table_contents_get {
+ [[Returns all objects at a given position in this table.]]
+ return: iterator<Efl.Gfx> @owned; [[Iterator to table contents]]
params {
@in col: int; [[Column number]]
@in row: int; [[Row number]]
@in below: bool @optional; [[If $true get objects spanning over this cell.]]
}
}
- grid_content_get {
- [[Returns a child at a given position, see @.grid_contents_get.]]
+ table_content_get {
+ [[Returns a child at a given position, see @.table_contents_get.]]
return: Efl.Gfx; [[Child object]]
params {
@in col: int; [[Column number]]
@in row: int; [[Row number]]
}
}
- @property grid_position {
+ @property table_position {
[[Position and span of the $subobj in this container, may be modified to move the $subobj]]
get { return: bool; [[Returns false if item is not a child]] }
keys {
@@ -51,8 +51,8 @@ interface Efl.Pack.Grid (Efl.Pack.Linear)
rowspan: int; [[Row span]]
}
}
- @property grid_size {
- [[Combines @.grid_columns and @.grid_rows]]
+ @property table_size {
+ [[Combines @.table_columns and @.table_rows]]
set {}
get {}
values {
@@ -60,7 +60,7 @@ interface Efl.Pack.Grid (Efl.Pack.Linear)
rows: int; [[Number of rows]]
}
}
- @property grid_columns {
+ @property table_columns {
[[Gird columns property]]
set { [[Specifies limit for linear adds - if direction is horizontal]] }
get {}
@@ -68,15 +68,15 @@ interface Efl.Pack.Grid (Efl.Pack.Linear)
cols: int; [[Number of columns]]
}
}
- @property grid_rows {
- [[Grid rows property]]
+ @property table_rows {
+ [[Table rows property]]
set { [[Specifies limit for linear adds - if direction is vertical]] }
get {}
values {
rows: int; [[Number of rows]]
}
}
- @property grid_direction {
+ @property table_direction {
[[Primary and secondary up/left/right/down directions for linear apis.
Default is horizontal and vertical.
diff --git a/src/lib/elementary/Efl_Ui.h b/src/lib/elementary/Efl_Ui.h
index e575d9195f..927b782895 100644
--- a/src/lib/elementary/Efl_Ui.h
+++ b/src/lib/elementary/Efl_Ui.h
@@ -165,8 +165,8 @@ extern EAPI double _efl_startup_time;
# include <efl_ui_box.eo.h>
# include <efl_ui_box_flow.eo.h>
# include <efl_ui_box_stack.eo.h>
-# include <efl_ui_grid.eo.h>
-# include <efl_ui_grid_static.eo.h>
+# include <efl_ui_table.eo.h>
+# include <efl_ui_table_static.eo.h>
# include <efl_ui_image.eo.h>
# include <efl_ui_win.eo.h>
# include <efl_ui_win_inlined.eo.h>
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 3ff72cbbee..e9a30fd3c4 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -298,8 +298,8 @@ EAPI extern Elm_Version *elm_version;
# include <efl_ui_box.eo.h>
# include <efl_ui_box_flow.eo.h>
# include <efl_ui_box_stack.eo.h>
-# include <efl_ui_grid.eo.h>
-# include <efl_ui_grid_static.eo.h>
+# include <efl_ui_table.eo.h>
+# include <efl_ui_table_static.eo.h>
# include <efl_ui_image.eo.h>
# include <efl_ui_win.eo.h>
# include <efl_ui_win_inlined.eo.h>
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 0eda685bad..4c7d86e9cd 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2197,7 +2197,7 @@ elm_layout_box_remove_all(Eo *obj, const char *part, Eina_Bool clear)
EAPI Eina_Bool
elm_layout_table_pack(Eo *obj, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
{
- return efl_pack_grid(efl_part(obj, part), child, col, row, colspan, rowspan);
+ return efl_pack_table(efl_part(obj, part), child, col, row, colspan, rowspan);
}
EAPI Evas_Object *
diff --git a/src/lib/elementary/efl_ui_layout_pack.c b/src/lib/elementary/efl_ui_layout_pack.c
index 9cbf0a9b68..c45a13ed38 100644
--- a/src/lib/elementary/efl_ui_layout_pack.c
+++ b/src/lib/elementary/efl_ui_layout_pack.c
@@ -326,22 +326,22 @@ _efl_ui_layout_part_table_efl_container_content_remove(Eo *obj, Efl_Ui_Layout_Ta
}
EOLIAN static Eina_Bool
-_efl_ui_layout_part_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
+_efl_ui_layout_part_table_efl_pack_table_pack_table(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
{
return _efl_ui_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan);
}
EOLIAN static Efl_Gfx *
-_efl_ui_layout_part_table_efl_pack_grid_grid_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row)
+_efl_ui_layout_part_table_efl_pack_table_table_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row)
{
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
return evas_object_table_child_get(pack, col, row);
}
EOLIAN static Eina_Iterator *
-_efl_ui_layout_part_table_efl_pack_grid_grid_contents_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row, Eina_Bool below)
+_efl_ui_layout_part_table_efl_pack_table_table_contents_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row, Eina_Bool below)
{
- // contents at col,row - see also Efl.Ui.Grid or edje_containers.c
+ // contents at col,row - see also Efl.Ui.Table or edje_containers.c
// not reusing edje's iterator because the container would be wrong
Eina_List *list, *l = NULL;
@@ -368,7 +368,7 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_contents_get(Eo *obj EINA_UNUSED, E
}
EOLIAN static Eina_Bool
-_efl_ui_layout_part_table_efl_pack_grid_grid_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
+_efl_ui_layout_part_table_efl_pack_table_table_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
{
unsigned short c, r, cs, rs;
Eina_Bool ret;
@@ -384,14 +384,14 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_position_get(Eo *obj EINA_UNUSED, E
}
EOLIAN static void
-_efl_ui_layout_part_table_efl_pack_grid_grid_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int *cols, int *rows)
+_efl_ui_layout_part_table_efl_pack_table_table_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int *cols, int *rows)
{
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
evas_object_table_col_row_size_get(pack, cols, rows);
}
EOLIAN static int
-_efl_ui_layout_part_table_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
+_efl_ui_layout_part_table_efl_pack_table_table_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
{
int cols, rows;
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
@@ -400,7 +400,7 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Ef
}
EOLIAN static int
-_efl_ui_layout_part_table_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
+_efl_ui_layout_part_table_efl_pack_table_table_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
{
int cols, rows;
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
diff --git a/src/lib/elementary/efl_ui_layout_part_table.eo b/src/lib/elementary/efl_ui_layout_part_table.eo
index e5d5caf2eb..41097b6396 100644
--- a/src/lib/elementary/efl_ui_layout_part_table.eo
+++ b/src/lib/elementary/efl_ui_layout_part_table.eo
@@ -1,4 +1,4 @@
-class Efl.Ui.Layout.Part.Table (Efl.Object, Efl.Pack.Grid)
+class Efl.Ui.Layout.Part.Table (Efl.Object, Efl.Pack.Table)
{
[[Represents a Table created as part of a layout.
@@ -25,12 +25,12 @@ class Efl.Ui.Layout.Part.Table (Efl.Object, Efl.Pack.Grid)
Efl.Pack.pack_clear;
Efl.Pack.unpack_all;
Efl.Pack.unpack;
- Efl.Pack.Grid.pack_grid;
- Efl.Pack.Grid.grid_content_get;
- Efl.Pack.Grid.grid_contents_get;
- Efl.Pack.Grid.grid_position { get; }
- Efl.Pack.Grid.grid_size { get; }
- Efl.Pack.Grid.grid_columns { get; }
- Efl.Pack.Grid.grid_rows { get; }
+ Efl.Pack.Table.pack_table;
+ Efl.Pack.Table.table_content_get;
+ Efl.Pack.Table.table_contents_get;
+ Efl.Pack.Table.table_position { get; }
+ Efl.Pack.Table.table_size { get; }
+ Efl.Pack.Table.table_columns { get; }
+ Efl.Pack.Table.table_rows { get; }
}
}
diff --git a/src/lib/elementary/efl_ui_grid.c b/src/lib/elementary/efl_ui_table.c
index cec98482c0..39aa7b87f5 100644
--- a/src/lib/elementary/efl_ui_grid.c
+++ b/src/lib/elementary/efl_ui_table.c
@@ -1,20 +1,20 @@
-#include "efl_ui_grid_private.h"
+#include "efl_ui_table_private.h"
#include "../evas/canvas/evas_table.eo.h"
-#define MY_CLASS EFL_UI_GRID_CLASS
-#define MY_CLASS_NAME "Efl.Ui.Grid"
+#define MY_CLASS EFL_UI_TABLE_CLASS
+#define MY_CLASS_NAME "Efl.Ui.Table"
#define MY_CLASS_NAME_LEGACY "elm_grid"
typedef struct _Custom_Table_Data Custom_Table_Data;
static void _subobj_del_cb(void *data, const Efl_Event *event);
-static void _item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj);
+static void _item_remove(Efl_Ui_Table *obj, Efl_Ui_Table_Data *pd, Efl_Gfx *subobj);
struct _Custom_Table_Data
{
- Efl_Ui_Grid *parent;
- Efl_Ui_Grid_Data *gd;
+ Efl_Ui_Table *parent;
+ Efl_Ui_Table_Data *gd;
};
EFL_CALLBACKS_ARRAY_DEFINE(subobj_callbacks,
@@ -29,7 +29,7 @@ _mirrored_set(Evas_Object *obj, Eina_Bool rtl)
}
EOLIAN static Efl_Ui_Theme_Apply
-_efl_ui_grid_elm_widget_theme_apply(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_elm_widget_theme_apply(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
Efl_Ui_Theme_Apply int_ret = EFL_UI_THEME_APPLY_FAILED;
int_ret = efl_ui_widget_theme_apply(efl_super(obj, MY_CLASS));
@@ -41,13 +41,13 @@ _efl_ui_grid_elm_widget_theme_apply(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
}
static void
-_layout_updated_emit(Efl_Ui_Grid *obj)
+_layout_updated_emit(Efl_Ui_Table *obj)
{
efl_event_callback_legacy_call(obj, EFL_PACK_EVENT_LAYOUT_UPDATED, NULL);
}
static void
-_sizing_eval(Evas_Object *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_sizing_eval(Evas_Object *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
Evas_Coord minw = 0, minh = 0, maxw = -1, maxh = -1;
Evas_Coord w, h;
@@ -71,7 +71,7 @@ _table_size_hints_changed(void *data, Evas *e EINA_UNUSED,
Evas_Object *table EINA_UNUSED,
void *event_info EINA_UNUSED)
{
- Efl_Ui_Grid_Data *pd = efl_data_scope_get(data, MY_CLASS);
+ Efl_Ui_Table_Data *pd = efl_data_scope_get(data, MY_CLASS);
_sizing_eval(data, pd);
}
@@ -90,14 +90,14 @@ _custom_table_initializer(Efl_Class *klass)
};
static const Efl_Class_Description custom_table_class_desc = {
- EO_VERSION, "Efl.Ui.Grid.Internal", EFL_CLASS_TYPE_REGULAR,
+ EO_VERSION, "Efl.Ui.Table.Internal", EFL_CLASS_TYPE_REGULAR,
sizeof(Custom_Table_Data), _custom_table_initializer, NULL, NULL
};
-EFL_DEFINE_CLASS(_efl_ui_grid_custom_table_class_get, &custom_table_class_desc,
+EFL_DEFINE_CLASS(_efl_ui_table_custom_table_class_get, &custom_table_class_desc,
EVAS_TABLE_CLASS, NULL)
-#define CUSTOM_TABLE_CLASS _efl_ui_grid_custom_table_class_get()
+#define CUSTOM_TABLE_CLASS _efl_ui_table_custom_table_class_get()
static void
_custom_table_calc(Eo *obj, Custom_Table_Data *pd)
@@ -113,7 +113,7 @@ _custom_table_calc(Eo *obj, Custom_Table_Data *pd)
/* End of custom table class */
EOLIAN static void
-_efl_ui_grid_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Table_Data *pd)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -122,7 +122,7 @@ _efl_ui_grid_efl_pack_layout_layout_update(Eo *obj, Efl_Ui_Grid_Data *pd)
}
EOLIAN void
-_efl_ui_grid_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -130,7 +130,7 @@ _efl_ui_grid_efl_canvas_group_group_calculate(Eo *obj, Efl_Ui_Grid_Data *pd EINA
}
EOLIAN static void
-_efl_ui_grid_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Table_Data *pd)
{
Custom_Table_Data *custom;
Evas_Object *table;
@@ -157,7 +157,7 @@ _efl_ui_grid_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Grid_Data *pd)
}
EOLIAN static void
-_efl_ui_grid_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
Eina_List *l;
Evas_Object *child;
@@ -184,7 +184,7 @@ _efl_ui_grid_efl_canvas_group_group_del(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSE
}
EOLIAN static Eo *
-_efl_ui_grid_efl_object_constructor(Eo *obj, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_object_constructor(Eo *obj, Efl_Ui_Table_Data *pd)
{
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME);
@@ -203,7 +203,7 @@ _efl_ui_grid_efl_object_constructor(Eo *obj, Efl_Ui_Grid_Data *pd)
EOLIAN static void
-_efl_ui_grid_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, double h, double v, Eina_Bool scalable)
+_efl_ui_table_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, double h, double v, Eina_Bool scalable)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -222,7 +222,7 @@ _efl_ui_grid_efl_pack_pack_padding_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED
}
EOLIAN static void
-_efl_ui_grid_efl_pack_pack_padding_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, double *h, double *v, Eina_Bool *scalable)
+_efl_ui_table_efl_pack_pack_padding_get(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, double *h, double *v, Eina_Bool *scalable)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
@@ -234,8 +234,8 @@ _efl_ui_grid_efl_pack_pack_padding_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED
static void
_subobj_del_cb(void *data, const Efl_Event *event)
{
- Efl_Ui_Grid *obj = data;
- Efl_Ui_Grid_Data *pd = efl_data_scope_get(obj, EFL_UI_GRID_CLASS);
+ Efl_Ui_Table *obj = data;
+ Efl_Ui_Table_Data *pd = efl_data_scope_get(obj, EFL_UI_TABLE_CLASS);
efl_event_callback_array_del(event->object, subobj_callbacks(), data);
_item_remove(obj, pd, event->object);
@@ -245,10 +245,10 @@ _subobj_del_cb(void *data, const Efl_Event *event)
}
static Eina_Bool
-_pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj,
+_pack_at(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx *subobj,
int col, int row, int colspan, int rowspan, Eina_Bool linear)
{
- Grid_Item *gi = NULL;
+ Table_Item *gi = NULL;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -268,14 +268,14 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj,
if ((pd->req_cols && ((col + colspan) > pd->req_cols)) ||
(pd->req_rows && ((row + rowspan) > pd->req_rows)))
{
- ERR("grid requested size exceeded! packing in extra cell at "
- "%d,%d %dx%d (grid: %dx%d)",
+ ERR("table requested size exceeded! packing in extra cell at "
+ "%d,%d %dx%d (table: %dx%d)",
col, row, colspan, rowspan, pd->req_cols, pd->req_rows);
}
if (obj == elm_widget_parent_widget_get(subobj))
{
- gi = efl_key_data_get(subobj, GRID_ITEM_KEY);
+ gi = efl_key_data_get(subobj, TABLE_ITEM_KEY);
if (gi)
{
gi->col = col;
@@ -297,10 +297,10 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj,
gi->linear = !!linear;
gi->object = subobj; // xref(, obj);
pd->count++;
- pd->items = (Grid_Item *)
+ pd->items = (Table_Item *)
eina_inlist_append(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi));
- efl_key_data_set(subobj, GRID_ITEM_KEY, gi);
+ efl_key_data_set(subobj, TABLE_ITEM_KEY, gi);
elm_widget_sub_object_add(obj, subobj);
efl_event_callback_legacy_call(obj, EFL_CONTAINER_EVENT_CONTENT_ADDED, subobj);
efl_event_callback_array_add(subobj, subobj_callbacks(), obj);
@@ -310,7 +310,7 @@ _pack_at(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj,
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_grid_pack_grid(Eo *obj, Efl_Ui_Grid_Data *pd,
+_efl_ui_table_efl_pack_table_pack_table(Eo *obj, Efl_Ui_Table_Data *pd,
Efl_Gfx *subobj,
int col, int row, int colspan, int rowspan)
{
@@ -320,10 +320,10 @@ _efl_ui_grid_efl_pack_grid_pack_grid(Eo *obj, Efl_Ui_Grid_Data *pd,
}
EOLIAN static Eina_Bool
-_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)
+_efl_ui_table_efl_pack_table_table_position_get(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, Evas_Object *subobj, int *col, int *row, int *colspan, int *rowspan)
{
int c = -1, r = -1, cs = 0, rs = 0;
- Grid_Item *gi;
+ Table_Item *gi;
Eina_Bool ret = EINA_FALSE;
if (obj != elm_widget_parent_widget_get(subobj))
@@ -332,7 +332,7 @@ _efl_ui_grid_efl_pack_grid_grid_position_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_
goto end;
}
- gi = efl_key_data_get(subobj, GRID_ITEM_KEY);
+ gi = efl_key_data_get(subobj, TABLE_ITEM_KEY);
if (gi)
{
c = gi->col;
@@ -352,7 +352,7 @@ end:
}
EOLIAN static Efl_Gfx *
-_efl_ui_grid_efl_pack_grid_grid_content_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int col, int row)
+_efl_ui_table_efl_pack_table_table_content_get(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, int col, int row)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
@@ -360,20 +360,20 @@ _efl_ui_grid_efl_pack_grid_grid_content_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_U
}
static void
-_item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj)
+_item_remove(Efl_Ui_Table *obj, Efl_Ui_Table_Data *pd, Efl_Gfx *subobj)
{
- Grid_Item *gi = efl_key_data_get(subobj, GRID_ITEM_KEY);
- Grid_Item *gi2, *last = NULL;
+ Table_Item *gi = efl_key_data_get(subobj, TABLE_ITEM_KEY);
+ Table_Item *gi2, *last = NULL;
if (!gi)
{
- WRN("item %p has no grid internal data", subobj);
+ WRN("item %p has no table internal data", subobj);
EINA_INLIST_FOREACH(EINA_INLIST_GET(pd->items), gi)
if (gi->object == subobj)
break;
if (!gi)
{
- ERR("item %p was not found in this grid", subobj);
+ ERR("item %p was not found in this table", subobj);
return;
}
}
@@ -409,15 +409,15 @@ _item_remove(Efl_Ui_Grid *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj)
end:
efl_event_callback_legacy_call(obj, EFL_CONTAINER_EVENT_CONTENT_REMOVED, subobj);
- pd->items = (Grid_Item *)
+ pd->items = (Table_Item *)
eina_inlist_remove(EINA_INLIST_GET(pd->items), EINA_INLIST_GET(gi));
pd->count--;
- efl_key_data_set(subobj, GRID_ITEM_KEY, NULL);
+ efl_key_data_set(subobj, TABLE_ITEM_KEY, NULL);
free(gi);
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj)
+_efl_ui_table_efl_pack_unpack(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx *subobj)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -433,7 +433,7 @@ _efl_ui_grid_efl_pack_unpack(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj)
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_pack_clear(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_efl_pack_pack_clear(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -442,7 +442,7 @@ _efl_ui_grid_efl_pack_pack_clear(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_unpack_all(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_efl_pack_unpack_all(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
@@ -451,13 +451,13 @@ _efl_ui_grid_efl_pack_unpack_all(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
}
EOLIAN static void
-_efl_ui_grid_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_efl_pack_layout_layout_request(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
evas_object_smart_need_recalculate_set(obj, EINA_TRUE);
}
static Eina_Bool
-_grid_item_iterator_next(Grid_Item_Iterator *it, void **data)
+_table_item_iterator_next(Table_Item_Iterator *it, void **data)
{
Efl_Gfx *sub;
@@ -469,13 +469,13 @@ _grid_item_iterator_next(Grid_Item_Iterator *it, void **data)
}
static Eo *
-_grid_item_iterator_get_container(Grid_Item_Iterator *it)
+_table_item_iterator_get_container(Table_Item_Iterator *it)
{
return it->object;
}
static void
-_grid_item_iterator_free(Grid_Item_Iterator *it)
+_table_item_iterator_free(Table_Item_Iterator *it)
{
eina_iterator_free(it->real_iterator);
eina_list_free(it->list);
@@ -483,9 +483,9 @@ _grid_item_iterator_free(Grid_Item_Iterator *it)
}
static inline Eina_Iterator *
-_grid_item_iterator_create(Eo *obj, Eina_List *list)
+_table_item_iterator_create(Eo *obj, Eina_List *list)
{
- Grid_Item_Iterator *it;
+ Table_Item_Iterator *it;
if (!list) return NULL;
it = calloc(1, sizeof(*it));
@@ -496,33 +496,33 @@ _grid_item_iterator_create(Eo *obj, Eina_List *list)
it->list = list;
it->real_iterator = eina_list_iterator_new(it->list);
it->iterator.version = EINA_ITERATOR_VERSION;
- it->iterator.next = FUNC_ITERATOR_NEXT(_grid_item_iterator_next);
- it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_grid_item_iterator_get_container);
- it->iterator.free = FUNC_ITERATOR_FREE(_grid_item_iterator_free);
+ it->iterator.next = FUNC_ITERATOR_NEXT(_table_item_iterator_next);
+ it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_table_item_iterator_get_container);
+ it->iterator.free = FUNC_ITERATOR_FREE(_table_item_iterator_free);
it->object = obj;
return &it->iterator;
}
EOLIAN static Eina_Iterator *
-_efl_ui_grid_efl_container_content_iterate(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED)
+_efl_ui_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED)
{
Eina_List *list;
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
list = evas_object_table_children_get(wd->resize_obj);
- return _grid_item_iterator_create(obj, list);
+ return _table_item_iterator_create(obj, list);
}
EOLIAN static int
-_efl_ui_grid_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd)
{
return pd->count;
}
EOLIAN static Eina_Iterator *
-_efl_ui_grid_efl_pack_grid_grid_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED,
+_efl_ui_table_efl_pack_table_table_contents_get(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED,
int col, int row, Eina_Bool below)
{
Eina_List *list, *atlist = NULL;
@@ -533,7 +533,7 @@ _efl_ui_grid_efl_pack_grid_grid_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_
list = evas_object_table_children_get(wd->resize_obj);
EINA_LIST_FREE(list, sobj)
{
- Grid_Item *gi = efl_key_data_get(sobj, GRID_ITEM_KEY);
+ Table_Item *gi = efl_key_data_get(sobj, TABLE_ITEM_KEY);
if (!gi) continue;
if ((gi->col == col) && (gi->row == row))
@@ -546,11 +546,11 @@ _efl_ui_grid_efl_pack_grid_grid_contents_get(Eo *obj, Efl_Ui_Grid_Data *pd EINA_
}
}
- return _grid_item_iterator_create(obj, atlist);
+ return _table_item_iterator_create(obj, atlist);
}
EOLIAN static void
-_efl_ui_grid_efl_ui_direction_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ui_Dir dir)
+_efl_ui_table_efl_ui_direction_direction_set(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Ui_Dir dir)
{
pd->dir1 = dir;
@@ -569,13 +569,13 @@ _efl_ui_grid_efl_ui_direction_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_U
}
EOLIAN static Efl_Ui_Dir
-_efl_ui_grid_efl_ui_direction_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_ui_direction_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd)
{
return pd->dir1;
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_grid_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Ui_Dir primary, Efl_Ui_Dir secondary)
+_efl_ui_table_efl_pack_table_table_direction_set(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Ui_Dir primary, Efl_Ui_Dir secondary)
{
pd->dir1 = primary;
pd->dir2 = secondary;
@@ -595,14 +595,14 @@ _efl_ui_grid_efl_pack_grid_grid_direction_set(Eo *obj, Efl_Ui_Grid_Data *pd, Efl
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_grid_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd, Efl_Ui_Dir *primary, Efl_Ui_Dir *secondary)
+_efl_ui_table_efl_pack_table_table_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd, Efl_Ui_Dir *primary, Efl_Ui_Dir *secondary)
{
if (primary) *primary = pd->dir1;
if (secondary) *secondary = pd->dir2;
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_grid_size_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, int cols, int rows)
+_efl_ui_table_efl_pack_table_table_size_set(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, int cols, int rows)
{
if (cols < 0) cols = 0;
if (rows < 0) rows = 0;
@@ -614,14 +614,14 @@ _efl_ui_grid_efl_pack_grid_grid_size_set(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUS
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_grid_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd EINA_UNUSED, int *cols, int *rows)
+_efl_ui_table_efl_pack_table_table_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd EINA_UNUSED, int *cols, int *rows)
{
- if (cols) *cols = efl_pack_grid_columns_get(obj);
- if (rows) *rows = efl_pack_grid_rows_get(obj);
+ if (cols) *cols = efl_pack_table_columns_get(obj);
+ if (rows) *rows = efl_pack_table_rows_get(obj);
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_grid_columns_set(Eo *obj, Efl_Ui_Grid_Data *pd, int columns)
+_efl_ui_table_efl_pack_table_table_columns_set(Eo *obj, Efl_Ui_Table_Data *pd, int columns)
{
pd->req_cols = columns;
@@ -629,7 +629,7 @@ _efl_ui_grid_efl_pack_grid_grid_columns_set(Eo *obj, Efl_Ui_Grid_Data *pd, int c
}
EOLIAN static int
-_efl_ui_grid_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_pack_table_table_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd)
{
if (!pd->req_cols)
{
@@ -642,7 +642,7 @@ _efl_ui_grid_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Dat
}
EOLIAN static void
-_efl_ui_grid_efl_pack_grid_grid_rows_set(Eo *obj, Efl_Ui_Grid_Data *pd, int rows)
+_efl_ui_table_efl_pack_table_table_rows_set(Eo *obj, Efl_Ui_Table_Data *pd, int rows)
{
pd->req_rows = rows;
@@ -650,7 +650,7 @@ _efl_ui_grid_efl_pack_grid_grid_rows_set(Eo *obj, Efl_Ui_Grid_Data *pd, int rows
}
EOLIAN static int
-_efl_ui_grid_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *pd)
+_efl_ui_table_efl_pack_table_table_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Table_Data *pd)
{
if (!pd->req_rows)
{
@@ -663,14 +663,14 @@ _efl_ui_grid_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Grid_Data *
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_pack(Eo *obj, Efl_Ui_Grid_Data *pd EINA_UNUSED, Efl_Gfx *subobj)
+_efl_ui_table_efl_pack_pack(Eo *obj, Efl_Ui_Table_Data *pd EINA_UNUSED, Efl_Gfx *subobj)
{
/* this is just an alias */
return efl_pack_end(obj, subobj);
}
EOLIAN static Eina_Bool
-_efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *subobj)
+_efl_ui_table_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Table_Data *pd, Efl_Gfx *subobj)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(subobj, EINA_FALSE);
@@ -707,7 +707,7 @@ _efl_ui_grid_efl_pack_linear_pack_end(Eo *obj, Efl_Ui_Grid_Data *pd, Efl_Gfx *su
/* Internal EO APIs and hidden overrides */
-#define EFL_UI_GRID_EXTRA_OPS \
- EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_grid)
+#define EFL_UI_TABLE_EXTRA_OPS \
+ EFL_CANVAS_GROUP_ADD_DEL_OPS(efl_ui_table)
-#include "efl_ui_grid.eo.c"
+#include "efl_ui_table.eo.c"
diff --git a/src/lib/elementary/efl_ui_grid.eo b/src/lib/elementary/efl_ui_table.eo
index e8515a5174..77086e726e 100644
--- a/src/lib/elementary/efl_ui_grid.eo
+++ b/src/lib/elementary/efl_ui_table.eo
@@ -1,7 +1,7 @@
-class Efl.Ui.Grid (Elm.Widget, Efl.Pack.Grid, Efl.Pack.Layout,
+class Efl.Ui.Table (Elm.Widget, Efl.Pack.Table, Efl.Pack.Layout,
Efl.Ui.Direction)
{
- [[Efl UI grid class]]
+ [[Efl UI table class]]
implements {
Efl.Object.constructor;
Efl.Canvas.Group.group_calculate;
@@ -15,14 +15,14 @@ class Efl.Ui.Grid (Elm.Widget, Efl.Pack.Grid, Efl.Pack.Layout,
Efl.Pack.unpack;
Efl.Pack.pack;
Efl.Pack.pack_padding { get; set; }
- Efl.Pack.Grid.pack_grid;
- Efl.Pack.Grid.grid_content_get;
- Efl.Pack.Grid.grid_contents_get;
- Efl.Pack.Grid.grid_position { get; }
- Efl.Pack.Grid.grid_size { get; set; }
- Efl.Pack.Grid.grid_columns { get; set; }
- Efl.Pack.Grid.grid_rows { get; set; }
- Efl.Pack.Grid.grid_direction { get; set; }
+ Efl.Pack.Table.pack_table;
+ Efl.Pack.Table.table_content_get;
+ Efl.Pack.Table.table_contents_get;
+ Efl.Pack.Table.table_position { get; }
+ Efl.Pack.Table.table_size { get; set; }
+ Efl.Pack.Table.table_columns { get; set; }
+ Efl.Pack.Table.table_rows { get; set; }
+ Efl.Pack.Table.table_direction { get; set; }
Efl.Pack.Linear.pack_end;
Efl.Pack.Layout.layout_update;
Efl.Pack.Layout.layout_request;
diff --git a/src/lib/elementary/efl_ui_grid_private.h b/src/lib/elementary/efl_ui_table_private.h
index e362bfa607..aec2e2d680 100644
--- a/src/lib/elementary/efl_ui_grid_private.h
+++ b/src/lib/elementary/efl_ui_table_private.h
@@ -1,5 +1,5 @@
-#ifndef EFL_UI_GRID_PRIVATE_H
-#define EFL_UI_GRID_PRIVATE_H
+#ifndef EFL_UI_TABLE_PRIVATE_H
+#define EFL_UI_TABLE_PRIVATE_H
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
@@ -10,13 +10,13 @@
#include <Elementary.h>
#include "elm_priv.h"
-typedef struct _Efl_Ui_Grid_Data Efl_Ui_Grid_Data;
-typedef struct _Grid_Item_Iterator Grid_Item_Iterator;
-typedef struct _Grid_Item Grid_Item;
+typedef struct _Efl_Ui_Table_Data Efl_Ui_Table_Data;
+typedef struct _Table_Item_Iterator Table_Item_Iterator;
+typedef struct _Table_Item Table_Item;
-#define GRID_ITEM_KEY "__grid_item"
+#define TABLE_ITEM_KEY "__table_item"
-struct _Grid_Item
+struct _Table_Item
{
EINA_INLIST;
@@ -27,9 +27,9 @@ struct _Grid_Item
Eina_Bool linear : 1;
};
-struct _Efl_Ui_Grid_Data
+struct _Efl_Ui_Table_Data
{
- Grid_Item *items;
+ Table_Item *items;
int count;
int req_cols, req_rows; // requested - 0 means infinite
@@ -42,12 +42,12 @@ struct _Efl_Ui_Grid_Data
Eina_Bool linear_recalc : 1;
};
-struct _Grid_Item_Iterator
+struct _Table_Item_Iterator
{
Eina_Iterator iterator;
Eina_Iterator *real_iterator;
Eina_List *list;
- Efl_Ui_Grid *object;
+ Efl_Ui_Table *object;
};
#endif
diff --git a/src/lib/elementary/efl_ui_grid_static.c b/src/lib/elementary/efl_ui_table_static.c
index 9e1567f467..4febcbeee5 100644
--- a/src/lib/elementary/efl_ui_grid_static.c
+++ b/src/lib/elementary/efl_ui_table_static.c
@@ -1,19 +1,19 @@
-#include "efl_ui_grid_private.h"
+#include "efl_ui_table_private.h"
-#define MY_CLASS EFL_UI_GRID_STATIC_CLASS
-#define MY_CLASS_NAME "Efl.Ui.Grid_Static"
+#define MY_CLASS EFL_UI_TABLE_STATIC_CLASS
+#define MY_CLASS_NAME "Efl.Ui.Table_Static"
#define MY_CLASS_NAME_LEGACY "elm_grid"
EOLIAN static Eo *
-_efl_ui_grid_static_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
+_efl_ui_table_static_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
{
- Efl_Ui_Grid_Data *gd;
+ Efl_Ui_Table_Data *gd;
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME);
efl_access_role_set(obj, EFL_ACCESS_ROLE_FILLER);
- gd = efl_data_scope_get(obj, EFL_UI_GRID_CLASS);
+ gd = efl_data_scope_get(obj, EFL_UI_TABLE_CLASS);
gd->req_cols = 100;
gd->req_rows = 100;
@@ -21,16 +21,16 @@ _efl_ui_grid_static_efl_object_constructor(Eo *obj, void *pd EINA_UNUSED)
}
EOLIAN static void
-_efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
+_efl_ui_table_static_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED)
{
- Efl_Ui_Grid_Data *gd;
- Grid_Item *gi;
+ Efl_Ui_Table_Data *gd;
+ Table_Item *gi;
Evas *e;
long long xl, yl, wl, hl, vwl, vhl;
Eina_Bool mirror;
Eina_Rect r;
- gd = efl_data_scope_get(obj, EFL_UI_GRID_CLASS);
+ gd = efl_data_scope_get(obj, EFL_UI_TABLE_CLASS);
if (!gd->items) return;
e = evas_object_evas_get(obj);
@@ -45,8 +45,8 @@ _efl_ui_grid_static_efl_pack_layout_layout_update(Eo *obj, void *_pd EINA_UNUSED
if (!gd->req_cols || !gd->req_rows)
{
- WRN("Grid_Static size must be set before using! Default to 100x100.");
- efl_pack_grid_size_set(obj, 100, 100);
+ WRN("Table_Static size must be set before using! Default to 100x100.");
+ efl_pack_table_size_set(obj, 100, 100);
if (!gd->req_cols || !gd->req_rows) goto err;
}
vwl = gd->req_cols;
@@ -74,4 +74,4 @@ err:
efl_event_thaw(e);
}
-#include "efl_ui_grid_static.eo.c"
+#include "efl_ui_table_static.eo.c"
diff --git a/src/lib/elementary/efl_ui_grid_static.eo b/src/lib/elementary/efl_ui_table_static.eo
index 023eb1fded..337c2a0e04 100644
--- a/src/lib/elementary/efl_ui_grid_static.eo
+++ b/src/lib/elementary/efl_ui_table_static.eo
@@ -1,6 +1,6 @@
-class Efl.Ui.Grid_Static (Efl.Ui.Grid)
+class Efl.Ui.Table_Static (Efl.Ui.Table)
{
- [[Efl UI grid static class]]
+ [[Efl UI table static class]]
data: null;
implements {
Efl.Object.constructor;
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 6d545086a7..6432062917 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -658,7 +658,7 @@ START_TEST(edje_test_table_eoapi)
/* items have a text part "text" containing their position */
sprintf(buf, "%d,%d", k, l);
- sobj = efl_pack_grid_content_get(efl_part(obj, "table"), k, l);
+ sobj = efl_pack_table_content_get(efl_part(obj, "table"), k, l);
fail_if(!sobj);
//txt = efl_part_text_get(sobj, "text");
txt = edje_object_part_text_get(sobj, "text");
@@ -673,7 +673,7 @@ START_TEST(edje_test_table_eoapi)
i = l*2 + k;
sobjs[i] = efl_add(EFL_CANVAS_RECTANGLE_CLASS, evas);
fail_if(!sobjs[i]);
- efl_pack_grid(efl_part(obj, "table"), sobjs[i], k, l + 2, 1, 1);
+ efl_pack_table(efl_part(obj, "table"), sobjs[i], k, l + 2, 1, 1);
}
fail_if(efl_content_count(efl_part(obj, "table")) != 8);
@@ -682,7 +682,7 @@ START_TEST(edje_test_table_eoapi)
it = efl_content_iterate(efl_part(obj, "table"));
EINA_ITERATOR_FOREACH(it, sobj)
{
- efl_pack_grid_position_get(efl_part(obj, "table"), sobj, &k, &l, &cs, &rs);
+ efl_pack_table_position_get(efl_part(obj, "table"), sobj, &k, &l, &cs, &rs);
fail_if(cs != 1);
fail_if(rs != 1);
if (l >= 2)
@@ -693,14 +693,14 @@ START_TEST(edje_test_table_eoapi)
fail_if(i != 8);
/* table size and clear */
- efl_pack_grid_size_get(efl_part(obj, "table"), &cols, &rows);
+ efl_pack_table_size_get(efl_part(obj, "table"), &cols, &rows);
fail_if(cols != 2);
fail_if(rows != 4);
efl_pack_clear(efl_part(obj, "table"));
fail_if(efl_content_count(efl_part(obj, "table")) != 4);
- efl_pack_grid_size_get(efl_part(obj, "table"), &cols, &rows);
+ efl_pack_table_size_get(efl_part(obj, "table"), &cols, &rows);
fail_if(cols != 2);
fail_if(rows != 2);