+2002-12-03 Matthias Clasen <maclas@gmx.de>
+
+ * gtype.c (g_type_get_qdata):
+ (g_type_set_qdata):
+ (g_type_interface_add_prerequisite): Add docs.
+
2002-12-02 Matthias Clasen <maclas@gmx.de>
* gobject.c (g_signal_connect_object): Add docs.
type_iface_add_prerequisite_W (lookup_type_node_I (dependants[i]), prerequisite_node);
}
+/**
+ * g_type_interface_add_prerequisite:
+ * @interface_type: #GType value of an interface type.
+ * @prerequisite_type: #GType value of an interface or instantiatable type.
+ *
+ * Adds @prerequisite_type to the list of prerequisites of @interface_type.
+ * This means that any type implementing @interface_type must also implement
+ * @prerequisite_type. Prerequisites can be thought of as an alternative to
+ * interface derivation (which GType doesn't support). An interface can have
+ * at most one instantiatable prerequisite type.
+ **/
void
g_type_interface_add_prerequisite (GType interface_type,
GType prerequisite_type)
return NULL;
}
+/**
+ * g_type_get_qdata:
+ * @type: a #GType
+ * @quark: a #GQuark id to identify the data
+ *
+ * Obtains data which has previously been attached to @type
+ * with g_type_set_qdata().
+ *
+ * Return value: the data, or %NULL if no data was found
+ **/
gpointer
g_type_get_qdata (GType type,
GQuark quark)
qdata[i].data = data;
}
+/**
+ * g_type_set_qdata:
+ * @type: a #GType
+ * @quark: a #GQuark id to identify the data
+ * @data: the data
+ *
+ * Attaches arbitrary data to a type.
+ **/
void
g_type_set_qdata (GType type,
GQuark quark,