setup.c 519 B

12345678910111213141516171819202122232425
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include "gtk.h"
  3. #include "../../util/cache.h"
  4. #include "../../util/debug.h"
  5. extern struct perf_error_ops perf_gtk_eops;
  6. int perf_gtk__init(void)
  7. {
  8. perf_error__register(&perf_gtk_eops);
  9. perf_gtk__init_helpline();
  10. gtk_ui_progress__init();
  11. perf_gtk__init_hpp();
  12. return gtk_init_check(NULL, NULL) ? 0 : -1;
  13. }
  14. void perf_gtk__exit(bool wait_for_ok __maybe_unused)
  15. {
  16. if (!perf_gtk__is_active_context(pgctx))
  17. return;
  18. perf_error__unregister(&perf_gtk_eops);
  19. gtk_main_quit();
  20. }