[−][src]Struct wayland_client::protocol::wl_subsurface::WlSubsurface
Implementations
impl WlSubsurface
[src]
pub fn destroy(&self)
[src]
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, and the wl_surface loses its role as a sub-surface. The wl_surface is unmapped immediately.
This is a destructor, you cannot send requests to this object any longer once this method is called.
pub fn set_position(&self, x: i32, y: i32)
[src]
reposition the sub-surface
This schedules a sub-surface position change. 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 scheduled coordinates will take effect whenever the state of the parent surface is applied. When this happens depends on whether the parent surface is in synchronized mode or not. See wl_subsurface.set_sync and wl_subsurface.set_desync for details.
If more than one set_position request is invoked by the client before the commit of the parent surface, the position of a new request always replaces the scheduled position from any previous request.
The initial position is 0, 0.
pub fn place_above(&self, sibling: &WlSurface)
[src]
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.
The z-order is double-buffered. Requests are handled in order and applied immediately to a pending state. The final pending state is copied to the active state the next time the state of the parent surface is applied. When this happens depends on whether the parent surface is in synchronized mode or not. See wl_subsurface.set_sync and wl_subsurface.set_desync for details.
A new sub-surface is initially added as the top-most in the stack of its siblings and parent.
pub fn place_below(&self, sibling: &WlSurface)
[src]
restack the sub-surface
The sub-surface is placed just below the reference surface. See wl_subsurface.place_above.
pub fn set_sync(&self)
[src]
set sub-surface to synchronized mode
Change the commit behaviour of the sub-surface to synchronized mode, also described as the parent dependent mode.
In synchronized mode, wl_surface.commit on a sub-surface will accumulate the committed state in a cache, but the state will not be applied and hence will not change the compositor output. The cached state is applied to the sub-surface immediately after the parent surface's state is applied. This ensures atomic updates of the parent and all its synchronized sub-surfaces. Applying the cached state will invalidate the cache, so further parent surface commits do not (re-)apply old state.
See wl_subsurface for the recursive effect of this mode.
pub fn set_desync(&self)
[src]
set sub-surface to desynchronized mode
Change the commit behaviour of the sub-surface to desynchronized mode, also described as independent or freely running mode.
In desynchronized mode, wl_surface.commit on a sub-surface will apply the pending state directly, without caching, as happens normally with a wl_surface. Calling wl_surface.commit on the parent surface has no effect on the sub-surface's wl_surface state. This mode allows a sub-surface to be updated on its own.
If cached state exists when wl_surface.commit is called in desynchronized mode, the pending state is added to the cached state, and applied as a whole. This invalidates the cache.
Note: even if a sub-surface is set to desynchronized, a parent sub-surface may override it to behave as synchronized. For details, see wl_subsurface.
If a surface's parent surface behaves as desynchronized, then the cached state is applied on set_desync.
Trait Implementations
impl AsRef<Proxy<WlSubsurface>> for WlSubsurface
[src]
impl Clone for WlSubsurface
[src]
fn clone(&self) -> WlSubsurface
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for WlSubsurface
[src]
impl Eq for WlSubsurface
[src]
impl From<Proxy<WlSubsurface>> for WlSubsurface
[src]
impl From<WlSubsurface> for Proxy<WlSubsurface>
[src]
fn from(value: WlSubsurface) -> Self
[src]
impl Interface for WlSubsurface
[src]
type Request = Request
Set of requests associated to this interface Read more
type Event = Event
Set of events associated to this interface Read more
const NAME: &'static str
[src]
const VERSION: u32
[src]
fn c_interface() -> *const wl_interface
[src]
impl PartialEq<WlSubsurface> for WlSubsurface
[src]
fn eq(&self, other: &WlSubsurface) -> bool
[src]
fn ne(&self, other: &WlSubsurface) -> bool
[src]
impl StructuralEq for WlSubsurface
[src]
impl StructuralPartialEq for WlSubsurface
[src]
Auto Trait Implementations
impl !RefUnwindSafe for WlSubsurface
impl Send for WlSubsurface
impl Sync for WlSubsurface
impl Unpin for WlSubsurface
impl !UnwindSafe for WlSubsurface
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,