commit 64e4683

seiko  ·  2026-06-02 15:19:43 +0000 UTC
parent 0fe23b6
Add mauswin.h, boilerplate, init function, logging
1 files changed,  +42, -0
+42, -0
 1@@ -0,0 +1,42 @@
 2+#ifndef MAUSWIN_H
 3+#define MAUSWIN_H
 4+
 5+#include <stdio.h>
 6+
 7+/* auto selection */
 8+#if !defined(BACKEND_WIN) && !defined(BACKEND_MAC) && \
 9+    !defined(BACKEND_X11) && !defined(BACKEND_WAY)
10+
11+#define MAUS_WARN_BACKEND_AUTO_SEL 1
12+
13+#if defined(_WIN32)
14+#define BACKEND_WIN32
15+
16+#elif defined(__APPLE__)
17+#define BACKEND_COCOA
18+
19+#else /* default to X not Way */
20+#define BACKEND_X11
21+
22+#endif
23+#endif /* auto selection */
24+
25+#if defined(BACKEND_X11)
26+#include "mauswin_x11.h"
27+
28+#elif defined(BACKEND_WAY)
29+/* ... */
30+
31+#elif defined(BACKEND_WIN)
32+/* ... */
33+
34+#elif defined(BACKEND_MAC)
35+/* ... */
36+
37+#endif
38+
39+MausWindow* maus_init(const char* title, int width, int height);
40+void maus_log(FILE* fd, const char* fmt, ...);
41+
42+#endif /* MAUSWIN_H */
43+