Type
Object Hierarchy:
Description:
public struct Type :
ulong
A numerical value which represents the unique identifier of a registered type.
Namespace: GLib
Package: gobject-2.0
Content:
Constants:
Static methods:
Methods:
-
public bool is_object ()
-
public bool is_abstract ()
-
public bool is_classed ()
-
public bool is_derivable ()
-
public bool is_deep_derivable ()
-
public bool is_derived ()
-
public bool is_fundamental ()
-
public bool is_instantiatable ()
-
public bool is_interface ()
-
public bool is_value_type ()
-
public bool is_enum ()
-
public bool is_flags ()
-
public Type[] children ()
Return a newly allocated and 0-terminated array of type IDs, listing the child types of type
. The return value has to be g_freeed after use.
-
public uint depth ()
Returns the length of the ancestry of the passed in type. This includes the type itself, so that e.g. a
fundamental type has depth 1.
-
public Type[] interfaces ()
Return a newly allocated and 0-terminated array of type IDs, listing the interface types that type
conforms to. The return value has to be g_freeed after use.
-
public bool is_a (Type is_a_type)
If is_a_type is a derivable type, check whether type is a descendant of
is_a_type. If is_a_type is an interface, check whether type conforms to it.
-
public unowned string name ()
Get the unique name that is assigned to a type ID. Note that this function (like all other GType API)
cannot cope with invalid type IDs. INVALID may be passed to this function, as
may be any other validly registered type ID, but randomized type IDs should not be passed in and will most likely lead to a crash.
-
public Quark qname ()
Get the corresponding quark of the type IDs name.
-
public Type parent ()
Return the direct parent type of the passed in type. If the passed in type has no parent, i.e. is a
fundamental type, 0 is returned.
-
public void query (out TypeQuery query)
Queries the type system for information about a specific type. This function will fill in a
user-provided structure to hold type-specific information. If an invalid Type is passed
in, the type member of the TypeQuery is 0. All members filled into the
TypeQuery structure should be considered constant and have to be left untouched.
-
public TypeClass class_ref ()
Increments the reference count of the class structure belonging to type. This function will
demand-create the class if it doesn't exist already.
-
public weak TypeClass class_peek ()
This function is essentially the same as class_ref
, except that the classes reference count isn't incremented. As a consequence, this function may return null if the class
of the type passed in does not currently exist (hasn't been referenced before).