\hypertarget{group__Ecore__Init__Group}{}\section{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.}}
\subsection*{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 
E\+W\+A\+PI 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 E\+FL of the version this application was built for. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}


\subsection{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.}}
\subsubsection{\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}
\textcolor{preprocessor}{#include <Ecore.h>}

\textcolor{keywordtype}{int} main(\textcolor{keywordtype}{int} argc, \textcolor{keywordtype}{char} **argv)
\{
  \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}}())
  \{
    printf(\textcolor{stringliteral}{"ERROR: Cannot init Ecore!\(\backslash\)n"});
    \textcolor{keywordflow}{return} -1;
  \}
  \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();
  \mbox{\hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}}();
\}
\end{DoxyCode}


This function is affected by some environment variables\+:

\begin{DoxyItemize}
\item {\ttfamily E\+C\+O\+R\+E\+\_\+\+N\+O\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+M\+O\+D\+U\+L\+ES=1} may be used to temporarily disable system modules, often useful for debug.\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily E\+C\+O\+R\+E\+\_\+\+F\+P\+S\+\_\+\+D\+E\+B\+UG=1} prints frames per second, usefult to detect lags and blocking calls.\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily E\+C\+O\+R\+E\+\_\+\+M\+E\+M\+\_\+\+S\+T\+AT=1} will generate {\ttfamily ecore\+\_\+mem\+\_\+stat}.\$\{P\+ID\} file with memory statistics.\end{DoxyItemize}
\begin{DoxyItemize}
\item {\ttfamily E\+C\+O\+R\+E\+\_\+\+E\+R\+R\+O\+R\+\_\+\+A\+B\+O\+RT=1} will abort on errors.\end{DoxyItemize}
This function will call \mbox{\hyperlink{group__Eina__Main__Group_gabf448ada5bc81a07342b66c6f818ee5e}{eina\+\_\+init()}}, so other environment variables may apply. 

References ecore\+\_\+animator\+\_\+add(), ecore\+\_\+init(), ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate(), ecore\+\_\+timer\+\_\+add(), efl\+\_\+add, efl\+\_\+object\+\_\+init(), eina\+\_\+condition\+\_\+new(), eina\+\_\+evlog(), E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, eina\+\_\+init(), eina\+\_\+lock\+\_\+new(), eina\+\_\+log\+\_\+domain\+\_\+register(), E\+I\+N\+A\+\_\+\+L\+O\+G\+\_\+\+E\+RR, eina\+\_\+log\+\_\+timing(), eina\+\_\+prefix\+\_\+new(), E\+RR, evil\+\_\+init(), I\+NF, and unsetenv().



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(), ecore\+\_\+wl2\+\_\+init(), ecore\+\_\+wl\+\_\+init(), edje\+\_\+init(), eeze\+\_\+init(), efreet\+\_\+init(), efreet\+\_\+mime\+\_\+init(), eio\+\_\+init(), elm\+\_\+quicklaunch\+\_\+init(), elocation\+\_\+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.}}
\subsubsection{\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 eina\+\_\+log\+\_\+timing(), and E\+RR.



Referenced by ecore\+\_\+audio\+\_\+init(), ecore\+\_\+con\+\_\+url\+\_\+init(), ecore\+\_\+con\+\_\+url\+\_\+shutdown(), ecore\+\_\+drm\+\_\+init(), ecore\+\_\+file\+\_\+shutdown(), ecore\+\_\+imf\+\_\+init(), ecore\+\_\+x\+\_\+init(), eeze\+\_\+init(), eeze\+\_\+shutdown(), efreet\+\_\+init(), efreet\+\_\+mime\+\_\+init(), efreet\+\_\+mime\+\_\+shutdown(), efreet\+\_\+shutdown(), elocation\+\_\+shutdown(), and emotion\+\_\+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.}}
\subsubsection{\texorpdfstring{efl\+\_\+build\+\_\+version\+\_\+set()}{efl\_build\_version\_set()}}
{\footnotesize\ttfamily E\+W\+A\+PI 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 E\+FL of the version this application was built for. 

This is transparently called from \$\+E\+F\+L\+\_\+\+M\+A\+I\+N().

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


References \+\_\+\+Efl\+\_\+\+Version\+::build\+\_\+id, \+\_\+\+Efl\+\_\+\+Version\+::flavor, \+\_\+\+Efl\+\_\+\+Version\+::major, \+\_\+\+Efl\+\_\+\+Version\+::micro, \+\_\+\+Efl\+\_\+\+Version\+::minor, and \+\_\+\+Efl\+\_\+\+Version\+::revision.

