Class (GI Struct)

GLib-2.0GLibOptionGroup

A GLib.OptionGroup struct defines the options in a single group. The struct has only private fields and should not be directly accessed.

All options in a group share the same translation function. Libraries which need to parse commandline options are expected to provide a function for getting a GLib.OptionGroup holding their options, which the application can then add to its GLib.OptionContext.

Index

Constructors

Properties

Methods

  • Sets the function which is used to translate user-visible strings, for --help output. Different groups can use different GTranslateFuncs. If func is null, strings are not translated.

    If you are using gettext(), you only need to set the translation domain, see g_option_group_set_translation_domain().

    Parameters

    Returns void

  • A convenience function to use gettext() for translating user-visible strings.

    Parameters

    • domain: string

      the domain to use

    Returns void

  • Decrements the reference count of group by one. If the reference count drops to 0, the group will be freed. and all memory allocated by the group is released.

    Returns void