blob: f5eee4d6687383036ce36dd3ceead44171254d92 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001// SPDX-License-Identifier: GPL-2.0
2#include "gtk.h"
David Brazdil0f672f62019-12-10 10:32:29 +00003#include <linux/compiler.h>
4#include "../util.h"
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00005
6extern struct perf_error_ops perf_gtk_eops;
7
8int perf_gtk__init(void)
9{
10 perf_error__register(&perf_gtk_eops);
11 perf_gtk__init_helpline();
12 gtk_ui_progress__init();
13 perf_gtk__init_hpp();
14
15 return gtk_init_check(NULL, NULL) ? 0 : -1;
16}
17
18void perf_gtk__exit(bool wait_for_ok __maybe_unused)
19{
20 if (!perf_gtk__is_active_context(pgctx))
21 return;
22 perf_error__unregister(&perf_gtk_eops);
23 gtk_main_quit();
24}