mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-30 10:56:37 +02:00
Fix G_DEFINE_TYPE_EXTENDED docs
Make the docs for G_DEFINE_TYPE_EXTENDED match the actual definition of the macro. (#577985)
This commit is contained in:
@@ -1284,7 +1284,7 @@ gpointer g_type_instance_get_private (GTypeInstance *instance,
|
|||||||
* G_DEFINE_TYPE_EXTENDED:
|
* G_DEFINE_TYPE_EXTENDED:
|
||||||
* @TN: The name of the new type, in Camel case.
|
* @TN: The name of the new type, in Camel case.
|
||||||
* @t_n: The name of the new type, in lowercase, with words
|
* @t_n: The name of the new type, in lowercase, with words
|
||||||
* separated by '_'.
|
* separated by '_'.
|
||||||
* @T_P: The #GType of the parent type.
|
* @T_P: The #GType of the parent type.
|
||||||
* @_f_: #GTypeFlags to pass to g_type_register_static()
|
* @_f_: #GTypeFlags to pass to g_type_register_static()
|
||||||
* @_C_: Custom code that gets inserted in the *_get_type() function.
|
* @_C_: Custom code that gets inserted in the *_get_type() function.
|
||||||
@@ -1314,34 +1314,31 @@ gpointer g_type_instance_get_private (GTypeInstance *instance,
|
|||||||
* GType
|
* GType
|
||||||
* gtk_gadget_get_type (void)
|
* gtk_gadget_get_type (void)
|
||||||
* {
|
* {
|
||||||
* static GType g_define_type_id = 0;
|
* static volatile gsize g_define_type_id__volatile = 0;
|
||||||
* if (G_UNLIKELY (g_define_type_id == 0))
|
* if (g_once_init_enter (&g_define_type_id__volatile))
|
||||||
* {
|
* {
|
||||||
* static const GTypeInfo g_define_type_info = {
|
* GType g_define_type_id =
|
||||||
* sizeof (GtkGadgetClass),
|
* g_type_register_static_simple (GTK_TYPE_WIDGET,
|
||||||
* (GBaseInitFunc) NULL,
|
* g_intern_static_string ("GtkGadget"),
|
||||||
* (GBaseFinalizeFunc) NULL,
|
* sizeof (GtkGadgetClass),
|
||||||
* (GClassInitFunc) gtk_gadget_class_intern_init,
|
* (GClassInitFunc) gtk_gadget_class_intern_init,
|
||||||
* (GClassFinalizeFunc) NULL,
|
* sizeof (GtkGadget),
|
||||||
* NULL, // class_data
|
* (GInstanceInitFunc) gtk_gadget_init,
|
||||||
* sizeof (GtkGadget),
|
* (GTypeFlags) flags);
|
||||||
* 0, // n_preallocs
|
|
||||||
* (GInstanceInitFunc) gtk_gadget_init,
|
|
||||||
* };
|
|
||||||
* g_define_type_id = g_type_register_static (GTK_TYPE_WIDGET, "GtkGadget", &g_define_type_info, 0);
|
|
||||||
* {
|
* {
|
||||||
* static const GInterfaceInfo g_implement_interface_info = {
|
* static const GInterfaceInfo g_implement_interface_info = {
|
||||||
* (GInterfaceInitFunc) gtk_gadget_gizmo_init
|
* (GInterfaceInitFunc) gtk_gadget_gizmo_init
|
||||||
* };
|
* };
|
||||||
* g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
|
* g_type_add_interface_static (g_define_type_id, TYPE_GIZMO, &g_implement_interface_info);
|
||||||
* }
|
* }
|
||||||
|
* g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
|
||||||
* }
|
* }
|
||||||
* return g_define_type_id;
|
* return g_define_type_id__volatile;
|
||||||
* }
|
* }
|
||||||
* ]|
|
* ]|
|
||||||
* The only pieces which have to be manually provided are the definitions of the
|
* The only pieces which have to be manually provided are the definitions of
|
||||||
* instance and class structure and the definitions of the instance and class
|
* the instance and class structure and the definitions of the instance and
|
||||||
* init functions.
|
* class init functions.
|
||||||
*
|
*
|
||||||
* Since: 2.4
|
* Since: 2.4
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user