static void
map_source(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
- Map_Source *ms = data;
+ Map_Source *s = data;
- if (!ms) return;
- elm_map_source_name_set(ms->map, ms->source_name);
+ if (!s) return;
+ elm_map_source_name_set(s->map, s->source_name);
}
/*
return 0;
}
-static int
-get_distance(Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2)
-{
- int dx = x1 - x2;
- int dy = y1 - y2;
- return sqrt((dx * dx) + (dy * dy));
-}
-
static Event *
create_event_object(void *data, Evas_Object *obj, int device)
{
ELM_CHECK_WIDTYPE(data, widtype);
Widget_Data *wd = elm_widget_data_get(data);
Evas_Event_Multi_Move *move = event_info;
- int dis_new;
+ int dis_new, dx, dy;
double t, tt, a, a_diff;
Event *ev0;
Event *ev;
evas_object_geometry_get(data, &x, &y, &w, &h);
half_w = (float)w * 0.5;
half_h = (float)h * 0.5;
- dis_new = get_distance(ev0->prev.x, ev0->prev.y, ev->prev.x, ev->prev.y);
+ dx = ev0->prev.x - ev->prev.x;
+ dy = ev0->prev.y - ev->prev.y;
+ dis_new = sqrt((dx * dx) + (dy * dy));
if (!ev->pinch_start_dis) ev->pinch_start_dis = dis_new;
else