forked from enlightenment/efl
examples: refactoring. use elm_win_util_standard_add() for normal cases. season 4.
now it's done :)
This commit is contained in:
parent
d372445a1b
commit
1e6f58bd01
|
@ -106,17 +106,12 @@ static const char *text = "Lorem ipsum dolor sit amet, consectetur adipiscing el
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *label, *scroller;
|
Evas_Object *win, *label, *scroller;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "scroller", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Scroller");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
win = elm_win_util_standard_add("scroller", "Scroller");
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
label = elm_label_add(win);
|
label = elm_label_add(win);
|
||||||
elm_object_text_set(label, text);
|
elm_object_text_set(label, text);
|
||||||
|
|
|
@ -14,21 +14,15 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *sc, *ic;
|
Evas_Object *win, *sc, *ic;
|
||||||
Elm_Object_Item *seg_it;
|
Elm_Object_Item *seg_it;
|
||||||
int count, idx;
|
int count, idx;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "segment_control", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("segment_control", "Segment Control Example");
|
||||||
elm_win_title_set(win, "Segment Control Example");
|
|
||||||
elm_win_autodel_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);
|
|
||||||
|
|
||||||
sc = elm_segment_control_add(win);
|
sc = elm_segment_control_add(win);
|
||||||
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, sc);
|
elm_win_resize_object_add(win, sc);
|
||||||
|
|
|
@ -6,16 +6,12 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *rect, *separator;
|
Evas_Object *win, *bx, *rect, *separator;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "separator", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Separator");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
win = elm_win_util_standard_add("separator", "Separator");
|
||||||
elm_win_resize_object_add(win, bg);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
bx = elm_box_add(win);
|
bx = elm_box_add(win);
|
||||||
elm_box_horizontal_set(bx, EINA_TRUE);
|
elm_box_horizontal_set(bx, EINA_TRUE);
|
||||||
|
|
|
@ -42,19 +42,13 @@ _indicator_free(char *str)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *sl, *ic;
|
Evas_Object *win, *bx, *sl, *ic;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "slider", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("slider", "Slider Example");
|
||||||
elm_win_title_set(win, "Slider Example");
|
|
||||||
elm_win_autodel_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);
|
bx = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
|
|
|
@ -161,7 +161,7 @@ EAPI_MAIN int
|
||||||
elm_main(int argc,
|
elm_main(int argc,
|
||||||
char **argv)
|
char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
|
Evas_Object *win, *notify, *bx, *bt, *hv, *spin;
|
||||||
Elm_Object_Item *slide_first, *slide_last, *slide_it;
|
Elm_Object_Item *slide_first, *slide_last, *slide_it;
|
||||||
const char *transition, *layout;
|
const char *transition, *layout;
|
||||||
const Eina_List *l, *list;
|
const Eina_List *l, *list;
|
||||||
|
@ -181,18 +181,11 @@ elm_main(int argc,
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "slideshow", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("slideshow", "Slideshow example");
|
||||||
elm_win_title_set(win, "Slideshow example");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
|
||||||
evas_object_resize(win, 600, 400);
|
evas_object_resize(win, 600, 400);
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
slideshow = elm_slideshow_add(win);
|
slideshow = elm_slideshow_add(win);
|
||||||
elm_slideshow_loop_set(slideshow, EINA_TRUE);
|
elm_slideshow_loop_set(slideshow, EINA_TRUE);
|
||||||
evas_object_size_hint_weight_set(slideshow,
|
evas_object_size_hint_weight_set(slideshow,
|
||||||
|
|
|
@ -26,19 +26,13 @@ _delay_changed_cb(void *data, Evas_Object *obj, void *event_info)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *sp;
|
Evas_Object *win, *bx, *sp;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "spinner", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("spinner", "Spinner Example");
|
||||||
elm_win_title_set(win, "Spinner Example");
|
|
||||||
elm_win_autodel_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);
|
bx = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
|
|
|
@ -6,16 +6,12 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *label, *table;
|
Evas_Object *win, *label, *table;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "table", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Table");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
win = elm_win_util_standard_add("table", "Table");
|
||||||
elm_win_resize_object_add(win, bg);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
table = elm_table_add(win);
|
table = elm_table_add(win);
|
||||||
elm_win_resize_object_add(win, table);
|
elm_win_resize_object_add(win, table);
|
||||||
|
|
|
@ -6,16 +6,12 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *rect, *table;
|
Evas_Object *win, *rect, *table;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "table", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Table");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
win = elm_win_util_standard_add("table", "Table");
|
||||||
elm_win_resize_object_add(win, bg);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
table = elm_table_add(win);
|
table = elm_table_add(win);
|
||||||
elm_win_resize_object_add(win, table);
|
elm_win_resize_object_add(win, table);
|
||||||
|
|
|
@ -37,22 +37,17 @@ btn_style_click_cb(void *data, Evas_Object *btn, void *ev)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char *argv[])
|
elm_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *box, *btn;
|
Evas_Object *win, *box, *btn;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
elm_theme_extension_add(NULL, "./theme_example.edj");
|
elm_theme_extension_add(NULL, "./theme_example.edj");
|
||||||
|
|
||||||
win = elm_win_add(NULL, "Theme example", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("theme", "Theme example");
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
evas_object_resize(win, 300, 320);
|
evas_object_resize(win, 300, 320);
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
box = elm_box_add(win);
|
box = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, box);
|
elm_win_resize_object_add(win, box);
|
||||||
|
|
|
@ -17,22 +17,17 @@ _btn_clicked_cb(void *data, Evas_Object *obj, void *ev)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char *argv[])
|
elm_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *box, *btn;
|
Evas_Object *win, *box, *btn;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
elm_theme_overlay_add(NULL, "./theme_example.edj");
|
elm_theme_overlay_add(NULL, "./theme_example.edj");
|
||||||
|
|
||||||
win = elm_win_add(NULL, "Theme example", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("theme", "Theme example");
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
evas_object_resize(win, 300, 320);
|
evas_object_resize(win, 300, 320);
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
box = elm_box_add(win);
|
box = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, box);
|
elm_win_resize_object_add(win, box);
|
||||||
|
|
|
@ -24,7 +24,7 @@ _generation_error_cb(void *data, Evas_Object *o, void *event_info)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg;
|
Evas_Object *win;
|
||||||
Evas_Object *thumb;
|
Evas_Object *thumb;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
#ifdef ELM_ETHUMB
|
#ifdef ELM_ETHUMB
|
||||||
|
@ -34,15 +34,10 @@ elm_main(int argc, char **argv)
|
||||||
elm_need_ethumb();
|
elm_need_ethumb();
|
||||||
|
|
||||||
elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg");
|
elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg");
|
||||||
win = elm_win_add(NULL, "thumb", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Thumbnailer");
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
|
||||||
|
|
||||||
bg = elm_bg_add(win);
|
win = elm_win_util_standard_add("thumb", "Thumbnailer");
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
#ifdef ELM_ETHUMB
|
#ifdef ELM_ETHUMB
|
||||||
client = elm_thumb_ethumb_client_get();
|
client = elm_thumb_ethumb_client_get();
|
||||||
|
|
|
@ -36,20 +36,14 @@ _item_3_pressed(void *data, Evas_Object *obj, void *event_info)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *tb, *bt;
|
Evas_Object *win, *bx, *tb, *bt;
|
||||||
Elm_Object_Item *tb_it;
|
Elm_Object_Item *tb_it;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("toolbar", "Toolbar Example");
|
||||||
elm_win_title_set(win, "Toolbar Example");
|
|
||||||
elm_win_autodel_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);
|
bx = elm_box_add(win);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
|
@ -22,20 +22,14 @@ _item_pressed(void *data, Evas_Object *obj, void *event_info)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *tb, *bt;
|
Evas_Object *win, *bx, *tb, *bt;
|
||||||
Elm_Object_Item *tb_it;
|
Elm_Object_Item *tb_it;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("toolbar", "Toolbar Example");
|
||||||
elm_win_title_set(win, "Toolbar Example");
|
|
||||||
elm_win_autodel_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);
|
bx = elm_box_add(win);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
|
@ -14,20 +14,14 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bx, *tb, *bt, *menu;
|
Evas_Object *win, *bx, *tb, *bt, *menu;
|
||||||
Elm_Object_Item *tb_it;
|
Elm_Object_Item *tb_it;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "toolbar", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("toolbar", "Toolbar Example");
|
||||||
elm_win_title_set(win, "Toolbar Example");
|
|
||||||
elm_win_autodel_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);
|
bx = elm_box_add(win);
|
||||||
elm_win_resize_object_add(win, bx);
|
elm_win_resize_object_add(win, bx);
|
||||||
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
|
@ -6,22 +6,15 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bt;
|
Evas_Object *win, *bt;
|
||||||
Elm_Transit *trans;
|
Elm_Transit *trans;
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "transit-basic", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("transit-basic", "Transit - Basic");
|
||||||
elm_win_title_set(win, "Transit - Basic");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
|
||||||
evas_object_resize(win, 400, 400);
|
evas_object_resize(win, 400, 400);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Resizing Effect");
|
elm_object_text_set(bt, "Resizing Effect");
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
|
|
|
@ -6,21 +6,16 @@
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *bt, *bt2, *bt3, *bt4;
|
Evas_Object *win, *bt, *bt2, *bt3, *bt4;
|
||||||
Elm_Transit *trans, *trans2, *trans3, *trans4;
|
Elm_Transit *trans, *trans2, *trans3, *trans4;
|
||||||
|
|
||||||
win = elm_win_add(NULL, "transit9", ELM_WIN_BASIC);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
elm_win_title_set(win, "Transit 9");
|
|
||||||
|
win = elm_win_util_standard_add("transit9", "Transit 9");
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
evas_object_resize(win, 400, 400);
|
evas_object_resize(win, 400, 400);
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
elm_object_text_set(bt, "Chain 1");
|
elm_object_text_set(bt, "Chain 1");
|
||||||
evas_object_resize(bt, 100, 100);
|
evas_object_resize(bt, 100, 100);
|
||||||
|
|
|
@ -166,7 +166,7 @@ _cb_tween_changed(void *data, Evas_Object *obj, void *event)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *obj, *icon, *box, *vbox, *vbox2, *hbox, *btn;
|
Evas_Object *win, *obj, *icon, *box, *vbox, *vbox2, *hbox, *btn;
|
||||||
Evas_Object *cbox, *dummy, *spinner;
|
Evas_Object *cbox, *dummy, *spinner;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
int i;
|
int i;
|
||||||
|
@ -183,17 +183,9 @@ elm_main(int argc, char **argv)
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
/* add a window */
|
/* add a window */
|
||||||
win = elm_win_add(NULL, "transit", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("transit", "Transit Example");
|
||||||
elm_win_title_set(win, "Transit Example");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
|
||||||
/* add a scalable white background to this window */
|
|
||||||
bg = elm_bg_add(win);
|
|
||||||
elm_bg_color_set(bg, 255, 255, 255);
|
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
/* add a vertical box that will hold everything */
|
/* add a vertical box that will hold everything */
|
||||||
box = elm_box_add(win);
|
box = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
|
|
@ -81,7 +81,7 @@ _transit_start(void *data, Evas_Object *o, void *event_info)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char **argv)
|
elm_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *obj, *icon, *box, *vbox, *btn, *dummy;
|
Evas_Object *win, *obj, *icon, *box, *vbox, *btn, *dummy;
|
||||||
Eina_List *objs = NULL;
|
Eina_List *objs = NULL;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
int i;
|
int i;
|
||||||
|
@ -90,17 +90,9 @@ elm_main(int argc, char **argv)
|
||||||
elm_app_info_set(elm_main, "elementary", "images/icon_07.png");
|
elm_app_info_set(elm_main, "elementary", "images/icon_07.png");
|
||||||
|
|
||||||
/* add a window */
|
/* add a window */
|
||||||
win = elm_win_add(NULL, "transit", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("transit", "Transit Example");
|
||||||
elm_win_title_set(win, "Transit Example");
|
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
|
||||||
/* add a scalable white background to this window */
|
|
||||||
bg = elm_bg_add(win);
|
|
||||||
elm_bg_color_set(bg, 255, 255, 255);
|
|
||||||
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
||||||
elm_win_resize_object_add(win, bg);
|
|
||||||
evas_object_show(bg);
|
|
||||||
|
|
||||||
box = elm_box_add(win);
|
box = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
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);
|
evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||||
|
|
|
@ -462,7 +462,7 @@ default_content_set(Evas_Object *web)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char *argv[])
|
elm_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Evas_Object *win, *bg, *box, *box2, *btn, *ic, *url_bar, *naviframe, *tabs, *web;
|
Evas_Object *win, *box, *box2, *btn, *ic, *url_bar, *naviframe, *tabs, *web;
|
||||||
Evas *e;
|
Evas *e;
|
||||||
Evas_Modifier_Mask ctrl_mask;
|
Evas_Modifier_Mask ctrl_mask;
|
||||||
App_Data *ad;
|
App_Data *ad;
|
||||||
|
@ -475,7 +475,7 @@ elm_main(int argc, char *argv[])
|
||||||
|
|
||||||
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
||||||
|
|
||||||
win = elm_win_add(NULL, "example-web", ELM_WIN_BASIC);
|
win = elm_win_util_standard_add("example-web", "Web Example");
|
||||||
elm_win_autodel_set(win, EINA_TRUE);
|
elm_win_autodel_set(win, EINA_TRUE);
|
||||||
|
|
||||||
e = evas_object_evas_get(win);
|
e = evas_object_evas_get(win);
|
||||||
|
@ -489,11 +489,6 @@ elm_main(int argc, char *argv[])
|
||||||
_win_search_trigger_cb, ad);
|
_win_search_trigger_cb, ad);
|
||||||
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _win_free_cb, ad);
|
evas_object_event_callback_add(win, EVAS_CALLBACK_FREE, _win_free_cb, ad);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
box = elm_box_add(win);
|
box = elm_box_add(win);
|
||||||
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win, box);
|
elm_win_resize_object_add(win, box);
|
||||||
|
|
|
@ -171,12 +171,12 @@ _win_focused_cb(void *data, Evas_Object *obj, void *event)
|
||||||
EAPI_MAIN int
|
EAPI_MAIN int
|
||||||
elm_main(int argc, char *argv[])
|
elm_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
Evas_Object *win, *win2, *bg, *bigbox, *box, *btn, *o;
|
Evas_Object *win, *win2, *bigbox, *box, *btn, *o;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
|
|
||||||
elm_app_info_set(elm_main, "elementary", "images/logo.png");
|
elm_app_info_set(elm_main, "elementary", "images/logo.png");
|
||||||
win = elm_win_add(NULL, "win-example", ELM_WIN_BASIC);
|
|
||||||
elm_win_title_set(win, "Elm_Win Example");
|
win = elm_win_util_standard_add("win-example", "Elm_Win Example");
|
||||||
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
|
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
|
||||||
evas_object_resize(win, 400, 400);
|
evas_object_resize(win, 400, 400);
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
|
@ -186,11 +186,6 @@ elm_main(int argc, char *argv[])
|
||||||
evas_object_smart_callback_add(win, "delete,request", _main_win_del_cb,
|
evas_object_smart_callback_add(win, "delete,request", _main_win_del_cb,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
bigbox = elm_box_add(win);
|
bigbox = elm_box_add(win);
|
||||||
elm_box_horizontal_set(bigbox, EINA_TRUE);
|
elm_box_horizontal_set(bigbox, EINA_TRUE);
|
||||||
evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
|
@ -251,20 +246,14 @@ elm_main(int argc, char *argv[])
|
||||||
elm_box_pack_end(bigbox, box);
|
elm_box_pack_end(bigbox, box);
|
||||||
evas_object_show(box);
|
evas_object_show(box);
|
||||||
|
|
||||||
win2 = elm_win_add(NULL, "sub-win-example2", ELM_WIN_BASIC);
|
win2 = elm_win_util_standard_add("sub-win-example2", "Non-managed window");
|
||||||
elm_win_autodel_set(win2, EINA_TRUE);
|
elm_win_autodel_set(win2, EINA_TRUE);
|
||||||
elm_win_title_set(win2, "Non-managed window");
|
|
||||||
elm_win_override_set(win2, EINA_TRUE);
|
elm_win_override_set(win2, EINA_TRUE);
|
||||||
evas_object_show(win2);
|
evas_object_show(win2);
|
||||||
|
|
||||||
evas_object_smart_callback_add(win2, "focus,in", _win_focused_cb,
|
evas_object_smart_callback_add(win2, "focus,in", _win_focused_cb,
|
||||||
"override");
|
"override");
|
||||||
|
|
||||||
o = elm_bg_add(win2);
|
|
||||||
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
||||||
elm_win_resize_object_add(win2, o);
|
|
||||||
evas_object_show(o);
|
|
||||||
|
|
||||||
bigbox = elm_box_add(win2);
|
bigbox = elm_box_add(win2);
|
||||||
evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
evas_object_size_hint_weight_set(bigbox, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
||||||
elm_win_resize_object_add(win2, bigbox);
|
elm_win_resize_object_add(win2, bigbox);
|
||||||
|
|
Loading…
Reference in New Issue