aboutsummaryrefslogtreecommitdiffstats
path: root/legacy
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-02 06:20:28 +0000
committerDaniel Juyung Seo <seojuyung2@gmail.com>2012-04-02 06:20:28 +0000
commit7f2fc8ef80fbce254730f9823e356a9fdb215340 (patch)
tree7e339c26d0ebc9d662db18ff2a971a170572ce9f /legacy
parentRevert a wrong commit. Un-wanted files are committed together. (diff)
downloadefl-7f2fc8ef80fbce254730f9823e356a9fdb215340.tar.gz
elm bin: Use convenient utility function elm_win_util_standard_add()
instead of elm_win_add() + elm_bg_add(). This is for normal style (ELM_WIN_BASIC) window. SVN revision: 69848
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/bin/config.c18
-rw-r--r--legacy/elementary/src/bin/test.c6
-rw-r--r--legacy/elementary/src/bin/test_3d.c10
-rw-r--r--legacy/elementary/src/bin/test_actionslider.c10
-rw-r--r--legacy/elementary/src/bin/test_box.c39
-rw-r--r--legacy/elementary/src/bin/test_bubble.c10
-rw-r--r--legacy/elementary/src/bin/test_button.c10
-rw-r--r--legacy/elementary/src/bin/test_calendar.c20
-rw-r--r--legacy/elementary/src/bin/test_clock.c30
-rw-r--r--legacy/elementary/src/bin/test_cnp.c10
-rw-r--r--legacy/elementary/src/bin/test_colorselector.c10
-rw-r--r--legacy/elementary/src/bin/test_conform.c20
-rw-r--r--legacy/elementary/src/bin/test_ctxpopup.c10
-rw-r--r--legacy/elementary/src/bin/test_cursor.c30
-rw-r--r--legacy/elementary/src/bin/test_datetime.c10
-rw-r--r--legacy/elementary/src/bin/test_dayselector.c11
-rw-r--r--legacy/elementary/src/bin/test_diskselector.c11
-rw-r--r--legacy/elementary/src/bin/test_eio.c10
-rw-r--r--legacy/elementary/src/bin/test_entry.c70
-rw-r--r--legacy/elementary/src/bin/test_entry_anchor2.c10
-rw-r--r--legacy/elementary/src/bin/test_factory.c10
-rw-r--r--legacy/elementary/src/bin/test_fileselector.c10
-rw-r--r--legacy/elementary/src/bin/test_fileselector_button.c10
-rw-r--r--legacy/elementary/src/bin/test_fileselector_entry.c10
-rw-r--r--legacy/elementary/src/bin/test_flip.c30
-rw-r--r--legacy/elementary/src/bin/test_flip_page.c10
-rw-r--r--legacy/elementary/src/bin/test_flipselector.c10
-rw-r--r--legacy/elementary/src/bin/test_floating.c10
-rw-r--r--legacy/elementary/src/bin/test_focus.c12
-rw-r--r--legacy/elementary/src/bin/test_focus2.c10
-rw-r--r--legacy/elementary/src/bin/test_focus3.c10
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c30
-rw-r--r--legacy/elementary/src/bin/test_gesture_layer2.c10
-rw-r--r--legacy/elementary/src/bin/test_glview.c13
-rw-r--r--legacy/elementary/src/bin/test_glview_simple.c12
-rw-r--r--legacy/elementary/src/bin/test_grid.c9
-rw-r--r--legacy/elementary/src/bin/test_hoversel.c10
-rw-r--r--legacy/elementary/src/bin/test_icon_desktops.c10
-rw-r--r--legacy/elementary/src/bin/test_index.c20
-rw-r--r--legacy/elementary/src/bin/test_inwin.c20
-rw-r--r--legacy/elementary/src/bin/test_label.c10
-rw-r--r--legacy/elementary/src/bin/test_layout.c10
-rw-r--r--legacy/elementary/src/bin/test_map.c20
-rw-r--r--legacy/elementary/src/bin/test_menu.c11
-rw-r--r--legacy/elementary/src/bin/test_multibuttonentry.c10
-rw-r--r--legacy/elementary/src/bin/test_notify.c10
-rw-r--r--legacy/elementary/src/bin/test_panel.c10
-rw-r--r--legacy/elementary/src/bin/test_panes.c2
-rw-r--r--legacy/elementary/src/bin/test_photo.c10
-rw-r--r--legacy/elementary/src/bin/test_photocam.c10
-rw-r--r--legacy/elementary/src/bin/test_popup.c10
-rw-r--r--legacy/elementary/src/bin/test_progressbar.c10
-rw-r--r--legacy/elementary/src/bin/test_radio.c10
-rw-r--r--legacy/elementary/src/bin/test_scaling.c10
-rw-r--r--legacy/elementary/src/bin/test_scroller.c20
-rw-r--r--legacy/elementary/src/bin/test_segment_control.c10
-rw-r--r--legacy/elementary/src/bin/test_separator.c10
-rw-r--r--legacy/elementary/src/bin/test_slider.c10
-rw-r--r--legacy/elementary/src/bin/test_slideshow.c10
-rw-r--r--legacy/elementary/src/bin/test_spinner.c10
-rw-r--r--legacy/elementary/src/bin/test_store.c11
-rw-r--r--legacy/elementary/src/bin/test_table.c70
-rw-r--r--legacy/elementary/src/bin/test_thumb.c10
-rw-r--r--legacy/elementary/src/bin/test_toolbar.c80
-rw-r--r--legacy/elementary/src/bin/test_tooltip.c22
-rw-r--r--legacy/elementary/src/bin/test_transit.c90
-rw-r--r--legacy/elementary/src/bin/test_weather.c10
-rw-r--r--legacy/elementary/src/bin/test_web.c34
-rw-r--r--legacy/elementary/src/bin/test_win_socket.c10
69 files changed, 243 insertions, 928 deletions
diff --git a/legacy/elementary/src/bin/config.c b/legacy/elementary/src/bin/config.c
index 6334c36a5e..fdf6be54c2 100644
--- a/legacy/elementary/src/bin/config.c
+++ b/legacy/elementary/src/bin/config.c
@@ -86,8 +86,6 @@ struct _Fonts_Data
} \
while (0)
-static Evas_Object *main_win = NULL;
-
static int quiet = 0;
static int interactive = 1;
@@ -3022,22 +3020,14 @@ _status_config_full(Evas_Object *win,
}
static void
-status_win(void)
+win_create(void)
{
- Evas_Object *win, *bg, *bx0;
-
- win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
- main_win = win;
- elm_win_title_set(win, "Elementary Config");
+ Evas_Object *win, *bx0;
+ win = elm_win_util_standard_add("main", "Elementary Config");
ecore_event_handler_add(ELM_EVENT_CONFIG_ALL_CHANGED, _config_all_changed,
win);
-
evas_object_smart_callback_add(win, "delete,request", config_exit, NULL);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, 1.0, 1.0);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
bx0 = elm_box_add(win);
evas_object_size_hint_weight_set(bx0, 1.0, 1.0);
@@ -3115,7 +3105,7 @@ elm_main(int argc,
#ifdef ELM_EFREET
elm_need_efreet();
#endif
- status_win(); /* create main window */
+ win_create(); /* create main window */
if (!interactive)
ecore_timer_add(2.0, _exit_timer, NULL);
}
diff --git a/legacy/elementary/src/bin/test.c b/legacy/elementary/src/bin/test.c
index 6653b57e89..c6f6199d31 100644
--- a/legacy/elementary/src/bin/test.c
+++ b/legacy/elementary/src/bin/test.c
@@ -252,7 +252,11 @@ my_win_main(char *autorun, Eina_Bool test_win_only)
* is no parent. "main" is the name of the window - used by the window
* manager for identifying the window uniquely amongst all the windows
* within this application (and all instances of the application). The
- * type is a basic window (the final parameter) */
+ * type is a basic window (the final parameter).
+ * You can call elm_win_util_standard_add() instead. This is a convenient API
+ * for window and bg creation. You don't need to create bg object manually.
+ * You can also set the title of the window at the same time.
+ * ex) win = elm_win_util_standard_add("main", "Elementary Tests"); */
win = elm_win_add(NULL, "main", ELM_WIN_BASIC);
/* Set the title of the window - This is in the titlebar. */
elm_win_title_set(win, "Elementary Tests");
diff --git a/legacy/elementary/src/bin/test_3d.c b/legacy/elementary/src/bin/test_3d.c
index 8c11e9526e..6a960fbaae 100644
--- a/legacy/elementary/src/bin/test_3d.c
+++ b/legacy/elementary/src/bin/test_3d.c
@@ -240,17 +240,11 @@ _ch_z0(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_3d(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *sl;
+ Evas_Object *win, *bx, *sl;
- win = elm_win_add(NULL, "box-vert", ELM_WIN_BASIC);
- elm_win_title_set(win, "Box Vert");
+ win = elm_win_util_standard_add("box-vert", "Box Vert");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
cube = _cube_new(evas_object_evas_get(win), 240, 240, 240);
bx = elm_box_add(win);
diff --git a/legacy/elementary/src/bin/test_actionslider.c b/legacy/elementary/src/bin/test_actionslider.c
index b6a3e6f8d9..f3b6454258 100644
--- a/legacy/elementary/src/bin/test_actionslider.c
+++ b/legacy/elementary/src/bin/test_actionslider.c
@@ -89,17 +89,11 @@ _magnet_enable_disable_cb(void *data __UNUSED__, Evas_Object *obj, void *event_i
void
test_actionslider(void *data __UNUSED__, Evas_Object * obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *as;
+ Evas_Object *win, *bx, *as;
- win = elm_win_add(NULL, "actionslider", ELM_WIN_BASIC);
- elm_win_title_set(win, "Actionslider");
+ win = elm_win_util_standard_add("actionslider", "Actionslider");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, 0);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_box.c b/legacy/elementary/src/bin/test_box.c
index 0f9698b730..1b191f9f54 100644
--- a/legacy/elementary/src/bin/test_box.c
+++ b/legacy/elementary/src/bin/test_box.c
@@ -129,20 +129,14 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_box_vert(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ic, *bxx, *bt;
+ Evas_Object *win, *bx, *ic, *bxx, *bt;
char buf[PATH_MAX];
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "box-vert", ELM_WIN_BASIC);
- elm_win_title_set(win, "Box Vert");
+ win = elm_win_util_standard_add("box-vert", "Box Vert");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -201,17 +195,11 @@ _del_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_box_vert2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt;
+ Evas_Object *win, *bx, *bt;
- win = elm_win_add(NULL, "box-vert2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Box Vert 2");
+ win = elm_win_util_standard_add("box-vert2", "Box Vert 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
elm_box_padding_set(bx, 10, 10);
@@ -264,18 +252,13 @@ test_box_vert2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
void
test_box_horiz(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ic, *bxx, *bt;
+ Evas_Object *win, *bx, *ic, *bxx, *bt;
char buf[PATH_MAX];
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "box-horiz", ELM_WIN_BASIC);
- elm_win_title_set(win, "Box Horiz");
+ win = elm_win_util_standard_add("box-horiz", "Box Horiz");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
@@ -655,18 +638,12 @@ _win_del(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
void
test_box_transition(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt;
+ Evas_Object *win, *bx, *bt;
Transitions_Data *tdata;
- win = elm_win_add(NULL, "box-transition", ELM_WIN_BASIC);
- elm_win_title_set(win, "Box Transition");
+ win = elm_win_util_standard_add("box-transition", "Box Transition");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, 1.0, 1.0);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, 1.0, 1.0);
diff --git a/legacy/elementary/src/bin/test_bubble.c b/legacy/elementary/src/bin/test_bubble.c
index fb64e37a65..01b5ad6d22 100644
--- a/legacy/elementary/src/bin/test_bubble.c
+++ b/legacy/elementary/src/bin/test_bubble.c
@@ -105,21 +105,15 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_bubble(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ic, *bb, *ct, *bxx, *bt;
+ Evas_Object *win, *bx, *ic, *bb, *ct, *bxx, *bt;
char buf[PATH_MAX];
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "box-vert", ELM_WIN_BASIC);
+ win = elm_win_util_standard_add("bubble", "Bubble");
api->win = win;
- elm_win_title_set(win, "Bubble");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_button.c b/legacy/elementary/src/bin/test_button.c
index d332482f93..be5d655fd2 100644
--- a/legacy/elementary/src/bin/test_button.c
+++ b/legacy/elementary/src/bin/test_button.c
@@ -34,18 +34,12 @@ _bt_unpressed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED
void
test_button(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *scr, *bx, *ic, *bt;
+ Evas_Object *win, *scr, *bx, *ic, *bt;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "buttons", ELM_WIN_BASIC);
- elm_win_title_set(win, "Buttons");
+ win = elm_win_util_standard_add("buttons", "Buttons");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
scr = elm_scroller_add(win);
elm_scroller_bounce_set(scr, EINA_FALSE, EINA_TRUE);
elm_scroller_policy_set(scr, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
diff --git a/legacy/elementary/src/bin/test_calendar.c b/legacy/elementary/src/bin/test_calendar.c
index ba10f3a1ee..71107fd92f 100644
--- a/legacy/elementary/src/bin/test_calendar.c
+++ b/legacy/elementary/src/bin/test_calendar.c
@@ -117,19 +117,13 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_calendar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *cal, *bx, *bxx, *bt;
+ Evas_Object *win, *cal, *bx, *bxx, *bt;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "calendar", ELM_WIN_BASIC);
- elm_win_title_set(win, "Calendar");
+ win = elm_win_util_standard_add("calendar", "Calendar");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -213,7 +207,7 @@ _format_month_year(struct tm *stm)
void
test_calendar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bxh, *cal, *cal2, *cal3, *en;
+ Evas_Object *win, *bx, *bxh, *cal, *cal2, *cal3, *en;
Elm_Calendar_Mark *mark;
struct tm selected_time;
time_t current_time;
@@ -223,15 +217,9 @@ test_calendar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
"Thursday", "Friday", "Saturday"
};
- win = elm_win_add(NULL, "calendar2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Calendar 2");
+ win = elm_win_util_standard_add("calendar2", "Calendar 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_clock.c b/legacy/elementary/src/bin/test_clock.c
index b71ac932dd..6e28d2162b 100644
--- a/legacy/elementary/src/bin/test_clock.c
+++ b/legacy/elementary/src/bin/test_clock.c
@@ -96,20 +96,14 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_clock(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ck, *bt, *bxx;
+ Evas_Object *win, *bx, *ck, *bt, *bxx;
unsigned int digedit;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "clock", ELM_WIN_BASIC);
- elm_win_title_set(win, "Clock");
+ win = elm_win_util_standard_add("clock", "Clock");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -211,19 +205,13 @@ _hmode_bt_clicked(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_clock2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *hbx, *ck, *bt, *bxx;
+ Evas_Object *win, *bx, *hbx, *ck, *bt, *bxx;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "clock2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Clock 2");
+ win = elm_win_util_standard_add("clock2", "Clock 2");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -276,17 +264,11 @@ test_clock2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_clock3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ck, *lb;
+ Evas_Object *win, *bx, *ck, *lb;
- win = elm_win_add(NULL, "clock3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Clock 3");
+ win = elm_win_util_standard_add("clock3", "Clock 3");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_cnp.c b/legacy/elementary/src/bin/test_cnp.c
index 4790ee0893..31aad2de78 100644
--- a/legacy/elementary/src/bin/test_cnp.c
+++ b/legacy/elementary/src/bin/test_cnp.c
@@ -38,17 +38,11 @@ _bt_clear_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
void
test_cnp(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *gd, *bt, *en, *lb;
+ Evas_Object *win, *gd, *bt, *en, *lb;
- win = elm_win_add(NULL, "CopyPaste", ELM_WIN_BASIC);
- elm_win_title_set(win, "CopyPaste");
+ win = elm_win_util_standard_add("copypaste", "CopyPaste");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
gd = elm_grid_add(win);
elm_grid_size_set(gd, 100, 100);
elm_win_resize_object_add(win, gd);
diff --git a/legacy/elementary/src/bin/test_colorselector.c b/legacy/elementary/src/bin/test_colorselector.c
index 67fa2196b8..1878610533 100644
--- a/legacy/elementary/src/bin/test_colorselector.c
+++ b/legacy/elementary/src/bin/test_colorselector.c
@@ -75,18 +75,12 @@ void
test_colorselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *cs, *fr, *re, *bt;
+ Evas_Object *win, *bx, *bx2, *cs, *fr, *re, *bt;
int r, g, b, a;
- win = elm_win_add(NULL, "colorselector", ELM_WIN_BASIC);
- elm_win_title_set(win, "Color Selector");
+ win = elm_win_util_standard_add("colorselector", "ColorSelector");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_conform.c b/legacy/elementary/src/bin/test_conform.c
index 3ff3f5c547..925a1aa22e 100644
--- a/legacy/elementary/src/bin/test_conform.c
+++ b/legacy/elementary/src/bin/test_conform.c
@@ -7,18 +7,12 @@
void
test_conformant(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
- Evas_Object *win, *bg, *conform, *btn, *bx, *en;
+ Evas_Object *win, *conform, *btn, *bx, *en;
- win = elm_win_add(NULL, "conformant", ELM_WIN_BASIC);
- elm_win_title_set(win, "Conformant");
+ win = elm_win_util_standard_add("conformant", "Conformant");
elm_win_autodel_set(win, EINA_TRUE);
elm_win_conformant_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
conform = elm_conformant_add(win);
elm_win_resize_object_add(win, conform);
evas_object_size_hint_weight_set(conform, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -96,18 +90,12 @@ popobj(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
void
test_conformant2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
{
- Evas_Object *win, *bg, *conform, *btn, *bx, *en, *pg;
+ Evas_Object *win, *conform, *btn, *bx, *en, *pg;
- win = elm_win_add(NULL, "conformant2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Conformant 2");
+ win = elm_win_util_standard_add("conformant2", "Conformant 2");
elm_win_autodel_set(win, EINA_TRUE);
elm_win_conformant_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/legacy/elementary/src/bin/test_ctxpopup.c b/legacy/elementary/src/bin/test_ctxpopup.c
index bd52cc9c88..94b91328dc 100644
--- a/legacy/elementary/src/bin/test_ctxpopup.c
+++ b/legacy/elementary/src/bin/test_ctxpopup.c
@@ -288,17 +288,11 @@ static void _list_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, vo
void
test_ctxpopup(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *list;
+ Evas_Object *win, *list;
- win = elm_win_add(NULL, "Contextual Popup", ELM_WIN_BASIC);
- elm_win_title_set(win, "Contextual Popup");
+ win = elm_win_util_standard_add("contextual-popup", "Contextual Popup");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
list = elm_list_add(win);
elm_win_resize_object_add(win, list);
evas_object_size_hint_weight_set(list, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_cursor.c b/legacy/elementary/src/bin/test_cursor.c
index 859d010754..0150b44164 100644
--- a/legacy/elementary/src/bin/test_cursor.c
+++ b/legacy/elementary/src/bin/test_cursor.c
@@ -165,7 +165,7 @@ test_cursor(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *o, *grid, *gl;
+ Evas_Object *win, *bx, *o, *grid, *gl;
Elm_Object_Item *glit1, *glit2, *glit3;
Elm_Object_Item *tb_it;
Elm_Object_Item *lit;
@@ -185,15 +185,9 @@ test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
"wood_01.jpg",
};
- win = elm_win_add(NULL, "cursor2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Cursor 2");
+ win = elm_win_util_standard_add("cursor2", "Cursor 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -289,22 +283,16 @@ test_cursor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
void
test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *o;
+ Evas_Object *win, *bx, *o;
Elm_Object_Item *lit;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "cursor3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Cursor 3");
+ win = elm_win_util_standard_add("cursor3", "Cursor 3");
elm_win_autodel_set(win, EINA_TRUE);
snprintf(buf, sizeof(buf), "%s/objects/cursors.edj", elm_app_data_dir_get());
elm_theme_extension_add(NULL, buf);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -400,20 +388,14 @@ test_cursor3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
void
test_cursor4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ly, *bt;
+ Evas_Object *win, *bx, *ly, *bt;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "cursor layout", ELM_WIN_BASIC);
- elm_win_title_set(win, "Cursor Layout");
+ win = elm_win_util_standard_add("cursor layout", "Cursor Layout");
elm_win_autodel_set(win, EINA_TRUE);
snprintf(buf, sizeof(buf), "%s/objects/cursors.edj", elm_app_data_dir_get());
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_datetime.c b/legacy/elementary/src/bin/test_datetime.c
index 1d50c79cbf..ffc8608b99 100644
--- a/legacy/elementary/src/bin/test_datetime.c
+++ b/legacy/elementary/src/bin/test_datetime.c
@@ -15,19 +15,13 @@ _changed_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_datetime(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *datetime;
+ Evas_Object *win, *bx, *datetime;
time_t t;
struct tm time1;
- win = elm_win_add(NULL, "Datetime", ELM_WIN_BASIC);
- elm_win_title_set(win, "Datetime");
+ win = elm_win_util_standard_add("datetime", "DateTime");
elm_win_autodel_set(win, 1);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_dayselector.c b/legacy/elementary/src/bin/test_dayselector.c
index c87ddd6261..7d5fc55412 100644
--- a/legacy/elementary/src/bin/test_dayselector.c
+++ b/legacy/elementary/src/bin/test_dayselector.c
@@ -43,18 +43,11 @@ static void _changed_cb(void* data __UNUSED__, Evas_Object* obj, void* event_inf
void
test_dayselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *dayselector, *sunday;
+ Evas_Object *win, *bx, *dayselector, *sunday;
- win = elm_win_add(NULL, "dayselector", ELM_WIN_BASIC);
- elm_win_title_set(win, "Day Selector");
+ win = elm_win_util_standard_add("dayselector", "Day Selector");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_diskselector.c b/legacy/elementary/src/bin/test_diskselector.c
index 45d909955d..d62dee4855 100644
--- a/legacy/elementary/src/bin/test_diskselector.c
+++ b/legacy/elementary/src/bin/test_diskselector.c
@@ -202,7 +202,7 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *disk, *ic, *bxx, *bt;
+ Evas_Object *win, *bx, *disk, *ic, *bxx, *bt;
Elm_Object_Item *ds_it;
char buf[PATH_MAX];
api_data *api = calloc(1, sizeof(api_data));
@@ -216,17 +216,10 @@ test_diskselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
};
char date[3];
- win = elm_win_add(NULL, "diskselector", ELM_WIN_BASIC);
- elm_win_title_set(win, "Disk Selector");
+ win = elm_win_util_standard_add("diskselector", "Disk Selector");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(bg, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_eio.c b/legacy/elementary/src/bin/test_eio.c
index 9aa9cd4533..7e26a4caba 100644
--- a/legacy/elementary/src/bin/test_eio.c
+++ b/legacy/elementary/src/bin/test_eio.c
@@ -126,7 +126,7 @@ _test_eio_clear(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
void
test_eio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *vbox, *hbox, *ic, *bt, *fs_bt, *gl;
+ Evas_Object *win, *vbox, *hbox, *ic, *bt, *fs_bt, *gl;
it_eio.item_style = "default";
it_eio.func.text_get = _gl_text_get;
@@ -134,15 +134,9 @@ test_eio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
it_eio.func.state_get = _gl_state_get;
it_eio.func.del = _gl_del;
- win = elm_win_add(NULL, "fileselector-button", ELM_WIN_BASIC);
- elm_win_title_set(win, "File Selector Button");
+ win = elm_win_util_standard_add("fileselector-button", "File Selector Button");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
vbox = elm_box_add(win);
elm_win_resize_object_add(win, vbox);
evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_entry.c b/legacy/elementary/src/bin/test_entry.c
index 3de91135c8..a07011dc86 100644
--- a/legacy/elementary/src/bin/test_entry.c
+++ b/legacy/elementary/src/bin/test_entry.c
@@ -77,18 +77,12 @@ my_entry_bt_6(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED
void
test_entry(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *bt, *en;
+ Evas_Object *win, *bx, *bx2, *bt, *en;
char buf[4096];
- win = elm_win_add(NULL, "entry", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry");
+ win = elm_win_util_standard_add("entry", "Entry");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -275,19 +269,13 @@ scrolled_anchor_test(void *data, Evas_Object *obj __UNUSED__, void *event_info _
void
test_entry_scrolled(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *bt, *en, *en_p, *sp;
+ Evas_Object *win, *bx, *bx2, *bt, *en, *en_p, *sp;
static Elm_Entry_Filter_Accept_Set digits_filter_data, digits_filter_data2;
static Elm_Entry_Filter_Limit_Size limit_filter_data, limit_filter_data2;
- win = elm_win_add(NULL, "entry-scrolled", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry Scrolled");
+ win = elm_win_util_standard_add("entry-scrolled", "Entry Scrolled");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -717,17 +705,11 @@ my_ent_bt_pas(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED
void
test_entry3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *bt, *en;
+ Evas_Object *win, *bx, *bx2, *bt, *en;
- win = elm_win_add(NULL, "entry3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry 3");
+ win = elm_win_util_standard_add("entry3", "Entry 3");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -1279,18 +1261,12 @@ test_entry3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_entry4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *ly, *en;
+ Evas_Object *win, *ly, *en;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "entry4", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry 4");
+ win = elm_win_util_standard_add("entry4", "Entry 4");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
ly = elm_layout_add(win);
snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
elm_layout_file_set(ly, buf, "layout");
@@ -1348,17 +1324,11 @@ test_entry4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_entry5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *bt, *en;
+ Evas_Object *win, *bx, *bx2, *bt, *en;
- win = elm_win_add(NULL, "entry5", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry 5");
+ win = elm_win_util_standard_add("entry5", "Entry 5");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -1644,17 +1614,11 @@ test_entry5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_entry6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *en;
+ Evas_Object *win, *bx, *en;
- win = elm_win_add(NULL, "entry6", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry 6");
+ win = elm_win_util_standard_add("entry6", "Entry 6");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -2166,17 +2130,11 @@ auto_save_changed_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_entry_notepad(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *bt, *np, *ch;
+ Evas_Object *win, *bx, *bx2, *bt, *np, *ch;
- win = elm_win_add(NULL, "entry-notepad", ELM_WIN_BASIC);
- elm_win_title_set(win, "Entry Notepad");
+ win = elm_win_util_standard_add("entry-notepad", "Entry Notepad");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_entry_anchor2.c b/legacy/elementary/src/bin/test_entry_anchor2.c
index c8ca7564fd..eb1762b55d 100644
--- a/legacy/elementary/src/bin/test_entry_anchor2.c
+++ b/legacy/elementary/src/bin/test_entry_anchor2.c
@@ -73,17 +73,11 @@ my_anchorview_anchor(void *data, Evas_Object *obj, void *event_info)
void
test_entry_anchor2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *av;
+ Evas_Object *win, *av;
- win = elm_win_add(NULL, "entry_anchor", ELM_WIN_BASIC);
- elm_win_title_set(win, "Anchorview");
+ win = elm_win_util_standard_add("entry_anchor", "Anchorview");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
av = elm_entry_add(win);
elm_entry_anchor_hover_style_set(av, "popout");
elm_entry_anchor_hover_parent_set(av, win);
diff --git a/legacy/elementary/src/bin/test_factory.c b/legacy/elementary/src/bin/test_factory.c
index 63a4342700..83fcd78cb1 100644
--- a/legacy/elementary/src/bin/test_factory.c
+++ b/legacy/elementary/src/bin/test_factory.c
@@ -134,18 +134,12 @@ fac_realize1(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_factory(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *sc, *fc;
+ Evas_Object *win, *bx, *sc, *fc;
int i;
- win = elm_win_add(NULL, "factory", ELM_WIN_BASIC);
- elm_win_title_set(win, "Factory");
+ win = elm_win_util_standard_add("factory", "Factory");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bx = elm_box_add(win);
#ifdef HOMOG
elm_box_homogeneous_set(bx, EINA_TRUE);
diff --git a/legacy/elementary/src/bin/test_fileselector.c b/legacy/elementary/src/bin/test_fileselector.c
index 2cbdee21c8..0b2ce2190c 100644
--- a/legacy/elementary/src/bin/test_fileselector.c
+++ b/legacy/elementary/src/bin/test_fileselector.c
@@ -119,7 +119,7 @@ test_fileselector(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *fs, *bg, *vbox, *hbox, *bt, *sep;
+ Evas_Object *win, *fs, *vbox, *hbox, *bt, *sep;
/* Set the locale according to the system pref.
* If you dont do so the file selector will order the files list in
@@ -129,15 +129,9 @@ test_fileselector(void *data __UNUSED__,
elm_need_ethumb();
- win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC);
- elm_win_title_set(win, "File Selector");
+ win = elm_win_util_standard_add("fileselector", "File Selector");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
vbox = elm_box_add(win);
elm_win_resize_object_add(win, vbox);
evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_fileselector_button.c b/legacy/elementary/src/bin/test_fileselector_button.c
index e87a7164ff..969983ab96 100644
--- a/legacy/elementary/src/bin/test_fileselector_button.c
+++ b/legacy/elementary/src/bin/test_fileselector_button.c
@@ -155,19 +155,13 @@ test_fileselector_button(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *vbox, *hbox, *ic, *bt, *fs_bt, *en, *lb, *bxx;
+ Evas_Object *win, *vbox, *hbox, *ic, *bt, *fs_bt, *en, *lb, *bxx;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "fileselector-button", ELM_WIN_BASIC);
- elm_win_title_set(win, "File Selector Button");
+ win = elm_win_util_standard_add("fileselector-button", "File Selector Button");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_fileselector_entry.c b/legacy/elementary/src/bin/test_fileselector_entry.c
index 48357d71b0..98ab423bc9 100644
--- a/legacy/elementary/src/bin/test_fileselector_entry.c
+++ b/legacy/elementary/src/bin/test_fileselector_entry.c
@@ -160,19 +160,13 @@ test_fileselector_entry(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *vbox, *hbox, *ic, *bt, *fs_en, *en, *lb, *bxx;
+ Evas_Object *win, *vbox, *hbox, *ic, *bt, *fs_en, *en, *lb, *bxx;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "fileselector-entry", ELM_WIN_BASIC);
- elm_win_title_set(win, "File Selector Entry");
+ win = elm_win_util_standard_add("fileselector-entry", "File Selector Entry");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_flip.c b/legacy/elementary/src/bin/test_flip.c
index f5b32ed7a5..20d4e49ef4 100644
--- a/legacy/elementary/src/bin/test_flip.c
+++ b/legacy/elementary/src/bin/test_flip.c
@@ -63,19 +63,13 @@ my_fl_8(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
void
test_flip(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *fl, *o, *bt, *ly;
+ Evas_Object *win, *bx, *bx2, *fl, *o, *bt, *ly;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "flip", ELM_WIN_BASIC);
- elm_win_title_set(win, "Flip");
+ win = elm_win_util_standard_add("flip", "Flip");
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -373,18 +367,12 @@ test_flip2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_flip3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bx2, *fl, *fl_f, *fl_b, *o, *bt, *fr;
+ Evas_Object *win, *bx, *bx2, *fl, *fl_f, *fl_b, *o, *bt, *fr;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "flip3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Flip Flip");
+ win = elm_win_util_standard_add("flip3", "Flip Flip");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -511,18 +499,12 @@ my_fl_ch(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
void
test_flip4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *fl, *im, *li, *bt, *rd, *rdg;
+ Evas_Object *win, *bx, *fl, *im, *li, *bt, *rd, *rdg;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "flip4", ELM_WIN_BASIC);
- elm_win_title_set(win, "Flip Interactive");
+ win = elm_win_util_standard_add("flip-interactive", "Flip Interactive");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_flip_page.c b/legacy/elementary/src/bin/test_flip_page.c
index 6715e79e0e..20cafb3f6e 100644
--- a/legacy/elementary/src/bin/test_flip_page.c
+++ b/legacy/elementary/src/bin/test_flip_page.c
@@ -835,19 +835,13 @@ im_move_cb(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED_
void
test_flip_page(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *im, *im2, *rc;
+ Evas_Object *win, *im, *im2, *rc;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "flip_page", ELM_WIN_BASIC);
- elm_win_title_set(win, "Flip Page");
+ win = elm_win_util_standard_add("flip-page", "Flip Page");
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
im2 = evas_object_image_filled_add(evas_object_evas_get(win));
snprintf(buf, sizeof(buf), "%s/images/%s",
elm_app_data_dir_get(), "sky_04.jpg");
diff --git a/legacy/elementary/src/bin/test_flipselector.c b/legacy/elementary/src/bin/test_flipselector.c
index 8126ab16ea..100588dc93 100644
--- a/legacy/elementary/src/bin/test_flipselector.c
+++ b/legacy/elementary/src/bin/test_flipselector.c
@@ -82,7 +82,7 @@ test_flipselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
{
char buf[8];
unsigned int i;
- Evas_Object *win, *bg, *bx, *fp, *bt, *bx2, *sl;
+ Evas_Object *win, *bx, *fp, *bt, *bx2, *sl;
static const char *lbl[] = {
"Elementary",
"Evas",
@@ -94,15 +94,9 @@ test_flipselector(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
"Edbus"
};
- win = elm_win_add(NULL, "flipselector", ELM_WIN_BASIC);
- elm_win_title_set(win, "Flip Selector");
+ win = elm_win_util_standard_add("flipselector", "Flip Selector");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_floating.c b/legacy/elementary/src/bin/test_floating.c
index 211425ca8b..2e3ac94295 100644
--- a/legacy/elementary/src/bin/test_floating.c
+++ b/legacy/elementary/src/bin/test_floating.c
@@ -65,19 +65,13 @@ _del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event
void
test_floating(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *gl;
+ Evas_Object *win, *gl;
int i;
Ecore_Animator *ani;
- win = elm_win_add(NULL, "floating", ELM_WIN_BASIC);
- elm_win_title_set(win, "Floating");
+ win = elm_win_util_standard_add("floating", "Floating");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
gl = elm_genlist_add(win);
evas_object_size_hint_weight_set(gl, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(gl, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/legacy/elementary/src/bin/test_focus.c b/legacy/elementary/src/bin/test_focus.c
index e52a84eccb..af30f30983 100644
--- a/legacy/elementary/src/bin/test_focus.c
+++ b/legacy/elementary/src/bin/test_focus.c
@@ -57,23 +57,13 @@ test_focus(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
Evas_Object *win;
unsigned int i, j;
- win = elm_win_add(NULL, "focus", ELM_WIN_BASIC);
- elm_win_title_set(win, "Focus");
+ win = elm_win_util_standard_add("focus", "Focus");
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
evas_object_resize(win, 800, 600);
elm_object_event_callback_add(win, _event, NULL);
elm_win_autodel_set(win, EINA_TRUE);
my_show(win);
- {
- Evas_Object *bg;
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- my_show(bg);
- }
-
Evas_Object *mainbx = elm_box_add(win);
elm_box_horizontal_set(mainbx, EINA_TRUE);
elm_win_resize_object_add(win, mainbx);
diff --git a/legacy/elementary/src/bin/test_focus2.c b/legacy/elementary/src/bin/test_focus2.c
index 4437338423..81042bdc73 100644
--- a/legacy/elementary/src/bin/test_focus2.c
+++ b/legacy/elementary/src/bin/test_focus2.c
@@ -48,11 +48,10 @@ _focus_layout_part(void *data, Evas_Object *o __UNUSED__, void *event_info __UNU
void
test_focus2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ly, *bt, *en, *bt1;
+ Evas_Object *win, *bx, *ly, *bt, *en, *bt1;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "focus2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Focus2");
+ win = elm_win_util_standard_add("focus2", "Focus 2");
elm_win_autodel_set(win, EINA_TRUE);
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
@@ -63,11 +62,6 @@ test_focus2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
(evas_object_evas_get(win), EVAS_CALLBACK_CANVAS_OBJECT_FOCUS_OUT,
_focus_out, NULL);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_focus3.c b/legacy/elementary/src/bin/test_focus3.c
index 36fe8ff8ff..71a5a8a11b 100644
--- a/legacy/elementary/src/bin/test_focus3.c
+++ b/legacy/elementary/src/bin/test_focus3.c
@@ -53,19 +53,13 @@ _hide(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNU
void
test_focus3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt, *en;
+ Evas_Object *win, *bx, *bt, *en;
- win = elm_win_add(NULL, "focus3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Focus 3");
+ win = elm_win_util_standard_add("focus3", "Focus 3");
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
evas_object_resize(win, 320, 480);
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index 20e03147c0..b17c8f9712 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -469,19 +469,13 @@ cursor_bt_clicked(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *even
void
test_gengrid(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *content_box, *bxx, *bx, *tg;
+ Evas_Object *win, *bt, *content_box, *bxx, *bx, *tg;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "gengrid", ELM_WIN_BASIC);
- elm_win_title_set(win, "GenGrid");
+ win = elm_win_util_standard_add("gengrid", "GenGrid");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
api->box = bxx;
elm_win_resize_object_add(win, bxx);
@@ -686,17 +680,11 @@ _size_changed(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_gengrid2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *grid, *bx, *hbx, *bt, *ck;
+ Evas_Object *win, *grid, *bx, *hbx, *bt, *ck;
- win = elm_win_add(NULL, "gengrid2", ELM_WIN_BASIC);
- elm_win_title_set(win, "GenGrid2");
+ win = elm_win_util_standard_add("gengrid2", "GenGrid 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -788,20 +776,14 @@ test_gengrid2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_gengrid3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *grid;
+ Evas_Object *win, *grid;
static Testitem ti[144];
int i, n;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "gengrid_group", ELM_WIN_BASIC);
- elm_win_title_set(win, "GenGrid Group");
+ win = elm_win_util_standard_add("gengrid_group", "GenGrid Group");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
grid = elm_gengrid_add(win);
elm_gengrid_item_size_set(grid, 150, 150);
elm_gengrid_group_item_size_set(grid, 31, 31);
diff --git a/legacy/elementary/src/bin/test_gesture_layer2.c b/legacy/elementary/src/bin/test_gesture_layer2.c
index e61883c05f..487c84edef 100644
--- a/legacy/elementary/src/bin/test_gesture_layer2.c
+++ b/legacy/elementary/src/bin/test_gesture_layer2.c
@@ -523,22 +523,16 @@ void
test_gesture_layer2(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *lb, *bx;
+ Evas_Object *win, *tb, *lb, *bx;
Evas_Object *r; /* Gesture layer transparent object */
Evas_Object *g; /* The Gesture Layer object */
infra_data *infra = _infra_data_alloc();
- win = elm_win_add(NULL, "table", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table");
+ win = elm_win_util_standard_add("table", "Table");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_smart_callback_add(win, "delete,request", my_win_del, infra);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
/* START - Building icons table */
bx = elm_box_add(win);
tb = elm_table_add(win);
diff --git a/legacy/elementary/src/bin/test_glview.c b/legacy/elementary/src/bin/test_glview.c
index 325d487b55..f8f2767272 100644
--- a/legacy/elementary/src/bin/test_glview.c
+++ b/legacy/elementary/src/bin/test_glview.c
@@ -558,7 +558,7 @@ _mouse_up(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *eve
void
test_glview(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt, *gl;
+ Evas_Object *win, *bx, *bt, *gl;
Ecore_Animator *ani;
GLData *gld = NULL;
@@ -569,18 +569,11 @@ test_glview(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
// new window - do the usual and give it a name, title and delete handler
// Set the engine to opengl_x11
elm_config_preferred_engine_set("opengl_x11");
- win = elm_win_add(NULL, "glview", ELM_WIN_BASIC);
+ win = elm_win_util_standard_add("glview", "GLView");
// Set preferred engine back to default from config
elm_config_preferred_engine_set(NULL);
-
- elm_win_title_set(win, "GLView");
- elm_win_autodel_set(win, EINA_TRUE);
- // add a standard bg
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
+ elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_glview_simple.c b/legacy/elementary/src/bin/test_glview_simple.c
index f75e398423..fc21ef43c0 100644
--- a/legacy/elementary/src/bin/test_glview_simple.c
+++ b/legacy/elementary/src/bin/test_glview_simple.c
@@ -232,7 +232,7 @@ _del(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj, void *event
void
test_glview_simple(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt, *gl;
+ Evas_Object *win, *bx, *bt, *gl;
Ecore_Animator *ani;
GLData *gld = NULL;
@@ -240,17 +240,11 @@ test_glview_simple(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *eve
// Set the engine to opengl_x11
elm_config_preferred_engine_set("opengl_x11");
- win = elm_win_add(NULL, "glview simple", ELM_WIN_BASIC);
+ win = elm_win_util_standard_add("glview simple", "GLView Simple");
// Set preferred engine back to default from config
elm_config_preferred_engine_set(NULL);
-
- elm_win_title_set(win, "GLView Simple");
- elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
+ elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_grid.c b/legacy/elementary/src/bin/test_grid.c
index cb7c535cc5..f08c060495 100644
--- a/legacy/elementary/src/bin/test_grid.c
+++ b/legacy/elementary/src/bin/test_grid.c
@@ -96,17 +96,12 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_grid(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *gd, *bt, *rc, *en;
+ Evas_Object *win, *gd, *bt, *rc, *en;
- win = elm_win_add(NULL, "grid", ELM_WIN_BASIC);
- elm_win_title_set(win, "Grid");
+ win = elm_win_util_standard_add("grid", "Grid");
elm_win_autodel_set(win, EINA_TRUE);
api_data *api = calloc(1, sizeof(api_data));
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
gd = elm_grid_add(win);
diff --git a/legacy/elementary/src/bin/test_hoversel.c b/legacy/elementary/src/bin/test_hoversel.c
index 1fc6b76c3c..d86c3cf8bc 100644
--- a/legacy/elementary/src/bin/test_hoversel.c
+++ b/legacy/elementary/src/bin/test_hoversel.c
@@ -93,20 +93,14 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_hoversel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt, *ic, *bxx;
+ Evas_Object *win, *bx, *bt, *ic, *bxx;
char buf[PATH_MAX];
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "hoversel", ELM_WIN_BASIC);
- elm_win_title_set(win, "Hoversel");
+ win = elm_win_util_standard_add("hoversel", "HoverSel");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_icon_desktops.c b/legacy/elementary/src/bin/test_icon_desktops.c
index d719362fe6..aed269a598 100644
--- a/legacy/elementary/src/bin/test_icon_desktops.c
+++ b/legacy/elementary/src/bin/test_icon_desktops.c
@@ -59,20 +59,14 @@ desktop_sel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_icon_desktops(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *gl;
+ Evas_Object *win, *gl;
#ifdef ELM_EFREET
Eina_List *desktops;
#endif
- win = elm_win_add(NULL, "icon-desktops", ELM_WIN_BASIC);
- elm_win_title_set(win, "Icon Desktops");
+ win = elm_win_util_standard_add("icon-desktops", "Icon Desktops");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
it_desk.item_style = "default";
it_desk.func.text_get = desk_gl_text_get;
it_desk.func.content_get = desk_gl_content_get;
diff --git a/legacy/elementary/src/bin/test_index.c b/legacy/elementary/src/bin/test_index.c
index f369b6a8f0..0e3928a1e7 100644
--- a/legacy/elementary/src/bin/test_index.c
+++ b/legacy/elementary/src/bin/test_index.c
@@ -162,21 +162,15 @@ id_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
void
test_index(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bxx, *gl, *id, *bt;
+ Evas_Object *win, *bxx, *gl, *id, *bt;
Elm_Object_Item *glit;
int i, j;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "index", ELM_WIN_BASIC);
- elm_win_title_set(win, "Index");
+ win = elm_win_util_standard_add("index", "Index");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bxx = elm_box_add(win);
elm_win_resize_object_add(win, bxx);
evas_object_size_hint_weight_set(bxx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -335,21 +329,15 @@ test_index2_id_changed(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void
void
test_index2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *box, *bt;
+ Evas_Object *win, *box, *bt;
Test_Index2_Elements *gui;
gui = malloc(sizeof(*gui));
- win = elm_win_add(NULL, "sorted-index-list", ELM_WIN_BASIC);
- elm_win_title_set(win, "Sorted Index and List");
+ win = elm_win_util_standard_add("sorted-index-list", "Sorted Index and List");
evas_object_smart_callback_add(win, "delete,request", test_index2_del, gui);
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
box = elm_box_add(win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, box);
diff --git a/legacy/elementary/src/bin/test_inwin.c b/legacy/elementary/src/bin/test_inwin.c
index 2558bf5d51..14ab16849f 100644
--- a/legacy/elementary/src/bin/test_inwin.c
+++ b/legacy/elementary/src/bin/test_inwin.c
@@ -61,19 +61,13 @@ _cleanup_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
void
test_inwin(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *inwin, *lb, *bxx, *bt;
+ Evas_Object *win, *inwin, *lb, *bxx, *bt;
api_data *api = calloc(1, sizeof(api_data));
- win = elm_win_add(NULL, "inwin", ELM_WIN_BASIC);
- elm_win_title_set(win, "Inwin");
+ win = elm_win_util_standard_add("inwin", "InWin");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _cleanup_cb, api);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
inwin = elm_win_inwin_add(win);
api->inwin = inwin;
evas_object_show(inwin);
@@ -107,17 +101,11 @@ test_inwin(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_inwin2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *inwin, *lb;
+ Evas_Object *win, *inwin, *lb;
- win = elm_win_add(NULL, "inwin2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Inwin 2");
+ win = elm_win_util_standard_add("inwin2", "InWin 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
inwin = elm_win_inwin_add(win);
elm_object_style_set(inwin, "minimal_vertical");
evas_object_show(inwin);
diff --git a/legacy/elementary/src/bin/test_label.c b/legacy/elementary/src/bin/test_label.c
index 82d28abafa..b217407089 100644
--- a/legacy/elementary/src/bin/test_label.c
+++ b/legacy/elementary/src/bin/test_label.c
@@ -15,17 +15,11 @@ enum _slide_style
void
test_label(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *lb;
+ Evas_Object *win, *bx, *lb;
- win = elm_win_add(NULL, "label", ELM_WIN_BASIC);
- elm_win_title_set(win, "Label");
+ win = elm_win_util_standard_add("label", "Label");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/legacy/elementary/src/bin/test_layout.c b/legacy/elementary/src/bin/test_layout.c
index 736a70080a..90826cbe84 100644
--- a/legacy/elementary/src/bin/test_layout.c
+++ b/legacy/elementary/src/bin/test_layout.c
@@ -37,18 +37,12 @@ _clicked_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_layout(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *box, *ly, *bt;
+ Evas_Object *win, *box, *ly, *bt;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "layout", ELM_WIN_BASIC);
- elm_win_title_set(win, "Layout");
+ win = elm_win_util_standard_add("layout", "Layout");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
box = elm_box_add(win);
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
diff --git a/legacy/elementary/src/bin/test_map.c b/legacy/elementary/src/bin/test_map.c
index df09cb368e..d136e83100 100644
--- a/legacy/elementary/src/bin/test_map.c
+++ b/legacy/elementary/src/bin/test_map.c
@@ -501,18 +501,12 @@ _zoom_manual(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED_
static void
_track_add(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *fs, *bg, *vbox, *hbox, *sep;
+ Evas_Object *fs, *vbox, *hbox, *sep;
char *path = NULL;
- fs_win = elm_win_add(NULL, "fileselector", ELM_WIN_BASIC);
- elm_win_title_set(fs_win, "File Selector");
+ fs_win = elm_win_util_standard_add("fileselector", "File Selector");
elm_win_autodel_set(fs_win, 1);
- bg = elm_bg_add(fs_win);
- elm_win_resize_object_add(fs_win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
vbox = elm_box_add(fs_win);
elm_win_resize_object_add(fs_win, vbox);
evas_object_size_hint_weight_set(vbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -970,21 +964,15 @@ _del_map(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
void
test_map(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *map;
+ Evas_Object *win, *map;
int idx = 0;
const char **tile_srcs;
const char **route_srcs;
const char **name_srcs;
- win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
- elm_win_title_set(win, "Map");
+ win = elm_win_util_standard_add("map", "Map");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
map = elm_map_add(win);
if (map)
{
diff --git a/legacy/elementary/src/bin/test_menu.c b/legacy/elementary/src/bin/test_menu.c
index 753f22d71e..cc940d7cf7 100644
--- a/legacy/elementary/src/bin/test_menu.c
+++ b/legacy/elementary/src/bin/test_menu.c
@@ -4,7 +4,7 @@
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
-static Evas_Object *win, *bg, *menu, *rect;
+static Evas_Object *menu;
static void
_show(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
@@ -97,17 +97,12 @@ _populate_1(Evas_Object *obj, Elm_Object_Item *menu_it)
void
test_menu(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
+ Evas_Object *win, *rect;
Elm_Object_Item *menu_it;
- win = elm_win_add(NULL, "menu", ELM_WIN_BASIC);
- elm_win_title_set(win, "Menu");
+ win = elm_win_util_standard_add("menu", "Menu");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
rect = evas_object_rectangle_add(evas_object_evas_get(win));
elm_win_resize_object_add(win, rect);
evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_multibuttonentry.c b/legacy/elementary/src/bin/test_multibuttonentry.c
index d530ae9993..d5d983cc12 100644
--- a/legacy/elementary/src/bin/test_multibuttonentry.c
+++ b/legacy/elementary/src/bin/test_multibuttonentry.c
@@ -199,19 +199,13 @@ test_multibuttonentry(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *sc, *bx;
+ Evas_Object *win, *sc, *bx;
Evas_Object *ly;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "Multibuttonentry", ELM_WIN_BASIC);
- elm_win_title_set(win, "Multibuttonentry");
+ win = elm_win_util_standard_add("multibuttonentry", "MultiButtonEntry");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
ly = elm_layout_add(win);
snprintf(buf, sizeof(buf), "%s/objects/multibuttonentry.edj", elm_app_data_dir_get());
elm_layout_file_set(ly, buf, "multibuttonentry_test");
diff --git a/legacy/elementary/src/bin/test_notify.c b/legacy/elementary/src/bin/test_notify.c
index 16cbc6433c..dcb387adc9 100644
--- a/legacy/elementary/src/bin/test_notify.c
+++ b/legacy/elementary/src/bin/test_notify.c
@@ -40,17 +40,11 @@ _notify_block(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_notify(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *notify, *bt, *lb;
+ Evas_Object *win, *bx, *tb, *notify, *bt, *lb;
- win = elm_win_add(NULL, "notify", ELM_WIN_BASIC);
- elm_win_title_set(win, "Notify");
+ win = elm_win_util_standard_add("notify", "Notify");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_win_resize_object_add(win, tb);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_panel.c b/legacy/elementary/src/bin/test_panel.c
index 4e47e4ca4e..ee88b8c1ae 100644
--- a/legacy/elementary/src/bin/test_panel.c
+++ b/legacy/elementary/src/bin/test_panel.c
@@ -154,18 +154,12 @@ _dir_has_subs(const char *path)
void
test_panel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *panel, *bx, *vbx, *toolbar;
+ Evas_Object *win, *panel, *bx, *vbx, *toolbar;
Evas_Object *list;
- win = elm_win_add(NULL, "panel", ELM_WIN_BASIC);
- elm_win_title_set(win, "Panel");
+ win = elm_win_util_standard_add("panel", "Panel");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
vbx = elm_box_add(win);
elm_win_resize_object_add(win, vbx);
evas_object_size_hint_weight_set(vbx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_panes.c b/legacy/elementary/src/bin/test_panes.c
index ec95bc614e..bf8d091eae 100644
--- a/legacy/elementary/src/bin/test_panes.c
+++ b/legacy/elementary/src/bin/test_panes.c
@@ -49,8 +49,8 @@ test_panes(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(win, bg);
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
evas_object_show(bg);
diff --git a/legacy/elementary/src/bin/test_photo.c b/legacy/elementary/src/bin/test_photo.c
index 5276737d0a..5346b2e319 100644
--- a/legacy/elementary/src/bin/test_photo.c
+++ b/legacy/elementary/src/bin/test_photo.c
@@ -11,7 +11,7 @@ static void drag_start_cb(void *mydata, Evas_Object *obj, void *evdata);
void
test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *sc, *tb, *ph;
+ Evas_Object *win, *sc, *tb, *ph;
int i, j, n;
char buf[PATH_MAX];
const char *img[9] =
@@ -29,15 +29,9 @@ test_photo(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
elm_need_ethumb();
- win = elm_win_add(NULL, "photo", ELM_WIN_BASIC);
- elm_win_title_set(win, "Photo");
+ win = elm_win_util_standard_add("photo", "Photo");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_photocam.c b/legacy/elementary/src/bin/test_photocam.c
index c431a4f0f6..75431eee15 100644
--- a/legacy/elementary/src/bin/test_photocam.c
+++ b/legacy/elementary/src/bin/test_photocam.c
@@ -222,7 +222,7 @@ _photocam_move_resize_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUS
void
test_photocam(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *ph, *tb2, *bt, *box;
+ Evas_Object *win, *ph, *tb2, *bt, *box;
// these were just testing - use the "select photo" browser to select one
const char *img[5] =
{
@@ -233,15 +233,9 @@ test_photocam(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
"/home/raster/t5.jpg" // 466 mpixel
};
- win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC);
- elm_win_title_set(win, "Photocam");
+ win = elm_win_util_standard_add("photocam", "PhotoCam");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
ph = elm_photocam_add(win);
evas_object_size_hint_weight_set(ph, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, ph);
diff --git a/legacy/elementary/src/bin/test_popup.c b/legacy/elementary/src/bin/test_popup.c
index b4effe714f..54ee314a99 100644
--- a/legacy/elementary/src/bin/test_popup.c
+++ b/legacy/elementary/src/bin/test_popup.c
@@ -271,17 +271,11 @@ void
test_popup(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *list;
+ Evas_Object *win, *list;
- win = elm_win_add(NULL, "popup", ELM_WIN_BASIC);
- elm_win_title_set(win, "popup");
+ win = elm_win_util_standard_add("popup", "Popup");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
list = elm_list_add(win);
elm_win_resize_object_add(win, list);
elm_list_mode_set(list, ELM_LIST_LIMIT);
diff --git a/legacy/elementary/src/bin/test_progressbar.c b/legacy/elementary/src/bin/test_progressbar.c
index f459ff1f48..6eed552a31 100644
--- a/legacy/elementary/src/bin/test_progressbar.c
+++ b/legacy/elementary/src/bin/test_progressbar.c
@@ -71,19 +71,13 @@ my_progressbar_destroy(void *data __UNUSED__, Evas_Object *obj, void *event_info
void
test_progressbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2;
+ Evas_Object *win, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "progressbar", ELM_WIN_BASIC);
- elm_win_title_set(win, "Progressbar");
+ win = elm_win_util_standard_add("progressbar", "Progressbar");
evas_object_smart_callback_add(win, "delete,request",
my_progressbar_destroy, NULL);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_radio.c b/legacy/elementary/src/bin/test_radio.c
index 67c61d0a9b..1c822eabd8 100644
--- a/legacy/elementary/src/bin/test_radio.c
+++ b/legacy/elementary/src/bin/test_radio.c
@@ -6,18 +6,12 @@
void
test_radio(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *ic, *rd, *rdg;
+ Evas_Object *win, *bx, *ic, *rd, *rdg;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "radios", ELM_WIN_BASIC);
- elm_win_title_set(win, "Radios");
+ win = elm_win_util_standard_add("radios", "Radios");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_scaling.c b/legacy/elementary/src/bin/test_scaling.c
index 494f91d4c5..9e5f26e6b9 100644
--- a/legacy/elementary/src/bin/test_scaling.c
+++ b/legacy/elementary/src/bin/test_scaling.c
@@ -6,17 +6,11 @@
void
test_scaling(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt;
+ Evas_Object *win, *bx, *bt;
- win = elm_win_add(NULL, "scaling", ELM_WIN_BASIC);
- elm_win_title_set(win, "Scaling");
+ win = elm_win_util_standard_add("scaling", "Scaling");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_scroller.c b/legacy/elementary/src/bin/test_scroller.c
index a838e261a1..295bd6d2e2 100644
--- a/legacy/elementary/src/bin/test_scroller.c
+++ b/legacy/elementary/src/bin/test_scroller.c
@@ -30,7 +30,7 @@ my_bt_go_900_900(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNU
void
test_scroller(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg2, *tb, *tb2, *bg, *sc, *bt;
+ Evas_Object *win, *bg2, *tb, *tb2, *sc, *bt;
int i, j, n;
char buf[PATH_MAX];
const char *img[9] =
@@ -46,15 +46,9 @@ test_scroller(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
"wood_01.jpg"
};
- win = elm_win_add(NULL, "scroller", ELM_WIN_BASIC);
- elm_win_title_set(win, "Scroller");
+ win = elm_win_util_standard_add("scroller", "Scroller");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -138,18 +132,12 @@ click_through(void *data __UNUSED__, Evas_Object *obj, void *event_info __UNUSED
void
test_scroller2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bt, *bx, *bx2, *bg, *sc, *tb, *tb2, *rc;
+ Evas_Object *win, *bt, *bx, *bx2, *sc, *tb, *tb2, *rc;
int i, j;
- win = elm_win_add(NULL, "scroller2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Scroller 2");
+ win = elm_win_util_standard_add("scroller2", "Scroller 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.0);
diff --git a/legacy/elementary/src/bin/test_segment_control.c b/legacy/elementary/src/bin/test_segment_control.c
index ea84de1f0c..48ae35b0fb 100644
--- a/legacy/elementary/src/bin/test_segment_control.c
+++ b/legacy/elementary/src/bin/test_segment_control.c
@@ -7,7 +7,7 @@
void
test_segment_control(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *ic, *ic1, *ic2, *ic3, *ic4, *ic5;
+ Evas_Object *win, *ic, *ic1, *ic2, *ic3, *ic4, *ic5;
Elm_Object_Item *seg_it;
Evas_Object * in_layout;
@@ -20,15 +20,9 @@ test_segment_control(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *e
char buf5[PATH_MAX];
char buf6[PATH_MAX];
- win = elm_win_add(NULL, "segmentcontrol", ELM_WIN_BASIC);
- elm_win_title_set(win, "Segment Control");
+ win = elm_win_util_standard_add("segmentcontrol", "Segment Control");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
in_layout = elm_layout_add( win );
elm_win_resize_object_add(win, in_layout);
snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
diff --git a/legacy/elementary/src/bin/test_separator.c b/legacy/elementary/src/bin/test_separator.c
index da00f059d0..8c1959c084 100644
--- a/legacy/elementary/src/bin/test_separator.c
+++ b/legacy/elementary/src/bin/test_separator.c
@@ -6,17 +6,11 @@
void
test_separator(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx0, *bx, *bt, *sp;
+ Evas_Object *win, *bx0, *bx, *bt, *sp;
- win = elm_win_add(NULL, "separators", ELM_WIN_BASIC);
- elm_win_title_set(win, "Separators");
+ win = elm_win_util_standard_add("separators", "Separators");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx0 = elm_box_add(win);
evas_object_size_hint_weight_set(bx0, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_horizontal_set(bx0, EINA_TRUE);
diff --git a/legacy/elementary/src/bin/test_slider.c b/legacy/elementary/src/bin/test_slider.c
index c4197ba39a..c10e93caa9 100644
--- a/legacy/elementary/src/bin/test_slider.c
+++ b/legacy/elementary/src/bin/test_slider.c
@@ -14,18 +14,12 @@ _change_cb(void *data, Evas_Object *obj, void *event_info __UNUSED__)
void
test_slider(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *sl, *ic, *sl1, *bx2;
+ Evas_Object *win, *bx, *sl, *ic, *sl1, *bx2;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "slider", ELM_WIN_BASIC);
- elm_win_title_set(win, "Slider");
+ win = elm_win_util_standard_add("slider", "Slider");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_slideshow.c b/legacy/elementary/src/bin/test_slideshow.c
index 9c96e88a97..85ae3405c3 100644
--- a/legacy/elementary/src/bin/test_slideshow.c
+++ b/legacy/elementary/src/bin/test_slideshow.c
@@ -110,20 +110,14 @@ _slide_transition(void *data, Evas_Object *obj __UNUSED__, void *event_info __UN
void
test_slideshow(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
+ Evas_Object *win, *notify, *bx, *bt, *hv, *spin;
const Eina_List *l;
const char *transition, *layout;
Elm_Object_Item *slide_last_it;
- win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC);
- elm_win_title_set(win, "Slideshow");
+ win = elm_win_util_standard_add("slideshow", "Slideshow");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
slideshow = elm_slideshow_add(win);
elm_slideshow_loop_set(slideshow, EINA_TRUE);
elm_win_resize_object_add(win, slideshow);
diff --git a/legacy/elementary/src/bin/test_spinner.c b/legacy/elementary/src/bin/test_spinner.c
index e6bc1e7b7f..17e743a0df 100644
--- a/legacy/elementary/src/bin/test_spinner.c
+++ b/legacy/elementary/src/bin/test_spinner.c
@@ -6,17 +6,11 @@
void
test_spinner(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *sp;
+ Evas_Object *win, *bx, *sp;
- win = elm_win_add(NULL, "spinner", ELM_WIN_BASIC);
- elm_win_title_set(win, "Spinner");
+ win = elm_win_util_standard_add("spinner", "Spinner");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_store.c b/legacy/elementary/src/bin/test_store.c
index 3c7bd73c6c..38e04c589a 100644
--- a/legacy/elementary/src/bin/test_store.c
+++ b/legacy/elementary/src/bin/test_store.c
@@ -228,19 +228,12 @@ _st_store_unfetch(void *data __UNUSED__, Elm_Store_Item *sti)
void
test_store(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *gl, *bx;
-
+ Evas_Object *win, *gl, *bx;
Elm_Store *st;
- win = elm_win_add(NULL, "store", ELM_WIN_BASIC);
- elm_win_title_set(win, "Store");
+ win = elm_win_util_standard_add("store", "Store");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_table.c b/legacy/elementary/src/bin/test_table.c
index 4c19c8244f..4f406087ea 100644
--- a/legacy/elementary/src/bin/test_table.c
+++ b/legacy/elementary/src/bin/test_table.c
@@ -6,17 +6,11 @@
void
test_table(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table");
+ win = elm_win_util_standard_add("table", "Table");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_win_resize_object_add(win, tb);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -70,17 +64,11 @@ test_table(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_table2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table Homogeneous");
+ win = elm_win_util_standard_add("table2", "Table Homogeneous");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_table_homogeneous_set(tb, EINA_TRUE);
elm_win_resize_object_add(win, tb);
@@ -146,17 +134,11 @@ my_tb_ch(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
void
test_table3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table 3");
+ win = elm_win_util_standard_add("table3", "Table 3");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_win_resize_object_add(win, tb);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -196,17 +178,11 @@ test_table3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_table4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table4", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table 4");
+ win = elm_win_util_standard_add("table4", "Table 4");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_win_resize_object_add(win, tb);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -246,17 +222,11 @@ test_table4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_table5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table5", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table 5");
+ win = elm_win_util_standard_add("table5", "Table 5");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_table_homogeneous_set(tb, EINA_TRUE);
elm_win_resize_object_add(win, tb);
@@ -304,17 +274,11 @@ test_table5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_table6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table6", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table 6");
+ win = elm_win_util_standard_add("table6", "Table 6");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_table_homogeneous_set(tb, EINA_TRUE);
elm_win_resize_object_add(win, tb);
@@ -369,17 +333,11 @@ test_table6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
void
test_table7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *tb, *bt;
+ Evas_Object *win, *tb, *bt;
- win = elm_win_add(NULL, "table7", ELM_WIN_BASIC);
- elm_win_title_set(win, "Table 7");
+ win = elm_win_util_standard_add("table7", "Table 7");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
elm_table_padding_set(tb, 10, 20);
elm_win_resize_object_add(win, tb);
diff --git a/legacy/elementary/src/bin/test_thumb.c b/legacy/elementary/src/bin/test_thumb.c
index 6f68d18a40..5a6c04a0a4 100644
--- a/legacy/elementary/src/bin/test_thumb.c
+++ b/legacy/elementary/src/bin/test_thumb.c
@@ -6,7 +6,7 @@
void
test_thumb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *sc, *tb, *th;
+ Evas_Object *win, *sc, *tb, *th;
int i, j, n;
char buf[PATH_MAX];
const char *img[11] =
@@ -26,15 +26,9 @@ test_thumb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info
elm_need_ethumb();
- win = elm_win_add(NULL, "thumb", ELM_WIN_BASIC);
- elm_win_title_set(win, "Thumb");
+ win = elm_win_util_standard_add("thumb", "Thumb");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
tb = elm_table_add(win);
evas_object_size_hint_weight_set(tb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_toolbar.c b/legacy/elementary/src/bin/test_toolbar.c
index ecfbd19cb4..e9ffdd1d5c 100644
--- a/legacy/elementary/src/bin/test_toolbar.c
+++ b/legacy/elementary/src/bin/test_toolbar.c
@@ -64,21 +64,15 @@ tb_5(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
void
test_toolbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *tb_it;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar 7");
+ win = elm_win_util_standard_add("toolbar", "Toolbar");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -174,21 +168,15 @@ test_toolbar(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
void
test_toolbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *item;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar 2");
+ win = elm_win_util_standard_add("toolbar2", "Toolbar 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -284,21 +272,15 @@ test_toolbar2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_toolbar3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *tb_it;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar 3");
+ win = elm_win_util_standard_add("toolbar3", "Toolbar 3");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -394,21 +376,15 @@ test_toolbar3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_toolbar4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *tb_it;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar4", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar 4");
+ win = elm_win_util_standard_add("toolbar4", "Toolbar 4");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -504,21 +480,15 @@ test_toolbar4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *tb_it;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar5", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar 5");
+ win = elm_win_util_standard_add("toolbar5", "Toolbar 5");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -618,21 +588,15 @@ test_toolbar5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_toolbar6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *tb_it;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar");
+ win = elm_win_util_standard_add("toolbar6", "Toolbar 6");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
elm_box_horizontal_set(bx, EINA_TRUE);
@@ -729,21 +693,15 @@ test_toolbar6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_toolbar7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *tb_it;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar");
+ win = elm_win_util_standard_add("toolbar7", "Toolbar 7");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -840,21 +798,15 @@ test_toolbar7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_toolbar8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *ph, *sl, *menu;
+ Evas_Object *win, *bx, *tb, *ph, *sl, *menu;
Evas_Object *ph1, *ph2, *ph3, *ph4;
Elm_Object_Item *item;
Elm_Object_Item *menu_it;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "toolbar8", ELM_WIN_BASIC);
- elm_win_title_set(win, "Toolbar 8");
+ win = elm_win_util_standard_add("toolbar8", "Toolbar 8");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_tooltip.c b/legacy/elementary/src/bin/test_tooltip.c
index 1b51e263a8..7d4cb97a2b 100644
--- a/legacy/elementary/src/bin/test_tooltip.c
+++ b/legacy/elementary/src/bin/test_tooltip.c
@@ -371,20 +371,13 @@ test_tooltip(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *tb, *bt, *se, *lst;
+ Evas_Object *win, *bx, *tb, *bt, *se, *lst;
Elm_Object_Item *tb_it;
Elm_Object_Item *lit;
- win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC);
- elm_win_title_set(win, "Tooltip");
+ win = elm_win_util_standard_add("tooltip", "Tooltip");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
@@ -517,7 +510,7 @@ test_tooltip2(void *data __UNUSED__,
Evas_Object *obj __UNUSED__,
void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *grid, *gl;
+ Evas_Object *win, *bx, *grid, *gl;
Elm_Object_Item *glit1, *glit2, *glit3;
static Testitem ti[144];
int i, n;
@@ -535,16 +528,9 @@ test_tooltip2(void *data __UNUSED__,
"wood_01.jpg",
};
- win = elm_win_add(NULL, "tooltip2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Tooltip 2");
+ win = elm_win_util_standard_add("tooltip2", "Tooltip 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND,
EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_transit.c b/legacy/elementary/src/bin/test_transit.c
index 901d911717..7596d019c5 100644
--- a/legacy/elementary/src/bin/test_transit.c
+++ b/legacy/elementary/src/bin/test_transit.c
@@ -236,18 +236,12 @@ _transit_resizable_flip(void *data, Evas_Object *obj, void *event_info __UNUSED_
void
test_transit(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *bt, *ic;
+ Evas_Object *win, *bx, *bt, *ic;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "transit", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit");
+ win = elm_win_util_standard_add("transit", "Transit");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, bx);
@@ -287,17 +281,11 @@ test_transit(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
void
test_transit2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt;
+ Evas_Object *win, *bt;
- win = elm_win_add(NULL, "transit2", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 2");
+ win = elm_win_util_standard_add("transit2", "Transit 2");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Resizing Effect");
evas_object_show(bt);
@@ -313,17 +301,11 @@ test_transit2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *bt2;
+ Evas_Object *win, *bt, *bt2;
- win = elm_win_add(NULL, "transit3", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 3");
+ win = elm_win_util_standard_add("transit3", "Transit 3");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Front Button - Flip Effect");
evas_object_show(bt);
@@ -346,17 +328,11 @@ test_transit3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt;
+ Evas_Object *win, *bt;
- win = elm_win_add(NULL, "transit4", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 4");
+ win = elm_win_util_standard_add("transit4", "Transit 4");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Zoom Effect");
evas_object_resize(bt, 100, 50);
@@ -373,18 +349,12 @@ test_transit4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *bt2, *ic;
+ Evas_Object *win, *bt, *bt2, *ic;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "transit5", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 5");
+ win = elm_win_util_standard_add("transit5", "Transit 5");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
@@ -419,18 +389,12 @@ test_transit5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *bt2, *ic;
+ Evas_Object *win, *bt, *bt2, *ic;
char buf[PATH_MAX];
- win = elm_win_add(NULL, "transit6", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 6");
+ win = elm_win_util_standard_add("transit6","Transit 6");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", elm_app_data_dir_get());
elm_icon_file_set(ic, buf, NULL);
@@ -465,17 +429,11 @@ test_transit6(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *bt2;
+ Evas_Object *win, *bt, *bt2;
- win = elm_win_add(NULL, "transit7", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 7");
+ win = elm_win_util_standard_add("transit7", "Transit 7");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Front Button - Resizable Flip Effect");
evas_object_show(bt);
@@ -498,19 +456,13 @@ test_transit7(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt;
+ Evas_Object *win, *bt;
Elm_Transit *trans;
Elm_Transit_Effect *effect_context;
- win = elm_win_add(NULL, "transit8", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 8");
+ win = elm_win_util_standard_add("transit8", "Transit 8");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Button - Custom Effect");
evas_object_show(bt);
@@ -538,18 +490,12 @@ test_transit8(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
void
test_transit9(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bt, *bt2, *bt3, *bt4;
+ Evas_Object *win, *bt, *bt2, *bt3, *bt4;
Elm_Transit *trans, *trans2, *trans3, *trans4;
- win = elm_win_add(NULL, "transit9", ELM_WIN_BASIC);
- elm_win_title_set(win, "Transit 9");
+ win = elm_win_util_standard_add("transit9", "Transit 9");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bt = elm_button_add(win);
elm_object_text_set(bt, "Chain 1");
evas_object_resize(bt, 100, 100);
diff --git a/legacy/elementary/src/bin/test_weather.c b/legacy/elementary/src/bin/test_weather.c
index 893af3fe22..062a9a0c33 100644
--- a/legacy/elementary/src/bin/test_weather.c
+++ b/legacy/elementary/src/bin/test_weather.c
@@ -55,7 +55,7 @@ _hover_select_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event
void
test_weather(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg;
+ Evas_Object *win;
#ifdef HAVE_ELEMENTARY_EWEATHER
Evas_Object *bx, *bx0, *bt;
EWeather *eweather;
@@ -65,15 +65,9 @@ test_weather(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_inf
unsigned int i;
#endif
- win = elm_win_add(NULL, "weather", ELM_WIN_BASIC);
- elm_win_title_set(win, "Weather");
+ win = elm_win_util_standard_add("weather", "Weather");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
#ifdef HAVE_ELEMENTARY_EWEATHER
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
diff --git a/legacy/elementary/src/bin/test_web.c b/legacy/elementary/src/bin/test_web.c
index 1380637911..32c533f966 100644
--- a/legacy/elementary/src/bin/test_web.c
+++ b/legacy/elementary/src/bin/test_web.c
@@ -90,18 +90,13 @@ static Evas_Object *
_new_window_hook(void *data, Evas_Object *obj __UNUSED__, Eina_Bool js __UNUSED__, const Elm_Web_Window_Features *wf __UNUSED__)
{
Web_Test *wt = data;
- Evas_Object *new_win, *new_web, *bg;
+ Evas_Object *new_win, *new_web;
- new_win = elm_win_add(NULL, "elm-web-test-popup", ELM_WIN_BASIC);
+ new_win = elm_win_util_standard_add("elm-web-test-popup", "Elm Web Test Popup");
elm_win_autodel_set(new_win, EINA_TRUE);
evas_object_resize(new_win, 300, 300);
evas_object_show(new_win);
- bg = elm_bg_add(new_win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(new_win, bg);
- evas_object_show(bg);
-
new_web = elm_web_add(new_win);
elm_web_useragent_set(new_web, wt->user_agent);
evas_object_size_hint_weight_set(new_web, EVAS_HINT_EXPAND,
@@ -338,33 +333,26 @@ test_web(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __
{
const char user_agent_firefox[] = "Mozilla/5.0 (X11; Linux x86_64; rv:9.0.1) Gecko/20100101 Firefox/9.0.1";
const char user_agent_mobile[] = "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3";
- Evas_Object *win, *bg, *bx, *bx2, *bt, *web, *url;
+ Evas_Object *win, *bx, *bx2, *bt, *web, *url;
Web_Test *wt;
elm_need_web();
wt = calloc(1, sizeof(*wt));
- win = elm_win_add(NULL, "web", ELM_WIN_BASIC);
-
if (mobile == EINA_TRUE)
- {
- wt->user_agent = user_agent_mobile;
- elm_win_title_set(win, "Web-mobile");
- }
+ {
+ win = elm_win_util_standard_add("web-mobile", "Web Mobile");
+ wt->user_agent = user_agent_mobile;
+ }
else
- {
- wt->user_agent = user_agent_firefox;
- elm_win_title_set(win, "Web");
- }
+ {
+ win = elm_win_util_standard_add("web", "Web");
+ wt->user_agent = user_agent_firefox;
+ }
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
diff --git a/legacy/elementary/src/bin/test_win_socket.c b/legacy/elementary/src/bin/test_win_socket.c
index d8b87ba062..223bb57d29 100644
--- a/legacy/elementary/src/bin/test_win_socket.c
+++ b/legacy/elementary/src/bin/test_win_socket.c
@@ -144,19 +144,13 @@ fill(Evas_Object *win, Eina_Bool do_bg)
void
test_win_socket(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Evas_Object *win, *bg, *bx, *lb;
+ Evas_Object *win, *bx, *lb;
Evas_Object *win_socket;
/* for socket info window */
- win = elm_win_add(NULL, "label", ELM_WIN_BASIC);
- elm_win_title_set(win, "Label");
+ win = elm_win_util_standard_add("win-socket", "Win Socket");
elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_show(bg);
-
bx = elm_box_add(win);
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, EVAS_HINT_FILL);