EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *btn, *layout;
+ Evas_Object *win, *btn, *layout;
char buf[PATH_MAX];
elm_app_info_set(elm_main, "elementary", "examples/layout_example.edj");
- win = elm_win_add(NULL, "layout", ELM_WIN_BASIC);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- elm_win_autodel_set(win, EINA_TRUE);
- 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);
+ win = elm_win_util_standard_add("layout", "Layout Example");
+ elm_win_autodel_set(win, EINA_TRUE);
// Adding layout
layout = elm_layout_add(win);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *bx, *li;
+ Evas_Object *win, *bx, *li;
unsigned int i;
static const char *lbl[] =
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
- elm_win_title_set(win, "List Example");
+ win = elm_win_util_standard_add("list", "List Example");
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);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *li;
+ Evas_Object *win, *li;
unsigned int i;
static const char *lbl[] =
{
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
- elm_win_title_set(win, "List Example");
+ win = elm_win_util_standard_add("list", "List Example");
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);
-
/* default */
li = elm_list_add(win);
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *bx, *hbx, *li, *bt;
+ Evas_Object *win, *bx, *hbx, *li, *bt;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "list", ELM_WIN_BASIC);
- elm_win_title_set(win, "List Items Example");
+ win = elm_win_util_standard_add("list", "List Items Example");
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);
#include <Elocation.h>
#endif
-static Evas_Object *bg, *label, *win;
+static Evas_Object *label, *win;
#ifdef ELM_ELOCATION
static void
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "Elocation example", ELM_WIN_BASIC);
+ win = elm_win_util_standard_add("elocation", "Elocation example");
elm_win_autodel_set(win, EINA_TRUE);
evas_object_resize(win, 600, 480);
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);
-
label = elm_label_add(win);
elm_label_line_wrap_set(label, ELM_WRAP_CHAR);
elm_object_text_set(label, "Getting location ...");
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *map, *box, *bt;
+ Evas_Object *win, *map, *box, *bt;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
- elm_win_title_set(win, "Map Creation Example");
+ win = elm_win_util_standard_add("map", "Map Creation Example");
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);
-
map = elm_map_add(win);
elm_win_resize_object_add(win, map);
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *map, *box, *bt;
+ Evas_Object *win, *map, *box, *bt;
Eina_List *ovls = NULL;
Elm_Map_Overlay *ovl, *city_clas, *country_clas;
char buf[255];
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
- elm_win_title_set(win, "Map Overlay Example");
+ win = elm_win_util_standard_add("map", "Map Overlay Example");
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);
-
map = elm_map_add(win);
elm_win_resize_object_add(win, map);
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *map, *box, *bt, *entry;
+ Evas_Object *win, *map, *box, *bt, *entry;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "map", ELM_WIN_BASIC);
- elm_win_title_set(win, "Map Route Example");
+ win = elm_win_util_standard_add("map", "Map Route Example");
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);
-
map = elm_map_add(win);
elm_win_resize_object_add(win, map);
evas_object_size_hint_weight_set(map, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *bx, *hbx, *tg, *ck, *mb, *tb, *ic;
+ Evas_Object *win, *bx, *hbx, *tg, *ck, *mb, *tb, *ic;
unsigned int i, j;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "mapbuf", ELM_WIN_BASIC);
- elm_win_title_set(win, "Mapbuf Example");
+ win = elm_win_util_standard_add("mapbuf", "Mapbuf Example");
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);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *menu, *button, *rect;
+ Evas_Object *win, *menu, *button, *rect;
Elm_Object_Item *menu_it, *menu_it1;
- 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);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
rect = evas_object_rectangle_add(evas_object_evas_get(win));
elm_win_resize_object_add(win, rect);
evas_object_color_set(rect, 0, 0, 0, 0);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *bx, *panel, *content;
+ Evas_Object *win, *bx, *panel, *content;
- win = elm_win_add(NULL, "panel", ELM_WIN_BASIC);
- elm_win_title_set(win, "Panel");
- elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
+ win = elm_win_util_standard_add("panel", "Panel");
+ elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_FALSE);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *panes, *panes_h, *bt;
+ Evas_Object *win, *panes, *panes_h, *bt;
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "panes", ELM_WIN_BASIC);
- elm_win_title_set(win, "Panes Example");
+ win = elm_win_util_standard_add("panes", "Panes Example");
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_focus_highlight_enabled_set(win, EINA_TRUE);
- evas_object_show(bg);
panes = elm_panes_add(win);
elm_win_resize_object_add(win, panes);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *obj, *photocam;
+ Evas_Object *win, *obj, *photocam;
char buf[PATH_MAX];
elm_app_info_set(elm_main, "elementary", "images/insanely_huge_test_image.jpg");
- win = elm_win_add(NULL, "photocam", ELM_WIN_BASIC);
- elm_win_title_set(win, "Photocam");
- elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- 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);
+ win = elm_win_util_standard_add("photocam", "Photocam");
+ elm_win_autodel_set(win, EINA_TRUE);
photocam = elm_photocam_add(win);
snprintf(buf, sizeof(buf), "%s/images/insanely_huge_test_image.jpg", elm_app_data_dir_get());
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *popup, *content;
+ Evas_Object *win, *popup, *content;
- 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);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- bg = elm_bg_add(win);
- elm_bg_color_set(bg, 128, 128, 128);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
-
content = elm_label_add(win);
elm_object_text_set(content, "<align=center>Content</align>");
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *popup, *btn1, *btn2, *btn3, *icon1;
+ Evas_Object *win, *popup, *btn1, *btn2, *btn3, *icon1;
char buf[256];
elm_app_info_set(elm_main, "elementary", "images/logo_small.png");
- win = elm_win_add(NULL, "popup", ELM_WIN_BASIC);
- elm_win_title_set(win, "Popup");
- elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- 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);
+ win = elm_win_util_standard_add("popup", "Popup");
+ elm_win_autodel_set(win, EINA_TRUE);
popup = elm_popup_add(win);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *popup, *btn1, *btn2, *icon1;
+ Evas_Object *win, *popup, *btn1, *btn2, *icon1;
Elm_Object_Item *popup_it1;
char buf[256];
elm_app_info_set(elm_main, "elementary", "images/logo_small.png");
- win = elm_win_add(NULL, "popup", ELM_WIN_BASIC);
- elm_win_title_set(win, "Popup");
- elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- 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);
+ win = elm_win_util_standard_add("popup", "Popup");
+ elm_win_autodel_set(win, EINA_TRUE);
popup = elm_popup_add(win);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *prefs, *layout;
+ Evas_Object *win, *prefs, *layout;
Elm_Prefs_Data *prefs_data;
- win = elm_win_add(NULL, "Prefs", ELM_WIN_BASIC);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- elm_win_title_set(win, "Prefs Example 03");
- elm_win_autodel_set(win, EINA_TRUE);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_size_hint_min_set(bg, WIDTH, HEIGHT);
- evas_object_size_hint_max_set(bg, WIDTH, HEIGHT);
- evas_object_show(bg);
+ win = elm_win_util_standard_add("Prefs", "Prefs Example 03");
+ elm_win_autodel_set(win, EINA_TRUE);
layout = elm_layout_add(win);
elm_layout_file_set(layout, "prefs_example_03.edj", "prefs_edje");
elm_main(int argc,
char **argv)
{
- Evas_Object *win, *bg, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2, *label;
+ Evas_Object *win, *pb, *bx, *hbx, *bt, *bt_bx, *ic1, *ic2, *label;
char buf[PATH_MAX];
elm_app_info_set(elm_main, "elementary", "images/logo_small.png");
- win = elm_win_add(NULL, "progressbar", ELM_WIN_BASIC);
- elm_win_title_set(win, "Progress bar example");
- evas_object_smart_callback_add(win, "delete,request", _on_done, 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);
+ win = elm_win_util_standard_add("progressbar", "Progress bar example");
+ evas_object_smart_callback_add(win, "delete,request", _on_done, NULL);
bx = elm_box_add(win);
elm_win_resize_object_add(win, bx);
EAPI_MAIN int
elm_main(int argc, char **argv)
{
- Evas_Object *win, *bg, *bx, *radio, *group, *ic;
+ Evas_Object *win, *bx, *radio, *group, *ic;
- win = elm_win_add(NULL, "radio", ELM_WIN_BASIC);
- elm_win_title_set(win, "Radio");
- elm_win_autodel_set(win, EINA_TRUE);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- bg = elm_bg_add(win);
- elm_win_resize_object_add(win, bg);
- evas_object_show(bg);
+ win = elm_win_util_standard_add("radio", "Radio");
+ elm_win_autodel_set(win, EINA_TRUE);
bx = elm_box_add(win);
elm_box_horizontal_set(bx, EINA_TRUE);