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

\begin{DoxyCodeInclude}

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

\textcolor{keywordtype}{void}
item\_select\_cb(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   Evas\_Coord x, y, w, h;
   Eina\_Bool visible;
   Elm_Object_Item *it = event\_info;
   Evas\_Object *track = elm_object_item_track(it);
   evas\_object\_geometry\_get(track, &x, &y, &w, &h);

   visible = evas\_object\_visible\_get(track);
   printf(\textcolor{stringliteral}{"track geometry = (%d %d %d %d) visible(%d)\(\backslash\)n"},
          x, y, w, h, visible);

   elm_object_item_untrack(it);
\}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *li;
   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i;
   \textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *lbl[] =
     \{
        \textcolor{stringliteral}{"Sunday"},
        \textcolor{stringliteral}{"Monday"},
        \textcolor{stringliteral}{"Tuesday"},
        \textcolor{stringliteral}{"Wednesday"},
        \textcolor{stringliteral}{"Thursday"},
        \textcolor{stringliteral}{"Friday"},
        \textcolor{stringliteral}{"Saturday"}
     \};

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"track-example"}, \textcolor{stringliteral}{"Track Example"});
   elm_win_autodel_set(win, EINA\_TRUE);

   li = elm_list_add(win);
   evas\_object\_size\_hint\_weight\_set(li, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm_win_resize_object_add(win, li);

   \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(lbl) / \textcolor{keyword}{sizeof}(lbl[0]); i++)
     elm_list_item_append(li, lbl[i], NULL, NULL, item\_select\_cb, NULL);

   evas\_object\_show(li);
   elm_list_go(li);

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

   elm_run();
   elm_shutdown();

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