pub struct ObsSceneRef { /* private fields */ }Expand description
This struct holds every ObsSourceRef that is attached to the scene by using add_source.
Implementations§
Source§impl ObsSceneRef
impl ObsSceneRef
pub fn add_and_set(&self, channel: u32) -> Result<(), ObsError>
👎Deprecated: Use ObsSceneRef::set_to_channel instead
Sourcepub fn set_to_channel(&self, channel: u32) -> Result<(), ObsError>
pub fn set_to_channel(&self, channel: u32) -> Result<(), ObsError>
Sets this scene to a given output channel. There are 64 channels that you can assign scenes to, which will draw on top of each other in ascending index order.
Sourcepub fn remove_from_channel(&self, channel: u32) -> Result<(), ObsError>
pub fn remove_from_channel(&self, channel: u32) -> Result<(), ObsError>
Removes a scene from a given output channel, for more info about channels see set_to_channel.
Sourcepub fn get_scene_source_ptr(
&self,
) -> Result<Sendable<*mut obs_source_t>, ObsError>
pub fn get_scene_source_ptr( &self, ) -> Result<Sendable<*mut obs_source_t>, ObsError>
Gets the underlying source pointer of this scene, which is used internally when setting it to a channel.
pub fn as_ptr(&self) -> SmartPointerSendable<*mut obs_scene_t>
pub fn name(&self) -> ObsString
pub fn signals(&self) -> Arc<ObsSceneSignals>
Trait Implementations§
Source§impl Clone for ObsSceneRef
impl Clone for ObsSceneRef
Source§fn clone(&self) -> ObsSceneRef
fn clone(&self) -> ObsSceneRef
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ObsSceneRef
impl Debug for ObsSceneRef
Source§impl Hash for ObsSceneRef
impl Hash for ObsSceneRef
Source§impl ObsSceneExtFilter for ObsSceneRef
impl ObsSceneExtFilter for ObsSceneRef
Source§fn add_scene_filter(&self, filter_ref: &ObsFilterRef) -> Result<(), ObsError>
fn add_scene_filter(&self, filter_ref: &ObsFilterRef) -> Result<(), ObsError>
Adds a filter to the given source in this scene.
Source§fn remove_scene_filter(&self, filter_ref: &ObsFilterRef) -> Result<(), ObsError>
fn remove_scene_filter(&self, filter_ref: &ObsFilterRef) -> Result<(), ObsError>
Removes a filter from the this scene (internally removes the filter to the scene’s source).
Source§impl PartialEq for ObsSceneRef
impl PartialEq for ObsSceneRef
Source§impl SceneItemExtSceneTrait for ObsSceneRef
impl SceneItemExtSceneTrait for ObsSceneRef
Source§fn add_source<T: ObsSourceTrait + Clone + 'static>(
&mut self,
source: T,
) -> Result<ObsSceneItemRef<T>, ObsError>
fn add_source<T: ObsSourceTrait + Clone + 'static>( &mut self, source: T, ) -> Result<ObsSceneItemRef<T>, ObsError>
Adds the specified source to this scene. Returns a reference to the created scene item.
You can use that SceneItemPtr to manipulate the source within this scene (position, scale, rotation, etc).
Source§fn add_and_create_source(
&mut self,
info: SourceInfo,
) -> Result<ObsSceneItemRef<ObsSourceRef>, ObsError>
fn add_and_create_source( &mut self, info: SourceInfo, ) -> Result<ObsSceneItemRef<ObsSourceRef>, ObsError>
Creates and adds a source to this scene based on the given
SourceInfo.
Returns a reference to the created scene item, which internally holds the created source.Source§fn get_source_mut(
&self,
name: &str,
) -> Result<Option<Arc<Box<dyn ObsSourceTrait>>>, ObsError>
fn get_source_mut( &self, name: &str, ) -> Result<Option<Arc<Box<dyn ObsSourceTrait>>>, ObsError>
Gets a source by name from this scene. Returns None if no source with the given name exists in this scene.
Source§fn remove_every_item_of_source<T: ObsSourceTrait>(
&mut self,
source: T,
) -> Result<(), ObsError>
fn remove_every_item_of_source<T: ObsSourceTrait>( &mut self, source: T, ) -> Result<(), ObsError>
Removes the given source from this scene. Removes the corresponding scene item as well. It may be possible that this source is still added to another scene.
Source§fn remove_scene_item<K: SceneItemTrait>(
&mut self,
scene_item: K,
) -> Result<(), ObsError>
fn remove_scene_item<K: SceneItemTrait>( &mut self, scene_item: K, ) -> Result<(), ObsError>
Removes a specific scene item from this scene.
Source§fn get_scene_item_ptr<T: ObsSourceTrait + Clone>(
&self,
source: &T,
) -> Result<Vec<Arc<Box<dyn SceneItemTrait>>>, ObsError>
fn get_scene_item_ptr<T: ObsSourceTrait + Clone>( &self, source: &T, ) -> Result<Vec<Arc<Box<dyn SceneItemTrait>>>, ObsError>
Gets the underlying scene item pointers for the given source in this scene. Read more
impl Eq for ObsSceneRef
Auto Trait Implementations§
impl Freeze for ObsSceneRef
impl !RefUnwindSafe for ObsSceneRef
impl Send for ObsSceneRef
impl Sync for ObsSceneRef
impl Unpin for ObsSceneRef
impl !UnwindSafe for ObsSceneRef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more