discoverpixy
numupdown.h
Go to the documentation of this file.
1 /**************************************************************************************************************************************
2 * Project: discoverpixy
3 * Website: https://github.com/t-moe/discoverpixy
4 * Authors: Aaron Schmocker, Timo Lang
5 * Institution: BFH Bern University of Applied Sciences
6 * File: common/gui/numupdown.h
7 *
8 * Version History:
9 * Date Autor Email SHA Changes
10 * 2015-04-30 timolang@gmail.com 76ea9d8 Added num up down support.
11 * 2015-05-11 timolang@gmail.com 08d9fe0 More work on doxygen module structure
12 * 2015-05-15 timolang@gmail.com 9a16865 Added doxgen comments to filesyste, checkbox, numupdown and screen module. And some minor changes to the other modules.
13 *
14 **************************************************************************************************************************************/
15 
16 #ifndef NUMUPDOWN_H
17 #define NUMUPDOWN_H
18 
19 #include "button.h"
20 
25 
31 
36 
43 typedef void (*NUMUPDOWN_CALLBACK)(void* numupdown, int16_t value);
44 
48 typedef struct {
49  uint16_t x;
50  uint16_t y;
51  uint16_t fgcolor;
52  int16_t value;
53  int16_t min;
54  int16_t max;
56 
60 
66 bool gui_numupdown_add(NUMUPDOWN_STRUCT* numupdown);
67 
72 void gui_numupdown_remove(NUMUPDOWN_STRUCT* numupdown);
73 
78 void gui_numupdown_update(NUMUPDOWN_STRUCT* numupdown);
79 
84 void gui_numupdown_redraw(NUMUPDOWN_STRUCT* numupdown);
85 
88 #endif /* NUMUPDOWN_H */
uint16_t x
The x-Coordinate of the Top-Left Starting Point.
Definition: numupdown.h:49
NUMUPDOWN_CALLBACK callback
Callback which is executed when the value changes.
Definition: numupdown.h:55
uint16_t y
The y-Coordinate of the Top-Left Starting Point.
Definition: numupdown.h:50
int16_t max
The maximum possible value (inclusive)
Definition: numupdown.h:54
void(* NUMUPDOWN_CALLBACK)(void *numupdown, int16_t value)
Definition: numupdown.h:43
void gui_numupdown_remove(NUMUPDOWN_STRUCT *numupdown)
Definition: numupdown.c:136
int16_t min
The minimum possible value (inclusive)
Definition: numupdown.h:53
void gui_numupdown_redraw(NUMUPDOWN_STRUCT *numupdown)
Definition: numupdown.c:144
uint16_t fgcolor
The 16-bit color of the value-text.
Definition: numupdown.h:51
BUTTON_STRUCT buttonDown
For internal use, don't change, don't initialize.
Definition: numupdown.h:58
void gui_numupdown_update(NUMUPDOWN_STRUCT *numupdown)
Definition: numupdown.c:154
int16_t value
The current/default value.
Definition: numupdown.h:52
BUTTON_STRUCT buttonUp
For internal use, don't change, don't initialize.
Definition: numupdown.h:57
bool gui_numupdown_add(NUMUPDOWN_STRUCT *numupdown)
Definition: numupdown.c:80