• Home
  • Raw
  • Download

Lines Matching refs:action

14 activate (GAction  *action,  in activate()  argument
31 GSimpleAction *action; in test_basic() local
38 action = g_simple_action_new ("foo", NULL); in test_basic()
39 g_assert_true (g_action_get_enabled (G_ACTION (action))); in test_basic()
40 g_assert_null (g_action_get_parameter_type (G_ACTION (action))); in test_basic()
41 g_assert_null (g_action_get_state_type (G_ACTION (action))); in test_basic()
42 g_assert_null (g_action_get_state_hint (G_ACTION (action))); in test_basic()
43 g_assert_null (g_action_get_state (G_ACTION (action))); in test_basic()
44 g_object_get (action, in test_basic()
58 g_signal_connect (action, "activate", G_CALLBACK (activate), &a); in test_basic()
60 g_action_activate (G_ACTION (action), NULL); in test_basic()
64 g_simple_action_set_enabled (action, FALSE); in test_basic()
65 g_action_activate (G_ACTION (action), NULL); in test_basic()
72 g_action_activate (G_ACTION (action), g_variant_new_string ("xxx")); in test_basic()
76 g_object_unref (action); in test_basic()
79 action = g_simple_action_new ("foo", G_VARIANT_TYPE_STRING); in test_basic()
80 g_assert_true (g_action_get_enabled (G_ACTION (action))); in test_basic()
81 …g_assert_true (g_variant_type_equal (g_action_get_parameter_type (G_ACTION (action)), G_VARIANT_TY… in test_basic()
82 g_assert_null (g_action_get_state_type (G_ACTION (action))); in test_basic()
83 g_assert_null (g_action_get_state_hint (G_ACTION (action))); in test_basic()
84 g_assert_null (g_action_get_state (G_ACTION (action))); in test_basic()
86 g_signal_connect (action, "activate", G_CALLBACK (activate), &a); in test_basic()
88 g_action_activate (G_ACTION (action), g_variant_new_string ("Hello world")); in test_basic()
98 g_action_activate (G_ACTION (action), NULL); in test_basic()
102 g_object_unref (action); in test_basic()
190 GAction *action; in test_simple_group() local
239 action = g_simple_action_group_lookup (group, "bar"); in test_simple_group()
240 g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE); in test_simple_group()
244 action = g_simple_action_group_lookup (group, "foo"); in test_simple_group()
245 g_assert_cmpstr (g_action_get_name (action), ==, "foo"); in test_simple_group()
246 action = g_simple_action_group_lookup (group, "bar"); in test_simple_group()
247 g_assert_null (action); in test_simple_group()
263 GSimpleAction *action; in test_stateful() local
266 action = g_simple_action_new_stateful ("foo", NULL, g_variant_new_string ("hihi")); in test_stateful()
267 g_assert_true (g_action_get_enabled (G_ACTION (action))); in test_stateful()
268 g_assert_null (g_action_get_parameter_type (G_ACTION (action))); in test_stateful()
269 g_assert_null (g_action_get_state_hint (G_ACTION (action))); in test_stateful()
270 g_assert_true (g_variant_type_equal (g_action_get_state_type (G_ACTION (action)), in test_stateful()
272 state = g_action_get_state (G_ACTION (action)); in test_stateful()
280 g_simple_action_set_state (action, g_variant_new_int32 (123)); in test_stateful()
284 g_simple_action_set_state (action, g_variant_new_string ("hello")); in test_stateful()
285 state = g_action_get_state (G_ACTION (action)); in test_stateful()
289 g_object_unref (action); in test_stateful()
291 action = g_simple_action_new ("foo", NULL); in test_stateful()
297 g_simple_action_set_state (action, g_variant_new_int32 (123)); in test_stateful()
301 g_object_unref (action); in test_stateful()
307 GSimpleAction *action; in test_default_activate() local
311action = g_simple_action_new_stateful ("foo", G_VARIANT_TYPE_STRING, g_variant_new_string ("hihi")… in test_default_activate()
312 g_action_activate (G_ACTION (action), g_variant_new_string ("bye")); in test_default_activate()
313 state = g_action_get_state (G_ACTION (action)); in test_default_activate()
316 g_object_unref (action); in test_default_activate()
319 action = g_simple_action_new_stateful ("foo", NULL, g_variant_new_boolean (FALSE)); in test_default_activate()
320 g_action_activate (G_ACTION (action), NULL); in test_default_activate()
321 state = g_action_get_state (G_ACTION (action)); in test_default_activate()
325 g_action_activate (G_ACTION (action), NULL); in test_default_activate()
326 state = g_action_get_state (G_ACTION (action)); in test_default_activate()
329 g_object_unref (action); in test_default_activate()
356 change_volume_state (GSimpleAction *action, in change_volume_state() argument
366 g_simple_action_set_state (action, value); in change_volume_state()
530 count_activation (const gchar *action) in count_activation() argument
536 count = GPOINTER_TO_INT (g_hash_table_lookup (activation_counts, action)); in count_activation()
538 g_hash_table_insert (activation_counts, (gpointer)action, GINT_TO_POINTER (count)); in count_activation()
542 activation_count (const gchar *action) in activation_count() argument
547 return GPOINTER_TO_INT (g_hash_table_lookup (activation_counts, action)); in activation_count()
551 activate_action (GSimpleAction *action, GVariant *parameter, gpointer user_data) in activate_action() argument
553 count_activation (g_action_get_name (G_ACTION (action))); in activate_action()
557 activate_toggle (GSimpleAction *action, GVariant *parameter, gpointer user_data) in activate_toggle() argument
561 count_activation (g_action_get_name (G_ACTION (action))); in activate_toggle()
563 old_state = g_action_get_state (G_ACTION (action)); in activate_toggle()
565 g_simple_action_set_state (action, new_state); in activate_toggle()
570 activate_radio (GSimpleAction *action, GVariant *parameter, gpointer user_data) in activate_radio() argument
574 count_activation (g_action_get_name (G_ACTION (action))); in activate_radio()
577 g_simple_action_set_state (action, new_state); in activate_radio()
751 GSimpleAction *action; in test_dbus_export() local
798 action = g_simple_action_new_stateful ("italic", NULL, g_variant_new_boolean (FALSE)); in test_dbus_export()
799 g_simple_action_group_insert (group, G_ACTION (action)); in test_dbus_export()
800 g_object_unref (action); in test_dbus_export()
807 action = G_SIMPLE_ACTION (g_simple_action_group_lookup (group, "cut")); in test_dbus_export()
808 g_simple_action_set_enabled (action, FALSE); in test_dbus_export()
815 action = G_SIMPLE_ACTION (g_simple_action_group_lookup (group, "bold")); in test_dbus_export()
816 g_simple_action_set_state (action, g_variant_new_boolean (FALSE)); in test_dbus_export()
883 GAction *action; in do_export() local
898 action = g_simple_action_group_lookup (G_SIMPLE_ACTION_GROUP (group), "a"); in do_export()
899 g_simple_action_set_enabled (G_SIMPLE_ACTION (action), in do_export()
900 !g_action_get_enabled (action)); in do_export()
1018 GPropertyAction *action; in test_property_actions() local
1033 action = g_property_action_new ("app-id", app, "application-id"); in test_property_actions()
1034 g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action)); in test_property_actions()
1035 g_object_unref (action); in test_property_actions()
1038 action = g_property_action_new ("keepalive", app, "inactivity-timeout"); in test_property_actions()
1039 …g_object_get (action, "name", &name, "parameter-type", &ptype, "enabled", &enabled, "state-type", … in test_property_actions()
1047 g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action)); in test_property_actions()
1048 g_object_unref (action); in test_property_actions()
1051 action = g_property_action_new ("tls", client, "tls"); in test_property_actions()
1052 g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action)); in test_property_actions()
1053 g_object_unref (action); in test_property_actions()
1056 action = g_object_new (G_TYPE_PROPERTY_ACTION, in test_property_actions()
1062 g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action)); in test_property_actions()
1063 g_object_unref (action); in test_property_actions()
1066 action = g_property_action_new ("type", client, "type"); in test_property_actions()
1067 g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action)); in test_property_actions()
1068 g_object_unref (action); in test_property_actions()
1171 action = g_property_action_new ("foo", app, "xyz"); in test_property_actions()
1173 g_object_unref (action); in test_property_actions()
1176 action = g_property_action_new ("foo", app, "is-registered"); in test_property_actions()
1178 g_object_unref (action); in test_property_actions()
1181 action = g_property_action_new ("foo", client, "local-address"); in test_property_actions()
1183 g_object_unref (action); in test_property_actions()