Namhyung Kim | 281ef54 | 2012-04-30 13:55:08 +0900 | [diff] [blame] | 1 | #include "gtk.h" |
| 2 | #include "../../util/cache.h" |
Namhyung Kim | e078ba1 | 2012-05-29 13:23:02 +0900 | [diff] [blame] | 3 | #include "../../util/debug.h" |
| 4 | |
| 5 | extern struct perf_error_ops perf_gtk_eops; |
Namhyung Kim | 281ef54 | 2012-04-30 13:55:08 +0900 | [diff] [blame] | 6 | |
Namhyung Kim | dc41b9b | 2012-04-30 13:55:09 +0900 | [diff] [blame] | 7 | int perf_gtk__init(void) |
Namhyung Kim | 281ef54 | 2012-04-30 13:55:08 +0900 | [diff] [blame] | 8 | { |
Namhyung Kim | e078ba1 | 2012-05-29 13:23:02 +0900 | [diff] [blame] | 9 | perf_error__register(&perf_gtk_eops); |
Namhyung Kim | 4bb1646 | 2012-08-16 17:14:52 +0900 | [diff] [blame^] | 10 | perf_gtk__init_helpline(); |
Namhyung Kim | dc41b9b | 2012-04-30 13:55:09 +0900 | [diff] [blame] | 11 | return gtk_init_check(NULL, NULL) ? 0 : -1; |
Namhyung Kim | 281ef54 | 2012-04-30 13:55:08 +0900 | [diff] [blame] | 12 | } |
| 13 | |
| 14 | void perf_gtk__exit(bool wait_for_ok __used) |
| 15 | { |
Namhyung Kim | e078ba1 | 2012-05-29 13:23:02 +0900 | [diff] [blame] | 16 | perf_error__unregister(&perf_gtk_eops); |
Namhyung Kim | 281ef54 | 2012-04-30 13:55:08 +0900 | [diff] [blame] | 17 | gtk_main_quit(); |
| 18 | } |