diff options
author | Uros Majstorovic <majstor@majstor.org> | 2021-02-28 21:00:13 +0100 |
---|---|---|
committer | Uros Majstorovic <majstor@majstor.org> | 2021-02-28 21:00:13 +0100 |
commit | 82a6206422ed658a99716fbd18e33942cebc833b (patch) | |
tree | f849699cd7a31175c57c3d9583d2162786138e3c /fw/fe310/eos/eve/widget/widgets.h | |
parent | 6a4c8a1f11f6a7bd57b0fd618f455bcdecbfe538 (diff) |
font property moved to widget base
Diffstat (limited to 'fw/fe310/eos/eve/widget/widgets.h')
-rw-r--r-- | fw/fe310/eos/eve/widget/widgets.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/fw/fe310/eos/eve/widget/widgets.h b/fw/fe310/eos/eve/widget/widgets.h index 542b350..c33fc03 100644 --- a/fw/fe310/eos/eve/widget/widgets.h +++ b/fw/fe310/eos/eve/widget/widgets.h @@ -1,4 +1,3 @@ -#include "font.h" #include "label.h" #include "widget.h" @@ -9,17 +8,33 @@ #include "textw.h" #include "selectw.h" -typedef union EVEWidgetSpec { +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; + EVEFont *font; + EVEWidgetSpecT spec; + uint8_t type; + } widget; } EVEWidgetSpec; -typedef int (*eve_widget_create_t) (EVEWidget *, EVERect *g, EVEWidgetSpec *); +typedef int (*eve_widget_create_t) (EVEWidget *, EVERect *g, EVEFont *, EVEWidgetSpecT *); typedef void (*eve_widget_destroy_t) (EVEWidget *); -int eve_widget_create(EVEWidget *widget, uint8_t type, EVERect *g, EVEWidgetSpec *spec); +int eve_widget_create(EVEWidget *widget, uint8_t type, EVERect *g, EVEFont *font, EVEWidgetSpecT *spec); void eve_widget_destroy(EVEWidget *widget); |