mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 09:22:44 +00:00 
			
		
		
		
	 a22774ee3f
			
		
	
	
		a22774ee3f
		
	
	
	
	
		
			
			I originally thought I would do this inside WindowServer, but let's try to make it as a standalone app that communicates with WindowServer instead. That will allow us to use LibGUI. :^)
		
			
				
	
	
		
			25 lines
		
	
	
	
		
			470 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
	
		
			470 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #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;
 | |
| };
 |