termio: add termio_character_size_get()

This commit is contained in:
Boris Faure 2020-11-03 23:05:49 +01:00
parent c1e82b90b3
commit b77a2c3c95
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
2 changed files with 11 additions and 1 deletions

View File

@ -138,12 +138,21 @@ termio_mouseover_suspend_pushpop(Evas_Object *obj, int dir)
void
termio_size_get(const Evas_Object *obj, int *w, int *h)
{
Termio *sd = evas_object_smart_data_get(obj);
const Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN(sd);
if (w) *w = sd->grid.w;
if (h) *h = sd->grid.h;
}
void
termio_character_size_get(const Evas_Object *obj, int *w, int *h)
{
const Termio *sd = evas_object_smart_data_get(obj);
EINA_SAFETY_ON_NULL_RETURN(sd);
if (w) *w = sd->font.chw;
if (h) *h = sd->font.chh;
}
int
termio_scroll_get(const Evas_Object *obj)
{

View File

@ -37,6 +37,7 @@ void termio_remove_links(Termio *sd);
void termio_mouseover_suspend_pushpop(Evas_Object *obj, int dir);
void termio_event_feed_mouse_in(Evas_Object *obj);
void termio_size_get(const Evas_Object *obj, int *w, int *h);
void termio_character_size_get(const Evas_Object *obj, int *w, int *h);
int termio_scroll_get(const Evas_Object *obj);
void termio_font_size_set(Evas_Object *obj, int size);
void termio_grid_size_set(Evas_Object *obj, int w, int h);