summaryrefslogtreecommitdiffstats
path: root/src/ui_wizards.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui_wizards.h')
-rw-r--r--src/ui_wizards.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/ui_wizards.h b/src/ui_wizards.h
new file mode 100644
index 0000000..87a43fd
--- /dev/null
+++ b/src/ui_wizards.h
@@ -0,0 +1,49 @@
+/*
+ * functions, callbacks and data types for wizards
+ *
+ * Copyright (c) 2015 Ultimaker B.V.
+ * Author: Olliver Schinagl <o.schinagl@ultimaker.com>
+ *
+ * SPDX-License-Identifier: AGPL-3.0+
+ */
+
+#ifndef _UI_WIZARDS_H
+#define _UI_WIZARDS_H
+
+#include <stdint.h>
+
+#include "procedures.h"
+
+enum wizard_type {
+ WIZARD_NONE,
+ WIZARD_PROGRESS,
+ WIZARD_END, /* sentinel */
+};
+
+struct wizard_data {
+ uint_fast8_t count; /* Calculated using wizard_init */
+ const char *title;
+ enum procedure_key proc_key;
+ struct {
+ enum wizard_type type;
+ char *text;
+ struct button_def prev_button;
+ struct button_def next_button;
+ void (*func)(uint_fast32_t nr);
+ union {
+ void *data;
+ uint_fast32_t nr; /* XXX hack until we have a extrude-train object */
+ };
+ /* TODO consider adding a button_def for the buttons */
+ } screens[];
+};
+
+extern struct wizard_data material_load;
+extern struct wizard_data material_unload;
+
+void wizard_init(struct wizard_data *wizard);
+void wizard_init_all(void);
+
+Evas_Object *wizard_add(Evas_Object *navi, struct wizard_data *wizard, uint_fast8_t pagenum, Eina_Bool pageindex);
+
+#endif /* _UI_WIZARDS_H */