Add low memory warning (#417)

This commit is contained in:
Ken Van Hoeylandt
2025-11-14 15:43:00 +01:00
committed by GitHub
parent dddca1ea76
commit a4f4784ed9
7 changed files with 145 additions and 4 deletions
+12 -1
View File
@@ -10,11 +10,22 @@ constexpr auto STATUSBAR_ICON_LIMIT = 8;
constexpr auto STATUSBAR_ICON_SIZE = 20;
constexpr auto STATUSBAR_HEIGHT = STATUSBAR_ICON_SIZE + 2;
/** Create a statusbar widget. Needs to be called with LVGL lock. */
lv_obj_t* statusbar_create(lv_obj_t* parent);
int8_t statusbar_icon_add(const std::string& image);
/** Add an icon to the statusbar. Does not need to be called with LVGL lock. */
int8_t statusbar_icon_add(const std::string& image, bool visible);
/** Add an icon to the statusbar. Does not need to be called with LVGL lock. */
int8_t statusbar_icon_add();
/** Remove an icon from the statusbar. Does not need to be called with LVGL lock. */
void statusbar_icon_remove(int8_t id);
/** Update an icon's image from the statusbar. Does not need to be called with LVGL lock. */
void statusbar_icon_set_image(int8_t id, const std::string& image);
/** Update the visibility for an icon on the statusbar. Does not need to be called with LVGL lock. */
void statusbar_icon_set_visibility(int8_t id, bool visible);
} // namespace