2009-08-13 15:41:43 -07:00
|
|
|
#include <Elementary.h>
|
2009-09-13 21:21:52 -07:00
|
|
|
#ifndef ELM_LIB_QUICKLAUNCH
|
2009-10-06 23:58:37 -07:00
|
|
|
static void
|
|
|
|
icon_clicked(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
|
|
|
printf("clicked!\n");
|
|
|
|
}
|
|
|
|
|
2009-08-13 15:41:43 -07:00
|
|
|
void
|
|
|
|
test_icon(void *data, Evas_Object *obj, void *event_info)
|
|
|
|
{
|
|
|
|
Evas_Object *win, *bg, *ic;
|
|
|
|
char buf[PATH_MAX];
|
|
|
|
|
|
|
|
win = elm_win_add(NULL, "icon-transparent", ELM_WIN_BASIC);
|
|
|
|
elm_win_title_set(win, "Icon Transparent");
|
|
|
|
elm_win_autodel_set(win, 1);
|
|
|
|
elm_win_alpha_set(win, 1);
|
|
|
|
|
|
|
|
ic = elm_icon_add(win);
|
|
|
|
snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
|
|
|
|
elm_icon_file_set(ic, buf, NULL);
|
|
|
|
elm_icon_scale_set(ic, 0, 0);
|
2010-02-28 18:20:41 -08:00
|
|
|
elm_icon_no_scale_set(ic, 1);
|
|
|
|
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_fill_set(ic, 0.5, 0.5);
|
2009-08-13 15:41:43 -07:00
|
|
|
elm_win_resize_object_add(win, ic);
|
|
|
|
evas_object_show(ic);
|
|
|
|
|
2009-10-06 23:58:37 -07:00
|
|
|
evas_object_smart_callback_add(ic, "clicked", icon_clicked, NULL);
|
|
|
|
|
2009-08-13 15:41:43 -07:00
|
|
|
evas_object_show(win);
|
|
|
|
}
|
2009-09-13 21:21:52 -07:00
|
|
|
#endif
|