summaryrefslogtreecommitdiffhomepage
path: root/gui/init.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-13 07:42:29 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-13 07:42:29 +0100
commit53e8b2d41988be69deb800e1ef3cbcfc699a3076 (patch)
treedc5a3a9098bf4172a52f0410a04274b997505ff0 /gui/init.hpp
parentb0657c7ca495ac9d1d3938b3fdfddd9a8ed2d5f2 (diff)
cmake, main: work toward introducing alternative UI
We're going to base opentrack derivatives on the same branch. Previously merges were a living hell. Modularizing the UI code and having continuously-built executables will do a lot. First opentrack variant in progress is a TrackHat device for mouse and scrolling control for people with spine and hand/arm disabilities.
Diffstat (limited to 'gui/init.hpp')
-rw-r--r--gui/init.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/gui/init.hpp b/gui/init.hpp
new file mode 100644
index 00000000..d437b084
--- /dev/null
+++ b/gui/init.hpp
@@ -0,0 +1,14 @@
+#pragma once
+
+#include "export.hpp"
+
+#include <functional>
+#include <QWidget>
+
+int OTR_GUI_EXPORT otr_main(int argc, char** argv, std::function<QWidget*()> make_main_window);
+
+template<typename F>
+auto run_application(int argc, char** argv, F&& fun)
+{
+ return otr_main(argc, argv, fun);
+}