From bc9821c1ff642e25978199e5253ec843c9b100d6 Mon Sep 17 00:00:00 2001 From: Bruno Dilly Date: Thu, 6 Dec 2012 22:11:10 +0000 Subject: [PATCH] edje: modify some embryo forces func names for consistency Since embryo functions names are verb_subject, not subject_verb. So forces_clear -> clear_forces ... SVN revision: 80398 --- legacy/edje/data/include/edje.inc | 8 ++++---- legacy/edje/src/examples/physics_actions.edc | 6 +++--- legacy/edje/src/lib/edje_embryo.c | 24 ++++++++++++------------ 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/legacy/edje/data/include/edje.inc b/legacy/edje/data/include/edje.inc index 5ca9488..a0d40a0 100644 --- a/legacy/edje/data/include/edje.inc +++ b/legacy/edje/data/include/edje.inc @@ -230,7 +230,7 @@ native play_tone (tone_name[], Float:duration); * * physics_force(PART:"logo", 0, 240, 0); * physics_torque(PART:"logo", 0, 0, 2.2); - * physics_forces_clear(PART:"logo"); + * physics_clear_forces(PART:"logo"); * * physics_set_velocity(PART:"logo", 40.5, 0, 0); * physics_set_ang_velocity(PART:"logo", 0, 0, -3); @@ -240,10 +240,10 @@ native physics_impulse (part_id, Float:x, Float:y, Float:z); native physics_torque_impulse (part_id, Float:x, Float:y, Float:z); native physics_torque (part_id, Float:x, Float:y, Float:z); -native physics_torques_get (part_id, &Float:x, &Float:y, &Float:z); +native physics_get_torques (part_id, &Float:x, &Float:y, &Float:z); native physics_force (part_id, Float:x, Float:y, Float:z); -native physics_forces_get (part_id, &Float:x, &Float:y, &Float:z); -native physics_forces_clear (part_id); +native physics_get_forces (part_id, &Float:x, &Float:y, &Float:z); +native physics_clear_forces (part_id); native physics_set_velocity (part_id, Float:x, Float:y, Float:z); native physics_get_velocity (part_id, &Float:x, &Float:y, &Float:z); diff --git a/legacy/edje/src/examples/physics_actions.edc b/legacy/edje/src/examples/physics_actions.edc index f73e879..5d5723a 100644 --- a/legacy/edje/src/examples/physics_actions.edc +++ b/legacy/edje/src/examples/physics_actions.edc @@ -115,7 +115,7 @@ collections { getsarg(2, name, sizeof(name)); pid = get_part_id(name); if (!pid) return; - physics_forces_clear(pid); + physics_clear_forces(pid); } else if ((id == ID_FORCES_GET) && (type == MSG_STRING)) { new Float:x, Float:y, Float:z; @@ -123,7 +123,7 @@ collections { getsarg(2, name, sizeof(name)); pid = get_part_id(name); if (!pid) return; - physics_forces_get(pid, x, y, z); + physics_get_forces(pid, x, y, z); send_message(MSG_FLOAT_SET, id, x, y, z); } else if ((id == ID_TORQUES_GET) && (type == MSG_STRING)) { @@ -132,7 +132,7 @@ collections { getsarg(2, name, sizeof(name)); pid = get_part_id(name); if (!pid) return; - physics_torques_get(pid, x, y, z); + physics_get_torques(pid, x, y, z); send_message(MSG_FLOAT_SET, id, x, y, z); } else if ((id == ID_VEL_SET) && (type == MSG_FLOAT_SET)) { diff --git a/legacy/edje/src/lib/edje_embryo.c b/legacy/edje/src/lib/edje_embryo.c index 2dde916..8417536 100644 --- a/legacy/edje/src/lib/edje_embryo.c +++ b/legacy/edje/src/lib/edje_embryo.c @@ -204,9 +204,9 @@ * physics_torque_impulse(part_id, Float:x, Float:y, Float:z) * physics_force(part_id, Float:x, Float:y, Float:z) * physics_torque(part_id, Float:x, Float:y, Float:z) - * physics_forces_clear(part_id) - * physics_forces_get(part_id, &Float:x, &Float:y, &Float:z) - * physics_torques_get(part_id, &Float:x, &Float:y, &Float:z) + * physics_clear_forces(part_id) + * physics_get_forces(part_id, &Float:x, &Float:y, &Float:z) + * physics_get_torques(part_id, &Float:x, &Float:y, &Float:z) * physics_set_velocity(part_id, Float:x, Float:y, Float:z) * physics_get_velocity(part_id, &Float:x, &Float:y, &Float:z) * physics_set_ang_velocity(part_id, Float:x, Float:y, Float:z) @@ -3135,9 +3135,9 @@ _edje_embryo_fn_physics_torque(Embryo_Program *ep, Embryo_Cell *params) ep, params, ephysics_body_torque_apply); } -/* physics_forces_clear(part_id) */ +/* physics_clear_forces(part_id) */ static Embryo_Cell -_edje_embryo_fn_physics_forces_clear(Embryo_Program *ep, Embryo_Cell *params) +_edje_embryo_fn_physics_clear_forces(Embryo_Program *ep, Embryo_Cell *params) { Edje_Real_Part *rp; int part_id = 0; @@ -3156,17 +3156,17 @@ _edje_embryo_fn_physics_forces_clear(Embryo_Program *ep, Embryo_Cell *params) return 0; } -/* physics_forces_get(part_id, &Float:x, &Float:y, &Float:z) */ +/* physics_get_forces(part_id, &Float:x, &Float:y, &Float:z) */ static Embryo_Cell -_edje_embryo_fn_physics_forces_get(Embryo_Program *ep, Embryo_Cell *params) +_edje_embryo_fn_physics_get_forces(Embryo_Program *ep, Embryo_Cell *params) { return _edje_embryo_fn_physics_components_get( ep, params, ephysics_body_forces_get); } -/* physics_torques_get(part_id, &Float:x, &Float:y, &Float:z) */ +/* physics_get_torques(part_id, &Float:x, &Float:y, &Float:z) */ static Embryo_Cell -_edje_embryo_fn_physics_torques_get(Embryo_Program *ep, Embryo_Cell *params) +_edje_embryo_fn_physics_get_torques(Embryo_Program *ep, Embryo_Cell *params) { return _edje_embryo_fn_physics_components_get( ep, params, ephysics_body_torques_get); @@ -3326,9 +3326,9 @@ _edje_embryo_script_init(Edje_Part_Collection *edc) embryo_program_native_call_add(ep, "physics_torque_impulse", _edje_embryo_fn_physics_torque_impulse); embryo_program_native_call_add(ep, "physics_force", _edje_embryo_fn_physics_force); embryo_program_native_call_add(ep, "physics_torque", _edje_embryo_fn_physics_torque); - embryo_program_native_call_add(ep, "physics_forces_clear", _edje_embryo_fn_physics_forces_clear); - embryo_program_native_call_add(ep, "physics_forces_get", _edje_embryo_fn_physics_forces_get); - embryo_program_native_call_add(ep, "physics_torques_get", _edje_embryo_fn_physics_torques_get); + embryo_program_native_call_add(ep, "physics_clear_forces", _edje_embryo_fn_physics_clear_forces); + embryo_program_native_call_add(ep, "physics_get_forces", _edje_embryo_fn_physics_get_forces); + embryo_program_native_call_add(ep, "physics_get_torques", _edje_embryo_fn_physics_get_torques); embryo_program_native_call_add(ep, "physics_set_velocity", _edje_embryo_fn_physics_set_velocity); embryo_program_native_call_add(ep, "physics_get_velocity", _edje_embryo_fn_physics_get_velocity); embryo_program_native_call_add(ep, "physics_set_ang_velocity", _edje_embryo_fn_physics_set_ang_velocity); -- 2.7.4