\hypertarget{group__Ecore__Job__Group}{\section{Ecore Job functions}
\label{group__Ecore__Job__Group}\index{Ecore Job functions@{Ecore Job functions}}
}


You can queue jobs that are to be done by the main loop when the current event is dealt with.  


\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef \hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} \hyperlink{group__Ecore__Job__Group_ga2942e879ec428e9f5156a4ba688217ed}{Ecore\+\_\+\+Job}
\begin{DoxyCompactList}\small\item\em A job handle. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Ecore__Job__Group_ga2942e879ec428e9f5156a4ba688217ed}{Ecore\+\_\+\+Job} $\ast$ \hyperlink{group__Ecore__Job__Group_ga0f9f52dc3b3afad5cea1b5924f432b83}{ecore\+\_\+job\+\_\+add} (\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add a job to the event queue. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Job__Group_ga0fe8d42a1b07963b48d7bb175ee39558}{ecore\+\_\+job\+\_\+del} (\hyperlink{group__Ecore__Job__Group_ga2942e879ec428e9f5156a4ba688217ed}{Ecore\+\_\+\+Job} $\ast$obj)
\begin{DoxyCompactList}\small\item\em Delete a queued job that has not yet been executed. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
You can queue jobs that are to be done by the main loop when the current event is dealt with. 

Jobs are processed by the main loop similarly to events. They also will be executed in the order in which they were added.

A good use for them is when you don't want to execute an action immediately, but want to give the control back to the main loop so that it will call your job callback when jobs start being processed (and if there are other jobs added before yours, they will be processed first). This also gives the chance to other actions in your program to cancel the job before it is started.

Examples of using \hyperlink{group__Ecore__Job__Group_ga2942e879ec428e9f5156a4ba688217ed}{Ecore\+\_\+\+Job} \+: \begin{DoxyItemize}
\item \hyperlink{ecore_job_example_c}{ecore\+\_\+job -\/ Queuing tasks} \end{DoxyItemize}


\subsection{Typedef Documentation}
\hypertarget{group__Ecore__Job__Group_ga2942e879ec428e9f5156a4ba688217ed}{\index{Ecore Job functions@{Ecore Job functions}!Ecore\+\_\+\+Job@{Ecore\+\_\+\+Job}}
\index{Ecore\+\_\+\+Job@{Ecore\+\_\+\+Job}!Ecore Job functions@{Ecore Job functions}}
\subsubsection[{Ecore\+\_\+\+Job}]{\setlength{\rightskip}{0pt plus 5cm}typedef {\bf Eo} {\bf Ecore\+\_\+\+Job}}}\label{group__Ecore__Job__Group_ga2942e879ec428e9f5156a4ba688217ed}


A job handle. 

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


\subsection{Function Documentation}
\hypertarget{group__Ecore__Job__Group_ga0f9f52dc3b3afad5cea1b5924f432b83}{\index{Ecore Job functions@{Ecore Job functions}!ecore\+\_\+job\+\_\+add@{ecore\+\_\+job\+\_\+add}}
\index{ecore\+\_\+job\+\_\+add@{ecore\+\_\+job\+\_\+add}!Ecore Job functions@{Ecore Job functions}}
\subsubsection[{ecore\+\_\+job\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Ecore\+\_\+\+Job}$\ast$ ecore\+\_\+job\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Cb}}]{func, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Ecore__Job__Group_ga0f9f52dc3b3afad5cea1b5924f432b83}


Add a job to the event queue. 


\begin{DoxyParams}{Parameters}
{\em func} & The function to call when the job gets handled. \\
\hline
{\em data} & Data pointer to be passed to the job function when the job is handled. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The handle of the job. {\ttfamily N\+U\+L\+L} is returned if the job could not be added to the queue. 
\end{DoxyReturn}
\begin{DoxyNote}{Note}
Once the job has been executed, the job handle is invalid. 
\end{DoxyNote}


Referenced by efreet\+\_\+icon\+\_\+extra\+\_\+list\+\_\+get().

\hypertarget{group__Ecore__Job__Group_ga0fe8d42a1b07963b48d7bb175ee39558}{\index{Ecore Job functions@{Ecore Job functions}!ecore\+\_\+job\+\_\+del@{ecore\+\_\+job\+\_\+del}}
\index{ecore\+\_\+job\+\_\+del@{ecore\+\_\+job\+\_\+del}!Ecore Job functions@{Ecore Job functions}}
\subsubsection[{ecore\+\_\+job\+\_\+del}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ecore\+\_\+job\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Job} $\ast$}]{obj}
\end{DoxyParamCaption}
)}}\label{group__Ecore__Job__Group_ga0fe8d42a1b07963b48d7bb175ee39558}


Delete a queued job that has not yet been executed. 


\begin{DoxyParams}{Parameters}
{\em obj} & Handle of the job to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data pointer that was to be passed to the job. 
\end{DoxyReturn}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_job_example_8c-example}{ecore\+\_\+job\+\_\+example.\+c}.\end{Desc}


References ecore\+\_\+event\+\_\+del(), 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\+A\+L.

