\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 
\mbox{\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 
\mbox{\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 
\mbox{\hyperlink{group__Ecore__FD__Handler__Group}{File Descriptor Handling Functions}}
\begin{DoxyCompactList}\small\item\em Definition for functions that deal with file descriptor handlers. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Ecore__Thread__Group}{Ecore Thread functions}}
\begin{DoxyCompactList}\small\item\em ~\newline


Facilities to run heavy tasks in different threads to avoid blocking the main loop. \end{DoxyCompactList}\item 
\mbox{\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 
\mbox{\hyperlink{group__Ecore__Throttle__Group}{Ecore Throttle functions}}
\item 
\mbox{\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 
\mbox{\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 
\mbox{\hyperlink{group__Ecore__Timer__Group}{Ecore Timer functions}}
\begin{DoxyCompactList}\small\item\em Ecore provides very flexible timer functionality. \end{DoxyCompactList}\item 
\mbox{\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 \mbox{\hyperlink{group__Ecore__Event__Group}{events}}, \mbox{\hyperlink{group__Ecore__Timer__Group}{timers}} or \mbox{\hyperlink{group__Ecore__FD__Handler__Group}{fd handlers}}. \end{DoxyCompactList}\item 
\mbox{\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 \mbox{\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 \mbox{\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 \mbox{\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 \mbox{\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}}~\mbox{\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga1ee9db07f9a46a8b20fb83e1c6dbed09}{E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+N\+EW}}~\mbox{\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 \mbox{\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}}~\mbox{\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga780091d7d49a4bb6cb753f12e1a3b19d}{E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+D\+O\+NE}}~\mbox{\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 \mbox{\hyperlink{struct__Ecore__Version}{\+\_\+\+Ecore\+\_\+\+Version}} \mbox{\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 \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}($\ast$ \mbox{\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$ \mbox{\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$ \mbox{\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$ \mbox{\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 \mbox{\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 \mbox{\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 blocking/non-\/blocking status. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set}} (\mbox{\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 are 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}} 
\mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaaa812c3d1e70623817acce9dcd2e8b71}{Ecore\+\_\+\+Select\+\_\+\+Function}} \mbox{\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 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate}} (void)
\begin{DoxyCompactList}\small\item\em Requests ecore to integrate G\+Lib\textquotesingle{}s main loop. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga41c7d11043af50636ec75082c9d745c8}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+always\+\_\+integrate\+\_\+disable}} (void)
\begin{DoxyCompactList}\small\item\em Disables always integrating G\+Lib. \end{DoxyCompactList}\item 
void \mbox{\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 \mbox{\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 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\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 \mbox{\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 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gad4c3bd5fb81af093ce3d64f6f8331043}{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add}} (\mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Adds a function to be called by \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset()}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga10a1b477404946b0de4d01e32f84fec5}{ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del}} (\mbox{\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaadff0a56ba8818d8a35f9dc95e25a808}{ecore\+\_\+fork\+\_\+reset}} (void)
\begin{DoxyCompactList}\small\item\em Resets the ecore internal state after a fork. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga12c98ccc13eb136ed62f8177d12a8fc0}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+async}} (\mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}} callback, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Calls callback asynchronously in the main loop. \end{DoxyCompactList}\item 
void $\ast$ \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga0df1b736c7f358c1df054c126d8dbc00}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync}} (\mbox{\hyperlink{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}{Ecore\+\_\+\+Data\+\_\+\+Cb}} callback, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Calls callback synchronously in the main loop. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gace69e5961a239cbf4f586fae651e4cc9}{ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+wait}} (double wait)
\begin{DoxyCompactList}\small\item\em Waits for the next thread call in the main loop. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin}} (void)
\begin{DoxyCompactList}\small\item\em This function suspends the main loop in a know state. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end}} (void)
\begin{DoxyCompactList}\small\item\em Unlocks 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}} 
\mbox{\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 functions 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\+: \mbox{\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 \mbox{\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->\mbox{\hyperlink{struct__Ecore__Version_ac3bcd4d76cfefe97fc9fd71e69f6cd01}{minor}},
       ecore\_version->\mbox{\hyperlink{struct__Ecore__Version_a673a3497ce65f68ab07cb85506c9eba0}{micro}});
\textcolor{keywordflow}{if} (ecore\_version->\mbox{\hyperlink{struct__Ecore__Version_a8beca63d7a015794188a5646f33774b6}{revision}} > 0)
  \{
    printf(\textcolor{stringliteral}{"  Built from Git revision # %i\(\backslash\)n"}, ecore\_version->\mbox{\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 keeping watch 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}
\mbox{\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 ecore\+\_\+con\+\_\+server\+\_\+flush(), ecore\+\_\+ipc\+\_\+server\+\_\+flush(), elm\+\_\+quicklaunch\+\_\+seed(), elm\+\_\+shutdown(), and 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 blocking/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 \mbox{\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}
{\ttfamily 1} if event exists, else {\ttfamily 0}. 
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\mbox{\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[{\mbox{\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 are ready for some class of I/O operation. 

This function will be used instead of the system call select and could possibly 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 \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



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

This will add a small overhead during every main loop interaction by checking G\+Lib\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()}}.

This will cooperate with previously set \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gab140536aa1a0f69136f50cc927b8cede}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+set()}} by calling the old function. Similarly, if you want to override \mbox{\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga5e959406d2cc4aac55e040d47e42f5bd}{ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+get()}} right after \mbox{\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})
\{
   \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\_init}}();
   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\_main\_loop\_glib\_integrate}}();

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

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

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

   \textcolor{keywordflow}{return} 0;
\}
\end{DoxyCode}
 \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 due to no G\+Lib support in Ecore. 
\end{DoxyReturn}
\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}


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})}



Disables always integrating G\+Lib. 

If ecore is compiled with --with-\/glib=always (to always call \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga111f77f35bf6f6065357dd0033d75e5c}{ecore\+\_\+main\+\_\+loop\+\_\+glib\+\_\+integrate()}} when \mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}} is called), then calling this before calling \mbox{\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 \mbox{\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. (\mbox{\hyperlink{group__Ecore__Init__Group_ga77757609684a2c922dc5ec398274751b}{ecore\+\_\+init()}}, \mbox{\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga0b23ea5d7f31f45e2c2f37d4393ddb2e}{ecore\+\_\+main\+\_\+loop\+\_\+iterate()}} internally.

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



Referenced by elm\+\_\+run().

\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 \mbox{\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
\mbox{\hyperlink{banshee_8c-example}{banshee.\+c}}, \mbox{\hyperlink{client_8c-example}{client.\+c}}, \mbox{\hyperlink{complex-types_8c-example}{complex-\/types.\+c}}, \mbox{\hyperlink{ecore_con_client_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_con_client_simple_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+simple\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_con_lookup_example_8c-example}{ecore\+\_\+con\+\_\+lookup\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_con_url_cookies_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+cookies\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_con_url_download_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+download\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_con_url_headers_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+headers\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_evas_basics_example_8c-example}{ecore\+\_\+evas\+\_\+basics\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_evas_buffer_example_02_8c-example}{ecore\+\_\+evas\+\_\+buffer\+\_\+example\+\_\+02.\+c}}, \mbox{\hyperlink{ecore_evas_callbacks_8c-example}{ecore\+\_\+evas\+\_\+callbacks.\+c}}, \mbox{\hyperlink{ecore_evas_window_sizes_example_8c-example}{ecore\+\_\+evas\+\_\+window\+\_\+sizes\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_event_example_01_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+01.\+c}}, \mbox{\hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+c}}, \mbox{\hyperlink{ecore_exe_example_8c-example}{ecore\+\_\+exe\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_exe_example_child_8c-example}{ecore\+\_\+exe\+\_\+example\+\_\+child.\+c}}, \mbox{\hyperlink{ecore_fd_handler_example_8c-example}{ecore\+\_\+fd\+\_\+handler\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_fd_handler_gnutls_example_8c-example}{ecore\+\_\+fd\+\_\+handler\+\_\+gnutls\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_idler_example_8c-example}{ecore\+\_\+idler\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_job_example_8c-example}{ecore\+\_\+job\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_pipe_simple_example_8c-example}{ecore\+\_\+pipe\+\_\+simple\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_poller_example_8c-example}{ecore\+\_\+poller\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}}, \mbox{\hyperlink{ecore_time_functions_example_8c-example}{ecore\+\_\+time\+\_\+functions\+\_\+example.\+c}}, \mbox{\hyperlink{edje-basic_8c-example}{edje-\/basic.\+c}}, \mbox{\hyperlink{edje-box_8c-example}{edje-\/box.\+c}}, \mbox{\hyperlink{edje-box2_8c-example}{edje-\/box2.\+c}}, \mbox{\hyperlink{edje-color-class_8c-example}{edje-\/color-\/class.\+c}}, \mbox{\hyperlink{edje-drag_8c-example}{edje-\/drag.\+c}}, \mbox{\hyperlink{edje-perspective_8c-example}{edje-\/perspective.\+c}}, \mbox{\hyperlink{edje-signals-messages_8c-example}{edje-\/signals-\/messages.\+c}}, \mbox{\hyperlink{edje-swallow_8c-example}{edje-\/swallow.\+c}}, \mbox{\hyperlink{edje-table_8c-example}{edje-\/table.\+c}}, \mbox{\hyperlink{edje-text_8c-example}{edje-\/text.\+c}}, \mbox{\hyperlink{eio_file_ls_8c-example}{eio\+\_\+file\+\_\+ls.\+c}}, \mbox{\hyperlink{evas-box_8c-example}{evas-\/box.\+c}}, \mbox{\hyperlink{evas-hints_8c-example}{evas-\/hints.\+c}}, \mbox{\hyperlink{evas-images_8c-example}{evas-\/images.\+c}}, \mbox{\hyperlink{evas-images2_8c-example}{evas-\/images2.\+c}}, \mbox{\hyperlink{evas-map-utils_8c-example}{evas-\/map-\/utils.\+c}}, \mbox{\hyperlink{evas-smart-interface_8c-example}{evas-\/smart-\/interface.\+c}}, \mbox{\hyperlink{evas-smart-object_8c-example}{evas-\/smart-\/object.\+c}}, \mbox{\hyperlink{evas-stacking_8c-example}{evas-\/stacking.\+c}}, \mbox{\hyperlink{evas-table_8c-example}{evas-\/table.\+c}}, \mbox{\hyperlink{evas-text_8c-example}{evas-\/text.\+c}}, and \mbox{\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.



Referenced by elm\+\_\+exit().

\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 \mbox{\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}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} if an animator has been called, {\ttfamily 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, {\ttfamily 0} if not running, $>$ {\ttfamily 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 \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}}}]{func,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Adds a function to be called by \mbox{\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 \mbox{\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}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, else {\ttfamily 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(), and eldbus\+\_\+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 \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} ecore\+\_\+fork\+\_\+reset\+\_\+callback\+\_\+del (\begin{DoxyParamCaption}\item[{\mbox{\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 \mbox{\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}
{\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+UE} on success, else {\ttfamily 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.



Referenced by eeze\+\_\+udev\+\_\+watch\+\_\+del(), and eldbus\+\_\+shutdown().

\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})}



Resets 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().



Referenced by elm\+\_\+quicklaunch\+\_\+fork().

\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[{\mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}}}]{callback,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Calls 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[{\mbox{\hyperlink{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}{Ecore\+\_\+\+Data\+\_\+\+Cb}}}]{callback,  }\item[{void $\ast$}]{data }\end{DoxyParamCaption})}



Calls 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})}



Waits 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 suspends the main loop in a know state. 

\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
\begin{DoxyReturn}{Returns}
The number of time \mbox{\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 \mbox{\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 \mbox{\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 efl\+\_\+domain\+\_\+data\+\_\+adopt(), E\+F\+L\+\_\+\+I\+D\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+I\+N\+V\+A\+L\+ID, eina\+\_\+condition\+\_\+new(), eina\+\_\+condition\+\_\+wait(), eina\+\_\+lock\+\_\+new(), eina\+\_\+lock\+\_\+release(), eina\+\_\+lock\+\_\+take(), eina\+\_\+main\+\_\+loop\+\_\+define(), eina\+\_\+main\+\_\+loop\+\_\+is(), E\+I\+N\+A\+\_\+\+T\+R\+UE, and E\+RR.

\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})}



Unlocks the main loop. 

\begin{DoxySince}{Since}
1.\+1.\+0
\end{DoxySince}
\begin{DoxyReturn}{Returns}
The number of time \mbox{\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 \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin()}}.
\end{DoxyReturn}
After a call to \mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga0624ccd91c607ed241f45ac1da8875a6}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin()}}, you need to absolutely call \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gabd2ff96845800d5fcb7cd2607fffa296}{ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end()}}, or you application will stay frozen. 

References efl\+\_\+domain\+\_\+data\+\_\+return(), E\+F\+L\+\_\+\+I\+D\+\_\+\+D\+O\+M\+A\+I\+N\+\_\+\+I\+N\+V\+A\+L\+ID, eina\+\_\+condition\+\_\+broadcast(), eina\+\_\+condition\+\_\+wait(), eina\+\_\+lock\+\_\+release(), eina\+\_\+lock\+\_\+take(), eina\+\_\+main\+\_\+loop\+\_\+is(), and E\+RR.

