summaryrefslogtreecommitdiff
path: root/gio/gactiongroup.h
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-11-24 19:52:48 -0500
committerMatthias Clasen <mclasen@redhat.com>2011-11-26 19:25:32 -0500
commitf468e9c3097cb8a797091822c52fee29d5bdca90 (patch)
treeabf98db00565940a8a0449939e94fb7f10c3e1f5 /gio/gactiongroup.h
parentfcc69fd318f55ca0edc52864b4c0488b304b8382 (diff)
downloadglib-f468e9c3097cb8a797091822c52fee29d5bdca90.tar.gz
Add g_action_group_query_action()
This new API allows requesting multiple pieces of information about a particular action in one go and also simplifies the burden for GActionGroup implementations -- they need not implement all the separate APIs now.
Diffstat (limited to 'gio/gactiongroup.h')
-rw-r--r--gio/gactiongroup.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/gio/gactiongroup.h b/gio/gactiongroup.h
index 94602af07..602077687 100644
--- a/gio/gactiongroup.h
+++ b/gio/gactiongroup.h
@@ -105,6 +105,15 @@ struct _GActionGroupInterface
void (* action_state_changed) (GActionGroup *action_group,
const gchar *action_name,
GVariant *state);
+
+ /* more virtual functions */
+ gboolean (* query_action) (GActionGroup *action_group,
+ const gchar *action_name,
+ gboolean *enabled,
+ const GVariantType **parameter_type,
+ const GVariantType **state_type,
+ GVariant **state_hint,
+ GVariant **state);
};
GType g_action_group_get_type (void) G_GNUC_CONST;
@@ -146,6 +155,14 @@ void g_action_group_action_state_changed (GAction
const gchar *action_name,
GVariant *state);
+gboolean g_action_group_query_action (GActionGroup *action_group,
+ const gchar *action_name,
+ gboolean *enabled,
+ const GVariantType **parameter_type,
+ const GVariantType **state_type,
+ GVariant **state_hint,
+ GVariant **state);
+
G_END_DECLS
#endif /* __G_ACTION_GROUP_H__ */