Xfce Foundation Classes
Main Page | Index | Namespace List | Alphabetical List | Class List | File List

# Xfc::G::TypeInstance Class Reference

Abstract base class for GTK+ interfaces and objects. More...

`#include <xfc/glib/type.hh>`

Inheritance diagram for Xfc::G::TypeInstance:

List of all members.

## Public Member Functions

Accessors

- GTypeInstance * g_type_instance () const
    Get a pointer to the GTypeInstance structure.
- bool is_a (GType is_a_type) const
    If is_a_type is a derivable type, check whether the instance type is a descendant of is_a_type, or if is_a_type is an interface, check whether the instance type conforms to it.
- GType type () const
    Get the type ID for the instance.
- String type_name () const
    Get the type name for the instance.

Methods

- void add_interface (GType interface_type, GInterfaceInitFunc interface_init)
    Adds the static interface_type to this TypeInstance.

## Static Public Member Functions

Methods

- void add_interface (GType instance_type, GType interface_type, GInterfaceInitFunc interface_init)
    Adds the static interface_type to the instantiable instance_type.
- GType register_type (GType parent_type, GClassInitFunc class_init)
    Registers a new static XFC type derived from parent_type.

## Protected Member Functions

- TypeInstance ()
    Constructor.
- virtual ~TypeInstance ()=0
    Destructor.

## Protected Attributes

- GTypeInstance * instance_
    A Pointer to the wrapped GTypeInstance structure.

## Detailed Description

Abstract base class for GTK+ interfaces and objects.

TypeInstance encapsulates GTypeInstance, the base structure for GObjects. It exists only to serve as a common base class for concrete objects and the abstract interfaces they inherit. Gtk::Entry is a good example. It inherits from Gtk::Widget, Gtk::Editable and Gtk::CellEditable. Gtk::Widget is the concrete object and Gtk::Editable and Gtk::CellEditable are its abstract interfaces.

## Member Function Documentation

void Xfc::G::TypeInstance::add_interface | ( | GType | instance_type,
|  | GType | interface_type,
|  | GInterfaceInitFunc | interface_init
| ) | `[static]`

Adds the static interface_type to the instantiable instance_type.

Parameters:

  | instance_type | GType value of an instantiable type.
  | interface_type | GType value of the interface type to add.
  | interface_init | The location of the function that initializes interface_type.

void Xfc::G::TypeInstance::add_interface | ( | GType | interface_type,
|  | GInterfaceInitFunc | interface_init
| ) |

Adds the static interface_type to this TypeInstance.

Parameters:

  | interface_type | GType value of the interface type to add.
  | interface_init | The location of the function that initializes interface_type.

bool Xfc::G::TypeInstance::is_a | ( | GType | is_a_type | ) | const

If is_a_type is a derivable type, check whether the instance type is a descendant of is_a_type, or if is_a_type is an interface, check whether the instance type conforms to it.

Parameters:

  | is_a_type | Possible ancestor of type or interface type the instance type could conform to.

Returns:
  true if the instance type is_a is_a_type holds true.

GType Xfc::G::TypeInstance::register_type | ( | GType | parent_type,
|  | GClassInitFunc | class_init
| ) | `[static]`

Registers a new static XFC type derived from parent_type.

Parameters:

  | parent_type | The type which this type will be derived from.
  | class_init | The location of the class initialization function.

Returns:
  The new type identifier.

The documentation for this class was generated from the following file:

- type.hh

Xfce Foundation Classes

Copyright © 2004-2005 The XFC Development Team | XFC 4.3