We can create an icon and set it as a “Home” standard icon.
Evas_Object *icon = elm_icon_add(parent); elm_icon_standard_set(icon, "Home");
Default images provided by Elementary's default theme are described below.
standard (since 1.13) | toolbar | menu | media player |
---|---|---|---|
“folder” | “home” | “menu/home” | “media_player/forward“ |
“user-home” | “close” | “menu/close” | “media_player/info“ |
“user-trash” | “apps” | “menu/apps” | “media_player/next“ |
“view-close” | “arrow_up” | “menu/arrow_up” | “media_player/pause“ |
“view-refresh” | “arrow_down” | “menu/arrow_down” | “media_player/play“ |
“window-close” | “arrow_left” | “menu/arrow_left” | “media_player/prev“ |
“document-close” | “arrow_right“ | “menu/arrow_right“ | “media_player/rewind“ |
“document-edit” | “chat” | “menu/chat” | “media_player/stop“ |
“dialog-info” | “clock” | “menu/clock” | |
“dialog-close” | “delete” | “menu/delete” | |
“arrow-up” | “edit” | “menu/edit” | |
“arrow-down” | “refresh” | “menu/refresh” | |
“arrow-left” | “folder” | “menu/folder” | |
“arrow-right” | “file” | “menu/file” | |
“arrow-up-left” | |||
“arrow-up-right” | |||
“arrow-down-left” | |||
“arrow-down-right” | |||
“edit-delete” | |||
“application-chat” | |||
“application-clock” | |||
“media-seek-forward” | |||
“media-seek-backward” | |||
“media-skip-forward” | |||
“media-skip-backward” | |||
“media-playback-pause” | |||
“media-playback-start” | |||
“media-playback-stop” | |||
“media-eject” | |||
“audio-volume” | |||
“audio-volume-muted” |
We can change the image by using an image in the filesystem (for example, /tmp/Home.png),
elm_image_file_set(icon, "/tmp/Home.png", NULL);
or a group in an Edje file (for example, /tmp/Home.edj).
elm_image_file_set(icon, "/tmp/Home.edj", "elm/icon/Home/default");
A thumbnail can be generated and cached for future use. (For this, you need the Ethumb library support.)
elm_icon_thumb_set(icon, "/tmp/Home.png", NULL);
This function sets the file in the icon and enables the use of a cached thumbnail if it already exists. Otherwise, it creates a new thumbnail and caches it for future use.
The icon widget emits the following signals:
“thumb,done”
- elm_icon_thumb_set() is completed with success.“thumb,error”
- elm_icon_thumb_set() fails.In both cases, event_info is NULL;