* Since: 2.26
**/
const GVariantType *
-g_action_group_get_parameter_type (GActionGroup *action_group,
- const gchar *action_name)
+g_action_group_get_action_parameter_type (GActionGroup *action_group,
+ const gchar *action_name)
{
g_return_val_if_fail (G_IS_ACTION_GROUP (action_group), NULL);
return G_ACTION_GROUP_GET_IFACE (action_group)
- ->get_parameter_type (action_group, action_name);
+ ->get_action_parameter_type (action_group, action_name);
}
/**
* Since: 2.26
**/
const GVariantType *
-g_action_group_get_state_type (GActionGroup *action_group,
- const gchar *action_name)
+g_action_group_get_action_state_type (GActionGroup *action_group,
+ const gchar *action_name)
{
g_return_val_if_fail (G_IS_ACTION_GROUP (action_group), NULL);
return G_ACTION_GROUP_GET_IFACE (action_group)
- ->get_state_type (action_group, action_name);
+ ->get_action_state_type (action_group, action_name);
}
/**
* Since: 2.26
**/
GVariant *
-g_action_group_get_state_hint (GActionGroup *action_group,
- const gchar *action_name)
+g_action_group_get_action_state_hint (GActionGroup *action_group,
+ const gchar *action_name)
{
g_return_val_if_fail (G_IS_ACTION_GROUP (action_group), NULL);
return G_ACTION_GROUP_GET_IFACE (action_group)
- ->get_state_hint (action_group, action_name);
+ ->get_action_state_hint (action_group, action_name);
}
/**
* Since: 2.26
**/
gboolean
-g_action_group_get_enabled (GActionGroup *action_group,
- const gchar *action_name)
+g_action_group_get_action_enabled (GActionGroup *action_group,
+ const gchar *action_name)
{
g_return_val_if_fail (G_IS_ACTION_GROUP (action_group), FALSE);
return G_ACTION_GROUP_GET_IFACE (action_group)
- ->get_enabled (action_group, action_name);
+ ->get_action_enabled (action_group, action_name);
}
/**
* Since: 2.26
**/
GVariant *
-g_action_group_get_state (GActionGroup *action_group,
- const gchar *action_name)
+g_action_group_get_action_state (GActionGroup *action_group,
+ const gchar *action_name)
{
g_return_val_if_fail (G_IS_ACTION_GROUP (action_group), NULL);
return G_ACTION_GROUP_GET_IFACE (action_group)
- ->get_state (action_group, action_name);
+ ->get_action_state (action_group, action_name);
}
/**
* Since: 2.26
**/
void
-g_action_group_set_state (GActionGroup *action_group,
- const gchar *action_name,
- GVariant *value)
+g_action_group_change_action_state (GActionGroup *action_group,
+ const gchar *action_name,
+ GVariant *value)
{
g_return_if_fail (G_IS_ACTION_GROUP (action_group));
g_return_if_fail (action_name != NULL);
g_return_if_fail (value != NULL);
G_ACTION_GROUP_GET_IFACE (action_group)
- ->set_state (action_group, action_name, value);
+ ->change_action_state (action_group, action_name, value);
}
/**
* Since: 2.26
**/
void
-g_action_group_activate (GActionGroup *action_group,
- const gchar *action_name,
- GVariant *parameter)
+g_action_group_activate_action (GActionGroup *action_group,
+ const gchar *action_name,
+ GVariant *parameter)
{
g_return_if_fail (G_IS_ACTION_GROUP (action_group));
g_return_if_fail (action_name != NULL);
G_ACTION_GROUP_GET_IFACE (action_group)
- ->activate (action_group, action_name, parameter);
+ ->activate_action (action_group, action_name, parameter);
}
/**
GTypeInterface g_iface;
/* virtual functions */
- gboolean (* has_action) (GActionGroup *action_group,
- const gchar *action_name);
+ gboolean (* has_action) (GActionGroup *action_group,
+ const gchar *action_name);
- gchar ** (* list_actions) (GActionGroup *action_group);
+ gchar ** (* list_actions) (GActionGroup *action_group);
- gboolean (* get_enabled) (GActionGroup *action_group,
- const gchar *action_name);
+ gboolean (* get_action_enabled) (GActionGroup *action_group,
+ const gchar *action_name);
- const GVariantType * (* get_parameter_type) (GActionGroup *action_group,
- const gchar *action_name);
+ const GVariantType * (* get_action_parameter_type) (GActionGroup *action_group,
+ const gchar *action_name);
- const GVariantType * (* get_state_type) (GActionGroup *action_group,
- const gchar *action_name);
+ const GVariantType * (* get_action_state_type) (GActionGroup *action_group,
+ const gchar *action_name);
- GVariant * (* get_state_hint) (GActionGroup *action_group,
- const gchar *action_name);
+ GVariant * (* get_action_state_hint) (GActionGroup *action_group,
+ const gchar *action_name);
- GVariant * (* get_state) (GActionGroup *action_group,
- const gchar *action_name);
+ GVariant * (* get_action_state) (GActionGroup *action_group,
+ const gchar *action_name);
- void (* set_state) (GActionGroup *action_group,
- const gchar *action_name,
- GVariant *value);
+ void (* change_action_state) (GActionGroup *action_group,
+ const gchar *action_name,
+ GVariant *value);
- void (* activate) (GActionGroup *action_group,
- const gchar *action_name,
- GVariant *parameter);
+ void (* activate_action) (GActionGroup *action_group,
+ const gchar *action_name,
+ GVariant *parameter);
/* signals */
- void (* action_added) (GActionGroup *action_group,
- const gchar *action_name);
- void (* action_removed) (GActionGroup *action_group,
- const gchar *action_name);
- void (* action_enabled_changed) (GActionGroup *action_group,
- const gchar *action_name,
- gboolean enabled);
+ void (* action_added) (GActionGroup *action_group,
+ const gchar *action_name);
+ void (* action_removed) (GActionGroup *action_group,
+ const gchar *action_name);
+ void (* action_enabled_changed) (GActionGroup *action_group,
+ const gchar *action_name,
+ gboolean enabled);
void (* action_state_changed) (GActionGroup *action_group,
const gchar *action_name,
GVariant *value);
const gchar *action_name);
gchar ** g_action_group_list_actions (GActionGroup *action_group);
-const GVariantType * g_action_group_get_parameter_type (GActionGroup *action_group,
+const GVariantType * g_action_group_get_action_parameter_type (GActionGroup *action_group,
const gchar *action_name);
-const GVariantType * g_action_group_get_state_type (GActionGroup *action_group,
+const GVariantType * g_action_group_get_action_state_type (GActionGroup *action_group,
const gchar *action_name);
-GVariant * g_action_group_get_state_hint (GActionGroup *action_group,
+GVariant * g_action_group_get_action_state_hint (GActionGroup *action_group,
const gchar *action_name);
-gboolean g_action_group_get_enabled (GActionGroup *action_group,
+gboolean g_action_group_get_action_enabled (GActionGroup *action_group,
const gchar *action_name);
-GVariant * g_action_group_get_state (GActionGroup *action_group,
+GVariant * g_action_group_get_action_state (GActionGroup *action_group,
const gchar *action_name);
-void g_action_group_set_state (GActionGroup *action_group,
+void g_action_group_change_action_state (GActionGroup *action_group,
const gchar *action_name,
GVariant *value);
-void g_action_group_activate (GActionGroup *action_group,
+void g_action_group_activate_action (GActionGroup *action_group,
const gchar *action_name,
GVariant *parameter);
iface->has_action = g_application_has_action;
iface->list_actions = g_application_list_actions;
- iface->get_enabled = g_application_get_action_enabled;
- iface->get_parameter_type = g_application_get_action_parameter_type;
- iface->get_state_type = g_application_get_action_state_type;
- iface->get_state_hint = g_application_get_action_state_hint;
- iface->get_state = g_application_get_action_state;
- iface->set_state = g_application_change_action_state;
- iface->activate = g_application_activate_action;
+ iface->get_action_enabled = g_application_get_action_enabled;
+ iface->get_action_parameter_type = g_application_get_action_parameter_type;
+ iface->get_action_state_type = g_application_get_action_state_type;
+ iface->get_action_state_hint = g_application_get_action_state_hint;
+ iface->get_action_state = g_application_get_action_state;
+ iface->change_action_state = g_application_change_action_state;
+ iface->activate_action = g_application_activate_action;
}
/* Epilogue {{{1 */
{
iface->list_actions = g_simple_action_group_list_actions;
iface->has_action = g_simple_action_group_has_action;
- iface->get_parameter_type = g_simple_action_group_get_parameter_type;
- iface->get_state_type = g_simple_action_group_get_state_type;
- iface->get_state_hint = g_simple_action_group_get_state_hint;
- iface->get_enabled = g_simple_action_group_get_enabled;
- iface->get_state = g_simple_action_group_get_state;
- iface->set_state = g_simple_action_group_set_state;
- iface->activate = g_simple_action_group_activate;
+ iface->get_action_parameter_type = g_simple_action_group_get_parameter_type;
+ iface->get_action_state_type = g_simple_action_group_get_state_type;
+ iface->get_action_state_hint = g_simple_action_group_get_state_hint;
+ iface->get_action_enabled = g_simple_action_group_get_enabled;
+ iface->get_action_state = g_simple_action_group_get_state;
+ iface->change_action_state = g_simple_action_group_set_state;
+ iface->activate_action = g_simple_action_group_activate;
}
/**
g_object_unref (simple);
g_assert (!a.did_run);
- g_action_group_activate (G_ACTION_GROUP (group), "foo", NULL);
+ g_action_group_activate_action (G_ACTION_GROUP (group), "foo", NULL);
g_assert (a.did_run);
simple = g_simple_action_new_stateful ("bar", G_VARIANT_TYPE_STRING, g_variant_new_string ("hihi"));
g_assert_cmpint (g_strv_length (actions), ==, 2);
g_assert (strv_set_equal (actions, "foo", "bar", NULL));
g_strfreev (actions);
- g_assert (g_action_group_get_enabled (G_ACTION_GROUP (group), "foo"));
- g_assert (g_action_group_get_enabled (G_ACTION_GROUP (group), "bar"));
- g_assert (g_action_group_get_parameter_type (G_ACTION_GROUP (group), "foo") == NULL);
- g_assert (g_variant_type_equal (g_action_group_get_parameter_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
- g_assert (g_action_group_get_state_type (G_ACTION_GROUP (group), "foo") == NULL);
- g_assert (g_variant_type_equal (g_action_group_get_state_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
- g_assert (g_action_group_get_state_hint (G_ACTION_GROUP (group), "foo") == NULL);
- g_assert (g_action_group_get_state_hint (G_ACTION_GROUP (group), "bar") == NULL);
- g_assert (g_action_group_get_state (G_ACTION_GROUP (group), "foo") == NULL);
- state = g_action_group_get_state (G_ACTION_GROUP (group), "bar");
+ g_assert (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "foo"));
+ g_assert (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
+ g_assert (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "foo") == NULL);
+ g_assert (g_variant_type_equal (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
+ g_assert (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "foo") == NULL);
+ g_assert (g_variant_type_equal (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
+ g_assert (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "foo") == NULL);
+ g_assert (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "bar") == NULL);
+ g_assert (g_action_group_get_action_state (G_ACTION_GROUP (group), "foo") == NULL);
+ state = g_action_group_get_action_state (G_ACTION_GROUP (group), "bar");
g_assert (g_variant_type_equal (g_variant_get_type (state), G_VARIANT_TYPE_STRING));
g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "hihi");
g_variant_unref (state);
- g_action_group_set_state (G_ACTION_GROUP (group), "bar", g_variant_new_string ("boo"));
- state = g_action_group_get_state (G_ACTION_GROUP (group), "bar");
+ g_action_group_change_action_state (G_ACTION_GROUP (group), "bar", g_variant_new_string ("boo"));
+ state = g_action_group_get_action_state (G_ACTION_GROUP (group), "bar");
g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "boo");
g_variant_unref (state);
action = g_simple_action_group_lookup (group, "bar");
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
- g_assert (!g_action_group_get_enabled (G_ACTION_GROUP (group), "bar"));
+ g_assert (!g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
g_simple_action_group_remove (group, "bar");
action = g_simple_action_group_lookup (group, "foo");