summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/eve/widget/widget.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-02-28 21:00:13 +0100
committerUros Majstorovic <majstor@majstor.org>2021-02-28 21:00:13 +0100
commit82a6206422ed658a99716fbd18e33942cebc833b (patch)
treef849699cd7a31175c57c3d9583d2162786138e3c /fw/fe310/eos/eve/widget/widget.c
parent6a4c8a1f11f6a7bd57b0fd618f455bcdecbfe538 (diff)
font property moved to widget base
Diffstat (limited to 'fw/fe310/eos/eve/widget/widget.c')
-rw-r--r--fw/fe310/eos/eve/widget/widget.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/fw/fe310/eos/eve/widget/widget.c b/fw/fe310/eos/eve/widget/widget.c
index a223169..9f1e888 100644
--- a/fw/fe310/eos/eve/widget/widget.c
+++ b/fw/fe310/eos/eve/widget/widget.c
@@ -1,9 +1,11 @@
#include <stdlib.h>
#include <string.h>
+#include "unicode.h"
+
#include "eve.h"
#include "eve_kbd.h"
-#include "unicode.h"
+#include "eve_font.h"
#include "screen/screen.h"
#include "screen/window.h"
@@ -42,8 +44,9 @@ static const eve_widget_destroy_t _widget_destroy[] = {
(eve_widget_destroy_t)eve_selectw_destroy,
};
-void eve_widget_init(EVEWidget *widget, uint8_t type, EVERect *g, eve_widget_touch_t touch, eve_widget_draw_t draw, eve_kbd_input_handler_t putc) {
+void eve_widget_init(EVEWidget *widget, uint8_t type, EVERect *g, EVEFont *font, eve_widget_touch_t touch, eve_widget_draw_t draw, eve_kbd_input_handler_t putc) {
if (g) widget->g = *g;
+ widget->font = font;
widget->touch = touch;
widget->draw = draw;
widget->putc = putc;
@@ -63,8 +66,8 @@ EVEWidget *eve_widget_next(EVEWidget *widget) {
return (EVEWidget *)(_w + _widget_size[widget->type]);
}
-int eve_widget_create(EVEWidget *widget, uint8_t type, EVERect *g, EVEWidgetSpec *spec) {
- return _widget_create[type](widget, g, spec);
+int eve_widget_create(EVEWidget *widget, uint8_t type, EVERect *g, EVEFont *font, EVEWidgetSpecT *spec) {
+ return _widget_create[type](widget, g, font, spec);
}
void eve_widget_destroy(EVEWidget *widget) {