\hypertarget{structecore_1_1timer}{}\section{ecore\+:\+:timer Struct Reference}
\label{structecore_1_1timer}\index{ecore\+::timer@{ecore\+::timer}}


Timers are objects that will call a given callback at some point.  


\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{structecore_1_1timer_a1dd2ec18ee2b0b997cac8e6f69a83663}{timer} (\hyperlink{group__Eo_ga9f3010a50b61a892d41f4ec2bda73f4c}{Eo} $\ast$eo)
\begin{DoxyCompactList}\small\item\em Eo Constructor. \end{DoxyCompactList}\item 
\hyperlink{structecore_1_1timer_a47b90780f6180a1664505c97729cdedc}{timer} (std\+::nullptr\+\_\+t)
\begin{DoxyCompactList}\small\item\em nullptr\+\_\+t Constructor. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_ab968b5f3a702ccf047c817d7d16a005f}{}\hyperlink{structecore_1_1timer_ab968b5f3a702ccf047c817d7d16a005f}{timer} (\hyperlink{structecore_1_1timer}{timer} const \&other)\label{structecore_1_1timer_ab968b5f3a702ccf047c817d7d16a005f}

\begin{DoxyCompactList}\small\item\em Copy Constructor. \end{DoxyCompactList}\item 
void \hyperlink{structecore_1_1timer_a3c30e9db626c64063653c4c042a0b2b6}{reset} () const 
\begin{DoxyCompactList}\small\item\em Reset a timer to its full interval. \end{DoxyCompactList}\item 
void \hyperlink{structecore_1_1timer_a1c1fbc68a989e8708d8b03ec5a4a5805}{delay} (double add\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Add some delay for the next occurrence of a timer. \end{DoxyCompactList}\item 
double \hyperlink{structecore_1_1timer_af65d1be325ab79ee5bbe531a6b006439}{interval\+\_\+get} () const 
\begin{DoxyCompactList}\small\item\em Get the interval the timer ticks on. \end{DoxyCompactList}\item 
void \hyperlink{structecore_1_1timer_a6764bd85c17acd427e29454bc44b4e44}{interval\+\_\+set} (double in\+\_\+) const 
\begin{DoxyCompactList}\small\item\em Change the interval the timer ticks off. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_aa2d41428e29cae404684b4c1c5c22159}{}double \hyperlink{structecore_1_1timer_aa2d41428e29cae404684b4c1c5c22159}{pending\+\_\+get} () const \label{structecore_1_1timer_aa2d41428e29cae404684b4c1c5c22159}

\begin{DoxyCompactList}\small\item\em Get the pending time regarding a timer. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_a491b5677ca1d9f095a2e2487b2f8d4fc}{}{\footnotesize template$<$typename F $>$ }\\\+::\hyperlink{structefl_1_1eo_1_1signal__connection}{efl\+::eo\+::signal\+\_\+connection} \hyperlink{structecore_1_1timer_a491b5677ca1d9f095a2e2487b2f8d4fc}{callback\+\_\+callback\+\_\+add\+\_\+add} (F \&\&callback\+\_\+,\+::efl\+::eo\+::callback\+\_\+priority priority\+\_\+=\+::efl\+::eo\+::callback\+\_\+priorities\+::default\+\_\+)\label{structecore_1_1timer_a491b5677ca1d9f095a2e2487b2f8d4fc}

\begin{DoxyCompactList}\small\item\em A callback was added. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_a0f1b47d6c4c075f80a74c15bd52f5446}{}{\footnotesize template$<$typename T $>$ }\\void \hyperlink{structecore_1_1timer_a0f1b47d6c4c075f80a74c15bd52f5446}{callback\+\_\+callback\+\_\+add\+\_\+call} (T $\ast$info)\label{structecore_1_1timer_a0f1b47d6c4c075f80a74c15bd52f5446}

\begin{DoxyCompactList}\small\item\em A callback was added. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_a67c4b11e31308469040d977c9299ffbf}{}{\footnotesize template$<$typename F $>$ }\\\+::\hyperlink{structefl_1_1eo_1_1signal__connection}{efl\+::eo\+::signal\+\_\+connection} \hyperlink{structecore_1_1timer_a67c4b11e31308469040d977c9299ffbf}{callback\+\_\+callback\+\_\+del\+\_\+add} (F \&\&callback\+\_\+,\+::efl\+::eo\+::callback\+\_\+priority priority\+\_\+=\+::efl\+::eo\+::callback\+\_\+priorities\+::default\+\_\+)\label{structecore_1_1timer_a67c4b11e31308469040d977c9299ffbf}

\begin{DoxyCompactList}\small\item\em A callback was deleted. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_a5971e42ab366a7ccf913190a7f3a6cdc}{}{\footnotesize template$<$typename T $>$ }\\void \hyperlink{structecore_1_1timer_a5971e42ab366a7ccf913190a7f3a6cdc}{callback\+\_\+callback\+\_\+del\+\_\+call} (T $\ast$info)\label{structecore_1_1timer_a5971e42ab366a7ccf913190a7f3a6cdc}

\begin{DoxyCompactList}\small\item\em A callback was deleted. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_adbe44e645ca9d6572b5ede68d8725270}{}{\footnotesize template$<$typename F $>$ }\\\+::\hyperlink{structefl_1_1eo_1_1signal__connection}{efl\+::eo\+::signal\+\_\+connection} \hyperlink{structecore_1_1timer_adbe44e645ca9d6572b5ede68d8725270}{callback\+\_\+del\+\_\+add} (F \&\&callback\+\_\+,\+::efl\+::eo\+::callback\+\_\+priority priority\+\_\+=\+::efl\+::eo\+::callback\+\_\+priorities\+::default\+\_\+)\label{structecore_1_1timer_adbe44e645ca9d6572b5ede68d8725270}

\begin{DoxyCompactList}\small\item\em Obj is being deleted. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_ae1a0b122faf888026dfe189a619956e6}{}{\footnotesize template$<$typename T $>$ }\\void \hyperlink{structecore_1_1timer_ae1a0b122faf888026dfe189a619956e6}{callback\+\_\+del\+\_\+call} (T $\ast$info)\label{structecore_1_1timer_ae1a0b122faf888026dfe189a619956e6}

\begin{DoxyCompactList}\small\item\em Obj is being deleted. \end{DoxyCompactList}\end{DoxyCompactItemize}
{\bf }\par
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename F0 , typename F1 $>$ }\\\hyperlink{structecore_1_1timer_a1b473fe8bcda62d0e600f7ba20b9fb5c}{timer} (\+::\hyperlink{structefl_1_1eo_1_1parent__type}{efl\+::eo\+::parent\+\_\+type} \+\_\+p, \+\_\+c\+\_\+constructor$<$ F0 $>$ \+\_\+c0, \+\_\+c\+\_\+loop\+\_\+constructor$<$ F1 $>$ \+\_\+c1)
\begin{DoxyCompactList}\small\item\em Constructs a new \hyperlink{structecore_1_1timer}{ecore\+::timer} object. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_a77bd6444096fb02492f98ed0e38f80ec}{}{\footnotesize template$<$typename F0 , typename F1 $>$ }\\{\bfseries timer} (\+\_\+c\+\_\+constructor$<$ F0 $>$ \+\_\+c0, \+\_\+c\+\_\+loop\+\_\+constructor$<$ F1 $>$ \+\_\+c1)\label{structecore_1_1timer_a77bd6444096fb02492f98ed0e38f80ec}

\end{DoxyCompactItemize}

\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename F\+\_\+func\+\_\+ $>$ }\\static \+\_\+c\+\_\+constructor$<$ F\+\_\+func\+\_\+ $>$ \hyperlink{structecore_1_1timer_aac56292fbc7dd08cf9f63389d8ce3650}{constructor} (double in\+\_\+, F\+\_\+func\+\_\+ \&\&func\+\_\+)
\begin{DoxyCompactList}\small\item\em Create a timer to call in a given time from when the mainloop woke up from sleep. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename F\+\_\+func\+\_\+ $>$ }\\static \+\_\+c\+\_\+loop\+\_\+constructor$<$ F\+\_\+func\+\_\+ $>$ \hyperlink{structecore_1_1timer_a4cffe0e8bcfcd2c6adc93045c3ec3bba}{loop\+\_\+constructor} (double in\+\_\+, F\+\_\+func\+\_\+ \&\&func\+\_\+)
\begin{DoxyCompactList}\small\item\em Create a timer to call in a given time from now. \end{DoxyCompactList}\item 
\hypertarget{structecore_1_1timer_a8f70d33cd223548b63d8cc4596a2152d}{}static \hyperlink{group__Eo_ga88d29df76a2921aa5478803156d83be5}{Eo\+\_\+\+Class} const $\ast$ {\bfseries \+\_\+eo\+\_\+class} ()\label{structecore_1_1timer_a8f70d33cd223548b63d8cc4596a2152d}

\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}


\subsection{Detailed Description}
Timers are objects that will call a given callback at some point. 


\begin{DoxyItemize}
\item in the future. They may also optionall repeat themselves if the
\item timer callback returns true. If it does not they will be
\item automatically deleted and never called again. Timers require the
\item ecore mainloop to be running and functioning properly. They do not
\item guarantee exact timing, but try to work on a "best effort basis. 
\end{DoxyItemize}

\subsection{Constructor \& Destructor Documentation}
\hypertarget{structecore_1_1timer_a1b473fe8bcda62d0e600f7ba20b9fb5c}{}\index{ecore\+::timer@{ecore\+::timer}!timer@{timer}}
\index{timer@{timer}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{timer}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F0 , typename F1 $>$ ecore\+::timer\+::timer (
\begin{DoxyParamCaption}
\item[{\+::{\bf efl\+::eo\+::parent\+\_\+type}}]{\+\_\+p, }
\item[{\+\_\+c\+\_\+constructor$<$ F0 $>$}]{\+\_\+c0, }
\item[{\+\_\+c\+\_\+loop\+\_\+constructor$<$ F1 $>$}]{\+\_\+c1}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{structecore_1_1timer_a1b473fe8bcda62d0e600f7ba20b9fb5c}


Constructs a new \hyperlink{structecore_1_1timer}{ecore\+::timer} object. 

Constructs a new \hyperlink{structecore_1_1timer}{ecore\+::timer} object. If you want this object to be a child of another Eo object, use an efl\+::eo\+::parent expression, like the example.

Since this class have necessary constructor methods, you must call each one of them in the right place within this constructor parameters.

Example\+: 
\begin{DoxyCode}
\hyperlink{structecore_1_1timer}{ecore::timer} my\_timer(\hyperlink{group__Efl__Cxx__API_ga9a67daec890c873d3df9cf33b2ddd187}{efl::eo::parent} = parent\_object,
   my\_timer.constructor(in\_, func\_),
   my\_timer.loop\_constructor(in\_, func\_));
\end{DoxyCode}


\begin{DoxySeeAlso}{See also}
\hyperlink{structecore_1_1timer_aac56292fbc7dd08cf9f63389d8ce3650}{timer\+::constructor} 

\hyperlink{structecore_1_1timer_a4cffe0e8bcfcd2c6adc93045c3ec3bba}{timer\+::loop\+\_\+constructor} 

\hyperlink{structecore_1_1timer_a1dd2ec18ee2b0b997cac8e6f69a83663}{timer(\+Eo$\ast$ eo)} 
\end{DoxySeeAlso}
\hypertarget{structecore_1_1timer_a1dd2ec18ee2b0b997cac8e6f69a83663}{}\index{ecore\+::timer@{ecore\+::timer}!timer@{timer}}
\index{timer@{timer}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{timer}]{\setlength{\rightskip}{0pt plus 5cm}ecore\+::timer\+::timer (
\begin{DoxyParamCaption}
\item[{{\bf Eo} $\ast$}]{eo}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{structecore_1_1timer_a1dd2ec18ee2b0b997cac8e6f69a83663}


Eo Constructor. 

Constructs the object from an Eo$\ast$ pointer stealing its ownership.


\begin{DoxyParams}{Parameters}
{\em eo} & The Eo object pointer. \\
\hline
\end{DoxyParams}
\hypertarget{structecore_1_1timer_a47b90780f6180a1664505c97729cdedc}{}\index{ecore\+::timer@{ecore\+::timer}!timer@{timer}}
\index{timer@{timer}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{timer}]{\setlength{\rightskip}{0pt plus 5cm}ecore\+::timer\+::timer (
\begin{DoxyParamCaption}
\item[{std\+::nullptr\+\_\+t}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [explicit]}}\label{structecore_1_1timer_a47b90780f6180a1664505c97729cdedc}


nullptr\+\_\+t Constructor. 

Constructs an empty (null) object. 

\subsection{Member Function Documentation}
\hypertarget{structecore_1_1timer_aac56292fbc7dd08cf9f63389d8ce3650}{}\index{ecore\+::timer@{ecore\+::timer}!constructor@{constructor}}
\index{constructor@{constructor}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{constructor}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F\+\_\+func\+\_\+ $>$ static \+\_\+c\+\_\+constructor$<$F\+\_\+func\+\_\+$>$ ecore\+::timer\+::constructor (
\begin{DoxyParamCaption}
\item[{double}]{in\+\_\+, }
\item[{F\+\_\+func\+\_\+ \&\&}]{func\+\_\+}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}\label{structecore_1_1timer_aac56292fbc7dd08cf9f63389d8ce3650}


Create a timer to call in a given time from when the mainloop woke up from sleep. 


\begin{DoxyParams}{Parameters}
{\em in} & The time, in seconds, from when the main loop woke up, to go off \\
\hline
{\em func} & The callback function to call when the timer goes off \\
\hline
{\em data} & A pointer to pass to the callback function as its data pointer \\
\hline
\end{DoxyParams}
\hypertarget{structecore_1_1timer_a4cffe0e8bcfcd2c6adc93045c3ec3bba}{}\index{ecore\+::timer@{ecore\+::timer}!loop\+\_\+constructor@{loop\+\_\+constructor}}
\index{loop\+\_\+constructor@{loop\+\_\+constructor}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{loop\+\_\+constructor}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename F\+\_\+func\+\_\+ $>$ static \+\_\+c\+\_\+loop\+\_\+constructor$<$F\+\_\+func\+\_\+$>$ ecore\+::timer\+::loop\+\_\+constructor (
\begin{DoxyParamCaption}
\item[{double}]{in\+\_\+, }
\item[{F\+\_\+func\+\_\+ \&\&}]{func\+\_\+}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [static]}}\label{structecore_1_1timer_a4cffe0e8bcfcd2c6adc93045c3ec3bba}


Create a timer to call in a given time from now. 


\begin{DoxyParams}{Parameters}
{\em in} & The time, in seconds, from now when to go off \\
\hline
{\em func} & The callback function to call when the timer goes off \\
\hline
{\em data} & A pointer to pass to the callback function as its data pointer \\
\hline
\end{DoxyParams}
\hypertarget{structecore_1_1timer_a3c30e9db626c64063653c4c042a0b2b6}{}\index{ecore\+::timer@{ecore\+::timer}!reset@{reset}}
\index{reset@{reset}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{reset}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+::timer\+::reset (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{structecore_1_1timer_a3c30e9db626c64063653c4c042a0b2b6}


Reset a timer to its full interval. 

This effectively makes
\begin{DoxyItemize}
\item the timer start ticking off from zero now.
\item \begin{DoxyNote}{Note}
This is equivalent to (but faster than)
\end{DoxyNote}

\item 
\begin{DoxyCode}
* ecore\_timer\_delay(\hyperlink{structecore_1_1timer_a1b473fe8bcda62d0e600f7ba20b9fb5c}{timer}, ecore\_timer\_interval\_get(\hyperlink{structecore_1_1timer_a1b473fe8bcda62d0e600f7ba20b9fb5c}{timer}) - ecore\_timer\_pending\_get(
      \hyperlink{structecore_1_1timer_a1b473fe8bcda62d0e600f7ba20b9fb5c}{timer}));
* 
\end{DoxyCode}

\item \begin{DoxySince}{Since}
1.\+2 
\end{DoxySince}

\end{DoxyItemize}\hypertarget{structecore_1_1timer_a1c1fbc68a989e8708d8b03ec5a4a5805}{}\index{ecore\+::timer@{ecore\+::timer}!delay@{delay}}
\index{delay@{delay}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{delay}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+::timer\+::delay (
\begin{DoxyParamCaption}
\item[{double}]{add\+\_\+}
\end{DoxyParamCaption}
) const}\label{structecore_1_1timer_a1c1fbc68a989e8708d8b03ec5a4a5805}


Add some delay for the next occurrence of a timer. 


\begin{DoxyItemize}
\item This doesn\textquotesingle{}t affect the interval of a timer.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em add} & The amount of time to delay the timer by in seconds \\
\hline
\end{DoxyParams}
\hypertarget{structecore_1_1timer_af65d1be325ab79ee5bbe531a6b006439}{}\index{ecore\+::timer@{ecore\+::timer}!interval\+\_\+get@{interval\+\_\+get}}
\index{interval\+\_\+get@{interval\+\_\+get}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{interval\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}double ecore\+::timer\+::interval\+\_\+get (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const}\label{structecore_1_1timer_af65d1be325ab79ee5bbe531a6b006439}


Get the interval the timer ticks on. 


\begin{DoxyParams}{Parameters}
{\em in} & The new interval in seconds \\
\hline
\end{DoxyParams}
\hypertarget{structecore_1_1timer_a6764bd85c17acd427e29454bc44b4e44}{}\index{ecore\+::timer@{ecore\+::timer}!interval\+\_\+set@{interval\+\_\+set}}
\index{interval\+\_\+set@{interval\+\_\+set}!ecore\+::timer@{ecore\+::timer}}
\subsubsection[{interval\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}void ecore\+::timer\+::interval\+\_\+set (
\begin{DoxyParamCaption}
\item[{double}]{in\+\_\+}
\end{DoxyParamCaption}
) const}\label{structecore_1_1timer_a6764bd85c17acd427e29454bc44b4e44}


Change the interval the timer ticks off. 

If set during
\begin{DoxyItemize}
\item a timer call, this will affect the next interval.
\end{DoxyItemize}


\begin{DoxyParams}{Parameters}
{\em in} & The new interval in seconds \\
\hline
\end{DoxyParams}
