Subversion Repositories Kolibri OS

Rev

Rev 6450 | 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
 
4
struct progress_bar {
5
	unsigned int value;
6
    unsigned int left;
7
    unsigned int top;
8
    unsigned int width;
9
    unsigned int height;
10
    unsigned int style;
11
    unsigned int min;
12
    unsigned int max;
13
    unsigned int back_color;
14
    unsigned int progress_color;
15
    unsigned int frame_color;
16
};
17
 
18
struct progress_bar* kolibri_new_progress_bar(unsigned int min_value, unsigned int max_value, unsigned int cur_value, unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey)
19
{
20
    struct progress_bar *new_progressbar = (struct progress_bar *)malloc(sizeof(struct progress_bar));
21
 
22
    new_progressbar -> value = cur_value;
23
    new_progressbar -> left = tlx;
24
    new_progressbar -> top = tly;
25
    new_progressbar -> width = sizex;
26
    new_progressbar -> height = sizey;
27
    new_progressbar -> style = 1;
28
    new_progressbar -> min = min_value;
29
    new_progressbar -> max = max_value;
30
    new_progressbar -> back_color = 0xffffff;
31
    new_progressbar -> progress_color = 0x00ff00;
32
    new_progressbar -> frame_color = 0x000000;
33
    return new_progressbar;
34
}
35
 
36
extern void (*progressbar_draw)(struct progress_bar *) __attribute__((__stdcall__));
37
extern void (*progressbar_progress)(struct progress_bar *) __attribute__((__stdcall__));
38
 
39
#endif /* KOLIBRI_PROGRESSBAR_H */