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