From de81192b71826b90378fa0b9f4089194d5b5f6ee Mon Sep 17 00:00:00 2001
From: sbosse <sbosse@uni-bremen.de>
Date: Mon, 14 Oct 2024 23:08:25 +0200
Subject: [PATCH] Mon 14 Oct 23:06:38 CEST 2024

---
 kernel/window.h | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 kernel/window.h

diff --git a/kernel/window.h b/kernel/window.h
new file mode 100644
index 0000000..4939712
--- /dev/null
+++ b/kernel/window.h
@@ -0,0 +1,26 @@
+#ifndef WINDOW_H
+#define WINDOW_H
+
+#include "event_queue.h"
+#include "graphics.h"
+
+extern struct window window_root;
+
+struct window * window_create_root();
+
+struct window * window_create( struct window *parent, int x, int y, int w, int h );
+struct window * window_addref( struct window *w );
+void window_delete( struct window *w );
+
+int  window_width( struct window *w );
+int  window_height( struct window *w );
+
+struct graphics * window_graphics( struct window *w );
+int  window_post_events( struct window *w, struct event *e, int size );
+int  window_read_events( struct window *w, struct event *e, int size );
+int  window_read_events_nonblock( struct window *w, struct event *e, int size );
+int  window_write_graphics( struct window *w, int *cmd, int size );
+
+void window_event_post_root( uint16_t type, uint16_t code, int16_t x, int16_t y );
+
+#endif