0001
0002 #include "gtk.h"
0003 #include <linux/compiler.h>
0004 #include "../util.h"
0005
0006 extern struct perf_error_ops perf_gtk_eops;
0007
0008 int perf_gtk__init(void)
0009 {
0010 perf_error__register(&perf_gtk_eops);
0011 perf_gtk__init_helpline();
0012 gtk_ui_progress__init();
0013 perf_gtk__init_hpp();
0014
0015 return gtk_init_check(NULL, NULL) ? 0 : -1;
0016 }
0017
0018 void perf_gtk__exit(bool wait_for_ok __maybe_unused)
0019 {
0020 if (!perf_gtk__is_active_context(pgctx))
0021 return;
0022 perf_error__unregister(&perf_gtk_eops);
0023 gtk_main_quit();
0024 }