GDesktop.h 491 B

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <AK/String.h>
  3. #include <AK/Badge.h>
  4. #include <AK/Function.h>
  5. #include <LibDraw/Rect.h>
  6. class GWindowServerConnection;
  7. class GDesktop {
  8. public:
  9. static GDesktop& the();
  10. GDesktop();
  11. String wallpaper() const;
  12. bool set_wallpaper(const StringView& path);
  13. Rect rect() const { return m_rect; }
  14. void did_receive_screen_rect(Badge<GWindowServerConnection>, const Rect&);
  15. Function<void(const Rect&)> on_rect_change;
  16. private:
  17. Rect m_rect;
  18. };