GtkApplication and argc/arv

I'm trying to wrap GtkApplication for gtkmm but I can't really do that
until I understand how it's meant to be used.

In general, I find the documentation lacks overview and advice, partly
because it's spread between GApplication and GtkApplication and mentions
some concepts without explaining them first. So I have some questions.

Are we still meant to call gtk_init(&argc, &argv) when using
GtkApplication, which takes argc/argv again via g_application_run(). Or
is gtk_init() then superfluous?

Mathias mentioned that gtk_init(NULL, NULL) is best anyway, though I
don't understand why:

How should we use GOptionContext to parse command line arguments from
argc/argv when using GtkApplication. Is this the ideal way, using the
command-line signal?
It seems a little long-winded.

murrayc murrayc com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]