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