leveledit.h

Go to the documentation of this file.
00001 
00039 #ifndef GUI_LEVELEDIT_H
00040 #define GUI_LEVELEDIT_H
00041 
00042 //#include <gui/levelbar.h>
00043 
00044 /* Type for level_init */
00045 #define LEVELEDIT_NOBAR  0  
00046 #define LEVELEDIT_SINGLE 1  
00047 #define LEVELEDIT_DOUBLE 2  
00051 /* Fwd decl */
00052 struct Bitmap;
00053 struct LevelEdit;
00054 
00056 typedef void level_set_callback(void);
00057 
00059 typedef void display_callback(struct LevelEdit *);
00060 
00064 typedef struct LevelEdit {
00065     int type;           /*<! Type of level edititing mode (see prev defines) */
00066     const char *title;  /*<! Title on top of screen */
00067     const char *unit;   /*<! Unit of quantity changed by this LevelEdit */
00068     int min;            /*<! Minimum level */
00069     int max;            /*<! Maximum level */
00070     int step;           /*<! Value of a single increment/decrement */
00071 
00072     level_set_callback *set_hook;     /*<! Callback called when a value is changed  */
00073     display_callback   *display_hook; /*<! Callback for complex unit display */
00074     int *ch1_val;                     /*<! (left) Value edited by this leveledit */
00075     int *ch2_val;                     /*<! Right channel edited */
00076 
00077     struct Bitmap   *bitmap;  /*<! Bitmap where the whole thing is rendered */
00078 } LevelEdit;
00079 
00080 
00081 void level_init(struct LevelEdit *lev,
00082         int type,
00083         struct Bitmap *bmp, const char *title, const char *unit,
00084         int min, int max, int step,
00085         int *ch1_val, int *ch2_val,
00086         level_set_callback *change_hook, display_callback *display_hook);
00087 void level_edit(struct LevelEdit *lev);
00088 
00089 #endif /* GUI_LEVELEDIT_H */