-#include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
+#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
void
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);
o = elm_bg_add(win);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+ snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_01.jpg");
elm_bg_file_set(o, buf, NULL);
- elm_flip_content_front_set(fl, o);
+ elm_object_part_content_set(fl, "front", o);
evas_object_show(o);
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_align_set(ly, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_flip_content_back_set(fl, ly);
+ elm_object_part_content_set(fl, "back", ly);
evas_object_show(ly);
- bt = elm_button_add(win);
+ bt = elm_button_add(ly);
elm_object_text_set(bt, "Button 1");
- elm_layout_content_set(ly, "element1", bt);
- evas_object_show(bt);
+ elm_object_part_content_set(ly, "element1", bt);
- bt = elm_button_add(win);
+ bt = elm_button_add(ly);
elm_object_text_set(bt, "Button 2");
- elm_layout_content_set(ly, "element2", bt);
- evas_object_show(bt);
+ elm_object_part_content_set(ly, "element2", bt);
- bt = elm_button_add(win);
+ bt = elm_button_add(ly);
elm_object_text_set(bt, "Button 3");
- elm_layout_content_set(ly, "element3", bt);
- evas_object_show(bt);
+ elm_object_part_content_set(ly, "element3", bt);
evas_object_show(fl);
elm_win_autodel_set(win, EINA_TRUE);
bg = elm_bg_add(win);
- snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+ snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_01.jpg");
elm_bg_file_set(bg, buf, NULL);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_box_pack_end(o, li);
evas_object_show(li);
- elm_flip_content_front_set(fl, o);
+ elm_object_part_content_set(fl, "front", o);
evas_object_show(o);
en = elm_entry_add(win);
elm_entry_scrollable_set(en, EINA_TRUE);
- elm_entry_line_wrap_set(en, EINA_FALSE);
+ elm_entry_line_wrap_set(en, ELM_WRAP_NONE);
snprintf(buf, sizeof(buf),
- "This is an entry widget in this window that<br>"
- "uses markup <b>like this</> for styling and<br>"
- "formatting <em>like this</>, as well as<br>"
- "<a href=X><link>links in the text</></a>, so enter text<br>"
- "in here to edit it. By the way, links are<br>"
- "called <a href=anc-02>Anchors</a> so you will need<br>"
- "to refer to them this way.<br>"
- "<br>"
+ "This is an entry widget in this window that<br/>"
+ "uses markup <b>like this</> for styling and<br/>"
+ "formatting <em>like this</>, as well as<br/>"
+ "<a href=X><link>links in the text</></a>, so enter text<br/>"
+ "in here to edit it. By the way, links are<br/>"
+ "called <a href=anc-02>Anchors</a> so you will need<br/>"
+ "to refer to them this way.<br/>"
+ "<br/>"
"Also you can stick in items with (relsize + ascent): "
"<item relsize=16x16 vsize=ascent href=emoticon/evil-laugh></item>"
" (full) "
"<item relsize=16x16 vsize=full href=emoticon/guilty-smile></item>"
- " (to the left)<br>"
+ " (to the left)<br/>"
"Also (size + ascent): "
"<item size=16x16 vsize=ascent href=emoticon/haha></item>"
" (full) "
"<item size=16x16 vsize=full href=emoticon/happy-panting></item>"
- " (before this)<br>"
+ " (before this)<br/>"
"And as well (absize + ascent): "
"<item absize=64x64 vsize=ascent href=emoticon/knowing-grin></item>"
" or even paths to image files on disk too like: "
"<item absize=96x128 vsize=full href=file://%s/images/sky_01.jpg></item>"
" ... end."
- , PACKAGE_DATA_DIR
+ , elm_app_data_dir_get()
);
- elm_entry_entry_set(en, buf);
+ elm_object_text_set(en, buf);
evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_flip_content_back_set(fl, en);
+ elm_object_part_content_set(fl, "back", en);
evas_object_show(en);
evas_object_show(fl);
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);
elm_object_text_set(fr, "Front");
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_flip_content_front_set(fl, fr);
+ elm_object_part_content_set(fl, "front", fr);
evas_object_show(fr);
fl_f = elm_flip_add(win);
evas_object_size_hint_align_set(fl_f, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fl_f, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, fl_f);
+ elm_object_content_set(fr, fl_f);
evas_object_show(fl_f);
o = elm_bg_add(win);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_01.jpg");
+ snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_01.jpg");
elm_bg_file_set(o, buf, NULL);
- elm_flip_content_front_set(fl_f, o);
+ elm_object_part_content_set(fl_f, "front", o);
evas_object_show(o);
o = elm_bg_add(win);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_02.jpg");
+ snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_02.jpg");
elm_bg_file_set(o, buf, NULL);
- elm_flip_content_back_set(fl_f, o);
+ elm_object_part_content_set(fl_f, "back", o);
evas_object_show(o);
fr = elm_frame_add(win);
elm_object_text_set(fr, "Back");
evas_object_size_hint_align_set(fr, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fr, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_flip_content_back_set(fl, fr);
+ elm_object_part_content_set(fl, "back", fr);
evas_object_show(fr);
fl_b = elm_flip_add(win);
evas_object_size_hint_align_set(fl_b, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(fl_b, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_frame_content_set(fr, fl_b);
+ elm_object_content_set(fr, fl_b);
evas_object_show(fl_b);
o = elm_bg_add(win);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_03.jpg");
+ snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_03.jpg");
elm_bg_file_set(o, buf, NULL);
- elm_flip_content_front_set(fl_b, o);
+ elm_object_part_content_set(fl_b, "front", o);
evas_object_show(o);
o = elm_bg_add(win);
evas_object_size_hint_align_set(o, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_size_hint_weight_set(o, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- snprintf(buf, sizeof(buf), "%s/images/%s", PACKAGE_DATA_DIR, "sky_04.jpg");
+ snprintf(buf, sizeof(buf), "%s/images/%s", elm_app_data_dir_get(), "sky_04.jpg");
elm_bg_file_set(o, buf, NULL);
- elm_flip_content_back_set(fl_b, o);
+ elm_object_part_content_set(fl_b, "back", o);
evas_object_show(o);
bx2 = elm_box_add(win);
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);
evas_object_data_set(win, "fl", fl);
elm_flip_interaction_set(fl, ELM_FLIP_INTERACTION_NONE);
- elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_UP, EINA_TRUE);
- elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_DOWN, EINA_TRUE);
- elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_LEFT, EINA_TRUE);
- elm_flip_interacton_direction_enabled_set(fl, ELM_FLIP_DIRECTION_RIGHT, EINA_TRUE);
- elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_UP, 0.25);
- elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_DOWN, 0.25);
- elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_LEFT, 0.25);
- elm_flip_interacton_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_RIGHT, 0.25);
+ elm_flip_interaction_direction_enabled_set(fl, ELM_FLIP_DIRECTION_UP, EINA_TRUE);
+ elm_flip_interaction_direction_enabled_set(fl, ELM_FLIP_DIRECTION_DOWN, EINA_TRUE);
+ elm_flip_interaction_direction_enabled_set(fl, ELM_FLIP_DIRECTION_LEFT, EINA_TRUE);
+ elm_flip_interaction_direction_enabled_set(fl, ELM_FLIP_DIRECTION_RIGHT, EINA_TRUE);
+ elm_flip_interaction_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_UP, 0.25);
+ elm_flip_interaction_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_DOWN, 0.25);
+ elm_flip_interaction_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_LEFT, 0.25);
+ elm_flip_interaction_direction_hitsize_set(fl, ELM_FLIP_DIRECTION_RIGHT, 0.25);
evas_object_show(fl);
im = evas_object_image_filled_add(evas_object_evas_get(win));
evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
snprintf(buf, sizeof(buf), "%s/images/%s",
- PACKAGE_DATA_DIR, "twofish.jpg");
+ elm_app_data_dir_get(), "twofish.jpg");
evas_object_image_file_set(im, buf, NULL);
- elm_flip_content_front_set(fl, im);
+ elm_object_part_content_set(fl, "front", im);
evas_object_show(im);
#if 0
im = evas_object_image_filled_add(evas_object_evas_get(win));
evas_object_size_hint_weight_set(im, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
snprintf(buf, sizeof(buf), "%s/images/%s",
- PACKAGE_DATA_DIR, "sky_04.jpg");
+ elm_app_data_dir_get(), "sky_04.jpg");
evas_object_image_file_set(im, buf, NULL);
- elm_flip_content_back_set(fl, im);
+ elm_object_part_content_set(fl, "back", im);
evas_object_show(im);
#else
li = elm_list_add(win);
elm_list_item_append(li, "Item 2", NULL, NULL, NULL, NULL);
elm_list_item_append(li, "Item 3 (Which is very long just for testing purposes)", NULL, NULL, NULL, NULL);
elm_list_go(li);
- elm_flip_content_back_set(fl, li);
+ elm_object_part_content_set(fl, "back", li);
evas_object_show(li);
#endif