diff options
author | Namhyung Kim <namhyung@kernel.org> | 2012-08-16 04:14:52 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-08-17 11:37:11 -0400 |
commit | 4bb1646a80db65bb45c0a1bffb2435c6690c392e (patch) | |
tree | 137c08abf4cb8d74d79d76ab299e681ff2ae1780 /tools/perf/ui/gtk/helpline.c | |
parent | e6e9046879493d8bf8f44ac1f2718c4a5628aa52 (diff) |
perf ui gtk: Implement helpline_fns
Add helpline API implementation to GTK front-end.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Ingo Molnar <mingo@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/1345104894-14205-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/helpline.c')
-rw-r--r-- | tools/perf/ui/gtk/helpline.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/perf/ui/gtk/helpline.c b/tools/perf/ui/gtk/helpline.c new file mode 100644 index 000000000000..2511b3746797 --- /dev/null +++ b/tools/perf/ui/gtk/helpline.c | |||
@@ -0,0 +1,30 @@ | |||
1 | #include "gtk.h" | ||
2 | #include "../helpline.h" | ||
3 | |||
4 | static void gtk_helpline_pop(void) | ||
5 | { | ||
6 | if (!perf_gtk__is_active_context(pgctx)) | ||
7 | return; | ||
8 | |||
9 | gtk_statusbar_pop(GTK_STATUSBAR(pgctx->statbar), | ||
10 | pgctx->statbar_ctx_id); | ||
11 | } | ||
12 | |||
13 | static void gtk_helpline_push(const char *msg) | ||
14 | { | ||
15 | if (!perf_gtk__is_active_context(pgctx)) | ||
16 | return; | ||
17 | |||
18 | gtk_statusbar_push(GTK_STATUSBAR(pgctx->statbar), | ||
19 | pgctx->statbar_ctx_id, msg); | ||
20 | } | ||
21 | |||
22 | static struct ui_helpline gtk_helpline_fns = { | ||
23 | .pop = gtk_helpline_pop, | ||
24 | .push = gtk_helpline_push, | ||
25 | }; | ||
26 | |||
27 | void perf_gtk__init_helpline(void) | ||
28 | { | ||
29 | helpline_fns = >k_helpline_fns; | ||
30 | } | ||