2016-06-22 01:49:28 +02:00
|
|
|
#ifndef KOLIBRI_FRAME_H
|
|
|
|
#define KOLIBRI_FRAME_H
|
|
|
|
|
|
|
|
enum {
|
|
|
|
TOP,
|
|
|
|
BOTTON
|
|
|
|
};
|
|
|
|
|
2016-06-30 18:10:04 +02:00
|
|
|
typedef struct {
|
2016-06-22 01:49:28 +02:00
|
|
|
unsigned int type;
|
2016-07-31 16:43:54 +02:00
|
|
|
uint16_t size_x;
|
|
|
|
uint16_t start_x;
|
|
|
|
uint16_t size_y;
|
|
|
|
uint16_t start_y;
|
|
|
|
unsigned int ext_col;
|
|
|
|
unsigned int int_col;
|
|
|
|
unsigned int draw_text_flag;
|
|
|
|
char *text_pointer;
|
|
|
|
unsigned int text_position;
|
|
|
|
unsigned int font_number;
|
|
|
|
unsigned int font_size_y;
|
|
|
|
unsigned int font_color;
|
2016-06-22 01:49:28 +02:00
|
|
|
unsigned int font_backgr_color;
|
2016-07-31 16:43:54 +02:00
|
|
|
}frame;
|
2016-06-22 01:49:28 +02:00
|
|
|
|
2016-06-30 18:10:04 +02:00
|
|
|
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)
|
2016-06-22 01:49:28 +02:00
|
|
|
{
|
2016-06-30 18:10:04 +02:00
|
|
|
frame *new_frame = (frame *)malloc(sizeof(frame));
|
2016-06-22 01:49:28 +02:00
|
|
|
new_frame -> type = 0;
|
2016-07-31 16:43:54 +02:00
|
|
|
new_frame -> size_x = sizex;
|
|
|
|
new_frame -> start_x = tlx;
|
|
|
|
new_frame -> size_y = sizey;
|
|
|
|
new_frame -> start_y = tly;
|
|
|
|
new_frame -> ext_col = ext_col;
|
|
|
|
new_frame -> int_col = int_col;
|
|
|
|
new_frame -> draw_text_flag = draw_text_flag;
|
|
|
|
new_frame -> text_pointer = text_pointer;
|
|
|
|
new_frame -> text_position = text_position;
|
|
|
|
new_frame -> font_number = 0; // 0 == font 6x9, 1==8x16
|
|
|
|
new_frame -> font_size_y = 9;
|
|
|
|
new_frame -> font_color = font_color;
|
2016-06-22 01:49:28 +02:00
|
|
|
new_frame -> font_backgr_color = font_bgcolor;
|
|
|
|
return new_frame;
|
|
|
|
}
|
|
|
|
|
2016-06-30 18:10:04 +02:00
|
|
|
extern void (*frame_draw)(frame *) __attribute__((__stdcall__));
|
2016-06-22 01:49:28 +02:00
|
|
|
|
|
|
|
#endif /* KOLIBRI_FRAME_H */
|