\hypertarget{test_camera_8c-example}{}\doxysection{test\+\_\+camera.\+c}

\begin{DoxyCodeInclude}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#ifdef HAVE\_CONFIG\_H}}
\DoxyCodeLine{\textcolor{preprocessor}{\# include <config.h>}}
\DoxyCodeLine{\textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{preprocessor}{\#include "ephysics\_test.h"}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{typedef} \textcolor{keyword}{struct }\_Camera\_Data Camera\_Data;}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{struct }\_Camera\_Data \{}
\DoxyCodeLine{     Test\_Data base;}
\DoxyCodeLine{     Ecore\_Animator *animator;}
\DoxyCodeLine{     \textcolor{keywordtype}{int} old\_x;}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_update\_floor(\mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *floor\_obj, \mbox{\hyperlink{Evas__Common_8h_a2453e92182bad3b0e0d84e5aff433b07}{Evas\_Coord}} delta)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \textcolor{keywordtype}{int} fx, x, y;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga6f52fab1a96dc58c85ee481d84bac871}{evas\_object\_geometry\_get}}(floor\_obj, \&x, \&y, NULL, NULL);}
\DoxyCodeLine{   fx = x + delta;}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (fx < -\/FLOOR\_WIDTH)}
\DoxyCodeLine{     fx += 2 * FLOOR\_WIDTH;}
\DoxyCodeLine{   evas\_object\_move(floor\_obj, fx, y);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_camera\_moved\_cb(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World}} *world \_\_UNUSED\_\_, \textcolor{keywordtype}{void} *event\_info)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{EPhysics\_Camera}} *camera = event\_info;}
\DoxyCodeLine{   Camera\_Data *camera\_data = data;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *floor\_obj;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} x;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__File__Group_gae8924623ca601364965e3d88fb7f40fa}{DBG}}(\textcolor{stringliteral}{"Camera moved"});}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{ephysics\_camera\_position\_get}}(camera, \&x, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   floor\_obj = \mbox{\hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"floor"});}
\DoxyCodeLine{   \_update\_floor(floor\_obj, camera\_data-\/>old\_x -\/ x);}
\DoxyCodeLine{}
\DoxyCodeLine{   floor\_obj = \mbox{\hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"floor2"});}
\DoxyCodeLine{   \_update\_floor(floor\_obj, camera\_data-\/>old\_x -\/ x);}
\DoxyCodeLine{}
\DoxyCodeLine{   camera\_data-\/>old\_x = x;}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\_Bool}}}
\DoxyCodeLine{\_camera\_move\_cb(\textcolor{keywordtype}{void} *data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Camera\_Data *camera\_data = data;}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{EPhysics\_Camera}} *camera;}
\DoxyCodeLine{   \textcolor{keywordtype}{int} x, y, w;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__World_ga6bc905b2f56aa2a6c567d9a1575f9075}{ephysics\_world\_render\_geometry\_get}}(camera\_data-\/>base.world,}
\DoxyCodeLine{                                      NULL, NULL, NULL, \&w, NULL, NULL);}
\DoxyCodeLine{}
\DoxyCodeLine{   camera = \mbox{\hyperlink{group__EPhysics__World_ga97fe0c2a98a7998f29f7390cea868ff0}{ephysics\_world\_camera\_get}}(camera\_data-\/>base.world);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_ga5e549e85d0d98a878dc636b6463645d6}{ephysics\_camera\_position\_get}}(camera, \&x, \&y);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (x + w > WIDTH * 2)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        camera\_data-\/>animator = NULL;}
\DoxyCodeLine{        \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   x += 2;}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\_camera\_position\_set}}(camera, x, y);}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{return} \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}};}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_world\_populate(Camera\_Data *camera\_data)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *sphere, *shadow;}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body}} *fall\_body;}
\DoxyCodeLine{}
\DoxyCodeLine{   shadow = \mbox{\hyperlink{group__Elm__Layout_gaca5aee4ad4d92c68f13d1080c70baf8b}{elm\_layout\_add}}(camera\_data-\/>base.win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Layout_ga8d1105463d52787a7b0ca8d7402cd3ea}{elm\_layout\_file\_set}}(}
\DoxyCodeLine{      shadow, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/"} EPHYSICS\_TEST\_THEME \textcolor{stringliteral}{".edj"}, \textcolor{stringliteral}{"shadow-\/ball"});}
\DoxyCodeLine{   evas\_object\_move(shadow, WIDTH / 3, FLOOR\_Y);}
\DoxyCodeLine{   evas\_object\_resize(shadow, 70, 3);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(shadow);}
\DoxyCodeLine{   camera\_data-\/>base.evas\_objs = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(camera\_data-\/>base.evas\_objs,}
\DoxyCodeLine{                                                  shadow);}
\DoxyCodeLine{}
\DoxyCodeLine{   sphere = \mbox{\hyperlink{group__Elm__Image_ga5d211c8af4f6e297a24fc4e8737c81a9}{elm\_image\_add}}(camera\_data-\/>base.win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{      sphere, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/"} EPHYSICS\_TEST\_THEME \textcolor{stringliteral}{".edj"},}
\DoxyCodeLine{      \textcolor{stringliteral}{"big-\/blue-\/ball"});}
\DoxyCodeLine{   evas\_object\_move(sphere, WIDTH / 3, FLOOR\_Y -\/ 70);}
\DoxyCodeLine{   evas\_object\_resize(sphere, 70, 70);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(sphere);}
\DoxyCodeLine{   camera\_data-\/>base.evas\_objs = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(camera\_data-\/>base.evas\_objs,}
\DoxyCodeLine{                                                  sphere);}
\DoxyCodeLine{}
\DoxyCodeLine{   fall\_body = \mbox{\hyperlink{group__EPhysics__Body_gab26c09b5a98dabfb0323dbdb7f2a64af}{ephysics\_body\_sphere\_add}}(camera\_data-\/>base.world);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(fall\_body, sphere, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}}(fall\_body, 0.2);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}}(fall\_body, 1);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(fall\_body, \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}},}
\DoxyCodeLine{                                    update\_object\_cb, shadow);}
\DoxyCodeLine{   camera\_data-\/>base.bodies = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(camera\_data-\/>base.bodies,}
\DoxyCodeLine{                                               fall\_body);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga9109b39047a724640f6a18c683c9eb07}{ephysics\_body\_central\_impulse\_apply}}(fall\_body, 300, 0, 0);}
\DoxyCodeLine{}
\DoxyCodeLine{   shadow = \mbox{\hyperlink{group__Elm__Layout_gaca5aee4ad4d92c68f13d1080c70baf8b}{elm\_layout\_add}}(camera\_data-\/>base.win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Layout_ga8d1105463d52787a7b0ca8d7402cd3ea}{elm\_layout\_file\_set}}(}
\DoxyCodeLine{      shadow, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/"} EPHYSICS\_TEST\_THEME \textcolor{stringliteral}{".edj"}, \textcolor{stringliteral}{"shadow-\/ball"});}
\DoxyCodeLine{   evas\_object\_move(shadow, WIDTH * 4 / 3, FLOOR\_Y);}
\DoxyCodeLine{   evas\_object\_resize(shadow, 70, 3);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(shadow);}
\DoxyCodeLine{   camera\_data-\/>base.evas\_objs = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(camera\_data-\/>base.evas\_objs,}
\DoxyCodeLine{                                                  shadow);}
\DoxyCodeLine{}
\DoxyCodeLine{   sphere = \mbox{\hyperlink{group__Elm__Image_ga5d211c8af4f6e297a24fc4e8737c81a9}{elm\_image\_add}}(camera\_data-\/>base.win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{      sphere, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/"} EPHYSICS\_TEST\_THEME \textcolor{stringliteral}{".edj"}, \textcolor{stringliteral}{"big-\/red-\/ball"});}
\DoxyCodeLine{   evas\_object\_move(sphere, WIDTH * 4 / 3, FLOOR\_Y -\/ 70);}
\DoxyCodeLine{   evas\_object\_resize(sphere, 70, 70);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(sphere);}
\DoxyCodeLine{   camera\_data-\/>base.evas\_objs = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(camera\_data-\/>base.evas\_objs,}
\DoxyCodeLine{                                                  sphere);}
\DoxyCodeLine{}
\DoxyCodeLine{   fall\_body = \mbox{\hyperlink{group__EPhysics__Body_gab26c09b5a98dabfb0323dbdb7f2a64af}{ephysics\_body\_sphere\_add}}(camera\_data-\/>base.world);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}}(fall\_body, 4.6);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga39cb9e95bbe1d097926a09365c501db3}{ephysics\_body\_evas\_object\_set}}(fall\_body, sphere, \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\_TRUE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}}(fall\_body, 0.12);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}}(fall\_body, 2);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_gada176f4748a4c2fc4ba2042021ea7067}{ephysics\_body\_event\_callback\_add}}(fall\_body, \mbox{\hyperlink{group__EPhysics__Body_gga904d0d1462e71c1f32cb27f540b5277cacb2363cd59bc8642e74ad916c6658e0a}{EPHYSICS\_CALLBACK\_BODY\_UPDATE}},}
\DoxyCodeLine{                                    update\_object\_cb, shadow);}
\DoxyCodeLine{   camera\_data-\/>base.bodies = \mbox{\hyperlink{group__Eina__List__Group_ga92ec14d1a1040a361c4d8cd0ab7b0ecc}{eina\_list\_append}}(camera\_data-\/>base.bodies,}
\DoxyCodeLine{                                               fall\_body);}
\DoxyCodeLine{}
\DoxyCodeLine{   camera\_data-\/>animator = \mbox{\hyperlink{group__Ecore__Animator__Group_gaa1e33b8be9117a26918823c535e429ea}{ecore\_animator\_add}}(\_camera\_move\_cb, camera\_data);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_win\_del(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Canvas_ga5ff87cc4ce6bc43e3b640a6d37f73043}{Evas}} *e \_\_UNUSED\_\_, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \_\_UNUSED\_\_, \textcolor{keywordtype}{void} *event\_info \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Camera\_Data *camera\_data = data;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (camera\_data-\/>animator)}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Animator__Group_gaadfa590f3c1638035393ed9d7aa10e2f}{ecore\_animator\_del}}(camera\_data-\/>animator);}
\DoxyCodeLine{}
\DoxyCodeLine{   test\_clean((Test\_Data *)camera\_data);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga7e7a625dab7a3890532aa13b43117076}{evas\_object\_del}}(camera\_data-\/>base.layout);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__World_ga99ebd1425f258f895c0089d6eb13def9}{ephysics\_world\_del}}(camera\_data-\/>base.world);}
\DoxyCodeLine{   free(camera\_data);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics_ga07e695074fb4d5d125b36c3a1d963f49}{ephysics\_shutdown}}();}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\_restart(\textcolor{keywordtype}{void} *data, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \_\_UNUSED\_\_, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *emission \_\_UNUSED\_\_, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *source \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Camera\_Data *camera\_data = data;}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_ga945948dcbf4d98beb457c77b6537116f}{EPhysics\_Camera}} *camera;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *floor\_obj;}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Eina__File__Group_gae8924623ca601364965e3d88fb7f40fa}{DBG}}(\textcolor{stringliteral}{"Restart pressed"});}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (camera\_data-\/>animator)}
\DoxyCodeLine{     \mbox{\hyperlink{group__Ecore__Animator__Group_gaadfa590f3c1638035393ed9d7aa10e2f}{ecore\_animator\_del}}(camera\_data-\/>animator);}
\DoxyCodeLine{}
\DoxyCodeLine{   camera = \mbox{\hyperlink{group__EPhysics__World_ga97fe0c2a98a7998f29f7390cea868ff0}{ephysics\_world\_camera\_get}}(camera\_data-\/>base.world);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Camera_gaed0ba3e4daecc66fca5dc399031da530}{ephysics\_camera\_position\_set}}(camera, 50, 40);}
\DoxyCodeLine{}
\DoxyCodeLine{   camera\_data-\/>old\_x = 0;}
\DoxyCodeLine{   floor\_obj = \mbox{\hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"floor"});}
\DoxyCodeLine{   evas\_object\_move(floor\_obj, 0, FLOOR\_Y -\/ 20);}
\DoxyCodeLine{   floor\_obj = \mbox{\hyperlink{group__Evas__Object__Group__Extras_gafbad43015793eda4ae50202c0ce0e652}{evas\_object\_data\_get}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"floor2"});}
\DoxyCodeLine{   evas\_object\_move(floor\_obj, FLOOR\_WIDTH, FLOOR\_Y -\/ 20);}
\DoxyCodeLine{}
\DoxyCodeLine{   test\_clean((Test\_Data *)camera\_data);}
\DoxyCodeLine{   \_world\_populate(camera\_data);}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{\textcolor{keywordtype}{void}}
\DoxyCodeLine{test\_camera(\textcolor{keywordtype}{void} *data \_\_UNUSED\_\_, \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *obj \_\_UNUSED\_\_, \textcolor{keywordtype}{void} *event\_info \_\_UNUSED\_\_)}
\DoxyCodeLine{\{}
\DoxyCodeLine{   Camera\_Data *camera\_data;}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_gaf39ad724f8a2f81f9139c63263900bf1}{EPhysics\_Body}} *boundary;}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group_ga9e19e6dd1f517a0ba437c0114d3e7c97}{Evas\_Object}} *floor\_obj;}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__World_ga83c0d22744748525aa2dac11726c58e6}{EPhysics\_World}} *world;}
\DoxyCodeLine{}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!\mbox{\hyperlink{group__EPhysics_gaca8fc170d73b3f688349cc4dbaf219fd}{ephysics\_init}}())}
\DoxyCodeLine{     \textcolor{keywordflow}{return};}
\DoxyCodeLine{}
\DoxyCodeLine{   camera\_data = calloc(1, \textcolor{keyword}{sizeof}(Camera\_Data));}
\DoxyCodeLine{   \textcolor{keywordflow}{if} (!camera\_data)}
\DoxyCodeLine{     \{}
\DoxyCodeLine{        \mbox{\hyperlink{group__Eina__File__Group_ga24e93be9c5baa3aeab7021b64e290672}{ERR}}(\textcolor{stringliteral}{"Failed to create test data"});}
\DoxyCodeLine{        \mbox{\hyperlink{group__EPhysics_ga07e695074fb4d5d125b36c3a1d963f49}{ephysics\_shutdown}}();}
\DoxyCodeLine{        \textcolor{keywordflow}{return};}
\DoxyCodeLine{     \}}
\DoxyCodeLine{}
\DoxyCodeLine{   test\_win\_add((Test\_Data *)camera\_data, \textcolor{stringliteral}{"Camera"}, \mbox{\hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{EINA\_FALSE}});}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Events_ga23be30ac5cdfb780f1ff82e9108ec26b}{evas\_object\_event\_callback\_add}}(camera\_data-\/>base.win, \mbox{\hyperlink{Evas__Common_8h_ad64cde0da38a60e7cb7905b3ab216968a4471afbcbb4a754b7b0bbde00fb9a277}{EVAS\_CALLBACK\_DEL}},}
\DoxyCodeLine{                                  \_win\_del, camera\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Layout_gadab42e647f164fc8ab585c0e1bd34cc0}{elm\_layout\_signal\_callback\_add}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"restart"},}
\DoxyCodeLine{                                  \textcolor{stringliteral}{"test-\/theme"}, \_restart, camera\_data);}
\DoxyCodeLine{}
\DoxyCodeLine{   floor\_obj = \mbox{\hyperlink{group__Elm__Image_ga5d211c8af4f6e297a24fc4e8737c81a9}{elm\_image\_add}}(camera\_data-\/>base.win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{      floor\_obj, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/"} EPHYSICS\_TEST\_THEME \textcolor{stringliteral}{".edj"}, \textcolor{stringliteral}{"floor"});}
\DoxyCodeLine{   evas\_object\_move(floor\_obj, 0, FLOOR\_Y -\/ 20);}
\DoxyCodeLine{   evas\_object\_resize(floor\_obj, FLOOR\_WIDTH, 224);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(floor\_obj);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\_object\_data\_set}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"floor"}, floor\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{   floor\_obj = \mbox{\hyperlink{group__Elm__Image_ga5d211c8af4f6e297a24fc4e8737c81a9}{elm\_image\_add}}(camera\_data-\/>base.win);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Elm__Image_gad1a96ede5f513042cef3c1dac4572f73}{elm\_image\_file\_set}}(}
\DoxyCodeLine{      floor\_obj, PACKAGE\_DATA\_DIR \textcolor{stringliteral}{"/"} EPHYSICS\_TEST\_THEME \textcolor{stringliteral}{".edj"}, \textcolor{stringliteral}{"floor"});}
\DoxyCodeLine{   evas\_object\_move(floor\_obj, FLOOR\_WIDTH, FLOOR\_Y -\/ 20);}
\DoxyCodeLine{   evas\_object\_resize(floor\_obj, FLOOR\_WIDTH, 224);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Basic_ga9cbc13661584e49fb9d9cdab514a1eeb}{evas\_object\_show}}(floor\_obj);}
\DoxyCodeLine{   \mbox{\hyperlink{group__Evas__Object__Group__Extras_ga70134a7068c9bff4107a761abe0a2ad4}{evas\_object\_data\_set}}(camera\_data-\/>base.layout, \textcolor{stringliteral}{"floor2"}, floor\_obj);}
\DoxyCodeLine{}
\DoxyCodeLine{   world = \mbox{\hyperlink{group__EPhysics__World_ga108e2d7df8c81321b8d5bde8497f0d45}{ephysics\_world\_new}}();}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__World_gaabf8abaf9c41b0c1e5daa4acf3df0356}{ephysics\_world\_render\_geometry\_set}}(world, 50, 40, -\/50,}
\DoxyCodeLine{                                      WIDTH -\/ 100, FLOOR\_Y -\/ 40, DEPTH);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__World_ga2b621ffb39920e4619fe2ec2e5508073}{ephysics\_world\_event\_callback\_add}}(world,}
\DoxyCodeLine{                                     \mbox{\hyperlink{group__EPhysics__World_gga0b0aff31f415be24679d4ab703674619aa5f6adbd98bc6599221d12ecfeb1cbc6}{EPHYSICS\_CALLBACK\_WORLD\_CAMERA\_MOVED}},}
\DoxyCodeLine{                                     \_camera\_moved\_cb, camera\_data);}
\DoxyCodeLine{   camera\_data-\/>base.world = world;}
\DoxyCodeLine{}
\DoxyCodeLine{   boundary = \mbox{\hyperlink{group__EPhysics__Body_gaf8f30587da7453114397d64dd9704d7f}{ephysics\_body\_box\_add}}(camera\_data-\/>base.world);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_gaa0915777f634079ca6c088fda5c20e8f}{ephysics\_body\_mass\_set}}(boundary, 0);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga8821fa07fb5be9d956cc090b14223fd2}{ephysics\_body\_geometry\_set}}(boundary, 0, FLOOR\_Y, -\/15, WIDTH * 2, 10, 30);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga731c9a6443f7c4294fce23fc1287b778}{ephysics\_body\_restitution\_set}}(boundary, 0.65);}
\DoxyCodeLine{   \mbox{\hyperlink{group__EPhysics__Body_ga986d45060bf6ba1689a56889a2bcabce}{ephysics\_body\_friction\_set}}(boundary, 4);}
\DoxyCodeLine{}
\DoxyCodeLine{   \_world\_populate(camera\_data);}
\DoxyCodeLine{\}}
\end{DoxyCodeInclude}
 