init_with_args
Description:
public InitError init_with_args (
ref string[]? argv,
string? parameter_string,
OptionEntry[]? entries,
string? translation_domain)
throws Error
This function does the same work as init.
Additionally, it allows you to add your own command line options, and it automatically generates nicely formatted --help output.
Note that your program will be terminated after writing out the help output. Also note that, in case of error, the error message will be placed
inside error instead of being printed on the display.
Just like init, if this function returns an error code then any subsequent call to
any other Clutter API will result in undefined behaviour - including segmentation faults.
Parameters:
| argv |
a pointer to the array of command line arguments |
| parameter_string |
a string which is displayed in the first line of --help output, after programname [OPTION...]
|
| entries |
a null terminated array of OptionEntrys describing the options
of your program |
| translation_domain |
a translation domain to use for translating the --help output for the options in entries with gettext
, or null
|
| argc |
a pointer to the number of command line arguments |
Returns:
| SUCCESS if Clutter has been successfully initialised, or other
values or InitError in case of error. |