util.h 648 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _PERF_UI_UTIL_H_
  3. #define _PERF_UI_UTIL_H_ 1
  4. #include <stdarg.h>
  5. int ui__getch(int delay_secs);
  6. int ui__popup_menu(int argc, char * const argv[]);
  7. int ui__help_window(const char *text);
  8. int ui__dialog_yesno(const char *msg);
  9. int ui__question_window(const char *title, const char *text,
  10. const char *exit_msg, int delay_secs);
  11. struct perf_error_ops {
  12. int (*error)(const char *format, va_list args);
  13. int (*warning)(const char *format, va_list args);
  14. };
  15. int perf_error__register(struct perf_error_ops *eops);
  16. int perf_error__unregister(struct perf_error_ops *eops);
  17. #endif /* _PERF_UI_UTIL_H_ */