SWILIB API (X75)    
Loading...
Searching...
No Matches
cfg_items.h
Go to the documentation of this file.
1#pragma once
2
3#define CFG_UINT 1
4#define CFG_STR_UTF8 2
5#define CFG_INT 3
6#define CFG_STR_WIN1251 4
7#define CFG_CBOX 5
8#define CFG_STR_PASS 6
9#define CFG_COORDINATES 7
10#define CFG_COLOR 8
11//Level
12//min<>0 - start tag (name used)
13//min=0 - end tag
14#define CFG_LEVEL 9
15
16#define CFG_UTF8_STRING 10
17#define CFG_CHECKBOX 11
18#define CFG_TIME 12
19//TTime
20#define CFG_DATE 13
21//TDate
22#define CFG_RECT 14
23//RECT
24//#define CFG_STR_GB 15
25#define CFG_UTF8_STRING_PASS 16
26#define CFG_KEYCODE 17
27
28typedef struct {
29 int type;
30 char name[32];
31 unsigned int min;
32 unsigned int max;
33} CFG_HDR;
34
35typedef struct {
36 char cbox_text[32];
38
39#ifdef __GNUC__
40 #define __DATA_CFG_BEGIN(x) ((void*)(&__config_begin##x)+4)
41 #define __DATA_CFG_END(x) ((void*)(&__config_end##x))
42
43 #define __root __attribute__((section("CONFIG"), used, no_reorder)) volatile
44 #define __CFG_BEGIN(x) __root int __config_begin##x = 0L;
45 #define __CFG_END(x) __root int __config_end##x = 0L;
46
47 #define __CONFIG(x, cfg) &cfg, (int*)&__config_begin##x, (int*)&__config_end##x
48
49 #define __CONFIG_EXTERN(x, cfg) extern CFG_HDR cfg; \
50 extern int __config_begin##x; \
51 extern int __config_end##x;
52#endif
unsigned int max
Definition cfg_items.h:32
unsigned int min
Definition cfg_items.h:31
int type
Definition cfg_items.h:29