From 4cfce6290bb6ea82db266e0911d4b047ce299a6c Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Mon, 29 Sep 2003 14:56:23 +0000 Subject: [PATCH] Docs for g_type_default_interface_ref(), etc. : Mon Sep 29 10:55:23 2003 Owen Taylor * gobject/gobject-sections.txt gobject/tmpl/gtype.sgml: Docs for g_type_default_interface_ref(), etc. : ---------------------------------------------------------------------- --- docs/reference/ChangeLog | 5 +++ docs/reference/gobject/gobject-sections.txt | 3 ++ docs/reference/gobject/tmpl/gtype.sgml | 55 +++++++++++++++++++++++++++-- 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index e1a7c1d..5f04c9c 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 29 10:55:23 2003 Owen Taylor + + * gobject/gobject-sections.txt gobject/tmpl/gtype.sgml: + Docs for g_type_default_interface_ref(), etc. + Fri Sep 12 16:29:29 2003 Owen Taylor * gobject/tmpl/signals.sgml: Add docs for diff --git a/docs/reference/gobject/gobject-sections.txt b/docs/reference/gobject/gobject-sections.txt index 0d00a41..9c6d0d7 100644 --- a/docs/reference/gobject/gobject-sections.txt +++ b/docs/reference/gobject/gobject-sections.txt @@ -56,6 +56,9 @@ g_type_class_peek_parent g_type_class_add_private g_type_interface_peek g_type_interface_peek_parent +g_type_default_interface_ref +g_type_default_interface_peek +g_type_default_interface_unref g_type_children g_type_interfaces g_type_interface_prerequisites diff --git a/docs/reference/gobject/tmpl/gtype.sgml b/docs/reference/gobject/tmpl/gtype.sgml index 605a11f..ce80e30 100644 --- a/docs/reference/gobject/tmpl/gtype.sgml +++ b/docs/reference/gobject/tmpl/gtype.sgml @@ -200,8 +200,15 @@ across invocation of g_type_register_static(). @class_size: Size of the class structure (required for interface, classed and instantiatable types). @base_init: Location of the base initialization function (optional). @base_finalize: Location of the base finalization function (optional). -@class_init: Location of the class initialization function (optional, for classed and instantiatable types only). -@class_finalize: Location of the class finalization function (optional). +@class_init: Location of the class initialization function for + classed and types. Location of the default vtable inititalization + function for interface types. (optional) This function is used both + to fill in virtual functions in the class or default vtable, and + to do type-specific setup such as registering signals and object + properties. +@class_finalize: Location of the class finalization function for + classed and types. Location fo the default vtable finalization + function for interface types. (optional) @class_data: User-supplied data passed to the class init/finalize functions. @instance_size: Size of the instance (object) structure (required for instantiatable types only). @n_preallocs: Number of pre-allocated (cached) instances to reserve memory for (0 indicates no caching). @@ -774,6 +781,50 @@ then possibly overriding some methods. doesn't conform to the interface. + + +Increments the reference count for the interface type @g_type, +and returns the default interface vtable for the type. + + +If the type is not currently in use, then the default vtable +for the type will be created and initalized by calling +the base interface init and default vtable init functions for +the type (the @base_init +and class_init members of #GTypeInfo). +Calling g_type_default_interface_ref() is useful when you +want to make sure that signals and properties for an interface +have been installed. + + +@g_type: an interface type +@Returns: the default vtable for the interface; call + g_type_default_interface_unref() when you are done using + the interface. + + + +If the interface type @g_type is currently in use, returns +its default interface vtable. + + +@g_type: an interface type +@Returns: the default vtable for the interface; or %NULL + if the type is not currently in use. + + + +Decrements the reference count for the type corresponding to the +interface default vtable @g_iface. If the type is dynamic, then +when no one is using the interface and all references have +been released, the finalize function for the interface's default +vtable (the class_finalize member of +#GTypeInfo) will be called. + + +@g_iface: the default vtable structure for a interface, as + returned by g_type_default_interface_ref() + Return a newly allocated and 0-terminated array of type IDs, listing the -- 2.7.4