\section{icon\-\_\-example\-\_\-01.\-c}

\begin{DoxyCodeInclude}
\textcolor{comment}{//Compile with:}
\textcolor{comment}{//gcc -g -o icon\_example\_01 icon\_example\_01.c `pkg-config --cflags --libs elementary`}

\textcolor{preprocessor}{#include <Elementary.h>}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *icon;
   \textcolor{keyword}{const} \textcolor{keywordtype}{char} *path, *group, *name;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"icon"}, \textcolor{stringliteral}{"Icon"});
   elm_win_autodel_set(win, EINA\_TRUE);

   icon = elm_icon_add(win);
   elm_icon_order_lookup_set(icon, ELM_ICON_LOOKUP_THEME_FDO);
   elm_icon_standard_set(icon, \textcolor{stringliteral}{"home"});

   path = NULL;
   group = NULL;
   name = NULL;
   elm_image_file_get(icon, &path, &group);
   name = elm_icon_standard_get(icon);
   printf(\textcolor{stringliteral}{"path = %s, group = %s, name = %s\(\backslash\)n"}, path, group, name);

   elm_image_no_scale_set(icon, EINA\_TRUE);
   elm_image_resizable_set(icon, EINA\_FALSE, EINA\_TRUE);
   elm_image_smooth_set(icon, EINA\_FALSE);
   elm_image_fill_outside_set(icon, EINA\_TRUE);

   evas\_object\_size\_hint\_weight\_set(icon, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm_win_resize_object_add(win, icon);
   evas\_object\_show(icon);

   evas\_object\_resize(win, 320, 320);
   evas\_object\_show(win);

   elm_run();
   elm_shutdown();

   \textcolor{keywordflow}{return} 0;
\}
ELM_MAIN()
\end{DoxyCodeInclude}
 