\hypertarget{group__Ecore__Main__Loop__Group}{}\section{Ecore main loop}
\label{group__Ecore__Main__Loop__Group}\index{Ecore main loop@{Ecore main loop}}


This group discusses functions that are acting on Ecore\textquotesingle{}s main loop itself or on events and infrastructure directly linked to it.  


\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Ecore__Event__Group}{Ecore Event functions}
\begin{DoxyCompactList}\small\item\em Ecore events provide two main features that are of use to those using ecore\+: creating events and being notified of events. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Exe__Group}{Process Spawning Functions}
\begin{DoxyCompactList}\small\item\em This module is responsible for managing portable processes using Ecore. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__FD__Handler__Group}{File Descriptor Handling Functions}
\begin{DoxyCompactList}\small\item\em Functions that deal with file descriptor handlers. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Thread__Group}{Ecore Thread functions}
\begin{DoxyCompactList}\small\item\em Facilities to run heavy tasks in different threads to avoid blocking the main loop. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Pipe__Group}{Pipe wrapper}
\begin{DoxyCompactList}\small\item\em These functions wrap the pipe / write / read functions to easily integrate its use into ecore\textquotesingle{}s main loop. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Throttle__Group}{Ecore Throttle functions}
\item 
\hyperlink{group__Ecore__Poller__Group}{Ecore Poll functions}
\begin{DoxyCompactList}\small\item\em Ecore poller provides infrastructure for the creation of pollers. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Animator__Group}{Ecore Animator functions}
\begin{DoxyCompactList}\small\item\em Ecore animators are a helper to simplify creating animations. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Timer__Group}{Ecore Timer functions}
\begin{DoxyCompactList}\small\item\em Ecore provides very flexible timer functionality. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Idle__Group}{Ecore Idle functions}
\begin{DoxyCompactList}\small\item\em The idler functionality in Ecore allows for callbacks to be called when the program isn\textquotesingle{}t handling \hyperlink{group__Ecore__Event__Group}{events}, \hyperlink{group__Ecore__Timer__Group}{timers} or \hyperlink{group__Ecore__FD__Handler__Group}{fd handlers}. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Job__Group}{Ecore Job functions}
\begin{DoxyCompactList}\small\item\em You can queue jobs that are to be done by the main loop when the current event is dealt with. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__Ecore__Version}{\+\_\+\+Ecore\+\_\+\+Version}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga48abe5a81c54572774a6d7eefc0e1ec3}\label{group__Ecore__Main__Loop__Group_ga48abe5a81c54572774a6d7eefc0e1ec3}} 
\#define \hyperlink{group__Ecore__Main__Loop__Group_ga48abe5a81c54572774a6d7eefc0e1ec3}{E\+C\+O\+R\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+M\+A\+J\+OR}~E\+F\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+M\+A\+J\+OR
\begin{DoxyCompactList}\small\item\em Ecore version major number. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga1e95ec9ea7191f9cdfc93351bf5475a9}\label{group__Ecore__Main__Loop__Group_ga1e95ec9ea7191f9cdfc93351bf5475a9}} 
\#define \hyperlink{group__Ecore__Main__Loop__Group_ga1e95ec9ea7191f9cdfc93351bf5475a9}{E\+C\+O\+R\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+M\+I\+N\+OR}~E\+F\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+M\+I\+N\+OR
\begin{DoxyCompactList}\small\item\em Ecore version minor number. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gae0c653baad8836232c0dc27f91f875d6}\label{group__Ecore__Main__Loop__Group_gae0c653baad8836232c0dc27f91f875d6}} 
\#define \hyperlink{group__Ecore__Main__Loop__Group_gae0c653baad8836232c0dc27f91f875d6}{E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+A\+N\+C\+EL}~\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}
\begin{DoxyCompactList}\small\item\em Return value to remove a callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga1ee9db07f9a46a8b20fb83e1c6dbed09}\label{group__Ecore__Main__Loop__Group_ga1ee9db07f9a46a8b20fb83e1c6dbed09}} 
\#define \hyperlink{group__Ecore__Main__Loop__Group_ga1ee9db07f9a46a8b20fb83e1c6dbed09}{E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+N\+EW}~\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}
\begin{DoxyCompactList}\small\item\em Return value to keep a callback. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga6a2922b8aa10c60f27c8ab49d84d75f2}\label{group__Ecore__Main__Loop__Group_ga6a2922b8aa10c60f27c8ab49d84d75f2}} 
\#define \hyperlink{group__Ecore__Main__Loop__Group_ga6a2922b8aa10c60f27c8ab49d84d75f2}{E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+P\+A\+S\+S\+\_\+\+ON}~\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+UE}
\begin{DoxyCompactList}\small\item\em Return value to pass event to next handler. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga780091d7d49a4bb6cb753f12e1a3b19d}\label{group__Ecore__Main__Loop__Group_ga780091d7d49a4bb6cb753f12e1a3b19d}} 
\#define \hyperlink{group__Ecore__Main__Loop__Group_ga780091d7d49a4bb6cb753f12e1a3b19d}{E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+D\+O\+NE}~\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+SE}
\begin{DoxyCompactList}\small\item\em Return value to stop event handling. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \hyperlink{struct__Ecore__Version}{\+\_\+\+Ecore\+\_\+\+Version} \hyperlink{group__Ecore__Main__Loop__Group_gaa252ceca1589e2f652ef61f72efdbe94}{Ecore\+\_\+\+Version}
\begin{DoxyCompactList}\small\item\em This is the Ecore version information structure that can be used at runtime to detect which version of ecore is being used and adapt appropriately as follows for example\+: \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga8a36ef1ac24bfa317a7826617264e530}\label{group__Ecore__Main__Loop__Group_ga8a36ef1ac24bfa317a7826617264e530}} 
typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Ecore__Main__Loop__Group_ga8a36ef1ac24bfa317a7826617264e530}{Ecore\+\_\+\+Task\+\_\+\+Cb}) (void $\ast$data)
\begin{DoxyCompactList}\small\item\em A callback run for a task (timer, idler, poller, animator, etc) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}\label{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}} 
typedef int($\ast$ \hyperlink{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}{Ecore\+\_\+\+Select\+\_\+\+Function}) (int nfds, fd\+\_\+set $\ast$readfds, fd\+\_\+set $\ast$writefds, fd\+\_\+set $\ast$exceptfds, struct timeval $\ast$timeout)
\begin{DoxyCompactList}\small\item\em A function which can be used to replace select() in the main loop. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}\label{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}} 
typedef void($\ast$ \hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}) (void $\ast$data)
\begin{DoxyCompactList}\small\item\em A generic callback called as a hook when a certain point in execution is reached. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}\label{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}} 
typedef void $\ast$($\ast$ \hyperlink{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}{Ecore\+\_\+\+Data\+\_\+\+Cb}) (void $\ast$data)
\begin{DoxyCompactList}\small\item\em A callback which is used to return data to the main function. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}{ecore\+\_\+main\+\_\+loop\+\_\+iterate} (void)
\begin{DoxyCompactList}\small\item\em Runs a single iteration of the main loop to process everything on the queue. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Main__Loop__Group_ga8b024c74a3ad9da1ec6a92a906419929}{ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block} (int may\+\_\+block)
\begin{DoxyCompactList}\small\item\em Runs a single iteration of the main loop to process everything on the queue with block/non-\/blocking status. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set} (\hyperlink{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}{Ecore\+\_\+\+Select\+\_\+\+Function} func)
\begin{DoxyCompactList}\small\item\em Sets the function to use when monitoring multiple file descriptors, and waiting until one of more of the file descriptors before ready for some class of I/O operation. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga5e959406d2cc4aac55e040d47e42f5bd}\label{group__Ecore__Main__Loop__Group_ga5e959406d2cc4aac55e040d47e42f5bd}} 
\hyperlink{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}{Ecore\+\_\+\+Select\+\_\+\+Function} \hyperlink{group__Ecore__Main__Loop__Group_ga5e959406d2cc4aac55e040d47e42f5bd}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Gets the select function set by ecore\+\_\+select\+\_\+func\+\_\+set(), or the native select function if none was set. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate} (void)
\begin{DoxyCompactList}\small\item\em Request ecore to integrate G\+Lib\textquotesingle{}s main loop. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_ga41c7d11043af50636ec75082c9d745c8}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable} (void)
\begin{DoxyCompactList}\small\item\em Disable always integrating glib. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\+\_\+main\+\_\+loop\+\_\+begin} (void)
\begin{DoxyCompactList}\small\item\em Runs the application main loop. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\+\_\+main\+\_\+loop\+\_\+quit} (void)
\begin{DoxyCompactList}\small\item\em Quits the main loop once all the events currently on the queue have been processed. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Ecore__Main__Loop__Group_ga04e62bf20e8985778ba74b1869ef77ba}{ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Returns if an animator has ticked off during this loop iteration. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Main__Loop__Group_ga131768b621b7fa6fe23d0ed8dbcf56ba}{ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Returns if the ecore\+\_\+main\+\_\+loop is running. \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Ecore__Main__Loop__Group_gad4c3bd5fb81af093ce3d64f6f8331043}{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add} (\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add a function to be called by \hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset()} \end{DoxyCompactList}\item 
\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Ecore__Main__Loop__Group_ga10a1b477404946b0de4d01e32f84fec5}{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del} (\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em This removes the callback specified. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset} (void)
\begin{DoxyCompactList}\small\item\em Reset the ecore internal state after a fork. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_ga12c98ccc13eb136ed62f8177d12a8fc0}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async} (\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb} callback, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Call callback asynchronously in the main loop. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Main__Loop__Group_ga0df1b736c7f358c1df054c126d8dbc00}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync} (\hyperlink{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}{Ecore\+\_\+\+Data\+\_\+\+Cb} callback, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Call callback synchronously in the main loop. \end{DoxyCompactList}\item 
void \hyperlink{group__Ecore__Main__Loop__Group_gace69e5961a239cbf4f586fae651e4cc9}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait} (double wait)
\begin{DoxyCompactList}\small\item\em Wait for the next thread call in the main loop. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin} (void)
\begin{DoxyCompactList}\small\item\em This function suspend the main loop in a know state. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end} (void)
\begin{DoxyCompactList}\small\item\em Unlock the main loop. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gab2400d8d4ab57b35c019031856b1d5e1}\label{group__Ecore__Main__Loop__Group_gab2400d8d4ab57b35c019031856b1d5e1}} 
\hyperlink{group__Ecore__Main__Loop__Group_gaa252ceca1589e2f652ef61f72efdbe94}{Ecore\+\_\+\+Version} $\ast$ {\bfseries ecore\+\_\+version}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This group discusses functions that are acting on Ecore\textquotesingle{}s main loop itself or on events and infrastructure directly linked to it. 

Most programs only need to start and end the main loop, the rest of the function discussed here are meant to be used in special situations, and with great care.

For details on the usage of ecore\textquotesingle{}s main loop and how it interacts with other ecore facilities see\+: \hyperlink{Ecore_Main_Loop_Page}{The Ecore Main Loop}. 

\subsection{Typedef Documentation}
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gaa252ceca1589e2f652ef61f72efdbe94}\label{group__Ecore__Main__Loop__Group_gaa252ceca1589e2f652ef61f72efdbe94}} 
\index{Ecore main loop@{Ecore main loop}!Ecore\+\_\+\+Version@{Ecore\+\_\+\+Version}}
\index{Ecore\+\_\+\+Version@{Ecore\+\_\+\+Version}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{Ecore\+\_\+\+Version}{Ecore\_Version}}
{\footnotesize\ttfamily \hyperlink{group__Ecore__Main__Loop__Group_gaa252ceca1589e2f652ef61f72efdbe94}{Ecore\+\_\+\+Version}}



This is the Ecore version information structure that can be used at runtime to detect which version of ecore is being used and adapt appropriately as follows for example\+: 


\begin{DoxyCode}
\textcolor{preprocessor}{#if defined(ECORE\_VERSION\_MAJOR) && (ECORE\_VERSION\_MAJOR >= 1) && defined(ECORE\_VERSION\_MINOR) &&
       (ECORE\_VERSION\_MINOR > 0)}
printf(\textcolor{stringliteral}{"Ecore version: %i.%i.%i\(\backslash\)n"},
       ecore\_version->major,
       ecore\_version->\hyperlink{struct__Ecore__Version_ac3bcd4d76cfefe97fc9fd71e69f6cd01}{minor},
       ecore\_version->\hyperlink{struct__Ecore__Version_a673a3497ce65f68ab07cb85506c9eba0}{micro});
\textcolor{keywordflow}{if} (ecore\_version->\hyperlink{struct__Ecore__Version_a8beca63d7a015794188a5646f33774b6}{revision} > 0)
  \{
    printf(\textcolor{stringliteral}{"  Built from Git revision # %i\(\backslash\)n"}, ecore\_version->\hyperlink{struct__Ecore__Version_a8beca63d7a015794188a5646f33774b6}{revision});
  \}
\textcolor{preprocessor}{#endif}
\end{DoxyCode}
 

\subsection{Function Documentation}
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}\label{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+iterate@{ecore\+\_\+main\+\_\+loop\+\_\+iterate}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+iterate@{ecore\+\_\+main\+\_\+loop\+\_\+iterate}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+iterate()}{ecore\_main\_loop\_iterate()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+iterate (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Runs a single iteration of the main loop to process everything on the queue. 

It does everything that is already done inside an {\ttfamily Ecore} main loop, like checking for expired timers, idlers, etc. But it will do it only once and return, instead of keep watching for new events.

DO N\+OT use this function unless you are the person God comes to ask for advice when He has trouble managing the Universe.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Ecore__Main__Loop__Group_ga8b024c74a3ad9da1ec6a92a906419929}{ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block()} 
\end{DoxySeeAlso}


References ecore\+\_\+time\+\_\+get(), and E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+RN.



Referenced by emotion\+\_\+shutdown().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga8b024c74a3ad9da1ec6a92a906419929}\label{group__Ecore__Main__Loop__Group_ga8b024c74a3ad9da1ec6a92a906419929}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block@{ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block@{ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block()}{ecore\_main\_loop\_iterate\_may\_block()}}
{\footnotesize\ttfamily int ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block (\begin{DoxyParamCaption}\item[{int}]{may\+\_\+block }\end{DoxyParamCaption})}



Runs a single iteration of the main loop to process everything on the queue with block/non-\/blocking status. 


\begin{DoxyParams}{Parameters}
{\em may\+\_\+block} & A flag if the main loop has a possibility of blocking. ({\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} = may block/{\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} = non block)\\
\hline
\end{DoxyParams}
This is an extension A\+PI for \hyperlink{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}{ecore\+\_\+main\+\_\+loop\+\_\+iterate()} with additional parameter. It does everything that is already done inside an {\ttfamily Ecore} main loop, like checking for expired timers, idlers, etc. But it will do it only once and return, instead of keep watching for new events.

DO N\+OT use this function unless you are the person God comes to ask for advice when He has trouble managing the Universe.

\begin{DoxyReturn}{Returns}
1 if event exists, else 0. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}{ecore\+\_\+main\+\_\+loop\+\_\+iterate()} 
\end{DoxySeeAlso}


References ecore\+\_\+time\+\_\+get(), and E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+AL.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}\label{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set@{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set@{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()}{ecore\_main\_loop\_select\_func\_set()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set (\begin{DoxyParamCaption}\item[{\hyperlink{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}{Ecore\+\_\+\+Select\+\_\+\+Function}}]{func }\end{DoxyParamCaption})}



Sets the function to use when monitoring multiple file descriptors, and waiting until one of more of the file descriptors before ready for some class of I/O operation. 

This function will be used instead of the system call select and could possible be used to integrate the Ecore event loop with an external event loop.

\begin{DoxyWarning}{Warning}
you don\textquotesingle{}t know how to use, don\textquotesingle{}t even try to use it.
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em func} & The function to be used. \\
\hline
\end{DoxyParams}


References E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+RN.



Referenced by ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}\label{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate@{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate@{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate()}{ecore\_main\_loop\_glib\_integrate()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Request ecore to integrate G\+Lib\textquotesingle{}s main loop. 

This will add a small overhead during every main loop interaction by checking glib\textquotesingle{}s default main context (used by its main loop). If it have events to be checked (timers, file descriptors or idlers), then these will be polled alongside with Ecore\textquotesingle{}s own events, then dispatched before Ecore\textquotesingle{}s. This is done by calling \hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()}.

This will cooperate with previously set \hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()} by calling the old function. Similarly, if you want to override \hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()} after main loop is integrated, call the new select function set by this call (get it by calling \hyperlink{group__Ecore__Main__Loop__Group_ga5e959406d2cc4aac55e040d47e42f5bd}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+get()} right after \hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate()}).

This is useful to use G\+Main\+Loop libraries, like G\+TK, G\+U\+PnP, Lib\+Soup, G\+Conf and more. Adobe Flash plugin and other plugins systems depend on this as well.

Once initialized/integrated, it will be valid until Ecore is completely shut down.

Example of use\+: 
\begin{DoxyCode}
\textcolor{keywordtype}{int} main(\textcolor{keywordtype}{void})
\{
   \hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}();
   \hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\_main\_loop\_glib\_integrate}();

   \textcolor{comment}{// some code here}

   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();

   \hyperlink{group__Ecore__Init__Group_ga768298b932f18d7e7593a447493e5cde}{ecore\_shutdown}();

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCode}


\begin{DoxyNote}{Note}
This is only available if Ecore was compiled with G\+Lib support. 

You don\textquotesingle{}t need to call this function if Ecore was compiled with --with-\/glib=always.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} on success of {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+SE} if it failed, likely no G\+Lib support in Ecore. 
\end{DoxyReturn}


References ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+get(), ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set(), E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, E\+I\+N\+A\+\_\+\+T\+R\+UE, and E\+RR.



Referenced by ecore\+\_\+init().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga41c7d11043af50636ec75082c9d745c8}\label{group__Ecore__Main__Loop__Group_ga41c7d11043af50636ec75082c9d745c8}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable@{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable@{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable()}{ecore\_main\_loop\_glib\_always\_integrate\_disable()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Disable always integrating glib. 

If ecore is compiled with --with-\/glib=always (to always call \hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate()} when \hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()} is called), then calling this before calling \hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()} will disable the integration. This is for apps that explicitly do not want this to happen for whatever reasons they may have. \mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}\label{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+begin@{ecore\+\_\+main\+\_\+loop\+\_\+begin}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+begin@{ecore\+\_\+main\+\_\+loop\+\_\+begin}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+begin()}{ecore\_main\_loop\_begin()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+begin (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Runs the application main loop. 

This function will not return until \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\+\_\+main\+\_\+loop\+\_\+quit} is called. It will check for expired timers, idlers, file descriptors being watched by fd handlers, etc. Once everything is done, before entering again on idle state, any callback set as {\ttfamily Idle\+\_\+\+Enterer} will be called.

This function should be called once only from the same thread that initted ecore, eina etc. (\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}, \hyperlink{group__Eina__Main__Group_gabf448ada5bc81a07342b66c6f818ee5e}{eina\+\_\+init()}, ...) and should never be nested. Never call it from within an instance of itself.

Each main loop iteration is done by calling \hyperlink{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}{ecore\+\_\+main\+\_\+loop\+\_\+iterate()} internally.

The polling (select) function used can be changed with \hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()}.

The function used to check for file descriptors, events, and that has a timeout for the timers can be changed using \hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()}. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{banshee_8c-example}{banshee.\+c}, \hyperlink{client_8c-example}{client.\+c}, \hyperlink{complex-types-client-eina-value_8c-example}{complex-\/types-\/client-\/eina-\/value.\+c}, \hyperlink{complex-types-server_8c-example}{complex-\/types-\/server.\+c}, \hyperlink{complex-types_8c-example}{complex-\/types.\+c}, \hyperlink{connman-list-services_8c-example}{connman-\/list-\/services.\+c}, \hyperlink{ecore_animator_example_8c-example}{ecore\+\_\+animator\+\_\+example.\+c}, \hyperlink{ecore_con_client_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+example.\+c}, \hyperlink{ecore_con_client_simple_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_con_lookup_example_8c-example}{ecore\+\_\+con\+\_\+lookup\+\_\+example.\+c}, \hyperlink{ecore_con_server_example_8c-example}{ecore\+\_\+con\+\_\+server\+\_\+example.\+c}, \hyperlink{ecore_con_server_simple_example_8c-example}{ecore\+\_\+con\+\_\+server\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_con_url_cookies_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+cookies\+\_\+example.\+c}, \hyperlink{ecore_con_url_download_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+download\+\_\+example.\+c}, \hyperlink{ecore_con_url_headers_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+headers\+\_\+example.\+c}, \hyperlink{ecore_evas_basics_example_8c-example}{ecore\+\_\+evas\+\_\+basics\+\_\+example.\+c}, \hyperlink{ecore_evas_buffer_example_02_8c-example}{ecore\+\_\+evas\+\_\+buffer\+\_\+example\+\_\+02.\+c}, \hyperlink{ecore_evas_callbacks_8c-example}{ecore\+\_\+evas\+\_\+callbacks.\+c}, \hyperlink{ecore_evas_object_example_8c-example}{ecore\+\_\+evas\+\_\+object\+\_\+example.\+c}, \hyperlink{ecore_evas_window_sizes_example_8c-example}{ecore\+\_\+evas\+\_\+window\+\_\+sizes\+\_\+example.\+c}, \hyperlink{ecore_event_example_01_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+01.\+c}, \hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+c}, \hyperlink{ecore_exe_example_8c-example}{ecore\+\_\+exe\+\_\+example.\+c}, \hyperlink{ecore_exe_example_child_8c-example}{ecore\+\_\+exe\+\_\+example\+\_\+child.\+c}, \hyperlink{ecore_fd_handler_example_8c-example}{ecore\+\_\+fd\+\_\+handler\+\_\+example.\+c}, \hyperlink{ecore_fd_handler_gnutls_example_8c-example}{ecore\+\_\+fd\+\_\+handler\+\_\+gnutls\+\_\+example.\+c}, \hyperlink{ecore_idler_example_8c-example}{ecore\+\_\+idler\+\_\+example.\+c}, \hyperlink{ecore_imf_example_8c-example}{ecore\+\_\+imf\+\_\+example.\+c}, \hyperlink{ecore_job_example_8c-example}{ecore\+\_\+job\+\_\+example.\+c}, \hyperlink{ecore_pipe_gstreamer_example_8c-example}{ecore\+\_\+pipe\+\_\+gstreamer\+\_\+example.\+c}, \hyperlink{ecore_pipe_simple_example_8c-example}{ecore\+\_\+pipe\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_poller_example_8c-example}{ecore\+\_\+poller\+\_\+example.\+c}, \hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}, \hyperlink{ecore_time_functions_example_8c-example}{ecore\+\_\+time\+\_\+functions\+\_\+example.\+c}, \hyperlink{ecore_timer_example_8c-example}{ecore\+\_\+timer\+\_\+example.\+c}, \hyperlink{edje-basic_8c-example}{edje-\/basic.\+c}, \hyperlink{edje-box_8c-example}{edje-\/box.\+c}, \hyperlink{edje-box2_8c-example}{edje-\/box2.\+c}, \hyperlink{edje-color-class_8c-example}{edje-\/color-\/class.\+c}, \hyperlink{edje-drag_8c-example}{edje-\/drag.\+c}, \hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}, \hyperlink{edje-signals-messages_8c-example}{edje-\/signals-\/messages.\+c}, \hyperlink{edje-swallow_8c-example}{edje-\/swallow.\+c}, \hyperlink{edje-table_8c-example}{edje-\/table.\+c}, \hyperlink{edje-text_8c-example}{edje-\/text.\+c}, \hyperlink{eina_tiler_01_8c-example}{eina\+\_\+tiler\+\_\+01.\+c}, \hyperlink{eio_file_ls_8c-example}{eio\+\_\+file\+\_\+ls.\+c}, \hyperlink{emotion_basic_example_8c-example}{emotion\+\_\+basic\+\_\+example.\+c}, \hyperlink{emotion_signals_example_8c-example}{emotion\+\_\+signals\+\_\+example.\+c}, \hyperlink{evas-aspect-hints_8c-example}{evas-\/aspect-\/hints.\+c}, \hyperlink{evas-box_8c-example}{evas-\/box.\+c}, \hyperlink{evas-events_8c-example}{evas-\/events.\+c}, \hyperlink{evas-hints_8c-example}{evas-\/hints.\+c}, \hyperlink{evas-images_8c-example}{evas-\/images.\+c}, \hyperlink{evas-images2_8c-example}{evas-\/images2.\+c}, \hyperlink{evas-map-utils_8c-example}{evas-\/map-\/utils.\+c}, \hyperlink{evas-object-manipulation_8c-example}{evas-\/object-\/manipulation.\+c}, \hyperlink{evas-smart-interface_8c-example}{evas-\/smart-\/interface.\+c}, \hyperlink{evas-smart-object_8c-example}{evas-\/smart-\/object.\+c}, \hyperlink{evas-stacking_8c-example}{evas-\/stacking.\+c}, \hyperlink{evas-table_8c-example}{evas-\/table.\+c}, \hyperlink{evas-text_8c-example}{evas-\/text.\+c}, \hyperlink{ofono-dial_8c-example}{ofono-\/dial.\+c}, and \hyperlink{server_8c-example}{server.\+c}.\end{Desc}


References D\+BG, ecore\+\_\+time\+\_\+get(), eina\+\_\+evlog(), E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+RN, and E\+RR.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}\label{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+quit@{ecore\+\_\+main\+\_\+loop\+\_\+quit}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+quit@{ecore\+\_\+main\+\_\+loop\+\_\+quit}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+quit()}{ecore\_main\_loop\_quit()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+quit (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Quits the main loop once all the events currently on the queue have been processed. 

This function returns immediately, but will mark the \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\+\_\+main\+\_\+loop\+\_\+begin()} function to return at the end of the current main loop iteration. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{banshee_8c-example}{banshee.\+c}, \hyperlink{client_8c-example}{client.\+c}, \hyperlink{complex-types_8c-example}{complex-\/types.\+c}, \hyperlink{ecore_con_client_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+example.\+c}, \hyperlink{ecore_con_client_simple_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_con_lookup_example_8c-example}{ecore\+\_\+con\+\_\+lookup\+\_\+example.\+c}, \hyperlink{ecore_con_server_example_8c-example}{ecore\+\_\+con\+\_\+server\+\_\+example.\+c}, \hyperlink{ecore_con_url_cookies_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+cookies\+\_\+example.\+c}, \hyperlink{ecore_con_url_download_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+download\+\_\+example.\+c}, \hyperlink{ecore_con_url_headers_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+headers\+\_\+example.\+c}, \hyperlink{ecore_evas_basics_example_8c-example}{ecore\+\_\+evas\+\_\+basics\+\_\+example.\+c}, \hyperlink{ecore_evas_buffer_example_02_8c-example}{ecore\+\_\+evas\+\_\+buffer\+\_\+example\+\_\+02.\+c}, \hyperlink{ecore_evas_callbacks_8c-example}{ecore\+\_\+evas\+\_\+callbacks.\+c}, \hyperlink{ecore_evas_window_sizes_example_8c-example}{ecore\+\_\+evas\+\_\+window\+\_\+sizes\+\_\+example.\+c}, \hyperlink{ecore_event_example_01_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+01.\+c}, \hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+c}, \hyperlink{ecore_exe_example_8c-example}{ecore\+\_\+exe\+\_\+example.\+c}, \hyperlink{ecore_exe_example_child_8c-example}{ecore\+\_\+exe\+\_\+example\+\_\+child.\+c}, \hyperlink{ecore_fd_handler_example_8c-example}{ecore\+\_\+fd\+\_\+handler\+\_\+example.\+c}, \hyperlink{ecore_fd_handler_gnutls_example_8c-example}{ecore\+\_\+fd\+\_\+handler\+\_\+gnutls\+\_\+example.\+c}, \hyperlink{ecore_idler_example_8c-example}{ecore\+\_\+idler\+\_\+example.\+c}, \hyperlink{ecore_job_example_8c-example}{ecore\+\_\+job\+\_\+example.\+c}, \hyperlink{ecore_pipe_simple_example_8c-example}{ecore\+\_\+pipe\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_poller_example_8c-example}{ecore\+\_\+poller\+\_\+example.\+c}, \hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}, \hyperlink{ecore_time_functions_example_8c-example}{ecore\+\_\+time\+\_\+functions\+\_\+example.\+c}, \hyperlink{edje-basic_8c-example}{edje-\/basic.\+c}, \hyperlink{edje-box_8c-example}{edje-\/box.\+c}, \hyperlink{edje-box2_8c-example}{edje-\/box2.\+c}, \hyperlink{edje-color-class_8c-example}{edje-\/color-\/class.\+c}, \hyperlink{edje-drag_8c-example}{edje-\/drag.\+c}, \hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}, \hyperlink{edje-signals-messages_8c-example}{edje-\/signals-\/messages.\+c}, \hyperlink{edje-swallow_8c-example}{edje-\/swallow.\+c}, \hyperlink{edje-table_8c-example}{edje-\/table.\+c}, \hyperlink{edje-text_8c-example}{edje-\/text.\+c}, \hyperlink{eio_file_ls_8c-example}{eio\+\_\+file\+\_\+ls.\+c}, \hyperlink{evas-box_8c-example}{evas-\/box.\+c}, \hyperlink{evas-hints_8c-example}{evas-\/hints.\+c}, \hyperlink{evas-images_8c-example}{evas-\/images.\+c}, \hyperlink{evas-images2_8c-example}{evas-\/images2.\+c}, \hyperlink{evas-map-utils_8c-example}{evas-\/map-\/utils.\+c}, \hyperlink{evas-smart-interface_8c-example}{evas-\/smart-\/interface.\+c}, \hyperlink{evas-smart-object_8c-example}{evas-\/smart-\/object.\+c}, \hyperlink{evas-stacking_8c-example}{evas-\/stacking.\+c}, \hyperlink{evas-table_8c-example}{evas-\/table.\+c}, \hyperlink{evas-text_8c-example}{evas-\/text.\+c}, and \hyperlink{server_8c-example}{server.\+c}.\end{Desc}


References E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+RN.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga04e62bf20e8985778ba74b1869ef77ba}\label{group__Ecore__Main__Loop__Group_ga04e62bf20e8985778ba74b1869ef77ba}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get@{ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get@{ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get()}{ecore\_main\_loop\_animator\_ticked\_get()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} ecore\+\_\+main\+\_\+loop\+\_\+animator\+\_\+ticked\+\_\+get (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Returns if an animator has ticked off during this loop iteration. 

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+UE if an animator has been called, E\+I\+N\+A\+\_\+\+F\+A\+L\+SE otherwise.
\end{DoxyReturn}
There should be little need for anyone to use this -\/ ever.

\begin{DoxySince}{Since}
1.\+9 
\end{DoxySince}


References D\+BG.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga131768b621b7fa6fe23d0ed8dbcf56ba}\label{group__Ecore__Main__Loop__Group_ga131768b621b7fa6fe23d0ed8dbcf56ba}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get@{ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get@{ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get()}{ecore\_main\_loop\_nested\_get()}}
{\footnotesize\ttfamily int ecore\+\_\+main\+\_\+loop\+\_\+nested\+\_\+get (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Returns if the ecore\+\_\+main\+\_\+loop is running. 

\begin{DoxyReturn}{Returns}
an integer specifying if the ecore\+\_\+main\+\_\+loop is running, 0 if not running, $>$ 0 if running
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+13 
\end{DoxySince}
\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gad4c3bd5fb81af093ce3d64f6f8331043}\label{group__Ecore__Main__Loop__Group_gad4c3bd5fb81af093ce3d64f6f8331043}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add@{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add}}
\index{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add@{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add()}{ecore\_fork\_reset\_callback\_add()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add (\begin{DoxyParamCaption}\item[{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}}]{func,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Add a function to be called by \hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset()} 


\begin{DoxyParams}{Parameters}
{\em func} & The function to add. \\
\hline
{\em data} & The data to pass to this function.\\
\hline
\end{DoxyParams}
This queues {\ttfamily func} to be called (and passed {\ttfamily data} as its argument) when \hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset()} is called. This allows other libraries and subsystems to also reset their internal state after a fork.

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+UE on success, else E\+I\+N\+A\+\_\+\+F\+A\+L\+SE. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+7 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, eina\+\_\+list\+\_\+append(), and E\+I\+N\+A\+\_\+\+T\+R\+UE.



Referenced by ecore\+\_\+evas\+\_\+init().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga10a1b477404946b0de4d01e32f84fec5}\label{group__Ecore__Main__Loop__Group_ga10a1b477404946b0de4d01e32f84fec5}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del@{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del}}
\index{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del@{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del()}{ecore\_fork\_reset\_callback\_del()}}
{\footnotesize\ttfamily \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del (\begin{DoxyParamCaption}\item[{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}}]{func,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



This removes the callback specified. 


\begin{DoxyParams}{Parameters}
{\em func} & The function to delete. \\
\hline
{\em data} & The data passed to this function.\\
\hline
\end{DoxyParams}
This deletes the callback added by \hyperlink{group__Ecore__Main__Loop__Group_gad4c3bd5fb81af093ce3d64f6f8331043}{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add()} using the function and data pointer to specify which to remove.

\begin{DoxyReturn}{Returns}
E\+I\+N\+A\+\_\+\+T\+R\+UE on success, else E\+I\+N\+A\+\_\+\+F\+A\+L\+SE. 
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+7 
\end{DoxySince}


References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH, eina\+\_\+list\+\_\+remove\+\_\+list(), and E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}\label{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+fork\+\_\+reset@{ecore\+\_\+fork\+\_\+reset}}
\index{ecore\+\_\+fork\+\_\+reset@{ecore\+\_\+fork\+\_\+reset}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+fork\+\_\+reset()}{ecore\_fork\_reset()}}
{\footnotesize\ttfamily void ecore\+\_\+fork\+\_\+reset (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Reset the ecore internal state after a fork. 

Ecore maintains internal data that can be affected by the fork() system call which creates a duplicate of the current process. This also duplicates file descriptors which is problematic in that these file descriptors still point to their original sources. This function makes ecore reset internal state (e.\+g. pipes used for signalling between threads) so they function correctly afterwards.

It is highly suggested that you call this function after any fork() system call inside the child process if you intend to use ecore features after this point and not call any exec() family functions. Not doing so will cause possible misbehaviour.

\begin{DoxySince}{Since}
1.\+7 
\end{DoxySince}


References ecore\+\_\+pipe\+\_\+add(), ecore\+\_\+pipe\+\_\+del(), ecore\+\_\+pipe\+\_\+write(), E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+CH, E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H\+\_\+\+S\+A\+FE, eina\+\_\+list\+\_\+remove\+\_\+list(), eina\+\_\+lock\+\_\+release(), eina\+\_\+lock\+\_\+take(), eina\+\_\+main\+\_\+loop\+\_\+define(), and unsetenv().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga12c98ccc13eb136ed62f8177d12a8fc0}\label{group__Ecore__Main__Loop__Group_ga12c98ccc13eb136ed62f8177d12a8fc0}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async@{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async@{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async()}{ecore\_main\_loop\_thread\_safe\_call\_async()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async (\begin{DoxyParamCaption}\item[{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}}]{callback,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Call callback asynchronously in the main loop. 

\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em callback} & The callback to call in the main loop \\
\hline
{\em data} & The data to give to that call back\\
\hline
\end{DoxyParams}
For all calls that need to happen in the main loop (most E\+FL functions do), this helper function provides the infrastructure needed to do it safely by avoiding dead lock, race condition and properly wake up the main loop.

Remember after that function call, you should never touch again the {\ttfamily data} in the thread, it is owned by the main loop and your callback should take care of freeing it if necessary. 

References E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, and eina\+\_\+main\+\_\+loop\+\_\+is().



Referenced by ecore\+\_\+thread\+\_\+feedback().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga0df1b736c7f358c1df054c126d8dbc00}\label{group__Ecore__Main__Loop__Group_ga0df1b736c7f358c1df054c126d8dbc00}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync@{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync@{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync()}{ecore\_main\_loop\_thread\_safe\_call\_sync()}}
{\footnotesize\ttfamily void$\ast$ ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync (\begin{DoxyParamCaption}\item[{\hyperlink{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}{Ecore\+\_\+\+Data\+\_\+\+Cb}}]{callback,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Call callback synchronously in the main loop. 

\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em callback} & The callback to call in the main loop \\
\hline
{\em data} & The data to give to that call back \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the value returned by the callback in the main loop
\end{DoxyReturn}
For all calls that need to happen in the main loop (most E\+FL functions do), this helper function provides the infrastructure needed to do it safely by avoiding dead lock, race condition and properly wake up the main loop.

Remember this function will block until the callback is executed in the main loop. It can take time and you have no guaranty about the timeline. 

References eina\+\_\+condition\+\_\+new(), eina\+\_\+condition\+\_\+wait(), E\+I\+N\+A\+\_\+\+F\+A\+L\+SE, eina\+\_\+lock\+\_\+new(), eina\+\_\+lock\+\_\+release(), eina\+\_\+lock\+\_\+take(), eina\+\_\+main\+\_\+loop\+\_\+is(), and E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gace69e5961a239cbf4f586fae651e4cc9}\label{group__Ecore__Main__Loop__Group_gace69e5961a239cbf4f586fae651e4cc9}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait@{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait}}
\index{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait@{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait()}{ecore\_main\_loop\_thread\_safe\_call\_wait()}}
{\footnotesize\ttfamily void ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait (\begin{DoxyParamCaption}\item[{double}]{wait }\end{DoxyParamCaption})}



Wait for the next thread call in the main loop. 

\begin{DoxySince}{Since}
1.\+13.\+0
\end{DoxySince}

\begin{DoxyParams}{Parameters}
{\em wait} & How long to wait for this callback to be called\\
\hline
\end{DoxyParams}
Note\+: This function should only be called in the main loop and will actually block the main loop until either a call is triggered from a thread or the time specified by wait has passed. 

References ecore\+\_\+pipe\+\_\+wait().



Referenced by ecore\+\_\+thread\+\_\+wait().

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}\label{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin@{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin}}
\index{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin@{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin()}{ecore\_thread\_main\_loop\_begin()}}
{\footnotesize\ttfamily int ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



This function suspend the main loop in a know state. 

\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
\begin{DoxyReturn}{Returns}
the number of time \hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin()} has been called in this thread, if the main loop was suspended correctly. If not, it return {\ttfamily -\/1}.
\end{DoxyReturn}
This function suspend the main loop in a know state, this let you use any E\+FL call you want after it return. Be carefully, the main loop is blocked until you call \hyperlink{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end()}. This is the only sane way to achieve pseudo thread safety.

Notice that until the main loop is blocked, the thread is blocked and their is noway around that.

We still advise you, when possible, to use \hyperlink{group__Ecore__Main__Loop__Group_ga12c98ccc13eb136ed62f8177d12a8fc0}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async()} as it will not block the thread nor the main loop. 

References eina\+\_\+condition\+\_\+new(), eina\+\_\+condition\+\_\+wait(), eina\+\_\+lock\+\_\+new(), eina\+\_\+lock\+\_\+release(), eina\+\_\+lock\+\_\+take(), eina\+\_\+main\+\_\+loop\+\_\+define(), eina\+\_\+main\+\_\+loop\+\_\+is(), and E\+I\+N\+A\+\_\+\+T\+R\+UE.

\mbox{\Hypertarget{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}\label{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}} 
\index{Ecore main loop@{Ecore main loop}!ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end@{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end}}
\index{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end@{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end}!Ecore main loop@{Ecore main loop}}
\subsubsection{\texorpdfstring{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end()}{ecore\_thread\_main\_loop\_end()}}
{\footnotesize\ttfamily int ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Unlock the main loop. 

\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
\begin{DoxyReturn}{Returns}
the number of time \hyperlink{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end()} need to be called before the main loop is unlocked again. {\ttfamily -\/1} will be returned if you are trying to unlock when there wasn\textquotesingle{}t enough call to \hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin()}.
\end{DoxyReturn}
After a call to \hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin()}, you need to absolutely call \hyperlink{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end()}, or you application will stay frozen. 

References eina\+\_\+condition\+\_\+broadcast(), eina\+\_\+condition\+\_\+wait(), eina\+\_\+lock\+\_\+release(), eina\+\_\+lock\+\_\+take(), eina\+\_\+main\+\_\+loop\+\_\+is(), and E\+RR.

