diff options
Diffstat (limited to 'tools/perf/ui/helpline.h')
| -rw-r--r-- | tools/perf/ui/helpline.h | 33 |
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 | |||
| 9 | struct ui_helpline { | ||
| 10 | void (*pop)(void); | ||
| 11 | void (*push)(const char *msg); | ||
| 12 | }; | ||
| 13 | |||
| 14 | extern struct ui_helpline *helpline_fns; | ||
| 15 | |||
| 7 | void ui_helpline__init(void); | 16 | void ui_helpline__init(void); |
| 17 | |||
| 8 | void ui_helpline__pop(void); | 18 | void ui_helpline__pop(void); |
| 9 | void ui_helpline__push(const char *msg); | 19 | void ui_helpline__push(const char *msg); |
| 10 | void ui_helpline__vpush(const char *fmt, va_list ap); | 20 | void ui_helpline__vpush(const char *fmt, va_list ap); |
| 11 | void ui_helpline__fpush(const char *fmt, ...); | 21 | void ui_helpline__fpush(const char *fmt, ...); |
| 12 | void ui_helpline__puts(const char *msg); | 22 | void ui_helpline__puts(const char *msg); |
| 13 | 23 | ||
| 14 | extern char ui_helpline__current[]; | 24 | extern char ui_helpline__current[512]; |
| 25 | |||
| 26 | #ifdef NO_NEWT_SUPPORT | ||
| 27 | static inline int ui_helpline__show_help(const char *format __maybe_unused, | ||
| 28 | va_list ap __maybe_unused) | ||
| 29 | { | ||
| 30 | return 0; | ||
| 31 | } | ||
| 32 | #else | ||
| 33 | extern char ui_helpline__last_msg[]; | ||
| 34 | int ui_helpline__show_help(const char *format, va_list ap); | ||
| 35 | #endif /* NO_NEWT_SUPPORT */ | ||
| 36 | |||
| 37 | #ifdef NO_GTK2_SUPPORT | ||
| 38 | static inline int perf_gtk__show_helpline(const char *format __maybe_unused, | ||
| 39 | va_list ap __maybe_unused) | ||
| 40 | { | ||
| 41 | return 0; | ||
| 42 | } | ||
| 43 | #else | ||
| 44 | int 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_ */ |
