1 #ifndef _LV_PARAM_VALIDATORS_H
2 #define _LV_PARAM_VALIDATORS_H
4 #include <libvisual/lvconfig.h>
5 #include <libvisual/lv_defines.h>
6 #include <libvisual/lv_param_value.h>
16 typedef LV::Closure VisClosure;
20 typedef struct _VisClosure VisClosure;
26 LV_API VisClosure *visual_param_in_range (VisParamType type,
void *lower,
void *upper);
28 #define _LV_DEFINE_PARAM_IN_RANGE(func,ctype,type,marshal) \
29 static inline VisClosure *visual_param_in_range_##func (ctype lower, ctype upper) { \
30 return visual_param_in_range (VISUAL_PARAM_TYPE_##type, \
31 _LV_PARAM_MARSHAL_##marshal (lower), \
32 _LV_PARAM_MARSHAL_##marshal (upper)); \
35 _LV_DEFINE_PARAM_IN_RANGE (integer,
int , INTEGER, INTEGER)
36 _LV_DEFINE_PARAM_IN_RANGE (
float ,
float , FLOAT, FLOAT)
37 _LV_DEFINE_PARAM_IN_RANGE (
double ,
double, DOUBLE, DOUBLE)