annotate src/opt.h @ 25:bb85be761b50
started the documentation
author |
John Tsiombikas <nuclear@member.fsf.org> |
date |
Sun, 08 Mar 2015 05:30:02 +0200 |
parents |
ded3d0a74e19 |
children |
|
rev |
line source |
nuclear@0
|
1 #ifndef OPT_H_
|
nuclear@0
|
2 #define OPT_H_
|
nuclear@0
|
3
|
nuclear@19
|
4 enum opt_type { OTYPE_INT, OTYPE_FLOAT, OTYPE_VEC };
|
nuclear@0
|
5
|
nuclear@0
|
6 struct option {
|
nuclear@0
|
7 enum opt_type type;
|
nuclear@0
|
8 int ival;
|
nuclear@0
|
9 float fval;
|
nuclear@19
|
10 float vval[4];
|
nuclear@0
|
11 };
|
nuclear@0
|
12
|
nuclear@0
|
13 void *create_options(void);
|
nuclear@0
|
14 void destroy_options(void *optdb);
|
nuclear@0
|
15
|
nuclear@0
|
16 void set_option_int(void *optdb, const char *key, int val);
|
nuclear@0
|
17 void set_option_float(void *optdb, const char *key, float val);
|
nuclear@19
|
18 void set_option_vec(void *optdb, const char *key, float *val);
|
nuclear@19
|
19 /* convenience functions */
|
nuclear@19
|
20 void set_option_vec3f(void *optdb, const char *key, float x, float y, float z);
|
nuclear@19
|
21 void set_option_vec4f(void *optdb, const char *key, float x, float y, float z, float w);
|
nuclear@0
|
22
|
nuclear@0
|
23 int get_option_int(void *optdb, const char *key, int *val);
|
nuclear@0
|
24 int get_option_float(void *optdb, const char *key, float *val);
|
nuclear@19
|
25 int get_option_vec(void *optdb, const char *key, float *val);
|
nuclear@0
|
26
|
nuclear@0
|
27 #endif /* OPT_H_ */
|