pub struct Subsurface { /* private fields */ }
Implementations§
Source§impl Subsurface
impl Subsurface
pub fn new(surface: ObjectId, parent: ObjectId) -> Self
Sourcepub fn surface(&self) -> ObjectRef<Surface>
pub fn surface(&self) -> ObjectRef<Surface>
Gets the associated wl_surface for this subsurface.
Sourcepub fn is_sync(&self) -> bool
pub fn is_sync(&self) -> bool
Returns true iff this subsurface is running in synchronized mode.
Sourcepub fn add_pending_commands(&mut self, commands: Vec<SurfaceCommand>)
pub fn add_pending_commands(&mut self, commands: Vec<SurfaceCommand>)
Adds some SurfaceCommand
s to this surfaces pending state.
This pending state
is a set of operations that were committed with a
wl_surface::commit request, but are waiting for our parents state to
be committed.
Subsurfaces in desync mode have no pending state, as their state is applied immediately upon wl_surface::commit.
Sourcepub fn take_pending_state(
&mut self,
) -> (Vec<SurfaceCommand>, Vec<ObjectRef<Callback>>)
pub fn take_pending_state( &mut self, ) -> (Vec<SurfaceCommand>, Vec<ObjectRef<Callback>>)
Extracts the set of pending SurfaceCommand
s and frame Callbacks for
this subsurface, resetting both to empty vectors.
pub fn finalize_commit( &mut self, callbacks: &mut Vec<ObjectRef<Callback>>, ) -> bool
Trait Implementations§
Source§impl RequestReceiver<WlSubsurface> for Subsurface
impl RequestReceiver<WlSubsurface> for Subsurface
Auto Trait Implementations§
impl Freeze for Subsurface
impl !RefUnwindSafe for Subsurface
impl !Send for Subsurface
impl !Sync for Subsurface
impl Unpin for Subsurface
impl !UnwindSafe for Subsurface
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