]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - tools/perf/ui/gtk/setup.c
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / tools / perf / ui / gtk / setup.c
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
281ef544
NK
2#include "gtk.h"
3#include "../../util/cache.h"
e078ba14
NK
4#include "../../util/debug.h"
5
6extern struct perf_error_ops perf_gtk_eops;
281ef544 7
dc41b9b8 8int perf_gtk__init(void)
281ef544 9{
e078ba14 10 perf_error__register(&perf_gtk_eops);
4bb1646a 11 perf_gtk__init_helpline();
4779a2e9 12 gtk_ui_progress__init();
12ceaded 13 perf_gtk__init_hpp();
a753579c 14
dc41b9b8 15 return gtk_init_check(NULL, NULL) ? 0 : -1;
281ef544
NK
16}
17
1d037ca1 18void perf_gtk__exit(bool wait_for_ok __maybe_unused)
281ef544 19{
2708bf3a
NK
20 if (!perf_gtk__is_active_context(pgctx))
21 return;
e078ba14 22 perf_error__unregister(&perf_gtk_eops);
281ef544
NK
23 gtk_main_quit();
24}