⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gparamspec.sgml

📁 This GLib version 2.16.1. GLib is the low-level core library that forms the basis for projects such
💻 SGML
📖 第 1 页 / 共 2 页
字号:
<!-- ##### SECTION Title ##### -->GParamSpec<!-- ##### SECTION Short_Description ##### -->Metadata for parameter specifications<!-- ##### SECTION Long_Description ##### --><para>#GParamSpec is an object structure that encapsulates the metadatarequired to specify parameters, such as e.g. #GObject properties.</para><para id="canonical-parameter-name">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.The result of this replacement is called the canonical name of theparameter.</para><!-- ##### SECTION See_Also ##### --><para>g_object_class_install_property(), g_object_set(), g_object_get(),g_object_set_property(), g_object_get_property(), g_value_register_transform_func()</para><!-- ##### SECTION Stability_Level ##### --><!-- ##### MACRO G_TYPE_IS_PARAM ##### --><para>Returns whether @type "is a" %G_TYPE_PARAM.</para>@type: a #GType ID<!-- ##### MACRO G_PARAM_SPEC ##### --><para>Casts a derived #GParamSpec object (e.g. of type #GParamSpecInt) intoa #GParamSpec object.</para>@pspec: a valid #GParamSpec<!-- ##### MACRO G_IS_PARAM_SPEC ##### --><para>Checks whether @pspec "is a" valid #GParamSpec structure of type %G_TYPE_PARAMor derived.</para>@pspec: a #GParamSpec<!-- ##### MACRO G_PARAM_SPEC_CLASS ##### --><para>Casts a derived #GParamSpecClass structure into a #GParamSpecClass structure.</para>@pclass: a valid #GParamSpecClass<!-- ##### MACRO G_IS_PARAM_SPEC_CLASS ##### --><para>Checks whether @pclass "is a" valid #GParamSpecClass structure of type %G_TYPE_PARAM or derived.</para>@pclass: a #GParamSpecClass<!-- ##### MACRO G_PARAM_SPEC_GET_CLASS ##### --><para>Retrieves the #GParamSpecClass of a #GParamSpec.</para>@pspec: a valid #GParamSpec<!-- ##### MACRO G_PARAM_SPEC_TYPE ##### --><para>Retrieves the #GType of this @pspec.</para>@pspec: a valid #GParamSpec<!-- ##### MACRO G_PARAM_SPEC_TYPE_NAME ##### --><para>Retrieves the #GType name of this @pspec.</para>@pspec: a valid #GParamSpec<!-- ##### MACRO G_PARAM_SPEC_VALUE_TYPE ##### --><para>Retrieves the #GType to initialize a #GValue for this parameter.</para>@pspec: a valid #GParamSpec<!-- ##### STRUCT GParamSpec ##### --><para>All fields of the <structname>GParamSpec</structname> struct are private andshould not be used directly, except for the following:</para>@g_type_instance: private #GTypeInstance portion@name:            name of this parameter@flags:           #GParamFlags flags for this parameter@value_type:      the #GValue type for this parameter@owner_type:      #GType type that uses (introduces) this paremeter<!-- ##### STRUCT GParamSpecClass ##### --><para>The class structure for the <structname>GParamSpec</structname> type.Normally, <structname>GParamSpec</structname> classes are filled byg_param_type_register_static().</para>@g_type_class: the parent class@value_type: the #GValue type for this parameter@finalize: The instance finalization function (optional), should chain   up to the finalize method of the parent class.@value_set_default: Resets a @value to the default value for this type  (recommended, the default is g_value_reset()), see   g_param_value_set_default().@value_validate: Ensures that the contents of @value comply with the   specifications set out by this type (optional), see   g_param_value_set_validate().@values_cmp: Compares @value1 with @value2 according to this type  (recommended, the default is memcmp()), see g_param_values_cmp().<!-- ##### ENUM GParamFlags ##### --><para>Through the #GParamFlags flag values, certain aspects of parameterscan be configured.</para>@G_PARAM_READABLE:       the parameter is readable@G_PARAM_WRITABLE:       the parameter is writable@G_PARAM_CONSTRUCT:      the parameter will be set upon object construction@G_PARAM_CONSTRUCT_ONLY: the parameter will only be set upon object construction@G_PARAM_LAX_VALIDATION: upon parameter conversion (see g_param_value_convert())                         strict validation is not required@G_PARAM_STATIC_NAME:    the string used as name when constructing the                          parameter is guaranteed to remain valid and                         unmodified for the lifetime of the parameter.                          Since 2.8@G_PARAM_PRIVATE: @G_PARAM_STATIC_NICK: @G_PARAM_STATIC_BLURB:   the string used as blurb when constructing the                          parameter is guaranteed to remain valid and                          unmodified for the lifetime of the parameter.                          Since 2.8<!-- ##### MACRO G_PARAM_READWRITE ##### --><para>#GParamFlags value alias for %G_PARAM_READABLE | %G_PARAM_WRITABLE.</para><!-- ##### MACRO G_PARAM_STATIC_STRINGS ##### --><para>#GParamFlags value alias for %G_PARAM_STATIC_NAME | %G_PARAM_STATIC_NICK | %G_PARAM_STATIC_BLURB.Since 2.13.0</para><!-- ##### MACRO G_PARAM_MASK ##### --><para>Mask containing the bits of #GParamSpec.flags which are reserved for GLib.</para><!-- ##### MACRO G_PARAM_USER_SHIFT ##### --><para>Minimum shift count to be used for user defined flags, to be stored in#GParamSpec.flags.</para><!-- ##### FUNCTION g_param_spec_ref ##### --><para>Increments the reference count of @pspec.</para>@pspec:   a valid #GParamSpec@Returns: the #GParamSpec that was passed into this function<!-- ##### FUNCTION g_param_spec_unref ##### --><para>Decrements the reference count of a @pspec.</para>@pspec: a valid #GParamSpec<!-- ##### FUNCTION g_param_spec_sink ##### --><para>The initial reference count of a newly created #GParamSpec is 1, even though no one has explicitly called g_param_spec_ref() on it yet. So the initial reference count is flagged as "floating", until someone calls <literal>g_param_spec_ref (pspec); g_param_spec_sink (pspec);</literal>in sequence on it, taking over the initial reference count (thusending up with a @pspec that has a reference count of 1 still, but isnot flagged "floating" anymore).</para>@pspec: a valid #GParamSpec<!-- ##### FUNCTION g_param_spec_ref_sink ##### --><para>Convenience function to ref and sink a #GParamSpec.</para>@pspec: a valid #GParamSpec@Returns: the #GParamSpec that was passed into this function@Since: 2.10<!-- ##### FUNCTION g_param_value_set_default ##### --><para>Sets @value to its default value as specified in @pspec.</para>@pspec: a valid #GParamSpec@value: a #GValue of correct type for @pspec<!-- ##### FUNCTION g_param_value_defaults ##### --><para>Checks whether @value contains the default value as specified in @pspec.</para>@pspec:   a valid #GParamSpec@value:   a #GValue of correct type for @pspec@Returns: whether @value contains the canonical default for this @pspec<!-- ##### FUNCTION g_param_value_validate ##### --><para>Ensures that the contents of @value comply with the specificationsset out by @pspec. For example, a #GParamSpecInt might requirethat integers stored in @value may not be smaller than -42 and not begreater than +42. If @value contains an integer outside of this range,it is modified accordingly, so the resulting value will fit into therange -42 .. +42.</para>@pspec:   a valid #GParamSpec@value:   a #GValue of correct type for @pspec@Returns: whether modifying @value was necessary to ensure validity<!-- ##### FUNCTION g_param_value_convert ##### --><para>Transforms @src_value into @dest_value if possible, and then validates @dest_value, in order for it to conform to @pspec.If @strict_validation is %TRUE this function will only succeed if

⌨️ 快捷键说明

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