param_value_types.sgml

来自「This GLib version 2.16.1. GLib is the lo」· SGML 代码 · 共 1,807 行 · 第 1/4 页

SGML
1,807
字号
<!-- ##### SECTION Title ##### -->Parameters and Values<!-- ##### SECTION Short_Description ##### -->Standard Parameter and Value Types<!-- ##### SECTION Long_Description ##### --><para>#GValue provides an abstract container structure which can be copied,transformed and compared while holding a value of any (derived) type, whichis 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 whichoperate on #GValue containers.</para><para>Parameter names need to start with a letter (a-z or A-Z). Subsequentcharacters can be letters, numbers or a '-'.All other characters are replaced by a '-' during construction.</para><!-- ##### SECTION See_Also ##### --><para>#GParamSpec, #GValue, g_object_class_install_property().</para><!-- ##### SECTION Stability_Level ##### --><!-- ##### MACRO G_IS_PARAM_SPEC_BOOLEAN ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_BOOLEAN.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_BOOLEAN ##### --><para>Cast a #GParamSpec instance into a #GParamSpecBoolean.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_BOOLEAN ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_BOOLEAN.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_BOOLEAN ##### --><para>The #GType of #GParamSpecBoolean.</para><!-- ##### STRUCT GParamSpecBoolean ##### --><para>A #GParamSpec derived structure that contains the meta data for boolean properties.</para>@parent_instance: private #GParamSpec portion@default_value:   default value for the property specified<!-- ##### FUNCTION g_param_spec_boolean ##### --><para>Creates a new #GParamSpecBoolean instance specifying a %G_TYPE_BOOLEAN property.</para><para> See g_param_spec_internal() for details on property names.</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<!-- ##### FUNCTION g_value_set_boolean ##### --><para>Set the contents of a %G_TYPE_BOOLEAN #GValue to @v_boolean.</para>@value:     a valid #GValue of type %G_TYPE_BOOLEAN@v_boolean: boolean value to be set<!-- ##### FUNCTION g_value_get_boolean ##### --><para>Get the contents of a %G_TYPE_BOOLEAN #GValue.</para>@value:   a valid #GValue of type %G_TYPE_BOOLEAN@Returns: boolean contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_CHAR ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_CHAR.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_CHAR ##### --><para>Cast a #GParamSpec instance into a #GParamSpecChar.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_CHAR ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_CHAR.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_CHAR ##### --><para>The #GType of #GParamSpecChar.</para><!-- ##### STRUCT GParamSpecChar ##### --><para>A #GParamSpec derived structure that contains the meta data for character properties.</para>@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<!-- ##### FUNCTION g_param_spec_char ##### --><para>Creates 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<!-- ##### FUNCTION g_value_set_char ##### --><para>Set the contents of a %G_TYPE_CHAR #GValue to @v_char.</para>@value:  a valid #GValue of type %G_TYPE_CHAR@v_char: character value to be set<!-- ##### FUNCTION g_value_get_char ##### --><para>Get the contents of a %G_TYPE_CHAR #GValue.</para>@value:   a valid #GValue of type %G_TYPE_CHAR@Returns: character contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_UCHAR ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UCHAR.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_UCHAR ##### --><para>Cast a #GParamSpec instance into a #GParamSpecUChar.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_UCHAR ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_UCHAR.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_UCHAR ##### --><para>The #GType of #GParamSpecUChar.</para><!-- ##### STRUCT GParamSpecUChar ##### --><para>A #GParamSpec derived structure that contains the meta data for unsigned character properties.</para>@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<!-- ##### FUNCTION g_param_spec_uchar ##### --><para>Creates 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<!-- ##### FUNCTION g_value_set_uchar ##### --><para>Set the contents of a %G_TYPE_UCHAR #GValue to @v_uchar.</para>@value:   a valid #GValue of type %G_TYPE_UCHAR@v_uchar: unsigned character value to be set<!-- ##### FUNCTION g_value_get_uchar ##### --><para>Get the contents of a %G_TYPE_UCHAR #GValue.</para>@value:   a valid #GValue of type %G_TYPE_UCHAR@Returns: unsigned character contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_INT ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_INT.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_INT ##### --><para>Cast a #GParamSpec instance into a #GParamSpecInt.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_INT ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_INT.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_INT ##### --><para>The #GType of #GParamSpecInt.</para><!-- ##### STRUCT GParamSpecInt ##### --><para>A #GParamSpec derived structure that contains the meta data for integer properties.</para>@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<!-- ##### FUNCTION g_param_spec_int ##### --><para>Creates a new #GParamSpecInt instance specifying a %G_TYPE_INT property.</para><para>See g_param_spec_internal() for details on property names.</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<!-- ##### FUNCTION g_value_set_int ##### --><para>Set the contents of a %G_TYPE_INT #GValue to @v_int.</para>@value: a valid #GValue of type %G_TYPE_INT@v_int: integer value to be set<!-- ##### FUNCTION g_value_get_int ##### --><para>Get the contents of a %G_TYPE_INT #GValue.</para>@value:   a valid #GValue of type %G_TYPE_INT@Returns: integer contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_UINT ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UINT.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_UINT ##### --><para>Cast a #GParamSpec instance into a #GParamSpecUInt.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_UINT ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_UINT.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_UINT ##### --><para>The #GType of #GParamSpecUInt.</para><!-- ##### STRUCT GParamSpecUInt ##### --><para>A #GParamSpec derived structure that contains the meta data for unsigned integer properties.</para>@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<!-- ##### FUNCTION g_param_spec_uint ##### --><para>Creates a new #GParamSpecUInt instance specifying a %G_TYPE_UINT property.</para><para>See g_param_spec_internal() for details on property names.</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<!-- ##### FUNCTION g_value_set_uint ##### --><para>Set the contents of a %G_TYPE_UINT #GValue to @v_uint.</para>@value:  a valid #GValue of type %G_TYPE_UINT@v_uint: unsigned integer value to be set<!-- ##### FUNCTION g_value_get_uint ##### --><para>Get the contents of a %G_TYPE_UINT #GValue.</para>@value:   a valid #GValue of type %G_TYPE_UINT@Returns: unsigned integer contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_LONG ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_LONG.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_LONG ##### --><para>Cast a #GParamSpec instance into a #GParamSpecLong.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_LONG ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_LONG.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_LONG ##### --><para>The #GType of #GParamSpecLong.</para><!-- ##### STRUCT GParamSpecLong ##### --><para>A #GParamSpec derived structure that contains the meta data for long integer properties.</para>@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<!-- ##### FUNCTION g_param_spec_long ##### --><para>Creates a new #GParamSpecLong instance specifying a %G_TYPE_LONG property.</para><para> See g_param_spec_internal() for details on property names.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?