libobs_wrapper\data\properties/
enums.rs

1use num_derive::{FromPrimitive, ToPrimitive};
2
3#[cfg_attr(target_os = "windows", repr(i32))]
4#[cfg_attr(not(target_os = "windows"), repr(u32))]
5#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
6pub enum ObsPropertyType {
7    Invalid = libobs::obs_property_type_OBS_PROPERTY_INVALID,
8    Bool = libobs::obs_property_type_OBS_PROPERTY_BOOL,
9    Int = libobs::obs_property_type_OBS_PROPERTY_INT,
10    Float = libobs::obs_property_type_OBS_PROPERTY_FLOAT,
11    Text = libobs::obs_property_type_OBS_PROPERTY_TEXT,
12    Path = libobs::obs_property_type_OBS_PROPERTY_PATH,
13    List = libobs::obs_property_type_OBS_PROPERTY_LIST,
14    Color = libobs::obs_property_type_OBS_PROPERTY_COLOR,
15    Button = libobs::obs_property_type_OBS_PROPERTY_BUTTON,
16    Font = libobs::obs_property_type_OBS_PROPERTY_FONT,
17    EditableList = libobs::obs_property_type_OBS_PROPERTY_EDITABLE_LIST,
18    FrameRate = libobs::obs_property_type_OBS_PROPERTY_FRAME_RATE,
19    Group = libobs::obs_property_type_OBS_PROPERTY_GROUP,
20    ColorAlpha = libobs::obs_property_type_OBS_PROPERTY_COLOR_ALPHA,
21}
22
23#[cfg_attr(target_os = "windows", repr(i32))]
24#[cfg_attr(not(target_os = "windows"), repr(u32))]
25#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
26pub enum ObsComboFormat {
27    Invalid = libobs::obs_combo_format_OBS_COMBO_FORMAT_INVALID,
28    Int = libobs::obs_combo_format_OBS_COMBO_FORMAT_INT,
29    Float = libobs::obs_combo_format_OBS_COMBO_FORMAT_FLOAT,
30    String = libobs::obs_combo_format_OBS_COMBO_FORMAT_STRING,
31    Bool = libobs::obs_combo_format_OBS_COMBO_FORMAT_BOOL,
32}
33
34#[cfg_attr(target_os = "windows", repr(i32))]
35#[cfg_attr(not(target_os = "windows"), repr(u32))]
36#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
37pub enum ObsComboType {
38    Invalid = libobs::obs_combo_type_OBS_COMBO_TYPE_INVALID,
39    Editable = libobs::obs_combo_type_OBS_COMBO_TYPE_EDITABLE,
40    List = libobs::obs_combo_type_OBS_COMBO_TYPE_LIST,
41    Radio = libobs::obs_combo_type_OBS_COMBO_TYPE_RADIO,
42}
43
44#[cfg_attr(target_os = "windows", repr(i32))]
45#[cfg_attr(not(target_os = "windows"), repr(u32))]
46#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
47pub enum ObsTextType {
48    Default = libobs::obs_text_type_OBS_TEXT_DEFAULT,
49    Password = libobs::obs_text_type_OBS_TEXT_PASSWORD,
50    Multiline = libobs::obs_text_type_OBS_TEXT_MULTILINE,
51    Info = libobs::obs_text_type_OBS_TEXT_INFO,
52}
53
54#[cfg_attr(target_os = "windows", repr(i32))]
55#[cfg_attr(not(target_os = "windows"), repr(u32))]
56#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
57pub enum ObsTextInfoType {
58    Normal = libobs::obs_text_info_type_OBS_TEXT_INFO_NORMAL,
59    Warning = libobs::obs_text_info_type_OBS_TEXT_INFO_WARNING,
60    Error = libobs::obs_text_info_type_OBS_TEXT_INFO_ERROR
61}
62
63#[cfg_attr(target_os = "windows", repr(i32))]
64#[cfg_attr(not(target_os = "windows"), repr(u32))]
65#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
66pub enum ObsNumberType {
67    Scroller = libobs::obs_number_type_OBS_NUMBER_SCROLLER,
68    Slider = libobs::obs_number_type_OBS_NUMBER_SLIDER,
69}
70
71#[cfg_attr(target_os = "windows", repr(i32))]
72#[cfg_attr(not(target_os = "windows"), repr(u32))]
73#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
74pub enum ObsPathType {
75    File = libobs::obs_path_type_OBS_PATH_FILE,
76    FileSave = libobs::obs_path_type_OBS_PATH_FILE_SAVE,
77    Directory = libobs::obs_path_type_OBS_PATH_DIRECTORY,
78}
79
80#[cfg_attr(target_os = "windows", repr(i32))]
81#[cfg_attr(not(target_os = "windows"), repr(u32))]
82#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
83pub enum ObsEditableListType {
84    Strings = libobs::obs_editable_list_type_OBS_EDITABLE_LIST_TYPE_STRINGS,
85    Files = libobs::obs_editable_list_type_OBS_EDITABLE_LIST_TYPE_FILES,
86    FilesAndUrls = libobs::obs_editable_list_type_OBS_EDITABLE_LIST_TYPE_FILES_AND_URLS,
87}
88
89#[cfg_attr(target_os = "windows", repr(i32))]
90#[cfg_attr(not(target_os = "windows"), repr(u32))]
91#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
92pub enum ObsGroupType {
93    Invalid = libobs::obs_group_type_OBS_COMBO_INVALID,
94    Normal = libobs::obs_group_type_OBS_GROUP_NORMAL,
95    Checkable = libobs::obs_group_type_OBS_GROUP_CHECKABLE,
96}
97
98#[cfg_attr(target_os = "windows", repr(i32))]
99#[cfg_attr(not(target_os = "windows"), repr(u32))]
100#[derive(Clone, Copy, Debug, PartialEq, Eq, FromPrimitive, ToPrimitive)]
101pub enum ObsButtonType {
102    Default = libobs::obs_button_type_OBS_BUTTON_DEFAULT,
103    Url = libobs::obs_button_type_OBS_BUTTON_URL,
104}