GLib.OptionEntry¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
arg |
r/w |
The type of the option, as a |
|
arg_data |
r/w |
If the arg type is |
|
arg_description |
r/w |
The placeholder to use for the extra argument parsed by the option in |
|
description |
r/w |
the description for the option in |
|
flags |
r/w |
Flags from |
|
long_name |
r/w |
The long name of an option can be used to specify it in a commandline as |
|
short_name |
r/w |
If an option has a short name, it can be specified |
Methods¶
None
Details¶
- class GLib.OptionEntry¶
-
If arg type is
GLib.OptionArg.STRING
orGLib.OptionArg.FILENAME
, the location will contain a newly allocated string if the option was given. That string needs to be freed by the callee usingGLib.free
(). Likewise if arg type isGLib.OptionArg.STRING_ARRAY
orGLib.OptionArg.FILENAME_ARRAY
, the data should be freed usingGLib.strfreev
(). AGLib.OptionEntry
struct defines a single option. To have an effect, they must be added to aGLib.OptionGroup
withGLib.OptionContext.add_main_entries
() orGLib.OptionGroup.add_entries
().
-