blob: 206167868c5fa4e383a376ec77f78aa9e17316a3 [file] [log] [blame]
Pekka Enbergc31a9452012-03-19 15:13:29 -03001#ifndef _PERF_GTK_H_
2#define _PERF_GTK_H_ 1
3
Namhyung Kim42ab68a2012-05-29 13:22:59 +09004#include <stdbool.h>
5
Pekka Enbergc31a9452012-03-19 15:13:29 -03006#pragma GCC diagnostic ignored "-Wstrict-prototypes"
7#include <gtk/gtk.h>
8#pragma GCC diagnostic error "-Wstrict-prototypes"
9
Namhyung Kim42ab68a2012-05-29 13:22:59 +090010
11struct perf_gtk_context {
12 GtkWidget *main_window;
Namhyung Kimb4418c62012-05-29 13:23:00 +090013 GtkWidget *statbar;
14 guint statbar_ctx_id;
Namhyung Kim42ab68a2012-05-29 13:22:59 +090015};
16
17extern struct perf_gtk_context *pgctx;
18
19static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx)
20{
21 return ctx && ctx->main_window;
22}
23
24struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window);
25int perf_gtk__deactivate_context(struct perf_gtk_context **ctx);
26
Pekka Enbergc31a9452012-03-19 15:13:29 -030027#endif /* _PERF_GTK_H_ */