#include "gui/app.hpp" #include #include "gui/window.hpp" namespace effector { int runGui(const Options& initial, int argc, char** argv) { // Our own parser already consumed argv, so GTK must not see it. (void)argc; (void)argv; auto app = Gtk::Application::create("org.effector.Effector", Gio::Application::Flags::NON_UNIQUE); app->signal_startup().connect([] { // An installed Effector finds its icon in the hicolor theme; one run // straight from the build tree falls back to the copy in the sources. const char* icon = "org.effector.Effector"; auto theme = Gtk::IconTheme::get_for_display(Gdk::Display::get_default()); if (!theme->has_icon(icon)) theme->add_search_path(EFFECTOR_SOURCE_ICON_DIR); Gtk::Window::set_default_icon_name(icon); }); return app->make_window_and_run(0, nullptr, initial); } } // namespace effector