2 #include <linux/kernel.h> 4 #include "../progress.h" 5 #include "../libslang.h" 9 #include "../browser.h" 25 return ret + scnprintf(buf, size,
"%s [%s/%s]",
26 p->
title, buf_cur, buf_tot);
31 char buf[100], *title = (
char *) p->
title;
50 y = SLtt_Screen_Rows / 2 - 2;
52 SLsmg_draw_box(y, 0, 3, SLtt_Screen_Cols);
54 SLsmg_write_string(title);
55 SLsmg_fill_region(y, 1, 1, SLtt_Screen_Cols - 2,
' ');
57 bar = ((SLtt_Screen_Cols - 2) * p->
curr) / p->
total;
58 SLsmg_fill_region(y, 1, 1, bar,
' ');
72 y = SLtt_Screen_Rows / 2 - 2;
74 SLsmg_fill_region(y, 0, 3, SLtt_Screen_Cols,
' ');
void ui__refresh_dimensions(bool force)
static int get_title(struct ui_progress *p, char *buf, size_t size)
static struct ui_progress_ops tui_progress__ops
struct ui_progress_ops * ui_progress__ops
static void __tui_progress__init(struct ui_progress *p)
int unit_number__scnprintf(char *buf, size_t size, u64 n)
void tui_progress__init(void)
static void tui_progress__finish(void)
static void tui_progress__update(struct ui_progress *p)
#define HE_COLORSET_SELECTED
void(* init)(struct ui_progress *p)