Reference Manual
Inti Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

Inti::G::TypeInstance Class Reference

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

#include <inti/glib/type.h>

Inheritance diagram for Inti::G::TypeInstance:

Inti::ReferencedBase Inti::G::Object Inti::G::TypeInterface Inti::Atk::Hyperlink Inti::Atk::Object Inti::Atk::ObjectFactory Inti::Atk::Registry Inti::Atk::Relation Inti::Atk::RelationSet Inti::Atk::StateSet Inti::Gdk::Colormap Inti::Gdk::Device Inti::Gdk::Display Inti::Gdk::DisplayManager Inti::Gdk::DragContext Inti::Gdk::Drawable Inti::Gdk::GC Inti::Gdk::Image Inti::Gdk::Keymap Inti::Gdk::Pixbuf Inti::Gdk::PixbufAnimation Inti::Gdk::PixbufAnimationIter Inti::Gdk::PixbufLoader Inti::Gdk::Screen Inti::Gdk::Visual Inti::Gtk::AccelGroup Inti::Gtk::Clipboard Inti::Gtk::IconFactory Inti::Gtk::ListStore Inti::Gtk::Object Inti::Gtk::RcStyle Inti::Gtk::Settings Inti::Gtk::SizeGroup Inti::Gtk::Style Inti::Gtk::TextBuffer Inti::Gtk::TextChildAnchor Inti::Gtk::TextMark Inti::Gtk::TextTag Inti::Gtk::TextTagTable Inti::Gtk::TreeModelSort Inti::Gtk::TreeSelection Inti::Gtk::TreeStore Inti::Gtk::WindowGroup Inti::Pango::Context Inti::Pango::Font Inti::Pango::FontFace Inti::Pango::FontFamily Inti::Pango::FontMap Inti::Pango::Fontset Inti::Pango::Layout Inti::Atk::Action Inti::Atk::Component Inti::Atk::Document Inti::Atk::EditableText Inti::Atk::Hypertext Inti::Atk::Image Inti::Atk::Implementor Inti::Atk::Selection Inti::Atk::StreamableContent Inti::Atk::Table Inti::Atk::Text Inti::Atk::Value Inti::Gtk::CellEditable Inti::Gtk::Editable Inti::Gtk::TreeModel Inti::Gtk::TreeSortable List of all members.

Public Member Functions

Accessors
Methods

Static Public Member Functions

Protected Member Functions

Protected Attributes


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 Inti::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 Inti::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.

template<typename T>
T* Inti::G::TypeInstance::class_peek_parent void *  g_class  )  [inline, static]
 

Get a pointer to the parent class for g_class; T is the parent class.

Parameters:
g_class The GTK+ class structure to retrieve the parent class for.
Returns:
The parent GTypeClass structure cast to a structure of type T.

This is a convenience method, often needed in class initializers. It essentially takes the immediate parent type of the class passed in, and returns the class structure thereof. Since derived classes hold a reference count on their parent classes as long as they are instantiated, the returned class will always exist.

template<typename T>
T* Inti::G::TypeInstance::get_class  )  const [inline]
 

Get a pointer to the class structure for the instance, cast to a pointer of type T.

Returns:
The class structure for the instance or null if the class does not currently exist.

bool Inti::G::TypeInstance::is_a GType  type  )  const
 

Is the instance of the specified type.

Parameters:
type The type ID of the interface or object.
Returns:
true if the instance of the specified type.

bool Inti::G::TypeInstance::is_a_type GType  ancestor_type  )  const
 

Is the instance is a descendant of the specified ancestor_type.

Parameters:
ancestor_type The type ID of the ancestor to check.
Returns:
true if the instance is a descendant of the specified ancestor_type.

GType Inti::G::TypeInstance::register_type GType  parent_type,
GClassInitFunc  class_init
[static]
 

Registers a new static Inti 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: Main Page - Footer


Generated on Sun Sep 14 20:08:09 2003 for Inti by doxygen 1.3.2 written by Dimitri van Heesch, © 1997-2002