Remove categories from properties
Categories added an unnecessary complexity to making properties, and would very likely almost never be used in most cases, and were more of a display feature. The main issue is that it made property data more complex to work with, and I just didn't feel comfortable with that. Also, added a function to allow you to retrieve a porperty just by its name.
This commit is contained in:
@@ -47,10 +47,8 @@ enum obs_combo_type {
|
||||
};
|
||||
|
||||
struct obs_properties;
|
||||
struct obs_category;
|
||||
struct obs_property;
|
||||
typedef struct obs_properties *obs_properties_t;
|
||||
typedef struct obs_category *obs_category_t;
|
||||
typedef struct obs_property *obs_property_t;
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
@@ -58,31 +56,31 @@ typedef struct obs_property *obs_property_t;
|
||||
EXPORT obs_properties_t obs_properties_create();
|
||||
EXPORT void obs_properties_destroy(obs_properties_t props);
|
||||
|
||||
EXPORT obs_category_t obs_properties_add_category(obs_properties_t props,
|
||||
const char *name);
|
||||
EXPORT obs_property_t obs_properties_first(obs_properties_t props);
|
||||
|
||||
EXPORT obs_category_t obs_properties_first_category(obs_properties_t props);
|
||||
EXPORT obs_property_t obs_properties_get(obs_properties_t props,
|
||||
const char *property);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
EXPORT void obs_category_add_int(obs_category_t cat, const char *name,
|
||||
EXPORT void obs_properties_add_int(obs_properties_t props, const char *name,
|
||||
const char *description, int min, int max, int step);
|
||||
EXPORT void obs_category_add_float(obs_category_t cat, const char *name,
|
||||
EXPORT void obs_properties_add_float(obs_properties_t props, const char *name,
|
||||
const char *description, double min, double max, double step);
|
||||
EXPORT void obs_category_add_text(obs_category_t cat, const char *name,
|
||||
EXPORT void obs_properties_add_text(obs_properties_t props, const char *name,
|
||||
const char *description);
|
||||
EXPORT void obs_category_add_path(obs_category_t cat, const char *name,
|
||||
EXPORT void obs_properties_add_path(obs_properties_t props, const char *name,
|
||||
const char *description);
|
||||
EXPORT void obs_category_add_list(obs_category_t cat,
|
||||
EXPORT void obs_properties_add_list(obs_properties_t props,
|
||||
const char *name, const char *description,
|
||||
const char **value_names, const char **values,
|
||||
enum obs_combo_type type,
|
||||
enum obs_combo_format format);
|
||||
EXPORT void obs_category_add_color(obs_category_t cat, const char *name,
|
||||
EXPORT void obs_properties_add_color(obs_properties_t props, const char *name,
|
||||
const char *description);
|
||||
|
||||
EXPORT bool obs_category_next(obs_category_t *cat);
|
||||
EXPORT obs_property_t obs_category_first_property(obs_category_t cat);
|
||||
EXPORT bool obs_properties_next(obs_properties_t *props);
|
||||
EXPORT obs_property_t obs_properties_first_property(obs_properties_t props);
|
||||
|
||||
/* ------------------------------------------------------------------------- */
|
||||
|
||||
|
Reference in New Issue
Block a user