#pragma once #include #include #include #include class GAction; class GKeyEvent; class GEventLoop; class GMenuBar; class Point; class GApplication { public: static GApplication& the(); GApplication(int argc, char** argv); ~GApplication(); int exec(); void quit(int = 0); void set_menubar(OwnPtr&&); GAction* action_for_key_event(const GKeyEvent&); void register_global_shortcut_action(Badge, GAction&); void unregister_global_shortcut_action(Badge, GAction&); void show_tooltip(const String&, const Point& screen_location); void hide_tooltip(); private: OwnPtr m_event_loop; OwnPtr m_menubar; HashMap m_global_shortcut_actions; class TooltipWindow; TooltipWindow* m_tooltip_window { nullptr }; };