Re: gtk_init() command-line args



Hi Michael,

Thanks very much for the reference! Looks like all of the arguments of interest to gtk begin with '--', so anything beginning with only a single '-' ought to be safe from gtk_init() harvesting.

Roger

On Wed, 16 May 2018, Michael Gratton wrote:

On Wed, May 16, 2018 at 7:34 AM, rbd <rbd soest hawaii edu> wrote:
Can someone point me to an official gtk3 documentation source which clearly lists all of the command-line arguments parsed and then stripped from argv[] by gtk_init()?

The "Running and debugging GTK+ Applications" document is the only thing I know of: <https://developer.gnome.org/gtk3/stable/gtk-running.html>. They are mostly debugging and legacy X11 workarounds, it seems. There are also similar docs for GLib and GIO, but those don't mess with your argv, AFAIK.

Of course, you really should be using G[tk]Application, which will call this for you, and aso provides a structured way of handing command line arg parsing. ;) Especially since that (IIRC) the plan for GTK+4 is to remove all GTK-specific command line args anyway.

//Mike

--
⊨ Michael Gratton, Percept Wrangler.
? <http://mjog.vee.net/>



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