init_with_args


Description:


[ 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 <option>--help </option> 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 throws 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 <option>--help</option> output, after <literal><replaceable >programname</replaceable> [OPTION...]</literal>

entries

a null terminated array of OptionEntry<!-- -->s describing the options of your program

translation_domain

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

argc

a pointer to the number of command line arguments

Returns:

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


Namespace: Clutter
Package: clutter-1.0