billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=b77a2c3c954013709e6d8ece43bb7a0c5c78fabd
commit b77a2c3c954013709e6d8ece43bb7a0c5c78fabd Author: Boris Faure <bill...@gmail.com> Date: Tue Nov 3 23:05:49 2020 +0100 termio: add termio_character_size_get() --- src/bin/termio.c | 11 ++++++++++- src/bin/termio.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/bin/termio.c b/src/bin/termio.c index e12a4be..dfef09e 100644 --- a/src/bin/termio.c +++ b/src/bin/termio.c @@ -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) { diff --git a/src/bin/termio.h b/src/bin/termio.h index 112b74b..acb2765 100644 --- a/src/bin/termio.h +++ b/src/bin/termio.h @@ -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); --