0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-19 20:32:15 +02:00

libobs: Add long description to properties

Allows setting a "long" description for detailed explanation of certain
properties that may need them, but don't want to display them on the
user interface by default.
This commit is contained in:
jp9000 2016-07-20 08:09:45 -07:00
parent 938943e72b
commit ac4bd2aa80
2 changed files with 14 additions and 0 deletions

View File

@ -145,6 +145,7 @@ struct obs_properties;
struct obs_property {
const char *name;
const char *desc;
const char *long_desc;
enum obs_property_type type;
bool visible;
bool enabled;
@ -605,6 +606,11 @@ void obs_property_set_description(obs_property_t *p, const char *description)
if (p) p->desc = description;
}
void obs_property_set_long_description(obs_property_t *p, const char *long_desc)
{
if (p) p->long_desc = long_desc;
}
const char *obs_property_name(obs_property_t *p)
{
return p ? p->name : NULL;
@ -615,6 +621,11 @@ const char *obs_property_description(obs_property_t *p)
return p ? p->desc : NULL;
}
const char *obs_property_long_description(obs_property_t *p)
{
return p ? p->long_desc : NULL;
}
enum obs_property_type obs_property_get_type(obs_property_t *p)
{
return p ? p->type : OBS_PROPERTY_INVALID;

View File

@ -235,9 +235,12 @@ EXPORT void obs_property_set_enabled(obs_property_t *p, bool enabled);
EXPORT void obs_property_set_description(obs_property_t *p,
const char *description);
EXPORT void obs_property_set_long_description(obs_property_t *p,
const char *long_description);
EXPORT const char * obs_property_name(obs_property_t *p);
EXPORT const char * obs_property_description(obs_property_t *p);
EXPORT const char * obs_property_long_description(obs_property_t *p);
EXPORT enum obs_property_type obs_property_get_type(obs_property_t *p);
EXPORT bool obs_property_enabled(obs_property_t *p);
EXPORT bool obs_property_visible(obs_property_t *p);