ladybird/Libraries/LibGUI/GDesktop.h
Robin Burchell 2177594c96 Port LibGUI to use CIPCClientSideConnection
As a consequence, move to use an explicit handshake() method rather than
calling virtuals from the constructor. This seemed to not bother
AClientConnection, but LibGUI crashes (rightfully) because of it.
2019-07-17 20:16:44 +02:00

25 lines
500 B
C++

#pragma once
#include <AK/AKString.h>
#include <AK/Badge.h>
#include <AK/Function.h>
#include <SharedGraphics/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;
};