gobject.Flags.Flags Class Reference

List of all members.

Detailed Description

Description The GLib type system provides fundamental types for enumeration and flags types.

(Flags types are like enumerations, but allow their values to be combined by bitwise or). A registered enumeration or flags type associates a name and a nickname with each allowed value, and the methods g_enum_get_value_by_name(), g_enum_get_value_by_nick(), g_flags_get_value_by_name() and g_flags_get_value_by_nick() can look up values by their name or nickname. When an enumeration or flags type is registered with the GLib type system, it can be used as value type for object properties, using g_param_spec_enum() or g_param_spec_flags(). GObject ships with a utility called glib-mkenums that can construct suitable type registration functions from C enumeration definitions.


Public Member Functions

GFlagsValuegetFlagsStruct ()
 this (GFlagsValue *gFlagsValue)
 Sets our main struct and passes it to the parent class.

Static Public Member Functions

static Flags getFirstValue (GFlagsClass *flagsClass, uint value)
 Returns the first GFlagsValue which is set in value.
static Flags getValueByName (GFlagsClass *flagsClass, char[] name)
 Looks up a GFlagsValue by name.
static Flags getValueByNick (GFlagsClass *flagsClass, char[] nick)
 Looks up a GFlagsValue by nickname.
static GType registerStatic (char[] name, Flags _StaticValues)
 Registers a new static flags type with the name name.
static void completeTypeInfo (GType type, GTypeInfo *info, Flags _Values)
 This function is meant to be called from the complete_type_info() function of a GTypePlugin implementation, see the example for g_enumeration_complete_type_info() above.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GFlagsValuegFlagsValue
 the main Gtk struct


Constructor & Destructor Documentation

gobject.Flags.Flags.this ( GFlagsValue gFlagsValue  ) 

Sets our main struct and passes it to the parent class.


Member Function Documentation

static void gobject.Flags.Flags.completeTypeInfo ( GType  type,
GTypeInfo info,
Flags  _Values 
) [static]

This function is meant to be called from the complete_type_info() function of a GTypePlugin implementation, see the example for g_enumeration_complete_type_info() above.

g_flags_type: the type identifier of the type being completed info: the GTypeInfo struct to be filled in _values: See Also GParamSpecEnum, GParamSpecFlags, g_param_spec_enum(), g_param_spec_flags(), glib-mkenums

static Flags gobject.Flags.Flags.getFirstValue ( GFlagsClass flagsClass,
uint  value 
) [static]

Returns the first GFlagsValue which is set in value.

flags_class: a GFlagsClass value: the value Returns: the first GFlagsValue which is set in value, or NULL if none is set

GFlagsValue* gobject.Flags.Flags.getFlagsStruct (  ) 

void* gobject.Flags.Flags.getStruct (  )  [protected]

the main Gtk struct as a void*

static Flags gobject.Flags.Flags.getValueByName ( GFlagsClass flagsClass,
char[]  name 
) [static]

Looks up a GFlagsValue by name.

flags_class: a GFlagsClass name: the name to look up Returns: the GFlagsValue with name name, or NULL if there is no flag with that name

static Flags gobject.Flags.Flags.getValueByNick ( GFlagsClass flagsClass,
char[]  nick 
) [static]

Looks up a GFlagsValue by nickname.

flags_class: a GFlagsClass nick: the nickname to look up Returns: the GFlagsValue with nickname nick, or NULL if there is no flag with that nickname

static GType gobject.Flags.Flags.registerStatic ( char[]  name,
Flags  _StaticValues 
) [static]

Registers a new static flags type with the name name.

It is normally more convenient to let glib-mkenums generate a my_flags_get_type() function from a usual C enumeration definition than to write one yourself using g_flags_register_static(). name: A nul-terminated string used as the name of the new type. _static_values: Returns: The new type identifier.


Member Data Documentation

GFlagsValue* gobject.Flags.Flags.gFlagsValue [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo