| GObject Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
#define G_TYPE_DERIVE_ID(ptype, branch_seqno) (G_TYPE_FUNDAMENTAL (ptype) | ((branch_seqno) << 8)) |
| ptype : | |
| branch_seqno : |
typedef enum /*< skip >*/
{
/* standard types, introduced by g_type_init() */
G_TYPE_INVALID,
G_TYPE_NONE,
G_TYPE_INTERFACE,
/* GLib type ids */
G_TYPE_CHAR,
G_TYPE_UCHAR,
G_TYPE_BOOLEAN,
G_TYPE_INT,
G_TYPE_UINT,
G_TYPE_LONG,
G_TYPE_ULONG,
G_TYPE_ENUM,
G_TYPE_FLAGS,
G_TYPE_FLOAT,
G_TYPE_DOUBLE,
G_TYPE_STRING,
G_TYPE_PARAM,
G_TYPE_BOXED,
G_TYPE_POINTER,
G_TYPE_OBJECT,
/* the following reserved ids should vanish soon */
G_TYPE_GTK_SIGNAL,
/* reserved fundamental type ids,
* mail gtk-devel-list@redhat.com for reservations
*/
G_TYPE_BSE_PROCEDURE,
G_TYPE_BSE_TIME,
G_TYPE_BSE_NOTE,
G_TYPE_BSE_DOTS,
G_TYPE_GLE_GOBJECT,
G_TYPE_LAST_RESERVED_FUNDAMENTAL,
/* derived type ids */
/* FIXME: G_TYPE_PARAM_INTERFACE */
G_TYPE_PARAM_CHAR = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 1),
G_TYPE_PARAM_UCHAR = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 2),
G_TYPE_PARAM_BOOLEAN = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 3),
G_TYPE_PARAM_INT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 4),
G_TYPE_PARAM_UINT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 5),
G_TYPE_PARAM_LONG = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 6),
G_TYPE_PARAM_ULONG = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 7),
G_TYPE_PARAM_ENUM = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 8),
G_TYPE_PARAM_FLAGS = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 9),
G_TYPE_PARAM_FLOAT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 10),
G_TYPE_PARAM_DOUBLE = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 11),
G_TYPE_PARAM_STRING = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 12),
/* FIXME: G_TYPE_PARAM_PARAM */
G_TYPE_PARAM_OBJECT = G_TYPE_DERIVE_ID (G_TYPE_PARAM, 13)
} GTypeFundamentals; |
#define G_TYPE_IS_CLASSED(type) (g_type_check_flags ((type), G_TYPE_FLAG_CLASSED)) |
| type : |
#define G_TYPE_IS_INSTANTIATABLE(type) (g_type_check_flags ((type), G_TYPE_FLAG_INSTANTIATABLE)) |
| type : |
#define G_TYPE_IS_DERIVABLE(type) (g_type_check_flags ((type), G_TYPE_FLAG_DERIVABLE)) |
| type : |
#define G_TYPE_IS_DEEP_DERIVABLE(type) (g_type_check_flags ((type), G_TYPE_FLAG_DEEP_DERIVABLE)) |
| type : |
#define G_TYPE_IS_INTERFACE(type) (G_TYPE_FUNDAMENTAL (type) == G_TYPE_INTERFACE) |
| type : |
struct GTypeInterface
{
/*< private >*/
GType g_type; /* iface type */
GType g_instance_type;
}; |
struct GTypeInfo
{
/* interface types, classed types, instantiated types */
guint16 class_size;
GBaseInitFunc base_init;
GBaseFinalizeFunc base_finalize;
/* classed types, instantiated types */
GClassInitFunc class_init;
GClassFinalizeFunc class_finalize;
gconstpointer class_data;
/* instantiated types */
guint16 instance_size;
guint16 n_preallocs;
GInstanceInitFunc instance_init;
/* value handling */
const GTypeValueTable *value_table;
}; |
struct GInterfaceInfo
{
GInterfaceInitFunc interface_init;
GInterfaceFinalizeFunc interface_finalize;
gpointer interface_data;
}; |
struct GTypeValueTable
{
void (*value_init) (GValue *value);
void (*value_free) (GValue *value);
void (*value_copy) (const GValue *src_value,
GValue *dest_value);
/* varargs functionality (optional) */
gpointer (*value_peek_pointer) (const GValue *value);
guint collect_type;
gchar* (*collect_value) (GValue *value,
guint nth_value,
GType *collect_type,
GTypeCValue *collect_value);
guint lcopy_type;
gchar* (*lcopy_value) (const GValue *value,
guint nth_value,
GType *collect_type,
GTypeCValue *collect_value);
}; |
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) (_G_TYPE_CIC ((instance), (g_type), c_type)) |
| instance : | |
| g_type : | |
| c_type : |
#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type) (_G_TYPE_CCC ((g_class), (g_type), c_type)) |
| g_class : | |
| g_type : | |
| c_type : |
#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type) (_G_TYPE_CIT ((instance), (g_type))) |
| instance : | |
| g_type : |
#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type) (_G_TYPE_CCT ((g_class), (g_type))) |
| g_class : | |
| g_type : |
#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type)) |
| instance : | |
| g_type : | |
| c_type : |
#define G_TYPE_FROM_INSTANCE(instance) (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))->g_class)) |
| instance : |
#define G_TYPE_FROM_INTERFACE(g_iface) (((GTypeInterface*) (g_iface))->g_type) |
| g_iface : |
GType g_type_next_base (GType type, GType base_type); |
| type : | |
| base_type : | |
| Returns : |
gboolean g_type_conforms_to (GType type, GType iface_type); |
| type : | |
| iface_type : | |
| Returns : |
gpointer g_type_interface_peek (gpointer instance_class, GType iface_type); |
| instance_class : | |
| iface_type : | |
| Returns : |
GType* g_type_children (GType type, guint *n_children); |
| type : | |
| n_children : | |
| Returns : |
GType* g_type_interfaces (GType type, guint *n_interfaces); |
| type : | |
| n_interfaces : | |
| Returns : |
void g_type_set_qdata (GType type, GQuark quark, gpointer data); |
| type : | |
| quark : | |
| data : |
void (*GClassInitFunc) (gpointer g_class, gpointer class_data); |
| g_class : | |
| class_data : |
void (*GClassFinalizeFunc) (gpointer g_class, gpointer class_data); |
| g_class : | |
| class_data : |
void (*GInstanceInitFunc) (GTypeInstance *instance, gpointer g_class); |
| instance : | |
| g_class : |
void (*GInterfaceInitFunc) (gpointer g_iface, gpointer iface_data); |
| g_iface : | |
| iface_data : |
void (*GInterfaceFinalizeFunc) (gpointer g_iface, gpointer iface_data); |
| g_iface : | |
| iface_data : |
gboolean (*GTypeClassCacheFunc) (gpointer cache_data, GTypeClass *g_class); |
| cache_data : | |
| g_class : | |
| Returns : |
GType g_type_register_static (GType parent_type, const gchar *type_name, const GTypeInfo *info, GTypeFlags flags); |
| parent_type : | |
| type_name : | |
| info : | |
| flags : | |
| Returns : |
GType g_type_register_dynamic (GType parent_type, const gchar *type_name, GTypePlugin *plugin, GTypeFlags flags); |
| parent_type : | |
| type_name : | |
| plugin : | |
| flags : | |
| Returns : |
GType g_type_register_fundamental (GType type_id, const gchar *type_name, const GTypeInfo *info, const GTypeFundamentalInfo *finfo, GTypeFlags flags); |
| type_id : | |
| type_name : | |
| info : | |
| finfo : | |
| flags : | |
| Returns : |
void g_type_add_interface_static (GType instance_type, GType interface_type, const GInterfaceInfo *info); |
| instance_type : | |
| interface_type : | |
| info : |
void g_type_add_interface_dynamic (GType instance_type, GType interface_type, GTypePlugin *plugin); |
| instance_type : | |
| interface_type : | |
| plugin : |
gboolean g_type_class_is_a (GTypeClass *g_class, GType is_a_type); |
| g_class : | |
| is_a_type : | |
| Returns : |
GTypeClass* g_type_check_class_cast (GTypeClass *g_class,
GType is_a_type); |
| g_class : | |
| is_a_type : | |
| Returns : |
GTypeInstance* g_type_check_instance_cast (GTypeInstance *instance, GType iface_type); |
| instance : | |
| iface_type : | |
| Returns : |
gboolean g_type_instance_conforms_to (GTypeInstance *instance, GType iface_type); |
| instance : | |
| iface_type : | |
| Returns : |
void g_type_add_class_cache_func (gpointer cache_data, GTypeClassCacheFunc cache_func); |
| cache_data : | |
| cache_func : |
void g_type_remove_class_cache_func (gpointer cache_data, GTypeClassCacheFunc cache_func); |
| cache_data : | |
| cache_func : |
gboolean g_type_check_instance (GTypeInstance *instance); |
| instance : | |
| Returns : |