\hypertarget{ephysics_logo_c_ephysics-logo-c}{}\section{ephysics\+\_\+logo.\+c}\label{ephysics_logo_c_ephysics-logo-c}

\begin{DoxyCodeInclude}
\textcolor{preprocessor}{#ifdef HAVE\_CONFIG\_H}
\textcolor{preprocessor}{# include <config.h>}
\textcolor{preprocessor}{#endif}

\textcolor{preprocessor}{#include <Elementary.h>}
\textcolor{preprocessor}{#include <\hyperlink{EPhysics_8h}{EPhysics.h}>}
\textcolor{preprocessor}{#include <Evas.h>}

\textcolor{preprocessor}{#define WIDTH (512)}
\textcolor{preprocessor}{#define HEIGHT (384)}
\textcolor{preprocessor}{#define DEPTH (100)}
\textcolor{preprocessor}{#define FLOOR\_Y (HEIGHT - 80)}
\textcolor{preprocessor}{#define SH\_THRESHOLD (250)}
\textcolor{preprocessor}{#define SH\_OFFSET\_X (- 16)}
\textcolor{preprocessor}{#define OFFSET\_X (90)}
\textcolor{preprocessor}{#define PADDING\_X\_1 (16)}
\textcolor{preprocessor}{#define PADDING\_X\_2 (12)}
\textcolor{preprocessor}{#define PADDING\_X\_3 (22)}
\textcolor{preprocessor}{#define E\_THRESHOLD (WIDTH + 560)}
\textcolor{preprocessor}{#define LAYER\_SHADOW (10)}
\textcolor{preprocessor}{#define LAYER\_LETTER (20)}

\textcolor{preprocessor}{#define CENTER(total, item)  (((total) - (item)) / 2)}
\textcolor{preprocessor}{#define LIMIT(val, op, ref) (((val) op (ref)) ? (val) : (ref));}
\textcolor{preprocessor}{#define PROP\_GET(pos, min, max) (((min) + ((max) - (min)) * (pos)) / (max))}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_update\_box\_cb(\textcolor{keywordtype}{void} *data \_\_UNUSED\_\_, \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *body, \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *image = event\_info;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *shadow = \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}(image, \textcolor{stringliteral}{"shadow"});
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *light = \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}(image, \textcolor{stringliteral}{"light"});
   \textcolor{keywordtype}{int} x, y, w, h, floor\_distance, alpha = 0;

   \textcolor{comment}{/* modify the evas object according to the body */}
   \hyperlink{group__EPhysics__Body_ga7209e650176e0612efb2a2cc2af0ec27}{ephysics\_body\_evas\_object\_update}(body);
   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(image, &x, &y, &w, &h);

   floor\_distance = FLOOR\_Y - h;

   \textcolor{comment}{/* Bodies penetrates the ground slightly before bouncing. */}
   \textcolor{comment}{/* This is to be expected in realtime physics engines. */}
   \textcolor{comment}{// TODO BUG: should we move the object up by the difference????}
   \textcolor{comment}{//y = LIMIT(y, <=, floor\_distance);}

   \textcolor{comment}{/* We should show the shadow when we're close enough to ground */}
   \textcolor{keywordflow}{if} (y > SH\_THRESHOLD)
     \{
        \textcolor{keywordtype}{int} sh\_w, sh\_h;
        \textcolor{keywordtype}{double} pos\_x;

        \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(shadow, &sh\_w, &sh\_h);
        \textcolor{comment}{/* shadow is darker with bigger y */}
        alpha = 255 * (y - SH\_THRESHOLD) / (floor\_distance - SH\_THRESHOLD);
        \textcolor{comment}{/* and with bigger x -- it's proportional to x / WIDTH, but varies}
\textcolor{comment}{         * from 100 to 255.}
\textcolor{comment}{         */}
        pos\_x = (double) x / (WIDTH - w);
        alpha = alpha * PROP\_GET(pos\_x, 100, 255);
        \textcolor{comment}{/* box shadow is not resized, just moved */}
        \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(shadow, x + CENTER(w, sh\_w) + SH\_OFFSET\_X,
                         FLOOR\_Y - sh\_h + 2);
     \}
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(shadow, alpha, alpha, alpha, alpha);

   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(light, x, y);
   \textcolor{comment}{/* it's lighter with bigger y */}
   alpha = (y <= 0) ? 0 : y * 255 / floor\_distance;
   \textcolor{comment}{/* and with bigger x */}
   alpha = alpha * (x - OFFSET\_X + 80) / (WIDTH - OFFSET\_X);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(light, alpha, alpha, alpha, alpha);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_update\_circle\_cb(\textcolor{keywordtype}{void} *data \_\_UNUSED\_\_, \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *body, \textcolor{keywordtype}{void} *event\_info)
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *image = event\_info;
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *shadow = \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}(image, \textcolor{stringliteral}{"shadow"});
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *light = \hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}(image, \textcolor{stringliteral}{"light"});
   \textcolor{keywordtype}{int} x, y, w, h, sh\_w, sh\_h, alpha = 0;
   \textcolor{keyword}{const} \hyperlink{group__Evas__Object__Group__Map_gae94fcea124ae4135e8bb15a014b334dc}{Evas\_Map} *map;

   \textcolor{comment}{/* modify the evas object according to the body */}
   \hyperlink{group__EPhysics__Body_ga7209e650176e0612efb2a2cc2af0ec27}{ephysics\_body\_evas\_object\_update}(body);
   \hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}(image, &x, &y, &w, &h);

   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(light, x, y);
   alpha = x * 255 / (WIDTH - w);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(light, alpha, alpha, alpha, alpha);

   \textcolor{comment}{/* use the same map from image to the light (rotate it) */}
   map = evas\_object\_map\_get(image);
   evas\_object\_map\_set(light, map);
   evas\_object\_map\_enable\_set(light, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(shadow, &sh\_w, &sh\_h);
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(shadow, x + CENTER(w, sh\_w) + SH\_OFFSET\_X,
                    FLOOR\_Y - sh\_h + 2);
   alpha = 127 + alpha / 2;
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(shadow, alpha, alpha, alpha, alpha);

   \textcolor{keywordflow}{if} (x > E\_THRESHOLD)
     \hyperlink{group__EPhysics__Body_gae3c32aa0cdd60ffec86fff30097e75e1}{ephysics\_body\_move}(body, -w - 1, y, -15);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_letter\_add(\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *evas, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *letter, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} **image, 
      \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} **light, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} **shadow)
\{
   \textcolor{keywordtype}{int} w, h, sh\_w, sh\_h;
   \textcolor{keywordtype}{char} buf[1024];

   snprintf(buf, \textcolor{keyword}{sizeof}(buf), PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/logo\_shadow-%s.png"}, letter);
   *shadow = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(evas);
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(*shadow, buf, NULL);
   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(*shadow, &sh\_w, &sh\_h);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(*shadow, sh\_w, sh\_h);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(*shadow, 0, 0, 0, 0);
   \hyperlink{group__Evas__Font__Group_gac04277bfd84a7201ba329328a18e21fd}{evas\_object\_layer\_set}(*shadow, LAYER\_SHADOW);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(*shadow);

   snprintf(buf, \textcolor{keyword}{sizeof}(buf), PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/logo\_letter-%s.png"}, letter);
   *image = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(evas);
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(*image, buf, NULL);
   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(*image, &w, &h);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(*image, w, h);
   \hyperlink{group__Evas__Font__Group_gac04277bfd84a7201ba329328a18e21fd}{evas\_object\_layer\_set}(*image, LAYER\_LETTER);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(*image);

   snprintf(buf, \textcolor{keyword}{sizeof}(buf), PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/logo\_light-%s.png"}, letter);
   *light = \hyperlink{group__Evas__Object__Image_ga0e8cb83d31d02bf583c75925b7cd14d7}{evas\_object\_image\_filled\_add}(evas);
   \hyperlink{group__Evas__Object__Image_gac27fd0ceabe5f56607b7a86d71577df1}{evas\_object\_image\_file\_set}(*light, buf, NULL);
   \hyperlink{group__Evas__Font__Group_ga21e8604c0e4a93e469bff4bd069e82b5}{evas\_object\_resize}(*light, w, h);
   \hyperlink{group__Evas__Font__Group_gac04277bfd84a7201ba329328a18e21fd}{evas\_object\_layer\_set}(*light, LAYER\_LETTER);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(*light);

   \textcolor{comment}{/* allow easy access to shadow and light from the letter image */}
   \hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\_object\_data\_set}(*image, \textcolor{stringliteral}{"shadow"}, *shadow);
   \hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\_object\_data\_set}(*image, \textcolor{stringliteral}{"light"}, *light);
\}

\textcolor{keyword}{static} \textcolor{keywordtype}{void}
\_letter\_body\_setup\_common(\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *body, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *view)
\{
   \hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}(body, view, 
      \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}(body, 1.2);
   \hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}(body, 0.6);
   \hyperlink{group__EPhysics__Body_ga049f9410c5d04d5b810a1755da993cc0}{ephysics\_body\_angular\_movement\_enable\_set}(body, 
      \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE},
                                             \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE});
\}

\textcolor{keyword}{static} \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *
\_letter\_body\_box\_add(\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World} *world, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *image)
\{
   \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *body = \hyperlink{group__EPhysics__Body_gaf8f30587da7453114397d64dd9704d7f}{ephysics\_body\_box\_add}(world);

   \_letter\_body\_setup\_common(body, image);

   \hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}
     (body, \hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}, \_update\_box\_cb, NULL);

   \textcolor{keywordflow}{return} body;
\}

\textcolor{keyword}{static} \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *
\_letter\_body\_circle\_add(\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World} *world, \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *image)
\{
   \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *body = \hyperlink{group__EPhysics__Body_gab57e99be7fe5a5174c38b8aea55f3266}{ephysics\_body\_cylinder\_add}(world);

   \_letter\_body\_setup\_common(body, image);

   \hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}
     (body, \hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}, \_update\_circle\_cb, NULL);

   \textcolor{keywordflow}{return} body;
\}

EAPI\_MAIN \textcolor{keywordtype}{int}
elm\_main(\textcolor{keywordtype}{int} argc \_\_UNUSED\_\_, \textcolor{keywordtype}{char} **argv \_\_UNUSED\_\_)
\{
   \hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object} *win, *bg, *image, *light, *shadow;
   \hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body} *ground\_body, *letter\_body;
   \hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World} *world;
   \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} i = 0;
   \textcolor{keywordtype}{int} x, w, h, sh\_w;
   \hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas} *evas;

   \textcolor{keyword}{struct }letter\_desc \{
      \textcolor{keyword}{const} \textcolor{keywordtype}{char} *letter;
      \textcolor{keywordtype}{int} padding;
   \} falling\_letters[] = \{
     \{\textcolor{stringliteral}{"P"}, PADDING\_X\_1\},
     \{\textcolor{stringliteral}{"H"}, PADDING\_X\_1\},
     \{\textcolor{stringliteral}{"Y"}, PADDING\_X\_3\},
     \{\textcolor{stringliteral}{"S1"}, PADDING\_X\_2\},
     \{\textcolor{stringliteral}{"I"}, PADDING\_X\_2\},
     \{\textcolor{stringliteral}{"C"}, PADDING\_X\_3\},
     \{\textcolor{stringliteral}{"S2"}, 0\}
   \};

   \textcolor{keywordflow}{if} (!\hyperlink{group__EPhysics_gaca8fc170d73b3f688349cc4dbaf219fd}{ephysics\_init}())
     \textcolor{keywordflow}{return} - 1;

   elm\_policy\_set(ELM\_POLICY\_QUIT, ELM\_POLICY\_QUIT\_LAST\_WINDOW\_CLOSED);

   win = elm\_win\_add(NULL, \textcolor{stringliteral}{"main"}, ELM\_WIN\_SPLASH);
   elm\_win\_title\_set(win, \textcolor{stringliteral}{"EPhysics Logo"});
   elm\_win\_autodel\_set(win, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(win);

   bg = elm\_bg\_add(win);
   elm\_bg\_file\_set(bg, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/logo\_background.png"}, NULL);
   elm\_win\_resize\_object\_add(win, bg);
   evas\_object\_size\_hint\_min\_set(bg, WIDTH, HEIGHT);
   evas\_object\_size\_hint\_max\_set(bg, WIDTH, HEIGHT);
   \hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}(bg);

   world = \hyperlink{group__EPhysics__World_ga108e2d7df8c81321b8d5bde8497f0d45}{ephysics\_world\_new}();
   \hyperlink{group__EPhysics__World_gaabf8abaf9c41b0c1e5daa4acf3df0356}{ephysics\_world\_render\_geometry\_set}(world, 0, 0, -50, WIDTH, HEIGHT, 
      DEPTH);

   ground\_body = \hyperlink{group__EPhysics__Body_gaf8f30587da7453114397d64dd9704d7f}{ephysics\_body\_box\_add}(world);
   \hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}(ground\_body, 
      \hyperlink{group__EPhysics__Body_ga6f5a7cbea749e1567d608b9321af9eb9}{EPHYSICS\_BODY\_MASS\_STATIC});
   \hyperlink{group__EPhysics__Body_ga8821fa07fb5be9d956cc090b14223fd2}{ephysics\_body\_geometry\_set}(ground\_body, -100, FLOOR\_Y, -15, WIDTH + 800, 10,
                              30);
   \hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}(ground\_body, 0.65);
   \hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}(ground\_body, 0.8);

   evas = evas\_object\_evas\_get(win);
   x = OFFSET\_X;

   \textcolor{keywordflow}{for} (i = 0; i < \hyperlink{group__Eina__Types__Group_ga7c1b6f81660b4e30516169e9e7d3261c}{EINA\_C\_ARRAY\_LENGTH}(falling\_letters); i++)
     \{
        \_letter\_add(evas, falling\_letters[i].letter, &image, &light, &shadow);

        \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(shadow, &sh\_w, NULL);
        \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(image, &w, &h);

        \textcolor{comment}{/* place image and light on top, above what the viewport can show */}
        \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(image, x, -h * (i + 1) - 50);
        \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(light, x, -h * (i + 1) - 50);
        \textcolor{comment}{/* place shadow below the hit-line: FLOOR\_Y, centered at image */}
        \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(shadow, x + CENTER(w, sh\_w), FLOOR\_Y);

        x += falling\_letters[i].padding + w;

        letter\_body = \_letter\_body\_box\_add(world, image);
        \hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}(letter\_body, 0.4);
     \}

   \textcolor{comment}{/* E is a circle that comes rolling on the floor */}
   \_letter\_add(evas, \textcolor{stringliteral}{"E"}, &image, &light, &shadow);
   \hyperlink{group__Evas__Object__Group__Basic_gae34bdcfd7f5100151f6ea8ef4a392949}{evas\_object\_color\_set}(shadow, 255, 255, 255, 255);

   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(shadow, &sh\_w, NULL);
   \hyperlink{group__Evas__Object__Image_ga6307d5c3560528d7525a6c2ed16360ed}{evas\_object\_image\_size\_get}(image, &w, &h);
   \textcolor{comment}{/* place image and light so they are above the floor,}
\textcolor{comment}{    * and to the left of viewport}
\textcolor{comment}{    */}
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(image, -w - 1, FLOOR\_Y - h + 1);
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(light, -w - 1, FLOOR\_Y - h + 1);
   \textcolor{comment}{/* place the shadow below the hit-line: FLOOR\_Y, centered at image */}
   \hyperlink{group__Evas__Font__Group_ga02da8091bbac768b8e86c7b74b2a94f9}{evas\_object\_move}(shadow, -w - 1 + CENTER(w, sh\_w), FLOOR\_Y);

   letter\_body = \_letter\_body\_circle\_add(world, image);
   \hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}(letter\_body, 1);
   \hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}(letter\_body, 1);
   \hyperlink{group__EPhysics__Body_ga049f9410c5d04d5b810a1755da993cc0}{ephysics\_body\_angular\_movement\_enable\_set}(letter\_body, 
      \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE},
                                             \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}, \hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE});

   \textcolor{comment}{/* make the "E" logo get into the viewport by applying an horizontal force */}
   \hyperlink{group__EPhysics__Body_ga9109b39047a724640f6a18c683c9eb07}{ephysics\_body\_central\_impulse\_apply}(letter\_body, 390, 0, 0);

   elm\_run();

   \hyperlink{group__EPhysics__World_ga99ebd1425f258f895c0089d6eb13def9}{ephysics\_world\_del}(world);
   \hyperlink{group__EPhysics_ga07e695074fb4d5d125b36c3a1d963f49}{ephysics\_shutdown}();
   elm\_shutdown();

   \textcolor{keywordflow}{return} 0;
\}
ELM\_MAIN()
\end{DoxyCodeInclude}
 