summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/widgets.h
diff options
context:
space:
mode:
Diffstat (limited to 'fw/fe310/eos/eve/widget/widgets.h')
-rw-r--r--fw/fe310/eos/eve/widget/widgets.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/fw/fe310/eos/eve/widget/widgets.h b/fw/fe310/eos/eve/widget/widgets.h
new file mode 100644
index 0000000..2f8d3ca
--- /dev/null
+++ b/fw/fe310/eos/eve/widget/widgets.h
@@ -0,0 +1,39 @@
+#include "label.h"
+#include "widget.h"
+
+#include "freew.h"
+#include "spacerw.h"
+#include "pagew.h"
+#include "strw.h"
+#include "textw.h"
+#include "selectw.h"
+
+typedef union EVEWidgetSpecT {
+ EVEFreeSpec free;
+ EVESpacerSpec spacer;
+ EVEPageSpec page;
+ EVEStrSpec str;
+ EVETextSpec text;
+ EVESelectSpec select;
+} EVEWidgetSpecT;
+
+typedef struct EVELabelSpec {
+ EVERect g;
+ EVEFont *font;
+ char *title;
+} APPLabelSpec;
+
+typedef struct EVEWidgetSpec {
+ APPLabelSpec label;
+ struct {
+ EVERect g;
+ EVEWidgetSpecT spec;
+ uint8_t type;
+ } widget;
+} EVEWidgetSpec;
+
+typedef int (*eve_widget_create_t) (EVEWidget *, EVERect *, EVEPage *, EVEWidgetSpecT *);
+typedef void (*eve_widget_destroy_t) (EVEWidget *);
+
+int eve_widget_create(EVEWidget *widget, uint8_t type, EVERect *g, EVEPage *page, EVEWidgetSpecT *spec);
+void eve_widget_destroy(EVEWidget *widget);