diff options
author | Namhyung Kim <namhyung@gmail.com> | 2012-05-29 00:23:01 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-06-19 12:06:19 -0400 |
commit | a6b702c117f839023814c1e03453c701d26de522 (patch) | |
tree | cf472c20bb6d7b583c1f9a0ade8eedc318b0c1df /tools/perf/ui/gtk/gtk.h | |
parent | b4418c6848dcd56cc90625dcfaef7cb019492233 (diff) |
perf ui/gtk: Add GTK info_bar widget to browser window
The GtkInfoBar is a modern UI component to display messages without
bothering the main window. It'll be used for showing a warning message.
As the GtkInfoBar requires 2.18 (or newer) version of GTK+ library, add
availability check to Makefile too.
Suggested-by: Sunjin Yang <fan4326@gmail.com>
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1338265382-6872-7-git-send-email-namhyung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/gtk.h')
-rw-r--r-- | tools/perf/ui/gtk/gtk.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/perf/ui/gtk/gtk.h b/tools/perf/ui/gtk/gtk.h index 206167868c5f..a4d0f2b4a2dc 100644 --- a/tools/perf/ui/gtk/gtk.h +++ b/tools/perf/ui/gtk/gtk.h | |||
@@ -10,6 +10,11 @@ | |||
10 | 10 | ||
11 | struct perf_gtk_context { | 11 | struct perf_gtk_context { |
12 | GtkWidget *main_window; | 12 | GtkWidget *main_window; |
13 | |||
14 | #ifdef HAVE_GTK_INFO_BAR | ||
15 | GtkWidget *info_bar; | ||
16 | GtkWidget *message_label; | ||
17 | #endif | ||
13 | GtkWidget *statbar; | 18 | GtkWidget *statbar; |
14 | guint statbar_ctx_id; | 19 | guint statbar_ctx_id; |
15 | }; | 20 | }; |
@@ -24,4 +29,11 @@ static inline bool perf_gtk__is_active_context(struct perf_gtk_context *ctx) | |||
24 | struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window); | 29 | struct perf_gtk_context *perf_gtk__activate_context(GtkWidget *window); |
25 | int perf_gtk__deactivate_context(struct perf_gtk_context **ctx); | 30 | int perf_gtk__deactivate_context(struct perf_gtk_context **ctx); |
26 | 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 | |||
27 | #endif /* _PERF_GTK_H_ */ | 39 | #endif /* _PERF_GTK_H_ */ |