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 NO_GTK2_SUPPORT
  29. static inline int perf_gtk__show_helpline(const char *format __maybe_unused,
  30. va_list ap __maybe_unused)
  31. {
  32. return 0;
  33. }
  34. #else
  35. int perf_gtk__show_helpline(const char *format, va_list ap);
  36. #endif /* NO_GTK2_SUPPORT */
  37. #endif /* _PERF_UI_HELPLINE_H_ */