looper/backends/ui/gtk/main.cpp

21 lines
No EOL
602 B
C++

#include "main.h"
#include "main_window.hpp"
std::string GtkBackend::get_id() {
return "gtk";
}
std::string GtkBackend::get_name() {
return "GTK frontend";
}
int GtkBackend::run(std::vector<std::string> realArgs, int argc, char **argv) {
int ret = UIBackend::run(realArgs, argc, argv);
if (ret != 0) {
return ret;
}
auto app = Gtk::Application::create("com.experimentalcraft.Looper");
auto *win = new MainWindow(playback);
app->signal_startup().connect([=]() {
app->add_window(*win);
win->set_visible();
});
return app->run(argc, argv);
}