summaryrefslogtreecommitdiff
path: root/LibGUI/GDesktop.h
blob: ca90ace83c3b55375069835c08bf0b442e001b7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <AK/AKString.h>
#include <AK/Badge.h>
#include <AK/Function.h>
#include <SharedGraphics/Rect.h>

class GEventLoop;

class GDesktop {
public:
    static GDesktop& the();
    GDesktop();

    String wallpaper() const;
    bool set_wallpaper(const String& path);

    Rect rect() const { return m_rect; }
    void did_receive_screen_rect(Badge<GEventLoop>, const Rect&);

    Function<void(const Rect&)> on_rect_change;

private:
    Rect m_rect;
};