I’m trying to build initial application class that has Window as member.
As this operation happened on construct, the app not activated yet at this point.
GTK has not been initialized. Call `gtk::init` first.
So the question: can I init the app by Gtk::init() before launch application with:
App::new()
Seems App::new() method contain this ‘launcher’ so it will be called twice?
How to safely init application only once, or there is some lock for multiple init call?
Maybe that’s dependent from wrapper implementation.
In my case, gtk::init() has following documentation:
Tries to initialize GTK.
Call either this function or Application::new before using any other GTK functions.
Note that this function calls gtk_init_check() rather than gtk_init(), so will not cause the program to terminate if GTK could not be initialized. Instead, an Ok is returned if the windowing system was successfully initialized otherwise an Err is returned.