fix: sync template sysroot, add script

This commit is contained in:
2026-06-12 11:56:20 +02:00
parent 22691c5c17
commit 44f86a8b19
33 changed files with 5172 additions and 147 deletions
+62 -1
View File
@@ -18,17 +18,37 @@ namespace gui {
static constexpr int MAX_WINDOWS = 8;
static constexpr int PANEL_HEIGHT = 32;
static constexpr int MAX_EXTERNAL_APPS = 32;
static constexpr int MAX_LAUNCHER_ITEMS = 64;
// External app discovered from 0:/apps/ manifest
struct ExternalApp {
char name[48];
char binary_path[128];
char icon_path[128];
char category[24];
SvgIcon icon;
bool menu_visible;
bool launch_with_home;
};
enum LauncherItemKind : uint8_t {
LAUNCHER_ITEM_EXTERNAL_APP = 0,
LAUNCHER_ITEM_BUILTIN_FILES,
LAUNCHER_ITEM_COMMAND_REBOOT,
LAUNCHER_ITEM_COMMAND_SHUTDOWN,
LAUNCHER_ITEM_SPECIAL_FOLDER,
};
struct LauncherItem {
char name[64];
char category[48];
char path[128];
char search_text[192];
SvgIcon* icon;
LauncherItemKind kind;
int ref_index;
};
struct DesktopSettings {
// Background
bool bg_gradient; // true = gradient, false = solid
@@ -72,6 +92,17 @@ struct DesktopState {
uint8_t prev_buttons;
bool app_menu_open;
bool launcher_open;
char launcher_query[64];
int launcher_query_len;
LauncherItem launcher_items[MAX_LAUNCHER_ITEMS];
int launcher_item_count;
int launcher_results[MAX_LAUNCHER_ITEMS];
int launcher_result_count;
int launcher_selected;
int launcher_scroll;
bool super_left_down;
bool super_right_down;
SvgIcon icon_terminal;
SvgIcon icon_filemanager;
@@ -80,11 +111,11 @@ struct DesktopState {
SvgIcon icon_folder;
SvgIcon icon_file;
SvgIcon icon_network;
SvgIcon icon_calculator;
SvgIcon icon_go_up;
SvgIcon icon_go_back;
SvgIcon icon_go_forward;
SvgIcon icon_home;
SvgIcon icon_refresh;
SvgIcon icon_exec;
SvgIcon icon_folder_lg;
@@ -92,7 +123,26 @@ struct DesktopState {
SvgIcon icon_exec_lg;
SvgIcon icon_drive;
SvgIcon icon_drive_lg;
SvgIcon icon_drive_usb;
SvgIcon icon_drive_usb_lg;
SvgIcon icon_delete;
SvgIcon icon_copy;
SvgIcon icon_cut;
SvgIcon icon_paste;
SvgIcon icon_rename;
SvgIcon icon_folder_new;
SvgIcon icon_home_folder;
SvgIcon icon_home_folder_lg;
SvgIcon icon_apps;
SvgIcon icon_apps_lg;
SvgIcon icon_system_configuration_menu;
SvgIcon icon_system_configuration;
SvgIcon icon_system_configuration_lg;
// Special user folder icons (16x16 and 48x48)
static constexpr int SPECIAL_FOLDER_COUNT = 6;
SvgIcon icon_special_folder[SPECIAL_FOLDER_COUNT];
SvgIcon icon_special_folder_lg[SPECIAL_FOLDER_COUNT];
SvgIcon icon_settings;
SvgIcon icon_reboot;
@@ -121,8 +171,19 @@ struct DesktopState {
int vol_pre_mute; // volume before mute
bool vol_dragging; // slider drag in progress
uint64_t vol_last_poll;
uint64_t vol_serial; // last seen mixer state serial
// Temperature monitoring
static constexpr int MAX_THERMAL_ZONES = 8;
Montauk::ThermalInfo thermal_zones[MAX_THERMAL_ZONES];
int thermal_zone_count;
uint64_t thermal_last_poll;
Rect temp_icon_rect;
int screen_w, screen_h;
uint32_t* background_cache;
int background_cache_pitch;
bool background_cache_dirty;
// IDs of external windows we've sent a close event to but that haven't
// been destroyed yet by their owning process. Prevents the poll loop