#include "ply-image.h"
#include "ply-utils.h"
-#ifndef BAR_HEIGHT
-#define BAR_HEIGHT 16
-#endif
-
struct _ply_progress_bar
{
ply_pixel_display_t *display;
ply_progress_bar_show (ply_progress_bar_t *progress_bar,
ply_pixel_display_t *display,
long x,
- long y)
+ long y,
+ unsigned long width,
+ unsigned long height)
{
assert (progress_bar != NULL);
progress_bar->display = display;
progress_bar->area.x = x;
progress_bar->area.y = y;
- progress_bar->area.height = BAR_HEIGHT;
- progress_bar->area.width = ply_pixel_display_get_width (display);
+ progress_bar->area.height = height;
+ progress_bar->area.width = width;
progress_bar->is_hidden = false;
ply_progress_bar_draw (progress_bar);
void ply_progress_bar_show (ply_progress_bar_t *bar,
ply_pixel_display_t *display,
long x,
- long y);
+ long y,
+ unsigned long width,
+ unsigned long height);
void ply_progress_bar_hide (ply_progress_bar_t *bar);
void ply_progress_bar_draw (ply_progress_bar_t *bar);
void ply_progress_bar_draw_area (ply_progress_bar_t *bar,
view->logo_area.y + view->logo_area.height + height / 2);
ply_progress_bar_show (view->progress_bar,
view->display,
- 0, screen_height - ply_progress_bar_get_height (view->progress_bar));
+ 0,
+ screen_height - BAR_HEIGHT,
+ screen_width,
+ BAR_HEIGHT);
view_redraw (view);
}