summaryrefslogtreecommitdiff
path: root/code/fe310/eos/eve/screen
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2020-07-11 03:58:45 +0200
committerUros Majstorovic <majstor@majstor.org>2020-07-11 03:58:45 +0200
commit86aa553093084f9c2f04a5fb3d744b56b656ea3a (patch)
treeca2a6c735f1807956a1e4f4ae0826cdde120f668 /code/fe310/eos/eve/screen
parentd8ced7b070beaa010f557c4c244c5c386d4e6efd (diff)
screen/window/kbd window implemented; str widget tested
Diffstat (limited to 'code/fe310/eos/eve/screen')
-rw-r--r--code/fe310/eos/eve/screen/Makefile2
-rw-r--r--code/fe310/eos/eve/screen/form.c51
-rw-r--r--code/fe310/eos/eve/screen/form.h2
-rw-r--r--code/fe310/eos/eve/screen/page.c70
-rw-r--r--code/fe310/eos/eve/screen/page.h3
-rw-r--r--code/fe310/eos/eve/screen/screen.c119
-rw-r--r--code/fe310/eos/eve/screen/screen.h11
-rw-r--r--code/fe310/eos/eve/screen/window.c69
-rw-r--r--code/fe310/eos/eve/screen/window.h14
9 files changed, 222 insertions, 119 deletions
diff --git a/code/fe310/eos/eve/screen/Makefile b/code/fe310/eos/eve/screen/Makefile
index 372cf9e..f6115df 100644
--- a/code/fe310/eos/eve/screen/Makefile
+++ b/code/fe310/eos/eve/screen/Makefile
@@ -2,7 +2,7 @@ include ../../../common.mk
CFLAGS += -I. -I.. -I../..
-obj = font.o screen.o window.o page.o form.o
+obj = font.o screen.o window.o kbdwin.o page.o form.o
%.o: %.c %.h
diff --git a/code/fe310/eos/eve/screen/form.c b/code/fe310/eos/eve/screen/form.c
index f84b0d7..927f889 100644
--- a/code/fe310/eos/eve/screen/form.c
+++ b/code/fe310/eos/eve/screen/form.c
@@ -13,11 +13,9 @@
#include "widget/label.h"
#include "widget/widget.h"
-#define CH_EOF 0x1a
-
-int eve_form_init(EVEForm *form, EVEWidget *widget, uint16_t widget_size, eve_page_open_t open, eve_page_close_t close, EVEWindow *window) {
+int eve_form_init(EVEForm *form, EVEWindow *window, EVEWidget *widget, uint16_t widget_size, eve_page_open_t open, eve_page_close_t close) {
memset(form, 0, sizeof(EVEForm));
- eve_page_init(&form->p, eve_form_touch, eve_form_draw, open, close, eve_form_handle_evt, eve_form_update_g, window);
+ eve_page_init(&form->p, window, eve_form_touch, eve_form_draw, open, close, eve_form_handle_evt, eve_form_update_g);
form->widget = widget;
form->widget_size = widget_size;
eve_form_update_g(&form->p, NULL);
@@ -26,36 +24,29 @@ int eve_form_init(EVEForm *form, EVEWidget *widget, uint16_t widget_size, eve_pa
int eve_form_touch(EVEView *v, uint8_t tag0, int touch_idx) {
EVEForm *form = (EVEForm *)v;
EVEWidget *widget = form->widget;
- EVEWidget *widget_f = eve_page_get_focus(&form->p);
- int i, ret = 0;
+ int i, r, ret = 0;
EVERect focus = {0,0,0,0};
+ if (touch_idx == 0) {
+ EVETouch *t;
+ uint16_t evt;
+
+ t = eve_touch_evt(tag0, touch_idx, form->p.v.window->tag, 1, &evt);
+ if (t && evt) {
+ eve_form_handle_evt(&form->p, NULL, t, evt, tag0, touch_idx);
+ if ((evt & EVE_TOUCH_ETYPE_POINT_UP) && (t->eevt == 0)) eve_page_set_focus(&form->p, NULL, NULL);
+ ret = 1;
+ }
+ }
for (i=0; i<form->widget_size; i++) {
if (eve_page_rect_visible(&form->p, &widget->g)) {
- int a;
-
- a = widget->touch(widget, &form->p, tag0, touch_idx, &focus);
- ret = ret || a;
- if (focus.w && focus.h && (widget_f != widget)) {
- EVEKbd *kbd = eve_screen_get_kbd(form->p.window->screen);
-
- if (kbd) {
- if (widget_f && widget_f->putc) {
- eve_screen_hide_kbd(form->p.window->screen);
- widget_f->putc(widget_f, CH_EOF);
- }
- eve_kbd_set_handler(kbd, widget->putc, &form->p);
- if (widget->putc) {
- eve_screen_show_kbd(form->p.window->screen);
- }
- }
- widget_f = widget;
- }
+ int r = widget->touch(widget, &form->p, tag0, touch_idx, &focus);
+ ret = ret || r;
+ if (focus.w && focus.h) eve_page_set_focus(&form->p, widget, &focus);
}
widget = eve_widget_next(widget);
}
- if (focus.w && focus.h) eve_page_set_focus(&form->p, widget_f, &focus);
return ret;
}
@@ -65,7 +56,10 @@ uint8_t eve_form_draw(EVEView *v, uint8_t tag0) {
int i;
uint8_t tagN = tag0;
+ eve_cmd_dl(SAVE_CONTEXT());
eve_cmd_dl(VERTEX_FORMAT(0));
+ eve_cmd_dl(VERTEX_TRANSLATE_X(eve_page_scr_x(&form->p, 0) * 16));
+ eve_cmd_dl(VERTEX_TRANSLATE_Y(eve_page_scr_y(&form->p, 0) * 16));
for (i=0; i<form->widget_size; i++) {
if (widget->label && eve_page_rect_visible(&form->p, &widget->label->g)) {
@@ -77,9 +71,12 @@ uint8_t eve_form_draw(EVEView *v, uint8_t tag0) {
widget = eve_widget_next(widget);
}
+ eve_cmd_dl(RESTORE_CONTEXT());
+
for (i=tag0; i<tagN; i++) {
eve_touch_set_opt(i, eve_touch_get_opt(i) | EVE_TOUCH_OPT_TRACK | EVE_TOUCH_OPT_TRACK_XY | EVE_TOUCH_OPT_TRACK_EXT);
}
+ if (v->window->tag != EVE_TAG_NOTAG) eve_touch_set_opt(v->window->tag, eve_touch_get_opt(v->window->tag) | EVE_TOUCH_OPT_TRACK | EVE_TOUCH_OPT_TRACK_XY | EVE_TOUCH_OPT_TRACK_EXT);
return tagN;
}
@@ -103,7 +100,7 @@ void eve_form_update_g(EVEPage *page, EVEWidget *_widget) {
for (i=0; i<form->widget_size; i++) {
if (widget->label) {
widget->label->g.y = h;
- if (widget->label->g.w + widget->g.w > form->p.window->screen->w) h += widget->label->g.h;
+ if (widget->label->g.w + widget->g.w > form->p.v.window->g.w) h += widget->label->g.h;
}
widget->g.y = h;
h += widget->g.h;
diff --git a/code/fe310/eos/eve/screen/form.h b/code/fe310/eos/eve/screen/form.h
index 006ef2e..7742b8c 100644
--- a/code/fe310/eos/eve/screen/form.h
+++ b/code/fe310/eos/eve/screen/form.h
@@ -8,7 +8,7 @@ typedef struct EVEForm {
uint16_t widget_size;
} EVEForm;
-int eve_form_init(EVEForm *form, struct EVEWidget *widget, uint16_t widget_size, eve_page_open_t open, eve_page_close_t close, EVEWindow *window);
+int eve_form_init(EVEForm *form, EVEWindow *window, struct EVEWidget *widget, uint16_t widget_size, eve_page_open_t open, eve_page_close_t close);
int eve_form_touch(EVEView *v, uint8_t tag0, int touch_idx);
uint8_t eve_form_draw(EVEView *v, uint8_t tag0);
void eve_form_handle_evt(EVEPage *page, struct EVEWidget *widget, EVETouch *touch, uint16_t evt, uint8_t tag0, int touch_idx);
diff --git a/code/fe310/eos/eve/screen/page.c b/code/fe310/eos/eve/screen/page.c
index b1b3985..7631c95 100644
--- a/code/fe310/eos/eve/screen/page.c
+++ b/code/fe310/eos/eve/screen/page.c
@@ -12,54 +12,78 @@
#include "widget/label.h"
#include "widget/widget.h"
-void eve_page_init(EVEPage *page, eve_view_touch_t touch, eve_view_draw_t draw, eve_page_open_t open, eve_page_close_t close, eve_page_evt_handler_t handle_evt, eve_page_g_updater_t update_g, EVEWindow *window) {
+#define CH_EOF 0x1a
+
+void eve_page_init(EVEPage *page, EVEWindow *window, eve_view_touch_t touch, eve_view_draw_t draw, eve_page_open_t open, eve_page_close_t close, eve_page_evt_handler_t handle_evt, eve_page_g_updater_t update_g) {
memset(page, 0, sizeof(EVEPage));
page->v.touch = touch;
page->v.draw = draw;
+ page->v.window = window;
page->open = open;
page->close = close;
page->handle_evt = handle_evt;
page->update_g = update_g;
page->widget_f = NULL;
- page->window = window;
+ window->view = (EVEView *)page;
}
int16_t eve_page_x(EVEPage *page, int16_t x) {
- return x + page->win_x - page->window->g.x;
+ return x + page->win_x - page->v.window->g.x;
}
int16_t eve_page_y(EVEPage *page, int16_t y) {
- return y + page->win_y - page->window->g.y;
+ return y + page->win_y - page->v.window->g.y;
}
int16_t eve_page_scr_x(EVEPage *page, int16_t x) {
- return x - page->win_x + page->window->g.x;
+ return x - page->win_x + page->v.window->g.x;
}
int16_t eve_page_scr_y(EVEPage *page, int16_t y) {
- return y - page->win_y + page->window->g.y;
+ return y - page->win_y + page->v.window->g.y;
}
void eve_page_set_focus(EVEPage *page, EVEWidget *widget, EVERect *f) {
- EVERect g;
+ if (page->widget_f != widget) {
+ EVEKbd *kbd = eve_screen_get_kbd(page->v.window->screen);
- eve_window_visible_g(page->window, &g);
- g.x -= page->window->g.x;
- g.y -= page->window->g.y;
+ if (kbd) {
+ EVEWidget *widget_f = page->widget_f;
- if (f->x < page->win_x + g.x) {
- page->win_x = f->x - g.x;
- }
- if (f->y < page->win_y + g.y) {
- page->win_y = f->y - g.y;
- }
- if ((f->x + f->w) > (page->win_x + g.x + g.w)) {
- page->win_x = (f->x + f->w) - (g.x + g.w);
+ if (widget_f && widget_f->putc) {
+ eve_screen_hide_kbd(page->v.window->screen);
+ widget_f->putc(page, CH_EOF);
+ }
+ if (widget && widget->putc) {
+ eve_kbd_set_handler(kbd, widget->putc, page);
+ eve_screen_show_kbd(page->v.window->screen);
+ } else {
+ eve_kbd_set_handler(kbd, NULL, NULL);
+ }
+ }
+ page->widget_f = widget;
}
- if ((f->y + f->h) > (page->win_y + g.y + g.h)) {
- page->win_y = (f->y + f->h) - (g.y + g.h);
+
+ if (f) {
+ EVERect g;
+
+ eve_window_visible_g(page->v.window, &g);
+ g.x -= page->v.window->g.x;
+ g.y -= page->v.window->g.y;
+
+ if (f->x < page->win_x + g.x) {
+ page->win_x = f->x - g.x;
+ }
+ if (f->y < page->win_y + g.y) {
+ page->win_y = f->y - g.y;
+ }
+ if ((f->x + f->w) > (page->win_x + g.x + g.w)) {
+ page->win_x = (f->x + f->w) - (g.x + g.w);
+ }
+ if ((f->y + f->h) > (page->win_y + g.y + g.h)) {
+ page->win_y = (f->y + f->h) - (g.y + g.h);
+ }
}
- page->widget_f = widget;
}
EVEWidget *eve_page_get_focus(EVEPage *page) {
@@ -67,8 +91,8 @@ EVEWidget *eve_page_get_focus(EVEPage *page) {
}
int eve_page_rect_visible(EVEPage *page, EVERect *g) {
- uint16_t w = page->window->g.w;
- uint16_t h = page->window->g.h;
+ uint16_t w = page->v.window->g.w;
+ uint16_t h = page->v.window->g.h;
if (((g->x + g->w) >= page->win_x) && ((g->y + g->h) >= page->win_y) && (g->x <= (page->win_x + w)) && (g->y <= (page->win_y + h))) return 1;
return 0;
diff --git a/code/fe310/eos/eve/screen/page.h b/code/fe310/eos/eve/screen/page.h
index 8f2fba9..eebedfd 100644
--- a/code/fe310/eos/eve/screen/page.h
+++ b/code/fe310/eos/eve/screen/page.h
@@ -17,10 +17,9 @@ typedef struct EVEPage {
eve_page_evt_handler_t handle_evt;
eve_page_g_updater_t update_g;
struct EVEWidget *widget_f;
- EVEWindow *window;
} EVEPage;
-void eve_page_init(EVEPage *page, eve_view_touch_t touch, eve_view_draw_t draw, eve_page_open_t open, eve_page_close_t close, eve_page_evt_handler_t handle_evt, eve_page_g_updater_t update_g, EVEWindow *window);
+void eve_page_init(EVEPage *page, EVEWindow *window, eve_view_touch_t touch, eve_view_draw_t draw, eve_page_open_t open, eve_page_close_t close, eve_page_evt_handler_t handle_evt, eve_page_g_updater_t update_g);
int16_t eve_page_x(EVEPage *page, int16_t x);
int16_t eve_page_y(EVEPage *page, int16_t y);
int16_t eve_page_scr_x(EVEPage *page, int16_t x);
diff --git a/code/fe310/eos/eve/screen/screen.c b/code/fe310/eos/eve/screen/screen.c
index 68b6fb8..f103b48 100644
--- a/code/fe310/eos/eve/screen/screen.c
+++ b/code/fe310/eos/eve/screen/screen.c
@@ -6,11 +6,14 @@
#include "screen.h"
#include "window.h"
+#include "kbdwin.h"
int eve_screen_init(EVEScreen *screen, uint16_t w, uint16_t h) {
memset(screen, 0, sizeof(EVEScreen));
screen->w = w;
screen->h = h;
+ screen->mem_next = EVE_RAM_G;
+ eve_touch_set_handler(eve_screen_handle_touch, screen);
}
void eve_screen_set_kbd(EVEScreen *screen, EVEKbd *kbd) {
@@ -22,74 +25,57 @@ EVEKbd *eve_screen_get_kbd(EVEScreen *screen) {
}
void eve_screen_show_kbd(EVEScreen *screen) {
- if (screen->kbd && screen->kbd_win) screen->kbd_win->g.y = screen->h - screen->kbd->g.h;
-}
-
-void eve_screen_hide_kbd(EVEScreen *screen) {
- if (screen->kbd && screen->kbd_win) screen->kbd_win->g.y = screen->h;
-}
-
-int eve_screen_win_insert(EVEScreen *screen, EVEWindow *window, int idx) {
- if (idx) {
- int i;
- EVEWindow *h = screen->win_head;
+ EVEWindow *win = screen->win_tail;
+ EVEKbd *kbd = eve_screen_get_kbd(screen);
- for (i=1; i<idx; i++) {
- h = h->next;
- if (h == NULL) return EVE_ERR;
- }
- window->next = h->next;
- h->next = window;
- } else {
- window->next = screen->win_head;
- screen->win_head = window;
- }
- if (window->next == NULL) screen->win_tail = window;
- return EVE_OK;
+ if (win) win->g.y = screen->h - kbd->g.h;
}
-int eve_screen_win_remove(EVEScreen *screen, EVEWindow *window) {
- EVEWindow *h = screen->win_head;
- if (h == NULL) return EVE_ERR;
- if (h == window) {
- screen->win_head = window->next;
- if (screen->win_head == NULL) screen->win_tail = NULL;
- } else {
- while (h->next && (h->next != window)) h = h->next;
- if (h->next == NULL) return EVE_ERR;
-
- h->next = window->next;
- if (h->next == NULL) screen->win_tail = h;
- }
-}
+void eve_screen_hide_kbd(EVEScreen *screen) {
+ EVEWindow *win = screen->win_tail;
-void eve_screen_win_append(EVEScreen *screen, EVEWindow *window) {
- screen->win_tail->next = window;
- screen->win_tail = window;
+ if (win) win->g.y = screen->h;
}
-void eve_screen_handle_touch(EVEScreen *screen, uint8_t tag0, int touch_idx) {
- EVEWindow *w;
- int a;
+void eve_screen_draw(EVEScreen *screen) {
+ EVEWindow *win;
uint8_t tagN = 0x80;
- eve_touch_clear_opt();
-
- w = screen->win_head;
- while(w) {
- if (eve_window_visible(w)) a = w->view->touch(w->view, tag0, touch_idx);
- w = w->next;
- }
-
eve_cmd_burst_start();
eve_cmd_dl(CMD_DLSTART);
- eve_cmd_dl(CLEAR_COLOR_RGB(0,0,0));
- eve_cmd_dl(CLEAR(1,1,1));
- w = screen->win_head;
- while(w) {
- if (eve_window_visible(w)) tagN = w->view->draw(w->view, tagN);
- w = w->next;
+ win = screen->win_head;
+ while (win) {
+ if (eve_window_visible(win)) {
+ int16_t x = win->g.x;
+ int16_t y = win->g.y;
+ uint16_t w = win->g.w;
+ uint16_t h = win->g.h;
+
+ if (x < 0) {
+ w += x;
+ x = 0;
+ }
+ if (y < 0) {
+ h += y;
+ y = 0;
+ }
+ if (x + w > screen->w) w = screen->w - x;
+ if (y + h > screen->h) h = screen->h - y;
+ win->tag = tagN;
+
+ if (tagN != EVE_TAG_NOTAG) {
+ eve_cmd_dl(CLEAR_TAG(tagN));
+ tagN++;
+ }
+ eve_cmd_dl(CLEAR_COLOR_RGBC(win->color_bg));
+ eve_cmd_dl(SCISSOR_XY(x, y));
+ eve_cmd_dl(SCISSOR_SIZE(w, h));
+ eve_cmd_dl(CLEAR(1,1,1));
+ eve_cmd_dl(COLOR_RGBC(win->color_fg));
+ tagN = win->view->draw(win->view, tagN);
+ }
+ win = win->next;
}
eve_cmd_dl(DISPLAY());
@@ -97,3 +83,22 @@ void eve_screen_handle_touch(EVEScreen *screen, uint8_t tag0, int touch_idx) {
eve_cmd_burst_end();
eve_cmd_exec(1);
}
+
+void eve_screen_handle_touch(void *s, uint8_t tag0, int touch_idx) {
+ EVEScreen *screen = s;
+ EVEWindow *win;
+
+ eve_touch_clear_opt();
+
+ if (touch_idx >= 0) {
+ win = screen->win_tail;
+ while (win) {
+ if (eve_window_visible(win)) {
+ int a = win->view->touch(win->view, tag0, touch_idx);
+ }
+ win = win->prev;
+ }
+ }
+
+ eve_screen_draw(screen);
+}
diff --git a/code/fe310/eos/eve/screen/screen.h b/code/fe310/eos/eve/screen/screen.h
index d6bc5e8..a9745ad 100644
--- a/code/fe310/eos/eve/screen/screen.h
+++ b/code/fe310/eos/eve/screen/screen.h
@@ -5,20 +5,17 @@ struct EVEWindow;
typedef struct EVEScreen {
uint16_t w;
uint16_t h;
+ uint32_t mem_next;
struct EVEWindow *win_head;
struct EVEWindow *win_tail;
EVEKbd *kbd;
- struct EVEWindow *kbd_win;
} EVEScreen;
int eve_screen_init(EVEScreen *screen, uint16_t w, uint16_t h);
-void eve_screen_set_kbd(EVEScreen *screen, EVEKbd *kbd) ;
+void eve_screen_set_kbd(EVEScreen *screen, EVEKbd *kbd);
EVEKbd *eve_screen_get_kbd(EVEScreen *screen);
void eve_screen_show_kbd(EVEScreen *screen);
void eve_screen_hide_kbd(EVEScreen *screen);
-int eve_screen_win_insert(EVEScreen *screen, struct EVEWindow *window, int idx);
-int eve_screen_win_remove(EVEScreen *screen, struct EVEWindow *window);
-void eve_screen_win_append(EVEScreen *screen, struct EVEWindow *window);
-
-void eve_screen_handle_touch(EVEScreen *screen, uint8_t tag0, int touch_idx);
+void eve_screen_draw(EVEScreen *screen);
+void eve_screen_handle_touch(void *s, uint8_t tag0, int touch_idx);
diff --git a/code/fe310/eos/eve/screen/window.c b/code/fe310/eos/eve/screen/window.c
index 5c329a9..e49897f 100644
--- a/code/fe310/eos/eve/screen/window.c
+++ b/code/fe310/eos/eve/screen/window.c
@@ -13,8 +13,20 @@ void eve_window_init(EVEWindow *window, EVERect *g, EVEView *view, EVEScreen *sc
memset(window, 0, sizeof(EVEWindow));
if (g) window->g = *g;
- window->view = view;
+ if (view) {
+ window->view = view;
+ window->view->window = window;
+ }
window->screen = screen;
+ window->color_fg = 0xffffff;
+}
+
+void eve_window_set_color_bg(EVEWindow *window, uint8_t r, uint8_t g, uint8_t b) {
+ window->color_bg = (r << 16) | (g << 8) | b;
+}
+
+void eve_window_set_color_fg(EVEWindow *window, uint8_t r, uint8_t g, uint8_t b) {
+ window->color_fg = (r << 16) | (g << 8) | b;
}
int eve_window_visible(EVEWindow *window) {
@@ -47,3 +59,58 @@ void eve_window_visible_g(EVEWindow *window, EVERect *g) {
w = w->next;
}
}
+
+void eve_window_append(EVEWindow *window) {
+ EVEScreen *screen = window->screen;
+
+ window->prev = screen->win_tail;
+ if (screen->win_tail) {
+ screen->win_tail->next = window;
+ } else {
+ screen->win_head = window;
+ }
+ screen->win_tail = window;
+}
+
+void eve_window_insert_above(EVEWindow *window, EVEWindow *win_prev) {
+ EVEScreen *screen = window->screen;
+
+ window->prev = win_prev;
+ window->next = win_prev->next;
+
+ if (window->next) {
+ window->next->prev = window;
+ } else {
+ screen->win_tail = window;
+ }
+ win_prev->next = window;
+}
+
+void eve_window_insert_below(EVEWindow *window, EVEWindow *win_next) {
+ EVEScreen *screen = window->screen;
+
+ window->prev = win_next->prev;
+ window->next = win_next;
+
+ win_next->prev = window;
+ if (window->prev) {
+ window->prev->next = window;
+ } else {
+ screen->win_head = window;
+ }
+}
+
+void eve_window_remove(EVEWindow *window) {
+ EVEScreen *screen = window->screen;
+
+ if (window->prev) {
+ window->prev->next = window->next;
+ } else {
+ screen->win_head = window->next;
+ }
+ if (window->next) {
+ window->next->prev = window->prev;
+ } else {
+ screen->win_tail = window->prev;
+ }
+}
diff --git a/code/fe310/eos/eve/screen/window.h b/code/fe310/eos/eve/screen/window.h
index 78aabde..7f14f18 100644
--- a/code/fe310/eos/eve/screen/window.h
+++ b/code/fe310/eos/eve/screen/window.h
@@ -1,6 +1,7 @@
#include <stdint.h>
struct EVEView;
+struct EVEWindow;
typedef int (*eve_view_touch_t) (struct EVEView *, uint8_t, int);
typedef uint8_t (*eve_view_draw_t) (struct EVEView *, uint8_t);
@@ -8,6 +9,7 @@ typedef uint8_t (*eve_view_draw_t) (struct EVEView *, uint8_t);
typedef struct EVEView {
eve_view_touch_t touch;
eve_view_draw_t draw;
+ struct EVEWindow *window;
} EVEView;
typedef struct EVEWindow {
@@ -15,8 +17,20 @@ typedef struct EVEWindow {
EVEView *view;
EVEScreen *screen;
struct EVEWindow *next;
+ struct EVEWindow *prev;
+ uint32_t color_bg;
+ uint32_t color_fg;
+ uint8_t tag;
} EVEWindow;
void eve_window_init(EVEWindow *window, EVERect *g, EVEView *view, EVEScreen *screen);
+void eve_window_set_color_bg(EVEWindow *window, uint8_t r, uint8_t g, uint8_t b);
+void eve_window_set_color_fg(EVEWindow *window, uint8_t r, uint8_t g, uint8_t b);
+
int eve_window_visible(EVEWindow *window);
void eve_window_visible_g(EVEWindow *window, EVERect *g);
+
+void eve_window_append(EVEWindow *window);
+void eve_window_insert_above(EVEWindow *window, EVEWindow *win_prev);
+void eve_window_insert_below(EVEWindow *window, EVEWindow *win_next);
+void eve_window_remove(EVEWindow *window);