\hypertarget{group__Ecore__Init__Group}{}\doxysection{Ecore initialization, shutdown functions and reset on fork.}
\label{group__Ecore__Init__Group}\index{Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init}} (void)
\begin{DoxyCompactList}\small\item\em Sets up connections, signal handlers, sockets etc. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\+\_\+shutdown}} (void)
\begin{DoxyCompactList}\small\item\em Shuts down connections, signal handlers sockets etc. \end{DoxyCompactList}\item 
unsigned int \mbox{\hyperlink{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}{ecore\+\_\+init\+\_\+ex}} (int argc, char $\ast$$\ast$argv)
\begin{DoxyCompactList}\small\item\em This function will propagate the events on the main loop. \end{DoxyCompactList}\item 
unsigned int \mbox{\hyperlink{group__Ecore__Init__Group_ga20249029330ed92dcd28161c27320508}{ecore\+\_\+shutdown\+\_\+ex}} (void)
\begin{DoxyCompactList}\small\item\em Shuts down connections, signal handlers sockets etc. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga71dbf93c8bbb9e8b745879c3c1aecd0e}{EWAPI}} void \mbox{\hyperlink{group__Ecore__Init__Group_ga0447e4cf3419d48885e40080b266b374}{efl\+\_\+build\+\_\+version\+\_\+set}} (int vmaj, int vmin, int vmic, int revision, const char $\ast$flavor, const char $\ast$build\+\_\+id)
\begin{DoxyCompactList}\small\item\em Inform EFL of the version this application was built for. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}\label{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}} 
\index{Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}!ecore\_init@{ecore\_init}}
\index{ecore\_init@{ecore\_init}!Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}}
\doxysubsubsection{\texorpdfstring{ecore\_init()}{ecore\_init()}}
{\footnotesize\ttfamily int ecore\+\_\+init (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Sets up connections, signal handlers, sockets etc. 

\begin{DoxyReturn}{Returns}
{\ttfamily 1} or greater on success, {\ttfamily 0} otherwise.
\end{DoxyReturn}
This function sets up all singal handlers and the basic event loop. If it succeeds, {\ttfamily 1} will be returned, otherwise {\ttfamily 0} will be returned.


\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Ecore.h>}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int} main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)}
\DoxyCodeLine{\{}
\DoxyCodeLine{  \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}}())}
\DoxyCodeLine{  \{}
\DoxyCodeLine{    printf(\textcolor{stringliteral}{"{}ERROR: Cannot init Ecore!\(\backslash\)n"{}});}
\DoxyCodeLine{    \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{  \}}
\DoxyCodeLine{  \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{  \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}}();}
\DoxyCodeLine{\}}

\end{DoxyCode}


This function is affected by some environment variables\+:

\begin{DoxyItemize}
\item {\ttfamily ECORE\+\_\+\+NO\+\_\+\+SYSTEM\+\_\+\+MODULES=1} may be used to temporarily disable system modules, often useful for debug.\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily ECORE\+\_\+\+FPS\+\_\+\+DEBUG=1} prints frames per second, usefult to detect lags and blocking calls.\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily ECORE\+\_\+\+MEM\+\_\+\+STAT=1} will generate {\ttfamily ecore\+\_\+mem\+\_\+stat}.\$\{PID\} file with memory statistics.\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily ECORE\+\_\+\+ERROR\+\_\+\+ABORT=1} will abort on errors.\end{DoxyItemize}
This function will call \mbox{\hyperlink{group__Eina__Main__Group_gafee4bfc0e509b6ffed6598edf6f4b3de}{eina\+\_\+init()}}, so other environment variables may apply. 

References ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate(), ecore\+\_\+poller\+\_\+add(), ECORE\+\_\+\+POLLER\+\_\+\+CORE, eina\+\_\+condition\+\_\+new(), eina\+\_\+evlog(), eina\+\_\+init(), eina\+\_\+lock\+\_\+new(), eina\+\_\+log\+\_\+domain\+\_\+register(), EINA\+\_\+\+LOG\+\_\+\+ERR, eina\+\_\+prefix\+\_\+new(), ERR, and evil\+\_\+init().



Referenced by ecore\+\_\+audio\+\_\+init(), ecore\+\_\+con\+\_\+init(), ecore\+\_\+con\+\_\+url\+\_\+init(), ecore\+\_\+drm2\+\_\+init(), ecore\+\_\+drm\+\_\+init(), ecore\+\_\+evas\+\_\+init(), ecore\+\_\+event\+\_\+init(), ecore\+\_\+file\+\_\+init(), ecore\+\_\+imf\+\_\+init(), ecore\+\_\+init\+\_\+ex(), ecore\+\_\+wl2\+\_\+init(), ecore\+\_\+wl\+\_\+init(), edje\+\_\+init(), eeze\+\_\+init(), efreet\+\_\+init(), eio\+\_\+init(), eldbus\+\_\+init(), elm\+\_\+quicklaunch\+\_\+init(), elput\+\_\+init(), and evas\+\_\+init().

\mbox{\Hypertarget{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}\label{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}} 
\index{Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}!ecore\_shutdown@{ecore\_shutdown}}
\index{ecore\_shutdown@{ecore\_shutdown}!Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}}
\doxysubsubsection{\texorpdfstring{ecore\_shutdown()}{ecore\_shutdown()}}
{\footnotesize\ttfamily int ecore\+\_\+shutdown (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Shuts down connections, signal handlers sockets etc. 

\begin{DoxyReturn}{Returns}
{\ttfamily 0} if ecore shuts down, greater than {\ttfamily 0} otherwise. This function shuts down all things set up in \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}} and cleans up all event queues, handlers, filters, timers, idlers, idle enterers/exiters etc. set up after \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}} was called.
\end{DoxyReturn}
Do not call this function from any callback that may be called from the main loop, as the main loop will then fall over and not function properly. 

References ERR.



Referenced by ecore\+\_\+audio\+\_\+init(), ecore\+\_\+audio\+\_\+shutdown(), ecore\+\_\+con\+\_\+init(), ecore\+\_\+con\+\_\+shutdown(), ecore\+\_\+con\+\_\+url\+\_\+init(), ecore\+\_\+con\+\_\+url\+\_\+shutdown(), ecore\+\_\+drm\+\_\+init(), ecore\+\_\+evas\+\_\+init(), ecore\+\_\+evas\+\_\+shutdown(), ecore\+\_\+file\+\_\+shutdown(), ecore\+\_\+imf\+\_\+init(), ecore\+\_\+shutdown\+\_\+ex(), ecore\+\_\+x\+\_\+init(), ecore\+\_\+x\+\_\+init\+\_\+from\+\_\+display(), eeze\+\_\+init(), eeze\+\_\+shutdown(), efreet\+\_\+init(), efreet\+\_\+shutdown(), eldbus\+\_\+init(), emotion\+\_\+shutdown(), and evas\+\_\+shutdown().

\mbox{\Hypertarget{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}\label{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}} 
\index{Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}!ecore\_init\_ex@{ecore\_init\_ex}}
\index{ecore\_init\_ex@{ecore\_init\_ex}!Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}}
\doxysubsubsection{\texorpdfstring{ecore\_init\_ex()}{ecore\_init\_ex()}}
{\footnotesize\ttfamily unsigned int ecore\+\_\+init\+\_\+ex (\begin{DoxyParamCaption}\item[{int}]{argc,  }\item[{char $\ast$$\ast$}]{argv }\end{DoxyParamCaption})}



This function will propagate the events on the main loop. 

So you should call \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}} first, then register your callback on {\ttfamily EFL\+\_\+\+LOOP\+\_\+\+EVENT\+\_\+\+ARGUMENTS} and finally call \mbox{\hyperlink{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}{ecore\+\_\+init\+\_\+ex()}}.

Once you are shuting down your program, you should symmetrically call \mbox{\hyperlink{group__Ecore__Init__Group_ga20249029330ed92dcd28161c27320508}{ecore\+\_\+shutdown\+\_\+ex()}}. 

References ecore\+\_\+app\+\_\+args\+\_\+set(), and ecore\+\_\+init().



Referenced by elm\+\_\+quicklaunch\+\_\+sub\+\_\+init().

\mbox{\Hypertarget{group__Ecore__Init__Group_ga20249029330ed92dcd28161c27320508}\label{group__Ecore__Init__Group_ga20249029330ed92dcd28161c27320508}} 
\index{Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}!ecore\_shutdown\_ex@{ecore\_shutdown\_ex}}
\index{ecore\_shutdown\_ex@{ecore\_shutdown\_ex}!Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}}
\doxysubsubsection{\texorpdfstring{ecore\_shutdown\_ex()}{ecore\_shutdown\_ex()}}
{\footnotesize\ttfamily unsigned int ecore\+\_\+shutdown\+\_\+ex (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Shuts down connections, signal handlers sockets etc. 

\begin{DoxyReturn}{Returns}
{\ttfamily 0} if ecore shuts down, greater than {\ttfamily 0} otherwise. This function shuts down all things set up in \mbox{\hyperlink{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}{ecore\+\_\+init\+\_\+ex()}} and cleans up all event queues, handlers, filters, timers, idlers, idle enterers/exiters etc. set up after \mbox{\hyperlink{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}{ecore\+\_\+init\+\_\+ex()}} was called.
\end{DoxyReturn}
Do not call this function from any callback that may be called from the main loop, as the main loop will then fall over and not function properly.

Note\+: This function should be called in symetric to \mbox{\hyperlink{group__Ecore__Init__Group_gaa999d9816d58d5119c3390c49878e5d8}{ecore\+\_\+init\+\_\+ex()}} 

References ecore\+\_\+shutdown().



Referenced by elm\+\_\+quicklaunch\+\_\+sub\+\_\+init(), and elm\+\_\+quicklaunch\+\_\+sub\+\_\+shutdown().

\mbox{\Hypertarget{group__Ecore__Init__Group_ga0447e4cf3419d48885e40080b266b374}\label{group__Ecore__Init__Group_ga0447e4cf3419d48885e40080b266b374}} 
\index{Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}!efl\_build\_version\_set@{efl\_build\_version\_set}}
\index{efl\_build\_version\_set@{efl\_build\_version\_set}!Ecore initialization, shutdown functions and reset on fork.@{Ecore initialization, shutdown functions and reset on fork.}}
\doxysubsubsection{\texorpdfstring{efl\_build\_version\_set()}{efl\_build\_version\_set()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Eina__Types__Group_ga71dbf93c8bbb9e8b745879c3c1aecd0e}{EWAPI}} void efl\+\_\+build\+\_\+version\+\_\+set (\begin{DoxyParamCaption}\item[{int}]{vmaj,  }\item[{int}]{vmin,  }\item[{int}]{vmic,  }\item[{int}]{revision,  }\item[{const char $\ast$}]{flavor,  }\item[{const char $\ast$}]{build\+\_\+id }\end{DoxyParamCaption})}



Inform EFL of the version this application was built for. 

This is transparently called from \$\+EFL\+\_\+\+MAIN().

\begin{DoxySince}{Since}
1.\+18 (as beta) 
\end{DoxySince}
