\hypertarget{group__Evas__Canvas__Events}{\section{Canvas Events}
\label{group__Evas__Canvas__Events}\index{Canvas Events@{Canvas Events}}
}


Functions relating to canvas events, which are mainly reports on its internal states changing (an object got focused, the rendering is updated, etc).  


\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Evas__Event__Freezing__Group}{Input Events Freezing Functions}
\begin{DoxyCompactList}\small\item\em Functions that deal with the freezing of input event processing of an Evas canvas. \end{DoxyCompactList}\item 
\hyperlink{group__Evas__Event__Feeding__Group}{Input Events Feeding Functions}
\begin{DoxyCompactList}\small\item\em Functions to tell Evas that input events happened and should be processed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\+\_\+event\+\_\+callback\+\_\+add} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a076b2a9b2de2b2144a4193b1d12ed448}{Evas\+\_\+\+Callback\+\_\+\+Type} type, \hyperlink{Evas__Common_8h_af48c3f57abce01f023246d85135801d7}{Evas\+\_\+\+Event\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add (register) a callback function to a given canvas event. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas__Events_ga466fbd13d4f7422e984a1f2c01397e4e}{evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a076b2a9b2de2b2144a4193b1d12ed448}{Evas\+\_\+\+Callback\+\_\+\+Type} type, \hyperlink{Evas__Common_8h_a569c486e7bbb47ad28baaec79eb1ff3b}{Evas\+\_\+\+Callback\+\_\+\+Priority} priority, \hyperlink{Evas__Common_8h_af48c3f57abce01f023246d85135801d7}{Evas\+\_\+\+Event\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add (register) a callback function to a given canvas event with a non-\/default priority set. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Evas__Canvas__Events_ga176cd73f1afdf62b55a912cd728b892e}{evas\+\_\+event\+\_\+callback\+\_\+del} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a076b2a9b2de2b2144a4193b1d12ed448}{Evas\+\_\+\+Callback\+\_\+\+Type} type, \hyperlink{Evas__Common_8h_af48c3f57abce01f023246d85135801d7}{Evas\+\_\+\+Event\+\_\+\+Cb} func)
\begin{DoxyCompactList}\small\item\em Delete a callback function from the canvas. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a076b2a9b2de2b2144a4193b1d12ed448}{Evas\+\_\+\+Callback\+\_\+\+Type} type, \hyperlink{Evas__Common_8h_af48c3f57abce01f023246d85135801d7}{Evas\+\_\+\+Event\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Delete (unregister) a callback function registered to a given canvas event. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas__Events_gac8521438f0d0c6709e8a1ed78b0ff7c3}{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a75a8b15bf948ad20044d0b5c57e9e5ad}{Evas\+\_\+\+Object\+\_\+\+Event\+\_\+\+Post\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Push a callback on the post-\/event callback stack. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas__Events_gaf15646313dc5814e690e41bf78c6135a}{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a75a8b15bf948ad20044d0b5c57e9e5ad}{Evas\+\_\+\+Object\+\_\+\+Event\+\_\+\+Post\+\_\+\+Cb} func)
\begin{DoxyCompactList}\small\item\em Remove a callback from the post-\/event callback stack. \end{DoxyCompactList}\item 
void \hyperlink{group__Evas__Canvas__Events_ga27e99c1ecaece9da32cff27e682a631c}{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full} (\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} $\ast$e, \hyperlink{Evas__Common_8h_a75a8b15bf948ad20044d0b5c57e9e5ad}{Evas\+\_\+\+Object\+\_\+\+Event\+\_\+\+Post\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Remove a callback from the post-\/event callback stack. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Functions relating to canvas events, which are mainly reports on its internal states changing (an object got focused, the rendering is updated, etc). 

Some of the functions in this group are exemplified \hyperlink{Example_Evas_Events}{here}. 

\subsection{Function Documentation}
\hypertarget{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{\index{Canvas Events@{Canvas Events}!evas\+\_\+event\+\_\+callback\+\_\+add@{evas\+\_\+event\+\_\+callback\+\_\+add}}
\index{evas\+\_\+event\+\_\+callback\+\_\+add@{evas\+\_\+event\+\_\+callback\+\_\+add}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+event\+\_\+callback\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+event\+\_\+callback\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Callback\+\_\+\+Type}}]{type, }
\item[{{\bf Evas\+\_\+\+Event\+\_\+\+Cb}}]{func, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}


Add (register) a callback function to a given canvas event. 


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to attach a callback to \\
\hline
{\em type} & The type of event that will trigger the callback \\
\hline
{\em func} & The (callback) function to be called when the event is triggered \\
\hline
{\em data} & The data pointer to be passed to {\ttfamily func} \\
\hline
\end{DoxyParams}
This function adds a function callback to the canvas {\ttfamily e} when the event of type {\ttfamily type} occurs on it. The function pointer is {\ttfamily func}.

In the event of a memory allocation error during the addition of the callback to the canvas, \hyperlink{group__Evas__Main__Group_gacfae4f589c777003f58d51e502c52835}{evas\+\_\+alloc\+\_\+error()} should be used to determine the nature of the error, if any, and the program should sensibly try and recover.

A callback function must have the \hyperlink{Evas__Common_8h_af48c3f57abce01f023246d85135801d7}{Evas\+\_\+\+Event\+\_\+\+Cb} prototype definition. The first parameter ({\ttfamily data}) in this definition will have the same value passed to \hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\+\_\+event\+\_\+callback\+\_\+add()} as the {\ttfamily data} parameter, at runtime. The second parameter {\ttfamily e} is the canvas pointer on which the event occurred. The third parameter {\ttfamily event\+\_\+info} is a pointer to a data structure that may or may not be passed to the callback, depending on the event type that triggered the callback. This is so because some events don't carry extra context with them, but others do.

The event type {\ttfamily type} to trigger the function may be one of \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa5a68e4f5dccdc18a393ef4a4773236c3}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+N\+D\+E\+R\+\_\+\+F\+L\+U\+S\+H\+\_\+\+P\+R\+E}, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa4fb1f9e790a22f8e22b63faadf0133c1}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+N\+D\+E\+R\+\_\+\+F\+L\+U\+S\+H\+\_\+\+P\+O\+S\+T}, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aac3a1defaffac4dcb6fe9e568919c45d1}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+A\+N\+V\+A\+S\+\_\+\+F\+O\+C\+U\+S\+\_\+\+I\+N}, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa444e79ca91d910d500dc26f71cf0518f}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+A\+N\+V\+A\+S\+\_\+\+F\+O\+C\+U\+S\+\_\+\+O\+U\+T}, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa7380ca16bf87762e96309473d3d306c5}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+A\+N\+V\+A\+S\+\_\+\+O\+B\+J\+E\+C\+T\+\_\+\+F\+O\+C\+U\+S\+\_\+\+I\+N} and \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa974f3364f1cee80e98bc5ff3e01d3070}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+C\+A\+N\+V\+A\+S\+\_\+\+O\+B\+J\+E\+C\+T\+\_\+\+F\+O\+C\+U\+S\+\_\+\+O\+U\+T}. This determines the kind of event that will trigger the callback to be called. Only the last two of the event types listed here provide useful event information data -- a pointer to the recently focused Evas object. For the others the {\ttfamily event\+\_\+info} pointer is going to be {\ttfamily N\+U\+L\+L}.

Example\+:  
\begin{DoxyCodeInclude}
1    evas\_event\_callback\_add(d.canvas, EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE,
2                            \_render\_flush\_cb, NULL);
3    if (evas\_alloc\_error() != EVAS\_ALLOC\_ERROR\_NONE)
4      \{
5         fprintf(stderr, "ERROR: Callback registering failed! Aborting.\(\backslash\)n");
6         goto panic;
7      \}
8 
9    evas\_event\_callback\_add(d.canvas, EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN,
10                            \_object\_focus\_in\_cb, NULL);
11    if (evas\_alloc\_error() != EVAS\_ALLOC\_ERROR\_NONE)
12      \{
13         fprintf(stderr, "ERROR: Callback registering failed! Aborting.\(\backslash\)n");
14         goto panic;
15      \} /* two canvas event callbacks */

\end{DoxyCodeInclude}


Looking to the callbacks registered above,  
\begin{DoxyCodeInclude}
1 /* called when our rectangle gets focus */
2 static void
3 \_object\_focus\_in\_cb(void *data EINA\_UNUSED,
4                     Evas *e,
5                     void *event\_info)
6 \{
7    fprintf(stdout, "An object got focused: %s\(\backslash\)n",
8            evas\_object\_name\_get(event\_info));
9 
10    fprintf(stdout, "Let's recheck it: %s\(\backslash\)n",
11            evas\_object\_name\_get(evas\_focus\_get(e)));
12 
13    fprintf(stdout, "And again: %s\(\backslash\)n", evas\_object\_focus\_get(event\_info) ?
14            "OK!" : "Oops, something is bad.");
15 \}
16 
17 /* render flush callback */
18 static void
19 \_render\_flush\_cb(void *data EINA\_UNUSED,
20                  Evas *e EINA\_UNUSED,
21                  void *event\_info EINA\_UNUSED)
22 \{
23    fprintf(stdout, "Canvas is about to flush its rendering pipeline!\(\backslash\)n");
24 \}
25 
26 /* put some action in the canvas */
27 static Eina\_Bool
28 \_resize\_cb(void *data EINA\_UNUSED)
29 \{
30    int w, h, cw, ch;
31 
32    evas\_object\_geometry\_get(d.img, NULL, NULL, &w, &h);
33    ecore\_evas\_geometry\_get(d.ee, NULL, NULL, &cw, &ch);
34 
35    if (w < cw)
36      evas\_object\_resize(d.img, cw, ch);
37    else
38      evas\_object\_resize(d.img, cw / 2, ch / 2);
39 
40    return EINA\_TRUE; /* re-issue the timer */
41 \}
42 
43 /* let's have our events back */

\end{DoxyCodeInclude}


we see that the canvas flushes its rendering pipeline (\hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa5a68e4f5dccdc18a393ef4a4773236c3}{E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+R\+E\+N\+D\+E\+R\+\_\+\+F\+L\+U\+S\+H\+\_\+\+P\+R\+E}) whenever the {\ttfamily \+\_\+resize\+\_\+cb} routine takes place\+: it has to redraw that image at a different size. Also, the callback on an object being focused comes just after we focus it explicitly, on code.

See the full \hyperlink{Example_Evas_Events}{example}.

\begin{DoxyNote}{Note}
Be careful not to add the same callback multiple times, if that's not what you want, because Evas won't check if a callback existed before exactly as the one being registered (and thus, call it more than once on the event, in this case). This would make sense if you passed different functions and/or callback data, only. 
\end{DoxyNote}


References E\+V\+A\+S\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+P\+R\+I\+O\+R\+I\+T\+Y\+\_\+\+D\+E\+F\+A\+U\+L\+T, and evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add().

\hypertarget{group__Evas__Canvas__Events_ga466fbd13d4f7422e984a1f2c01397e4e}{\index{Canvas Events@{Canvas Events}!evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add@{evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add}}
\index{evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add@{evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+event\+\_\+callback\+\_\+priority\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Callback\+\_\+\+Type}}]{type, }
\item[{{\bf Evas\+\_\+\+Callback\+\_\+\+Priority}}]{priority, }
\item[{{\bf Evas\+\_\+\+Event\+\_\+\+Cb}}]{func, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_ga466fbd13d4f7422e984a1f2c01397e4e}


Add (register) a callback function to a given canvas event with a non-\/default priority set. 

Except for the priority field, it's exactly the same as \hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\+\_\+event\+\_\+callback\+\_\+add}


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to attach a callback to \\
\hline
{\em type} & The type of event that will trigger the callback \\
\hline
{\em priority} & The priority of the callback, lower values called first. \\
\hline
{\em func} & The (callback) function to be called when the event is triggered \\
\hline
{\em data} & The data pointer to be passed to {\ttfamily func} \\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\+\_\+event\+\_\+callback\+\_\+add} 
\end{DoxySeeAlso}
\begin{DoxySince}{Since}
1.\+1 
\end{DoxySince}


References eina\+\_\+inlist\+\_\+append(), and E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+E\+T.



Referenced by evas\+\_\+event\+\_\+callback\+\_\+add().

\hypertarget{group__Evas__Canvas__Events_ga176cd73f1afdf62b55a912cd728b892e}{\index{Canvas Events@{Canvas Events}!evas\+\_\+event\+\_\+callback\+\_\+del@{evas\+\_\+event\+\_\+callback\+\_\+del}}
\index{evas\+\_\+event\+\_\+callback\+\_\+del@{evas\+\_\+event\+\_\+callback\+\_\+del}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+event\+\_\+callback\+\_\+del}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evas\+\_\+event\+\_\+callback\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Callback\+\_\+\+Type}}]{type, }
\item[{{\bf Evas\+\_\+\+Event\+\_\+\+Cb}}]{func}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_ga176cd73f1afdf62b55a912cd728b892e}


Delete a callback function from the canvas. 


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to remove a callback from \\
\hline
{\em type} & The type of event that was triggering the callback \\
\hline
{\em func} & The function that was to be called when the event was triggered \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data pointer that was to be passed to the callback
\end{DoxyReturn}
This function removes the most recently added callback from the canvas {\ttfamily e} which was triggered by the event type {\ttfamily type} and was calling the function {\ttfamily func} when triggered. If the removal is successful it will also return the data pointer that was passed to \hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\+\_\+event\+\_\+callback\+\_\+add()} when the callback was added to the canvas. If not successful {\ttfamily N\+U\+L\+L} will be returned.

Example\+: 
\begin{DoxyCode}
1 extern Evas *e;
2 void *my\_data;
3 void focus\_in\_callback(void *data, Evas *e, void *event\_info);
4 
5 my\_data = evas\_event\_callback\_del(ebject, EVAS\_CALLBACK\_CANVAS\_FOCUS\_IN, focus\_in\_callback);
\end{DoxyCode}
 

References E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H, E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+E\+T, and eina\+\_\+inlist\+\_\+remove().

\hypertarget{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{\index{Canvas Events@{Canvas Events}!evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full@{evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full}}
\index{evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full@{evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ evas\+\_\+event\+\_\+callback\+\_\+del\+\_\+full (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Callback\+\_\+\+Type}}]{type, }
\item[{{\bf Evas\+\_\+\+Event\+\_\+\+Cb}}]{func, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}


Delete (unregister) a callback function registered to a given canvas event. 


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to remove an event callback from \\
\hline
{\em type} & The type of event that was triggering the callback \\
\hline
{\em func} & The function that was to be called when the event was triggered \\
\hline
{\em data} & The data pointer that was to be passed to the callback \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data pointer that was to be passed to the callback
\end{DoxyReturn}
This function removes {\bfseries the first} added callback from the canvas {\ttfamily e} matching the event type {\ttfamily type}, the registered function pointer {\ttfamily func} and the callback data pointer {\ttfamily data}. If the removal is successful it will also return the data pointer that was passed to \hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\+\_\+event\+\_\+callback\+\_\+add()} (that will be the same as the parameter) when the callback(s) was(were) added to the canvas. If not successful {\ttfamily N\+U\+L\+L} will be returned. A common use would be to remove an exact match of a callback.

Example\+:  
\begin{DoxyCodeInclude}
1         evas\_event\_callback\_del\_full(evas, EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE,
2                                      \_render\_flush\_cb, NULL);
3         evas\_event\_callback\_del\_full(
4           evas, EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN,
5           \_object\_focus\_in\_cb, NULL);

\end{DoxyCodeInclude}


See the full \hyperlink{Example_Evas_Events}{example}.

\begin{DoxyNote}{Note}
For deletion of canvas events callbacks filtering by just type and function pointer, user \hyperlink{group__Evas__Canvas__Events_ga176cd73f1afdf62b55a912cd728b892e}{evas\+\_\+event\+\_\+callback\+\_\+del()}. 
\end{DoxyNote}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_imf_example_8c-example}{ecore\+\_\+imf\+\_\+example.\+c}, and \hyperlink{evas-events_8c-example}{evas-\/events.\+c}.\end{Desc}


References E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H, E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+E\+T, and eina\+\_\+inlist\+\_\+remove().

\hypertarget{group__Evas__Canvas__Events_gac8521438f0d0c6709e8a1ed78b0ff7c3}{\index{Canvas Events@{Canvas Events}!evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push@{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push}}
\index{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push@{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Object\+\_\+\+Event\+\_\+\+Post\+\_\+\+Cb}}]{func, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_gac8521438f0d0c6709e8a1ed78b0ff7c3}


Push a callback on the post-\/event callback stack. 


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to push the callback on \\
\hline
{\em func} & The function that to be called when the stack is unwound \\
\hline
{\em data} & The data pointer to be passed to the callback\\
\hline
\end{DoxyParams}
Evas has a stack of callbacks that get called after all the callbacks for an event have triggered (all the objects it triggers on and all the callbacks in each object triggered). When all these have been called, the stack is unwond from most recently to least recently pushed item and removed from the stack calling the callback set for it.

This is intended for doing reverse logic-\/like processing, example -\/ when a child object that happens to get the event later is meant to be able to \char`\"{}steal\char`\"{} functions from a parent and thus on unwind of this stack have its function called first, thus being able to set flags, or return 0 from the post-\/callback that stops all other post-\/callbacks in the current stack from being called (thus basically allowing a child to take control, if the event callback prepares information ready for taking action, but the post callback actually does the action). 

References eina\+\_\+list\+\_\+prepend().

\hypertarget{group__Evas__Canvas__Events_gaf15646313dc5814e690e41bf78c6135a}{\index{Canvas Events@{Canvas Events}!evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove@{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove}}
\index{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove@{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Object\+\_\+\+Event\+\_\+\+Post\+\_\+\+Cb}}]{func}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_gaf15646313dc5814e690e41bf78c6135a}


Remove a callback from the post-\/event callback stack. 


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to push the callback on \\
\hline
{\em func} & The function that to be called when the stack is unwound\\
\hline
\end{DoxyParams}
This removes a callback from the stack added with \hyperlink{group__Evas__Canvas__Events_gac8521438f0d0c6709e8a1ed78b0ff7c3}{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push()}. The first instance of the function in the callback stack is removed from being executed when the stack is unwound. Further instances may still be run on unwind. 

References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H.

\hypertarget{group__Evas__Canvas__Events_ga27e99c1ecaece9da32cff27e682a631c}{\index{Canvas Events@{Canvas Events}!evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full@{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full}}
\index{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full@{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full}!Canvas Events@{Canvas Events}}
\subsubsection[{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full}]{\setlength{\rightskip}{0pt plus 5cm}void evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+remove\+\_\+full (
\begin{DoxyParamCaption}
\item[{{\bf Evas} $\ast$}]{e, }
\item[{{\bf Evas\+\_\+\+Object\+\_\+\+Event\+\_\+\+Post\+\_\+\+Cb}}]{func, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}}\label{group__Evas__Canvas__Events_ga27e99c1ecaece9da32cff27e682a631c}


Remove a callback from the post-\/event callback stack. 


\begin{DoxyParams}{Parameters}
{\em e} & Canvas to push the callback on \\
\hline
{\em func} & The function that to be called when the stack is unwound \\
\hline
{\em data} & The data pointer to be passed to the callback\\
\hline
\end{DoxyParams}
This removes a callback from the stack added with \hyperlink{group__Evas__Canvas__Events_gac8521438f0d0c6709e8a1ed78b0ff7c3}{evas\+\_\+post\+\_\+event\+\_\+callback\+\_\+push()}. The first instance of the function and data in the callback stack is removed from being executed when the stack is unwound. Further instances may still be run on unwind. 

References E\+I\+N\+A\+\_\+\+L\+I\+S\+T\+\_\+\+F\+O\+R\+E\+A\+C\+H.

