3 * Copyright 2004, 2006 Develer S.r.l. (http://www.develer.com/)
6 * \author Stefano Fedrigo <aleph@develer.com>
8 * \brief Graphics level bar widget
11 #ifndef GUI_LEVELBAR_H
12 #define GUI_LEVELBAR_H
17 /** Type of levelbar */
18 #define LBAR_HORIZONTAL 1
19 #define LBAR_VERTICAL 2
21 typedef struct LevelBar
23 struct Bitmap *bitmap;
25 int pos; ///< Current level
26 int min; ///< Minimum level
27 int max; ///< Maximum level
28 coord_t x1, y1, x2, y2; ///< Position of widget in the bitmap
31 void lbar_init(struct LevelBar *lb, struct Bitmap *bmp, int type, int min, int max, int pos,
32 coord_t x1, coord_t y1, coord_t x2, coord_t y2);
33 void lbar_setLevel(struct LevelBar *lb, int level);
34 int lbar_getLevel(struct LevelBar *lb);
35 void lbar_changeLevel(struct LevelBar *lb, int delta);
36 void lbar_setMax(struct LevelBar *lb, int max);
37 void lbar_draw(struct LevelBar *lb);
39 #endif /* GUI_LEVELBAR_H */