evas: Move evas_canvas.eo to legacy-only

This isn't meant to be installed. The canvas API in EO is based around
the interfaces Efl.Canvas and the widget Efl.Ui.Win. Anything else is
not EO (eg: ecore_evas, evas, ...)

Note: evas_canvas3d is the last remaining thing that is installed along
EO files, but those are all beta APIs.
This commit is contained in:
Jean-Philippe Andre 2017-10-31 16:36:32 +09:00
parent b8ca1272ae
commit 9cec14918c
14 changed files with 21 additions and 17 deletions

View File

@ -8,7 +8,6 @@ evas_canvas_eolian_pub_files = \
lib/evas/canvas/efl_canvas_rectangle.eo \
lib/evas/canvas/efl_canvas_text.eo \
lib/evas/canvas/efl_canvas_group.eo \
lib/evas/canvas/evas_canvas.eo \
lib/evas/canvas/efl_canvas_image_internal.eo \
lib/evas/canvas/evas_canvas3d_camera.eo\
lib/evas/canvas/evas_canvas3d_texture.eo\
@ -71,6 +70,7 @@ evas_gesture_eolian_pub_files = \
$(NULL)
evas_eolian_legacy_files = \
lib/evas/canvas/evas_canvas.eo \
lib/evas/canvas/evas_line.eo \
lib/evas/canvas/evas_table.eo \
lib/evas/canvas/evas_grid.eo \

View File

@ -300,7 +300,7 @@ main(int argc, char *argv[])
mouse_wheel = ecore_event_handler_add(ECORE_EVENT_MOUSE_WHEEL,
_mouse_wheel, NULL);
_seat_children_print(evas_canvas_default_device_get(evas, EFL_INPUT_DEVICE_TYPE_SEAT));
_seat_children_print(evas_default_device_get(evas, EFL_INPUT_DEVICE_TYPE_SEAT));
efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_ADDED,
_dev_added_or_removed, NULL);
efl_event_callback_add(evas, EFL_CANVAS_EVENT_DEVICE_REMOVED,

View File

@ -4594,7 +4594,7 @@ _edje_entry_imf_default_focused_rp_get(Edje *ed)
Evas *e;
e = evas_object_evas_get(ed->obj);
seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
seat = evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
seat_name = _edje_seat_name_get(ed, seat);
return _edje_focused_part_get(ed, seat_name);

View File

@ -595,7 +595,7 @@ _edje_part_focus_set(Edje *ed, const char *seat_name, Edje_Real_Part *rp)
else /* Use default seat name */
{
e = evas_object_evas_get(ed->obj);
seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
seat = evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
sname = eina_stringshare_ref(_edje_seat_name_get(ed, seat));
}
@ -983,7 +983,7 @@ low_mem_current:
Evas *e;
e = evas_object_evas_get(ed->obj);
seat = evas_canvas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
seat = evas_default_device_get(e, EFL_INPUT_DEVICE_TYPE_SEAT);
}
if (!pr->targets)
{

View File

@ -33,7 +33,7 @@ _edje_object_efl_object_constructor(Eo *obj, Edje *ed)
efl_canvas_group_clipped_set(obj, EINA_TRUE);
obj = efl_constructor(efl_super(obj, MY_CLASS));
efl_canvas_object_type_set(obj, MY_CLASS_NAME_LEGACY);
ed->base.evas = efl_provider_find(obj, EVAS_CANVAS_CLASS);
ed->base.evas = evas_object_evas_get(obj);
ed->base.clipper = (Evas_Object *) efl_canvas_group_clipper_get(obj);
ed->duration_scale = 1.0;
_edje_lib_ref();

View File

@ -4138,7 +4138,7 @@ _elm_win_frame_cb_menu(void *data,
int x, y, wx, wy;
if (!sd->wl.win) return;
evas_canvas_pointer_canvas_xy_get(sd->evas, &x, &y);
evas_pointer_canvas_xy_get(sd->evas, &x, &y);
ecore_wl2_window_geometry_get(sd->wl.win, &wx, &wy, NULL, NULL);
if (x < 0) x += wx;
if (y < 0) y += wy;

View File

@ -2922,7 +2922,7 @@ _wl_default_seat_get(Ecore_Wl2_Window *win, Evas_Object *obj)
return input;
}
seat = evas_canvas_default_device_get(evas_object_evas_get(obj), EFL_INPUT_DEVICE_TYPE_SEAT);
seat = evas_default_device_get(evas_object_evas_get(obj), EFL_INPUT_DEVICE_TYPE_SEAT);
EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL);
return ecore_wl2_display_input_find(ecore_wl2_window_display_get(win),
evas_device_seat_id_get(seat));

View File

@ -544,14 +544,14 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt)
&basex, &basey, &cw, &ch);
elm_win_screen_position_get(elm_widget_top_get(tt->owner),
&cx, &cy);
evas_canvas_pointer_canvas_xy_get(tt->evas, &px, &py);
evas_pointer_canvas_xy_get(tt->evas, &px, &py);
cx -= basex;
cy -= basey;
}
else
{
evas_output_size_get(tt->evas, &cw, &ch);
evas_canvas_pointer_canvas_xy_get(tt->evas, &px, &py);
evas_pointer_canvas_xy_get(tt->evas, &px, &py);
}
TTDBG("SCREEN: cw=%d,ch=%d\n", cw, ch);

View File

@ -4,8 +4,6 @@
#ifdef EFL_EO_API_SUPPORT
#include "canvas/evas_canvas.eo.h"
/**
* @ingroup Evas_Object_Rectangle
*

View File

@ -63,6 +63,10 @@ EOAPI void efl_canvas_object_type_set(Eo *obj, const char *type);
EOAPI void efl_canvas_group_add(Eo *obj);
EOAPI void efl_canvas_group_del(Eo *obj);
EOAPI void efl_canvas_group_clipped_set(Eo *obj, Eina_Bool unclipped);
EOAPI void evas_canvas_touch_point_list_nth_xy_get(Eo *obj, unsigned int n, double *x, double *y);
EOAPI void evas_canvas_seat_focus_in(Eo *obj, Efl_Input_Device *seat);
EOAPI void evas_canvas_seat_focus_out(Eo *obj, Efl_Input_Device *seat);
EOAPI Eo* evas_canvas_seat_focus_get(const Eo *obj, Efl_Input_Device *seat);
EOAPI void *efl_input_legacy_info_get(const Eo *obj);
EOAPI Eo *efl_input_instance_get(const Eo *obj, Efl_Object *owner, void **priv);

View File

@ -6,6 +6,7 @@
#include <Evas.h>
#include <Evas_Internal.h>
#include "canvas/evas_canvas.eo.h"
#define EFL_INTERNAL_UNSTABLE
#include "interfaces/efl_common_internal.h"

View File

@ -50,6 +50,7 @@
#define ENFN obj->layer->evas->engine.func
#define ENC _evas_engine_context(obj->layer->evas)
#include "canvas/evas_canvas.eo.h"
#include "canvas/evas_text.eo.h"
#include "canvas/evas_textgrid.eo.h"
#include "canvas/evas_line.eo.h"

View File

@ -1772,7 +1772,7 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas, void *event EINA_
einfo->y_rel = wdata->y_rel;
}
einfo->timestamp = wdata->timestamp;
evas_canvas_pointer_canvas_xy_get(evas, &einfo->x_cursor, &einfo->y_cursor);
evas_pointer_canvas_xy_get(evas, &einfo->x_cursor, &einfo->y_cursor);
evas_output_framespace_get(evas, &fx, &fy, NULL, NULL);
einfo->x_cursor -= fx;
einfo->y_cursor -= fy;

View File

@ -503,7 +503,7 @@ video_obj_signal_frame_move_start_cb(void *data EINA_UNUSED, Evas_Object *o, con
fd = efl_key_data_get(o, "frame_data");
if (!fd) return;
fd->moving = 1;
evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
fd->x = x;
fd->y = y;
efl_gfx_stack_raise(o);
@ -528,7 +528,7 @@ video_obj_signal_frame_resize_start_cb(void *data EINA_UNUSED, Evas_Object *o, c
fd = efl_key_data_get(o, "frame_data");
if (!fd) return;
fd->resizing = 1;
evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
fd->x = x;
fd->y = y;
efl_gfx_stack_raise(o);
@ -556,7 +556,7 @@ video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const cha
Evas_Coord x, y;
Eina_Position2D pos;
evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
pos = efl_gfx_position_get(o);
pos.x += (x - fd->x);
pos.y += (y - fd->y);
@ -569,7 +569,7 @@ video_obj_signal_frame_move_cb(void *data EINA_UNUSED, Evas_Object *o, const cha
Evas_Coord x, y;
Eina_Size2D sz;
evas_canvas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
evas_pointer_canvas_xy_get(evas_object_evas_get(o), &x, &y);
sz = efl_gfx_size_get(o);
evas_object_resize(o, sz.w + (x - fd->x), sz.h + (y - fd->y));
fd->x = x;