perf ui/gtk: Add GTK statusbar widget to browser window
[firefly-linux-kernel-4.4.55.git] / tools / perf / ui / gtk / gtk.h
1 #ifndef _PERF_GTK_H_
2 #define _PERF_GTK_H_ 1
3
4 #include <stdbool.h>
5
6 #pragma GCC diagnostic ignored "-Wstrict-prototypes"
7 #include <gtk/gtk.h>
8 #pragma GCC diagnostic error "-Wstrict-prototypes"
9
10
11 struct perf_gtk_context {
12         GtkWidget *main_window;
13         GtkWidget *statbar;
14         guint statbar_ctx_id;
15 };
16
17 extern struct perf_gtk_context *pgctx;
18
19 static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx)
20 {
21         return ctx && ctx->main_window;
22 }
23
24 struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window);
25 int perf_gtk__deactivate_context(struct perf_gtk_context **ctx);
26
27 #endif /* _PERF_GTK_H_ */