Initial stab at WIDGET_LOADSCREEN and navigation

This commit is contained in:
Pim van Pelt
2017-12-02 14:15:22 +01:00
parent 980ac4c7cf
commit ef4451b81f
9 changed files with 100 additions and 53 deletions

@ -72,6 +72,15 @@ exit:
}
void screen_destroy(struct screen_t **s) {
struct widget_list_t *wl;
if (!(*s))
return;
// Destroy all widgets
SLIST_FOREACH(wl, &(*s)->widget_entries, entries) {
widget_destroy(&wl->widget);
SLIST_REMOVE(&(*s)->widget_entries, wl, widget_list_t, entries);
}
if ((*s)->name) free ((*s)->name);
free(*s);
*s = NULL;