helpline.h 1.1 KB

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