init_with_args

function init_with_args(argv:[String], parameter_string:String, entries:[GLib.OptionEntry], translation_domain:String):Boolean {
    // Gjs wrapper for gtk_init_with_args()
}

This function does the same work as init_check. Additionally, it allows you to add your own commandline options, and it automatically generates nicely formatted <option>--help</option> output. Note that your program will be terminated after writing out the help output.

Since 2.6

argv

Address of the <parameter>argv</parameter> parameter of main(), or null. Any options understood by GTK+ are stripped before return.

parameter_string

a string which is displayed in the first line of <option>--help</option> output, after <literal><replaceable>programname</replaceable> [OPTION...]</literal>

entries

a null-terminated array of #GOptionEntrys describing the options of your program

translation_domain

a translation domain to use for translating the <option>--help</option> output for the options in entries and the parameter_string with gettext(), or null

Returns

true if the windowing system has been successfully initialized, false otherwise