diff options
Diffstat (limited to 'tools/perf/ui/gtk/gtk.h')
-rw-r--r-- | tools/perf/ui/gtk/gtk.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h index 75177ee04032..a4d0f2b4a2dc 100644 --- a/tools/perf/ui/gtk/gtk.h +++ b/tools/perf/ui/gtk/gtk.h | |||
@@ -1,8 +1,39 @@ | |||
1 | #ifndef _PERF_GTK_H_ | 1 | #ifndef _PERF_GTK_H_ |
2 | #define _PERF_GTK_H_ 1 | 2 | #define _PERF_GTK_H_ 1 |
3 | 3 | ||
4 | #include <stdbool.h> | ||
5 | |||
4 | #pragma GCC diagnostic ignored "-Wstrict-prototypes" | 6 | #pragma GCC diagnostic ignored "-Wstrict-prototypes" |
5 | #include <gtk/gtk.h> | 7 | #include <gtk/gtk.h> |
6 | #pragma GCC diagnostic error "-Wstrict-prototypes" | 8 | #pragma GCC diagnostic error "-Wstrict-prototypes" |
7 | 9 | ||
10 | |||
11 | struct perf_gtk_context { | ||
12 | GtkWidget *main_window; | ||
13 | |||
14 | #ifdef HAVE_GTK_INFO_BAR | ||
15 | GtkWidget *info_bar; | ||
16 | GtkWidget *message_label; | ||
17 | #endif | ||
18 | GtkWidget *statbar; | ||
19 | guint statbar_ctx_id; | ||
20 | }; | ||
21 | |||
22 | extern struct perf_gtk_context *pgctx; | ||
23 | |||
24 | static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx) | ||
25 | { | ||
26 | return ctx && ctx->main_window; | ||
27 | } | ||
28 | |||
29 | struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window); | ||
30 | int perf_gtk__deactivate_context(struct perf_gtk_context **ctx); | ||
31 | |||
32 | #ifndef HAVE_GTK_INFO_BAR | ||
33 | static inline GtkWidget *perf_gtk__setup_info_bar(void) | ||
34 | { | ||
35 | return NULL; | ||
36 | } | ||
37 | #endif | ||
38 | |||
8 | #endif /* _PERF_GTK_H_ */ | 39 | #endif /* _PERF_GTK_H_ */ |