#pragma once #include #include #include #include class GAction; class GKeyEvent; class GEventLoop; class GMenuBar; class GApplication { public: static GApplication& the(); GApplication(int argc, char** argv); ~GApplication(); int exec(); void quit(int); void set_menubar(OwnPtr&&); GAction* action_for_key_event(const GKeyEvent&); void register_shortcut_action(Badge, GAction&); void unregister_shortcut_action(Badge, GAction&); private: OwnPtr m_event_loop; OwnPtr m_menubar; HashMap m_shortcut_actions; };