aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/helpline.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/ui/helpline.h')
-rw-r--r--tools/perf/ui/helpline.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/tools/perf/ui/helpline.h b/tools/perf/ui/helpline.h
index 7bab6b34e35e..2b667ee454c3 100644
--- a/tools/perf/ui/helpline.h
+++ b/tools/perf/ui/helpline.h
@@ -4,13 +4,44 @@
4#include <stdio.h> 4#include <stdio.h>
5#include <stdarg.h> 5#include <stdarg.h>
6 6
7#include "../util/cache.h"
8
9struct ui_helpline {
10 void (*pop)(void);
11 void (*push)(const char *msg);
12};
13
14extern struct ui_helpline *helpline_fns;
15
7void ui_helpline__init(void); 16void ui_helpline__init(void);
17
8void ui_helpline__pop(void); 18void ui_helpline__pop(void);
9void ui_helpline__push(const char *msg); 19void ui_helpline__push(const char *msg);
10void ui_helpline__vpush(const char *fmt, va_list ap); 20void ui_helpline__vpush(const char *fmt, va_list ap);
11void ui_helpline__fpush(const char *fmt, ...); 21void ui_helpline__fpush(const char *fmt, ...);
12void ui_helpline__puts(const char *msg); 22void ui_helpline__puts(const char *msg);
13 23
14extern char ui_helpline__current[]; 24extern char ui_helpline__current[512];
25
26#ifdef NO_NEWT_SUPPORT
27static inline int ui_helpline__show_help(const char *format __maybe_unused,
28 va_list ap __maybe_unused)
29{
30 return 0;
31}
32#else
33extern char ui_helpline__last_msg[];
34int ui_helpline__show_help(const char *format, va_list ap);
35#endif /* NO_NEWT_SUPPORT */
36
37#ifdef NO_GTK2_SUPPORT
38static inline int perf_gtk__show_helpline(const char *format __maybe_unused,
39 va_list ap __maybe_unused)
40{
41 return 0;
42}
43#else
44int perf_gtk__show_helpline(const char *format, va_list ap);
45#endif /* NO_GTK2_SUPPORT */
15 46
16#endif /* _PERF_UI_HELPLINE_H_ */ 47#endif /* _PERF_UI_HELPLINE_H_ */