aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_transit.c
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/elementary/src/bin/test_transit.c
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/elementary/src/bin/test_transit.c')
-rw-r--r--legacy/elementary/src/bin/test_transit.c90
1 files changed, 18 insertions, 72 deletions
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);