[−][src]Struct wlroots::surface::Surface
A Wayland object that represents the data that we display on the screen.
Most surfaces come from Wayland clients, though they can also be created by the compositor directly.
Methods
impl Surface
[src]
impl Surface
pub fn current_state<'surface>(&'surface mut self) -> State<'surface>
[src]
pub fn current_state<'surface>(&'surface mut self) -> State<'surface>
Get the surface state.
pub fn pending_state<'surface>(&'surface mut self) -> State<'surface>
[src]
pub fn pending_state<'surface>(&'surface mut self) -> State<'surface>
Get the pending surface state.
pub fn subsurfaces(&self) -> Vec<Handle>
[src]
pub fn subsurfaces(&self) -> Vec<Handle>
Gets a list of handles to the Subsurface
s of this Surface
.
pub fn texture<'surface>(&'surface self) -> Option<Texture<'surface>>
[src]
pub fn texture<'surface>(&'surface self) -> Option<Texture<'surface>>
Get the texture of this surface.
Returns None if no buffer is currently attached or if something went wrong with uploading the buffer.
pub fn role(&self) -> Option<String>
[src]
pub fn role(&self) -> Option<String>
Get the lifetime bound role (if one exists) for this surface.
pub fn has_buffer(&self) -> bool
[src]
pub fn has_buffer(&self) -> bool
Whether or not this surface currently has an attached buffer.
A surface has an attached buffer when it commits with a non-null buffer in its pending state.
A surface will not have a buffer if it has never committed one, has committed a null buffer, or something went wrong with uploading the buffer.
pub fn accepts_input(&self, sx: c_double, sy: c_double) -> bool
[src]
pub fn accepts_input(&self, sx: c_double, sy: c_double) -> bool
Determines if this surface accepts input or not at the provided surface local coordinates.
pub fn is_xdg_surface(&self) -> bool
[src]
pub fn is_xdg_surface(&self) -> bool
Determines if this surface is an XDG surface.
This is really only useful for getting the parent of popups from stable XDG shell surfaces.
pub fn subsurface_at(
&mut self,
sx: f64,
sy: f64,
sub_x: &mut f64,
sub_y: &mut f64
) -> Option<Handle>
[src]
pub fn subsurface_at(
&mut self,
sx: f64,
sy: f64,
sub_x: &mut f64,
sub_y: &mut f64
) -> Option<Handle>
Find a subsurface within this surface at the surface-local coordinates.
Returns the surface and coordinates in the topmost surface coordinate system or None if no subsurface is found at that location.
pub fn get_root_surface(&self) -> Option<Handle>
[src]
pub fn get_root_surface(&self) -> Option<Handle>
Get the top of the subsurface tree for this surface.
pub fn send_enter(&mut self, output: &mut Output)
[src]
pub fn send_enter(&mut self, output: &mut Output)
pub fn send_leave(&mut self, output: &mut Output)
[src]
pub fn send_leave(&mut self, output: &mut Output)
pub fn send_frame_done(&mut self, duration: Duration)
[src]
pub fn send_frame_done(&mut self, duration: Duration)
Send the frame done event.
Trait Implementations
impl Handleable<Weak<Box<SubsurfaceManager>>, wlr_surface> for Surface
[src]
impl Handleable<Weak<Box<SubsurfaceManager>>, wlr_surface> for Surface
fn weak_reference(&self) -> Handle
[src]
fn weak_reference(&self) -> Handle
Creates a weak reference to the resource.
impl Drop for Surface
[src]
impl Drop for Surface
impl Debug for Surface
[src]
impl Debug for Surface
Auto Trait Implementations
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more