mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
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>
This commit is contained in:
parent
e6e9046879
commit
4bb1646a80
4 changed files with 34 additions and 0 deletions
30
tools/perf/ui/gtk/helpline.c
Normal file
30
tools/perf/ui/gtk/helpline.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
#include "gtk.h"
|
||||
#include "../helpline.h"
|
||||
|
||||
static void gtk_helpline_pop(void)
|
||||
{
|
||||
if (!perf_gtk__is_active_context(pgctx))
|
||||
return;
|
||||
|
||||
gtk_statusbar_pop(GTK_STATUSBAR(pgctx->statbar),
|
||||
pgctx->statbar_ctx_id);
|
||||
}
|
||||
|
||||
static void gtk_helpline_push(const char *msg)
|
||||
{
|
||||
if (!perf_gtk__is_active_context(pgctx))
|
||||
return;
|
||||
|
||||
gtk_statusbar_push(GTK_STATUSBAR(pgctx->statbar),
|
||||
pgctx->statbar_ctx_id, msg);
|
||||
}
|
||||
|
||||
static struct ui_helpline gtk_helpline_fns = {
|
||||
.pop = gtk_helpline_pop,
|
||||
.push = gtk_helpline_push,
|
||||
};
|
||||
|
||||
void perf_gtk__init_helpline(void)
|
||||
{
|
||||
helpline_fns = >k_helpline_fns;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue