From f88b90f6fd85b67f0515fb00ed40b94bfa2b59a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=BCseyin=20ASLIT=C3=9CRK?= Date: Sun, 29 Mar 2020 13:32:34 +0300 Subject: [PATCH] LibGUI: Desktop, add methods for set background color and wallpaper mode --- Libraries/LibGUI/Desktop.cpp | 10 ++++++++++ Libraries/LibGUI/Desktop.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/Libraries/LibGUI/Desktop.cpp b/Libraries/LibGUI/Desktop.cpp index 88f00cbb201..7fbe91aae68 100644 --- a/Libraries/LibGUI/Desktop.cpp +++ b/Libraries/LibGUI/Desktop.cpp @@ -54,6 +54,16 @@ void Desktop::did_receive_screen_rect(Badge, 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)); diff --git a/Libraries/LibGUI/Desktop.h b/Libraries/LibGUI/Desktop.h index fd2dd586647..e6b041a1569 100644 --- a/Libraries/LibGUI/Desktop.h +++ b/Libraries/LibGUI/Desktop.h @@ -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);