mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
switch to gtkmm
This commit is contained in:
parent
058aabce26
commit
d3e894e0ac
28 changed files with 50 additions and 1413 deletions
45
src/main.cpp
45
src/main.cpp
|
|
@ -1,52 +1,15 @@
|
|||
#include "main.h"
|
||||
|
||||
void activate(
|
||||
GtkApplication *application
|
||||
) {
|
||||
// Init default component
|
||||
new app::Browser(
|
||||
application
|
||||
);
|
||||
}
|
||||
|
||||
int main(
|
||||
int argc,
|
||||
char *argv[]
|
||||
char* argv[]
|
||||
) {
|
||||
// Create a new application
|
||||
GtkApplication *application = gtk_application_new(
|
||||
NULL,
|
||||
G_APPLICATION_DEFAULT_FLAGS
|
||||
auto app = Gtk::Application::create(
|
||||
"Yoda"
|
||||
);
|
||||
|
||||
// Connect events
|
||||
g_signal_connect(
|
||||
G_APPLICATION(
|
||||
application
|
||||
),
|
||||
"activate",
|
||||
G_CALLBACK(
|
||||
activate
|
||||
),
|
||||
NULL
|
||||
);
|
||||
|
||||
// Run the application
|
||||
int status = g_application_run(
|
||||
G_APPLICATION(
|
||||
application
|
||||
),
|
||||
return app->make_window_and_run<app::Browser>(
|
||||
argc,
|
||||
argv
|
||||
);
|
||||
|
||||
// Clean up
|
||||
g_object_unref(
|
||||
G_APPLICATION(
|
||||
application
|
||||
)
|
||||
);
|
||||
|
||||
// Result
|
||||
return status;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue