flagsRegisterStatic

fngobject.types.GType flagsRegisterStatic(string name, gobject.flags_value.FlagsValue constStaticValues)

Registers a new static flags type with the name name.

It is normally more convenient to let [glib-mkenums][glib-mkenums] generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using [gobject.global.flagsRegisterStatic].

Parameters

nameA nul-terminated string used as the name of the new type.
constStaticValuesAn array of #GFlagsValue structs for the possible flags values. The array is terminated by a struct with all members being 0. GObject keeps a reference to the data, so it cannot be stack-allocated.

Returns

The new type identifier.