summaryrefslogtreecommitdiff
path: root/c2.cpp
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-12-15 22:48:12 +1100
committerquou <quou@disroot.org>2024-12-15 22:48:12 +1100
commit1b8008c41a04ceeb3ac4970f469ce9420ec29241 (patch)
treee09c89f5e0b0f03709da75a7e5c338a5108166ce /c2.cpp
parentb9550388afdf53b1efc858cd568181217b060897 (diff)
Windowing + keyboard and mouse input
Diffstat (limited to 'c2.cpp')
-rw-r--r--c2.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/c2.cpp b/c2.cpp
new file mode 100644
index 0000000..f6ad356
--- /dev/null
+++ b/c2.cpp
@@ -0,0 +1,16 @@
+#include "app.hpp"
+extern "C" {
+#include "plat.h"
+}
+
+int main() {
+ App* app = App::create("c2");
+ app->running = 1;
+ while (app->running) {
+ app->begin();
+ if (app->mp(mbtn_left))
+ print("%d, %d, %d\n", app->mx, app->my, app->scrolly);
+ app->end();
+ }
+ app->destroy();
+}