dbf-udg

diff libs/dsys2/dsys_impl.h @ 9:7056437a361b

added demosys
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 19 Feb 2013 18:17:17 +0200
parents
children 1abbed71e9c9
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libs/dsys2/dsys_impl.h	Tue Feb 19 18:17:17 2013 +0200
     1.3 @@ -0,0 +1,40 @@
     1.4 +#ifndef DSYS_IMPL_H_
     1.5 +#define DSYS_IMPL_H_
     1.6 +
     1.7 +#include "dsys.h"
     1.8 +
     1.9 +struct dsys_demo {
    1.10 +	demotime_t tm, src_tm, start_tm, stop_tm, duration;
    1.11 +	demotime_t stoppage_tm;
    1.12 +
    1.13 +	struct dsys_event *evlist;
    1.14 +	int num_ev;
    1.15 +
    1.16 +	struct dsys_event *nextev, *active;
    1.17 +
    1.18 +	int running;
    1.19 +};
    1.20 +
    1.21 +struct callback {
    1.22 +	void (*func)(struct dsys_event*, void*);
    1.23 +	void *cls;
    1.24 +
    1.25 +	struct callback *next;
    1.26 +};
    1.27 +
    1.28 +
    1.29 +struct dsys_event {
    1.30 +	enum dsys_evtype type;
    1.31 +
    1.32 +	char *name;
    1.33 +	demotime_t t0, t1;
    1.34 +	float val;
    1.35 +
    1.36 +	float (*eval)(struct dsys_event*, demotime_t);
    1.37 +
    1.38 +	struct callback *cblist;
    1.39 +
    1.40 +	struct dsys_event *next, *prev;
    1.41 +};
    1.42 +
    1.43 +#endif	/* DSYS_IMPL_H_ */