\hypertarget{evas-images2_8c-example}{\section{evas-\/images2.\+c}
}

\begin{DoxyCodeInclude}

\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}
\textcolor{preprocessor}{#include "config.h"}
\textcolor{preprocessor}{#else}
\textcolor{preprocessor}{#define PACKAGE\_EXAMPLES\_DIR "."}
\textcolor{preprocessor}{#endif}

\textcolor{preprocessor}{#include <Ecore.h>}
\textcolor{preprocessor}{#include <\hyperlink{Ecore__Evas_8h}{Ecore\_Evas.h}>}
\textcolor{preprocessor}{#include <stdio.h>}
\textcolor{preprocessor}{#include <errno.h>}

\textcolor{preprocessor}{#define WIDTH  (320)}
\textcolor{preprocessor}{#define HEIGHT (240)}

\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *img\_path = PACKAGE\_EXAMPLES\_DIR \textcolor{stringliteral}{"/enlightenment.png"};
\textcolor{keyword}{static} \textcolor{keyword}{const} \textcolor{keywordtype}{char} *commands = \(\backslash\)
  \textcolor{stringliteral}{"commands are:\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tp - change proxy image's source\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)ts - print noise image's stride value\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)ta - save noise image to disk (/tmp dir)\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)tv - change source visibility\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)te - enable/disable source events\(\backslash\)n"}
  \textcolor{stringliteral}{"\(\backslash\)th - print help\(\backslash\)n"};

\textcolor{keyword}{const} \textcolor{keywordtype}{char} *file\_path = \textcolor{stringliteral}{"/tmp/evas-images2-example.png"};
\textcolor{keyword}{const} \textcolor{keywordtype}{char} *quality\_str = \textcolor{stringliteral}{"quality=100"};

\textcolor{keyword}{struct }test\_data
\{
   Ecore\_Evas  *ee;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *\hyperlink{namespaceevas}{evas};
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *logo, *noise\_img, *proxy\_img, *bg;
\};

\textcolor{keyword}{static} \textcolor{keyword}{struct }test\_data d = \{0\};

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_mouse\_down(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
            \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Mouse__Down}{Evas\_Event\_Mouse\_Down} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Mouse Down - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->\hyperlink{struct__Evas__Event__Mouse__Down_adcaa4cd5eadd8c04cc5510a5b2514eb5}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad809771faf3700a1492e4465336e6b1e}{x},
          ev->\hyperlink{struct__Evas__Event__Mouse__Down_adcaa4cd5eadd8c04cc5510a5b2514eb5}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad7450d6ad43e6a7394af6807721144f7}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_mouse\_move(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
            \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Mouse__Move}{Evas\_Event\_Mouse\_Move} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Mouse Move - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->\hyperlink{struct__Evas__Event__Mouse__Move_a652812079b71cc4c52053a75c4b574e2}{cur}.\hyperlink{struct__Evas__Position_a7e8e1417868ef65b1c2cee1f9f02e4eb}{canvas}.
      \hyperlink{struct__Evas__Coord__Point_ad809771faf3700a1492e4465336e6b1e}{x},
          ev->\hyperlink{struct__Evas__Event__Mouse__Move_a652812079b71cc4c52053a75c4b574e2}{cur}.\hyperlink{struct__Evas__Position_a7e8e1417868ef65b1c2cee1f9f02e4eb}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad7450d6ad43e6a7394af6807721144f7}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_mouse\_up(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
          \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Mouse__Up}{Evas\_Event\_Mouse\_Up} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Mouse Up - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->\hyperlink{struct__Evas__Event__Mouse__Up_a6da4d82e2ec11b37fe971b17c5ac01dc}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad809771faf3700a1492e4465336e6b1e}{x},
          ev->\hyperlink{struct__Evas__Event__Mouse__Up_a6da4d82e2ec11b37fe971b17c5ac01dc}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad7450d6ad43e6a7394af6807721144f7}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_multi\_down(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
            \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Multi__Down}{Evas\_Event\_Multi\_Down} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Multi Down - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->canvas.\hyperlink{struct__Evas__Coord__Precision__Point_a8cab3483eece4600b298d56f4a46fc60}{x},
          ev->canvas.\hyperlink{struct__Evas__Coord__Precision__Point_a76cb7d78f6840bcad39739cbe26227d2}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_multi\_move(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
             \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Multi__Move}{Evas\_Event\_Multi\_Move} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Multi Move - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->cur.\hyperlink{struct__Evas__Precision__Position_a4ee2ba8991b6657d668397b75f939eb7}{canvas}.\hyperlink{struct__Evas__Coord__Precision__Point_a8cab3483eece4600b298d56f4a46fc60}{x},
          ev->cur.\hyperlink{struct__Evas__Precision__Position_a4ee2ba8991b6657d668397b75f939eb7}{canvas}.\hyperlink{struct__Evas__Coord__Precision__Point_a76cb7d78f6840bcad39739cbe26227d2}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_multi\_up(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
          \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Multi__Up}{Evas\_Event\_Multi\_Up} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Multi Up - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->canvas.\hyperlink{struct__Evas__Coord__Precision__Point_a8cab3483eece4600b298d56f4a46fc60}{x},
          ev->canvas.\hyperlink{struct__Evas__Coord__Precision__Point_a76cb7d78f6840bcad39739cbe26227d2}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_mouse\_in(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
          \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Mouse__In}{Evas\_Event\_Mouse\_In} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Mouse In - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->\hyperlink{struct__Evas__Event__Mouse__In_a8b899409a50a9caf027cb195bf68683f}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad809771faf3700a1492e4465336e6b1e}{x},
          ev->\hyperlink{struct__Evas__Event__Mouse__In_a8b899409a50a9caf027cb195bf68683f}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad7450d6ad43e6a7394af6807721144f7}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_mouse\_out(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
           \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Mouse__Out}{Evas\_Event\_Mouse\_Out} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Mouse Out - obj(%p), coords(%d %d)\(\backslash\)n"}, obj, ev->\hyperlink{struct__Evas__Event__Mouse__Out_abd681a1b6fc7f555c30ac86c664de696}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad809771faf3700a1492e4465336e6b1e}{x},
          ev->\hyperlink{struct__Evas__Event__Mouse__Out_abd681a1b6fc7f555c30ac86c664de696}{canvas}.\hyperlink{struct__Evas__Coord__Point_ad7450d6ad43e6a7394af6807721144f7}{y});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_hold(\textcolor{keywordtype}{void} *data EINA\_UNUSED, \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *e EINA\_UNUSED, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj,
      \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{struct__Evas__Event__Hold}{Evas\_Event\_Hold} *ev = event\_info;
   printf(\textcolor{stringliteral}{"Hold - obj(%p), hold(%d)\(\backslash\)n"}, obj, ev->\hyperlink{struct__Evas__Event__Hold_a21f7238382ebd994e083623f777853f3}{hold});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_preloaded(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
              \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *e EINA\_UNUSED,
              \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *obj EINA\_UNUSED,
              \textcolor{keywordtype}{void}        *event\_info EINA\_UNUSED)
\{
    fprintf(stdout, \textcolor{stringliteral}{"Image has been pre-loaded!\(\backslash\)n"});
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_destroy(Ecore\_Evas *ee EINA\_UNUSED)
\{
   \hyperlink{group__Ecore__Main__Loop__Group_ga95cf8e97dff0716433c2c5474d606a98}{ecore\_main\_loop\_quit}();
\}

\textcolor{comment}{/* here just to keep our example's window size and background image's}
\textcolor{comment}{ * size in synchrony */}
\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_canvas\_resize\_cb(Ecore\_Evas *ee)
\{
   \textcolor{keywordtype}{int} w, h;

   \hyperlink{group__Ecore__Evas__Group_ga931aadf4603731e73e8a84e4b14f1493}{ecore\_evas\_geometry\_get}(ee, NULL, NULL, &w, &h);
   evas\_object\_resize(d.bg, w, h);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_on\_keydown(\textcolor{keywordtype}{void}        *data EINA\_UNUSED,
            \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}        *\hyperlink{namespaceevas}{evas} EINA\_UNUSED,
            \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *o EINA\_UNUSED,
            \textcolor{keywordtype}{void}        *einfo)
\{
   \hyperlink{struct__Evas__Event__Key__Down}{Evas\_Event\_Key\_Down} *ev = einfo;

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"h"}) == 0) \textcolor{comment}{/* print help */}
     \{
        fprintf(stdout, commands);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"s"}) == 0) \textcolor{comment}{/* print proxy image' stride value */}
     \{
        \textcolor{keywordtype}{int} stride = evas\_object\_image\_stride\_get(d.noise\_img);

        fprintf(stdout, \textcolor{stringliteral}{"Image has row stride value of %d, which accounts"}
                        \textcolor{stringliteral}{" for %d pixels\(\backslash\)n"}, stride, stride / 4);

        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"p"}) == 0) \textcolor{comment}{/* change proxy's source */}
     \{
        \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *source = evas\_object\_image\_source\_get(d.proxy\_img);

        \textcolor{keywordflow}{if} (source == d.logo) source = d.noise\_img;
        \textcolor{keywordflow}{else} source = d.logo;

        evas\_object\_image\_source\_set(d.proxy\_img, source);

        fprintf(stdout, \textcolor{stringliteral}{"Proxy image's source changed\(\backslash\)n"});

        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"a"}) == 0) \textcolor{comment}{/* save noise image to disk */}
     \{
        \textcolor{keywordflow}{if} (!\hyperlink{group__Evas__Object__Image_ga8bd6201d1b5c5f0e65600b491c6557e4}{evas\_object\_image\_save}(d.noise\_img, file\_path, NULL, quality\_str))
          fprintf(stderr, \textcolor{stringliteral}{"Cannot save image to '%s' (flags '%s')\(\backslash\)n"},
                  file\_path, quality\_str);
        \textcolor{keywordflow}{else}
          fprintf(stdout, \textcolor{stringliteral}{"Image saved to '%s' (flags '%s'), check it out with "}
                          \textcolor{stringliteral}{"an image viewer\(\backslash\)n"}, file\_path, quality\_str);

        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"v"}) == 0) \textcolor{comment}{/* change source visibility */}
     \{
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} src\_visible =
           evas\_object\_image\_source\_visible\_get(d.proxy\_img);
        evas\_object\_image\_source\_visible\_set(d.proxy\_img, !src\_visible);
        \textcolor{keywordflow}{return};
     \}

   \textcolor{keywordflow}{if} (strcmp(ev->\hyperlink{struct__Evas__Event__Key__Down_a70473bba88a1afaee180a54150513824}{key}, \textcolor{stringliteral}{"e"}) == 0) \textcolor{comment}{/* change source events */}
     \{
        \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool} src\_events = evas\_object\_image\_source\_events\_get(d.proxy\_img);
        evas\_object\_image\_source\_events\_set(d.proxy\_img, !src\_events);
        \textcolor{keywordflow}{return};
     \}
\}

\textcolor{keywordtype}{int}
main(\textcolor{keywordtype}{void})
\{
   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i;
   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} pixels[(WIDTH / 4) * (HEIGHT / 4)];

   srand(time(NULL));

   \textcolor{keywordflow}{if} (!\hyperlink{group__Ecore__Evas__Group_ga32ddbb6457033ad435a177eb0c4fe235}{ecore\_evas\_init}())
     \textcolor{keywordflow}{return} EXIT\_FAILURE;

   \textcolor{comment}{/* this will give you a window with an Evas canvas under the first}
\textcolor{comment}{    * engine available */}
   d.ee = \hyperlink{group__Ecore__Evas__Group_gac7f2cdbcb79635c34317c1183dd04cb0}{ecore\_evas\_new}(NULL, 10, 10, WIDTH, HEIGHT, NULL);
   \textcolor{keywordflow}{if} (!d.ee)
     \textcolor{keywordflow}{goto} \hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error};

   \hyperlink{group__Ecore__Evas__Group_ga3680b5c89157167318192157a5d24ec4}{ecore\_evas\_callback\_destroy\_set}(d.ee, \_on\_destroy);
   \hyperlink{group__Ecore__Evas__Group_gaac67f679c9027059a34519fbdea360df}{ecore\_evas\_callback\_resize\_set}(d.ee, \_canvas\_resize\_cb);
   \hyperlink{group__Ecore__Evas__Group_ga4953047ff97d4f1b0d75a7d513d4f317}{ecore\_evas\_show}(d.ee);

   \textcolor{comment}{/* the canvas pointer, de facto */}
   d.evas = \hyperlink{group__Ecore__Evas__Group_ga75a7cc694b6069e78df47dab0b0f2d20}{ecore\_evas\_get}(d.ee);

   d.bg = \hyperlink{group__Evas__Object__Rectangle_ga4d80fc32ad1cac28428cebd65d746751}{evas\_object\_rectangle\_add}(d.evas);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(d.bg, 255, 255, 255, 255); \textcolor{comment}{/* white bg */}
   evas\_object\_move(d.bg, 0, 0); \textcolor{comment}{/* at canvas' origin */}
   evas\_object\_resize(d.bg, WIDTH, HEIGHT); \textcolor{comment}{/* covers full canvas */}
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.bg);

   evas\_object\_focus\_set(d.bg, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(
     d.bg, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa336b86bad4f145f84c155e4922335584}{EVAS\_CALLBACK\_KEY\_DOWN}, \_on\_keydown, NULL);

   d.logo = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.evas);

   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(
       d.logo, \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa5cd5ca5f4dcd51dd2429f020cb2dfa9e}{EVAS\_CALLBACK\_IMAGE\_PRELOADED}, \_on\_preloaded, NULL);
   \hyperlink{group__Evas__Object__Image_gae314b3d41feb8c395854d8f03cb1d6b2}{evas\_object\_image\_preload}(d.logo, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(d.logo, img\_path, NULL);
   evas\_object\_resize(d.logo, WIDTH / 2, HEIGHT / 2);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa9fa52651ccf7e47cd3b7785fc4cf393f}{EVAS\_CALLBACK\_MOUSE\_DOWN}, \_mouse\_down, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa23fb97fb7cbccded54ccf3fc4e1dab8a}{EVAS\_CALLBACK\_MOUSE\_MOVE}, \_mouse\_move, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa8c1b22c99dd0231cd9ba1fecbffffac7}{EVAS\_CALLBACK\_MOUSE\_UP}, \_mouse\_up, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa598c57bc146639618157159a319f11af}{EVAS\_CALLBACK\_MOUSE\_IN}, \_mouse\_in, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa91aaa30a57047d0ee8a734e603751c25}{EVAS\_CALLBACK\_MOUSE\_OUT}, \_mouse\_out, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aab5bb0de31eaeed655255e71ffe518b80}{EVAS\_CALLBACK\_MULTI\_DOWN}, \_multi\_down, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa4328f52cfb700b5c705edf7173afdd94}{EVAS\_CALLBACK\_MULTI\_UP}, \_multi\_up, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa6d0ade7e69dc62f728fa2e29168e923f}{EVAS\_CALLBACK\_MULTI\_MOVE}, \_multi\_move, 0);
   \hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}(d.logo, 
      \hyperlink{Evas__Common_8h_a99e208e463a20499aabe6faac8a8cb8aa585e05307b99c361e54df68a4f341a85}{EVAS\_CALLBACK\_HOLD}, \_hold, 0);

   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.logo);

   \textcolor{comment}{/* creating noise image */}
   \textcolor{keywordflow}{for} (i = 0; i < \textcolor{keyword}{sizeof}(pixels) / \textcolor{keyword}{sizeof}(pixels[0]); i++)
     pixels[i] = rand();

   d.noise\_img = \hyperlink{group__Evas__Object__Image_gadd901a6b181c38dc040537b3fd76fcc6}{evas\_object\_image\_add}(d.evas);
   evas\_object\_image\_size\_set(d.noise\_img, WIDTH / 4, HEIGHT / 4);
   evas\_object\_image\_data\_set(d.noise\_img, pixels);
   evas\_object\_image\_filled\_set(d.noise\_img, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   evas\_object\_move(d.noise\_img, (WIDTH * 3) / 4, 0);
   evas\_object\_resize(d.noise\_img, WIDTH / 4, HEIGHT / 4);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.noise\_img);
   fprintf(stdout, \textcolor{stringliteral}{"Creating noise image with size %d, %d\(\backslash\)n"},
           WIDTH / 4, HEIGHT / 4);

   d.proxy\_img = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(d.evas);
   evas\_object\_image\_source\_set(d.proxy\_img, d.logo);
   evas\_object\_move(d.proxy\_img, WIDTH / 4, HEIGHT / 2);
   evas\_object\_resize(d.proxy\_img, WIDTH / 2, HEIGHT / 2);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(d.proxy\_img);

   fprintf(stdout, commands);
   \hyperlink{group__Ecore__Main__Loop__Group_gaf103b9f668bb3e4fed12e52c6180132d}{ecore\_main\_loop\_begin}();

   \hyperlink{group__Ecore__Evas__Group_gad3ec61f2aa03df4d3dbfd0d311e0c8dc}{ecore\_evas\_free}(d.ee);
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \textcolor{keywordflow}{return} 0;

\hyperlink{namespaceefl_1_1eina_1_1log__level_a0eec9fe47d243634f680b56a7d768ec7}{error}:
   fprintf(stderr, \textcolor{stringliteral}{"you got to have at least one evas engine built and linked"}
                   \textcolor{stringliteral}{" up to ecore-evas for this example to run properly.\(\backslash\)n"});
   \hyperlink{group__Ecore__Evas__Group_gab8fa311077f749190c9b622f672b2214}{ecore\_evas\_shutdown}();
   \textcolor{keywordflow}{return} -1;
\}
\end{DoxyCodeInclude}
 