libgoatvr

diff src/opt.h @ 0:ded3d0a74e19

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 29 Aug 2014 03:45:25 +0300
parents
children 437fe32ac633
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/opt.h	Fri Aug 29 03:45:25 2014 +0300
     1.3 @@ -0,0 +1,21 @@
     1.4 +#ifndef OPT_H_
     1.5 +#define OPT_H_
     1.6 +
     1.7 +enum opt_type { OTYPE_INT, OTYPE_FLOAT };
     1.8 +
     1.9 +struct option {
    1.10 +	enum opt_type type;
    1.11 +	int ival;
    1.12 +	float fval;
    1.13 +};
    1.14 +
    1.15 +void *create_options(void);
    1.16 +void destroy_options(void *optdb);
    1.17 +
    1.18 +void set_option_int(void *optdb, const char *key, int val);
    1.19 +void set_option_float(void *optdb, const char *key, float val);
    1.20 +
    1.21 +int get_option_int(void *optdb, const char *key, int *val);
    1.22 +int get_option_float(void *optdb, const char *key, float *val);
    1.23 +
    1.24 +#endif	/* OPT_H_ */