forked from enlightenment/efl
added two functions I needed in etox
int evas_get_text_height(Evas e, Evas_Object o) int evas_get_text_width(Evas e, Evas_Object o) very simple and straightforward. SVN revision: 3990
This commit is contained in:
parent
9215204dcd
commit
f6caa2df4d
|
@ -188,6 +188,8 @@ double evas_screen_y_to_world(Evas e, int y);
|
|||
char *evas_get_text_string(Evas e, Evas_Object o);
|
||||
char *evas_get_text_font(Evas e, Evas_Object o);
|
||||
int evas_get_text_size(Evas e, Evas_Object o);
|
||||
int evas_get_text_width(Evas e, Evas_Object o);
|
||||
int evas_get_text_height(Evas e, Evas_Object o);
|
||||
int evas_text_at_position(Evas e, Evas_Object o, double x, double y, int *char_x, int *char_y, int *char_w, int *char_h);
|
||||
void evas_text_at(Evas e, Evas_Object o, int index, int *char_x, int *char_y, int *char_w, int *char_h);
|
||||
void evas_text_get_ascent_descent(Evas e, Evas_Object o, double *ascent, double *descent);
|
||||
|
|
|
@ -207,6 +207,32 @@ evas_get_text_size(Evas e, Evas_Object o)
|
|||
return oo->current.size;
|
||||
}
|
||||
|
||||
int
|
||||
evas_get_text_height(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Object_Text oo;
|
||||
|
||||
if (!e) return 0;
|
||||
if (!o) return 0;
|
||||
IF_OBJ(o, OBJECT_TEXT) return 0;
|
||||
oo = o;
|
||||
|
||||
return oo->current.string.h;
|
||||
}
|
||||
|
||||
int
|
||||
evas_get_text_width(Evas e, Evas_Object o)
|
||||
{
|
||||
Evas_Object_Text oo;
|
||||
|
||||
if (!e) return 0;
|
||||
if (!o) return 0;
|
||||
IF_OBJ(o, OBJECT_TEXT) return 0;
|
||||
oo = o;
|
||||
|
||||
return oo->current.string.w;
|
||||
}
|
||||
|
||||
int
|
||||
evas_text_at_position(Evas e, Evas_Object o, double x, double y,
|
||||
int *char_x, int *char_y, int *char_w, int *char_h)
|
||||
|
|
Loading…
Reference in New Issue