discoverpixy
checkbox.h
Go to the documentation of this file.
1 #ifndef CHECKBOX_H
2 #define CHECKBOX_H
3 
4 #include "touch.h"
5 
10 
17 
22 
29 typedef void (*CHECKBOX_CALLBACK)(void *checkbox, bool checked);
30 
34 typedef struct {
36  uint16_t fgcolor;
37  bool checked;
40 
46 bool gui_checkbox_add(CHECKBOX_STRUCT* checkbox);
47 
52 void gui_checkbox_remove(CHECKBOX_STRUCT* checkbox);
53 
58 void gui_checkbox_update(CHECKBOX_STRUCT* checkbox);
59 
64 void gui_checkbox_redraw(CHECKBOX_STRUCT* checkbox);
65 
66 #define CHECKBOX_WIN_FG_COLOR RGB(32,161,34)
67 
70 #endif /* CHECKBOX_H */
bool gui_checkbox_add(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:51
void gui_checkbox_update(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:102
void gui_checkbox_remove(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:96
bool checked
A boolean which indicates whether or not the checkbox is currently checked.
Definition: checkbox.h:37
Definition: touch.h:50
Definition: checkbox.h:34
TOUCH_AREA_STRUCT base
Basic geometry of the Checkbox. You only need to set the x1, y1, x2, y2 members of this struct...
Definition: checkbox.h:35
void(* CHECKBOX_CALLBACK)(void *checkbox, bool checked)
Definition: checkbox.h:29
uint16_t fgcolor
The 16-bit color of the tickmark.
Definition: checkbox.h:36
void gui_checkbox_redraw(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:85
CHECKBOX_CALLBACK callback
Callback which is executed when the checkbox changes state.
Definition: checkbox.h:38