📄 param_value_types.sgml
字号:
<!-- ##### FUNCTION g_value_get_boxed ##### --><para>Get the contents of a %G_TYPE_BOXED derived #GValue.</para>@value: a valid #GValue of %G_TYPE_BOXED derived type@Returns: boxed contents of @value<!-- ##### FUNCTION g_value_dup_boxed ##### --><para>Get the contents of a %G_TYPE_BOXED derived #GValue.Upon getting, the boxed value is duplicated and needs to belater freed with g_boxed_free(), e.g. like: g_boxed_free (G_VALUE_TYPE (@value), return_value);</para>@value: a valid #GValue of %G_TYPE_BOXED derived type@Returns: boxed contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_POINTER ##### --><para>Returns whether the given #GParamSpec is of type %G_TYPE_PARAM_POINTER.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_POINTER ##### --><para>Casts a #GParamSpec instance into a #GParamSpecPointer.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_POINTER ##### --><para>Return whether the given #GValue can hold values of type %G_TYPE_POINTER.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_POINTER ##### --><para>The #GType of #GParamSpecPointer.</para><!-- ##### STRUCT GParamSpecPointer ##### --><para>A #GParamSpec derived structure that contains the meta data for pointer properties.</para>@parent_instance: private #GParamSpec portion<!-- ##### FUNCTION g_param_spec_pointer ##### --><para>Creates a new #GParamSpecPoiner instance specifying a pointer 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@flags: flags for the property specified@Returns: a newly created parameter specification<!-- ##### FUNCTION g_value_set_pointer ##### --><para>Set the contents of a pointer #GValue to @v_pointer.</para>@value: a valid #GValue of %G_TYPE_POINTER@v_pointer: pointer value to be set<!-- ##### FUNCTION g_value_get_pointer ##### --><para>Get the contents of a pointer #GValue.</para>@value: a valid #GValue of %G_TYPE_POINTER@Returns: pointer contents of @value<!-- ##### MACRO G_IS_PARAM_SPEC_OBJECT ##### --><para>Returns whether the given #GParamSpec is of type %G_TYPE_PARAM_OBJECT.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_OBJECT ##### --><para>Casts a #GParamSpec instance into a #GParamSpecObject.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_VALUE_HOLDS_OBJECT ##### --><para>Return whether the given #GValue can hold values derived from type %G_TYPE_OBJECT.</para>@value: a valid #GValue structure<!-- ##### MACRO G_TYPE_PARAM_OBJECT ##### --><para>The #GType of #GParamSpecObject.</para><!-- ##### STRUCT GParamSpecObject ##### --><para>A #GParamSpec derived structure that contains the meta data for object properties.</para>@parent_instance: private #GParamSpec portion<!-- ##### FUNCTION g_param_spec_object ##### --><para>Creates a new #GParamSpecBoxed instance specifying a %G_TYPE_OBJECT derived 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@object_type: %G_TYPE_OBJECT derived type of this property@flags: flags for the property specified@Returns: a newly created parameter specification<!-- ##### FUNCTION g_value_set_object ##### --><para>Set the contents of a %G_TYPE_OBJECT derived #GValue to @v_object.</para><para>g_value_set_object() increases the reference count of @v_object(the #GValue holds a reference to @v_object).If you do not wish to increase the reference count of the object(i.e. you wish to pass your current reference to the #GValue because you nolonger need it),use g_value_take_object() instead.</para><para>It is important that your #GValue holds a reference to @v_object (either itsown, or one it has taken) to ensure that the object won't be destroyed whilethe #GValue still exists).</para>@value: a valid #GValue of %G_TYPE_OBJECT derived type@v_object: object value to be set<!-- ##### FUNCTION g_value_take_object ##### --><para>Sets the contents of a %G_TYPE_OBJECT derived #GValue to @v_object and takes over the ownership of the callers reference to @v_object; the caller doesn't have to unref it any more (i.e. the referencecount of the object is not increased).</para><para>If you want the #GValue to hold its own reference to @v_object, useg_value_set_object() instead.</para>@value: a valid #GValue of %G_TYPE_OBJECT derived type@v_object: object value to be set@Since: 2.4<!-- ##### FUNCTION g_value_set_object_take_ownership ##### --><para>This is an internal function introduced mainly for C marshallers.</para>@value: a valid #GValue of %G_TYPE_OBJECT derived type@v_object: object value to be set@Deprecated: 2.4: Use g_value_take_object() instead.<!-- ##### FUNCTION g_value_get_object ##### --><para>Get the contents of a %G_TYPE_OBJECT derived #GValue.</para>@value: a valid #GValue of %G_TYPE_OBJECT derived type@Returns: object contents of @value<!-- ##### FUNCTION g_value_dup_object ##### --><para>Get the contents of a %G_TYPE_OBJECT derived #GValue, increasing its reference count.</para>@value: a valid #GValue whose type is derived from %G_TYPE_OBJECT@Returns: object content of @value, should be unreferenced when no longer needed.<!-- ##### MACRO G_IS_PARAM_SPEC_UNICHAR ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_UNICHAR.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_UNICHAR ##### --><para>Cast a #GParamSpec instance into a #GParamSpecUnichar.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_TYPE_PARAM_UNICHAR ##### --><para>The #GType of #GParamSpecUnichar.</para><!-- ##### STRUCT GParamSpecUnichar ##### --><para>A #GParamSpec derived structure that contains the meta data for unichar (unsigned integer) properties.</para>@parent_instance: private #GParamSpec portion@default_value: default value for the property specified<!-- ##### FUNCTION g_param_spec_unichar ##### --><para>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().</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<!-- ##### MACRO G_IS_PARAM_SPEC_VALUE_ARRAY ##### --><para>Return whether the given #GParamSpec is of type %G_TYPE_PARAM_VALUE_ARRAY.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_PARAM_SPEC_VALUE_ARRAY ##### --><para>Cast a #GParamSpec instance into a #GParamSpecValueArray.</para>@pspec: a valid #GParamSpec instance<!-- ##### MACRO G_TYPE_PARAM_VALUE_ARRAY ##### --><para>The #GType of #GParamSpecValueArray.</para><!-- ##### STRUCT GParamSpecValueArray ##### --><para>A #GParamSpec derived structure that contains the meta data for #GValueArray properties.</para>@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<!-- ##### FUNCTION g_param_spec_value_array ##### --><para>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().</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@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<!-- ##### MACRO G_IS_PARAM_SPEC_OVERRIDE ##### --><para>Returns whether the given #GParamSpec is of type %G_TYPE_PARAM_OVERRIDE.</para>@pspec: a #GParamSpec@Since: 2.4<!-- ##### MACRO G_PARAM_SPEC_OVERRIDE ##### --><para>Casts a #GParamSpec into a #GParamSpecOverride.</para>@pspec: a #GParamSpec@Since: 2.4<!-- ##### MACRO G_TYPE_PARAM_OVERRIDE ##### --><para>The #GType of #GParamSpecOverride.</para>@Since: 2.4<!-- ##### STRUCT GParamSpecOverride ##### --><para>This is a type of #GParamSpec type that simply redirects operations toanother paramspec. All operations other than getting orsetting the value are redirected, including accessing the nick andblurb, validating a value, and so forth. Seeg_param_spec_get_redirect_target() for retrieving the overiddenproperty. #GParamSpecOverride is used in implementingg_object_class_override_property(), and will not be directly usefulunless you are implementing a new base type similar to GObject.</para>@Since: 2.4<!-- ##### FUNCTION g_param_spec_override ##### --><para>Creates a new property of type #GParamSpecOverride. This is usedto direct operations to another paramspec, and will not be directlyuseful unless you are implementing a new base type similar to GObject.</para>@name: the name of the property.@overridden: The property that is being overridden@Returns: the newly created #GParamSpec@Since: 2.4<!-- ##### MACRO G_IS_PARAM_SPEC_GTYPE ##### --><para>Returns whether the given #GParamSpec is of type %G_TYPE_PARAM_GTYPE.</para>@pspec: a #GParamSpec@Since: 2.10<!-- ##### MACRO G_PARAM_SPEC_GTYPE ##### --><para>Casts a #GParamSpec into a #GParamSpecGType.</para>@pspec: a #GParamSpec@Since: 2.10<!-- ##### MACRO G_VALUE_HOLDS_GTYPE ##### --><para>Returns whether the given #GValue can hold values of type %G_TYPE_GTYPE.</para>@value: a valid #GValue structure@Since: 2.12<!-- ##### MACRO G_TYPE_PARAM_GTYPE ##### --><para>The #GType of #GParamSpecGType.</para>@Since: 2.10<!-- ##### STRUCT GParamSpecGType ##### --><para>A #GParamSpec derived structure that contains the meta data for #GType properties.</para>@parent_instance: private #GParamSpec portion@is_a_type: a #GType whose subtypes can occur as values@Since: 2.10<!-- ##### FUNCTION g_param_spec_gtype ##### --><para>Creates a new #GParamSpecGType instance specifying a %G_TYPE_GTYPE 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@is_a_type: a #GType whose subtypes are allowed as values of the property (use %G_TYPE_NONE for any type)@flags: flags for the property specified@Returns: a newly created parameter specification@Since: 2.10<!-- ##### FUNCTION g_value_get_gtype ##### --><para>Get the contents of a %G_TYPE_GTYPE #GValue.</para>@value: a valid #GValue of type %G_TYPE_GTYPE@Returns: the #GType stored in @value@Since: 2.12<!-- ##### FUNCTION g_value_set_gtype ##### --><para>Set the contents of a %G_TYPE_GTYPE #GValue to @v_gtype.</para>@value: a valid #GValue of type %G_TYPE_GTYPE@v_gtype: #GType to be set@Since: 2.12
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -