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 
59 };
60 
66 };
67 
72 };
73 
78 };
79 
84 };
85 
90 };
91 
95 };
96 
101 };
102 
103 #define OBS_FONT_BOLD (1 << 0)
104 #define OBS_FONT_ITALIC (1 << 1)
105 #define OBS_FONT_UNDERLINE (1 << 2)
106 #define OBS_FONT_STRIKEOUT (1 << 3)
107 
108 struct obs_properties;
109 struct obs_property;
110 typedef struct obs_properties obs_properties_t;
111 typedef struct obs_property obs_property_t;
112 
113 /* ------------------------------------------------------------------------- */
114 
117 obs_properties_create_param(void *param, void (*destroy)(void *param));
119 
122 
123 EXPORT void obs_properties_set_param(obs_properties_t *props, void *param,
124  void (*destroy)(void *param));
126 
128 
130  const char *property);
131 
133 
145  const char *property);
146 
152  obs_data_t *settings);
153 
154 /* ------------------------------------------------------------------------- */
155 
162  obs_property_t *property, void *data);
163 
165  const char *name,
166  const char *description);
167 
169  const char *name,
170  const char *description, int min,
171  int max, int step);
172 
174  const char *name,
175  const char *description,
176  double min, double max,
177  double step);
178 
180  const char *name,
181  const char *description,
182  int min, int max,
183  int step);
184 
186  const char *name,
187  const char *description,
188  double min, double max,
189  double step);
190 
192  const char *name,
193  const char *description,
194  enum obs_text_type type);
195 
213 obs_properties_add_path(obs_properties_t *props, const char *name,
214  const char *description, enum obs_path_type type,
215  const char *filter, const char *default_path);
216 
218  const char *name,
219  const char *description,
220  enum obs_combo_type type,
221  enum obs_combo_format format);
222 
224  const char *name,
225  const char *description);
226 
228 obs_properties_add_button(obs_properties_t *props, const char *name,
229  const char *text, obs_property_clicked_t callback);
230 
232 obs_properties_add_button2(obs_properties_t *props, const char *name,
233  const char *text, obs_property_clicked_t callback,
234  void *priv);
235 
246  const char *name,
247  const char *description);
248 
250 obs_properties_add_editable_list(obs_properties_t *props, const char *name,
251  const char *description,
252  enum obs_editable_list_type type,
253  const char *filter, const char *default_path);
254 
256  const char *name,
257  const char *description);
258 
260  const char *name,
261  const char *description,
262  enum obs_group_type type,
263  obs_properties_t *group);
264 
265 /* ------------------------------------------------------------------------- */
266 
273  obs_property_t *property,
274  obs_data_t *settings);
275 typedef bool (*obs_property_modified2_t)(void *priv, obs_properties_t *props,
276  obs_property_t *property,
277  obs_data_t *settings);
278 
279 EXPORT void
281  obs_property_modified_t modified);
283  obs_property_t *p, obs_property_modified2_t modified, void *priv);
284 
287 
288 EXPORT void obs_property_set_visible(obs_property_t *p, bool visible);
289 EXPORT void obs_property_set_enabled(obs_property_t *p, bool enabled);
290 
292  const char *description);
294  const char *long_description);
295 
296 EXPORT const char *obs_property_name(obs_property_t *p);
302 
304 
321 
322 EXPORT void obs_property_int_set_limits(obs_property_t *p, int min, int max,
323  int step);
325  double max, double step);
326 EXPORT void obs_property_int_set_suffix(obs_property_t *p, const char *suffix);
328  const char *suffix);
329 
331 
332 EXPORT size_t obs_property_list_add_string(obs_property_t *p, const char *name,
333  const char *val);
334 EXPORT size_t obs_property_list_add_int(obs_property_t *p, const char *name,
335  long long val);
336 EXPORT size_t obs_property_list_add_float(obs_property_t *p, const char *name,
337  double val);
338 
340  const char *name, const char *val);
342  const char *name, long long val);
344  const char *name, double val);
345 
347  bool disabled);
349 
351 
353 EXPORT const char *obs_property_list_item_name(obs_property_t *p, size_t idx);
354 EXPORT const char *obs_property_list_item_string(obs_property_t *p, size_t idx);
355 EXPORT long long obs_property_list_item_int(obs_property_t *p, size_t idx);
356 EXPORT double obs_property_list_item_float(obs_property_t *p, size_t idx);
357 
362 
366 
368  const char *name,
369  const char *description);
372  struct media_frames_per_second max);
373 
375  const char *name,
376  const char *description);
377 EXPORT void
379  struct media_frames_per_second min,
380  struct media_frames_per_second max);
381 
384  size_t idx);
386  size_t idx);
387 
393 
396 
397 #ifndef SWIG
400 #endif
401 
402 #ifdef __cplusplus
403 }
404 #endif
Definition: obs-properties.h:94
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
#define DEPRECATED
Definition: c99defs.h:30
EXPORT enum obs_group_type obs_property_group_type(obs_property_t *p)
DEPRECATED EXPORT enum obs_text_type obs_proprety_text_type(obs_property_t *p)
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 void obs_property_float_set_suffix(obs_property_t *p, const char *suffix)
EXPORT double obs_property_float_max(obs_property_t *p)
Definition: obs-properties.h:82
Definition: obs-properties.h:87
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:75
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:86
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:92
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)
EXPORT void obs_properties_remove_by_name(obs_properties_t *props, const char *property)
EXPORT const char * obs_property_int_suffix(obs_property_t *p)
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:83
EXPORT double obs_property_float_min(obs_property_t *p)
Definition: obs-properties.h:81
EXPORT bool obs_property_visible(obs_property_t *p)
obs_combo_format
Definition: obs-properties.h:61
Definition: obs-properties.h:54
struct obs_properties obs_properties_t
Definition: obs-properties.h:110
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:272
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)
Definition: obs-properties.h:58
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:80
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:68
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:74
Definition: obs-properties.h:56
Definition: obs-properties.h:76
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 obs_properties_t * obs_property_group_content(obs_property_t *p)
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:89
EXPORT const char * obs_property_frame_rate_option_name(obs_property_t *p, size_t idx)
Definition: obs-properties.h:93
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:88
bool(* obs_property_clicked_t)(obs_properties_t *props, obs_property_t *property, void *data)
Definition: obs-properties.h:161
EXPORT void obs_property_int_set_limits(obs_property_t *p, int min, int max, int step)
Definition: obs-properties.h:71
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)
EXPORT void obs_property_set_modified_callback2(obs_property_t *p, obs_property_modified2_t modified, void *priv)
Definition: obs-properties.h:63
EXPORT enum obs_combo_format obs_property_list_format(obs_property_t *p)
Definition: obs-properties.h:64
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:77
EXPORT void obs_property_int_set_suffix(obs_property_t *p, const char *suffix)
struct obs_property obs_property_t
Definition: obs-properties.h:111
EXPORT bool obs_property_button_clicked(obs_property_t *p, void *obj)
EXPORT obs_property_t * obs_properties_add_button2(obs_properties_t *props, const char *name, const char *text, obs_property_clicked_t callback, void *priv)
Definition: obs-properties.h:70
obs_property_type
Definition: obs-properties.h:45
EXPORT obs_properties_t * obs_properties_get_parent(obs_properties_t *props)
EXPORT obs_property_t * obs_properties_add_group(obs_properties_t *props, const char *name, const char *description, enum obs_group_type type, obs_properties_t *group)
EXPORT void obs_property_list_insert_string(obs_property_t *p, size_t idx, const char *name, const char *val)
obs_group_type
Definition: obs-properties.h:97
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)
Definition: obs-properties.h:98
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)
bool(* obs_property_modified2_t)(void *priv, obs_properties_t *props, obs_property_t *property, obs_data_t *settings)
Definition: obs-properties.h:275
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:62
#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:99
EXPORT enum obs_text_type obs_property_text_type(obs_property_t *p)
Definition: obs-properties.h:69
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)
Definition: obs-properties.h:100
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:65
EXPORT const char * obs_property_float_suffix(obs_property_t *p)
Definition: obs-properties.h:57