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);
}
}
{
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);
}
{
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);
}
{
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,
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);
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;
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)
* @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;
{
ret = query_func(cur->ENDT,
ti->parent.format->font.font,
- ti->text, &ti->text_props,
+ &ti->text_props,
pos,
&x, &y, &w, &h);
}
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)
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)
}
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)
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)
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)
/* 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);
*/
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;
* 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();
*/
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;
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;
*/
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;
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;
*/
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;
*/
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;
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);
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);
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);
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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
}
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