ladybird/Libraries/LibGUI/GDesktop.h
Andreas Kling 1c0669f010 LibDraw: Introduce (formerly known as SharedGraphics.)
Instead of LibGUI and WindowServer building their own copies of the drawing
and graphics code, let's it in a separate LibDraw library.

This avoids building the code twice, and will encourage better separation
of concerns. :^)
2019-07-18 10:18:16 +02:00

26 lines
493 B
C++

#pragma once
#include <AK/AKString.h>
#include <AK/Badge.h>
#include <AK/Function.h>
#include <LibDraw/Rect.h>
class GWindowServerConnection;
class GDesktop {
public:
static GDesktop& the();
GDesktop();
String wallpaper() const;
bool set_wallpaper(const StringView& path);
Rect rect() const { return m_rect; }
void did_receive_screen_rect(Badge<GWindowServerConnection>, const Rect&);
Function<void(const Rect&)> on_rect_change;
private:
Rect m_rect;
};