From daa87d92b3df433578e53284a8c88083e24f8623 Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Sat, 27 Mar 2021 22:08:31 +0100 Subject: form/app cleanup; scroll infrastructure --- fw/fe310/eos/app/app_form.c | 85 --------------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 fw/fe310/eos/app/app_form.c (limited to 'fw/fe310/eos/app/app_form.c') diff --git a/fw/fe310/eos/app/app_form.c b/fw/fe310/eos/app/app_form.c deleted file mode 100644 index 8daf09e..0000000 --- a/fw/fe310/eos/app/app_form.c +++ /dev/null @@ -1,85 +0,0 @@ -#include - -#include "eve/eve.h" -#include "eve/eve_kbd.h" -#include "eve/eve_font.h" - -#include "eve/screen/window.h" -#include "eve/screen/page.h" -#include "eve/screen/form.h" - -#include "eve/widget/widgets.h" - -#include "app_form.h" - -static void widgets_destroy(EVEWidget *widget, uint16_t widget_size) { - int i; - - for (i=0; ilabel) eve_free(widget->label); - eve_widget_destroy(widget); - widget = eve_widget_next(widget); - } -} - -EVEForm *app_form_create(EVEWindow *window, EVEViewStack *stack, EVEWidgetSpec spec[], uint16_t spec_size, eve_form_action_t action, eve_form_destructor_t destructor) { - EVEWidget *widgets; - EVEWidget *widget; - EVELabel *label; - EVEForm *form; - int w_size = 0; - int i, r; - - for (i=0; ig.w == 0) label->g.w = eve_font_str_w(font, label->title); - } - if (widget->label && (widget->label->g.w == 0)) eve_font_str_w(label->font, label->title) + APP_LABEL_MARGIN; - if (widget->g.w == 0) widget->g.w = window->g.w - (widget->label ? widget->label->g.w : 0); - widget = eve_widget_next(widget); - } - eve_form_update(form, widgets, spec_size, NULL); - - return form; -} - -void app_form_destroy(EVEForm *form) { - widgets_destroy(form->widget, form->widget_size); - eve_free(form->widget); - eve_free(form); -} -- cgit v1.2.3