1aca7a94dSNamhyung Kim #ifndef _PERF_UI_HELPLINE_H_ 2aca7a94dSNamhyung Kim #define _PERF_UI_HELPLINE_H_ 1 3aca7a94dSNamhyung Kim 4aca7a94dSNamhyung Kim #include <stdio.h> 5aca7a94dSNamhyung Kim #include <stdarg.h> 6aca7a94dSNamhyung Kim 7*0985a948SNamhyung Kim #include "../util/cache.h" 8*0985a948SNamhyung Kim 9e6e90468SNamhyung Kim struct ui_helpline { 10e6e90468SNamhyung Kim void (*pop)(void); 11e6e90468SNamhyung Kim void (*push)(const char *msg); 12e6e90468SNamhyung Kim }; 13e6e90468SNamhyung Kim 14e6e90468SNamhyung Kim extern struct ui_helpline *helpline_fns; 15e6e90468SNamhyung Kim 16aca7a94dSNamhyung Kim void ui_helpline__init(void); 17e6e90468SNamhyung Kim 18aca7a94dSNamhyung Kim void ui_helpline__pop(void); 19aca7a94dSNamhyung Kim void ui_helpline__push(const char *msg); 20aca7a94dSNamhyung Kim void ui_helpline__vpush(const char *fmt, va_list ap); 21aca7a94dSNamhyung Kim void ui_helpline__fpush(const char *fmt, ...); 22aca7a94dSNamhyung Kim void ui_helpline__puts(const char *msg); 23aca7a94dSNamhyung Kim 24e6e90468SNamhyung Kim extern char ui_helpline__current[512]; 25aca7a94dSNamhyung Kim 26*0985a948SNamhyung Kim #ifdef NO_NEWT_SUPPORT 27*0985a948SNamhyung Kim static inline int ui_helpline__show_help(const char *format __used, 28*0985a948SNamhyung Kim va_list ap __used) 29*0985a948SNamhyung Kim { 30*0985a948SNamhyung Kim return 0; 31*0985a948SNamhyung Kim } 32*0985a948SNamhyung Kim #else 33*0985a948SNamhyung Kim extern char ui_helpline__last_msg[]; 34*0985a948SNamhyung Kim int ui_helpline__show_help(const char *format, va_list ap); 35*0985a948SNamhyung Kim #endif /* NO_NEWT_SUPPORT */ 36*0985a948SNamhyung Kim 37*0985a948SNamhyung Kim #ifdef NO_GTK2_SUPPORT 38*0985a948SNamhyung Kim static inline int perf_gtk__show_helpline(const char *format __used, 39*0985a948SNamhyung Kim va_list ap __used) 40*0985a948SNamhyung Kim { 41*0985a948SNamhyung Kim return 0; 42*0985a948SNamhyung Kim } 43*0985a948SNamhyung Kim #else 44*0985a948SNamhyung Kim int perf_gtk__show_helpline(const char *format, va_list ap); 45*0985a948SNamhyung Kim #endif /* NO_GTK2_SUPPORT */ 46*0985a948SNamhyung Kim 47aca7a94dSNamhyung Kim #endif /* _PERF_UI_HELPLINE_H_ */ 48