serenity/Widgets/AbstractScreen.cpp

33 lines
502 B
C++
Raw Normal View History

2018-10-10 15:12:38 +02:00
#include "AbstractScreen.h"
#include "EventLoop.h"
#include "Event.h"
#include "Widget.h"
#include <AK/Assertions.h>
static AbstractScreen* s_the;
void AbstractScreen::initialize()
{
s_the = nullptr;
}
2018-10-10 15:12:38 +02:00
AbstractScreen& AbstractScreen::the()
{
ASSERT(s_the);
return *s_the;
}
AbstractScreen::AbstractScreen(unsigned width, unsigned height)
2018-10-10 16:49:36 +02:00
: Object(nullptr)
, m_width(width)
2018-10-10 15:12:38 +02:00
, m_height(height)
{
ASSERT(!s_the);
s_the = this;
}
AbstractScreen::~AbstractScreen()
{
}