summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHüseyin ASLITÜRK <asliturk@hotmail.com>2020-03-29 13:32:34 +0300
committerAndreas Kling <kling@serenityos.org>2020-03-29 19:36:37 +0200
commitf88b90f6fd85b67f0515fb00ed40b94bfa2b59a3 (patch)
tree4622ffab16fc780c1f9750e05105892ea3ce025d
parentadf524015a28eb641317332dcd93fde4adf16fba (diff)
downloadserenity-f88b90f6fd85b67f0515fb00ed40b94bfa2b59a3.zip
LibGUI: Desktop, add methods for set background color and wallpaper mode
-rw-r--r--Libraries/LibGUI/Desktop.cpp10
-rw-r--r--Libraries/LibGUI/Desktop.h4
2 files changed, 14 insertions, 0 deletions
diff --git a/Libraries/LibGUI/Desktop.cpp b/Libraries/LibGUI/Desktop.cpp
index 88f00cbb20..7fbe91aae6 100644
--- a/Libraries/LibGUI/Desktop.cpp
+++ b/Libraries/LibGUI/Desktop.cpp
@@ -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));
diff --git a/Libraries/LibGUI/Desktop.h b/Libraries/LibGUI/Desktop.h
index fd2dd58664..e6b041a156 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);