From 5d4f6d3cbef6ead5608e3018789c52828828bcac Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 7 Apr 2011 16:25:56 +0000 Subject: [PATCH] Evas font-engine: Remove most of the passing of strings. We have string objects, we don't really need them. Draw still uses strings for metric cache, but that will be removed soon as well. SVN revision: 58460 --- legacy/evas/src/lib/canvas/evas_object_text.c | 10 +++--- .../src/lib/canvas/evas_object_textblock.c | 18 +++++------ .../evas/src/lib/engines/common/evas_font.h | 12 +++---- .../src/lib/engines/common/evas_font_query.c | 16 +++++----- legacy/evas/src/lib/include/evas_private.h | 14 ++++---- .../modules/engines/software_16/evas_engine.c | 28 ++++++++-------- .../modules/engines/software_8/evas_engine.c | 32 ++++++++----------- .../engines/software_generic/evas_engine.c | 28 ++++++++-------- 8 files changed, 77 insertions(+), 81 deletions(-) diff --git a/legacy/evas/src/lib/canvas/evas_object_text.c b/legacy/evas/src/lib/canvas/evas_object_text.c index 5f39f78749..0c7db47358 100644 --- a/legacy/evas/src/lib/canvas/evas_object_text.c +++ b/legacy/evas/src/lib/canvas/evas_object_text.c @@ -116,7 +116,7 @@ _evas_object_text_char_coords_get(const Evas_Object *obj, if ((it->text_pos <= pos) && (pos < it->text_pos + eina_unicode_strlen(it->text))) { - return ENFN->font_char_coords_get(ENDT, o->engine_data, it->text, + return ENFN->font_char_coords_get(ENDT, o->engine_data, &it->text_props, pos - it->text_pos, x, y, w, h); } } @@ -193,7 +193,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *obj, { return it->text_pos + ENFN->font_last_up_to_pos(ENDT, o->engine_data, - it->text, &it->text_props, + &it->text_props, cx - x, cy); } @@ -210,7 +210,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *obj, { return it->text_pos + ENFN->font_last_up_to_pos(ENDT, o->engine_data, - it->text, &it->text_props, + &it->text_props, cx - it->x, cy); } @@ -233,7 +233,7 @@ _evas_object_text_char_at_coords(const Evas_Object *obj, { return it->text_pos + ENFN->font_char_at_coords_get(ENDT, o->engine_data, - it->text, &it->text_props, + &it->text_props, cx, cy, rx, ry, @@ -535,7 +535,7 @@ _evas_object_text_item_new(Evas_Object *obj, Evas_Object_Text *o, o->bidi_par_props, it->text_pos, len); ENFN->font_string_size_get(ENDT, o->engine_data, - it->text, &it->text_props, + &it->text_props, &it->w, &it->h); it->adv = it->w + ENFN->font_right_inset_get(ENDT, o->engine_data, &it->text_props); diff --git a/legacy/evas/src/lib/canvas/evas_object_textblock.c b/legacy/evas/src/lib/canvas/evas_object_textblock.c index 9ac395d480..84889ba978 100644 --- a/legacy/evas/src/lib/canvas/evas_object_textblock.c +++ b/legacy/evas/src/lib/canvas/evas_object_textblock.c @@ -2376,7 +2376,7 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt, c->marginr - c->x - ti->x_adjustment; if (x < 0) x = 0; - return c->ENFN->font_last_up_to_pos(c->ENDT, fmt->font.font, ti->text, + return c->ENFN->font_last_up_to_pos(c->ENDT, fmt->font.font, &ti->text_props, x, 0); } return -1; @@ -2591,7 +2591,7 @@ _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti) tw = th = 0; if (fmt->font.font) - c->ENFN->font_string_size_get(c->ENDT, fmt->font.font, ti->text, + c->ENFN->font_string_size_get(c->ENDT, fmt->font.font, &ti->text_props, &tw, &th); inset = 0; if (fmt->font.font) @@ -7424,7 +7424,7 @@ evas_textblock_cursor_geometry_get(const Evas_Textblock_Cursor *cur, Evas_Coord * @return line number of the char on success, -1 on error. */ static int -_evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch), const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) +_evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *data, void *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch), const Evas_Textblock_Cursor *cur, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch) { Evas_Object_Textblock *o; Evas_Object_Textblock_Line *ln = NULL; @@ -7479,7 +7479,7 @@ _evas_textblock_cursor_char_pen_geometry_common_get(int (*query_func) (void *dat { ret = query_func(cur->ENDT, ti->parent.format->font.font, - ti->text, &ti->text_props, + &ti->text_props, pos, &x, &y, &w, &h); } @@ -7673,7 +7673,7 @@ evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor *cur, Evas_Coord x, E pos = cur->ENFN->font_char_at_coords_get( cur->ENDT, ti->parent.format->font.font, - ti->text, &ti->text_props, + &ti->text_props, x - it->x - ln->par->x - ln->x, 0, &cx, &cy, &cw, &ch); if (pos < 0) @@ -7894,7 +7894,7 @@ _evas_textblock_cursor_range_in_line_geometry_get( ti = _ITEM_TEXT(it1); ret = cur->ENFN->font_pen_coords_get(cur->ENDT, ti->parent.format->font.font, - ti->text, &ti->text_props, + &ti->text_props, start, &x1, &y, &w1, &h); if (!ret) @@ -7903,7 +7903,7 @@ _evas_textblock_cursor_range_in_line_geometry_get( } ret = cur->ENFN->font_pen_coords_get(cur->ENDT, ti->parent.format->font.font, - ti->text, &ti->text_props, + &ti->text_props, end, &x2, &y, &w2, &h); if (!ret) @@ -7963,7 +7963,7 @@ _evas_textblock_cursor_range_in_line_geometry_get( ret = cur->ENFN->font_pen_coords_get(cur->ENDT, ti->parent.format->font.font, - ti->text, &ti->text_props, + &ti->text_props, start, &x, &y, &w, &h); if (!ret) @@ -8017,7 +8017,7 @@ _evas_textblock_cursor_range_in_line_geometry_get( ret = cur->ENFN->font_pen_coords_get(cur->ENDT, ti->parent.format->font.font, - ti->text, &ti->text_props, + &ti->text_props, end, &x, &y, &w, &h); if (!ret) diff --git a/legacy/evas/src/lib/engines/common/evas_font.h b/legacy/evas/src/lib/engines/common/evas_font.h index 13e5dc5b32..6c6d54f44d 100644 --- a/legacy/evas/src/lib/engines/common/evas_font.h +++ b/legacy/evas/src/lib/engines/common/evas_font.h @@ -56,14 +56,14 @@ EAPI void evas_common_font_all_clear (void); /* query */ EAPI int evas_common_font_query_kerning (RGBA_Font_Int* fi, FT_UInt left, FT_UInt right, int* kerning); -EAPI void evas_common_font_query_size (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int *w, int *h); +EAPI void evas_common_font_query_size (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *w, int *h); EAPI int evas_common_font_query_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props); EAPI int evas_common_font_query_right_inset (RGBA_Font *fn __UNUSED__, const Evas_Text_Props *text_props); -EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv); -EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); -EAPI int evas_common_font_query_pen_coords (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); -EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); -EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y); +EAPI void evas_common_font_query_advance (RGBA_Font *fn, const Evas_Text_Props *intl_props, int *h_adv, int *v_adv); +EAPI int evas_common_font_query_char_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); +EAPI int evas_common_font_query_pen_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); +EAPI int evas_common_font_query_char_at_coords (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); +EAPI int evas_common_font_query_last_up_to_pos (RGBA_Font *fn, const Evas_Text_Props *intl_props, int x, int y); #ifdef EVAS_FRAME_QUEUING EAPI void evas_common_font_draw_finish(void); diff --git a/legacy/evas/src/lib/engines/common/evas_font_query.c b/legacy/evas/src/lib/engines/common/evas_font_query.c index f666e9623c..8fc1cd9b9b 100644 --- a/legacy/evas/src/lib/engines/common/evas_font_query.c +++ b/legacy/evas/src/lib/engines/common/evas_font_query.c @@ -95,7 +95,7 @@ evas_common_font_query_right_inset(RGBA_Font *fn __UNUSED__, const Evas_Text_Pro */ EAPI void -evas_common_font_query_size(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int *w, int *h) +evas_common_font_query_size(RGBA_Font *fn, const Evas_Text_Props *text_props, int *w, int *h) { int keep_width = 0; int prev_pen_x = 0; @@ -133,7 +133,7 @@ evas_common_font_query_size(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, * this way, we are safe. */ EAPI void -evas_common_font_query_advance(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int *h_adv, int *v_adv) +evas_common_font_query_advance(RGBA_Font *fn, const Evas_Text_Props *text_props, int *h_adv, int *v_adv) { EVAS_FONT_WALK_TEXT_INIT(); @@ -159,7 +159,7 @@ evas_common_font_query_advance(RGBA_Font *fn, const Eina_Unicode *text __UNUSED_ */ EAPI int -evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) +evas_common_font_query_char_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) { int asc, desc; size_t position = 0; @@ -184,7 +184,7 @@ evas_common_font_query_char_coords(RGBA_Font *fn, const Eina_Unicode *text __UNU else #endif { - evas_common_font_query_advance(fn, text, text_props, cx, ch); + evas_common_font_query_advance(fn, text_props, cx, ch); } if (cy) *cy = 0; if (cw) *cw = 0; @@ -283,7 +283,7 @@ end: */ EAPI int -evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) +evas_common_font_query_pen_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) { int asc, desc; size_t position; @@ -308,7 +308,7 @@ evas_common_font_query_pen_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUS else #endif { - evas_common_font_query_advance(fn, text, text_props, cpen_x, ch); + evas_common_font_query_advance(fn, text_props, cpen_x, ch); } if (cy) *cy = 0; if (cadv) *cadv = 0; @@ -399,7 +399,7 @@ end: */ EAPI int -evas_common_font_query_char_at_coords(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) +evas_common_font_query_char_at_coords(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) { int asc, desc; int ret_val = -1; @@ -482,7 +482,7 @@ end: */ EAPI int -evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Eina_Unicode *text __UNUSED__, const Evas_Text_Props *text_props, int x, int y) +evas_common_font_query_last_up_to_pos(RGBA_Font *fn, const Evas_Text_Props *text_props, int x, int y) { int asc, desc; int ret=-1; diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h index 8f1dc16cab..580653ce4a 100644 --- a/legacy/evas/src/lib/include/evas_private.h +++ b/legacy/evas/src/lib/include/evas_private.h @@ -656,12 +656,12 @@ struct _Evas_Func int (*font_descent_get) (void *data, void *font); int (*font_max_ascent_get) (void *data, void *font); int (*font_max_descent_get) (void *data, void *font); - void (*font_string_size_get) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int *w, int *h); + void (*font_string_size_get) (void *data, void *font, const Evas_Text_Props *intl_props, int *w, int *h); int (*font_inset_get) (void *data, void *font, const Evas_Text_Props *text_props); - int (*font_h_advance_get) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props); - int (*font_v_advance_get) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props); - int (*font_char_coords_get) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); - int (*font_char_at_coords_get) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); + int (*font_h_advance_get) (void *data, void *font, const Evas_Text_Props *intl_props); + int (*font_v_advance_get) (void *data, void *font, const Evas_Text_Props *intl_props); + int (*font_char_coords_get) (void *data, void *font, const Evas_Text_Props *intl_props, int pos, int *cx, int *cy, int *cw, int *ch); + int (*font_char_at_coords_get) (void *data, void *font, const Evas_Text_Props *intl_props, int x, int y, int *cx, int *cy, int *cw, int *ch); void (*font_draw) (void *data, void *context, void *surface, void *font, int x, int y, int w, int h, int ow, int oh, const Eina_Unicode *text, const Evas_Text_Props *intl_props); void (*font_cache_flush) (void *data); @@ -677,7 +677,7 @@ struct _Evas_Func void (*image_scale_hint_set) (void *data, void *image, int hint); int (*image_scale_hint_get) (void *data, void *image); - int (*font_last_up_to_pos) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int x, int y); + int (*font_last_up_to_pos) (void *data, void *font, const Evas_Text_Props *intl_props, int x, int y); void (*image_map_draw) (void *data, void *context, void *surface, void *image, int npoints, RGBA_Map_Point *p, int smooth, int level); void *(*image_map_surface_new) (void *data, int w, int h, int alpha); @@ -685,7 +685,7 @@ struct _Evas_Func void (*image_content_hint_set) (void *data, void *surface, int hint); int (*image_content_hint_get) (void *data, void *surface); - int (*font_pen_coords_get) (void *data, void *font, const Eina_Unicode *text, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); + int (*font_pen_coords_get) (void *data, void *font, const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch); Eina_Bool (*font_text_props_info_create) (void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *intl_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len); int (*font_right_inset_get) (void *data, void *font, const Evas_Text_Props *text_props); diff --git a/legacy/evas/src/modules/engines/software_16/evas_engine.c b/legacy/evas/src/modules/engines/software_16/evas_engine.c index eaec10e000..b965dba646 100644 --- a/legacy/evas/src/modules/engines/software_16/evas_engine.c +++ b/legacy/evas/src/modules/engines/software_16/evas_engine.c @@ -505,9 +505,9 @@ eng_font_max_descent_get(void *data __UNUSED__, void *font) } static void -eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int *w, int *h) +eng_font_string_size_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int *w, int *h) { - evas_common_font_query_size(font, text, text_props, w, h); + evas_common_font_query_size(font, text_props, w, h); } static int @@ -523,27 +523,27 @@ eng_font_right_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Prop } static int -eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props) +eng_font_h_advance_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props) { int h, v; - evas_common_font_query_advance(font, text, text_props, &h, &v); + evas_common_font_query_advance(font, text_props, &h, &v); return h; } static int -eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props) +eng_font_v_advance_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props) { int h, v; - evas_common_font_query_advance(font, text, text_props, &h, &v); + evas_common_font_query_advance(font, text_props, &h, &v); return v; } static int -eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) +eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) { - return evas_common_font_query_pen_coords(font, text, text_props, pos, cpen_x, cy, cadv, ch); + return evas_common_font_query_pen_coords(font, text_props, pos, cpen_x, cy, cadv, ch); } static Eina_Bool @@ -562,21 +562,21 @@ eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode } static int -eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) +eng_font_char_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) { - return evas_common_font_query_char_coords(font, text, text_props, pos, cx, cy, cw, ch); + return evas_common_font_query_char_coords(font, text_props, pos, cx, cy, cw, ch); } static int -eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) +eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) { - return evas_common_font_query_char_at_coords(font, text, text_props, x, y, cx, cy, cw, ch); + return evas_common_font_query_char_at_coords(font, text_props, x, y, cx, cy, cw, ch); } static int -eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y) +eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int x, int y) { - return evas_common_font_query_last_up_to_pos(font, text, text_props, x, y); + return evas_common_font_query_last_up_to_pos(font, text_props, x, y); } static void diff --git a/legacy/evas/src/modules/engines/software_8/evas_engine.c b/legacy/evas/src/modules/engines/software_8/evas_engine.c index e060cdb45e..f2c939bbe0 100644 --- a/legacy/evas/src/modules/engines/software_8/evas_engine.c +++ b/legacy/evas/src/modules/engines/software_8/evas_engine.c @@ -561,10 +561,10 @@ eng_font_max_descent_get(void *data __UNUSED__, void *font) } static void -eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, +eng_font_string_size_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int *w, int *h) { - evas_common_font_query_size(font, text, text_props, w, h); + evas_common_font_query_size(font, text_props, w, h); } static int @@ -580,39 +580,35 @@ eng_font_right_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Prop } static int -eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props) +eng_font_h_advance_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props) { int h, v; - evas_common_font_query_advance(font, text, text_props, &h, &v); + evas_common_font_query_advance(font, text_props, &h, &v); return h; } static int -eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props) +eng_font_v_advance_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props) { int h, v; - evas_common_font_query_advance(font, text, text_props, &h, &v); + evas_common_font_query_advance(font, text_props, &h, &v); return v; } static int -eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, +eng_font_pen_coords_get(void *data __UNUSED__, void *fontt, const Evas_Text_Props *text_props, int pos, int *cpen, int *cy, int *cadv, int *ch) { - return evas_common_font_query_pen_coords(font, text, text_props, pos, cpen, cy, cadv, ch); + return evas_common_font_query_pen_coords(font, text_props, pos, cpen, cy, cadv, ch); } static Eina_Bool eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode *text, Evas_Text_Props *text_props, const Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len) { - (void) font; - (void) text; - (void) text_props; (void) par_props; (void) pos; - (void) len; #if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT) evas_bidi_shape_string(text, par_props, pos, len); #endif @@ -620,24 +616,24 @@ eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode } static int -eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, +eng_font_char_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) { - return evas_common_font_query_char_coords(font, text, text_props, pos, cx, cy, cw, ch); + return evas_common_font_query_char_coords(font, text_props, pos, cx, cy, cw, ch); } static int -eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, +eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) { - return evas_common_font_query_char_at_coords(font, text, text_props, x, y, cx, cy, cw, ch); + return evas_common_font_query_char_at_coords(font, text_props, x, y, cx, cy, cw, ch); } static int -eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, +eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int x, int y) { - return evas_common_font_query_last_up_to_pos(font, text, text_props, x, y); + return evas_common_font_query_last_up_to_pos(font, text_props, x, y); } static void diff --git a/legacy/evas/src/modules/engines/software_generic/evas_engine.c b/legacy/evas/src/modules/engines/software_generic/evas_engine.c index 417ecb6923..e8200131ac 100644 --- a/legacy/evas/src/modules/engines/software_generic/evas_engine.c +++ b/legacy/evas/src/modules/engines/software_generic/evas_engine.c @@ -727,9 +727,9 @@ eng_font_max_descent_get(void *data __UNUSED__, void *font) } static void -eng_font_string_size_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int *w, int *h) +eng_font_string_size_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int *w, int *h) { - evas_common_font_query_size(font, text, text_props, w, h); + evas_common_font_query_size(font, text_props, w, h); } static int @@ -745,27 +745,27 @@ eng_font_right_inset_get(void *data __UNUSED__, void *font, const Evas_Text_Prop } static int -eng_font_h_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props) +eng_font_h_advance_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props) { int h, v; - evas_common_font_query_advance(font, text, text_props, &h, &v); + evas_common_font_query_advance(font, text_props, &h, &v); return h; } static int -eng_font_v_advance_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props) +eng_font_v_advance_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props) { int h, v; - evas_common_font_query_advance(font, text, text_props, &h, &v); + evas_common_font_query_advance(font, text_props, &h, &v); return v; } static int -eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) +eng_font_pen_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int pos, int *cpen_x, int *cy, int *cadv, int *ch) { - return evas_common_font_query_pen_coords(font, text, text_props, pos, cpen_x, cy, cadv, ch); + return evas_common_font_query_pen_coords(font, text_props, pos, cpen_x, cy, cadv, ch); } static Eina_Bool @@ -784,21 +784,21 @@ eng_font_text_props_info_create(void *data __UNUSED__, void *font, Eina_Unicode } static int -eng_font_char_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) +eng_font_char_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int pos, int *cx, int *cy, int *cw, int *ch) { - return evas_common_font_query_char_coords(font, text, text_props, pos, cx, cy, cw, ch); + return evas_common_font_query_char_coords(font, text_props, pos, cx, cy, cw, ch); } static int -eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) +eng_font_char_at_coords_get(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int x, int y, int *cx, int *cy, int *cw, int *ch) { - return evas_common_font_query_char_at_coords(font, text, text_props, x, y, cx, cy, cw, ch); + return evas_common_font_query_char_at_coords(font, text_props, x, y, cx, cy, cw, ch); } static int -eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Eina_Unicode *text, const Evas_Text_Props *text_props, int x, int y) +eng_font_last_up_to_pos(void *data __UNUSED__, void *font, const Evas_Text_Props *text_props, int x, int y) { - return evas_common_font_query_last_up_to_pos(font, text, text_props, x, y); + return evas_common_font_query_last_up_to_pos(font, text_props, x, y); } static void