forked from enlightenment/efl
evas: Use Eina_Rectangle internally
Instead of Evas_Coord_Rectangle which is exactly the same thing but with a different name and typedefs.
This commit is contained in:
parent
a973294820
commit
0c46fc7103
|
@ -77,7 +77,7 @@ _ctxpopup_item_new(Evas_Object *obj, const char *label, const char *icon)
|
|||
static void
|
||||
_geometry_update(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
|
||||
{
|
||||
Evas_Coord_Rectangle *geom = event_info;
|
||||
Eina_Rectangle *geom = event_info;
|
||||
printf("ctxpopup geometry(%d %d %d %d)\n", geom->x, geom->y, geom->w, geom->h);
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ _key_action_escape(Evas_Object *obj, const char *params EINA_UNUSED)
|
|||
static void
|
||||
_x_pos_adjust(Evas_Coord_Point *pos,
|
||||
Evas_Coord_Point *base_size,
|
||||
Evas_Coord_Rectangle *hover_area)
|
||||
Eina_Rectangle *hover_area)
|
||||
{
|
||||
pos->x -= (base_size->x / 2);
|
||||
|
||||
|
@ -165,7 +165,7 @@ _x_pos_adjust(Evas_Coord_Point *pos,
|
|||
static void
|
||||
_y_pos_adjust(Evas_Coord_Point *pos,
|
||||
Evas_Coord_Point *base_size,
|
||||
Evas_Coord_Rectangle *hover_area)
|
||||
Eina_Rectangle *hover_area)
|
||||
{
|
||||
pos->y -= (base_size->y / 2);
|
||||
|
||||
|
@ -183,10 +183,10 @@ _y_pos_adjust(Evas_Coord_Point *pos,
|
|||
|
||||
static Elm_Ctxpopup_Direction
|
||||
_base_geometry_calc(Evas_Object *obj,
|
||||
Evas_Coord_Rectangle *rect)
|
||||
Eina_Rectangle *rect)
|
||||
{
|
||||
Elm_Ctxpopup_Direction dir = ELM_CTXPOPUP_DIRECTION_UNKNOWN;
|
||||
Evas_Coord_Rectangle hover_area;
|
||||
Eina_Rectangle hover_area;
|
||||
Evas_Coord_Point pos = {0, 0};
|
||||
Evas_Coord_Point arrow_size;
|
||||
Evas_Coord_Point base_size;
|
||||
|
@ -364,9 +364,9 @@ _base_geometry_calc(Evas_Object *obj,
|
|||
static void
|
||||
_arrow_update(Evas_Object *obj,
|
||||
Elm_Ctxpopup_Direction dir,
|
||||
Evas_Coord_Rectangle base_size)
|
||||
Eina_Rectangle base_size)
|
||||
{
|
||||
Evas_Coord_Rectangle arrow_size;
|
||||
Eina_Rectangle arrow_size;
|
||||
Evas_Coord x, y;
|
||||
double drag;
|
||||
|
||||
|
@ -568,7 +568,7 @@ _hide_signals_emit(Evas_Object *obj,
|
|||
static void
|
||||
_base_shift_by_arrow(Evas_Object *arrow,
|
||||
Elm_Ctxpopup_Direction dir,
|
||||
Evas_Coord_Rectangle *rect)
|
||||
Eina_Rectangle *rect)
|
||||
{
|
||||
Evas_Coord arrow_w, arrow_h;
|
||||
|
||||
|
@ -608,7 +608,7 @@ _elm_ctxpopup_elm_widget_widget_sub_object_add(Eo *obj, Elm_Ctxpopup_Data *_pd E
|
|||
EOLIAN static void
|
||||
_elm_ctxpopup_elm_layout_sizing_eval(Eo *obj, Elm_Ctxpopup_Data *sd)
|
||||
{
|
||||
Evas_Coord_Rectangle rect = { 0, 0, 1, 1 };
|
||||
Eina_Rectangle rect = { 0, 0, 1, 1 };
|
||||
Evas_Coord_Point list_size = { 0, 0 }, parent_size = {0, 0};
|
||||
|
||||
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
|
||||
|
|
|
@ -221,6 +221,6 @@ class Elm.Ctxpopup (Efl.Ui.Layout, Elm.Interface.Atspi_Widget_Action,
|
|||
}
|
||||
events {
|
||||
dismissed; [[Called when context popup was dismissed]]
|
||||
geometry,update; [[Called when context popup geometry was updated]]
|
||||
geometry,update: const(ptr(Eina.Rectangle)); [[Called when context popup geometry was updated]]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1613,7 +1613,7 @@ _pointer_event_record(Taps_Type *st,
|
|||
* @ingroup Elm_Gesture_Layer
|
||||
*/
|
||||
static Eina_Bool
|
||||
_taps_rect_get(Eina_List *taps, int idx, Evas_Coord_Rectangle *r)
|
||||
_taps_rect_get(Eina_List *taps, int idx, Eina_Rectangle *r)
|
||||
{ /* Build a rect bounding all taps at index idx */
|
||||
Eina_List *l;
|
||||
Evas_Coord bx = 0, by = 0;
|
||||
|
@ -1665,8 +1665,8 @@ _tap_gesture_check_finish(Gesture_Info *gesture, Evas_Coord tap_finger_size)
|
|||
Taps_Type *st = gesture->data;
|
||||
Eina_List *l;
|
||||
Eina_List *pe_list;
|
||||
Evas_Coord_Rectangle base = {0, 0, 0, 0};
|
||||
Evas_Coord_Rectangle tmp = {0, 0, 0, 0};
|
||||
Eina_Rectangle base = {0, 0, 0, 0};
|
||||
Eina_Rectangle tmp = {0, 0, 0, 0};
|
||||
if (!tap_finger_size) /* Use system default if not set by user */
|
||||
tap_finger_size = elm_config_finger_size_get();
|
||||
|
||||
|
|
|
@ -95,7 +95,8 @@ typedef Efl_Callback_Priority Evas_Callback_Priority;
|
|||
typedef short Evas_Callback_Priority;
|
||||
#endif
|
||||
|
||||
typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle */
|
||||
// TODO: Mark as EINA_DEPRECATED
|
||||
typedef struct _Evas_Coord_Rectangle Evas_Coord_Rectangle; /**< A generic rectangle handle. @deprecated Use Eina_Rectangle instead */
|
||||
typedef struct _Evas_Point Evas_Point; /**< integer point */
|
||||
|
||||
typedef struct _Evas_Coord_Point Evas_Coord_Point; /**< Evas_Coord point */
|
||||
|
@ -185,6 +186,7 @@ typedef void Evas_Performance; /**< An Evas Performance h
|
|||
typedef struct _Evas_Smart Evas_Smart; /**< An Evas Smart Object handle */
|
||||
typedef int Evas_Angle; /**< A type for angle */
|
||||
|
||||
// FIXME: This can be a simple alias to Eina_Rectangle instead.
|
||||
struct _Evas_Coord_Rectangle /** A rectangle in Evas_Coord */
|
||||
{
|
||||
Evas_Coord x; /**< top-left x co-ordinate of rectangle */
|
||||
|
|
|
@ -106,7 +106,7 @@ walk_clippers_print(int spaces, Evas_Object_Protected_Data *obj)
|
|||
#endif
|
||||
|
||||
static void
|
||||
clip_calc(Evas_Object_Protected_Data *obj, Evas_Coord_Rectangle *c)
|
||||
clip_calc(Evas_Object_Protected_Data *obj, Eina_Rectangle *c)
|
||||
{
|
||||
if (!obj) return;
|
||||
RECTS_CLIP_TO_RECT(c->x, c->y, c->w, c->h,
|
||||
|
@ -119,7 +119,7 @@ static Eina_List *
|
|||
_evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data *obj, Eina_List *in, Evas_Object *stop,
|
||||
int x, int y, int *no_rep, Eina_Bool source, int spaces EINA_UNUSED)
|
||||
{
|
||||
Evas_Coord_Rectangle c;
|
||||
Eina_Rectangle c;
|
||||
int inside;
|
||||
Evas_Object *eo_obj = obj->object;
|
||||
if (eo_obj == stop)
|
||||
|
@ -147,7 +147,7 @@ _evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data
|
|||
{
|
||||
if (obj->is_smart)
|
||||
{
|
||||
Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
Eina_Rectangle bounding_box = { 0, };
|
||||
|
||||
evas_object_smart_bounding_box_update(obj);
|
||||
evas_object_smart_bounding_box_get(obj, &bounding_box, NULL);
|
||||
|
@ -166,7 +166,7 @@ _evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data
|
|||
#ifdef DDD_DO
|
||||
if (obj->is_smart)
|
||||
{
|
||||
Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
Eina_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
|
||||
evas_object_smart_bounding_box_get(obj, &bounding_box, NULL);
|
||||
DDD("___ %p g[%6i %6i %6ix%6i] c[%6i %6i %6ix%6i] b[%6i %6i %6ix%6i] %s\n",
|
||||
|
@ -202,7 +202,7 @@ _evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data
|
|||
{
|
||||
if (obj->is_smart)
|
||||
{
|
||||
Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
Eina_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
|
||||
evas_object_smart_bounding_box_get(obj, &bounding_box, NULL);
|
||||
DDD("OBJ %p g[%6i %6i %6ix%6i] c[%6i %6i %6ix%6i] b[%6i %6i %6ix%6i] %s\n",
|
||||
|
@ -279,7 +279,7 @@ _evas_event_object_list_raw_in_get_single(Evas *eo_e, Evas_Object_Protected_Data
|
|||
}
|
||||
else
|
||||
{
|
||||
Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
Eina_Rectangle bounding_box = { 0, };
|
||||
|
||||
if (!obj->child_has_map)
|
||||
evas_object_smart_bounding_box_update(obj);
|
||||
|
|
|
@ -69,7 +69,7 @@ struct _Evas_Object_Image_Pixels
|
|||
|
||||
struct _Evas_Object_Image_State
|
||||
{
|
||||
Evas_Coord_Rectangle fill;
|
||||
Eina_Rectangle fill;
|
||||
struct {
|
||||
short w, h, stride;
|
||||
} image;
|
||||
|
|
|
@ -263,7 +263,7 @@ evas_object_clip_recalc_do(Evas_Object_Protected_Data *obj, Evas_Object_Protecte
|
|||
{
|
||||
if (obj->is_smart)
|
||||
{
|
||||
Evas_Coord_Rectangle bounding_box;
|
||||
Eina_Rectangle bounding_box;
|
||||
|
||||
evas_object_smart_bounding_box_update(obj);
|
||||
evas_object_smart_bounding_box_get(obj, &bounding_box, NULL);
|
||||
|
@ -2476,11 +2476,11 @@ _efl_canvas_object_pointer_inside_by_device_get(Eo *eo_obj EINA_UNUSED, Evas_Obj
|
|||
EOLIAN static Eina_Bool
|
||||
_efl_canvas_object_pointer_coords_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
|
||||
{
|
||||
Evas_Coord_Rectangle c;
|
||||
Eina_Rectangle c;
|
||||
|
||||
if (obj->is_smart)
|
||||
{
|
||||
Evas_Coord_Rectangle bounding_box = { 0, 0, 0, 0 };
|
||||
Eina_Rectangle bounding_box = { 0, };
|
||||
|
||||
evas_object_smart_bounding_box_update(obj);
|
||||
evas_object_smart_bounding_box_get(obj, &bounding_box, NULL);
|
||||
|
|
|
@ -20,7 +20,7 @@ static Eina_Hash *_evas_smart_class_names_hash_table = NULL;
|
|||
struct _Evas_Smart_Data
|
||||
{
|
||||
struct {
|
||||
Evas_Coord_Rectangle bounding_box;
|
||||
Eina_Rectangle bounding_box;
|
||||
} cur, prev;
|
||||
Evas_Object *object;
|
||||
void *engine_data;
|
||||
|
@ -1455,8 +1455,8 @@ evas_object_update_bounding_box(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pro
|
|||
|
||||
void
|
||||
evas_object_smart_bounding_box_get(Evas_Object_Protected_Data *obj,
|
||||
Evas_Coord_Rectangle *cur_bounding_box,
|
||||
Evas_Coord_Rectangle *prev_bounding_box)
|
||||
Eina_Rectangle *cur_bounding_box,
|
||||
Eina_Rectangle *prev_bounding_box)
|
||||
{
|
||||
Evas_Smart_Data *s = obj->private_data;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ struct _Efl_Canvas_Polygon_Data
|
|||
struct {
|
||||
int x, y;
|
||||
} offset;
|
||||
Evas_Coord_Rectangle geometry;
|
||||
Eina_Rectangle geometry;
|
||||
Eina_Bool changed : 1;
|
||||
};
|
||||
#endif
|
||||
|
|
|
@ -1622,7 +1622,7 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj, Efl_Canva
|
|||
static Eina_Bool
|
||||
_proxy_context_clip(Evas_Public_Data *evas, void *ctx, Evas_Proxy_Render_Data *proxy_render_data, Evas_Object_Protected_Data *obj, int off_x, int off_y)
|
||||
{
|
||||
const Evas_Coord_Rectangle *clip;
|
||||
const Eina_Rectangle *clip;
|
||||
Evas_Object_Protected_Data *clipper;
|
||||
int cw, ch;
|
||||
|
||||
|
@ -2165,7 +2165,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
|
|||
}
|
||||
else
|
||||
{
|
||||
const Evas_Coord_Rectangle *clip = &obj->cur->geometry;
|
||||
const Eina_Rectangle *clip = &obj->cur->geometry;
|
||||
ENFN->context_clip_clip(ENC, ctx, clip->x + off_x, clip->y + off_y, clip->w, clip->h);
|
||||
|
||||
if (obj->cur->clipper && (mapped > 1))
|
||||
|
@ -2757,7 +2757,7 @@ _is_obj_in_rect(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj,
|
|||
{
|
||||
if (obj->is_smart && !_evas_render_has_map(obj))
|
||||
{
|
||||
Evas_Coord_Rectangle rect;
|
||||
Eina_Rectangle rect;
|
||||
|
||||
evas_object_smart_bounding_box_get(obj, &rect, NULL);
|
||||
if (RECTS_INTERSECT(x, y, w, h, rect.x, rect.y, rect.w, rect.h))
|
||||
|
|
|
@ -818,7 +818,7 @@ struct _Evas_Post_Callback
|
|||
typedef struct
|
||||
{
|
||||
#ifdef INLINE_ACTIVE_GEOM
|
||||
Evas_Coord_Rectangle rect;
|
||||
Eina_Rectangle rect;
|
||||
#endif
|
||||
Evas_Object_Protected_Data *obj;
|
||||
} Evas_Active_Entry;
|
||||
|
@ -1037,7 +1037,7 @@ struct _Evas_Map
|
|||
{
|
||||
DATA32 magic;
|
||||
int count; // num of points
|
||||
Evas_Coord_Rectangle normal_geometry; // bounding box of map geom actually
|
||||
Eina_Rectangle normal_geometry; // bounding box of map geom actually
|
||||
// void *surface; // surface holding map if needed
|
||||
// int surface_w, surface_h; // current surface w & h alloc
|
||||
double mx, my; // mouse x, y after conversion to map space
|
||||
|
@ -1119,7 +1119,7 @@ struct _Evas_Object_Protected_State
|
|||
{
|
||||
Evas_Object_Protected_Data *clipper;
|
||||
|
||||
Evas_Coord_Rectangle geometry;
|
||||
Eina_Rectangle geometry;
|
||||
struct {
|
||||
struct {
|
||||
Evas_Coord x, y, w, h;
|
||||
|
@ -1715,9 +1715,7 @@ void _evas_object_image_video_overlay_do(Evas_Object *obj);
|
|||
Eina_Bool _evas_object_image_can_use_plane(Evas_Object_Protected_Data *obj, Efl_Canvas_Output *output);
|
||||
void _evas_object_image_plane_release(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Efl_Canvas_Output *output);
|
||||
void _evas_object_image_free(Evas_Object *obj);
|
||||
void evas_object_smart_bounding_box_get(Evas_Object_Protected_Data *obj,
|
||||
Evas_Coord_Rectangle *cur_bounding_box,
|
||||
Evas_Coord_Rectangle *prev_bounding_box);
|
||||
void evas_object_smart_bounding_box_get(Evas_Object_Protected_Data *obj, Eina_Rectangle *cur_bounding_box, Eina_Rectangle *prev_bounding_box);
|
||||
void evas_object_smart_del(Evas_Object *obj);
|
||||
void evas_object_smart_cleanup(Evas_Object *obj);
|
||||
void evas_object_smart_member_raise(Evas_Object *member);
|
||||
|
|
Loading…
Reference in New Issue