Added Checkbox support

This commit is contained in:
t-moe
2015-04-27 21:28:05 +02:00
parent 7c9eabc6a3
commit b300ac5890
3 changed files with 122 additions and 4 deletions

15
common/gui/checkbox.h Normal file
View File

@@ -0,0 +1,15 @@
typedef void (*CHECKBOX_CALLBACK)(void *checkbox, bool checked); //!< Function pointer used...
typedef struct {
TOUCH_AREA_STRUCT base;
uint16_t fgcolor;
bool checked;
CHECKBOX_CALLBACK callback; //Callback
} CHECKBOX_STRUCT;
bool gui_checkbox_add(CHECKBOX_STRUCT* checkbox);
void gui_checkbox_remove(CHECKBOX_STRUCT* checkbox);
void gui_checkbox_update(CHECKBOX_STRUCT* checkbox);
void gui_checkbox_redraw(CHECKBOX_STRUCT* checkbox);
#define CHECKBOX_WIN_FG_COLOR RGB(32,161,34)