Method

GioMenuItemget_attribute

Declaration

gboolean
g_menu_item_get_attribute (
  GMenuItem* menu_item,
  const gchar* attribute,
  const gchar* format_string,
  ...
)

Description

Queries the named attribute on menu_item.

If the attribute exists and matches the GVariantType corresponding to format_string then format_string is used to deconstruct the value into the positional parameters and TRUE is returned.

If the attribute does not exist, or it does exist but has the wrong type, then the positional parameters are ignored and FALSE is returned.

Available since:2.34
This method is not directly available to language bindings.

Parameters

attribute const gchar*
 

The attribute name to query.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
format_string const gchar*
 

A GVariant format string.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
...
 

Positional parameters, as per format_string.

Return value

Returns: gboolean
 

TRUE if the named attribute was found with the expected type.