Function

Gtk-3.0Gtkinit_with_argsSince 2.6

  • 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.

    Parameters

    • argv: string[]

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

    • parameter_string: string

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

    • entries: OptionEntry[]

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

    • Optionaltranslation_domain: string

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

    Returns [boolean, string[]]

    true if the commandline arguments (if any) were valid and if the windowing system has been successfully initialized, false otherwise

    2.6