blob: 8f775a053ca33ea075d0be319e78f99dbe453c93 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -03002#ifndef _PERF_UI_HELPLINE_H_
3#define _PERF_UI_HELPLINE_H_ 1
4
Arnaldo Carvalho de Melo3af6e332011-10-13 08:52:46 -03005#include <stdio.h>
Mike Galbraith7bc72982011-10-17 09:14:58 -02006#include <stdarg.h>
Arnaldo Carvalho de Melo3af6e332011-10-13 08:52:46 -03007
Namhyung Kim0985a942012-08-16 17:14:54 +09008#include "../util/cache.h"
9
Namhyung Kime6e90462012-08-16 17:14:50 +090010struct ui_helpline {
11 void (*pop)(void);
12 void (*push)(const char *msg);
Namhyung Kimb56e5332012-11-15 01:47:41 +090013 int (*show)(const char *fmt, va_list ap);
Namhyung Kime6e90462012-08-16 17:14:50 +090014};
15
16extern struct ui_helpline *helpline_fns;
17
Arnaldo Carvalho de Melo1e6dd072010-08-10 15:58:50 -030018void ui_helpline__init(void);
Namhyung Kime6e90462012-08-16 17:14:50 +090019
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030020void ui_helpline__pop(void);
21void ui_helpline__push(const char *msg);
Arnaldo Carvalho de Melo59e8fe32010-08-10 15:44:20 -030022void ui_helpline__vpush(const char *fmt, va_list ap);
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030023void ui_helpline__fpush(const char *fmt, ...);
24void ui_helpline__puts(const char *msg);
Arnaldo Carvalho de Melo9484b862016-11-25 15:48:25 -030025void ui_helpline__printf(const char *fmt, ...);
Namhyung Kimb56e5332012-11-15 01:47:41 +090026int ui_helpline__vshow(const char *fmt, va_list ap);
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030027
Namhyung Kime6e90462012-08-16 17:14:50 +090028extern char ui_helpline__current[512];
Namhyung Kim1254b51e2012-09-28 18:32:02 +090029extern char ui_helpline__last_msg[];
Namhyung Kim0985a942012-08-16 17:14:54 +090030
Arnaldo Carvalho de Melo55755362010-08-08 19:48:31 -030031#endif /* _PERF_UI_HELPLINE_H_ */