setup.c 425 字节
Newer Older
1 2
#include "gtk.h"
#include "../../util/cache.h"
3 4 5
#include "../../util/debug.h"

extern struct perf_error_ops perf_gtk_eops;
6

7
int perf_gtk__init(void)
8
{
9
	perf_error__register(&perf_gtk_eops);
10
	perf_gtk__init_helpline();
11
	return gtk_init_check(NULL, NULL) ? 0 : -1;
12 13 14 15
}

void perf_gtk__exit(bool wait_for_ok __used)
{
16 17
	if (!perf_gtk__is_active_context(pgctx))
		return;
18
	perf_error__unregister(&perf_gtk_eops);
19 20
	gtk_main_quit();
}