blob: e1f126ba0690ef7cb66ac845568073b92e76e7e7 [file] [log] [blame]
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -03001#ifndef _PERF_UI_HELPLINE_H_
2#define _PERF_UI_HELPLINE_H_ 1
3
Arnaldo Carvalho de Melo3af6e332011-10-13 08:52:46 -03004#include <stdio.h>
Mike Galbraith7bc72982011-10-17 09:14:58 -02005#include <stdarg.h>
Arnaldo Carvalho de Melo3af6e332011-10-13 08:52:46 -03006
Namhyung Kim0985a942012-08-16 17:14:54 +09007#include "../util/cache.h"
8
Namhyung Kime6e90462012-08-16 17:14:50 +09009struct ui_helpline {
10 void (*pop)(void);
11 void (*push)(const char *msg);
12};
13
14extern struct ui_helpline *helpline_fns;
15
Arnaldo Carvalho de Melo1e6dd072010-08-10 15:58:50 -030016void ui_helpline__init(void);
Namhyung Kime6e90462012-08-16 17:14:50 +090017
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030018void ui_helpline__pop(void);
19void ui_helpline__push(const char *msg);
Arnaldo Carvalho de Melo59e8fe32010-08-10 15:44:20 -030020void ui_helpline__vpush(const char *fmt, va_list ap);
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030021void ui_helpline__fpush(const char *fmt, ...);
22void ui_helpline__puts(const char *msg);
23
Namhyung Kime6e90462012-08-16 17:14:50 +090024extern char ui_helpline__current[512];
Arnaldo Carvalho de Melo4610e412011-10-26 12:04:37 -020025
Namhyung Kim1254b51e2012-09-28 18:32:02 +090026#ifdef NEWT_SUPPORT
27extern char ui_helpline__last_msg[];
28int ui_helpline__show_help(const char *format, va_list ap);
29#else
Irina Tirdea1d037ca2012-09-11 01:15:03 +030030static inline int ui_helpline__show_help(const char *format __maybe_unused,
31 va_list ap __maybe_unused)
Namhyung Kim0985a942012-08-16 17:14:54 +090032{
33 return 0;
34}
Namhyung Kim1254b51e2012-09-28 18:32:02 +090035#endif /* NEWT_SUPPORT */
Namhyung Kim0985a942012-08-16 17:14:54 +090036
37#ifdef NO_GTK2_SUPPORT
Irina Tirdea1d037ca2012-09-11 01:15:03 +030038static inline int perf_gtk__show_helpline(const char *format __maybe_unused,
39 va_list ap __maybe_unused)
Namhyung Kim0985a942012-08-16 17:14:54 +090040{
41 return 0;
42}
43#else
44int perf_gtk__show_helpline(const char *format, va_list ap);
45#endif /* NO_GTK2_SUPPORT */
46
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030047#endif /* _PERF_UI_HELPLINE_H_ */