From e5c99d932f79b11f35f0d604ef4ad8b4e4d0a7ba Mon Sep 17 00:00:00 2001 From: Tim Janik Date: Wed, 14 Nov 2001 03:01:31 +0000 Subject: [PATCH] more docs. Wed Nov 14 03:19:49 2001 Tim Janik * gobject/tmp/param_value_types.sgml: more docs. --- docs/reference/ChangeLog | 4 + docs/reference/gobject/tmpl/gtype.sgml | 1 - docs/reference/gobject/tmpl/param_value_types.sgml | 702 +++++++++++---------- 3 files changed, 361 insertions(+), 346 deletions(-) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 430cc0b..f58fbb3 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 14 03:19:49 2001 Tim Janik + + * gobject/tmp/param_value_types.sgml: more docs. + Tue Nov 13 21:31:58 2001 Tim Janik * gobject/tmp/param_value_types.sgml: list parameter and diff --git a/docs/reference/gobject/tmpl/gtype.sgml b/docs/reference/gobject/tmpl/gtype.sgml index 76c9d4b..33abba9 100644 --- a/docs/reference/gobject/tmpl/gtype.sgml +++ b/docs/reference/gobject/tmpl/gtype.sgml @@ -225,7 +225,6 @@ The predefined identifiers of the reserved fundamental types. @G_TYPE_PARAM_BOXED: Identifier for the "#GParamSpecBoxed" type. @G_TYPE_PARAM_POINTER: Identifier for the "#GParamSpecPointer" type. @G_TYPE_PARAM_VALUE_ARRAY: Identifier for the "#GParamSpecValueArray" type. -@G_TYPE_PARAM_CLOSURE: Identifier for the "#GParamClosure" type. @G_TYPE_PARAM_OBJECT: Identifier for the "#GParamSpecObject" type. diff --git a/docs/reference/gobject/tmpl/param_value_types.sgml b/docs/reference/gobject/tmpl/param_value_types.sgml index 654cd48..9b610fd 100644 --- a/docs/reference/gobject/tmpl/param_value_types.sgml +++ b/docs/reference/gobject/tmpl/param_value_types.sgml @@ -1,752 +1,757 @@ -Standard Parameter and Value Types +Parameters and Values - +Standard Parameter and Value Types. - +#GValue provides an abstract container structure which can be copied, +transformed and compared while holding a value of any (derived) type, which +is registered as a #GType with a #GTypeValueTable in its #GTypeInfo structure. +Parameter specifications for most value types can be created as +#GParamSpec derived instances, to implement e.g. #GObject properties which +operate on #GValue containers. - +#GParamSpec, #GValue, g_object_class_install_property(). - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecBoolean. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_BOOLEAN. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for boolean properties. -@parent_instance: -@default_value: +@parent_instance: private #GParamSpec portion +@default_value: default value for the property specified - +Create a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN property. -@name: -@nick: -@blurb: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean. -@value: -@v_boolean: +@value: a valid #GValue of type %G_TYPE_BOOLEAN +@v_boolean: boolean value to be set - +Get the contents of a %G_TYPE_BOOLEAN #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_BOOLEAN +@Returns: boolean contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecChar. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_CHAR. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for character properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecChar instance specifying a %G_TYPE_CHAR property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_CHAR #GValue to @v_char. -@value: -@v_char: +@value: a valid #GValue of type %G_TYPE_CHAR +@v_char: character value to be set - +Get the contents of a %G_TYPE_CHAR #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_CHAR +@Returns: character contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecUChar. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_UCHAR. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for unsigned character properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecUChar instance specifying a %G_TYPE_UCHAR property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar. -@value: -@v_uchar: +@value: a valid #GValue of type %G_TYPE_UCHAR +@v_uchar: unsigned character value to be set - +Get the contents of a %G_TYPE_UCHAR #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_UCHAR +@Returns: unsigned character contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_INT. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecInt. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_INT. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for integer properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecInt instance specifying a %G_TYPE_INT property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_INT #GValue to @v_int. -@value: -@v_int: +@value: a valid #GValue of type %G_TYPE_INT +@v_int: integer value to be set - +Get the contents of a %G_TYPE_INT #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_INT +@Returns: integer contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecUInt. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_UINT. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for unsigned integer properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_UINT #GValue to @v_uint. -@value: -@v_uint: +@value: a valid #GValue of type %G_TYPE_UINT +@v_uint: unsigned integer value to be set - +Get the contents of a %G_TYPE_UINT #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_UINT +@Returns: unsigned integer contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecLong. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_LONG. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for long integer properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecLong instance specifying a %G_TYPE_LONG property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_LONG #GValue to @v_long. -@value: -@v_long: +@value: a valid #GValue of type %G_TYPE_LONG +@v_long: long integer value to be set - +Get the contents of a %G_TYPE_LONG #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_LONG +@Returns: long integer contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_ULONG. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecULong. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_ULONG. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for unsigned long integer properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecULong instance specifying a %G_TYPE_ULONG property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_ULONG #GValue to @v_ulong. -@value: -@v_ulong: +@value: a valid #GValue of type %G_TYPE_ULONG +@v_ulong: unsigned long integer value to be set - +Get the contents of a %G_TYPE_ULONG #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_ULONG +@Returns: unsigned long integer contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_INT64. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecInt64. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_INT64. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for 64bit integer properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecInt64 instance specifying a %G_TYPE_INT64 property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_INT64 #GValue to @v_int64. -@value: -@v_int64: +@value: a valid #GValue of type %G_TYPE_INT64 +@v_int64: 64bit integer value to be set - +Get the contents of a %G_TYPE_INT64 #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_INT64 +@Returns: 64bit integer contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT64. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecUInt64. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_UINT64. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for unsigned 64bit integer properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified - +Create a new #GParamSpecUInt64 instance specifying a %G_TYPE_UINT64 property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_UINT64 #GValue to @v_uint64. -@value: -@v_uint64: +@value: a valid #GValue of type %G_TYPE_UINT64 +@v_uint64: unsigned 64bit integer value to be set - +Get the contents of a %G_TYPE_UINT64 #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_UINT64 +@Returns: unsigned 64bit integer contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_FLOAT. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecFloat. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_FLOAT. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for float properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified @epsilon: - +Create a new #GParamSpecFloat instance specifying a %G_TYPE_FLOAT property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_FLOAT #GValue to @v_float. -@value: -@v_float: +@value: a valid #GValue of type %G_TYPE_FLOAT +@v_float: float value to be set - +Get the contents of a %G_TYPE_FLOAT #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_FLOAT +@Returns: float contents of @value - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_DOUBLE. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecDouble. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values of type %G_TYPE_DOUBLE. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for double properties. -@parent_instance: -@minimum: -@maximum: -@default_value: +@parent_instance: private #GParamSpec portion +@minimum: minimum value for the property specified +@maximum: maximum value for the property specified +@default_value: default value for the property specified @epsilon: - +Create a new #GParamSpecDouble instance specifying a %G_TYPE_DOUBLE property. -@name: -@nick: -@blurb: -@minimum: -@maximum: -@default_value: -@flags: -@Returns: +@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 - +Set the contents of a %G_TYPE_DOUBLE #GValue to @v_double. -@value: -@v_double: +@value: a valid #GValue of type %G_TYPE_DOUBLE +@v_double: double value to be set - +Get the contents of a %G_TYPE_DOUBLE #GValue. -@value: -@Returns: +@value: a valid #GValue of type %G_TYPE_DOUBLE +@Returns: double contents of @value @@ -1047,65 +1052,66 @@ Standard Parameter and Value Types - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_BOXED. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecBoxed. -@pspec: +@pspec: a valid #GParamSpec instance - +Return whether the given #GValue can hold values derived from type %G_TYPE_BOXED. -@value: +@value: a valid #GValue structure - +A #GParamSpec derived structure that contains the meta data for boxed properties. -@parent_instance: +@parent_instance: private #GParamSpec portion - +Create a new #GParamSpecBoxed instance specifying a %G_TYPE_BOXED derived property. -@name: -@nick: -@blurb: -@boxed_type: -@flags: -@Returns: +@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 -Assign a #GValue which is initialized with a certain boxed type a -boxed structure of that very same type. +Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. -@value: The #GValue to be assigned a value to. -@boxed: The boxed structure which has to be of the same type the #GValue got initialized with. +@value: a valid #GValue of %G_TYPE_BOXED derived type +@v_boxed: boxed value to be set - +Set the contents of a %G_TYPE_BOXED derived #GValue to @v_boxed. +The boxed value is assumed to be static, and is thus not duplicated +when setting the #GValue. -@value: -@boxed: +@value: a valid #GValue of %G_TYPE_BOXED derived type +@v_boxed: static boxed value to be set @@ -1113,26 +1119,28 @@ boxed structure of that very same type. This is an internal function introduced mainly for C marshallers. -@value: -@boxed: +@value: a valid #GValue of %G_TYPE_BOXED derived type +@v_boxed: duplicated unowned boxed value to be set - +Get the contents of a %G_TYPE_BOXED derived #GValue. -@value: -@Returns: +@value: a valid #GValue of %G_TYPE_BOXED derived type +@Returns: boxed contents of @value - +Get the contents of a %G_TYPE_BOXED derived #GValue. +Upon getting, the boxed value is duplicated and needs to be +later freed with g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value), return_value); -@value: -@Returns: +@value: a valid #GValue of %G_TYPE_BOXED derived type +@Returns: boxed contents of @value @@ -1269,76 +1277,80 @@ This is an internal function introduced mainly for C marshallers. - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecUnichar. -@pspec: +@pspec: a valid #GParamSpec instance - +A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties. -@parent_instance: -@default_value: +@parent_instance: private #GParamSpec portion +@default_value: default value for the property specified - +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(). -@name: -@nick: -@blurb: -@default_value: -@flags: -@Returns: +@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 - +Return whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY. -@pspec: +@pspec: a valid #GParamSpec instance - +Cast a #GParamSpec instance into a #GParamSpecValueArray. -@pspec: +@pspec: a valid #GParamSpec instance - +A #GParamSpec derived structure that contains the meta data for #GValueArray properties. -@parent_instance: -@element_spec: -@fixed_n_elements: +@parent_instance: private #GParamSpec portion +@element_spec: a #GParamSpec describing the elements contained in arrays of this property, may be %NULL +@fixed_n_elements: if greater than 0, arrays of this property will always have this many elements - +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(). -@name: -@nick: -@blurb: -@element_spec: -@flags: -@Returns: +@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 -- 2.7.4