2020-01-18 09:38:21 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-01-18 09:38:21 +01:00
|
|
|
*/
|
|
|
|
|
2019-03-21 15:54:19 +01:00
|
|
|
#pragma once
|
|
|
|
|
2019-04-03 19:38:44 +02:00
|
|
|
#include <AK/Function.h>
|
2020-01-10 19:06:00 +03:00
|
|
|
#include <AK/String.h>
|
2020-02-16 09:17:49 +01:00
|
|
|
#include <LibGUI/Forward.h>
|
2020-02-06 12:04:00 +01:00
|
|
|
#include <LibGfx/Rect.h>
|
2019-03-21 15:54:19 +01:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
namespace GUI {
|
2019-04-03 17:22:14 +02:00
|
|
|
|
2020-02-02 15:07:41 +01:00
|
|
|
class Desktop {
|
2019-03-21 15:54:19 +01:00
|
|
|
public:
|
2020-02-02 15:07:41 +01:00
|
|
|
static Desktop& the();
|
|
|
|
Desktop();
|
2019-03-21 15:54:19 +01:00
|
|
|
|
2020-03-29 13:32:34 +03:00
|
|
|
void set_background_color(const StringView& background_color);
|
|
|
|
|
|
|
|
void set_wallpaper_mode(const StringView& mode);
|
|
|
|
|
2019-03-21 15:54:19 +01:00
|
|
|
String wallpaper() const;
|
2020-08-14 21:17:46 +01:00
|
|
|
bool set_wallpaper(const StringView& path, bool save_config = true);
|
2019-03-21 15:54:19 +01:00
|
|
|
|
2020-06-10 10:57:59 +02:00
|
|
|
Gfx::IntRect rect() const { return m_rect; }
|
2020-08-13 16:02:59 +02:00
|
|
|
|
2021-05-09 00:07:44 +02:00
|
|
|
int taskbar_height() const { return 27; }
|
2020-08-13 16:02:59 +02:00
|
|
|
|
2020-06-10 10:57:59 +02:00
|
|
|
void did_receive_screen_rect(Badge<WindowServerConnection>, const Gfx::IntRect&);
|
2019-04-03 17:22:14 +02:00
|
|
|
|
2019-03-21 15:54:19 +01:00
|
|
|
private:
|
2020-06-10 10:57:59 +02:00
|
|
|
Gfx::IntRect m_rect;
|
2019-03-21 15:54:19 +01:00
|
|
|
};
|
2020-02-02 15:07:41 +01:00
|
|
|
|
|
|
|
}
|