pub struct WlSubsurface { /* private fields */ }Expand description
A wl_subsurface object.
See the documentation of the module for the interface description.
Implementations§
Source§impl WlSubsurface
impl WlSubsurface
Sourcepub fn set_handler(&self, handler: impl WlSubsurfaceHandler)
pub fn set_handler(&self, handler: impl WlSubsurfaceHandler)
Sets a new handler.
Sourcepub fn set_boxed_handler(&self, handler: Box<dyn WlSubsurfaceHandler>)
pub fn set_boxed_handler(&self, handler: Box<dyn WlSubsurfaceHandler>)
Sets a new, already boxed handler.
Source§impl WlSubsurface
impl WlSubsurface
Sourcepub const MSG__DESTROY__SINCE: u32 = 1
pub const MSG__DESTROY__SINCE: u32 = 1
Since when the destroy message is available.
Sourcepub const MSG__SET_POSITION__SINCE: u32 = 1
pub const MSG__SET_POSITION__SINCE: u32 = 1
Since when the set_position message is available.
Sourcepub const MSG__PLACE_ABOVE__SINCE: u32 = 1
pub const MSG__PLACE_ABOVE__SINCE: u32 = 1
Since when the place_above message is available.
Sourcepub const MSG__PLACE_BELOW__SINCE: u32 = 1
pub const MSG__PLACE_BELOW__SINCE: u32 = 1
Since when the place_below message is available.
Sourcepub const MSG__SET_SYNC__SINCE: u32 = 1
pub const MSG__SET_SYNC__SINCE: u32 = 1
Since when the set_sync message is available.
Sourcepub const MSG__SET_DESYNC__SINCE: u32 = 1
pub const MSG__SET_DESYNC__SINCE: u32 = 1
Since when the set_desync message is available.
Sourcepub fn try_send_destroy(&self) -> Result<(), ObjectError>
pub fn try_send_destroy(&self) -> Result<(), ObjectError>
remove sub-surface interface
The sub-surface interface is removed from the wl_surface object that was turned into a sub-surface with a wl_subcompositor.get_subsurface request. The wl_surface’s association to the parent is deleted. The wl_surface is unmapped immediately.
Sourcepub fn send_destroy(&self)
pub fn send_destroy(&self)
remove sub-surface interface
The sub-surface interface is removed from the wl_surface object that was turned into a sub-surface with a wl_subcompositor.get_subsurface request. The wl_surface’s association to the parent is deleted. The wl_surface is unmapped immediately.
Sourcepub fn try_send_set_position(&self, x: i32, y: i32) -> Result<(), ObjectError>
pub fn try_send_set_position(&self, x: i32, y: i32) -> Result<(), ObjectError>
reposition the sub-surface
This sets the position of the sub-surface, relative to the parent surface.
The sub-surface will be moved so that its origin (top left corner pixel) will be at the location x, y of the parent surface coordinate system. The coordinates are not restricted to the parent surface area. Negative values are allowed.
The initial position is 0, 0.
Position is double-buffered state on the parent surface, see wl_subsurface and wl_surface.commit for more information.
§Arguments
x: x coordinate in the parent surfacey: y coordinate in the parent surface
Sourcepub fn send_set_position(&self, x: i32, y: i32)
pub fn send_set_position(&self, x: i32, y: i32)
reposition the sub-surface
This sets the position of the sub-surface, relative to the parent surface.
The sub-surface will be moved so that its origin (top left corner pixel) will be at the location x, y of the parent surface coordinate system. The coordinates are not restricted to the parent surface area. Negative values are allowed.
The initial position is 0, 0.
Position is double-buffered state on the parent surface, see wl_subsurface and wl_surface.commit for more information.
§Arguments
x: x coordinate in the parent surfacey: y coordinate in the parent surface
Sourcepub fn try_send_place_above(
&self,
sibling: &Rc<WlSurface>,
) -> Result<(), ObjectError>
pub fn try_send_place_above( &self, sibling: &Rc<WlSurface>, ) -> Result<(), ObjectError>
restack the sub-surface
This sub-surface is taken from the stack, and put back just above the reference surface, changing the z-order of the sub-surfaces. The reference surface must be one of the sibling surfaces, or the parent surface. Using any other surface, including this sub-surface, will cause a protocol error.
A new sub-surface is initially added as the top-most in the stack of its siblings and parent.
Z-order is double-buffered state on the parent surface, see wl_subsurface and wl_surface.commit for more information.
§Arguments
sibling: the reference surface
Sourcepub fn send_place_above(&self, sibling: &Rc<WlSurface>)
pub fn send_place_above(&self, sibling: &Rc<WlSurface>)
restack the sub-surface
This sub-surface is taken from the stack, and put back just above the reference surface, changing the z-order of the sub-surfaces. The reference surface must be one of the sibling surfaces, or the parent surface. Using any other surface, including this sub-surface, will cause a protocol error.
A new sub-surface is initially added as the top-most in the stack of its siblings and parent.
Z-order is double-buffered state on the parent surface, see wl_subsurface and wl_surface.commit for more information.
§Arguments
sibling: the reference surface
Sourcepub fn try_send_place_below(
&self,
sibling: &Rc<WlSurface>,
) -> Result<(), ObjectError>
pub fn try_send_place_below( &self, sibling: &Rc<WlSurface>, ) -> Result<(), ObjectError>
restack the sub-surface
The sub-surface is placed just below the reference surface.
See wl_subsurface.place_above.
§Arguments
sibling: the reference surface
Sourcepub fn send_place_below(&self, sibling: &Rc<WlSurface>)
pub fn send_place_below(&self, sibling: &Rc<WlSurface>)
restack the sub-surface
The sub-surface is placed just below the reference surface.
See wl_subsurface.place_above.
§Arguments
sibling: the reference surface
Sourcepub fn try_send_set_sync(&self) -> Result<(), ObjectError>
pub fn try_send_set_sync(&self) -> Result<(), ObjectError>
set sub-surface to synchronized mode
Change the commit behaviour of the sub-surface to synchronized mode.
See wl_subsurface and wl_surface.commit for more information.
Sourcepub fn send_set_sync(&self)
pub fn send_set_sync(&self)
set sub-surface to synchronized mode
Change the commit behaviour of the sub-surface to synchronized mode.
See wl_subsurface and wl_surface.commit for more information.
Sourcepub fn try_send_set_desync(&self) -> Result<(), ObjectError>
pub fn try_send_set_desync(&self) -> Result<(), ObjectError>
set sub-surface to desynchronized mode
Change the commit behaviour of the sub-surface to desynchronized mode.
See wl_subsurface and wl_surface.commit for more information.
Sourcepub fn send_set_desync(&self)
pub fn send_set_desync(&self)
set sub-surface to desynchronized mode
Change the commit behaviour of the sub-surface to desynchronized mode.
See wl_subsurface and wl_surface.commit for more information.
Source§impl WlSubsurface
impl WlSubsurface
Sourcepub const ENM__ERROR_BAD_SURFACE__SINCE: u32 = 1
pub const ENM__ERROR_BAD_SURFACE__SINCE: u32 = 1
Since when the error.bad_surface enum variant is available.
Trait Implementations§
Source§impl ConcreteObject for WlSubsurface
impl ConcreteObject for WlSubsurface
Source§const XML_VERSION: u32 = 1
const XML_VERSION: u32 = 1
Source§const INTERFACE: ObjectInterface = ObjectInterface::WlSubsurface
const INTERFACE: ObjectInterface = ObjectInterface::WlSubsurface
Source§const INTERFACE_NAME: &str = "wl_subsurface"
const INTERFACE_NAME: &str = "wl_subsurface"
Source§impl Debug for WlSubsurface
impl Debug for WlSubsurface
Source§impl Object for WlSubsurface
impl Object for WlSubsurface
Source§fn core(&self) -> &ObjectCore
fn core(&self) -> &ObjectCore
ObjectCore of this object.Source§fn unset_handler(&self)
fn unset_handler(&self)
Source§fn get_handler_any_ref(
&self,
) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>
fn get_handler_any_ref( &self, ) -> Result<HandlerRef<'_, dyn Any>, HandlerAccessError>
Source§fn get_handler_any_mut(
&self,
) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>
fn get_handler_any_mut( &self, ) -> Result<HandlerMut<'_, dyn Any>, HandlerAccessError>
Auto Trait Implementations§
impl !Freeze for WlSubsurface
impl !RefUnwindSafe for WlSubsurface
impl !Send for WlSubsurface
impl !Sync for WlSubsurface
impl Unpin for WlSubsurface
impl UnsafeUnpin for WlSubsurface
impl !UnwindSafe for WlSubsurface
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> ObjectCoreApi for T
impl<T> ObjectCoreApi for T
Source§fn client(&self) -> Option<Rc<Client>>
fn client(&self) -> Option<Rc<Client>>
Client associated with this object, if any.Source§fn interface(&self) -> ObjectInterface
fn interface(&self) -> ObjectInterface
ObjectInterface of this object.