\hypertarget{ecore_evas_basics_example_8c-example}{}\doxysection{ecore\+\_\+evas\+\_\+basics\+\_\+example.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include\ <unistd.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_stdin\_cb(\textcolor{keywordtype}{void}\ *data\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},\ \mbox{\hyperlink{group__Ecore__FD__Handler__Group_ga225121ed2123da4b52b76aa08d78c220}{Ecore\_Fd\_Handler}}\ *handler\ \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *l;}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ *ee;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ c;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{int}\ ret\ =\ scanf(\textcolor{stringliteral}{"{}\%c"{}},\ \&c);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (ret\ <\ 1)\ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga1ee9db07f9a46a8b20fb83e1c6dbed09}{ECORE\_CALLBACK\_RENEW}};}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (c\ ==\ \textcolor{charliteral}{'h'})}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(\mbox{\hyperlink{group__Ecore__Evas__Group_ga6695029935d93f64f422eaf6e7c85e62}{ecore\_evas\_ecore\_evas\_list\_get}}(),\ l,\ ee)}
\DoxyCodeLine{\ \ \ \ \ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga0c4c806d5873a4528334e398d28940d4}{ecore\_evas\_hide}}(ee);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{else}\ \textcolor{keywordflow}{if}\ (c\ ==\ \textcolor{charliteral}{'s'})}
\DoxyCodeLine{\ \ \ \ \ \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(\mbox{\hyperlink{group__Ecore__Evas__Group_ga6695029935d93f64f422eaf6e7c85e62}{ecore\_evas\_ecore\_evas\_list\_get}}(),\ l,\ ee)}
\DoxyCodeLine{\ \ \ \ \ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga1ee9db07f9a46a8b20fb83e1c6dbed09}{ECORE\_CALLBACK\_RENEW}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static}\ \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_delete(Ecore\_Evas\ *ee)}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ free(\mbox{\hyperlink{group__Ecore__Evas__Group_ga85531b3a6bcbe868d2cf5d32fab99c60}{ecore\_evas\_data\_get}}(ee,\ \textcolor{stringliteral}{"{}key"{}}));}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}}();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{\ \ \ Ecore\_Evas\ *ee;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}\ *canvas;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}}\ *bg;}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{struct__Eina__List}{Eina\_List}}\ *engines,\ *l;}
\DoxyCodeLine{\ \ \ \textcolor{keywordtype}{char}\ *data;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}()\ <=\ 0)}
\DoxyCodeLine{\ \ \ \ \ \textcolor{keywordflow}{return}\ 1;}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ engines\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga2951381165ba9198555d427d1133e3b0}{ecore\_evas\_engines\_get}}();}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Available\ engines:\(\backslash\)n"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(engines,\ l,\ data)}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}\%s\(\backslash\)n"{}},\ data);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga85538b892d449f5c7a056ca4d49e72a7}{ecore\_evas\_engines\_free}}(engines);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ ee\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_gaaa770b6f2f1395f9eeb0e50e26c3f933}{ecore\_evas\_new}}(NULL,\ 0,\ 0,\ 200,\ 200,\ NULL);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga3b2832e0373bbafae2bb7143618535c1}{ecore\_evas\_title\_set}}(ee,\ \textcolor{stringliteral}{"{}Ecore\ Evas\ basics\ Example"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(ee);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ data\ =\ malloc(\textcolor{keyword}{sizeof}(\textcolor{keywordtype}{char})\ *\ 6);}
\DoxyCodeLine{\ \ \ sprintf(data,\ \textcolor{stringliteral}{"{}\%s"{}},\ \textcolor{stringliteral}{"{}hello"{}});}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gaa86c5abd200a02711aced53d27b9ddb2}{ecore\_evas\_data\_set}}(ee,\ \textcolor{stringliteral}{"{}key"{}},\ data);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_ga3d478e975e2101b9b821ef24baf3dd9e}{ecore\_evas\_callback\_delete\_request\_set}}(ee,\ \_on\_delete);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ printf(\textcolor{stringliteral}{"{}Using\ \%s\ engine!\(\backslash\)n"{}},\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga5c976bd066d518849394a378aa75800f}{ecore\_evas\_engine\_name\_get}}(ee));}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ canvas\ =\ \mbox{\hyperlink{group__Ecore__Evas__Group_ga6f8d214cd55bc940d7cc62fecd8dbc06}{ecore\_evas\_get}}(ee);}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{if}\ (\mbox{\hyperlink{group__Ecore__Evas__Group_ga57e076087e153a7494000d2f84d2f58b}{ecore\_evas\_ecore\_evas\_get}}(canvas)\ ==\ ee)}
\DoxyCodeLine{\ \ \ \ \ printf(\textcolor{stringliteral}{"{}Everything\ is\ sane!\(\backslash\)n"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ bg\ =\ \mbox{\hyperlink{group__Evas__Object__Rectangle_ga1b7a9d8e6ce240590c1734da5f3449d2}{evas\_object\_rectangle\_add}}(canvas);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_gab751e9d24c16e74af6f7c08ea5b930c2}{evas\_object\_color\_set}}(bg,\ 0,\ 0,\ 255,\ 255);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group_gacad94595f83580c18908cb3b69b08d1a}{evas\_object\_resize}}(bg,\ 200,\ 200);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga07208fcafd4739de606bc35fff684bf5}{evas\_object\_show}}(bg);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gac35627a5c3a766ee42762dbcc9eb733d}{ecore\_evas\_object\_associate}}(ee,\ bg,\ ECORE\_EVAS\_OBJECT\_ASSOCIATE\_BASE);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__FD__Handler__Group_gaf8483e27f0c9fd4a2a7c97fa5539a55f}{ecore\_main\_fd\_handler\_add}}(STDIN\_FILENO,\ \mbox{\hyperlink{group__Ecore__FD__Handler__Group_ggab5644f471dfa3bd182619601d9b60608a1699f804eccf88e7e169a4a20f1d44e7}{ECORE\_FD\_READ}},\ \_stdin\_cb,\ NULL,\ NULL,\ NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(ee);}
\DoxyCodeLine{\ \ \ \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{}
\DoxyCodeLine{\ \ \ \textcolor{keywordflow}{return}\ 0;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}

\end{DoxyCodeInclude}
 