summaryrefslogtreecommitdiffstats
path: root/src/server/ui.h
diff options
context:
space:
mode:
authorGravatar Gediminas Jakutis <gediminas@varciai.lt> 2018-05-06 19:01:13 +0300
committerGravatar Gediminas Jakutis <gediminas@varciai.lt> 2018-05-06 19:01:13 +0300
commitdb88777a2f63d7dcd31e5e0442839213784eeb82 (patch)
tree6622d876ba737e3d73cd4d5fa81ba927d050d7f2 /src/server/ui.h
parent3736b2e92b63d69f2278de2ad72901413a70012d (diff)
downloadcoffeetemp-db88777a2f63d7dcd31e5e0442839213784eeb82.tar.gz
coffeetemp-db88777a2f63d7dcd31e5e0442839213784eeb82.tar.bz2
coffeetemp-db88777a2f63d7dcd31e5e0442839213784eeb82.zip
server: major refactor with preparations for switchable UIs.
Diffstat (limited to 'src/server/ui.h')
-rw-r--r--src/server/ui.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/server/ui.h b/src/server/ui.h
new file mode 100644
index 0000000..8070be3
--- /dev/null
+++ b/src/server/ui.h
@@ -0,0 +1,39 @@
+/*
+ * Hot Beverage Companion – desktop application ui wrapper
+ *
+ * Copyright (C) 2018 Gediminas Jakutis
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; version 2.1
+ * of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef UI_H_INCLUDED
+#define UI_H_INCLUDED
+
+#include <time.h>
+
+enum uitype {
+ ui_none,
+ ui_file,
+ ui_curses,
+ ui_gtk
+};
+
+static const enum uitype UI_DEFAULT = ui_curses;
+static const struct timespec DEFAULT_PERIOD = {0, 200 * 1000 * 1000}; /* 200 ms */
+
+int ui_init(int argc, char ***argv, enum uitype ui, int nd, struct timespec period);
+int ui_startloop(void);
+
+#endif /* UI_H_INCLUDED */