editint.h
Go to the documentation of this file.00001
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 #ifndef DT_EDITINT_H
00061 #define DT_EDITINT_H
00062
00063 #include <dt/dwidget.h>
00064 #include <dt/dtag.h>
00065 #include <drv/lcd_text.h>
00066
00067 #include <cfg/compiler.h>
00068 #include <cfg/macros.h>
00069
00070
00071 #define EDIS_DEFAULT 0
00072 #define EDIS_CURSORLEFT BV(0)
00073 #define EDIS_WRAP BV(1)
00074
00076 typedef uint16_t dstyle_t;
00077
00078 typedef struct DEditInt
00079 {
00080 DWidget widget;
00081
00082 int *value;
00083 int min;
00084 int max;
00085 dstyle_t style;
00086 void (*draw)(struct DEditInt *);
00087
00088 } DEditInt;
00089
00090 void editint_init(DEditInt *e, dpos_t pos, dpos_t size, dcontext_t *context, int *value, int min, int max);
00091 void editint_update(DEditInt *e, dtag_t tag, dval_t val);
00092 void editint_draw(DEditInt *e);
00093
00094 #endif