mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-10-17 02:45:05 +00:00
- Introduce "side" mode for system bar, versus classic statusbar on top with launcher bar below - Automatic system bar mode detection with override by Kconfig/device.properties and secondary override by user via Appereance settings app - Open a quick-settings menu from the status bar for available Wi-Fi, Bluetooth, GPS, and power controls. - Apps can display overlays with backdrop or Escape-key dismissal. - Added focus-container support and improved keyboard navigation, including Fn+Enter on Cardputer devices. - Power-off controls are available on supported device cards. - Updated status-bar layouts, simulator display dimensions, and toolbar navigation styling. - I²C scanning now supports selecting individual buses to rescan. - SD-card mount status is no longer shown in the status bar.
44 lines
1.5 KiB
C++
44 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <lvgl.h>
|
|
|
|
#include <string>
|
|
|
|
namespace tt::lvgl {
|
|
|
|
constexpr auto STATUSBAR_ICON_LIMIT = 8;
|
|
|
|
/** Create a statusbar widget. Needs to be called with LVGL lock. */
|
|
lv_obj_t* statusbar_create(lv_obj_t* parent);
|
|
|
|
/** 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);
|
|
|
|
int statusbar_get_height();
|
|
|
|
/**
|
|
* Switches between the split layout (a bar on top) and the side layout (a vertical strip on the left). Circular displays always use the split layout.
|
|
* The caller places the statusbar in its parent. Needs to be called with LVGL lock.
|
|
*/
|
|
void statusbar_set_side(lv_obj_t* statusbar, bool side);
|
|
|
|
/**
|
|
* @return the container for the action buttons of apps in the side layout, or nullptr on circular displays. It is hidden in the split layout.
|
|
* Needs to be called with LVGL lock.
|
|
*/
|
|
lv_obj_t* statusbar_get_action_container(lv_obj_t* statusbar);
|
|
|
|
} // namespace
|