summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2002-12-03 23:54:55 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2002-12-03 23:54:55 +0000
commit6df677db748bfadbb20b0a76e2386045daaee43e (patch)
tree2f94e91e7d7827fe5396d4faed47bea8db5c991c
parent78afc275dc984a6811de979629016da4c60689f6 (diff)
Sync parameter names with docs and implementation.
* gsignal.h (g_signal_add_emission_hook): * gtype.h (g_type_interface_get_plugin): Sync parameter names with docs and implementation. * gtype.c (g_type_add_interface_dynamic): (g_type_interface_get_plugin): (g_type_interface_peek_parent): (g_type_query): Add docs. * gobject/tmpl/gtype.sgml: Add docs. * gobject/tmpl/signals.sgml: Regenerated.
-rw-r--r--docs/reference/ChangeLog4
-rw-r--r--docs/reference/gobject/tmpl/gtype.sgml60
-rw-r--r--docs/reference/gobject/tmpl/signals.sgml4
-rw-r--r--gobject/ChangeLog11
-rw-r--r--gobject/gsignal.h2
-rw-r--r--gobject/gtype.c48
-rw-r--r--gobject/gtype.h2
7 files changed, 98 insertions, 33 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 8a44cc0f5..d0c582f9f 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,3 +1,7 @@
+2002-12-04 Matthias Clasen <maclas@gmx.de>
+
+ * gobject/tmpl/gtype.sgml: Add docs.
+
2002-12-02 Matthias Clasen <maclas@gmx.de>
* gobject/tmpl/signals.sgml: Add docs.
diff --git a/docs/reference/gobject/tmpl/gtype.sgml b/docs/reference/gobject/tmpl/gtype.sgml
index 85837d59d..1e62ac6e4 100644
--- a/docs/reference/gobject/tmpl/gtype.sgml
+++ b/docs/reference/gobject/tmpl/gtype.sgml
@@ -29,7 +29,7 @@ it may be instantiated, inherited, or implemented depending on exactly
what sort of type it is.
There is also a third registration function for registering fundamental
types called g_type_register_fundamental() which requires both a #GTypeInfo
-structure and a GTypeFundamentalInfo structure but it is seldom used
+structure and a #GTypeFundamentalInfo structure but it is seldom used
since most fundamental types are predefined rather than user-defined.
</para>
@@ -762,7 +762,6 @@ g_free()ed after use.
<!-- ##### FUNCTION g_type_query ##### -->
<para>
-
</para>
@type:
@@ -771,13 +770,14 @@ g_free()ed after use.
<!-- ##### STRUCT GTypeQuery ##### -->
<para>
-
+A structure holding information for a specific type. It is
+filled in by the g_type_query() function.
</para>
-@type:
-@type_name:
-@class_size:
-@instance_size:
+@type: the #GType value of the type.
+@type_name: the name of the type.
+@class_size: the size of the class structure.
+@instance_size: the size of the instance structure.
<!-- ##### USER_FUNCTION GBaseInitFunc ##### -->
<para>
@@ -1091,7 +1091,7 @@ Returns the #GTypePlugin structure for @type or
</para>
@instance_type:
-@implementation_type:
+@interface_type:
@Returns:
@@ -1187,147 +1187,149 @@ that implements or has internal knowledge of the implementation of
<!-- ##### MACRO G_TYPE_INVALID ##### -->
<para>
-
+An invalid #GType, used as error return value in some functions which return
+a #GType.
</para>
<!-- ##### MACRO G_TYPE_NONE ##### -->
<para>
-
+A fundamental type which is used as a replacement for the C
+<literal>void</literal> return type.
</para>
<!-- ##### MACRO G_TYPE_INTERFACE ##### -->
<para>
-
+The fundamental type from which all interfaces are derived.
</para>
<!-- ##### MACRO G_TYPE_CHAR ##### -->
<para>
-
+The fundamental type corresponding to #gchar.
</para>
<!-- ##### MACRO G_TYPE_UCHAR ##### -->
<para>
-
+The fundamental type corresponding to #guchar.
</para>
<!-- ##### MACRO G_TYPE_BOOLEAN ##### -->
<para>
-
+The fundamental type corresponding to #gboolean.
</para>
<!-- ##### MACRO G_TYPE_INT ##### -->
<para>
-
+The fundamental type corresponding to #gint.
</para>
<!-- ##### MACRO G_TYPE_UINT ##### -->
<para>
-
+The fundamental type corresponding to #guint.
</para>
<!-- ##### MACRO G_TYPE_LONG ##### -->
<para>
-
+The fundamental type corresponding to #glong.
</para>
<!-- ##### MACRO G_TYPE_ULONG ##### -->
<para>
-
+The fundamental type corresponding to #gulong.
</para>
<!-- ##### MACRO G_TYPE_INT64 ##### -->
<para>
-
+The fundamental type corresponding to #gint64.
</para>
<!-- ##### MACRO G_TYPE_UINT64 ##### -->
<para>
-
+The fundamental type corresponding to #guint64.
</para>
<!-- ##### MACRO G_TYPE_ENUM ##### -->
<para>
-
+The fundamental type from which all enumeration types are derived.
</para>
<!-- ##### MACRO G_TYPE_FLAGS ##### -->
<para>
-
+The fundamental type from which all flags types are derived.
</para>
<!-- ##### MACRO G_TYPE_FLOAT ##### -->
<para>
-
+The fundamental type corresponding to #gfloat.
</para>
<!-- ##### MACRO G_TYPE_DOUBLE ##### -->
<para>
-
+The fundamental type corresponding to #gdouble.
</para>
<!-- ##### MACRO G_TYPE_STRING ##### -->
<para>
-
+The fundamental type corresponding to nul-terminated C strings.
</para>
<!-- ##### MACRO G_TYPE_POINTER ##### -->
<para>
-
+The fundamental type corresponding to #gpointer.
</para>
<!-- ##### MACRO G_TYPE_BOXED ##### -->
<para>
-
+The fundamental type from which all boxed types are derived.
</para>
<!-- ##### MACRO G_TYPE_PARAM ##### -->
<para>
-
+The fundamental type from which all #GParamSpec types are derived.
</para>
<!-- ##### MACRO G_TYPE_OBJECT ##### -->
<para>
-
+The fundamental type for #GObject.
</para>
diff --git a/docs/reference/gobject/tmpl/signals.sgml b/docs/reference/gobject/tmpl/signals.sgml
index 526a5822d..cc6dc6c21 100644
--- a/docs/reference/gobject/tmpl/signals.sgml
+++ b/docs/reference/gobject/tmpl/signals.sgml
@@ -652,13 +652,13 @@ Disconnects all handlers on an instance that match @func and @data.
</para>
@signal_id:
-@quark:
+@detail:
@hook_func:
@hook_data:
@data_destroy:
@Returns:
<!-- # Unused Parameters # -->
-@detail:
+@quark:
<!-- ##### FUNCTION g_signal_remove_emission_hook ##### -->
diff --git a/gobject/ChangeLog b/gobject/ChangeLog
index 5d6034404..b1dd97a70 100644
--- a/gobject/ChangeLog
+++ b/gobject/ChangeLog
@@ -1,3 +1,14 @@
+2002-12-04 Matthias Clasen <maclas@gmx.de>
+
+ * gsignal.h (g_signal_add_emission_hook):
+ * gtype.h (g_type_interface_get_plugin): Sync parameter names with
+ docs and implementation.
+
+ * gtype.c (g_type_add_interface_dynamic):
+ (g_type_interface_get_plugin):
+ (g_type_interface_peek_parent):
+ (g_type_query): Add docs.
+
2002-12-03 Matthias Clasen <maclas@gmx.de>
* gtype.c (g_type_get_qdata):
diff --git a/gobject/gsignal.h b/gobject/gsignal.h
index f187f4017..c5295e62f 100644
--- a/gobject/gsignal.h
+++ b/gobject/gsignal.h
@@ -161,7 +161,7 @@ void g_signal_stop_emission (gpointer instance,
void g_signal_stop_emission_by_name (gpointer instance,
const gchar *detailed_signal);
gulong g_signal_add_emission_hook (guint signal_id,
- GQuark quark,
+ GQuark detail,
GSignalEmissionHook hook_func,
gpointer hook_data,
GDestroyNotify data_destroy);
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 95dc03b47..be8ac0db5 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -1961,6 +1961,16 @@ g_type_add_interface_static (GType instance_type,
G_WRITE_UNLOCK (&type_rw_lock);
}
+/**
+ * g_type_add_interface_dynamic:
+ * @instance_type: the #GType value of an instantiable type.
+ * @interface_type: the #GType value of an interface type.
+ * @plugin: the #GTypePlugin structure to retrieve the #GInterfaceInfo from.
+ *
+ * Adds the dynamic @interface_type to @instantiable_type. The information
+ * contained in the #GTypePlugin structure pointed to by @plugin
+ * is used to manage the relationship.
+ **/
void
g_type_add_interface_dynamic (GType instance_type,
GType interface_type,
@@ -2151,6 +2161,19 @@ g_type_interface_peek (gpointer instance_class,
return vtable;
}
+/**
+ * g_type_interface_peek_parent:
+ * @g_iface: A #GTypeInterface structure.
+ *
+ * Returns the corresponding #GTypeInterface structure of the parent type
+ * of the instance type to which @g_iface belongs. This is useful when
+ * deriving the implementation of an interface from the parent type and
+ * then possibly overriding some methods.
+ *
+ * Return value: The corresponding #GTypeInterface structure of the parent type
+ * of the instance type to which @g_iface belongs, or %NULL if the parent type
+ * doesn't conform to the interface.
+ **/
gpointer
g_type_interface_peek_parent (gpointer g_iface)
{
@@ -2550,6 +2573,18 @@ type_add_flags_W (TypeNode *node,
type_set_qdata_W (node, static_quark_type_flags, GUINT_TO_POINTER (dflags));
}
+/**
+ * g_type_query:
+ * @type: the #GType value of a static, classed type.
+ * @query: A user provided structure that is filled in with constant values
+ * upon success.
+ *
+ * Queries the type system for information about a specific type.
+ * This function will fill in a user-provided structure to hold type-specific
+ * information. If an invalid #GType is passed in, the @type member of the
+ * #GTypeQuery is 0. All members filled into the #GTypeQuery structure should
+ * be considered constant and have to be left untouched.
+ **/
void
g_type_query (GType type,
GTypeQuery *query)
@@ -2625,6 +2660,19 @@ g_type_get_plugin (GType type)
return node ? node->plugin : NULL;
}
+/**
+ * g_type_interface_get_plugin:
+ * @instance_type: the #GType value of an instantiatable type.
+ * @interface_type: the #GType value of an interface type.
+ *
+ * Returns the #GTypePlugin structure for the dynamic interface
+ * @interface_type which has been added to @instance_type, or
+ * %NULL if @interface_type has not been added to @instance_type or does
+ * not have a #GTypePlugin structure. See g_type_add_interface_dynamic().
+ *
+ * Return value: the #GTypePlugin for the dynamic interface @interface_type
+ * of @instance_type.
+ **/
GTypePlugin*
g_type_interface_get_plugin (GType instance_type,
GType interface_type)
diff --git a/gobject/gtype.h b/gobject/gtype.h
index 70570f5bb..611209f51 100644
--- a/gobject/gtype.h
+++ b/gobject/gtype.h
@@ -302,7 +302,7 @@ GType *g_type_interface_prerequisites (GType interface_t
/* --- protected (for fundamental type implementations) --- */
GTypePlugin* g_type_get_plugin (GType type);
GTypePlugin* g_type_interface_get_plugin (GType instance_type,
- GType implementation_type);
+ GType interface_type);
GType g_type_fundamental_next (void);
GType g_type_fundamental (GType type_id);
GTypeInstance* g_type_create_instance (GType type);