-#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
+#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
static void
EINA_LIST_FOREACH(mbs, l, mb)
{
if (elm_mapbuf_enabled_get(mb))
- elm_mapbuf_enabled_set(mb, 0);
+ elm_mapbuf_enabled_set(mb, EINA_FALSE);
else
- elm_mapbuf_enabled_set(mb, 1);
+ elm_mapbuf_enabled_set(mb, EINA_TRUE);
}
}
win = elm_win_add(NULL, "launcher", ELM_WIN_BASIC);
elm_win_title_set(win, "Launcher");
- elm_win_autodel_set(win, 1);
+ elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
- snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
elm_bg_file_set(bg, buf, NULL);
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);
- elm_box_homogenous_set(bx, EINA_TRUE);
+ elm_box_homogeneous_set(bx, EINA_TRUE);
elm_box_horizontal_set(bx, EINA_TRUE);
sc = elm_scroller_add(win);
- elm_scroller_bounce_set(sc, 1, 0);
+ elm_scroller_bounce_set(sc, EINA_TRUE, EINA_FALSE);
elm_scroller_policy_set(sc, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_table_pack(tb, pad, 6, 1, 1, 10);
mb = elm_mapbuf_add(win);
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(tb);
for (j = 0; j < 5; j++)
{
ic = elm_icon_add(win);
elm_object_scale_set(ic, 0.5);
- snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", PACKAGE_DATA_DIR, n);
+ snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", elm_app_data_dir_get(), n);
elm_icon_file_set(ic, buf, NULL);
- elm_icon_scale_set(ic, 0, 0);
+ elm_icon_resizable_set(ic, 0, 0);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ic, 0.5, 0.5);
elm_table_pack(tb, ic, 1 + i, 1 + (j * 2), 1, 1);
lb = elm_label_add(win);
elm_object_style_set(lb, "marker");
- elm_label_label_set(lb, names[m]);
+ elm_object_text_set(lb, names[m]);
evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(lb, 0.5, 0.5);
elm_table_pack(tb, lb, 1 + i, 1 + (j * 2) + 1, 1, 1);
elm_win_resize_object_add(win, bx2);
evas_object_show(bx2);
- elm_scroller_content_set(sc, bx);
+ elm_object_content_set(sc, bx);
evas_object_show(bx);
elm_scroller_page_relative_set(sc, 1.0, 1.0);
elm_box_pack_end(bx2, sc);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Map");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "Map");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", mode_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.05, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "A");
- elm_check_state_set(ck, 1);
+ elm_object_text_set(ck, "A");
+ elm_check_state_set(ck, EINA_TRUE);
evas_object_smart_callback_add(ck, "changed", alpha_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.20, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Smo");
- elm_check_state_set(ck, 1);
+ elm_object_text_set(ck, "Smo");
+ elm_check_state_set(ck, EINA_TRUE);
evas_object_smart_callback_add(ck, "changed", smooth_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.40, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "FS");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "FS");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", full_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.5, 0.99);
evas_object_show(ck);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Close");
+ elm_object_text_set(bt, "Close");
evas_object_smart_callback_add(bt, "clicked", close_cb, win);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.95, 0.99);
win = elm_win_add(NULL, "launcher2", ELM_WIN_BASIC);
elm_win_title_set(win, "Launcher 2");
- elm_win_autodel_set(win, 1);
+ elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
- snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", elm_app_data_dir_get());
elm_bg_file_set(bg, buf, NULL);
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);
- elm_box_homogenous_set(bx, EINA_TRUE);
+ elm_box_homogeneous_set(bx, EINA_TRUE);
elm_box_horizontal_set(bx, EINA_TRUE);
for (k = 0 ; k < 8; k++)
{
ly = elm_layout_add(win);
- snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
elm_layout_file_set(ly, buf, "layout");
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Button 1");
- elm_layout_content_set(ly, "element1", bt);
+ elm_object_text_set(bt, "Button 1");
+ elm_object_part_content_set(ly, "element1", bt);
evas_object_show(bt);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Button 2");
- elm_layout_content_set(ly, "element2", bt);
+ elm_object_text_set(bt, "Button 2");
+ elm_object_part_content_set(ly, "element2", bt);
evas_object_show(bt);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Button 3");
- elm_layout_content_set(ly, "element3", bt);
+ elm_object_text_set(bt, "Button 3");
+ elm_object_part_content_set(ly, "element3", bt);
evas_object_show(bt);
mb = elm_mapbuf_add(win);
- elm_mapbuf_content_set(mb, ly);
+ elm_object_content_set(mb, ly);
evas_object_show(ly);
elm_box_pack_end(bx, mb);
evas_object_data_set(win, "mbs", mbs);
sc = elm_scroller_add(win);
- elm_scroller_bounce_set(sc, 1, 0);
+ elm_scroller_bounce_set(sc, EINA_TRUE, EINA_FALSE);
elm_scroller_policy_set(sc, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, sc);
- elm_scroller_content_set(sc, bx);
+ elm_object_content_set(sc, bx);
evas_object_show(bx);
elm_scroller_page_relative_set(sc, 1.0, 1.0);
elm_win_resize_object_add(win, tb2);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Map");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "Map");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", mode_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.05, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "A");
- elm_check_state_set(ck, 1);
+ elm_object_text_set(ck, "A");
+ elm_check_state_set(ck, EINA_TRUE);
evas_object_smart_callback_add(ck, "changed", alpha_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.20, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Smo");
- elm_check_state_set(ck, 1);
+ elm_object_text_set(ck, "Smo");
+ elm_check_state_set(ck, EINA_TRUE);
evas_object_smart_callback_add(ck, "changed", smooth_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.40, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "FS");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "FS");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", full_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.5, 0.99);
evas_object_show(ck);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Close");
+ elm_object_text_set(bt, "Close");
evas_object_smart_callback_add(bt, "clicked", close_cb, win);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.95, 0.99);
EINA_LIST_FOREACH(mbs, l, mb)
{
if (elm_mapbuf_enabled_get(mb))
- elm_mapbuf_enabled_set(mb, 0);
+ elm_mapbuf_enabled_set(mb, EINA_FALSE);
else
elm_mapbuf_enabled_set(mb, 1);
}
slx = (int)(long)evas_object_data_get(data, "slx");
sly = (int)(long)evas_object_data_get(data, "sly");
snprintf(buf, sizeof(buf), "slot.%i.%i", slx, sly);
- elm_layout_content_unset(ly, buf);
+ elm_object_part_content_unset(ly, buf);
edje_object_signal_emit(elm_layout_edje_get(ly2), "drag", "app");
return EINA_FALSE;
}
slx = (int)(long)evas_object_data_get(obj, "slx");
sly = (int)(long)evas_object_data_get(obj, "sly");
snprintf(buf, sizeof(buf), "slot.%i.%i", slx, sly);
- elm_layout_content_set(ly, buf, ly2);
+ elm_object_part_content_set(ly, buf, ly2);
list = (Eina_List *)evas_object_data_get
(elm_object_top_widget_get(obj), "mbs");
EINA_LIST_FOREACH(list, l, mb)
win = elm_win_add(NULL, "launcher", ELM_WIN_BASIC);
elm_win_title_set(win, "Launcher");
- elm_win_autodel_set(win, 1);
+ elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
- snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", elm_app_data_dir_get());
elm_bg_file_set(bg, buf, NULL);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_win_resize_object_add(win, 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);
- elm_box_homogenous_set(bx, EINA_TRUE);
+ elm_box_homogeneous_set(bx, EINA_TRUE);
elm_box_horizontal_set(bx, EINA_TRUE);
sc = elm_scroller_add(win);
- elm_scroller_bounce_set(sc, 1, 0);
+ elm_scroller_bounce_set(sc, EINA_TRUE, EINA_FALSE);
elm_scroller_policy_set(sc, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
mb = elm_mapbuf_add(win);
mbs = eina_list_append(mbs, mb);
- elm_mapbuf_content_set(mb, tb);
+ elm_object_content_set(mb, tb);
evas_object_show(tb);
elm_box_pack_end(bx, mb);
evas_object_show(mb);
ly = elm_layout_add(win);
- snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
elm_layout_file_set(ly, buf, "launcher_page");
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
for (i = 0; i < 4; i++)
{
ly2 = elm_layout_add(win);
- snprintf(buf, sizeof(buf), "%s/objects/test.edj", PACKAGE_DATA_DIR);
+ snprintf(buf, sizeof(buf), "%s/objects/test.edj", elm_app_data_dir_get());
elm_layout_file_set(ly2, buf, "launcher_icon");
evas_object_size_hint_weight_set(ly2, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ly2, EVAS_HINT_FILL, EVAS_HINT_FILL);
ic = elm_icon_add(win);
elm_object_scale_set(ic, 0.5);
- snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", PACKAGE_DATA_DIR, n);
+ snprintf(buf, sizeof(buf), "%s/images/icon_%02i.png", elm_app_data_dir_get(), n);
elm_icon_file_set(ic, buf, NULL);
- elm_icon_scale_set(ic, 0, 0);
+ elm_icon_resizable_set(ic, 0, 0);
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ic, 0.5, 0.5);
- elm_layout_content_set(ly2, "slot", ic);
+ elm_object_part_content_set(ly2, "slot", ic);
evas_object_show(ic);
evas_object_event_callback_add(ic, EVAS_CALLBACK_DEL, l3_ic_del_cb, ic);
evas_object_data_set(ic, "sly", (void *)(long)(j));
snprintf(buf, sizeof(buf), "slot.%i.%i", i, j);
- elm_layout_content_set(ly, buf, ly2);
+ elm_object_part_content_set(ly, buf, ly2);
evas_object_show(ly2);
n++; if (n > 23) n = 0;
elm_win_resize_object_add(win, bx2);
evas_object_show(bx2);
- elm_scroller_content_set(sc, bx);
+ elm_object_content_set(sc, bx);
evas_object_show(bx);
elm_scroller_page_relative_set(sc, 1.0, 1.0);
elm_box_pack_end(bx2, sc);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Map");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "Map");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", l3_mode_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.05, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "A");
+ elm_object_text_set(ck, "A");
elm_check_state_set(ck, 1);
evas_object_smart_callback_add(ck, "changed", l3_alpha_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Smo");
+ elm_object_text_set(ck, "Smo");
elm_check_state_set(ck, 1);
evas_object_smart_callback_add(ck, "changed", l3_smooth_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "FS");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "FS");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", l3_full_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.5, 0.99);
evas_object_show(ck);
ck = elm_check_add(win);
- elm_check_label_set(ck, "Hid");
- elm_check_state_set(ck, 0);
+ elm_object_text_set(ck, "Hid");
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_smart_callback_add(ck, "changed", l3_hidden_cb, win);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(ck, 0.5, 0.99);
evas_object_show(ck);
bt = elm_button_add(win);
- elm_button_label_set(bt, "Close");
+ elm_object_text_set(bt, "Close");
evas_object_smart_callback_add(bt, "clicked", l3_close_cb, win);
evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(bt, 0.95, 0.99);