ObsSceneRef

Struct ObsSceneRef 

Source
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

Source

pub fn add_and_set(&self, channel: u32) -> Result<(), ObsError>

👎Deprecated: Use ObsSceneRef::set_to_channel instead
Source

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.

Source

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.

Source

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.

Source

pub fn as_ptr(&self) -> SmartPointerSendable<*mut obs_scene_t>

Source

pub fn name(&self) -> ObsString

Source

pub fn signals(&self) -> Arc<ObsSceneSignals>

Trait Implementations§

Source§

impl Clone for ObsSceneRef

Source§

fn clone(&self) -> ObsSceneRef

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ObsSceneRef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ObsSceneRef

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl ObsSceneExtFilter for ObsSceneRef

Source§

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>

Removes a filter from the this scene (internally removes the filter to the scene’s source).
Source§

impl PartialEq for ObsSceneRef

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SceneItemExtSceneTrait for ObsSceneRef

Source§

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>

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>

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>

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>

Removes a specific scene item from this scene.
Source§

fn remove_all_sources(&mut self) -> Result<(), ObsError>

Removes all sources from this scene.
Source§

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
Source§

impl Eq for ObsSceneRef

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.