Struct wayland_client::protocol::wl_subcompositor::WlSubcompositor
source · pub struct WlSubcompositor { /* private fields */ }
Expand description
sub-surface compositing
The global interface exposing sub-surface compositing capabilities. A wl_surface, that has sub-surfaces associated, is called the parent surface. Sub-surfaces can be arbitrarily nested and create a tree of sub-surfaces.
The root surface in a tree of sub-surfaces is the main surface. The main surface cannot be a sub-surface, because sub-surfaces must always have a parent.
A main surface with its sub-surfaces forms a (compound) window. For window management purposes, this set of wl_surface objects is to be considered as a single window, and it should also behave as such.
The aim of sub-surfaces is to offload some of the compositing work within a window from clients to the compositor. A prime example is a video player with decorations and video in separate wl_surface objects. This should allow the compositor to pass YUV video buffer processing to dedicated overlay hardware when possible.
This interface has no events.
Implementations§
source§impl WlSubcompositor
impl WlSubcompositor
sourcepub fn destroy(&self)
pub fn destroy(&self)
unbind from the subcompositor interface
Informs the server that the client will not be using this protocol object anymore. This does not affect any other objects, wl_subsurface objects included.
sourcepub fn get_subsurface<U: Send + Sync + 'static, D: Dispatch<WlSubsurface, U> + 'static>(
&self,
surface: &WlSurface,
parent: &WlSurface,
qh: &QueueHandle<D>,
udata: U,
) -> WlSubsurface
pub fn get_subsurface<U: Send + Sync + 'static, D: Dispatch<WlSubsurface, U> + 'static>( &self, surface: &WlSurface, parent: &WlSurface, qh: &QueueHandle<D>, udata: U, ) -> WlSubsurface
give a surface the role sub-surface
Create a sub-surface interface for the given surface, and associate it with the given parent surface. This turns a plain wl_surface into a sub-surface.
The to-be sub-surface must not already have another role, and it must not have an existing wl_subsurface object. Otherwise the bad_surface protocol error is raised.
Adding sub-surfaces to a parent is a double-buffered operation on the parent (see wl_surface.commit). The effect of adding a sub-surface becomes visible on the next time the state of the parent surface is applied.
The parent surface must not be one of the child surface’s descendants, and the parent must be different from the child surface, otherwise the bad_parent protocol error is raised.
This request modifies the behaviour of wl_surface.commit request on the sub-surface, see the documentation on wl_subsurface interface.
Trait Implementations§
source§impl Borrow<ObjectId> for WlSubcompositor
impl Borrow<ObjectId> for WlSubcompositor
source§impl Clone for WlSubcompositor
impl Clone for WlSubcompositor
source§fn clone(&self) -> WlSubcompositor
fn clone(&self) -> WlSubcompositor
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WlSubcompositor
impl Debug for WlSubcompositor
source§impl Hash for WlSubcompositor
impl Hash for WlSubcompositor
source§impl PartialEq<Weak<WlSubcompositor>> for WlSubcompositor
impl PartialEq<Weak<WlSubcompositor>> for WlSubcompositor
source§impl PartialEq for WlSubcompositor
impl PartialEq for WlSubcompositor
source§impl Proxy for WlSubcompositor
impl Proxy for WlSubcompositor
source§fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
fn data<U: Send + Sync + 'static>(&self) -> Option<&U>
source§fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
fn object_data(&self) -> Option<&Arc<dyn ObjectData>>
source§fn backend(&self) -> &WeakBackend
fn backend(&self) -> &WeakBackend
source§fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
fn send_request(&self, req: Self::Request<'_>) -> Result<(), InvalidId>
source§fn send_constructor<I: Proxy>(
&self,
req: Self::Request<'_>,
data: Arc<dyn ObjectData>,
) -> Result<I, InvalidId>
fn send_constructor<I: Proxy>( &self, req: Self::Request<'_>, data: Arc<dyn ObjectData>, ) -> Result<I, InvalidId>
source§fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
fn from_id(conn: &Connection, id: ObjectId) -> Result<Self, InvalidId>
source§fn inert(backend: WeakBackend) -> Self
fn inert(backend: WeakBackend) -> Self
source§fn parse_event(
conn: &Connection,
msg: Message<ObjectId, OwnedFd>,
) -> Result<(Self, Self::Event), DispatchError>
fn parse_event( conn: &Connection, msg: Message<ObjectId, OwnedFd>, ) -> Result<(Self, Self::Event), DispatchError>
source§fn write_request<'a>(
&self,
conn: &Connection,
msg: Self::Request<'a>,
) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
fn write_request<'a>( &self, conn: &Connection, msg: Self::Request<'a>, ) -> Result<(Message<ObjectId, BorrowedFd<'a>>, Option<(&'static Interface, u32)>), InvalidId>
impl Eq for WlSubcompositor
Auto Trait Implementations§
impl Freeze for WlSubcompositor
impl !RefUnwindSafe for WlSubcompositor
impl Send for WlSubcompositor
impl Sync for WlSubcompositor
impl Unpin for WlSubcompositor
impl !UnwindSafe for WlSubcompositor
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.