Tactiliest/tactility/src/ui/statusbar.h
Ken Van Hoeylandt 29ea47a7ba
Improvements for Files app and statusbar icon (#35)
- Created `tt_get_platform()` to use with more complex platform checks aside from the `ESP_PLATFORM` preprocessor directive
- Expand PC/sim memory to 256k so we can load the max amount of entries in Files without memory issues. I decided to skip the LVGL buffer entirely so it's easier to catch memory leaks.
- Simplified logic in `files_data.c`
- Implement statusbar as a proper widget
- Implement statusbar widget for wifi service
- Implement statusbar widget for sdcard mounting/unmounting
2024-02-07 23:11:39 +01:00

23 lines
542 B
C

#pragma once
#include "lvgl.h"
#include "app.h"
#ifdef __cplusplus
extern "C" {
#endif
#define STATUSBAR_ICON_LIMIT 8
#define STATUSBAR_ICON_SIZE 20
#define STATUSBAR_HEIGHT (STATUSBAR_ICON_SIZE + 4) // 4 extra pixels for border and outline
lv_obj_t* tt_statusbar_create(lv_obj_t* parent);
int8_t tt_statusbar_icon_add(const char* image);
void tt_statusbar_icon_remove(int8_t id);
void tt_statusbar_icon_set_image(int8_t id, const char* image);
void tt_statusbar_icon_set_visibility(int8_t id, bool visible);
#ifdef __cplusplus
}
#endif