⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

XdgSurface

Struct XdgSurface 

Source
pub struct XdgSurface {
    pub id: u32,
    pub surface_id: u32,
    pub configured: bool,
    pub configure_serial: u32,
    pub geometry: Option<(i32, i32, u32, u32)>,
    pub toplevel: Option<XdgToplevel>,
}
Expand description

An xdg_surface wraps a wl_surface with desktop shell semantics.

Fields§

§id: u32

xdg_surface object ID

§surface_id: u32

Underlying wl_surface ID

§configured: bool

Whether the client has ack’d the latest configure

§configure_serial: u32

Last sent configure serial

§geometry: Option<(i32, i32, u32, u32)>

Window geometry (client-set visible bounds)

§toplevel: Option<XdgToplevel>

Associated toplevel (if any)

Implementations§

Source§

impl XdgSurface

Source

pub fn new(id: u32, surface_id: u32) -> Self

Source

pub fn ack_configure(&mut self, serial: u32) -> bool

Handle ack_configure from the client.

Source

pub fn set_geometry(&mut self, x: i32, y: i32, width: u32, height: u32)

Set window geometry.

Auto Trait Implementations§

§

impl Freeze for XdgSurface

§

impl RefUnwindSafe for XdgSurface

§

impl Send for XdgSurface

§

impl Sync for XdgSurface

§

impl Unpin for XdgSurface

§

impl UnwindSafe for XdgSurface

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where 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>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.