LibGUI: Desktop, add methods for set background color and wallpaper mode
This commit is contained in:
parent
adf524015a
commit
f88b90f6fd
Notes:
sideshowbarker
2024-07-19 08:04:21 +09:00
Author: https://github.com/asliturk Commit: https://github.com/SerenityOS/serenity/commit/f88b90f6fd8 Pull-request: https://github.com/SerenityOS/serenity/pull/1526 Reviewed-by: https://github.com/awesomekling
2 changed files with 14 additions and 0 deletions
|
@ -54,6 +54,16 @@ void Desktop::did_receive_screen_rect(Badge<WindowServerConnection>, const Gfx::
|
|||
on_rect_change(rect);
|
||||
}
|
||||
|
||||
void Desktop::set_background_color(const StringView& background_color)
|
||||
{
|
||||
WindowServerConnection::the().post_message(Messages::WindowServer::SetBackgroundColor(background_color));
|
||||
}
|
||||
|
||||
void Desktop::set_wallpaper_mode(const StringView& mode)
|
||||
{
|
||||
WindowServerConnection::the().post_message(Messages::WindowServer::SetWallpaperMode(mode));
|
||||
}
|
||||
|
||||
bool Desktop::set_wallpaper(const StringView& path)
|
||||
{
|
||||
WindowServerConnection::the().post_message(Messages::WindowServer::AsyncSetWallpaper(path));
|
||||
|
|
|
@ -38,6 +38,10 @@ public:
|
|||
static Desktop& the();
|
||||
Desktop();
|
||||
|
||||
void set_background_color(const StringView& background_color);
|
||||
|
||||
void set_wallpaper_mode(const StringView& mode);
|
||||
|
||||
String wallpaper() const;
|
||||
bool set_wallpaper(const StringView& path);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue