\hypertarget{evas-init-shutdown_8c-example}{}\doxysection{evas-\/init-\/shutdown.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Evas.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <errno.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *engine\_list, *l;}
\DoxyCodeLine{   \textcolor{keywordtype}{char} *engine\_name;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Initialize Evas.  This will startup other dependencies such as}}
\DoxyCodeLine{\textcolor{comment}{    * eina, eet, ecore, etc. and initializes various internal things}}
\DoxyCodeLine{\textcolor{comment}{    * (threads, filters, etc.) */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Main__Group_ga65b3f060b6dd9e488afd0b8cbe101869}{evas\_init}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* When building Evas you can configure a variety of engines to be}}
\DoxyCodeLine{\textcolor{comment}{    * built with it.  Get a list of what engines are available using the}}
\DoxyCodeLine{\textcolor{comment}{    * evas\_render\_method\_list routine.}}
\DoxyCodeLine{\textcolor{comment}{    */}}
\DoxyCodeLine{   engine\_list = \mbox{\hyperlink{group__Evas__Output__Method_gad7deab8facaa4be521fbdec6dd19e122}{evas\_render\_method\_list}}();}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!engine\_list)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"ERROR: Evas supports no engines! Exit.\(\backslash\)n"});}
\DoxyCodeLine{        exit(-\/1);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* 'engine\_list' is a linked list (@see Eina\_List.)  The}}
\DoxyCodeLine{\textcolor{comment}{    * EINA\_LIST\_FOREACH macro permits navigating through the items using}}
\DoxyCodeLine{\textcolor{comment}{    * the iterator 'l', making the node data available as 'engine\_name'.}}
\DoxyCodeLine{\textcolor{comment}{    */}}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"Available Evas Engines:\(\backslash\)n"});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(engine\_list, l, engine\_name)}
\DoxyCodeLine{     printf(\textcolor{stringliteral}{"\%s\(\backslash\)n"}, engine\_name);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* To free the list, we use evas\_render\_method\_list's corresponding}}
\DoxyCodeLine{\textcolor{comment}{    * destructor routine.}}
\DoxyCodeLine{\textcolor{comment}{    */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Output__Method_ga5bcc5a2165647f855c389bd58e77f608}{evas\_render\_method\_list\_free}}(engine\_list);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* Shuts down all dependencies if nothing else is using them, and}}
\DoxyCodeLine{\textcolor{comment}{    * clears allocated data held internally.}}
\DoxyCodeLine{\textcolor{comment}{    */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Main__Group_ga95a8864f81d944a92bb012b77ffd1b09}{evas\_shutdown}}();}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{\}}
\end{DoxyCodeInclude}
 