• Home
  • Raw
  • Download

Lines Matching refs:app

308   GApplication *app;
311 app = g_application_new ("org.gtk.Test-Application",
313 g_signal_connect (app, "activate", G_CALLBACK (nonunique_activate), NULL);
314 ok = g_application_register (app, NULL, NULL);
317 g_object_unref (app);
321 g_application_activate (app);
323 return app;
370 GObject *app; in properties() local
382 app = g_object_new (G_TYPE_APPLICATION, in properties()
386 g_object_get (app, in properties()
398 ret = g_application_register (G_APPLICATION (app), NULL, &error); in properties()
402 g_object_get (app, in properties()
410 g_object_set (app, in properties()
414 g_application_quit (G_APPLICATION (app)); in properties()
417 g_object_unref (app); in properties()
472 nodbus_activate (GApplication *app) in nodbus_activate() argument
475 g_application_hold (app); in nodbus_activate()
477 g_assert (g_application_get_dbus_connection (app) == NULL); in nodbus_activate()
478 g_assert (g_application_get_dbus_object_path (app) == NULL); in nodbus_activate()
480 g_idle_add (release_app, app); in nodbus_activate()
488 GApplication *app; in test_nodbus() local
490 app = g_application_new ("org.gtk.Unimportant", G_APPLICATION_FLAGS_NONE); in test_nodbus()
491 g_signal_connect (app, "activate", G_CALLBACK (nodbus_activate), NULL); in test_nodbus()
492 g_application_run (app, 1, argv); in test_nodbus()
493 g_object_unref (app); in test_nodbus()
502 noappid_activate (GApplication *app) in noappid_activate() argument
505 g_application_hold (app); in noappid_activate()
507 g_assert (g_application_get_flags (app) & G_APPLICATION_NON_UNIQUE); in noappid_activate()
509 g_idle_add (release_app, app); in noappid_activate()
518 GApplication *app; in test_noappid() local
520 app = g_application_new (NULL, G_APPLICATION_FLAGS_NONE); in test_noappid()
521 g_signal_connect (app, "activate", G_CALLBACK (noappid_activate), NULL); in test_noappid()
522 g_application_run (app, 1, argv); in test_noappid()
523 g_object_unref (app); in test_noappid()
541 quit_activate (GApplication *app) in quit_activate() argument
544 g_application_hold (app); in quit_activate()
546 g_assert (g_application_get_dbus_connection (app) != NULL); in quit_activate()
547 g_assert (g_application_get_dbus_object_path (app) != NULL); in quit_activate()
549 g_idle_add (quit_app, app); in quit_activate()
558 GApplication *app; in test_quit() local
563 app = g_application_new ("org.gtk.Unimportant", in test_quit()
567 g_signal_connect (app, "activate", G_CALLBACK (quit_activate), NULL); in test_quit()
568 g_application_run (app, 1, argv); in test_quit()
569 g_object_unref (app); in test_quit()
580 on_activate (GApplication *app) in on_activate() argument
586 g_assert (!g_application_get_is_remote (app)); in on_activate()
588 actions = g_action_group_list_actions (G_ACTION_GROUP (app)); in on_activate()
593 g_action_map_add_action (G_ACTION_MAP (app), action); in on_activate()
595 actions = g_action_group_list_actions (G_ACTION_GROUP (app)); in on_activate()
599 g_action_group_change_action_state (G_ACTION_GROUP (app), "test", g_variant_new_boolean (TRUE)); in on_activate()
600 state = g_action_group_get_action_state (G_ACTION_GROUP (app), "test"); in on_activate()
603 action = g_action_map_lookup_action (G_ACTION_MAP (app), "test"); in on_activate()
606 g_action_map_remove_action (G_ACTION_MAP (app), "test"); in on_activate()
608 actions = g_action_group_list_actions (G_ACTION_GROUP (app)); in on_activate()
618 GApplication *app; in test_local_actions() local
620 app = g_application_new ("org.gtk.Unimportant", in test_local_actions()
622 g_signal_connect (app, "activate", G_CALLBACK (on_activate), NULL); in test_local_actions()
623 g_application_run (app, 1, argv); in test_local_actions()
624 g_object_unref (app); in test_local_actions()
635 test_loc_cmd_app_init (TestLocCmdApp *app) in G_DEFINE_TYPE()
640 test_loc_cmd_app_startup (GApplication *app) in test_loc_cmd_app_startup() argument
646 test_loc_cmd_app_shutdown (GApplication *app) in test_loc_cmd_app_shutdown() argument
672 GApplication *app; in test_local_command_line() local
674 app = g_object_new (test_loc_cmd_app_get_type (), in test_local_command_line()
678 g_application_run (app, 1, argv); in test_local_command_line()
679 g_object_unref (app); in test_local_command_line()
686 GApplication *app; in test_resource_path() local
688 app = g_application_new ("x.y.z", 0); in test_resource_path()
689 g_assert_cmpstr (g_application_get_resource_base_path (app), ==, "/x/y/z"); in test_resource_path()
692 g_application_set_application_id (app, "a.b.c"); in test_resource_path()
693 g_assert_cmpstr (g_application_get_resource_base_path (app), ==, "/x/y/z"); in test_resource_path()
696 g_application_set_resource_base_path (app, "/x"); in test_resource_path()
697 g_assert_cmpstr (g_application_get_resource_base_path (app), ==, "/x"); in test_resource_path()
700 g_application_set_resource_base_path (app, NULL); in test_resource_path()
701 g_assert_cmpstr (g_application_get_resource_base_path (app), ==, NULL); in test_resource_path()
703 g_object_unref (app); in test_resource_path()
706app = g_object_new (G_TYPE_APPLICATION, "application-id", "x.y.z", "resource-base-path", "/a", NUL… in test_resource_path()
707 g_assert_cmpstr (g_application_get_resource_base_path (app), ==, "/a"); in test_resource_path()
708 g_object_unref (app); in test_resource_path()
711app = g_object_new (G_TYPE_APPLICATION, "application-id", "x.y.z", "resource-base-path", NULL, NUL… in test_resource_path()
712 g_assert_cmpstr (g_application_get_resource_base_path (app), ==, NULL); in test_resource_path()
713 g_object_unref (app); in test_resource_path()
717 test_help_command_line (GApplication *app, in test_help_command_line() argument
738 GApplication *app; in test_help() local
742 app = g_application_new ("org.gtk.TestApplication", G_APPLICATION_HANDLES_COMMAND_LINE); in test_help()
743 … g_application_add_main_option (app, "foo", 'f', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_help()
744 g_signal_connect (app, "command-line", G_CALLBACK (test_help_command_line), &called); in test_help()
746 status = g_application_run (app, G_N_ELEMENTS (argv) -1, argv); in test_help()
750 g_object_unref (app); in test_help()
763 GApplication *app; in test_busy() local
772 app = g_application_new ("org.gtk.TestApplication", G_APPLICATION_NON_UNIQUE); in test_busy()
773 g_assert (g_application_register (app, NULL, NULL)); in test_busy()
775 g_assert (!g_application_get_is_busy (app)); in test_busy()
776 g_application_mark_busy (app); in test_busy()
777 g_assert (g_application_get_is_busy (app)); in test_busy()
778 g_application_unmark_busy (app); in test_busy()
779 g_assert (!g_application_get_is_busy (app)); in test_busy()
782 g_application_bind_busy_property (app, action1, "enabled"); in test_busy()
783 g_assert (g_application_get_is_busy (app)); in test_busy()
786 g_assert (!g_application_get_is_busy (app)); in test_busy()
788 g_application_mark_busy (app); in test_busy()
789 g_assert (g_application_get_is_busy (app)); in test_busy()
792 g_application_bind_busy_property (app, action2, "enabled"); in test_busy()
793 g_assert (g_application_get_is_busy (app)); in test_busy()
795 g_application_unmark_busy (app); in test_busy()
796 g_assert (g_application_get_is_busy (app)); in test_busy()
799 g_assert (!g_application_get_is_busy (app)); in test_busy()
802 g_assert (g_application_get_is_busy (app)); in test_busy()
804 g_application_mark_busy (app); in test_busy()
805 g_assert (g_application_get_is_busy (app)); in test_busy()
807 g_application_unbind_busy_property (app, action1, "enabled"); in test_busy()
808 g_assert (g_application_get_is_busy (app)); in test_busy()
810 g_application_unmark_busy (app); in test_busy()
811 g_assert (!g_application_get_is_busy (app)); in test_busy()
814 g_object_unref (app); in test_busy()
824 test_local_options (GApplication *app, in test_local_options() argument
841 second_handler (GApplication *app, in second_handler() argument
859 GApplication *app; in test_handle_local_options_success() local
864 app = g_application_new ("org.gtk.TestApplication", 0); in test_handle_local_options_success()
865 … g_application_add_main_option (app, "success", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_handle_local_options_success()
866 … g_application_add_main_option (app, "failure", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_handle_local_options_success()
867 g_signal_connect (app, "handle-local-options", G_CALLBACK (test_local_options), &called); in test_handle_local_options_success()
868 g_signal_connect (app, "handle-local-options", G_CALLBACK (second_handler), &called2); in test_handle_local_options_success()
870 status = g_application_run (app, G_N_ELEMENTS (argv) -1, argv); in test_handle_local_options_success()
875 g_object_unref (app); in test_handle_local_options_success()
891 GApplication *app; in test_handle_local_options_failure() local
896 app = g_application_new ("org.gtk.TestApplication", 0); in test_handle_local_options_failure()
897 … g_application_add_main_option (app, "success", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_handle_local_options_failure()
898 … g_application_add_main_option (app, "failure", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_handle_local_options_failure()
899 g_signal_connect (app, "handle-local-options", G_CALLBACK (test_local_options), &called); in test_handle_local_options_failure()
900 g_signal_connect (app, "handle-local-options", G_CALLBACK (second_handler), &called2); in test_handle_local_options_failure()
902 status = g_application_run (app, G_N_ELEMENTS (argv) -1, argv); in test_handle_local_options_failure()
907 g_object_unref (app); in test_handle_local_options_failure()
923 GApplication *app; in test_handle_local_options_passthrough() local
928 app = g_application_new ("org.gtk.TestApplication", 0); in test_handle_local_options_passthrough()
929 … g_application_add_main_option (app, "success", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_handle_local_options_passthrough()
930 … g_application_add_main_option (app, "failure", 0, G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, "", ""); in test_handle_local_options_passthrough()
931 g_signal_connect (app, "handle-local-options", G_CALLBACK (test_local_options), &called); in test_handle_local_options_passthrough()
932 g_signal_connect (app, "handle-local-options", G_CALLBACK (second_handler), &called2); in test_handle_local_options_passthrough()
934 status = g_application_run (app, G_N_ELEMENTS (argv) -1, argv); in test_handle_local_options_passthrough()
939 g_object_unref (app); in test_handle_local_options_passthrough()
951 GApplication *app; in test_api() local
954 app = g_application_new ("org.gtk.TestApplication", 0); in test_api()
965 g_action_map_add_action (G_ACTION_MAP (app), G_ACTION (action)); in test_api()
969 g_object_unref (app); in test_api()
980 name_was_lost (GApplication *app, in name_was_lost() argument
984 g_application_quit (app); in name_was_lost()
989 startup_in_subprocess (GApplication *app, in startup_in_subprocess() argument
1002 startup_cb (GApplication *app, in startup_cb() argument
1009 g_application_hold (app); in startup_cb()
1032 g_application_set_inactivity_timeout (app, 500); in startup_cb()
1033 g_application_release (app); in startup_cb()
1046 GApplication *app = data; in quit_already() local
1048 g_application_quit (app); in quit_already()
1062 GApplication *app; in test_replace() local
1065 app = g_application_new ("org.gtk.TestApplication.Replace", G_APPLICATION_ALLOW_REPLACEMENT); in test_replace()
1066 g_signal_connect (app, "startup", G_CALLBACK (startup_in_subprocess), &startup); in test_replace()
1067 g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); in test_replace()
1069 g_application_run (app, G_N_ELEMENTS (argv) - 1, argv); in test_replace()
1076 g_object_unref (app); in test_replace()
1083 GApplication *app; in test_replace() local
1094app = g_application_new ("org.gtk.TestApplication.Replace", allow ? G_APPLICATION_ALLOW_REPLACEMEN… in test_replace()
1095 g_application_set_inactivity_timeout (app, 500); in test_replace()
1096 g_signal_connect (app, "name-lost", G_CALLBACK (name_was_lost), &name_lost); in test_replace()
1097 g_signal_connect (app, "startup", G_CALLBACK (startup_cb), &data); in test_replace()
1098 g_signal_connect (app, "activate", G_CALLBACK (activate), NULL); in test_replace()
1101 g_timeout_add_seconds (1, quit_already, app); in test_replace()
1103 g_application_run (app, G_N_ELEMENTS (argv) - 1, argv); in test_replace()
1111 g_object_unref (app); in test_replace()