mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 19:59:17 +00:00
Port all apps to GApplication.
This commit is contained in:
@@ -2,8 +2,18 @@
|
||||
#include <LibGUI/GEventLoop.h>
|
||||
#include <LibGUI/GMenuBar.h>
|
||||
|
||||
static GApplication* s_the;
|
||||
|
||||
GApplication& GApplication::the()
|
||||
{
|
||||
ASSERT(s_the);
|
||||
return *s_the;
|
||||
}
|
||||
|
||||
GApplication::GApplication(int argc, char** argv)
|
||||
{
|
||||
ASSERT(!s_the);
|
||||
s_the = this;
|
||||
m_event_loop = make<GEventLoop>();
|
||||
}
|
||||
|
||||
@@ -16,6 +26,11 @@ int GApplication::exec()
|
||||
return m_event_loop->exec();
|
||||
}
|
||||
|
||||
void GApplication::exit(int exit_code)
|
||||
{
|
||||
m_event_loop->exit(exit_code);
|
||||
}
|
||||
|
||||
void GApplication::set_menubar(OwnPtr<GMenuBar>&& menubar)
|
||||
{
|
||||
m_menubar = move(menubar);
|
||||
|
||||
Reference in New Issue
Block a user