License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[linux-2.6/btrfs-unstable.git] / tools / perf / ui / gtk / setup.c
blob506e73b3834c0ee493913e9387535e3875f25e72
1 // SPDX-License-Identifier: GPL-2.0
2 #include "gtk.h"
3 #include "../../util/cache.h"
4 #include "../../util/debug.h"
6 extern struct perf_error_ops perf_gtk_eops;
8 int perf_gtk__init(void)
10 perf_error__register(&perf_gtk_eops);
11 perf_gtk__init_helpline();
12 gtk_ui_progress__init();
13 perf_gtk__init_hpp();
15 return gtk_init_check(NULL, NULL) ? 0 : -1;
18 void perf_gtk__exit(bool wait_for_ok __maybe_unused)
20 if (!perf_gtk__is_active_context(pgctx))
21 return;
22 perf_error__unregister(&perf_gtk_eops);
23 gtk_main_quit();