mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-25 16:52:29 +00:00
The Settings window rendered fine but its controls only mutated the app's local
settings_data_t -- nothing was ever wired to the running system, so toggling
options did nothing ("not working").
- Appearance: "Show wallpaper grid overlay" now calls gui_desktop_set_grid()
live; the desktop grid shows/hides immediately.
- Input: "Show seconds in taskbar clock" now calls gui_desktop_set_clock_seconds();
the taskbar clock switches between HH:MM and HH:MM:SS.
- Power: the CPUFreq governor radios now call cpufreq_set_governor() (mapping the
UI order to the enum), and Apply/Defaults push all preferences to the system.
- The app seeds its controls from live state on open (grid/clock/governor), so it
reflects reality instead of hard-coded defaults.
Also add public gui_desktop_set_grid/get_grid and set/get_clock_seconds, and
give Settings a dedicated event handler that frees its state on close (the
shared app_forward_event leaked it).
Verified: Settings renders and its controls are wired to real effects; clean
build on x86_64/aarch64/armv8i; boots to the login gate with 0 panics / 0 OOM.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Fh5z6V7nGPbHvqVG5p4CXX
47 lines
1.4 KiB
C
47 lines
1.4 KiB
C
#ifndef _GUI_DESKTOP_H
|
|
#define _GUI_DESKTOP_H
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#define GUI_TASKBAR_HEIGHT 32
|
|
#define GUI_DESKTOP_ICON_W 72
|
|
#define GUI_DESKTOP_ICON_H 64
|
|
|
|
void gui_desktop_init(void);
|
|
|
|
void gui_desktop_render_background(void);
|
|
|
|
// Drop the cached wallpaper so the next background render repaints it. Needed
|
|
// when the resolution changes or the framebuffer is handed to another owner.
|
|
void gui_desktop_invalidate_background(void);
|
|
void gui_desktop_render_icons(void);
|
|
void gui_desktop_render_taskbar(void);
|
|
void gui_desktop_render_start_menu(void);
|
|
void gui_desktop_render_context_menu(void);
|
|
|
|
void gui_desktop_toggle_start_menu(void);
|
|
bool gui_desktop_is_start_menu_open(void);
|
|
void gui_desktop_open_context_menu(int mx, int my);
|
|
void gui_desktop_close_menus(void);
|
|
|
|
// Returns true if the click was consumed by desktop chrome (taskbar, menus,
|
|
// icons) rather than falling through to the window manager.
|
|
bool gui_desktop_handle_click(int mx, int my);
|
|
|
|
// Height of the area windows may occupy (screen minus taskbar).
|
|
int gui_desktop_workarea_height(void);
|
|
|
|
// Wallpaper grid overlay (also toggled from the desktop context menu).
|
|
void gui_desktop_set_grid(bool on);
|
|
bool gui_desktop_get_grid(void);
|
|
|
|
// Taskbar clock: show seconds (HH:MM:SS) instead of HH:MM.
|
|
void gui_desktop_set_clock_seconds(bool on);
|
|
bool gui_desktop_get_clock_seconds(void);
|
|
|
|
void gui_desktop_request_exit(void);
|
|
int gui_desktop_run(void);
|
|
|
|
#endif // _GUI_DESKTOP_H
|