2 //gcc -g `pkg-config --cflags --libs elementary` image_example_01.c -o image_example_01
4 #include <Elementary.h>
8 elm_main(int argc, char **argv)
10 Evas_Object *win, *bg, *icon;
11 const char *path, *group, *name;
13 win = elm_win_add(NULL, "icon", ELM_WIN_BASIC);
14 elm_win_title_set(win, "Icon");
15 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
16 elm_win_autodel_set(win, EINA_TRUE);
19 elm_bg_color_set(bg, 255,255 ,255);
20 evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
21 elm_win_resize_object_add(win, bg);
24 icon = elm_icon_add(win);
25 elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
26 elm_icon_standard_set(icon, "home");
31 elm_icon_file_get(icon, &path, &group);
32 name = elm_icon_standard_get(icon);
33 printf("path = %s, group = %s, name = %s\n", path, group, name);
35 elm_icon_no_scale_set(icon, EINA_TRUE);
36 elm_icon_resizable_set(icon, EINA_FALSE, EINA_TRUE);
37 elm_icon_smooth_set(icon, EINA_FALSE);
38 elm_icon_fill_outside_set(icon, EINA_TRUE);
40 evas_object_size_hint_weight_set(icon, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
41 elm_win_resize_object_add(win, icon);
42 evas_object_show(icon);
44 evas_object_size_hint_min_set(bg, 160, 160);
45 evas_object_size_hint_max_set(bg, 640, 640);
46 evas_object_resize(win, 320, 320);
47 evas_object_show(win);