Changeset View
Changeset View
Standalone View
Standalone View
src/examples/ephysics/test_growing_balls.c
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | |||||
53 | { | 53 | { | ||
54 | _add_sphere(test_data, "big-red-ball", 60, 100, 100); | 54 | _add_sphere(test_data, "big-red-ball", 60, 100, 100); | ||
55 | _add_sphere(test_data, "big-blue-ball", 60, 150, 150); | 55 | _add_sphere(test_data, "big-blue-ball", 60, 150, 150); | ||
56 | _add_sphere(test_data, "big-green-ball", 60, 200, 200); | 56 | _add_sphere(test_data, "big-green-ball", 60, 200, 200); | ||
57 | test_data->data = ecore_timer_add(1, _grow_cb, test_data); | 57 | test_data->data = ecore_timer_add(1, _grow_cb, test_data); | ||
58 | } | 58 | } | ||
59 | 59 | | |||
60 | static void | 60 | static void | ||
61 | _win_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) | 61 | _win_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | ||
62 | { | 62 | { | ||
63 | Test_Data *test_data = data; | 63 | Test_Data *test_data = data; | ||
64 | Ecore_Timer *timer = test_data->data; | 64 | Ecore_Timer *timer = test_data->data; | ||
65 | 65 | | |||
66 | if (timer) | 66 | if (timer) | ||
67 | ecore_timer_del(timer); | 67 | ecore_timer_del(timer); | ||
68 | 68 | | |||
69 | test_data_del(test_data); | 69 | test_data_del(test_data); | ||
70 | ephysics_shutdown(); | 70 | ephysics_shutdown(); | ||
71 | } | 71 | } | ||
72 | 72 | | |||
73 | static void | 73 | static void | ||
74 | _restart(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__) | 74 | _restart(void *data, Evas_Object *obj EINA_UNUSED, const char *emission EINA_UNUSED, const char *source EINA_UNUSED) | ||
75 | { | 75 | { | ||
76 | Test_Data *test_data = data; | 76 | Test_Data *test_data = data; | ||
77 | Ecore_Timer *timer = test_data->data; | 77 | Ecore_Timer *timer = test_data->data; | ||
78 | 78 | | |||
79 | if (timer) | 79 | if (timer) | ||
80 | ecore_timer_del(timer); | 80 | ecore_timer_del(timer); | ||
81 | 81 | | |||
82 | DBG("Restart pressed"); | 82 | DBG("Restart pressed"); | ||
83 | test_clean(test_data); | 83 | test_clean(test_data); | ||
84 | _world_populate(test_data); | 84 | _world_populate(test_data); | ||
85 | } | 85 | } | ||
86 | 86 | | |||
87 | void | 87 | void | ||
88 | test_growing_balls(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) | 88 | test_growing_balls(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) | ||
89 | { | 89 | { | ||
90 | EPhysics_Body *boundary; | 90 | EPhysics_Body *boundary; | ||
91 | EPhysics_World *world; | 91 | EPhysics_World *world; | ||
92 | Test_Data *test_data; | 92 | Test_Data *test_data; | ||
93 | 93 | | |||
94 | if (!ephysics_init()) | 94 | if (!ephysics_init()) | ||
95 | return; | 95 | return; | ||
96 | 96 | | |||
Show All 26 Lines |