diff --git a/src/progress_bar.h b/src/progress_bar.h
index d6fdba5b0235a967ab4b7eea539387f957181d06..36c918519344dfc97c61229a88fd10ab6aa5f4d3 100644 (file)
--- a/src/progress_bar.h
+++ b/src/progress_bar.h
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2010 The Music Player Daemon Project
* Project homepage: http://musicpd.org
*
* This program is free software; you can redistribute it and/or modify
};
static inline void
-progress_bar_init(struct progress_bar *p, unsigned height, unsigned width,
- int y, int x)
+progress_bar_init(struct progress_bar *p, unsigned width, int y, int x)
{
- window_init(&p->window, height, width, y, x);
+ window_init(&p->window, 1, width, y, x);
+ leaveok(p->window.w, TRUE);
p->current = 0;
p->max = 0;
p->width = 0;
}
+static inline void
+progress_bar_deinit(struct progress_bar *p)
+{
+ delwin(p->window.w);
+}
+
void
progress_bar_paint(const struct progress_bar *p);
-bool
-progress_bar_resize(struct progress_bar *p);
+void
+progress_bar_resize(struct progress_bar *p, unsigned width, int y, int x);
bool
progress_bar_set(struct progress_bar *p, unsigned current, unsigned max);