2010-08-08 22:56:47 +00:00
|
|
|
#ifndef _PERF_UI_PROGRESS_H_
|
|
|
|
#define _PERF_UI_PROGRESS_H_ 1
|
|
|
|
|
2014-04-25 19:31:02 +00:00
|
|
|
#include <linux/types.h>
|
2010-08-08 22:56:47 +00:00
|
|
|
|
2013-10-23 18:40:38 +00:00
|
|
|
void ui_progress__finish(void);
|
2014-12-17 20:24:45 +00:00
|
|
|
|
2013-10-23 18:40:38 +00:00
|
|
|
struct ui_progress {
|
|
|
|
const char *title;
|
|
|
|
u64 curr, next, step, total;
|
|
|
|
};
|
2014-12-17 20:24:45 +00:00
|
|
|
|
2013-10-23 18:40:38 +00:00
|
|
|
void ui_progress__init(struct ui_progress *p, u64 total, const char *title);
|
|
|
|
void ui_progress__update(struct ui_progress *p, u64 adv);
|
|
|
|
|
2013-10-23 17:08:48 +00:00
|
|
|
struct ui_progress_ops {
|
2013-10-23 18:40:38 +00:00
|
|
|
void (*update)(struct ui_progress *p);
|
2012-11-13 13:30:34 +00:00
|
|
|
void (*finish)(void);
|
2012-11-13 13:30:32 +00:00
|
|
|
};
|
|
|
|
|
2013-10-23 17:08:48 +00:00
|
|
|
extern struct ui_progress_ops *ui_progress__ops;
|
2012-11-13 13:30:32 +00:00
|
|
|
|
2010-08-08 22:56:47 +00:00
|
|
|
#endif
|