GMenuItem: add getter APIs

GMenuItem has been write-only up to this point.  Add some APIs for
reading back values as well.
This commit is contained in:
Ryan Lortie
2012-08-18 14:20:59 -04:00
parent ad79b0f8ef
commit 99478dd893
4 changed files with 137 additions and 0 deletions

View File

@@ -102,6 +102,19 @@ GMenuItem * g_menu_item_new_submenu (const gchar *label,
GMenuItem * g_menu_item_new_section (const gchar *label,
GMenuModel *section);
GLIB_AVAILABLE_IN_2_34
GVariant * g_menu_item_get_attribute_value (GMenuItem *menu_item,
const gchar *attribute,
const GVariantType *expected_value);
GLIB_AVAILABLE_IN_2_34
gboolean g_menu_item_get_attribute (GMenuItem *menu_item,
const gchar *attribute,
const gchar *format_string,
...);
GLIB_AVAILABLE_IN_2_34
GMenuModel *g_menu_item_get_link (GMenuItem *menu_item,
const gchar *link);
void g_menu_item_set_attribute_value (GMenuItem *menu_item,
const gchar *attribute,
GVariant *value);