\hypertarget{evas-events_8c-example}{}\doxysection{evas-\/events.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifdef HAVE\_CONFIG\_H}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include "{}config.h"{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define PACKAGE\_EXAMPLES\_DIR "{}."{}}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <Ecore.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}}>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <stdio.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <errno.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#include "{}evas-\/common.h"{}}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#define WIDTH  (320)}}
\DoxyCodeLine{\textcolor{preprocessor}{\#define HEIGHT (240)}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *img\_path = PACKAGE\_EXAMPLES\_DIR EVAS\_IMAGE\_FOLDER \textcolor{stringliteral}{"{}/enlightenment.png"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *commands = \(\backslash\)}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}commands are:\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)ta -\/ toggle animation timer\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tc -\/ cycle between focus and key grabs for key input\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)td -\/ delete canvas callbacks\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tf -\/ freeze input for 3 seconds\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tp -\/ toggle precise point collision detection on image\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)tControl + o -\/ add an obscured rectangle\(\backslash\)n"{}}}
\DoxyCodeLine{  \textcolor{stringliteral}{"{}\(\backslash\)th -\/ print help\(\backslash\)n"{}};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }test\_data}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Ecore\_Evas  *ee;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}        *canvas;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *img, *bg;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Timer__Group_gaf96ffb609956658ec038e54bd39f46f0}{Ecore\_Timer}} *resize\_timer, *freeze\_timer;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}    obscured, focus;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keyword}{struct }test\_data d = \{0\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* Keep the example's window size in sync with the background image's size */}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_canvas\_resize\_cb(Ecore\_Evas *ee)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} w, h;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(ee, NULL, NULL, \&w, \&h);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.bg, w, h);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* called when our rectangle gets focus */}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_object\_focus\_in\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{                    \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e,}
\DoxyCodeLine{                    \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}An object got focused: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{          \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7934106d84f6a019fcb421b6b4d860a3}{evas\_object\_name\_get}}(event\_info));}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Let's recheck it: \%s\(\backslash\)n"{}},}
\DoxyCodeLine{          \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7934106d84f6a019fcb421b6b4d860a3}{evas\_object\_name\_get}}(\mbox{\hyperlink{group__Evas__Canvas_gabeeab2a18e586a4195d85b6a0c50413a}{evas\_focus\_get}}(e)));}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}And again: \%s\(\backslash\)n"{}}, \mbox{\hyperlink{group__Evas__Object__Group_ga797d900504cf98d5f3c711b17ab5eaba}{evas\_object\_focus\_get}}(event\_info) ?}
\DoxyCodeLine{          \textcolor{stringliteral}{"{}OK!"{}} : \textcolor{stringliteral}{"{}Oops, something is bad."{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* render flush callback */}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_render\_flush\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{                 \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{                 \textcolor{keywordtype}{void} *event\_info \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Canvas is about to flush its rendering pipeline!\(\backslash\)n"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* put some action in the canvas */}}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_resize\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} w, h, cw, ch;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}}(d.img, NULL, NULL, \&w, \&h);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}}(d.ee, NULL, NULL, \&cw, \&ch);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (w < cw)}
\DoxyCodeLine{     \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.img, cw, ch);}
\DoxyCodeLine{   \textcolor{keywordflow}{else}}
\DoxyCodeLine{     \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.img, cw / 2, ch / 2);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}}; \textcolor{comment}{/* re-\/issue the timer */}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* let's have our events back */}}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_thaw\_cb(\textcolor{keywordtype}{void} *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Canvas was frozen \%d times, now thawing.\(\backslash\)n"{}},}
\DoxyCodeLine{          \mbox{\hyperlink{group__Evas__Event__Feeding__Group_gaca66af7f9b72ddbd63104d59c1fdf894}{evas\_event\_freeze\_get}}(d.canvas));}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Event__Feeding__Group_ga376918c56c3dc588a059da7fe8629b70}{evas\_event\_thaw}}(d.canvas);}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}}; \textcolor{comment}{/* do not re-\/issue the timer */}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* mouse enters the object's area */}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_mouse\_in(\textcolor{keywordtype}{void}        *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}        *evas \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{             \textcolor{keywordtype}{void}        *einfo \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Enlightenment logo has had the mouse in.\(\backslash\)n"{}});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_mouse\_out(\textcolor{keywordtype}{void}        *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{              \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}        *evas \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{              \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{              \textcolor{keywordtype}{void}        *einfo \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}Enlightenment logo has had the mouse out.\(\backslash\)n"{}});}
\DoxyCodeLine{\} \textcolor{comment}{/* mouse exits the object's area */}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{comment}{/* examine the keys pressed */}}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_on\_keydown(\textcolor{keywordtype}{void}        *data \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{            \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}}        *evas,}
\DoxyCodeLine{            \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *o \mbox{\hyperlink{group__Eina__Types__Group_ga82d751be730f849719ca292f9558be87}{EINA\_UNUSED}},}
\DoxyCodeLine{            \textcolor{keywordtype}{void}        *einfo)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keyword}{const} Evas\_Modifier *mods;}
\DoxyCodeLine{   \mbox{\hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down}} *ev = einfo;}
\DoxyCodeLine{}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}We've got key input: \%s\(\backslash\)n"{}}, ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}});}
\DoxyCodeLine{   printf(\textcolor{stringliteral}{"{}It actually came from \%s\(\backslash\)n"{}},}
\DoxyCodeLine{          d.focus ? \textcolor{stringliteral}{"{}focus"{}} : \textcolor{stringliteral}{"{}key grab"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}h"{}}) == 0) \textcolor{comment}{/* print help */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        puts(commands);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}a"{}}) == 0) \textcolor{comment}{/* toggle animation timer */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (d.resize\_timer != NULL)}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}Stopping animation timer\(\backslash\)n"{}});}
\DoxyCodeLine{             \mbox{\hyperlink{group__Ecore__Timer__Group_gaba2b599c7aabe3ab664dc3d47f62a33a}{ecore\_timer\_del}}(d.resize\_timer);}
\DoxyCodeLine{             d.resize\_timer = NULL;}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}Re-\/issuing animation timer\(\backslash\)n"{}});}
\DoxyCodeLine{             d.resize\_timer = \mbox{\hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{ecore\_timer\_add}}(2, \_resize\_cb, NULL);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}c"{}}) == 0) \textcolor{comment}{/* cycle between focus and key}}
\DoxyCodeLine{\textcolor{comment}{                                       * grabs for key input */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} ret;}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Keys_ga111c7333a7d49e44698bd19dd5bc9059}{Evas\_Modifier\_Mask}} mask =}
\DoxyCodeLine{          \mbox{\hyperlink{group__Evas__Canvas_ga668f8e34ce152d130f37b6b903db3ee2}{evas\_key\_modifier\_mask\_get}}(d.canvas, \textcolor{stringliteral}{"{}Control"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Switching to \%s for key input\(\backslash\)n"{}},}
\DoxyCodeLine{               d.focus ? \textcolor{stringliteral}{"{}key grabs"{}} : \textcolor{stringliteral}{"{}focus"{}});}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (d.focus)}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group_ga4405e118e1fb762987af1269b6848db5}{evas\_object\_focus\_set}}(d.bg, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{             printf(\textcolor{stringliteral}{"{}Focused object is now \%s\(\backslash\)n"{}},}
\DoxyCodeLine{                    \mbox{\hyperlink{group__Evas__Canvas_gabeeab2a18e586a4195d85b6a0c50413a}{evas\_focus\_get}}(d.canvas) ?}
\DoxyCodeLine{                    \textcolor{stringliteral}{"{}still valid! Something went wrong."{}} : \textcolor{stringliteral}{"{}none."{}});}
\DoxyCodeLine{}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}a"{}}, 0, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}c"{}}, 0, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}d"{}}, 0, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}f"{}}, 0, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}p"{}}, 0, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}o"{}}, mask, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             ret = \mbox{\hyperlink{group__Evas__Object__Group__Events_ga85828f3c1f252391def19e179b850def}{evas\_object\_key\_grab}}(d.bg, \textcolor{stringliteral}{"{}h"{}}, 0, 0, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{             \textcolor{keywordflow}{if} (!ret)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Something went wrong with key grabs.\(\backslash\)n"{}});}
\DoxyCodeLine{                  \textcolor{keywordflow}{goto} c\_end;}
\DoxyCodeLine{               \}}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        \textcolor{keywordflow}{else} \textcolor{comment}{/* got here by key grabs */}}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}a"{}}, 0, 0);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}c"{}}, 0, 0);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}d"{}}, 0, 0);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}f"{}}, 0, 0);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}p"{}}, 0, 0);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}o"{}}, mask, 0);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group__Events_ga4bf730e4f650c51a9a76d76bc63f44c9}{evas\_object\_key\_ungrab}}(d.bg, \textcolor{stringliteral}{"{}h"{}}, 0, 0);}
\DoxyCodeLine{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Object__Group_ga4405e118e1fb762987af1269b6848db5}{evas\_object\_focus\_set}}(d.bg, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{          \}}
\DoxyCodeLine{}
\DoxyCodeLine{c\_end:}
\DoxyCodeLine{        d.focus = !d.focus;}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}d"{}}) == 0) \textcolor{comment}{/* delete canvas' callbacks */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Deleting canvas event callbacks\(\backslash\)n"{}});}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}}(evas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a5a68e4f5dccdc18a393ef4a4773236c3}{EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE}},}
\DoxyCodeLine{                                     \_render\_flush\_cb, NULL);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Canvas__Events_ga48b6d066830a1350bd5c8770070cd3f9}{evas\_event\_callback\_del\_full}}(}
\DoxyCodeLine{          evas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a7380ca16bf87762e96309473d3d306c5}{EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN}},}
\DoxyCodeLine{          \_object\_focus\_in\_cb, NULL);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}f"{}}) == 0) \textcolor{comment}{/* freeze input for 3 seconds */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Freezing input for 3 seconds\(\backslash\)n"{}});}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Event__Feeding__Group_ga4f6046343eab8b062e5509d984100ec8}{evas\_event\_freeze}}(evas);}
\DoxyCodeLine{        d.freeze\_timer = \mbox{\hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{ecore\_timer\_add}}(3, \_thaw\_cb, NULL);}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}p"{}}) == 0) \textcolor{comment}{/* toggle precise point}}
\DoxyCodeLine{\textcolor{comment}{                                       * collision detection */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}} precise = \mbox{\hyperlink{group__Evas__Object__Group_ga98701c8e66ca7c96032fdb486728e270}{evas\_object\_precise\_is\_inside\_get}}(d.img);}
\DoxyCodeLine{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Toggling precise point collision detection \%s on Enlightenment logo\(\backslash\)n"{}},}
\DoxyCodeLine{               precise ? \textcolor{stringliteral}{"{}off"{}} : \textcolor{stringliteral}{"{}on"{}});}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga02844427c0e15ef2fb61412debf40ce3}{evas\_object\_precise\_is\_inside\_set}}(d.img, !precise);}
\DoxyCodeLine{}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   mods = \mbox{\hyperlink{group__Evas__Canvas_gaad42bb4caa43c1cfef4096f6ac2b99ec}{evas\_key\_modifier\_get}}(evas);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Keys_ga6cc24a5ea4b39b84c7a3e617de3db261}{evas\_key\_modifier\_is\_set}}(mods, \textcolor{stringliteral}{"{}Control"{}}) \&\&}
\DoxyCodeLine{       (strcmp(ev-\/>\mbox{\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}}, \textcolor{stringliteral}{"{}o"{}}) == 0)) \textcolor{comment}{/* add an obscured}}
\DoxyCodeLine{\textcolor{comment}{                                        * rectangle to the middle}}
\DoxyCodeLine{\textcolor{comment}{                                        * of the canvas */}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        printf(\textcolor{stringliteral}{"{}Toggling obscured rectangle on canvas\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{if} (!d.obscured)}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \textcolor{keywordtype}{int} w, h;}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_ga346bb724a254e8681c382b84886045b4}{evas\_output\_viewport\_get}}(evas, NULL, NULL, \&w, \&h);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_ga163f9df9ba453f2f731c4bea12bb946b}{evas\_obscured\_rectangle\_add}}(evas, w / 4, h / 4, w / 2, h / 2);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        \textcolor{keywordflow}{else}}
\DoxyCodeLine{          \{}
\DoxyCodeLine{             \textcolor{keywordtype}{int} w, h;}
\DoxyCodeLine{             \mbox{\hyperlink{struct__Eina__Rectangle}{Eina\_Rectangle}} *rect;}
\DoxyCodeLine{             \mbox{\hyperlink{struct__Eina__List}{Eina\_List}} *updates, *l;}
\DoxyCodeLine{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_ga346bb724a254e8681c382b84886045b4}{evas\_output\_viewport\_get}}(evas, NULL, NULL, \&w, \&h);}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_ga6bd5caa330850f63f4e9d91271fefc62}{evas\_obscured\_clear}}(evas);}
\DoxyCodeLine{}
\DoxyCodeLine{             \textcolor{comment}{/* we have to flag a damage region here because}}
\DoxyCodeLine{\textcolor{comment}{              * evas\_obscured\_clear() doesn't change the canvas'}}
\DoxyCodeLine{\textcolor{comment}{              * state. we'd have to wait for an animation step, for}}
\DoxyCodeLine{\textcolor{comment}{              * example, to get the result, without it */}}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_gab1482931249c640efb25453b54950a16}{evas\_damage\_rectangle\_add}}(evas, 0, 0, w, h);}
\DoxyCodeLine{}
\DoxyCodeLine{             updates = \mbox{\hyperlink{group__Evas__Canvas_ga1867d9f5f97545418598496af93e4c71}{evas\_render\_updates}}(evas);}
\DoxyCodeLine{}
\DoxyCodeLine{             \mbox{\hyperlink{group__Eina__List__Group_gac6efafc19f526d916cdb9757240a8773}{EINA\_LIST\_FOREACH}}(updates, l, rect)}
\DoxyCodeLine{               \{}
\DoxyCodeLine{                  printf(\textcolor{stringliteral}{"{}Rectangle (\%d, \%d, \%d, \%d) on canvas got a"{}}}
\DoxyCodeLine{                                  \textcolor{stringliteral}{"{} rendering update.\(\backslash\)n"{}}, rect-\/>\mbox{\hyperlink{struct__Eina__Rectangle_a8358c0791dcf476432687510ca4e5d5c}{x}}, rect-\/>\mbox{\hyperlink{struct__Eina__Rectangle_ae74dc834fb71a1f4cd9e3fe11dec3940}{y}},}
\DoxyCodeLine{                          rect-\/>\mbox{\hyperlink{struct__Eina__Rectangle_af6a92d51ec25ee3464c81297ffc3a330}{w}},}
\DoxyCodeLine{                          rect-\/>\mbox{\hyperlink{struct__Eina__Rectangle_a7570ed17f58fc94be997414a86130074}{h}});}
\DoxyCodeLine{               \}}
\DoxyCodeLine{             \mbox{\hyperlink{group__Evas__Canvas_ga038d98c7c13a86b6ba4de51f8aba3595}{evas\_render\_updates\_free}}(updates);}
\DoxyCodeLine{          \}}
\DoxyCodeLine{        d.obscured = !d.obscured;}
\DoxyCodeLine{     \} \textcolor{comment}{/* end of obscured region command */}}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{int}}
\DoxyCodeLine{main(\textcolor{keywordtype}{void})}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} err;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}}())}
\DoxyCodeLine{     \textcolor{keywordflow}{return} EXIT\_FAILURE;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* this will give you a window with an Evas canvas under the first}}
\DoxyCodeLine{\textcolor{comment}{    * engine available */}}
\DoxyCodeLine{   d.ee = \mbox{\hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}}(NULL, 10, 10, WIDTH, HEIGHT, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!d.ee)}
\DoxyCodeLine{     \textcolor{keywordflow}{goto} error;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}}(d.ee, \_canvas\_resize\_cb);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}}(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{comment}{/* the canvas pointer, de facto */}}
\DoxyCodeLine{   d.canvas = \mbox{\hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}}(d.ee);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\_event\_callback\_add}}(d.canvas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a5a68e4f5dccdc18a393ef4a4773236c3}{EVAS\_CALLBACK\_RENDER\_FLUSH\_PRE}},}
\DoxyCodeLine{                           \_render\_flush\_cb, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Main__Group_gacfae4f589c777003f58d51e502c52835}{evas\_alloc\_error}}() != \mbox{\hyperlink{Evas__Common_8h_a1adf9f604f763f2a8db12a484ca199cba22bbdd0a96a670bbddd6789f91921af8}{EVAS\_ALLOC\_ERROR\_NONE}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: Callback registering failed! Aborting.\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{goto} panic;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Canvas__Events_gaf236cc76039a654de4df734f8875ba1a}{evas\_event\_callback\_add}}(d.canvas, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a7380ca16bf87762e96309473d3d306c5}{EVAS\_CALLBACK\_CANVAS\_OBJECT\_FOCUS\_IN}},}
\DoxyCodeLine{                           \_object\_focus\_in\_cb, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Main__Group_gacfae4f589c777003f58d51e502c52835}{evas\_alloc\_error}}() != \mbox{\hyperlink{Evas__Common_8h_a1adf9f604f763f2a8db12a484ca199cba22bbdd0a96a670bbddd6789f91921af8}{EVAS\_ALLOC\_ERROR\_NONE}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: Callback registering failed! Aborting.\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{goto} panic;}
\DoxyCodeLine{     \} \textcolor{comment}{/* two canvas event callbacks */}}
\DoxyCodeLine{}
\DoxyCodeLine{   d.bg = \mbox{\hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga88bfcce07ad3bcef31687e29075ae2d2}{evas\_object\_name\_set}}(d.bg, \textcolor{stringliteral}{"{}our dear rectangle"{}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}}(d.bg, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(d.bg, 0, 0); \textcolor{comment}{/* at canvas' origin */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.bg, WIDTH, HEIGHT); \textcolor{comment}{/* covers full canvas */}}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.bg);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga4405e118e1fb762987af1269b6848db5}{evas\_object\_focus\_set}}(d.bg, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}}); \textcolor{comment}{/* so we get input events */}}
\DoxyCodeLine{   d.focus = \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(}
\DoxyCodeLine{     d.bg, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}}, \_on\_keydown, NULL);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (\mbox{\hyperlink{group__Evas__Main__Group_gacfae4f589c777003f58d51e502c52835}{evas\_alloc\_error}}() != \mbox{\hyperlink{Evas__Common_8h_a1adf9f604f763f2a8db12a484ca199cba22bbdd0a96a670bbddd6789f91921af8}{EVAS\_ALLOC\_ERROR\_NONE}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: Callback registering failed! Aborting.\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{goto} panic;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   d.img = \mbox{\hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}}(d.canvas);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}}(d.img, img\_path, NULL);}
\DoxyCodeLine{   err = \mbox{\hyperlink{group__Evas__Object__Image_ga5a1eec674128f5d1365e80d628ad2bc3}{evas\_object\_image\_load\_error\_get}}(d.img);}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (err != \mbox{\hyperlink{group__Evas__Image_gga17a0211044defa51aa3ceaadaa4e53c2a016233a6ae27765a3aa2759753c112ac}{EVAS\_LOAD\_ERROR\_NONE}})}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        fprintf(stderr, \textcolor{stringliteral}{"{}ERROR: Image loading failed! Aborting.\(\backslash\)n"{}});}
\DoxyCodeLine{        \textcolor{keywordflow}{goto} panic;}
\DoxyCodeLine{     \}}
\DoxyCodeLine{   \textcolor{keywordflow}{else}}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}}(d.img, 0, 0);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}}(d.img, WIDTH, HEIGHT);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(d.img);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(}
\DoxyCodeLine{          d.img, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a598c57bc146639618157159a319f11af}{EVAS\_CALLBACK\_MOUSE\_IN}}, \_on\_mouse\_in, NULL);}
\DoxyCodeLine{        \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(}
\DoxyCodeLine{          d.img, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a91aaa30a57047d0ee8a734e603751c25}{EVAS\_CALLBACK\_MOUSE\_OUT}}, \_on\_mouse\_out, NULL);}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   d.resize\_timer = \mbox{\hyperlink{group__Ecore__Timer__Group_ga7b9cb9d24ecebfdbb957436e2e669402}{ecore\_timer\_add}}(2, \_resize\_cb, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   puts(commands);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}}();}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}}(d.ee);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{   \textcolor{keywordflow}{return} 0;}
\DoxyCodeLine{}
\DoxyCodeLine{error:}
\DoxyCodeLine{   fprintf(stderr, \textcolor{stringliteral}{"{}error: Requires at least one Evas engine built and linked"{}}}
\DoxyCodeLine{                   \textcolor{stringliteral}{"{} to ecore-\/evas for this example to run properly.\(\backslash\)n"{}});}
\DoxyCodeLine{panic:}
\DoxyCodeLine{   \mbox{\hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}}();}
\DoxyCodeLine{   \textcolor{keywordflow}{return} -\/1;}
\DoxyCodeLine{\}}

\end{DoxyCodeInclude}
 