\section{notify\+\_\+example\+\_\+01.\+c}

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

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

\textcolor{keyword}{static} \textcolor{keywordtype}{void} \_hide(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info);

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
   Evas\_Object *win, *bx, *notify, *content;

   win = elm_win_util_standard_add(\textcolor{stringliteral}{"notify"}, \textcolor{stringliteral}{"Notify"});
   elm_win_autodel_set(win, EINA\_TRUE);
   elm_policy_set(ELM\_POLICY\_QUIT, ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED);

   bx = elm_box_add(win);
   elm_box_horizontal_set(bx, EINA\_FALSE);
   evas\_object\_size\_hint\_weight\_set(bx, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   elm_win_resize_object_add(win, bx);
   evas\_object\_show(bx);

   content = elm_label_add(win);
   elm\_object\_text\_set(content, \textcolor{stringliteral}{"default"});
   evas\_object\_show(content);

   notify = elm_notify_add(win);
   elm_notify_allow_events_set(notify, EINA\_FALSE);
   elm_notify_timeout_set(notify, 5);
   elm\_object\_content\_set(notify, content);
   evas\_object\_size\_hint\_weight\_set(notify, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_show(notify);
   elm_box_pack_end(bx, notify);
   evas\_object\_smart\_callback\_add(notify, \textcolor{stringliteral}{"block,clicked"}, \_hide, NULL);

   content = elm_label_add(win);
   elm\_object\_text\_set(content, \textcolor{stringliteral}{"bottom"});
   evas\_object\_show(content);

   notify = elm_notify_add(win);
   elm_notify_align_set(notify, 0.5, 1.0);
   elm\_object\_content\_set(notify, content);
   evas\_object\_size\_hint\_weight\_set(notify, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_show(notify);
   elm_box_pack_end(bx, notify);

   content = elm_label_add(win);
   elm\_object\_text\_set(content, \textcolor{stringliteral}{"center"});
   evas\_object\_show(content);

   notify = elm_notify_add(win);
   elm_notify_align_set(notify, 0.5, 0.5);
   elm\_object\_content\_set(notify, content);
   evas\_object\_size\_hint\_weight\_set(notify, EVAS\_HINT\_EXPAND, EVAS\_HINT\_EXPAND);
   evas\_object\_show(notify);
   elm_box_pack_end(bx, notify);

   evas\_object\_resize(win, 100, 200);
   evas\_object\_show(win);

   elm_run();

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

static \textcolor{keywordtype}{void}
\_hide(\textcolor{keywordtype}{void} *data, Evas\_Object *obj, \textcolor{keywordtype}{void} *event\_info)
\{
   evas\_object\_hide(obj);
\}
\end{DoxyCodeInclude}
 