From 210ec3b408c176289a5cfd64d438b4814aec9a75 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Sat, 11 Apr 2020 09:55:52 +0200 Subject: [PATCH] win: add win_has_single_child() --- src/bin/win.c | 8 ++++++++ src/bin/win.h | 1 + 2 files changed, 9 insertions(+) diff --git a/src/bin/win.c b/src/bin/win.c index 147986c4..2e0fd3f0 100644 --- a/src/bin/win.c +++ b/src/bin/win.c @@ -1578,6 +1578,14 @@ _win_update(Term_Container *tc) wn->child->update(wn->child); } +Eina_Bool +win_has_single_child(const Win *wn) +{ + const Term_Container *child = wn->child; + + return (child->type == TERM_CONTAINER_TYPE_SOLO); +} + static void _cb_win_key_up(void *data, Evas *_e EINA_UNUSED, diff --git a/src/bin/win.h b/src/bin/win.h index ff2cc7be..16cff6a8 100644 --- a/src/bin/win.h +++ b/src/bin/win.h @@ -51,6 +51,7 @@ void win_toggle_visible_group(Win *wn); void win_toggle_all_group(Win *wn); Eina_Bool win_is_group_action_handled(Win *wn); Eina_Bool win_is_group_input(Win *wn); +Eina_Bool win_has_single_child(const Win *wn); void win_scale_wizard(Evas_Object *win, Term *term);