Open Broadcaster Software
Free, open source software for live streaming and recording
obs-properties.h
Go to the documentation of this file.
1 /******************************************************************************
2  Copyright (C) 2014 by Hugh Bailey <obs.jim@gmail.com>
3 
4  This program is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 2 of the License, or
7  (at your option) any later version.
8 
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ******************************************************************************/
17 
18 #pragma once
19 
20 #include "util/c99defs.h"
21 #include "obs-data.h"
22 #include "media-io/frame-rate.h"
23 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
43 #define OBS_PROPERTIES_DEFER_UPDATE (1<<0)
44 
58 };
59 
65 };
66 
71 };
72 
77 };
78 
83 };
84 
89 };
90 
94 };
95 
96 #define OBS_FONT_BOLD (1<<0)
97 #define OBS_FONT_ITALIC (1<<1)
98 #define OBS_FONT_UNDERLINE (1<<2)
99 #define OBS_FONT_STRIKEOUT (1<<3)
100 
101 struct obs_properties;
102 struct obs_property;
103 typedef struct obs_properties obs_properties_t;
104 typedef struct obs_property obs_property_t;
105 
106 /* ------------------------------------------------------------------------- */
107 
110  void (*destroy)(void *param));
112 
115 
117  void *param, void (*destroy)(void *param));
119 
121 
123  const char *property);
124 
130  obs_data_t *settings);
131 
132 /* ------------------------------------------------------------------------- */
133 
140  obs_property_t *property, void *data);
141 
143  const char *name, const char *description);
144 
146  const char *name, const char *description,
147  int min, int max, int step);
148 
150  const char *name, const char *description,
151  double min, double max, double step);
152 
154  const char *name, const char *description,
155  int min, int max, int step);
156 
158  const char *name, const char *description,
159  double min, double max, double step);
160 
162  const char *name, const char *description,
163  enum obs_text_type type);
164 
182  const char *name, const char *description,
183  enum obs_path_type type, const char *filter,
184  const char *default_path);
185 
187  const char *name, const char *description,
188  enum obs_combo_type type, enum obs_combo_format format);
189 
191  const char *name, const char *description);
192 
194  const char *name, const char *text,
195  obs_property_clicked_t callback);
196 
207  const char *name, const char *description);
208 
210  const char *name, const char *description,
211  enum obs_editable_list_type type, const char *filter,
212  const char *default_path);
213 
215  const char *name, const char *description);
216 
217 /* ------------------------------------------------------------------------- */
218 
225  obs_property_t *property, obs_data_t *settings);
226 
228  obs_property_modified_t modified);
229 
232 
233 EXPORT void obs_property_set_visible(obs_property_t *p, bool visible);
234 EXPORT void obs_property_set_enabled(obs_property_t *p, bool enabled);
235 
237  const char *description);
239  const char *long_description);
240 
241 EXPORT const char * obs_property_name(obs_property_t *p);
247 
249 
264 
266  int min, int max, int step);
268  double min, double max, double step);
269 
271 
273  const char *name, const char *val);
275  const char *name, long long val);
277  const char *name, double val);
278 
280  const char *name, const char *val);
282  const char *name, long long val);
284  const char *name, double val);
285 
287  bool disabled);
289 
291 
293 EXPORT const char *obs_property_list_item_name(obs_property_t *p, size_t idx);
294 EXPORT const char *obs_property_list_item_string(obs_property_t *p, size_t idx);
295 EXPORT long long obs_property_list_item_int(obs_property_t *p, size_t idx);
296 EXPORT double obs_property_list_item_float(obs_property_t *p, size_t idx);
297 
301 
305 
307  const char *name, const char *description);
309  struct media_frames_per_second min,
310  struct media_frames_per_second max);
311 
313  const char *name, const char *description);
315  size_t idx,
316  struct media_frames_per_second min,
317  struct media_frames_per_second max);
318 
321  size_t idx);
323  obs_property_t *p, size_t idx);
324 
327  obs_property_t *p, size_t idx);
329  obs_property_t *p, size_t idx);
330 
331 #ifdef __cplusplus
332 }
333 #endif
Definition: obs-properties.h:93
EXPORT enum obs_text_type obs_proprety_text_type(obs_property_t *p)
EXPORT obs_property_t * obs_properties_add_editable_list(obs_properties_t *props, const char *name, const char *description, enum obs_editable_list_type type, const char *filter, const char *default_path)
EXPORT enum obs_number_type obs_property_float_type(obs_property_t *p)
EXPORT void obs_property_set_enabled(obs_property_t *p, bool enabled)
EXPORT struct media_frames_per_second obs_property_frame_rate_fps_range_min(obs_property_t *p, size_t idx)
EXPORT size_t obs_property_list_item_count(obs_property_t *p)
EXPORT void obs_property_list_clear(obs_property_t *p)
Definition: obs-properties.h:46
EXPORT int obs_property_int_max(obs_property_t *p)
EXPORT double obs_property_list_item_float(obs_property_t *p, size_t idx)
EXPORT void obs_properties_destroy(obs_properties_t *props)
EXPORT void obs_property_frame_rate_clear(obs_property_t *p)
EXPORT const char * obs_property_list_item_string(obs_property_t *p, size_t idx)
unsigned uint32_t
Definition: vc_stdint.h:31
EXPORT double obs_property_float_max(obs_property_t *p)
Definition: obs-properties.h:81
Definition: obs-properties.h:86
EXPORT long long obs_property_list_item_int(obs_property_t *p, size_t idx)
EXPORT const char * obs_property_path_default_path(obs_property_t *p)
Definition: obs-properties.h:74
Definition: obs-properties.h:55
Definition: frame-rate.h:7
EXPORT enum obs_editable_list_type obs_property_editable_list_type(obs_property_t *p)
Definition: obs-properties.h:49
obs_text_type
Definition: obs-properties.h:85
EXPORT obs_property_t * obs_properties_add_list(obs_properties_t *props, const char *name, const char *description, enum obs_combo_type type, enum obs_combo_format format)
EXPORT obs_property_t * obs_properties_add_frame_rate(obs_properties_t *props, const char *name, const char *description)
EXPORT bool obs_property_next(obs_property_t **p)
obs_number_type
Definition: obs-properties.h:91
EXPORT obs_property_t * obs_properties_add_int_slider(obs_properties_t *props, const char *name, const char *description, int min, int max, int step)
EXPORT obs_property_t * obs_properties_add_float(obs_properties_t *props, const char *name, const char *description, double min, double max, double step)
EXPORT void obs_properties_apply_settings(obs_properties_t *props, obs_data_t *settings)
struct obs_data obs_data_t
Definition: obs-data.h:42
EXPORT obs_property_t * obs_properties_add_int(obs_properties_t *props, const char *name, const char *description, int min, int max, int step)
Definition: obs-properties.h:82
EXPORT double obs_property_float_min(obs_property_t *p)
Definition: obs-properties.h:80
EXPORT bool obs_property_visible(obs_property_t *p)
obs_combo_format
Definition: obs-properties.h:60
Definition: obs-properties.h:54
struct obs_properties obs_properties_t
Definition: obs-properties.h:103
EXPORT void obs_property_frame_rate_options_clear(obs_property_t *p)
bool(* obs_property_modified_t)(obs_properties_t *props, obs_property_t *property, obs_data_t *settings)
Definition: obs-properties.h:224
Definition: obs-properties.h:52
EXPORT void obs_property_list_item_disable(obs_property_t *p, size_t idx, bool disabled)
EXPORT struct media_frames_per_second obs_property_frame_rate_fps_range_max(obs_property_t *p, size_t idx)
EXPORT obs_property_t * obs_properties_add_bool(obs_properties_t *props, const char *name, const char *description)
EXPORT obs_property_t * obs_properties_add_path(obs_properties_t *props, const char *name, const char *description, enum obs_path_type type, const char *filter, const char *default_path)
obs_path_type
Definition: obs-properties.h:79
EXPORT void obs_property_set_visible(obs_property_t *p, bool visible)
#define EXPORT
Definition: c99defs.h:49
EXPORT bool obs_property_list_item_disabled(obs_property_t *p, size_t idx)
EXPORT size_t obs_property_list_add_int(obs_property_t *p, const char *name, long long val)
Definition: obs-properties.h:51
obs_combo_type
Definition: obs-properties.h:67
EXPORT obs_property_t * obs_properties_add_text(obs_properties_t *props, const char *name, const char *description, enum obs_text_type type)
EXPORT const char * obs_property_frame_rate_option_description(obs_property_t *p, size_t idx)
EXPORT const char * obs_property_long_description(obs_property_t *p)
obs_editable_list_type
Definition: obs-properties.h:73
Definition: obs-properties.h:56
Definition: obs-properties.h:75
EXPORT const char * obs_property_name(obs_property_t *p)
EXPORT obs_property_t * obs_properties_add_font(obs_properties_t *props, const char *name, const char *description)
EXPORT enum obs_combo_type obs_property_list_type(obs_property_t *p)
EXPORT size_t obs_property_list_add_string(obs_property_t *p, const char *name, const char *val)
Definition: obs-properties.h:88
EXPORT const char * obs_property_frame_rate_option_name(obs_property_t *p, size_t idx)
Definition: obs-properties.h:92
EXPORT size_t obs_property_frame_rate_fps_ranges_count(obs_property_t *p)
Definition: obs-properties.h:48
EXPORT obs_property_t * obs_properties_get(obs_properties_t *props, const char *property)
EXPORT const char * obs_property_list_item_name(obs_property_t *p, size_t idx)
Definition: obs-properties.h:87
bool(* obs_property_clicked_t)(obs_properties_t *props, obs_property_t *property, void *data)
Definition: obs-properties.h:139
EXPORT void obs_property_int_set_limits(obs_property_t *p, int min, int max, int step)
Definition: obs-properties.h:70
EXPORT bool obs_property_enabled(obs_property_t *p)
EXPORT size_t obs_property_list_add_float(obs_property_t *p, const char *name, double val)
Definition: obs-properties.h:62
EXPORT enum obs_combo_format obs_property_list_format(obs_property_t *p)
Definition: obs-properties.h:63
EXPORT void obs_property_frame_rate_option_insert(obs_property_t *p, size_t idx, const char *name, const char *description)
EXPORT const char * obs_property_description(obs_property_t *p)
EXPORT size_t obs_property_frame_rate_options_count(obs_property_t *p)
EXPORT void obs_property_set_long_description(obs_property_t *p, const char *long_description)
EXPORT void obs_properties_set_param(obs_properties_t *props, void *param, void(*destroy)(void *param))
EXPORT obs_property_t * obs_properties_add_float_slider(obs_properties_t *props, const char *name, const char *description, double min, double max, double step)
EXPORT size_t obs_property_frame_rate_option_add(obs_property_t *p, const char *name, const char *description)
EXPORT double obs_property_float_step(obs_property_t *p)
Definition: obs-properties.h:76
struct obs_property obs_property_t
Definition: obs-properties.h:104
EXPORT bool obs_property_button_clicked(obs_property_t *p, void *obj)
Definition: obs-properties.h:69
obs_property_type
Definition: obs-properties.h:45
EXPORT void obs_property_list_insert_string(obs_property_t *p, size_t idx, const char *name, const char *val)
EXPORT void obs_properties_set_flags(obs_properties_t *props, uint32_t flags)
EXPORT size_t obs_property_frame_rate_fps_range_add(obs_property_t *p, struct media_frames_per_second min, struct media_frames_per_second max)
EXPORT void obs_property_set_description(obs_property_t *p, const char *description)
EXPORT int obs_property_int_min(obs_property_t *p)
EXPORT enum obs_number_type obs_property_int_type(obs_property_t *p)
EXPORT void obs_property_float_set_limits(obs_property_t *p, double min, double max, double step)
EXPORT enum obs_property_type obs_property_get_type(obs_property_t *p)
Definition: obs-properties.h:53
EXPORT void * obs_properties_get_param(obs_properties_t *props)
EXPORT void obs_property_list_insert_int(obs_property_t *p, size_t idx, const char *name, long long val)
EXPORT void obs_property_frame_rate_fps_range_insert(obs_property_t *p, size_t idx, struct media_frames_per_second min, struct media_frames_per_second max)
EXPORT const char * obs_property_path_filter(obs_property_t *p)
EXPORT void obs_property_list_item_remove(obs_property_t *p, size_t idx)
EXPORT bool obs_property_modified(obs_property_t *p, obs_data_t *settings)
Definition: obs-properties.h:50
EXPORT obs_property_t * obs_properties_first(obs_properties_t *props)
Definition: obs-properties.h:61
#define bool
Definition: vc_stdbool.h:5
EXPORT obs_property_t * obs_properties_add_button(obs_properties_t *props, const char *name, const char *text, obs_property_clicked_t callback)
EXPORT const char * obs_property_editable_list_default_path(obs_property_t *p)
EXPORT obs_properties_t * obs_properties_create_param(void *param, void(*destroy)(void *param))
Definition: obs-properties.h:68
EXPORT obs_property_t * obs_properties_add_color(obs_properties_t *props, const char *name, const char *description)
EXPORT const char * obs_property_editable_list_filter(obs_property_t *p)
EXPORT void obs_property_set_modified_callback(obs_property_t *p, obs_property_modified_t modified)
EXPORT obs_properties_t * obs_properties_create(void)
EXPORT void obs_property_frame_rate_fps_ranges_clear(obs_property_t *p)
EXPORT int obs_property_int_step(obs_property_t *p)
EXPORT enum obs_path_type obs_property_path_type(obs_property_t *p)
EXPORT uint32_t obs_properties_get_flags(obs_properties_t *props)
Definition: obs-properties.h:47
EXPORT void obs_property_list_insert_float(obs_property_t *p, size_t idx, const char *name, double val)
Definition: obs-properties.h:64
Definition: obs-properties.h:57