Package: gio

Function g-application-add-main-option

Lambda List

g-application-add-main-option (application long short flags arg desc arg-desc)

Arguments

application -- a g-application instance
long -- a string with the long name of an option used to specify it in a command line
short -- a printable ASCII character with the short name of an option
flags -- the g-option-flags flags
arg -- a g-option-arg value for the type of the option
desc -- a string with the description for the option in --help output
arg-desc -- a string with the placeholder to use for the extra argument parsed by the option in --help output

Details

Adds an option to be handled by the application.

Calling this function is the equivalent of calling the g-application-add-main-option-entries function with a single option entry that has its the arg-data field set to nil.

The parsed arguments will be packed into a g-variant-dict parameter which is passed to the "handle-local-options" signal handler. If the :handles-command-line flag is set, then it will also be sent to the primary instance. See the g-application-add-main-option-entries function for more details.

See the g-option-group-add-entries function for more documentation of the arguments.
 

See also

2021-9-9