Subversion Repositories Kolibri OS

Rev

Rev 6456 | Rev 6466 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6456 Rev 6457
Line 6... Line 6...
6
enum CHECKBOX_FLAGS {
6
enum CHECKBOX_FLAGS {
7
     CHECKBOX_IS_SET = 0x00000002
7
     CHECKBOX_IS_SET = 0x00000002
8
     /* Add more flags later */
8
     /* Add more flags later */
9
};
9
};
Line 10... Line 10...
10
 
10
 
11
struct check_box {
11
typedef struct {
12
    unsigned int left_s;
12
    unsigned int left_s;
13
    unsigned int top_s;
13
    unsigned int top_s;
14
    unsigned int ch_text_margin;
14
    unsigned int ch_text_margin;
15
    unsigned int color;
15
    unsigned int color;
Line 18... Line 18...
18
    char *text;
18
    char *text;
19
    unsigned int flags;
19
    unsigned int flags;
Line 20... Line 20...
20
 
20
 
21
    /* Users can use members above this */
21
    /* Users can use members above this */
22
    unsigned int size_of_str;
22
    unsigned int size_of_str;
Line 23... Line 23...
23
};
23
}check_box;
24
 
24
 
25
struct check_box* kolibri_new_check_box(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, char *label_text)
25
check_box* kolibri_new_check_box(unsigned int tlx, unsigned int tly, unsigned int sizex, unsigned int sizey, char *label_text)
26
{
26
{
27
     struct check_box* new_checkbox = (struct check_box *)malloc(sizeof(struct check_box));
27
     check_box* new_checkbox = (check_box *)malloc(sizeof(check_box));
28
     new_checkbox -> left_s = (tlx << 16) + sizex;
28
     new_checkbox -> left_s = (tlx << 16) + sizex;
29
     new_checkbox -> top_s  = (tly << 16) + sizey;
29
     new_checkbox -> top_s  = (tly << 16) + sizey;
30
     new_checkbox -> ch_text_margin = 10;
30
     new_checkbox -> ch_text_margin = 10;
Line 35... Line 35...
35
     new_checkbox -> flags = 0x00000008;
35
     new_checkbox -> flags = 0x00000008;
Line 36... Line 36...
36
 
36
 
37
     return new_checkbox;
37
     return new_checkbox;
Line 38... Line 38...
38
}
38
}
39
 
39
 
Line 40... Line 40...
40
extern void (*check_box_draw2)(struct check_box *) __attribute__((__stdcall__));
40
extern void (*check_box_draw2)(check_box *) __attribute__((__stdcall__));