summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/screen/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eve/screen/window.c')
-rw-r--r--fw/fe310/eos/eve/screen/window.c18
1 files changed, 13 insertions, 5 deletions
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;
+}