mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
This is useful for static locals that never need to be destroyed:
Thing& Thing::the()
{
static Eternal<Thing> the;
return the;
}
The object will be allocated in data segment memory and will never have
its destructor invoked.
16 lines
247 B
C++
16 lines
247 B
C++
#pragma once
|
|
|
|
#include <AK/AKString.h>
|
|
#include <SharedGraphics/Rect.h>
|
|
|
|
class GDesktop {
|
|
public:
|
|
static GDesktop& the();
|
|
GDesktop();
|
|
|
|
String wallpaper() const;
|
|
bool set_wallpaper(const String& path);
|
|
|
|
private:
|
|
Rect m_rect;
|
|
};
|