From d6a8caa7e27dd08180f6a5a45a080c2e4cfc1fe4 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 26 Aug 2020 02:07:48 +0200 Subject: kbdwin removed; stack and contructor moved to view --- fw/fe310/eos/eve/screen/window.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'fw/fe310/eos/eve/screen/window.c') diff --git a/fw/fe310/eos/eve/screen/window.c b/fw/fe310/eos/eve/screen/window.c index e49897f..bfa53d1 100644 --- a/fw/fe310/eos/eve/screen/window.c +++ b/fw/fe310/eos/eve/screen/window.c @@ -9,15 +9,12 @@ #define MIN(X, Y) (((X) < (Y)) ? (X) : (Y)) -void eve_window_init(EVEWindow *window, EVERect *g, EVEView *view, EVEScreen *screen) { +void eve_window_init(EVEWindow *window, EVERect *g, EVEScreen *screen, char *name) { memset(window, 0, sizeof(EVEWindow)); if (g) window->g = *g; - if (view) { - window->view = view; - window->view->window = window; - } window->screen = screen; + window->name = name; window->color_fg = 0xffffff; } @@ -114,3 +111,14 @@ void eve_window_remove(EVEWindow *window) { screen->win_tail = window->prev; } } + +EVEWindow *eve_window_get(EVEScreen *screen, char *name) { + EVEWindow *w = screen->win_head; + + while (w) { + if (strcmp(name, w->name) == 0) return w; + w = w->next; + } + + return NULL; +} -- cgit v1.2.3