## Types Types — Handle run-time type creation |

## Synopsis

    #include <gtk/gtk.h>

    typedef     GtkType;
    typedef     GtkFundamentalType;
    #define     GTK_CLASS_NAME                  (class)
    #define     GTK_CLASS_TYPE                  (class)
    #define     GTK_TYPE_IS_OBJECT              (type)
    #define     GTK_TYPE_FUNDAMENTAL_LAST
    #define     GTK_TYPE_FUNDAMENTAL_MAX
    #define     GTK_STRUCT_OFFSET
    #define     GTK_CHECK_CAST
    #define     GTK_CHECK_CLASS_CAST
    #define     GTK_CHECK_TYPE
    #define     GTK_CHECK_CLASS_TYPE
    #define     GTK_CHECK_GET_CLASS
    #define     GTK_FUNDAMENTAL_TYPE
    #define     GTK_SIGNAL_FUNC                 (f)
    typedef     GtkClassInitFunc;
    typedef     GtkObjectInitFunc;
    void        (*GtkSignalFunc)                (void);
    gboolean    (*GtkFunction)                  (gpointer data);
    void        (*GtkDestroyNotify)             (gpointer data);
    void        (*GtkCallbackMarshal)           (GtkObject *object,
                                                 gpointer data,
                                                 guint n_args,
                                                 GtkArg *args);
    typedef     GtkSignalMarshaller;
    typedef     GtkTypeObject;
                GtkArg;
    #define     GTK_VALUE_CHAR                  (a)
    #define     GTK_VALUE_UCHAR                 (a)
    #define     GTK_VALUE_BOOL                  (a)
    #define     GTK_VALUE_INT                   (a)
    #define     GTK_VALUE_UINT                  (a)
    #define     GTK_VALUE_LONG                  (a)
    #define     GTK_VALUE_ULONG                 (a)
    #define     GTK_VALUE_FLOAT                 (a)
    #define     GTK_VALUE_DOUBLE                (a)
    #define     GTK_VALUE_STRING                (a)
    #define     GTK_VALUE_ENUM                  (a)
    #define     GTK_VALUE_FLAGS                 (a)
    #define     GTK_VALUE_BOXED                 (a)
    #define     GTK_VALUE_POINTER               (a)
    #define     GTK_VALUE_OBJECT                (a)
    #define     GTK_VALUE_SIGNAL                (a)
    #define     GTK_RETLOC_CHAR                 (a)
    #define     GTK_RETLOC_UCHAR                (a)
    #define     GTK_RETLOC_BOOL                 (a)
    #define     GTK_RETLOC_INT                  (a)
    #define     GTK_RETLOC_UINT                 (a)
    #define     GTK_RETLOC_LONG                 (a)
    #define     GTK_RETLOC_ULONG                (a)
    #define     GTK_RETLOC_FLOAT                (a)
    #define     GTK_RETLOC_DOUBLE               (a)
    #define     GTK_RETLOC_STRING               (a)
    #define     GTK_RETLOC_ENUM                 (a)
    #define     GTK_RETLOC_FLAGS                (a)
    #define     GTK_RETLOC_BOXED                (a)
    #define     GTK_RETLOC_POINTER              (a)
    #define     GTK_RETLOC_OBJECT               (a)
                GtkTypeInfo;
    typedef     GtkTypeClass;
    typedef     GtkEnumValue;
    typedef     GtkFlagValue;
    void        gtk_type_init                   (GTypeDebugFlags debug_flags);
    GtkType     gtk_type_unique                 (GtkType parent_type,
                                                 const GtkTypeInfo *gtkinfo);
    #define     gtk_type_name                   (type)
    #define     gtk_type_from_name              (name)
    #define     gtk_type_parent                 (type)
    gpointer    gtk_type_class                  (GtkType type);
    gpointer    gtk_type_new                    (GtkType type);
    #define     gtk_type_is_a                   (type, is_a_type)
    GtkEnumValue* gtk_type_enum_get_values      (GtkType enum_type);
    GtkFlagValue* gtk_type_flags_get_values     (GtkType flags_type);
    GtkEnumValue* gtk_type_enum_find_value      (GtkType enum_type,
                                                 const gchar *value_name);
    GtkFlagValue* gtk_type_flags_find_value     (GtkType flags_type,
                                                 const gchar *value_name);

## Description

The GTK+ type system is extensible. Because of that, types have to be managed at runtime.

## Details

### GtkType

    typedef GType			GtkType;

GtkType is unique integer identifying the type. The guts of the information about the type is held in a private struct named GtkTypeNode.

### GtkFundamentalType

    typedef GType GtkFundamentalType;

### Warning

`GtkFundamentalType` is deprecated and should not be used in newly-written code.

GtkFundamentalType is an enumerated type which lists all the possible fundamental types (e.g. char, uchar, int, long, float, etc).

### GTK_CLASS_NAME()

    #define GTK_CLASS_NAME(class)		(g_type_name (G_TYPE_FROM_CLASS (class)))

### Warning

`GTK_CLASS_NAME` is deprecated and should not be used in newly-written code. Use `g_type_name()` and `G_TYPE_FROM_CLASS()` instead.

Returns the type name of `class`.

`class` : | a GtkTypeClass.

### GTK_CLASS_TYPE()

    #define GTK_CLASS_TYPE(class)		(G_TYPE_FROM_CLASS (class))

### Warning

`GTK_CLASS_TYPE` is deprecated and should not be used in newly-written code. Use `G_TYPE_FROM_CLASS()` instead.

Returns the type of `class`.

`class` : | a GtkTypeClass.

### GTK_TYPE_IS_OBJECT()

    #define GTK_TYPE_IS_OBJECT(type)	(g_type_is_a ((type), GTK_TYPE_OBJECT))

### Warning

`GTK_TYPE_IS_OBJECT` is deprecated and should not be used in newly-written code. Use `G_TYPE_IS_OBJECT()` instead.

Returns `TRUE` if `type` is a `GTK_TYPE_OBJECT`.

`type` : | a GtkType.

### GTK_TYPE_FUNDAMENTAL_LAST

    #define	GTK_TYPE_FUNDAMENTAL_LAST        (G_TYPE_LAST_RESERVED_FUNDAMENTAL - 1)

### Warning

`GTK_TYPE_FUNDAMENTAL_LAST` is deprecated and should not be used in newly-written code. Use G_TYPE_LAST_RESERVED_FUNDAMENTAL - 1 instead.

The highest-numbered structured or flat enumerated type value.

### GTK_TYPE_FUNDAMENTAL_MAX

    #define	GTK_TYPE_FUNDAMENTAL_MAX         (G_TYPE_FUNDAMENTAL_MAX)

### Warning

`GTK_TYPE_FUNDAMENTAL_MAX` is deprecated and should not be used in newly-written code. Use G_TYPE_FUNDAMENTAL_MAX instead.

The maximum fundamental enumerated type value.

### GTK_STRUCT_OFFSET

    #define GTK_STRUCT_OFFSET	G_STRUCT_OFFSET

### Warning

`GTK_STRUCT_OFFSET` is deprecated and should not be used in newly-written code. Use `G_STRUCT_OFFSET()` instead.

Use in place of ``offsetof()``, which is used if it exists.

### GTK_CHECK_CAST

    #define	GTK_CHECK_CAST		G_TYPE_CHECK_INSTANCE_CAST

Casts the object in `tobj` into `cast`. If `G_DISABLE_CAST_CHECKS` is defined, just cast it. Otherwise, check to see if we can cast `tobj` into a `cast`.

### GTK_CHECK_CLASS_CAST

    #define	GTK_CHECK_CLASS_CAST	G_TYPE_CHECK_CLASS_CAST

Casts the object in `tobj` into `cast`. If `G_DISABLE_CAST_CHECKS` is defined, just cast it. Otherwise, check to see if we can cast `tobj` into a `cast`.

### GTK_CHECK_TYPE

    #define	GTK_CHECK_TYPE		G_TYPE_CHECK_INSTANCE_TYPE

Determines whether `type_object` is a type of `otype`.

### GTK_CHECK_CLASS_TYPE

    #define	GTK_CHECK_CLASS_TYPE	G_TYPE_CHECK_CLASS_TYPE

Determines whether `type_class` is a type of `otype`.

### GTK_CHECK_GET_CLASS

    #define GTK_CHECK_GET_CLASS	G_TYPE_INSTANCE_GET_CLASS

Gets the class of `tobj`.

### GTK_FUNDAMENTAL_TYPE

    #define	GTK_FUNDAMENTAL_TYPE	G_TYPE_FUNDAMENTAL

### Warning

`GTK_FUNDAMENTAL_TYPE` is deprecated and should not be used in newly-written code.

Converts a GTK+ type into a fundamental type.

### GTK_SIGNAL_FUNC()

    #define GTK_SIGNAL_FUNC(f)	    ((GtkSignalFunc) (f))

Just a macroized cast into a GtkSignalFunc.

`f` : |

### GtkClassInitFunc

    typedef GBaseInitFunc		GtkClassInitFunc;

### Warning

`GtkClassInitFunc` is deprecated and should not be used in newly-written code.

Defines a function pointer.

### GtkObjectInitFunc

    typedef GInstanceInitFunc	GtkObjectInitFunc;

### Warning

`GtkObjectInitFunc` is deprecated and should not be used in newly-written code.

Defines a function pointer.

### GtkSignalFunc ()

    void        (*GtkSignalFunc)                (void);

Defines a function pointer.

### GtkFunction ()

    gboolean    (*GtkFunction)                  (gpointer data);

Defines a function pointer.

`data` : | gpointer
Returns : | gint

### GtkDestroyNotify ()

    void        (*GtkDestroyNotify)             (gpointer data);

Defines a function pointer.

`data` : | gpointer

### GtkCallbackMarshal ()

    void        (*GtkCallbackMarshal)           (GtkObject *object,
                                                 gpointer data,
                                                 guint n_args,
                                                 GtkArg *args);

Defines a function pointer.

`object` : | GtkObject*
`data` : | gpointer
`n_args` : | guint
`args` : | GtkArg*

### GtkSignalMarshaller

    typedef GSignalCMarshaller          GtkSignalMarshaller;

### Warning

`GtkSignalMarshaller` is deprecated and should not be used in newly-written code.

Defines a function pointer.

### GtkTypeObject

    typedef GTypeInstance		GtkTypeObject;

### Warning

`GtkTypeObject` is deprecated and should not be used in newly-written code.

A GtkTypeObject defines the minimum structure requirements for type instances. Type instances returned from `gtk_type_new()` and initialized through a GtkObjectInitFunc need to directly inherit from this structure or at least copy its fields one by one.

### GtkArg

    typedef struct {
      GtkType type;
      gchar *name;

      /* this union only defines the required storage types for
       * the possibile values, thus there is no gint enum_data field,
       * because that would just be a mere alias for gint int_data.
       * use the GTK_VALUE_*() and GTK_RETLOC_*() macros to access
       * the discrete memebers.
       */
      union {
        /* flat values */
        gchar char_data;
        guchar uchar_data;
        gboolean bool_data;
        gint int_data;
        guint uint_data;
        glong long_data;
        gulong ulong_data;
        gfloat float_data;
        gdouble double_data;
        gchar *string_data;
        GtkObject *object_data;
        gpointer pointer_data;

        /* structured values */
        struct {
          GtkSignalFunc f;
          gpointer d;
        } signal_data;
      } d;
    } GtkArg;

### Warning

`GtkArg` is deprecated and should not be used in newly-written code.

This is a structure that we use to pass in typed values (and names).

### GTK_VALUE_CHAR()

    #define GTK_VALUE_CHAR(a)	((a).d.char_data)

### Warning

`GTK_VALUE_CHAR` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_CHAR`.

`a` : | a GtkArg.

### GTK_VALUE_UCHAR()

    #define GTK_VALUE_UCHAR(a)	((a).d.uchar_data)

### Warning

`GTK_VALUE_UCHAR` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_UCHAR`.

`a` : | a GtkArg.

### GTK_VALUE_BOOL()

    #define GTK_VALUE_BOOL(a)	((a).d.bool_data)

### Warning

`GTK_VALUE_BOOL` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_BOOL`.

`a` : | a GtkArg.

### GTK_VALUE_INT()

    #define GTK_VALUE_INT(a)	((a).d.int_data)

### Warning

`GTK_VALUE_INT` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_INT`.

`a` : | a GtkArg.

### GTK_VALUE_UINT()

    #define GTK_VALUE_UINT(a)	((a).d.uint_data)

### Warning

`GTK_VALUE_UINT` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_UINT`.

`a` : | a GtkArg.

### GTK_VALUE_LONG()

    #define GTK_VALUE_LONG(a)	((a).d.long_data)

### Warning

`GTK_VALUE_LONG` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_LONG`.

`a` : | a GtkArg.

### GTK_VALUE_ULONG()

    #define GTK_VALUE_ULONG(a)	((a).d.ulong_data)

### Warning

`GTK_VALUE_ULONG` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_ULONG`.

`a` : | a GtkArg.

### GTK_VALUE_FLOAT()

    #define GTK_VALUE_FLOAT(a)	((a).d.float_data)

### Warning

`GTK_VALUE_FLOAT` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_FLOAT`.

`a` : | a GtkArg.

### GTK_VALUE_DOUBLE()

    #define GTK_VALUE_DOUBLE(a)	((a).d.double_data)

### Warning

`GTK_VALUE_DOUBLE` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_DOUBLE`.

`a` : | a GtkArg.

### GTK_VALUE_STRING()

    #define GTK_VALUE_STRING(a)	((a).d.string_data)

### Warning

`GTK_VALUE_STRING` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_STRING`.

`a` : | a GtkArg.

### GTK_VALUE_ENUM()

    #define GTK_VALUE_ENUM(a)	((a).d.int_data)

### Warning

`GTK_VALUE_ENUM` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_ENUM`.

`a` : | a GtkArg.

### GTK_VALUE_FLAGS()

    #define GTK_VALUE_FLAGS(a)	((a).d.uint_data)

### Warning

`GTK_VALUE_FLAGS` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_FLAGS`.

`a` : | a GtkArg.

### GTK_VALUE_BOXED()

    #define GTK_VALUE_BOXED(a)	((a).d.pointer_data)

### Warning

`GTK_VALUE_BOXED` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_BOXED`.

`a` : | a GtkArg.

### GTK_VALUE_POINTER()

    #define GTK_VALUE_POINTER(a)	((a).d.pointer_data)

### Warning

`GTK_VALUE_POINTER` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_POINTER`.

`a` : | a GtkArg.

### GTK_VALUE_OBJECT()

    #define GTK_VALUE_OBJECT(a)	((a).d.object_data)

### Warning

`GTK_VALUE_OBJECT` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_OBJECT`.

`a` : | a GtkArg.

### GTK_VALUE_SIGNAL()

    #define GTK_VALUE_SIGNAL(a)	((a).d.signal_data)

### Warning

`GTK_VALUE_SIGNAL` is deprecated and should not be used in newly-written code.

Gets the value of a GtkArg whose GtkType is `GTK_TYPE_SIGNAL`.

`a` : | a GtkArg.

### GTK_RETLOC_CHAR()

    #define GTK_RETLOC_CHAR(a)	((gchar*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_CHAR` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_CHAR`.

`a` : | a GtkArg.

### GTK_RETLOC_UCHAR()

    #define GTK_RETLOC_UCHAR(a)	((guchar*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_UCHAR` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_UCHAR`.

`a` : | a GtkArg.

### GTK_RETLOC_BOOL()

    #define GTK_RETLOC_BOOL(a)	((gboolean*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_BOOL` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_BOOL`.

`a` : | a GtkArg.

### GTK_RETLOC_INT()

    #define GTK_RETLOC_INT(a)	((gint*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_INT` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_INT`.

`a` : | a GtkArg.

### GTK_RETLOC_UINT()

    #define GTK_RETLOC_UINT(a)	((guint*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_UINT` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_UINT`.

`a` : | a GtkArg.

### GTK_RETLOC_LONG()

    #define GTK_RETLOC_LONG(a)	((glong*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_LONG` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_LONG`.

`a` : | a GtkArg.

### GTK_RETLOC_ULONG()

    #define GTK_RETLOC_ULONG(a)	((gulong*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_ULONG` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_ULONG`.

`a` : | a GtkArg.

### GTK_RETLOC_FLOAT()

    #define GTK_RETLOC_FLOAT(a)	((gfloat*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_FLOAT` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_FLOAT`.

`a` : | a GtkArg.

### GTK_RETLOC_DOUBLE()

    #define GTK_RETLOC_DOUBLE(a)	((gdouble*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_DOUBLE` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_DOUBLE`.

`a` : | a GtkArg.

### GTK_RETLOC_STRING()

    #define GTK_RETLOC_STRING(a)	((gchar**)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_STRING` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_STRING`.

`a` : | a GtkArg.

### GTK_RETLOC_ENUM()

    #define GTK_RETLOC_ENUM(a)	((gint*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_ENUM` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_ENUM`.

`a` : | a GtkArg.

### GTK_RETLOC_FLAGS()

    #define GTK_RETLOC_FLAGS(a)	((guint*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_FLAGS` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_FLAGS`.

`a` : | a GtkArg.

### GTK_RETLOC_BOXED()

    #define GTK_RETLOC_BOXED(a)	((gpointer*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_BOXED` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_BOXED`.

`a` : | a GtkArg.

### GTK_RETLOC_POINTER()

    #define GTK_RETLOC_POINTER(a)	((gpointer*)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_POINTER` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_POINTER`.

`a` : | a GtkArg.

### GTK_RETLOC_OBJECT()

    #define GTK_RETLOC_OBJECT(a)	((GtkObject**)	(a).d.pointer_data)

### Warning

`GTK_RETLOC_OBJECT` is deprecated and should not be used in newly-written code.

If the GtkArg contains a pointer to the value, this macro will be a pointer to a `GTK_TYPE_OBJECT`.

`a` : | a GtkArg.

### GtkTypeInfo

    typedef struct {
      gchar			*type_name;
      guint			 object_size;
      guint			 class_size;
      GtkClassInitFunc	 class_init_func;
      GtkObjectInitFunc	 object_init_func;
      gpointer		 reserved_1;
      gpointer		 reserved_2;
      GtkClassInitFunc	 base_class_init_func;
    } GtkTypeInfo;

### Warning

`GtkTypeInfo` is deprecated and should not be used in newly-written code.

Holds information about the type. `gtk_type_name()` returns the name. `object_size` is somehow set to the number of bytes that an instance of the object will occupy. `class_init_func` holds the type's initialization function. `object_init_func` holds the initialization function for an instance of the object. `reserved_1` is used for GtkEnumValue to hold the enumerated values.

### GtkTypeClass

    typedef GTypeClass		GtkTypeClass;

### Warning

`GtkTypeClass` is deprecated and should not be used in newly-written code.

The base structure for a GTK+ type. Every type inherits this as a base structure.

### GtkEnumValue

    typedef GEnumValue  GtkEnumValue;

### Warning

`GtkEnumValue` is deprecated and should not be used in newly-written code.

A structure which contains a single enum value, and its name, and its nickname.

### GtkFlagValue

    typedef GFlagsValue GtkFlagValue;

### Warning

`GtkFlagValue` is deprecated and should not be used in newly-written code.

### gtk_type_init ()

    void        gtk_type_init                   (GTypeDebugFlags debug_flags);

### Warning

`gtk_type_init` is deprecated and should not be used in newly-written code.

Initializes the data structures associated with GTK+ types.

`debug_flags` : |

### gtk_type_unique ()

    GtkType     gtk_type_unique                 (GtkType parent_type,
                                                 const GtkTypeInfo *gtkinfo);

### Warning

`gtk_type_unique` is deprecated and should not be used in newly-written code.

Creates a new, unique type.

`parent_type` : | if zero, a fundamental type is created.
`gtkinfo` : |
Returns : | the new GtkType.

### gtk_type_name()

    #define	gtk_type_name(type)		 g_type_name (type)

### Warning

`gtk_type_name` is deprecated and should not be used in newly-written code.

Returns a pointer to the name of a type, or `NULL` if it has none.

`type` : | a GtkType.
Returns : | a pointer to the name of a type, or `NULL` if it has none.

### gtk_type_from_name()

    #define	gtk_type_from_name(name)	 g_type_from_name (name)

### Warning

`gtk_type_from_name` is deprecated and should not be used in newly-written code.

Gets the internal representation of a type, given its name.

`name` : | the name of a GTK+ type
Returns : | a GtkType.

### gtk_type_parent()

    #define	gtk_type_parent(type)		 g_type_parent (type)

### Warning

`gtk_type_parent` is deprecated and should not be used in newly-written code.

Returns the parent type of a GtkType.

`type` : | a GtkType.
Returns : | the GtkType of the parent.

### gtk_type_class ()

    gpointer    gtk_type_class                  (GtkType type);

Returns a pointer pointing to the class of `type` or `NULL` if there was any trouble identifying `type`. Initializes the class if necessary.

`type` : | a GtkType.
Returns : | pointer to the class.

### gtk_type_new ()

    gpointer    gtk_type_new                    (GtkType type);

### Warning

`gtk_type_new` is deprecated and should not be used in newly-written code.

Creates a new object of a given type, and return a pointer to it. Returns `NULL` if you give it an invalid type. It allocates the object out of the type's memory chunk if there is a memory chunk. The object has all the proper initializers called.

`type` : | a GtkType.
Returns : | pointer to a GtkTypeObject.

### gtk_type_is_a()

    #define	gtk_type_is_a(type, is_a_type)	 g_type_is_a ((type), (is_a_type))

### Warning

`gtk_type_is_a` is deprecated and should not be used in newly-written code.

Looks in the type hierarchy to see if `type` has `is_a_type` among its ancestors. Do so with a simple lookup, not a loop.

`type` : | a GtkType.
`is_a_type` : | another GtkType.
Returns : | `TRUE` if `type` is a `is_a_type`.

### gtk_type_enum_get_values ()

    GtkEnumValue* gtk_type_enum_get_values      (GtkType enum_type);

### Warning

`gtk_type_enum_get_values` is deprecated and should not be used in newly-written code.

If `enum_type` has values, then return a pointer to all of them.

`enum_type` : | a GtkType.
Returns : | GtkEnumValue*

### gtk_type_flags_get_values ()

    GtkFlagValue* gtk_type_flags_get_values     (GtkType flags_type);

### Warning

`gtk_type_flags_get_values` is deprecated and should not be used in newly-written code.

If `flags_type` has values, then return a pointer to all of them.

`flags_type` : | a GtkType.
Returns : | GtkFlagValue*

### gtk_type_enum_find_value ()

    GtkEnumValue* gtk_type_enum_find_value      (GtkType enum_type,
                                                 const gchar *value_name);

### Warning

`gtk_type_enum_find_value` is deprecated and should not be used in newly-written code.

Returns a pointer to one of `enum_type`'s GtkEnumValues's whose name (or nickname) matches `value_name`.

`enum_type` : | a GtkType.
`value_name` : | the name to look for.
Returns : | GtkEnumValue*

### gtk_type_flags_find_value ()

    GtkFlagValue* gtk_type_flags_find_value     (GtkType flags_type,
                                                 const gchar *value_name);

### Warning

`gtk_type_flags_find_value` is deprecated and should not be used in newly-written code.

Returns a pointer to one of `flag_type`'s GtkFlagValue's whose name (or nickname) matches `value_name`.

`flags_type` : | a GtkType.
`value_name` : | the name to look for.
Returns : | GtkFlagValue*