draft shutdown event

This commit is contained in:
yggverse 2024-08-06 03:39:31 +03:00
parent 37f109bec4
commit b891678dbc
2 changed files with 29 additions and 1 deletions

View File

@ -24,7 +24,7 @@ namespace app
Browser::HEIGHT
);
// Init requirements
// Init components
this->header = new browser::Header(
this
);
@ -42,5 +42,25 @@ namespace app
this->gtk
)
);
// Connect signals
g_signal_connect(
G_APPLICATION(
this->application
),
"shutdown",
G_CALLBACK(
_shutdown
),
NULL
);
}
// Events
void Browser::_shutdown(
GtkApplication *application
) {
// @TODO save session, clean cache, etc
g_print("Shutdown..\n");
}
}

View File

@ -31,9 +31,17 @@ namespace app
const guint WIDTH = 640;
const guint HEIGHT = 480;
// Constructor
Browser(
GtkApplication *application
);
private:
// Events
static void _shutdown(
GtkApplication *application
);
};
};