Rev 6457 | Rev 6479 | 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_FRAME_H |
2 | #define KOLIBRI_FRAME_H |
||
3 | |||
4 | enum { |
||
5 | TOP, |
||
6 | BOTTON |
||
7 | }; |
||
8 | |||
6457 | punk_joker | 9 | typedef struct { |
6450 | punk_joker | 10 | unsigned int type; |
6466 | siemargl | 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; |
||
6450 | punk_joker | 23 | unsigned int font_backgr_color; |
6466 | siemargl | 24 | }frame; |
6450 | punk_joker | 25 | |
6457 | punk_joker | 26 | 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) |
6450 | punk_joker | 27 | { |
6457 | punk_joker | 28 | frame *new_frame = (frame *)malloc(sizeof(frame)); |
6450 | punk_joker | 29 | new_frame -> type = 0; |
6466 | siemargl | 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 = 0; // 0 == font 6x9, 1==8x16 |
||
40 | new_frame -> font_size_y = 9; |
||
41 | new_frame -> font_color = font_color; |
||
6450 | punk_joker | 42 | new_frame -> font_backgr_color = font_bgcolor; |
43 | return new_frame; |
||
44 | } |
||
45 | |||
6457 | punk_joker | 46 | extern void (*frame_draw)(frame *) __attribute__((__stdcall__)); |
6450 | punk_joker | 47 | |
48 | #endif /* KOLIBRI_FRAME_H */ |