* gobject/tmpl/param_value_types.sgml: Move some docs inline.
* gsignal.c (g_signal_new): Typo fix.
* gparamspecs.c:
* gparam.c (g_param_spec_internal):
* gobject.c (g_object_class_install_property): Add docs.
+2002-12-15 Matthias Clasen <maclas@gmx.de>
+
+ * gobject/tmpl/param_value_types.sgml: Move some docs inline.
+
2002-12-15 Matthias Clasen <maclas@gmx.de>
* glib/Makefile.am (IGNORE_HFILES): Add gprintfint.h and trio.
<!-- ##### FUNCTION g_param_spec_boolean ##### -->
<para>
-Create a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_boolean ##### -->
<!-- ##### FUNCTION g_param_spec_char ##### -->
<para>
-Create a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_char ##### -->
<!-- ##### FUNCTION g_param_spec_uchar ##### -->
<para>
-Create a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_uchar ##### -->
<!-- ##### FUNCTION g_param_spec_int ##### -->
<para>
-Create a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_int ##### -->
<!-- ##### FUNCTION g_param_spec_uint ##### -->
<para>
-Create a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_uint ##### -->
<!-- ##### FUNCTION g_param_spec_long ##### -->
<para>
-Create a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_long ##### -->
Create a new #GParamSpecULong instance specifying a %G_TYPE_ULONG property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_ulong ##### -->
<!-- ##### FUNCTION g_param_spec_int64 ##### -->
<para>
-Create a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_int64 ##### -->
<!-- ##### FUNCTION g_param_spec_uint64 ##### -->
<para>
-Create a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64 property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_uint64 ##### -->
<!-- ##### FUNCTION g_param_spec_float ##### -->
<para>
-Create a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_float ##### -->
<!-- ##### FUNCTION g_param_spec_double ##### -->
<para>
-Create a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@minimum: minimum value for the property specified
-@maximum: maximum value for the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@minimum:
+@maximum:
+@default_value:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_double ##### -->
<!-- ##### FUNCTION g_param_spec_boxed ##### -->
<para>
-Create a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED derived property.
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@boxed_type: %G_TYPE_BOXED derived type of this property
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@boxed_type:
+@flags:
+@Returns:
<!-- ##### FUNCTION g_value_set_boxed ##### -->
<!-- ##### FUNCTION g_param_spec_unichar ##### -->
<para>
-Create a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT property.
-#GValue structures for this property
-can be accessed with g_value_set_uint() and g_value_get_uint().
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@default_value: default value for the property specified
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@default_value:
+@flags:
+@Returns:
<!-- ##### MACRO G_IS_PARAM_SPEC_VALUE_ARRAY ##### -->
<!-- ##### FUNCTION g_param_spec_value_array ##### -->
<para>
-Create a new #GParamSpecValueArray instance specifying a %G_TYPE_VALUE_ARRAY property.
-%G_TYPE_VALUE_ARRAY is a %G_TYPE_BOXED type, as such, #GValue structures for this property
-can be accessed with g_value_set_boxed() and g_value_get_boxed().
</para>
-@name: canonical name of the property specified
-@nick: nick name for the property specified
-@blurb: description of the property specified
-@element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL
-@flags: flags for the property specified
-@Returns: a newly created parameter specification
+@name:
+@nick:
+@blurb:
+@element_spec:
+@flags:
+@Returns:
+2002-12-15 Matthias Clasen <maclas@gmx.de>
+
+ * gsignal.c (g_signal_new): Typo fix.
+
+ * gparamspecs.c:
+ * gparam.c (g_param_spec_internal):
+ * gobject.c (g_object_class_install_property): Add docs.
+
2002-12-13 Matthias Clasen <maclas@gmx.de>
* glib-genmarshal.c, gobject-query.c: Use g_printf() instead of
1, G_TYPE_PARAM);
}
+/**
+ * g_object_class_install_property:
+ * @class: a #GObjectClass
+ * @property_id: the id for the new property
+ * @pspec: the #GParamSpec for the new property
+ *
+ * Installs a new property. This is usually done in the class initializer.
+ **/
void
g_object_class_install_property (GObjectClass *class,
guint property_id,
}
}
+/**
+ * g_param_spec_internal:
+ * @param_type: the #GType for the property; must be derived from #G_TYPE_PARAM
+ * @name: the canonical name of the property
+ * @nick: the nickname of the property
+ * @blurb: a short description of the property
+ * @flags: a combination of #GParamFlags
+ *
+ * Creates a new #GParamSpec instance.
+ *
+ * A property name consists of segments consisting of ASCII letters and
+ * digits, separated by either the '-' or '_' character. The first
+ * character of a property name must be a letter. Names which violate these
+ * rules lead to undefined behaviour.
+ *
+ * When creating and looking up a #GParamSpec<!-- -->s, either separator can
+ * be used, but they cannot be mixed. Using '-' is considerably more efficient
+ * and in fact <emphasis>required</emphasis> when using property names as
+ * detail strings for signals.
+ *
+ * Return value: a newly allocated #GParamSpec instance
+ **/
gpointer
g_param_spec_internal (GType param_type,
const gchar *name,
g_assert (spec_types == spec_types_bound);
}
-
/* --- GParamSpec initialization --- */
+
+/**
+ * g_param_spec_char:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_char (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (cspec);
}
+/**
+ * g_param_spec_uchar:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_uchar (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (uspec);
}
+/**
+ * g_param_spec_boolean:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_boolean (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (bspec);
}
+/**
+ * g_param_spec_int:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_int (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (ispec);
}
+/**
+ * g_param_spec_uint:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_uint (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (uspec);
}
+/**
+ * g_param_spec_long:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_long (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (lspec);
}
+/**
+ * g_param_spec_ulong:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecULong instance specifying a %G_TYPE_ULONG property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_ulong (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (uspec);
}
+/**
+ * g_param_spec_int64:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_int64 (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (lspec);
}
+/**
+ * g_param_spec_uint64:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_uint64 (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (uspec);
}
+/**
+ * g_param_spec_unichar:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecUnichar instance specifying a %G_TYPE_UINT
+ * property. #GValue structures for this property can be accessed with
+ * g_value_set_uint() and g_value_get_uint().
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_unichar (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (fspec);
}
+/**
+ * g_param_spec_float:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_float (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (fspec);
}
+/**
+ * g_param_spec_double:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @minimum: minimum value for the property specified
+ * @maximum: maximum value for the property specified
+ * @default_value: default value for the property specified
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE
+ * property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_double (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (pspec);
}
+/**
+ * g_param_spec_boxed:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @boxed_type: %G_TYPE_BOXED derived type of this property
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED
+ * derived property.
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_boxed (const gchar *name,
const gchar *nick,
return G_PARAM_SPEC (pspec);
}
+/**
+ * g_param_spec_value_array:
+ * @name: canonical name of the property specified
+ * @nick: nick name for the property specified
+ * @blurb: description of the property specified
+ * @element_spec: a #GParamSpec describing the elements contained in
+ * arrays of this property, may be %NULL
+ * @flags: flags for the property specified
+ *
+ * Creates a new #GParamSpecValueArray instance specifying a
+ * %G_TYPE_VALUE_ARRAY property. %G_TYPE_VALUE_ARRAY is a %G_TYPE_BOXED
+ * type, as such, #GValue structures for this property can be accessed
+ * with g_value_set_boxed() and g_value_get_boxed().
+ *
+ * See g_param_spec_internal() for details on property names.
+ *
+ * Return value: a newly created parameter specification
+ **/
GParamSpec*
g_param_spec_value_array (const gchar *name,
const gchar *nick,
*
* A signal name consists of segments consisting of ASCII letters and
* digits, separated by either the '-' or '_' character. The first
- * character of a signal names must be a letter. Names which violate these
+ * character of a signal name must be a letter. Names which violate these
* rules lead to undefined behaviour of the GSignal system.
*
* When registering a signal and looking up a signal, either separator can