2012-04-30 12:55:08 +08:00
|
|
|
#include "gtk.h"
|
|
|
|
#include "../../util/cache.h"
|
2012-05-29 12:23:02 +08:00
|
|
|
#include "../../util/debug.h"
|
|
|
|
|
|
|
|
extern struct perf_error_ops perf_gtk_eops;
|
2012-04-30 12:55:08 +08:00
|
|
|
|
2012-04-30 12:55:09 +08:00
|
|
|
int perf_gtk__init(void)
|
2012-04-30 12:55:08 +08:00
|
|
|
{
|
2012-05-29 12:23:02 +08:00
|
|
|
perf_error__register(&perf_gtk_eops);
|
2012-08-16 16:14:52 +08:00
|
|
|
perf_gtk__init_helpline();
|
2012-11-13 21:30:33 +08:00
|
|
|
perf_gtk__init_progress();
|
2012-09-03 10:53:10 +08:00
|
|
|
perf_gtk__init_hpp();
|
2012-11-13 21:30:33 +08:00
|
|
|
|
2012-04-30 12:55:09 +08:00
|
|
|
return gtk_init_check(NULL, NULL) ? 0 : -1;
|
2012-04-30 12:55:08 +08:00
|
|
|
}
|
|
|
|
|
2012-09-11 06:15:03 +08:00
|
|
|
void perf_gtk__exit(bool wait_for_ok __maybe_unused)
|
2012-04-30 12:55:08 +08:00
|
|
|
{
|
2012-08-18 00:56:23 +08:00
|
|
|
if (!perf_gtk__is_active_context(pgctx))
|
|
|
|
return;
|
2012-05-29 12:23:02 +08:00
|
|
|
perf_error__unregister(&perf_gtk_eops);
|
2012-04-30 12:55:08 +08:00
|
|
|
gtk_main_quit();
|
|
|
|
}
|