summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/screen/window.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-03-24 23:13:42 +0100
committerUros Majstorovic <majstor@majstor.org>2021-03-24 23:13:42 +0100
commit95f69d4f83ad8f7fbb56349f29e902928510362b (patch)
tree51f4848b0518d138368af30f8e7abeebb89ebd5f /fw/fe310/eos/eve/screen/window.h
parent8c61343677d2ed8f929372863016524707b8ab93 (diff)
window hierarchy
Diffstat (limited to 'fw/fe310/eos/eve/screen/window.h')
-rw-r--r--fw/fe310/eos/eve/screen/window.h43
1 files changed, 32 insertions, 11 deletions
diff --git a/fw/fe310/eos/eve/screen/window.h b/fw/fe310/eos/eve/screen/window.h
index 89c83eb..3e082d4 100644
--- a/fw/fe310/eos/eve/screen/window.h
+++ b/fw/fe310/eos/eve/screen/window.h
@@ -1,23 +1,35 @@
#include <stdint.h>
-struct EVEView;
-struct EVEWindow;
+#include "view.h"
typedef struct EVEWindow {
EVERect g;
- EVEScreen *screen;
char *name;
- struct EVEView *view;
+ EVEView *view;
+ struct EVEWindow *root;
+ struct EVEWindow *parent;
struct EVEWindow *next;
struct EVEWindow *prev;
- uint32_t color_bg;
- uint32_t color_fg;
- uint8_t tag;
+ struct EVEWindow *child_head;
+ struct EVEWindow *child_tail;
} EVEWindow;
-void eve_window_init(EVEWindow *window, EVERect *g, EVEScreen *screen, char *name);
-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);
+typedef struct EVEWindowKbd {
+ EVEWindow w;
+ EVEView v;
+ EVEKbd *kbd;
+} EVEWindowKbd;
+
+typedef struct EVEWindowRoot {
+ EVEWindow w;
+ uint32_t mem_next;
+ EVEWindowKbd *win_kbd;
+} EVEWindowRoot;
+
+void eve_window_init(EVEWindow *window, EVERect *g, EVEWindow *parent, char *name);
+void eve_window_init_root(EVEWindowRoot *window, EVERect *g, char *name);
+void eve_window_init_kbd(EVEWindowKbd *window, EVERect *g, EVEWindowRoot *root, char *name, EVEKbd *kbd);
+void eve_window_set_parent(EVEWindow *window, EVEWindow *parent);
int eve_window_visible(EVEWindow *window);
void eve_window_visible_g(EVEWindow *window, EVERect *g);
@@ -26,4 +38,13 @@ 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);
-EVEWindow *eve_window_get(EVEScreen *screen, char *name);
+EVEWindow *eve_window_search(EVEWindow *window, char *name);
+
+uint8_t eve_window_draw(EVEWindow *window, uint8_t tag0);
+int eve_window_touch(EVEWindow *window, EVETouch *touch, uint16_t evt, uint8_t tag0);
+void eve_window_root_draw(EVEWindow *window);
+void eve_window_root_touch(EVETouch *touch, uint16_t evt, uint8_t tag0, void *win);
+
+EVEKbd *eve_window_kbd(EVEWindow *window);
+void eve_window_kbd_attach(EVEWindow *window);
+void eve_window_kbd_detach(EVEWindow *window);