Struct obws::client::SceneItems
source · pub struct SceneItems<'a> { /* private fields */ }
Expand description
API functions related to scene items.
Implementations§
source§impl<'a> SceneItems<'a>
impl<'a> SceneItems<'a>
sourcepub async fn list(&self, scene: SceneId<'_>) -> Result<Vec<SceneItem>>
pub async fn list(&self, scene: SceneId<'_>) -> Result<Vec<SceneItem>>
Gets a list of all scene items in a scene.
sourcepub async fn list_group(&self, scene: SceneId<'_>) -> Result<Vec<SceneItem>>
pub async fn list_group(&self, scene: SceneId<'_>) -> Result<Vec<SceneItem>>
Basically Self::list
, but for groups.
Using groups at all in OBS is discouraged, as they are very broken under the hood.
sourcepub async fn id(&self, get: Id<'_>) -> Result<i64>
pub async fn id(&self, get: Id<'_>) -> Result<i64>
Searches a scene for a source, and returns its id.
sourcepub async fn source(&self, get: Source<'_>) -> Result<SourceId>
pub async fn source(&self, get: Source<'_>) -> Result<SourceId>
Gets the source associated with a scene item.
sourcepub async fn create(&self, create: CreateSceneItem<'_>) -> Result<i64>
pub async fn create(&self, create: CreateSceneItem<'_>) -> Result<i64>
Creates a new scene item using a source.
sourcepub async fn remove(&self, scene: SceneId<'_>, item_id: i64) -> Result<()>
pub async fn remove(&self, scene: SceneId<'_>, item_id: i64) -> Result<()>
Removes a scene item from a scene.
sourcepub async fn duplicate(&self, duplicate: Duplicate<'_>) -> Result<i64>
pub async fn duplicate(&self, duplicate: Duplicate<'_>) -> Result<i64>
Duplicates a scene item, copying all transform and crop info.
sourcepub async fn transform(
&self,
scene: SceneId<'_>,
item_id: i64
) -> Result<SceneItemTransform>
pub async fn transform( &self, scene: SceneId<'_>, item_id: i64 ) -> Result<SceneItemTransform>
Gets the transform and crop info of a scene item.
sourcepub async fn set_transform(&self, transform: SetTransform<'_>) -> Result<()>
pub async fn set_transform(&self, transform: SetTransform<'_>) -> Result<()>
Sets the transform and crop info of a scene item.
sourcepub async fn enabled(&self, scene: SceneId<'_>, item_id: i64) -> Result<bool>
pub async fn enabled(&self, scene: SceneId<'_>, item_id: i64) -> Result<bool>
Gets the enable state of a scene item.
sourcepub async fn set_enabled(&self, enabled: SetEnabled<'a>) -> Result<()>
pub async fn set_enabled(&self, enabled: SetEnabled<'a>) -> Result<()>
Sets the enable state of a scene item.
sourcepub async fn locked(&self, scene: SceneId<'_>, item_id: i64) -> Result<bool>
pub async fn locked(&self, scene: SceneId<'_>, item_id: i64) -> Result<bool>
Gets the lock state of a scene item.
sourcepub async fn set_locked(&self, locked: SetLocked<'_>) -> Result<()>
pub async fn set_locked(&self, locked: SetLocked<'_>) -> Result<()>
Sets the lock state of a scene item.
sourcepub async fn index(&self, scene: SceneId<'_>, item_id: i64) -> Result<u32>
pub async fn index(&self, scene: SceneId<'_>, item_id: i64) -> Result<u32>
Gets the index position of a scene item in a scene.
An index of 0 is at the bottom of the source list in the UI.
sourcepub async fn set_index(&self, index: SetIndex<'_>) -> Result<()>
pub async fn set_index(&self, index: SetIndex<'_>) -> Result<()>
Sets the index position of a scene item in a scene.
sourcepub async fn blend_mode(
&self,
scene: SceneId<'_>,
item_id: i64
) -> Result<BlendMode>
pub async fn blend_mode( &self, scene: SceneId<'_>, item_id: i64 ) -> Result<BlendMode>
Gets the blend mode of a scene item.
sourcepub async fn set_blend_mode(&self, mode: SetBlendMode<'a>) -> Result<()>
pub async fn set_blend_mode(&self, mode: SetBlendMode<'a>) -> Result<()>
Sets the blend mode of a scene item.
sourcepub async fn private_settings<T>(
&self,
scene: SceneId<'_>,
item_id: i64
) -> Result<T>where
T: DeserializeOwned,
pub async fn private_settings<T>(
&self,
scene: SceneId<'_>,
item_id: i64
) -> Result<T>where
T: DeserializeOwned,
Gets private scene item settings.
sourcepub async fn set_private_settings<T>(
&self,
settings: SetPrivateSettings<'_, T>
) -> Result<()>where
T: Serialize,
pub async fn set_private_settings<T>(
&self,
settings: SetPrivateSettings<'_, T>
) -> Result<()>where
T: Serialize,
Sets private scene item settings.