diff options
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 00000000000..2511b374679 --- /dev/null +++ b/tools/perf/ui/gtk/helpline.c @@ -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; +} |