forked from enlightenment/efl
Elm: Use 'canvas' API and structure rather than 'output' API and
structure. 'canvas' and 'output' are same. So we need to deprecate one of them later(may be evas 2.0 or so.) After I discuss this with raster, I've got to use 'canvas' not 'output'. So I fixed elementary codes. SVN revision: 60268
This commit is contained in:
parent
9b3ec1000e
commit
5b30088911
|
@ -40,7 +40,7 @@ _list_item_cb(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
|
|||
ITEM_NEW(ctxpopup, "Set date and time", "clock");
|
||||
elm_ctxpopup_item_disabled_set(it, EINA_TRUE);
|
||||
|
||||
evas_pointer_output_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_object_size_hint_max_set(ctxpopup, 240, 240);
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
|
@ -63,7 +63,7 @@ _list_item_cb2(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
|
|||
elm_ctxpopup_item_disabled_set(it, EINA_TRUE);
|
||||
ITEM_NEW(ctxpopup, NULL, "clock");
|
||||
|
||||
evas_pointer_output_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_object_size_hint_max_set(ctxpopup, 240, 240);
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
|
@ -86,7 +86,7 @@ _list_item_cb3(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
|
|||
ITEM_NEW(ctxpopup, "Embryo", NULL);
|
||||
ITEM_NEW(ctxpopup, "Edje", NULL);
|
||||
|
||||
evas_pointer_output_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ _list_item_cb4(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
|
|||
ITEM_NEW(ctxpopup, NULL, "edit");
|
||||
ITEM_NEW(ctxpopup, NULL, "clock");
|
||||
|
||||
evas_pointer_output_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_object_size_hint_max_set(ctxpopup, 240, 240);
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
|
@ -141,7 +141,7 @@ _list_item_cb5(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_i
|
|||
ctxpopup = elm_ctxpopup_add(obj);
|
||||
elm_ctxpopup_content_set(ctxpopup, bx);
|
||||
|
||||
evas_pointer_output_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(obj), &x, &y);
|
||||
evas_object_move(ctxpopup, x, y);
|
||||
evas_object_show(ctxpopup);
|
||||
}
|
||||
|
|
|
@ -89,8 +89,8 @@ my_map_longpressed(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
|||
zoom = elm_map_zoom_get(data);
|
||||
elm_map_geo_region_get(obj, &lon, &lat);
|
||||
elm_map_utils_convert_geo_into_coord(obj, lon, lat, pow(2.0, zoom) * 256, &x, &y);
|
||||
x += down->output.x - (w / 2) - ox;
|
||||
y += down->output.y - (h / 2) - oy;
|
||||
x += down->canvas.x - (w / 2) - ox;
|
||||
y += down->canvas.y - (h / 2) - oy;
|
||||
elm_map_utils_convert_coord_into_geo(obj, x, y, pow(2.0, zoom) * 256, &lon, &lat);
|
||||
|
||||
name = elm_map_utils_convert_coord_into_name(data, lon, lat);
|
||||
|
@ -117,8 +117,8 @@ my_map_clicked_double(void *data, Evas_Object *obj, void *event_info)
|
|||
|
||||
rx = x;
|
||||
ry = y;
|
||||
x += down->output.x - ((float)w * 0.5) - ox;
|
||||
y += down->output.y - ((float)h * 0.5) - oy;
|
||||
x += down->canvas.x - ((float)w * 0.5) - ox;
|
||||
y += down->canvas.y - ((float)h * 0.5) - oy;
|
||||
elm_map_rotate_get(data, &d, NULL, NULL);
|
||||
elm_map_utils_rotate_coord(data, x, y, rx, ry, -d, &tx, &ty);
|
||||
elm_map_utils_convert_coord_into_geo(obj, tx, ty, size, &lon, &lat);
|
||||
|
@ -617,8 +617,8 @@ _map_mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event
|
|||
|
||||
if (down->button == 2)
|
||||
{
|
||||
old_x = down->output.x;
|
||||
old_y = down->output.y;
|
||||
old_x = down->canvas.x;
|
||||
old_y = down->canvas.y;
|
||||
old_d = 0.0;
|
||||
}
|
||||
else if (down->button == 3)
|
||||
|
@ -665,7 +665,7 @@ _map_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__,
|
|||
half_h = (float)h * 0.5;
|
||||
elm_map_rotate_get(data, &cur_d, NULL, NULL);
|
||||
|
||||
d = move->cur.output.x - old_x;
|
||||
d = move->cur.canvas.x - old_x;
|
||||
if (!old_d) old_d = d;
|
||||
else
|
||||
{
|
||||
|
|
|
@ -144,8 +144,8 @@ cb_mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_i
|
|||
if (!ev->buttons) return;
|
||||
evas_object_geometry_get(obj, &x, &y, NULL, NULL);
|
||||
evas_object_move(obj,
|
||||
x + (ev->cur.output.x - ev->prev.output.x),
|
||||
y + (ev->cur.output.y - ev->prev.output.y));
|
||||
x + (ev->cur.canvas.x - ev->prev.output.x),
|
||||
y + (ev->cur.canvas.y - ev->prev.output.y));
|
||||
evas_object_image_size_get(orig, &w, &h);
|
||||
p = evas_map_new(4);
|
||||
evas_object_map_enable_set(orig, EINA_TRUE);
|
||||
|
|
|
@ -460,7 +460,7 @@ _colorbar_cb(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info)
|
|||
evas_object_geometry_get(cp->bar, &x, &y, &w, &h);
|
||||
edje_object_part_drag_value_get(cp->colorbar, "elm.arrow",
|
||||
&arrow_x, &arrow_y);
|
||||
if (w > 0) arrow_x = (double)(ev->output.x - x) / (double)w;
|
||||
if (w > 0) arrow_x = (double)(ev->canvas.x - x) / (double)w;
|
||||
if (arrow_x > 1) arrow_x = 1;
|
||||
if (arrow_x < 0) arrow_x = 0;
|
||||
edje_object_part_drag_value_set(cp->colorbar, "elm.arrow", arrow_x, arrow_y);
|
||||
|
|
|
@ -1373,7 +1373,7 @@ _signal_anchor_clicked(void *data, Evas_Object *obj __UNUSED__, const char *emis
|
|||
Evas_Coord px, py, x, y;
|
||||
|
||||
evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL);
|
||||
evas_pointer_output_xy_get(evas_object_evas_get(wd->ent), &px, &py);
|
||||
evas_pointer_canvas_xy_get(evas_object_evas_get(wd->ent), &px, &py);
|
||||
EINA_LIST_FOREACH(geoms, l, r)
|
||||
{
|
||||
if (((r->x + x) <= px) && ((r->y + y) <= py) &&
|
||||
|
|
|
@ -1775,8 +1775,8 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
|
|||
if (!ev0) return;
|
||||
|
||||
ev0->hold_timer = NULL;
|
||||
ev0->prev.x = ev->output.x;
|
||||
ev0->prev.y = ev->output.y;
|
||||
ev0->prev.x = ev->canvas.x;
|
||||
ev0->prev.y = ev->canvas.y;
|
||||
|
||||
if (ev->button != 1) return;
|
||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) wd->on_hold = EINA_TRUE;
|
||||
|
@ -1786,8 +1786,8 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
|
|||
else
|
||||
evas_object_smart_callback_call(data, SIG_PRESS, ev);
|
||||
if (wd->long_timer) ecore_timer_del(wd->long_timer);
|
||||
wd->ev.output.x = ev->output.x;
|
||||
wd->ev.output.y = ev->output.y;
|
||||
wd->ev.canvas.x = ev->output.x;
|
||||
wd->ev.canvas.y = ev->output.y;
|
||||
wd->long_timer = ecore_timer_add(_elm_config->longpress_timeout, _long_press, data);
|
||||
}
|
||||
|
||||
|
@ -1799,8 +1799,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
|
|||
|
||||
ev0 = get_event_object(data, 0);
|
||||
if (!ev0) return;
|
||||
ev0->prev.x = move->cur.output.x;
|
||||
ev0->prev.y = move->cur.output.y;
|
||||
ev0->prev.x = move->cur.canvas.x;
|
||||
ev0->prev.y = move->cur.canvas.y;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1870,8 +1870,8 @@ _mouse_multi_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *eve
|
|||
wd->multi_count++;
|
||||
|
||||
ev->hold_timer = NULL;
|
||||
ev->start.x = ev->prev.x = down->output.x;
|
||||
ev->start.y = ev->prev.y = down->output.y;
|
||||
ev->start.x = ev->prev.x = down->canvas.x;
|
||||
ev->start.y = ev->prev.y = down->canvas.y;
|
||||
ev->pinch_start_dis = 0;
|
||||
wd->pinch.level = 1.0;
|
||||
wd->pinch.diff = 1.0;
|
||||
|
@ -1963,8 +1963,8 @@ do_zoom_only:
|
|||
}
|
||||
}
|
||||
do_nothing:
|
||||
ev->prev.x = move->cur.output.x;
|
||||
ev->prev.y = move->cur.output.y;
|
||||
ev->prev.x = move->cur.canvas.x;
|
||||
ev->prev.y = move->cur.canvas.y;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -305,8 +305,8 @@ _mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
|
|||
ev = event_info;
|
||||
evas_object_geometry_get(it->base.view, &x, &y, &w, &h);
|
||||
|
||||
if ((ev->output.x >= x) && (ev->output.x <= (x + w)) && (ev->output.y >= y)
|
||||
&& (ev->output.y <= (y + h)))
|
||||
if ((ev->canvas.x >= x) && (ev->output.x <= (x + w)) && (ev->canvas.y >= y)
|
||||
&& (ev->canvas.y <= (y + h)))
|
||||
_segment_on(it);
|
||||
else
|
||||
edje_object_signal_emit(it->base.view, "elm,state,segment,normal", "elm");
|
||||
|
|
|
@ -467,13 +467,13 @@ _spacer_cb(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *event_info)
|
|||
edje_object_part_drag_value_get(wd->slider, "elm.dragable.slider", &button_x, &button_y);
|
||||
if (wd->horizontal)
|
||||
{
|
||||
button_x = ((double)ev->output.x - (double)x) / (double)w;
|
||||
button_x = ((double)ev->canvas.x - (double)x) / (double)w;
|
||||
if (button_x > 1) button_x = 1;
|
||||
if (button_x < 0) button_x = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
button_y = ((double)ev->output.y - (double)y) / (double)h;
|
||||
button_y = ((double)ev->canvas.y - (double)y) / (double)h;
|
||||
if (button_y > 1) button_y = 1;
|
||||
if (button_y < 0) button_y = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue