| #include "../../util/debug.h" |
| static void gtk_helpline_pop(void) |
| if (!perf_gtk__is_active_context(pgctx)) |
| gtk_statusbar_pop(GTK_STATUSBAR(pgctx->statbar), |
| static void gtk_helpline_push(const char *msg) |
| if (!perf_gtk__is_active_context(pgctx)) |
| gtk_statusbar_push(GTK_STATUSBAR(pgctx->statbar), |
| pgctx->statbar_ctx_id, msg); |
| static int gtk_helpline_show(const char *fmt, va_list ap) |
| ret = vscnprintf(ui_helpline__current + backlog, |
| sizeof(ui_helpline__current) - backlog, fmt, ap); |
| /* only first line can be displayed */ |
| ptr = strchr(ui_helpline__current, '\n'); |
| if (ptr && (ptr - ui_helpline__current) <= backlog) { |
| ui_helpline__puts(ui_helpline__current); |
| static struct ui_helpline gtk_helpline_fns = { |
| .push = gtk_helpline_push, |
| .show = gtk_helpline_show, |
| void perf_gtk__init_helpline(void) |
| helpline_fns = >k_helpline_fns; |