summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/widgets.h
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2022-08-09 22:23:08 +0200
committerUros Majstorovic <majstor@majstor.org>2022-08-09 22:23:08 +0200
commit3f913efda03fd840cd526ef72e6f397c7da61bd7 (patch)
tree08f62c93e0e0660fdb7beba32276ff1ceb7a8a3c /fw/fe310/eos/eve/widget/widgets.h
parent810dde21ee65653c15606917b19566cfbaaf165e (diff)
code layout
Diffstat (limited to 'fw/fe310/eos/eve/widget/widgets.h')
-rw-r--r--fw/fe310/eos/eve/widget/widgets.h35
1 files changed, 10 insertions, 25 deletions
diff --git a/fw/fe310/eos/eve/widget/widgets.h b/fw/fe310/eos/eve/widget/widgets.h
index 2f8d3ca..9c96d8c 100644
--- a/fw/fe310/eos/eve/widget/widgets.h
+++ b/fw/fe310/eos/eve/widget/widgets.h
@@ -1,39 +1,24 @@
-#include "label.h"
-#include "widget.h"
-
#include "freew.h"
#include "spacerw.h"
#include "pagew.h"
#include "strw.h"
#include "textw.h"
#include "selectw.h"
+#include "togglew.h"
+
+#define EVE_WIDGET_TYPE_FREE 1
+#define EVE_WIDGET_TYPE_SPACER 2
+#define EVE_WIDGET_TYPE_PAGE 3
+#define EVE_WIDGET_TYPE_TOGGLE 4
+#define EVE_WIDGET_TYPE_STR 5
+#define EVE_WIDGET_TYPE_TEXT 6
+#define EVE_WIDGET_TYPE_SELECT 7
typedef union EVEWidgetSpecT {
EVEFreeSpec free;
- EVESpacerSpec spacer;
EVEPageSpec page;
+ EVEToggleSpec toggle;
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);