[ Version ( since = "0.2" ) ]
public InitError init_with_args (ref unowned 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.



a pointer to the array of command line arguments


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


a null terminated array of OptionEntrys describing the options of your program


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


a pointer to the number of command line arguments


SUCCESS if Clutter has been successfully initialised, or other values or InitError in case of error.

Namespace: Clutter
Package: clutter-1.0