aboutsummaryrefslogtreecommitdiff
path: root/libgui/inc
diff options
context:
space:
mode:
authorMarvin Borner2020-08-28 00:21:56 +0200
committerMarvin Borner2020-08-28 00:21:56 +0200
commite15051fd2d1d65af315ac4004256d5bc56a6dc67 (patch)
tree8d44262fb315d83e92c5840883948368cc169a7e /libgui/inc
parent51bfb2559c158d285ae2bcb8338fa0f33e091fa3 (diff)
Added window flags
Diffstat (limited to 'libgui/inc')
-rw-r--r--libgui/inc/gui.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/libgui/inc/gui.h b/libgui/inc/gui.h
index 308e3a1..ad089bd 100644
--- a/libgui/inc/gui.h
+++ b/libgui/inc/gui.h
@@ -15,6 +15,10 @@
#define FG_COLOR 0xffabb2bf
#define BG_COLOR 0xff282c34
+#define WF_NO_FOCUS (1 << 0)
+#define WF_NO_DRAG (1 << 1)
+#define WF_NO_RESIZE (1 << 2)
+
// Generalized font struct
struct font {
char *chars;
@@ -31,6 +35,7 @@ struct window {
u8 *fb;
u32 bpp;
u32 pitch;
+ int flags;
};
void gui_write_char(struct window *win, int x, int y, u32 c, char ch);
@@ -48,7 +53,7 @@ void gui_init(char *font_path);
* Wrappers
*/
-#define gui_new_window() \
- (msg_send(2, MSG_NEW_WINDOW, NULL), (struct window *)msg_receive_loop()->data)
+#define gui_new_window(flags) \
+ (msg_send(2, MSG_NEW_WINDOW, flags), (struct window *)msg_receive_loop()->data)
#define gui_redraw() (msg_send(2, MSG_REDRAW, NULL)) // TODO: Partial redraw (optimization)
#endif