setup.c 456 B

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