Main.initWithArgs

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

struct Main
static
bool
initWithArgs

Parameters

argv string[]

Address of the argv parameter of main(), or %NULL. Any options understood by GTK+ are stripped before return.

parameterString string

a string which is displayed in the first line of --help output, after programname [OPTION...]

entries GOptionEntry[]

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

translationDomain string

a translation domain to use for translating the --help output for the options in @entries and the @parameter_string with gettext(), or %NULL

Return Value

Type: bool

%TRUE if the commandline arguments (if any) were valid and if the windowing system has been successfully initialized, %FALSE otherwise

Throws

GException on failure.

Meta