GLib.OptionEntry¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| arg | GLib.OptionArg | r/w | The type of the option, as a GLib.OptionArg | 
| arg_data | object | r/w | If the arg type is GLib.OptionArg.CALLBACK, then arg_data must point to aGLib.OptionArgFunccallback function, which will be called to handle the extra argument. Otherwise, arg_data is a pointer to a location to store the value, the required type of the location depends on the arg type:   *GLib.OptionArg.NONE:bool*GLib.OptionArg.STRING:str*GLib.OptionArg.INT:int*GLib.OptionArg.FILENAME:str*GLib.OptionArg.STRING_ARRAY:str*GLib.OptionArg.FILENAME_ARRAY:str*GLib.OptionArg.DOUBLE:floatIf arg type isGLib.OptionArg.STRINGorGLib.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_ARRAYorGLib.OptionArg.FILENAME_ARRAY, the data should be freed usingGLib.strfreev(). | 
| arg_description | str | r/w | The placeholder to use for the extra argument parsed by the option in --helpoutput. The arg_description is translated using the translate_func of the group, seeGLib.OptionGroup.set_translation_domain(). | 
| description | str | r/w | the description for the option in --helpoutput. The description is translated using the translate_func of the group, seeGLib.OptionGroup.set_translation_domain(). | 
| flags | int | r/w | Flags from GLib.OptionFlags | 
| long_name | str | r/w | The long name of an option can be used to specify it in a commandline as --long_name. Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also possible to specify the option as--groupname-long_name. | 
| short_name | int | r/w | If an option has a short name, it can be specified -short_namein a commandline. short_name must be  a printable ASCII character different from ‘-’, or zero if the option has no short name. | 
Methods¶
None
Details¶
- 
class GLib.OptionEntry¶
- A - GLib.OptionEntrystruct defines a single option. To have an effect, they must be added to a- GLib.OptionGroupwith- GLib.OptionContext.add_main_entries() or- GLib.OptionGroup.add_entries().