libobs: Add property functions to mod. int/double limits

This commit is contained in:
jp9000 2016-09-19 06:39:02 -07:00
parent 0bc0db1207
commit c99f65a0df
2 changed files with 29 additions and 0 deletions

View file

@ -726,6 +726,30 @@ enum obs_combo_format obs_property_list_format(obs_property_t *p)
return data ? data->format : OBS_COMBO_FORMAT_INVALID;
}
void obs_property_int_set_limits(obs_property_t *p,
int min, int max, int step)
{
struct int_data *data = get_type_data(p, OBS_PROPERTY_INT);
if (!data)
return;
data->min = min;
data->max = max;
data->step = step;
}
void obs_property_float_set_limits(obs_property_t *p,
double min, double max, double step)
{
struct float_data *data = get_type_data(p, OBS_PROPERTY_INT);
if (!data)
return;
data->min = min;
data->max = max;
data->step = step;
}
void obs_property_list_clear(obs_property_t *p)
{
struct list_data *data = get_list_data(p);

View file

@ -262,6 +262,11 @@ EXPORT const char * obs_property_path_default_path(obs_property_t *p);
EXPORT enum obs_combo_type obs_property_list_type(obs_property_t *p);
EXPORT enum obs_combo_format obs_property_list_format(obs_property_t *p);
EXPORT void obs_property_int_set_limits(obs_property_t *p,
int min, int max, int step);
EXPORT void obs_property_float_set_limits(obs_property_t *p,
double min, double max, double step);
EXPORT void obs_property_list_clear(obs_property_t *p);
EXPORT size_t obs_property_list_add_string(obs_property_t *p,