\hypertarget{group__Ecore__Job__Group}{}\doxysection{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.  


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


\doxysubsection{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\textquotesingle{}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 \mbox{\hyperlink{group__Ecore__Job__Group_ga51a4bfa938b1205aead7d0dd2dae83db}{Ecore\+\_\+\+Job}} \+: \begin{DoxyItemize}
\item \mbox{\hyperlink{ecore_job_example_c}{ecore\+\_\+job -\/ Queuing tasks}} \end{DoxyItemize}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{group__Ecore__Job__Group_ga51a4bfa938b1205aead7d0dd2dae83db}\label{group__Ecore__Job__Group_ga51a4bfa938b1205aead7d0dd2dae83db}} 
\index{Ecore Job functions@{Ecore Job functions}!Ecore\_Job@{Ecore\_Job}}
\index{Ecore\_Job@{Ecore\_Job}!Ecore Job functions@{Ecore Job functions}}
\doxysubsubsection{\texorpdfstring{Ecore\_Job}{Ecore\_Job}}
{\footnotesize\ttfamily typedef struct \+\_\+\+Ecore\+\_\+\+Job \mbox{\hyperlink{group__Ecore__Job__Group_ga51a4bfa938b1205aead7d0dd2dae83db}{Ecore\+\_\+\+Job}}}



A job handle. 

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


\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Ecore__Job__Group_ga0f9f52dc3b3afad5cea1b5924f432b83}\label{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}}
\doxysubsubsection{\texorpdfstring{ecore\_job\_add()}{ecore\_job\_add()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__Ecore__Job__Group_ga51a4bfa938b1205aead7d0dd2dae83db}{Ecore\+\_\+\+Job}}$\ast$ ecore\+\_\+job\+\_\+add (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Ecore__Main__Loop__Group_ga00aa98b68b33de046b49a0158956874f}{Ecore\+\_\+\+Cb}}}]{func,  }\item[{const void $\ast$}]{data }\end{DoxyParamCaption})}



Adds 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\+LL} 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}


References ecore\+\_\+event\+\_\+add(), 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, and E\+RR.



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

\mbox{\Hypertarget{group__Ecore__Job__Group_ga0fe8d42a1b07963b48d7bb175ee39558}\label{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}}
\doxysubsubsection{\texorpdfstring{ecore\_job\_del()}{ecore\_job\_del()}}
{\footnotesize\ttfamily void$\ast$ ecore\+\_\+job\+\_\+del (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group__Ecore__Job__Group_ga51a4bfa938b1205aead7d0dd2dae83db}{Ecore\+\_\+\+Job}} $\ast$}]{obj }\end{DoxyParamCaption})}



Deletes 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
\mbox{\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\+AL.



Referenced by elm\+\_\+store\+\_\+free().

