libobs: Add more editable list types

(Note: This commit also modifies the UI)

The editable list only had two types: A type that allows both files and
URLS, and a type that only allows strings.

This changes it so the editable list can have a "files only" type, a
"files and URLs" type, and a "strings only" type.
This commit is contained in:
jp9000
2016-05-26 10:48:07 -07:00
parent 8d002fb6ec
commit 07a26b1720
3 changed files with 39 additions and 12 deletions

View File

@@ -70,6 +70,12 @@ enum obs_combo_type {
OBS_COMBO_TYPE_LIST,
};
enum obs_editable_list_type {
OBS_EDITABLE_LIST_TYPE_STRINGS,
OBS_EDITABLE_LIST_TYPE_FILES,
OBS_EDITABLE_LIST_TYPE_FILES_AND_URLS
};
enum obs_path_type {
OBS_PATH_FILE,
OBS_PATH_FILE_SAVE,
@@ -202,7 +208,7 @@ EXPORT obs_property_t *obs_properties_add_font(obs_properties_t *props,
EXPORT obs_property_t *obs_properties_add_editable_list(obs_properties_t *props,
const char *name, const char *description,
bool allow_files, const char *filter,
enum obs_editable_list_type type, const char *filter,
const char *default_path);
EXPORT obs_property_t *obs_properties_add_frame_rate(obs_properties_t *props,
@@ -281,7 +287,7 @@ EXPORT const char *obs_property_list_item_string(obs_property_t *p, size_t idx);
EXPORT long long obs_property_list_item_int(obs_property_t *p, size_t idx);
EXPORT double obs_property_list_item_float(obs_property_t *p, size_t idx);
EXPORT bool obs_property_editable_list_allow_files(obs_property_t *p);
EXPORT enum obs_editable_list_type obs_property_editable_list_type(obs_property_t *p);
EXPORT const char *obs_property_editable_list_filter(obs_property_t *p);
EXPORT const char *obs_property_editable_list_default_path(obs_property_t *p);