Subversion Repositories Kolibri OS

Rev

Rev 6456 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6450 punk_joker 1
#ifndef KOLIBRI_PROGRESSBAR_H
2
#define KOLIBRI_PROGRESSBAR_H
3
 
6470 siemargl 4
typedef struct {
5
	unsigned int value;
6450 punk_joker 6
    unsigned int left;
6470 siemargl 7
    unsigned int top;
8
    unsigned int width;
9
    unsigned int height;
10
    unsigned int style;
6450 punk_joker 11
    unsigned int min;
12
    unsigned int max;
13
    unsigned int back_color;
14
    unsigned int progress_color;
15
    unsigned int frame_color;
6470 siemargl 16
} progressbar;
6450 punk_joker 17
 
6470 siemargl 18
progressbar* kolibri_new_progressbar(unsigned int min_value, unsigned int max_value, unsigned int cur_value, unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey)
6450 punk_joker 19
{
6470 siemargl 20
    progressbar *new_progressbar = (progressbar*)malloc(sizeof(progressbar));
21
 
22
    new_progressbar -> value = cur_value;
6450 punk_joker 23
    new_progressbar -> left = tlx;
6470 siemargl 24
    new_progressbar -> top = tly;
25
    new_progressbar -> width = sizex;
26
    new_progressbar -> height = sizey;
27
    new_progressbar -> style = 1;
6450 punk_joker 28
    new_progressbar -> min = min_value;
29
    new_progressbar -> max = max_value;
6470 siemargl 30
    new_progressbar -> back_color = 0xffffff;   // white
31
    new_progressbar -> progress_color = 0x00ff00; // green
32
    new_progressbar -> frame_color = 0x000000; // black
6450 punk_joker 33
    return new_progressbar;
34
}
35
 
6470 siemargl 36
extern void (*progressbar_draw)(progressbar *) __attribute__((__stdcall__));
37
extern void (*progressbar_progress)(progressbar *) __attribute__((__stdcall__));
6450 punk_joker 38
 
39
#endif /* KOLIBRI_PROGRESSBAR_H */