\hypertarget{group__Ecore__Event__Group}{}\section{Ecore Event functions}
\label{group__Ecore__Event__Group}\index{Ecore Event functions@{Ecore Event functions}}


Ecore events provide two main features that are of use to those using ecore\+: creating events and being notified of events.  


\subsection*{Modules}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Ecore__System__Events}{System Events}
\begin{DoxyCompactList}\small\item\em Ecore is aware of some system events that one may be interested, they are described below\+: \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct__Ecore__Event__Signal__User}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+User}
\begin{DoxyCompactList}\small\item\em A structure that stores information of a User signal event. \end{DoxyCompactList}\item 
struct \hyperlink{struct__Ecore__Event__Signal__Hup}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Hup}
\begin{DoxyCompactList}\small\item\em A structure that stores information of a Hup signal event. \end{DoxyCompactList}\item 
struct \hyperlink{struct__Ecore__Event__Signal__Exit}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Exit}
\begin{DoxyCompactList}\small\item\em A structure that stores information of an Exit request event. \end{DoxyCompactList}\item 
struct \hyperlink{struct__Ecore__Event__Signal__Power}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Power}
\begin{DoxyCompactList}\small\item\em A structure that stores information of a Power event. \end{DoxyCompactList}\item 
struct \hyperlink{struct__Ecore__Event__Signal__Realtime}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Realtime}
\begin{DoxyCompactList}\small\item\em A structure that stores information of a Realtime event. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Ecore__Event__Group_ga2b6dc74bf55d27f7a069e6d976808ef7}{}\#define \hyperlink{group__Ecore__Event__Group_ga2b6dc74bf55d27f7a069e6d976808ef7}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+O\+N\+E}~0\label{group__Ecore__Event__Group_ga2b6dc74bf55d27f7a069e6d976808ef7}

\begin{DoxyCompactList}\small\item\em None event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gab1c2ecd8bba5f957ce06f06fc7e7743d}{}\#define \hyperlink{group__Ecore__Event__Group_gab1c2ecd8bba5f957ce06f06fc7e7743d}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+U\+S\+E\+R}~1\label{group__Ecore__Event__Group_gab1c2ecd8bba5f957ce06f06fc7e7743d}

\begin{DoxyCompactList}\small\item\em User signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga3d04f0c2c30998957d968120659dc69f}{}\#define \hyperlink{group__Ecore__Event__Group_ga3d04f0c2c30998957d968120659dc69f}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+H\+U\+P}~2\label{group__Ecore__Event__Group_ga3d04f0c2c30998957d968120659dc69f}

\begin{DoxyCompactList}\small\item\em Hup signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga0dd1e36930ae8fa8decc97564d57f310}{}\#define \hyperlink{group__Ecore__Event__Group_ga0dd1e36930ae8fa8decc97564d57f310}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+E\+X\+I\+T}~3\label{group__Ecore__Event__Group_ga0dd1e36930ae8fa8decc97564d57f310}

\begin{DoxyCompactList}\small\item\em Exit signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga574bf58511179b54078843611c008811}{}\#define \hyperlink{group__Ecore__Event__Group_ga574bf58511179b54078843611c008811}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+P\+O\+W\+E\+R}~4\label{group__Ecore__Event__Group_ga574bf58511179b54078843611c008811}

\begin{DoxyCompactList}\small\item\em Power signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gae4ce1d886fba149d60d3df1d8de05853}{}\#define \hyperlink{group__Ecore__Event__Group_gae4ce1d886fba149d60d3df1d8de05853}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+R\+E\+A\+L\+T\+I\+M\+E}~5\label{group__Ecore__Event__Group_gae4ce1d886fba149d60d3df1d8de05853}

\begin{DoxyCompactList}\small\item\em Realtime signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga95e027b2b9f5817cfa57505cc9990f5a}{}\#define \hyperlink{group__Ecore__Event__Group_ga95e027b2b9f5817cfa57505cc9990f5a}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+M\+E\+M\+O\+R\+Y\+\_\+\+S\+T\+A\+T\+E}~6\label{group__Ecore__Event__Group_ga95e027b2b9f5817cfa57505cc9990f5a}

\begin{DoxyCompactList}\small\item\em Memory state changed, see \hyperlink{group__Ecore__System__Events_gaedb05c29f8d7f347d734c567b8a110f6}{ecore\+\_\+memory\+\_\+state\+\_\+get()} \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gaf3f2a9900d5e256ab709f7e17ef0e377}{}\#define \hyperlink{group__Ecore__Event__Group_gaf3f2a9900d5e256ab709f7e17ef0e377}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+P\+O\+W\+E\+R\+\_\+\+S\+T\+A\+T\+E}~7\label{group__Ecore__Event__Group_gaf3f2a9900d5e256ab709f7e17ef0e377}

\begin{DoxyCompactList}\small\item\em Power state changed, see \hyperlink{group__Ecore__System__Events_ga224a33889b5f3e7496faabe9df7a640e}{ecore\+\_\+power\+\_\+state\+\_\+get()} \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gaa598cc77cba5cbed8ecc617b4b842180}{}\#define \hyperlink{group__Ecore__Event__Group_gaa598cc77cba5cbed8ecc617b4b842180}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+L\+O\+C\+A\+L\+E\+\_\+\+C\+H\+A\+N\+G\+E\+D}~8\label{group__Ecore__Event__Group_gaa598cc77cba5cbed8ecc617b4b842180}

\begin{DoxyCompactList}\small\item\em Locale changed. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga55026160dc580bf7f9df3584cb28a403}{}\#define \hyperlink{group__Ecore__Event__Group_ga55026160dc580bf7f9df3584cb28a403}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+H\+O\+S\+T\+N\+A\+M\+E\+\_\+\+C\+H\+A\+N\+G\+E\+D}~9\label{group__Ecore__Event__Group_ga55026160dc580bf7f9df3584cb28a403}

\begin{DoxyCompactList}\small\item\em Hostname changed. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga040ac4c1a598c01996403da7a8c6fd4b}{}\#define \hyperlink{group__Ecore__Event__Group_ga040ac4c1a598c01996403da7a8c6fd4b}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+Y\+S\+T\+E\+M\+\_\+\+T\+I\+M\+E\+D\+A\+T\+E\+\_\+\+C\+H\+A\+N\+G\+E\+D}~10\label{group__Ecore__Event__Group_ga040ac4c1a598c01996403da7a8c6fd4b}

\begin{DoxyCompactList}\small\item\em Time or Date changed. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga01df0d55042d207be8ba61cbfe62d8f0}{}\#define \hyperlink{group__Ecore__Event__Group_ga01df0d55042d207be8ba61cbfe62d8f0}{E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+C\+O\+U\+N\+T}~11\label{group__Ecore__Event__Group_ga01df0d55042d207be8ba61cbfe62d8f0}

\begin{DoxyCompactList}\small\item\em Number of events. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Ecore__Event__Group_ga0b36f54d74bcfb8dc622844d959c9b64}{}typedef struct \+\_\+\+Ecore\+\_\+\+Win32\+\_\+\+Handler \hyperlink{group__Ecore__Event__Group_ga0b36f54d74bcfb8dc622844d959c9b64}{Ecore\+\_\+\+Win32\+\_\+\+Handler}\label{group__Ecore__Event__Group_ga0b36f54d74bcfb8dc622844d959c9b64}

\begin{DoxyCompactList}\small\item\em A handle for H\+A\+N\+D\+L\+E handlers on Windows. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{}typedef struct \+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Handler \hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler}\label{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}

\begin{DoxyCompactList}\small\item\em A handle for an event handler. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gab7f572080436ad68d75e8eb4b7cbab45}{}typedef struct \+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Filter \hyperlink{group__Ecore__Event__Group_gab7f572080436ad68d75e8eb4b7cbab45}{Ecore\+\_\+\+Event\+\_\+\+Filter}\label{group__Ecore__Event__Group_gab7f572080436ad68d75e8eb4b7cbab45}

\begin{DoxyCompactList}\small\item\em A handle for an event filter. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga3df1c1b99f44f47e791c89556e925b9d}{}typedef struct \+\_\+\+Ecore\+\_\+\+Event \hyperlink{group__Ecore__Event__Group_ga3df1c1b99f44f47e791c89556e925b9d}{Ecore\+\_\+\+Event}\label{group__Ecore__Event__Group_ga3df1c1b99f44f47e791c89556e925b9d}

\begin{DoxyCompactList}\small\item\em A handle for an event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga02bd65bebca736e324b11d61f4adef45}{}typedef struct \hyperlink{struct__Ecore__Event__Signal__User}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+User} \hyperlink{group__Ecore__Event__Group_ga02bd65bebca736e324b11d61f4adef45}{Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+User}\label{group__Ecore__Event__Group_ga02bd65bebca736e324b11d61f4adef45}

\begin{DoxyCompactList}\small\item\em User signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gaf3eaa720e4890961b2cf519ee5cd253d}{}typedef struct \hyperlink{struct__Ecore__Event__Signal__Hup}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Hup} \hyperlink{group__Ecore__Event__Group_gaf3eaa720e4890961b2cf519ee5cd253d}{Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Hup}\label{group__Ecore__Event__Group_gaf3eaa720e4890961b2cf519ee5cd253d}

\begin{DoxyCompactList}\small\item\em Hup signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga654cd9d55a25e2c858007967085cd2aa}{}typedef struct \hyperlink{struct__Ecore__Event__Signal__Exit}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Exit} \hyperlink{group__Ecore__Event__Group_ga654cd9d55a25e2c858007967085cd2aa}{Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Exit}\label{group__Ecore__Event__Group_ga654cd9d55a25e2c858007967085cd2aa}

\begin{DoxyCompactList}\small\item\em Exit signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga99878553b16a3f0c61eef2c4d291d7aa}{}typedef struct \hyperlink{struct__Ecore__Event__Signal__Power}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Power} \hyperlink{group__Ecore__Event__Group_ga99878553b16a3f0c61eef2c4d291d7aa}{Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Power}\label{group__Ecore__Event__Group_ga99878553b16a3f0c61eef2c4d291d7aa}

\begin{DoxyCompactList}\small\item\em Power signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_gaf4f3d2a3d3f6e525453bccf0d415c49f}{}typedef struct \hyperlink{struct__Ecore__Event__Signal__Realtime}{\+\_\+\+Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Realtime} \hyperlink{group__Ecore__Event__Group_gaf4f3d2a3d3f6e525453bccf0d415c49f}{Ecore\+\_\+\+Event\+\_\+\+Signal\+\_\+\+Realtime}\label{group__Ecore__Event__Group_gaf4f3d2a3d3f6e525453bccf0d415c49f}

\begin{DoxyCompactList}\small\item\em Realtime signal event. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga0b7b5c494bd8f55a5068786b2caaf6c3}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Ecore__Event__Group_ga0b7b5c494bd8f55a5068786b2caaf6c3}{Ecore\+\_\+\+Filter\+\_\+\+Cb}) (void $\ast$data, void $\ast$loop\+\_\+data, int type, void $\ast$event)\label{group__Ecore__Event__Group_ga0b7b5c494bd8f55a5068786b2caaf6c3}

\begin{DoxyCompactList}\small\item\em A callback used for filtering events from the main loop. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga1d6806e0a537d3e364d1094e91db4cb7}{}typedef void($\ast$ \hyperlink{group__Ecore__Event__Group_ga1d6806e0a537d3e364d1094e91db4cb7}{Ecore\+\_\+\+End\+\_\+\+Cb}) (void $\ast$user\+\_\+data, void $\ast$func\+\_\+data)\label{group__Ecore__Event__Group_ga1d6806e0a537d3e364d1094e91db4cb7}

\begin{DoxyCompactList}\small\item\em This is the callback which is called at the end of a function, usually for cleanup purposes. \end{DoxyCompactList}\item 
\hypertarget{group__Ecore__Event__Group_ga64b4df04cbafda481593d0bc29617c6d}{}typedef \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}($\ast$ \hyperlink{group__Ecore__Event__Group_ga64b4df04cbafda481593d0bc29617c6d}{Ecore\+\_\+\+Event\+\_\+\+Handler\+\_\+\+Cb}) (void $\ast$data, int type, void $\ast$event)\label{group__Ecore__Event__Group_ga64b4df04cbafda481593d0bc29617c6d}

\begin{DoxyCompactList}\small\item\em A callback used by the main loop to handle events of a specified type. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$ \hyperlink{group__Ecore__Event__Group_gae75b0b1b2c50e73b8e42afc628b00a62}{ecore\+\_\+event\+\_\+handler\+\_\+add} (int type, \hyperlink{group__Ecore__Event__Group_ga64b4df04cbafda481593d0bc29617c6d}{Ecore\+\_\+\+Event\+\_\+\+Handler\+\_\+\+Cb} func, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add an event handler. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Event__Group_ga5eb9f359e0c52a63767c235d2f413197}{ecore\+\_\+event\+\_\+handler\+\_\+del} (\hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$event\+\_\+handler)
\begin{DoxyCompactList}\small\item\em Delete an event handler. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Event__Group_ga3df1c1b99f44f47e791c89556e925b9d}{Ecore\+\_\+\+Event} $\ast$ \hyperlink{group__Ecore__Event__Group_gacea6a144774958a7188274b79c91ee1f}{ecore\+\_\+event\+\_\+add} (int type, void $\ast$ev, \hyperlink{group__Ecore__Event__Group_ga1d6806e0a537d3e364d1094e91db4cb7}{Ecore\+\_\+\+End\+\_\+\+Cb} func\+\_\+free, void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add an event to the event queue. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Event__Group_gaa0b372d1a5a8838d10de74afde5c38dc}{ecore\+\_\+event\+\_\+del} (\hyperlink{group__Ecore__Event__Group_ga3df1c1b99f44f47e791c89556e925b9d}{Ecore\+\_\+\+Event} $\ast$event)
\begin{DoxyCompactList}\small\item\em Delete an event from the queue. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Event__Group_gaf7a62ccc6ca6c7715cbcf398c87570d7}{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get} (\hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$eh)
\begin{DoxyCompactList}\small\item\em Get the data associated with an \hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler}. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Event__Group_ga3ea928587c004f09a6d1b1bd7948327a}{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set} (\hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$eh, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Set the data associated with an \hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler}. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Event__Group_ga3fad8d8bfe3776c69d33aff1f056ba89}{ecore\+\_\+event\+\_\+type\+\_\+new} (void)
\begin{DoxyCompactList}\small\item\em Allocate a new event type id sensibly and return the new id. \end{DoxyCompactList}\item 
\hyperlink{group__Ecore__Event__Group_gab7f572080436ad68d75e8eb4b7cbab45}{Ecore\+\_\+\+Event\+\_\+\+Filter} $\ast$ \hyperlink{group__Ecore__Event__Group_ga54c2e088e2a8d97b3c3146fcca4aaa61}{ecore\+\_\+event\+\_\+filter\+\_\+add} (\hyperlink{group__Ecore__Main__Loop__Group_gac4edb7065bb785df0d1a90041380ea76}{Ecore\+\_\+\+Data\+\_\+\+Cb} func\+\_\+start, \hyperlink{group__Ecore__Event__Group_ga0b7b5c494bd8f55a5068786b2caaf6c3}{Ecore\+\_\+\+Filter\+\_\+\+Cb} func\+\_\+filter, \hyperlink{group__Ecore__Event__Group_ga1d6806e0a537d3e364d1094e91db4cb7}{Ecore\+\_\+\+End\+\_\+\+Cb} func\+\_\+end, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Add a filter the current event queue. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Event__Group_ga627d965083712a40ead16e491bcdfa60}{ecore\+\_\+event\+\_\+filter\+\_\+del} (\hyperlink{group__Ecore__Event__Group_gab7f572080436ad68d75e8eb4b7cbab45}{Ecore\+\_\+\+Event\+\_\+\+Filter} $\ast$ef)
\begin{DoxyCompactList}\small\item\em Delete an event filter. \end{DoxyCompactList}\item 
int \hyperlink{group__Ecore__Event__Group_gaf432719ba9654b619d23a20ad036599a}{ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Return the current event type being handled. \end{DoxyCompactList}\item 
void $\ast$ \hyperlink{group__Ecore__Event__Group_ga4c091bd5bb1d14d1dedea8b18f687905}{ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get} (void)
\begin{DoxyCompactList}\small\item\em Return the current event type pointer handled. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Ecore events provide two main features that are of use to those using ecore\+: creating events and being notified of events. 

Those two will usually be used in different contexts, creating events is mainly done by libraries wrapping some system functionality while being notified of events is mainly a necessity of applications.

For a program to be notified of events it\textquotesingle{}s interested in it needs to have a function to process the event and to register that function as the callback to the event, that\textquotesingle{}s all\+: 
\begin{DoxyCode}
\hyperlink{group__Ecore__Event__Group_gae75b0b1b2c50e73b8e42afc628b00a62}{ecore\_event\_handler\_add}(EVENT\_TYPE, \_my\_event\_handler, some\_data);
...
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}
\_my\_event\_handler(\textcolor{keywordtype}{void} *data, \textcolor{keywordtype}{int} type, \textcolor{keywordtype}{void} *event)
\{
   \textcolor{comment}{//data is some\_data}
   \textcolor{comment}{//event is provided by whoever created the event}
   \textcolor{comment}{//Do really cool stuff with event}
\}
\end{DoxyCode}


One very important thing to note here is the {\ttfamily E\+V\+E\+N\+T\+\_\+\+T\+Y\+P\+E}, to register a handler for an event you must know its type before hand. Ecore provides the following events which are emitted in response to P\+O\+S\+I\+X signals(\href{https://en.wikipedia.org/wiki/Signal_%28computing%29}{\tt https\+://en.\+wikipedia.\+org/wiki/\+Signal\+\_\+\%28computing\%29})\+: \begin{DoxyItemize}
\item {\bfseries E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+U\+S\+E\+R} \item {\bfseries E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+H\+U\+P} \item {\bfseries E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+P\+O\+W\+E\+R} \item {\bfseries E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+S\+I\+G\+N\+A\+L\+\_\+\+E\+X\+I\+T} \end{DoxyItemize}
\begin{DoxyWarning}{Warning}
Don\textquotesingle{}t override these using the {\ttfamily signal} or {\ttfamily sigaction} calls. These, however, aren\textquotesingle{}t the only signals one can handle. Many libraries(including ecore modules) have their own signals that can be listened for and handled, to do that one only needs to know the type of the event. This information can be found on the documentation of the library emitting the signal, so, for example, for events related to windowing one would look in \hyperlink{group__Ecore__Evas__Group}{Ecore\+\_\+\+Evas wrapper/helper set of functions}.
\end{DoxyWarning}
Examples of libraries that integrate into ecore\textquotesingle{}s main loop by providing events are \hyperlink{group__Ecore__Con__Group}{Ecore\+\_\+\+Con -\/ Connection functions}, \hyperlink{group__Ecore__Evas__Group}{Ecore\+\_\+\+Evas wrapper/helper set of functions} and \hyperlink{group__Ecore__Exe__Group}{Process Spawning Functions}, amongst others. This usage can be divided into two parts, setup and adding events. The setup is very simple, all that needs doing is getting a type id for the event\+: 
\begin{DoxyCode}
\textcolor{keywordtype}{int} MY\_EV\_TYPE = \hyperlink{group__Ecore__Event__Group_ga3fad8d8bfe3776c69d33aff1f056ba89}{ecore\_event\_type\_new}();
\end{DoxyCode}
 \begin{DoxyNote}{Note}
This variable should be declared in the header since it\textquotesingle{}ll be needed by anyone wishing to register a handler to your event.
\end{DoxyNote}
The complexity of adding of an event to the queue depends on whether that event sends uses {\ttfamily event}, if it doesn\textquotesingle{}t it a one-\/liner\+: 
\begin{DoxyCode}
\hyperlink{group__Ecore__Event__Group_gacea6a144774958a7188274b79c91ee1f}{ecore\_event\_add}(MY\_EV\_TYPE, NULL, NULL, NULL);
\end{DoxyCode}
 The usage when an {\ttfamily event} is needed is not that much more complex and can be seen in \hyperlink{group__Ecore__Event__Group_gacea6a144774958a7188274b79c91ee1f}{ecore\+\_\+event\+\_\+add}.

Examples that deals with events\+: \begin{DoxyItemize}
\item \hyperlink{ecore_event_example_01_c}{Handling events example} \item \hyperlink{ecore_event_example_02_c}{ecore events and handlers -\/ Setup and use} \end{DoxyItemize}


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


Add an event handler. 


\begin{DoxyParams}{Parameters}
{\em type} & The type of the event this handler will get called for \\
\hline
{\em func} & The function to call when the event is found in the queue \\
\hline
{\em data} & A data pointer to pass to the called function {\ttfamily func} \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A new Event handler, or {\ttfamily N\+U\+L\+L} on failure.
\end{DoxyReturn}
Add an event handler to the list of handlers. This will, on success, return a handle to the event handler object that was created, that can be used later to remove the handler using \hyperlink{group__Ecore__Event__Group_ga5eb9f359e0c52a63767c235d2f413197}{ecore\+\_\+event\+\_\+handler\+\_\+del()}. The {\ttfamily type} parameter is the integer of the event type that will trigger this callback to be called. The callback {\ttfamily func} is called when this event is processed and will be passed the event type, a pointer to the private event structure that is specific to that event type, and a data pointer that is provided in this call as the {\ttfamily data} parameter.

When the callback {\ttfamily func} is called, it must return 1 or 0. If it returns 1 (or E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+P\+A\+S\+S\+\_\+\+O\+N), It will keep being called as per normal, for each handler set up for that event type. If it returns 0 (or E\+C\+O\+R\+E\+\_\+\+C\+A\+L\+L\+B\+A\+C\+K\+\_\+\+D\+O\+N\+E), it will cease processing handlers for that particular event, so all handler set to handle that event type that have not already been called, will not be. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_con_client_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+example.\+c}, \hyperlink{ecore_con_client_simple_example_8c-example}{ecore\+\_\+con\+\_\+client\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_con_server_example_8c-example}{ecore\+\_\+con\+\_\+server\+\_\+example.\+c}, \hyperlink{ecore_con_server_simple_example_8c-example}{ecore\+\_\+con\+\_\+server\+\_\+simple\+\_\+example.\+c}, \hyperlink{ecore_con_url_cookies_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+cookies\+\_\+example.\+c}, \hyperlink{ecore_con_url_download_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+download\+\_\+example.\+c}, \hyperlink{ecore_con_url_headers_example_8c-example}{ecore\+\_\+con\+\_\+url\+\_\+headers\+\_\+example.\+c}, \hyperlink{ecore_event_example_01_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+01.\+c}, \hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+c}, \hyperlink{ecore_exe_example_8c-example}{ecore\+\_\+exe\+\_\+example.\+c}, and \hyperlink{ecore_idler_example_8c-example}{ecore\+\_\+idler\+\_\+example.\+c}.\end{Desc}


References E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+O\+N\+E, eina\+\_\+inlist\+\_\+append(), E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+E\+T, 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.



Referenced by ecore\+\_\+drm\+\_\+tty\+\_\+open(), ecore\+\_\+ipc\+\_\+init(), and elocation\+\_\+init().

\hypertarget{group__Ecore__Event__Group_ga5eb9f359e0c52a63767c235d2f413197}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+handler\+\_\+del@{ecore\+\_\+event\+\_\+handler\+\_\+del}}
\index{ecore\+\_\+event\+\_\+handler\+\_\+del@{ecore\+\_\+event\+\_\+handler\+\_\+del}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+handler\+\_\+del(\+Ecore\+\_\+\+Event\+\_\+\+Handler $\ast$event\+\_\+handler)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ecore\+\_\+event\+\_\+handler\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$}]{event\+\_\+handler}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_ga5eb9f359e0c52a63767c235d2f413197}


Delete an event handler. 


\begin{DoxyParams}{Parameters}
{\em event\+\_\+handler} & Event handler handle to delete \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Data passed to handler
\end{DoxyReturn}
Delete a specified event handler from the handler list. On success this will delete the event handler and return the pointer passed as {\ttfamily data} when the handler was added by \hyperlink{group__Ecore__Event__Group_gae75b0b1b2c50e73b8e42afc628b00a62}{ecore\+\_\+event\+\_\+handler\+\_\+add()}. On failure {\ttfamily N\+U\+L\+L} will be returned. Once a handler is deleted it will no longer be called. 

References 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.



Referenced by ecore\+\_\+ipc\+\_\+shutdown().

\hypertarget{group__Ecore__Event__Group_gacea6a144774958a7188274b79c91ee1f}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+add@{ecore\+\_\+event\+\_\+add}}
\index{ecore\+\_\+event\+\_\+add@{ecore\+\_\+event\+\_\+add}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+add(int type, void $\ast$ev, Ecore\+\_\+\+End\+\_\+\+Cb func\+\_\+free, void $\ast$data)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Ecore\+\_\+\+Event}$\ast$ ecore\+\_\+event\+\_\+add (
\begin{DoxyParamCaption}
\item[{int}]{type, }
\item[{void $\ast$}]{ev, }
\item[{{\bf Ecore\+\_\+\+End\+\_\+\+Cb}}]{func\+\_\+free, }
\item[{void $\ast$}]{data}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_gacea6a144774958a7188274b79c91ee1f}


Add an event to the event queue. 


\begin{DoxyParams}{Parameters}
{\em type} & The event type to add to the end of the event queue \\
\hline
{\em ev} & The data structure passed as {\ttfamily event} to event handlers \\
\hline
{\em func\+\_\+free} & The function to be called to free {\itshape ev} \\
\hline
{\em data} & The data pointer to be passed to the free function \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A Handle for that event on success, otherwise N\+U\+L\+L
\end{DoxyReturn}
If it succeeds, an event of type {\itshape type} will be added to the queue for processing by event handlers added by \hyperlink{group__Ecore__Event__Group_gae75b0b1b2c50e73b8e42afc628b00a62}{ecore\+\_\+event\+\_\+handler\+\_\+add()}. The {\itshape ev} parameter will be passed as the {\ttfamily event} parameter of the handler. When the event is no longer needed, {\itshape func\+\_\+free} will be called and passed {\itshape ev} for cleaning up. If {\ttfamily func\+\_\+free} is N\+U\+L\+L, free() will be called with the private structure pointer. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+c}, and \hyperlink{ecore_idler_example_8c-example}{ecore\+\_\+idler\+\_\+example.\+c}.\end{Desc}


References E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+O\+N\+E, 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.



Referenced by ecore\+\_\+evas\+\_\+ews\+\_\+manager\+\_\+set(), ecore\+\_\+imf\+\_\+context\+\_\+commit\+\_\+event\+\_\+add(), ecore\+\_\+imf\+\_\+context\+\_\+delete\+\_\+surrounding\+\_\+event\+\_\+add(), ecore\+\_\+imf\+\_\+context\+\_\+preedit\+\_\+changed\+\_\+event\+\_\+add(), ecore\+\_\+imf\+\_\+context\+\_\+preedit\+\_\+end\+\_\+event\+\_\+add(), ecore\+\_\+imf\+\_\+context\+\_\+preedit\+\_\+start\+\_\+event\+\_\+add(), ecore\+\_\+memory\+\_\+state\+\_\+set(), ecore\+\_\+power\+\_\+state\+\_\+set(), and ecore\+\_\+wl\+\_\+dnd\+\_\+drag\+\_\+end().

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


Delete an event from the queue. 


\begin{DoxyParams}{Parameters}
{\em event} & The event handle to delete \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data pointer originally set for the event free function
\end{DoxyReturn}
This deletes the event {\ttfamily event} from the event queue, and returns the {\ttfamily data} parameter originally set when adding it with \hyperlink{group__Ecore__Event__Group_gacea6a144774958a7188274b79c91ee1f}{ecore\+\_\+event\+\_\+add()}. This does not immediately call the free function, and it may be called later on cleanup, and so if the free function depends on the data pointer to work, you should defer cleaning of this till the free function is called later. 

References 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.



Referenced by ecore\+\_\+job\+\_\+del().

\hypertarget{group__Ecore__Event__Group_gaf7a62ccc6ca6c7715cbcf398c87570d7}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get@{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get}}
\index{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get@{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get(\+Ecore\+\_\+\+Event\+\_\+\+Handler $\ast$eh)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$}]{eh}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_gaf7a62ccc6ca6c7715cbcf398c87570d7}


Get the data associated with an \hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler}. 


\begin{DoxyParams}{Parameters}
{\em eh} & The event handler \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data
\end{DoxyReturn}
This function returns the data previously associated with {\ttfamily eh} by \hyperlink{group__Ecore__Event__Group_gae75b0b1b2c50e73b8e42afc628b00a62}{ecore\+\_\+event\+\_\+handler\+\_\+add()}. 

References 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.

\hypertarget{group__Ecore__Event__Group_ga3ea928587c004f09a6d1b1bd7948327a}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set@{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set}}
\index{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set@{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set(\+Ecore\+\_\+\+Event\+\_\+\+Handler $\ast$eh, const void $\ast$data)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Event\+\_\+\+Handler} $\ast$}]{eh, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_ga3ea928587c004f09a6d1b1bd7948327a}


Set the data associated with an \hyperlink{group__Ecore__Event__Group_ga252a2566c9c7c9094964ab8e157f0521}{Ecore\+\_\+\+Event\+\_\+\+Handler}. 


\begin{DoxyParams}{Parameters}
{\em eh} & The event handler \\
\hline
{\em data} & The data to associate \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The previous data
\end{DoxyReturn}
This function sets {\ttfamily data} to {\ttfamily eh} and returns the old data pointer which was previously associated with {\ttfamily eh} by \hyperlink{group__Ecore__Event__Group_gae75b0b1b2c50e73b8e42afc628b00a62}{ecore\+\_\+event\+\_\+handler\+\_\+add()}. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+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\+R\+N\+\_\+\+V\+A\+L.

\hypertarget{group__Ecore__Event__Group_ga3fad8d8bfe3776c69d33aff1f056ba89}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+type\+\_\+new@{ecore\+\_\+event\+\_\+type\+\_\+new}}
\index{ecore\+\_\+event\+\_\+type\+\_\+new@{ecore\+\_\+event\+\_\+type\+\_\+new}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+type\+\_\+new(void)}]{\setlength{\rightskip}{0pt plus 5cm}int ecore\+\_\+event\+\_\+type\+\_\+new (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_ga3fad8d8bfe3776c69d33aff1f056ba89}


Allocate a new event type id sensibly and return the new id. 

\begin{DoxyReturn}{Returns}
A new event type id.
\end{DoxyReturn}
This function allocates a new event type id and returns it. Once an event type has been allocated it can never be de-\/allocated during the life of the program. There is no guarantee of the contents of this event I\+D, or how it is calculated, except that the I\+D will be unique to the current instance of the process. \begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_event_example_02_8c-example}{ecore\+\_\+event\+\_\+example\+\_\+02.\+c}, and \hyperlink{ecore_idler_example_8c-example}{ecore\+\_\+idler\+\_\+example.\+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\+R\+N\+\_\+\+V\+A\+L.



Referenced by ecore\+\_\+con\+\_\+init(), ecore\+\_\+con\+\_\+url\+\_\+init(), ecore\+\_\+drm\+\_\+init(), ecore\+\_\+event\+\_\+init(), ecore\+\_\+imf\+\_\+init(), ecore\+\_\+ipc\+\_\+init(), ecore\+\_\+psl1ght\+\_\+init(), ecore\+\_\+sdl\+\_\+init(), ecore\+\_\+win32\+\_\+init(), ecore\+\_\+wl\+\_\+init(), and elocation\+\_\+init().

\hypertarget{group__Ecore__Event__Group_ga54c2e088e2a8d97b3c3146fcca4aaa61}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+filter\+\_\+add@{ecore\+\_\+event\+\_\+filter\+\_\+add}}
\index{ecore\+\_\+event\+\_\+filter\+\_\+add@{ecore\+\_\+event\+\_\+filter\+\_\+add}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+filter\+\_\+add(\+Ecore\+\_\+\+Data\+\_\+\+Cb func\+\_\+start, Ecore\+\_\+\+Filter\+\_\+\+Cb func\+\_\+filter, Ecore\+\_\+\+End\+\_\+\+Cb func\+\_\+end, const void $\ast$data)}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Ecore\+\_\+\+Event\+\_\+\+Filter}$\ast$ ecore\+\_\+event\+\_\+filter\+\_\+add (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Data\+\_\+\+Cb}}]{func\+\_\+start, }
\item[{{\bf Ecore\+\_\+\+Filter\+\_\+\+Cb}}]{func\+\_\+filter, }
\item[{{\bf Ecore\+\_\+\+End\+\_\+\+Cb}}]{func\+\_\+end, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_ga54c2e088e2a8d97b3c3146fcca4aaa61}


Add a filter the current event queue. 


\begin{DoxyParams}{Parameters}
{\em func\+\_\+start} & Function to call just before filtering and return data \\
\hline
{\em func\+\_\+filter} & Function to call on each event \\
\hline
{\em func\+\_\+end} & Function to call after the queue has been filtered \\
\hline
{\em data} & Data to pass to the filter functions \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A filter handle on success, {\ttfamily N\+U\+L\+L} otherwise.
\end{DoxyReturn}
Adds a callback to filter events from the event queue. Filters are called on the queue just before Event handler processing to try and remove redundant events. Just as processing is about to start {\itshape func\+\_\+start} is called and passed the {\itshape data} pointer, the return value of this functions is passed to {\itshape func\+\_\+filter} as loop\+\_\+data. {\itshape func\+\_\+filter} is also passed {\itshape data} and the event type and event structure. If this {\itshape func\+\_\+filter} returns {\ttfamily E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E}, the event is removed from the queue, if it returns {\ttfamily E\+I\+N\+A\+\_\+\+T\+R\+U\+E}, the event is kept. When processing is finished {\ttfamily func\+\_\+end} is called and is passed the loop\+\_\+data(returned by {\ttfamily func\+\_\+start}) and {\ttfamily data} pointer to clean up. 

References eina\+\_\+inlist\+\_\+append(), E\+I\+N\+A\+\_\+\+I\+N\+L\+I\+S\+T\+\_\+\+G\+E\+T, 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.

\hypertarget{group__Ecore__Event__Group_ga627d965083712a40ead16e491bcdfa60}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+filter\+\_\+del@{ecore\+\_\+event\+\_\+filter\+\_\+del}}
\index{ecore\+\_\+event\+\_\+filter\+\_\+del@{ecore\+\_\+event\+\_\+filter\+\_\+del}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+filter\+\_\+del(\+Ecore\+\_\+\+Event\+\_\+\+Filter $\ast$ef)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ecore\+\_\+event\+\_\+filter\+\_\+del (
\begin{DoxyParamCaption}
\item[{{\bf Ecore\+\_\+\+Event\+\_\+\+Filter} $\ast$}]{ef}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_ga627d965083712a40ead16e491bcdfa60}


Delete an event filter. 


\begin{DoxyParams}{Parameters}
{\em ef} & The event filter handle \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The data set for the filter on success, {\ttfamily N\+U\+L\+L} otherwise.
\end{DoxyReturn}
Delete a filter that has been added by its {\ttfamily ef} handle. 

References 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.

\hypertarget{group__Ecore__Event__Group_gaf432719ba9654b619d23a20ad036599a}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get@{ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get}}
\index{ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get@{ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get(void)}]{\setlength{\rightskip}{0pt plus 5cm}int ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_gaf432719ba9654b619d23a20ad036599a}


Return the current event type being handled. 

\begin{DoxyReturn}{Returns}
The current event type being handled if inside a handler callback, E\+C\+O\+R\+E\+\_\+\+E\+V\+E\+N\+T\+\_\+\+N\+O\+N\+E otherwise
\end{DoxyReturn}
If the program is currently inside an Ecore event handler callback this will return the type of the current event being processed.

This is useful when certain Ecore modules such as Ecore\+\_\+\+Evas \char`\"{}swallow\char`\"{} events and not all the original information is passed on. In special cases this extra information may be useful or needed and using this call can let the program know if the event type being handled is one it wants to get more information about. 

References 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.

\hypertarget{group__Ecore__Event__Group_ga4c091bd5bb1d14d1dedea8b18f687905}{}\index{Ecore Event functions@{Ecore Event functions}!ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get@{ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get}}
\index{ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get@{ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get}!Ecore Event functions@{Ecore Event functions}}
\subsubsection[{ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get(void)}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$ ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{group__Ecore__Event__Group_ga4c091bd5bb1d14d1dedea8b18f687905}


Return the current event type pointer handled. 

\begin{DoxyReturn}{Returns}
The current event pointer being handled if inside a handler callback, {\ttfamily N\+U\+L\+L} otherwise.
\end{DoxyReturn}
If the program is currently inside an Ecore event handler callback this will return the pointer of the current event being processed.

This is useful when certain Ecore modules such as Ecore\+\_\+\+Evas \char`\"{}swallow\char`\"{} events and not all the original information is passed on. In special cases this extra information may be useful or needed and using this call can let the program access the event data if the type of the event is handled by the program. 

References 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.

