Arnaldo Carvalho de Melo | 5575536 | 2010-08-08 19:48:31 -0300 | [diff] [blame] | 1 | #ifndef _PERF_UI_HELPLINE_H_ |
| 2 | #define _PERF_UI_HELPLINE_H_ 1 |
| 3 | |
Arnaldo Carvalho de Melo | 3af6e33 | 2011-10-13 08:52:46 -0300 | [diff] [blame] | 4 | #include <stdio.h> |
Mike Galbraith | 7bc7298 | 2011-10-17 09:14:58 -0200 | [diff] [blame] | 5 | #include <stdarg.h> |
Arnaldo Carvalho de Melo | 3af6e33 | 2011-10-13 08:52:46 -0300 | [diff] [blame] | 6 | |
Namhyung Kim | 0985a94 | 2012-08-16 17:14:54 +0900 | [diff] [blame] | 7 | #include "../util/cache.h" |
| 8 | |
Namhyung Kim | e6e9046 | 2012-08-16 17:14:50 +0900 | [diff] [blame] | 9 | struct ui_helpline { |
| 10 | void (*pop)(void); |
| 11 | void (*push)(const char *msg); |
| 12 | }; |
| 13 | |
| 14 | extern struct ui_helpline *helpline_fns; |
| 15 | |
Arnaldo Carvalho de Melo | 1e6dd07 | 2010-08-10 15:58:50 -0300 | [diff] [blame] | 16 | void ui_helpline__init(void); |
Namhyung Kim | e6e9046 | 2012-08-16 17:14:50 +0900 | [diff] [blame] | 17 | |
Arnaldo Carvalho de Melo | 5575536 | 2010-08-08 19:48:31 -0300 | [diff] [blame] | 18 | void ui_helpline__pop(void); |
| 19 | void ui_helpline__push(const char *msg); |
Arnaldo Carvalho de Melo | 59e8fe3 | 2010-08-10 15:44:20 -0300 | [diff] [blame] | 20 | void ui_helpline__vpush(const char *fmt, va_list ap); |
Arnaldo Carvalho de Melo | 5575536 | 2010-08-08 19:48:31 -0300 | [diff] [blame] | 21 | void ui_helpline__fpush(const char *fmt, ...); |
| 22 | void ui_helpline__puts(const char *msg); |
| 23 | |
Namhyung Kim | e6e9046 | 2012-08-16 17:14:50 +0900 | [diff] [blame] | 24 | extern char ui_helpline__current[512]; |
Arnaldo Carvalho de Melo | 4610e41 | 2011-10-26 12:04:37 -0200 | [diff] [blame] | 25 | |
Namhyung Kim | 1254b51e | 2012-09-28 18:32:02 +0900 | [diff] [blame^] | 26 | #ifdef NEWT_SUPPORT |
| 27 | extern char ui_helpline__last_msg[]; |
| 28 | int ui_helpline__show_help(const char *format, va_list ap); |
| 29 | #else |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 30 | static inline int ui_helpline__show_help(const char *format __maybe_unused, |
| 31 | va_list ap __maybe_unused) |
Namhyung Kim | 0985a94 | 2012-08-16 17:14:54 +0900 | [diff] [blame] | 32 | { |
| 33 | return 0; |
| 34 | } |
Namhyung Kim | 1254b51e | 2012-09-28 18:32:02 +0900 | [diff] [blame^] | 35 | #endif /* NEWT_SUPPORT */ |
Namhyung Kim | 0985a94 | 2012-08-16 17:14:54 +0900 | [diff] [blame] | 36 | |
| 37 | #ifdef NO_GTK2_SUPPORT |
Irina Tirdea | 1d037ca | 2012-09-11 01:15:03 +0300 | [diff] [blame] | 38 | static inline int perf_gtk__show_helpline(const char *format __maybe_unused, |
| 39 | va_list ap __maybe_unused) |
Namhyung Kim | 0985a94 | 2012-08-16 17:14:54 +0900 | [diff] [blame] | 40 | { |
| 41 | return 0; |
| 42 | } |
| 43 | #else |
| 44 | int perf_gtk__show_helpline(const char *format, va_list ap); |
| 45 | #endif /* NO_GTK2_SUPPORT */ |
| 46 | |
Arnaldo Carvalho de Melo | 5575536 | 2010-08-08 19:48:31 -0300 | [diff] [blame] | 47 | #endif /* _PERF_UI_HELPLINE_H_ */ |