2019-03-21 17:54:19 +03:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <AK/AKString.h>
|
2019-04-03 18:22:14 +03:00
|
|
|
#include <AK/Badge.h>
|
2019-04-03 20:38:44 +03:00
|
|
|
#include <AK/Function.h>
|
2019-07-18 11:15:00 +03:00
|
|
|
#include <LibDraw/Rect.h>
|
2019-03-21 17:54:19 +03:00
|
|
|
|
2019-07-17 19:28:30 +03:00
|
|
|
class GWindowServerConnection;
|
2019-04-03 18:22:14 +03:00
|
|
|
|
2019-03-21 17:54:19 +03:00
|
|
|
class GDesktop {
|
|
|
|
public:
|
|
|
|
static GDesktop& the();
|
2019-04-03 17:50:08 +03:00
|
|
|
GDesktop();
|
2019-03-21 17:54:19 +03:00
|
|
|
|
|
|
|
String wallpaper() const;
|
2019-06-02 15:58:02 +03:00
|
|
|
bool set_wallpaper(const StringView& path);
|
2019-03-21 17:54:19 +03:00
|
|
|
|
2019-04-03 18:22:14 +03:00
|
|
|
Rect rect() const { return m_rect; }
|
2019-07-17 19:28:30 +03:00
|
|
|
void did_receive_screen_rect(Badge<GWindowServerConnection>, const Rect&);
|
2019-04-03 18:22:14 +03:00
|
|
|
|
2019-04-03 20:38:44 +03:00
|
|
|
Function<void(const Rect&)> on_rect_change;
|
|
|
|
|
2019-03-21 17:54:19 +03:00
|
|
|
private:
|
|
|
|
Rect m_rect;
|
|
|
|
};
|