aboutsummaryrefslogtreecommitdiff
path: root/teensy/teensy_ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'teensy/teensy_ui.h')
-rw-r--r--teensy/teensy_ui.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/teensy/teensy_ui.h b/teensy/teensy_ui.h
new file mode 100644
index 0000000..9a1e33a
--- /dev/null
+++ b/teensy/teensy_ui.h
@@ -0,0 +1,42 @@
+#ifndef TEENSY_UI_H_
+#define TEENSY_UI_H_
+
+#include "teensy_common.h"
+#include "teensy.h"
+
+#define TYUI_WIN_NORESIZE (1 << 0)
+#define TYUI_WIN_NOCLOSE (1 << 1)
+#define TYUI_WIN_NOMOVE (1 << 2)
+#define TYUI_WIN_INVISIBLE (1 << 3)
+
+#define tyui_begin_window(title, rect, id) \
+ tyui_begin_window_ex(title, rect, id, 0, NULL)
+
+typedef struct {
+ ty_Color fg_normal;
+ ty_Color bg_normal;
+ ty_Color fg_hover;
+ ty_Color bg_hover;
+ ty_Color win_bg;
+ ty_Color win_title;
+} tyui_Style;
+
+typedef uint8_t tyui_Id;
+
+void tyui_init(const ty_Font *font);
+void tyui_deinit(void);
+
+void tyui_draw(void);
+
+bool tyui_begin_window_ex(
+ const char *title,
+ ty_Recti rect,
+ tyui_Id *id,
+ uint32_t flags,
+ bool *closed
+);
+void tyui_end_window(void);
+
+void tyui_text(const char *text);
+
+#endif // TEENSY_UI_H_