虚方法
GioMenuModelget_item_attribute_value
自:2.32
声明 [src]
GVariant*
get_item_attribute_value (
GMenuModel* model,
gint item_index,
const gchar* attribute,
const GVariantType* expected_type
)
描述 [src]
查询在 model 中位置 item_index 的项目并获取由 attribute 指定的属性。
如果 expected_type 非空,则指定属性的关注类型。如果是 NULL,则接受任何类型。
如果属性存在且与 expected_type 匹配(或者如果预期类型未指定)则返回值。
如果属性不存在或与预期类型不匹配,则返回 NULL。
自:2.32
参数
item_index-
类型:
gint项目的索引。
attribute-
类型:
const gchar*要查询的属性。
数据由方法调用方拥有。 值是空终止的 UTF-8 字符串。 expected_type-
类型:
GVariantType属性的预期类型,或
NULL。参数可以是 NULL。数据由方法调用方拥有。
返回值
类型: GVariant
属性的值。
| 方法的调用方取得返回数据的所有权,并负责释放它。 |
返回值可以为 NULL。 |