bg_example_02.c
//Compile with:
//gcc -o bg_example_02 bg_example_02.c -g `pkg-config --cflags --libs elementary`
//where directory is the a path where images/plant_01.jpg can be found.
#include <Elementary.h>
EAPI_MAIN int
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
Evas_Object *win, *bg;
char buf[PATH_MAX];
elm_app_info_set(elm_main, "elementary", "images/plant_01.jpg");
win = elm_win_add(NULL, "bg-image", ELM_WIN_BASIC);
elm_win_title_set(win, "Bg Image");
bg = elm_bg_add(win);
elm_bg_load_size_set(bg, 20, 20);
snprintf(buf, sizeof(buf), "%s/images/plant_01.jpg", elm_app_data_dir_get());
elm_bg_file_set(bg, buf, NULL);
evas_object_resize(win, 320, 320);
return 0;
}