setup.c 483 B

1234567891011121314151617181920212223
  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. gtk_ui_progress__init();
  10. perf_gtk__init_hpp();
  11. return gtk_init_check(NULL, NULL) ? 0 : -1;
  12. }
  13. void perf_gtk__exit(bool wait_for_ok __maybe_unused)
  14. {
  15. if (!perf_gtk__is_active_context(pgctx))
  16. return;
  17. perf_error__unregister(&perf_gtk_eops);
  18. gtk_main_quit();
  19. }