方法
GioMenuItemget_attribute_value
自:2.34
声明 [源]
GVariant*
g_menu_item_get_attribute_value (
GMenuItem* menu_item,
const gchar* attribute,
const GVariantType* expected_type
)
描述 [源]
查询 menu_item 上的命名 attribute。
如果指定了 expected_type 但属性没有这种类型,则返回 NULL。如果属性根本不存在,也返回 NULL。
自:2.34
参数
attribute-
类型:
const gchar*要查询的属性名。
数据由方法调用者拥有。 值是一个以空字符终止的 UTF-8 字符串。 expected_type-
类型:
GVariantType属性的预期类型。
参数可以是 NULL。数据由方法调用者拥有。
返回值
类型: GVariant
属性值,或 NULL。
| 方法的调用者拥有返回的数据,并负责释放它。 |
返回值可以是 NULL。 |