\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 \hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init} (void)
\begin{DoxyCompactList}\small\item\em Set up connections, signal handlers, sockets etc. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\+\_\+shutdown} (void)
\begin{DoxyCompactList}\small\item\em Shut down connections, signal handlers sockets etc. \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})}



Set up connections, signal handlers, sockets etc. 

\begin{DoxyReturn}{Returns}
1 or greater on success, 0 otherwise
\end{DoxyReturn}
This function sets up all singal handlers and the basic event loop. If it succeeds, 1 will be returned, otherwise 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} (!\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}())
  \{
    printf(\textcolor{stringliteral}{"ERROR: Cannot init Ecore!\(\backslash\)n"});
    \textcolor{keywordflow}{return} -1;
  \}
  \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();
  \hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}();
\}
\end{DoxyCode}
 

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



Referenced by ecore\+\_\+audio\+\_\+init(), ecore\+\_\+con\+\_\+init(), ecore\+\_\+con\+\_\+url\+\_\+init(), ecore\+\_\+drm\+\_\+init(), ecore\+\_\+evas\+\_\+init(), ecore\+\_\+event\+\_\+init(), ecore\+\_\+file\+\_\+init(), ecore\+\_\+imf\+\_\+init(), ecore\+\_\+init(), ecore\+\_\+wl2\+\_\+init(), ecore\+\_\+wl\+\_\+init(), ecore\+\_\+x\+\_\+init(), edje\+\_\+init(), eeze\+\_\+init(), efreet\+\_\+init(), efreet\+\_\+mime\+\_\+init(), eio\+\_\+init(), eldbus\+\_\+init(), and elocation\+\_\+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})}



Shut down connections, signal handlers sockets etc. 

\begin{DoxyReturn}{Returns}
0 if ecore shuts down, greater than 0 otherwise. This function shuts down all things set up in \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 \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\+\_\+shutdown(), ecore\+\_\+drm\+\_\+init(), ecore\+\_\+drm\+\_\+shutdown(), ecore\+\_\+file\+\_\+shutdown(), ecore\+\_\+imf\+\_\+init(), ecore\+\_\+imf\+\_\+shutdown(), ecore\+\_\+wl\+\_\+server\+\_\+mode\+\_\+set(), ecore\+\_\+x\+\_\+init(), eeze\+\_\+init(), eeze\+\_\+shutdown(), efreet\+\_\+init(), efreet\+\_\+mime\+\_\+init(), efreet\+\_\+mime\+\_\+shutdown(), efreet\+\_\+shutdown(), eldbus\+\_\+init(), elocation\+\_\+shutdown(), and emotion\+\_\+shutdown().

