Rev 6456 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6450 | punk_joker | 1 | #ifndef KOLIBRI_FRAME_H |
2 | #define KOLIBRI_FRAME_H |
||
3 | |||
4 | enum { |
||
5 | TOP, |
||
6 | BOTTON |
||
7 | }; |
||
8 | |||
9 | struct frame { |
||
10 | unsigned int type; |
||
11 | uint16_t size_x; |
||
12 | uint16_t start_x; |
||
13 | uint16_t size_y; |
||
14 | uint16_t start_y; |
||
15 | unsigned int ext_col; |
||
16 | unsigned int int_col; |
||
17 | unsigned int draw_text_flag; |
||
18 | char *text_pointer; |
||
19 | unsigned int text_position; |
||
20 | unsigned int font_number; |
||
21 | unsigned int font_size_y; |
||
22 | unsigned int font_color; |
||
23 | unsigned int font_backgr_color; |
||
24 | }; |
||
25 | |||
26 | struct frame* kolibri_new_frame(uint16_t tlx, uint16_t tly, uint16_t sizex, uint16_t sizey, unsigned int ext_col, unsigned int int_col, unsigned int draw_text_flag, char *text_pointer, unsigned int text_position, unsigned int font_color, unsigned int font_bgcolor) |
||
27 | { |
||
28 | struct frame *new_frame = (struct frame *)malloc(sizeof(struct frame)); |
||
29 | new_frame -> type = 0; |
||
30 | new_frame -> size_x = sizex; |
||
31 | new_frame -> start_x = tlx; |
||
32 | new_frame -> size_y = sizey; |
||
33 | new_frame -> start_y = tly; |
||
34 | new_frame -> ext_col = ext_col; |
||
35 | new_frame -> int_col = int_col; |
||
36 | new_frame -> draw_text_flag = draw_text_flag; |
||
37 | new_frame -> text_pointer = text_pointer; |
||
38 | new_frame -> text_position = text_position; |
||
39 | new_frame -> font_number = 1; |
||
40 | new_frame -> font_size_y = 12; |
||
41 | new_frame -> font_color = font_color; |
||
42 | new_frame -> font_backgr_color = font_bgcolor; |
||
43 | return new_frame; |
||
44 | } |
||
45 | |||
46 | extern void (*frame_draw)(struct frame *) __attribute__((__stdcall__)); |
||
47 | |||
48 | #endif /* KOLIBRI_FRAME_H */ |