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. Since 2.6

class Main
static
int
initWithArgs

Parameters

argv string[]

Address of the argv parameter of main(), or NULL. Any options understood by GTK+ are stripped before return. [array length=argc]inout[allow-none]

parameterString string

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

entries GOptionEntry[]

a NULL-terminated array of GOptionEntrys describing the options of your program. [array zero-terminated=1]

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: int

TRUE if the windowing system has been successfully initialized, FALSE otherwise

Throws

GException on failure.

Meta