Pekka Enberg | c31a945 | 2012-03-19 15:13:29 -0300 | [diff] [blame] | 1 | #ifndef _PERF_GTK_H_ |
| 2 | #define _PERF_GTK_H_ 1 |
| 3 | |
Namhyung Kim | 42ab68a | 2012-05-29 13:22:59 +0900 | [diff] [blame^] | 4 | #include <stdbool.h> |
| 5 | |
Pekka Enberg | c31a945 | 2012-03-19 15:13:29 -0300 | [diff] [blame] | 6 | #pragma GCC diagnostic ignored "-Wstrict-prototypes" |
| 7 | #include <gtk/gtk.h> |
| 8 | #pragma GCC diagnostic error "-Wstrict-prototypes" |
| 9 | |
Namhyung Kim | 42ab68a | 2012-05-29 13:22:59 +0900 | [diff] [blame^] | 10 | |
| 11 | struct perf_gtk_context { |
| 12 | GtkWidget *main_window; |
| 13 | }; |
| 14 | |
| 15 | extern struct perf_gtk_context *pgctx; |
| 16 | |
| 17 | static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx) |
| 18 | { |
| 19 | return ctx && ctx->main_window; |
| 20 | } |
| 21 | |
| 22 | struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window); |
| 23 | int perf_gtk__deactivate_context(struct perf_gtk_context **ctx); |
| 24 | |
Pekka Enberg | c31a945 | 2012-03-19 15:13:29 -0300 | [diff] [blame] | 25 | #endif /* _PERF_GTK_H_ */ |