summaryrefslogtreecommitdiff
path: root/src/ui.h
diff options
context:
space:
mode:
authorYour Name <you@example.com>2024-03-28 16:18:36 -0400
committerYour Name <you@example.com>2024-03-28 16:18:36 -0400
commitc644379e79262a7478a7fb9ea8001f315fdb6eaf (patch)
treed71b15e396ebca28b76f0b5fd1971dd352877e4e /src/ui.h
downloadnerdhack-master.tar.gz
nerdhack-master.tar.bz2
nerdhack-master.zip
Initial commitHEADmaster
Diffstat (limited to 'src/ui.h')
-rw-r--r--src/ui.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ui.h b/src/ui.h
new file mode 100644
index 0000000..daeab78
--- /dev/null
+++ b/src/ui.h
@@ -0,0 +1,22 @@
+#pragma once
+#include <memory>
+#include <ncurses.h>
+#include "ui_terminal.h"
+#include "vm.h"
+
+namespace ui {
+ struct uiImpl;
+
+ class UI {
+ public:
+ UI();
+ ~UI();
+
+ void registerCallbacks(vm::VM& vm);
+
+ private:
+ std::shared_ptr<uiImpl> data;
+ std::map<commands, std::function<void(std::vector<int>)>> getCommandCallbacks(WINDOW *window);
+ };
+
+}