struct XSurface {
    display: XDisplay,
    visual: *mut Visual,
    depth: u32,
    window: c_ulong,
    gc: *mut _XGC,
    width: u32,
    height: u32,
    buffers: [Option<Buffer>; 2],
    buffer_next: usize,
    buffer_completion_type: u32,
    delete_window_atom: c_ulong,
    close_requested: bool,
}

Fields§

§display: XDisplay§visual: *mut Visual§depth: u32§window: c_ulong§gc: *mut _XGC§width: u32§height: u32§buffers: [Option<Buffer>; 2]§buffer_next: usize§buffer_completion_type: u32§delete_window_atom: c_ulong§close_requested: bool

Implementations§

source§

impl XSurface

source

fn current_buffer(&self) -> usize

Returns index of the current (on-screen) buffer, or 0 if there are no buffers.

source

fn draw_buffer(&mut self, buffer_index: usize)

Draws the indicated buffer onto the screen.

source

fn lazily_allocate_buffer(&mut self, buffer_index: usize) -> Option<&Buffer>

Gets the buffer at buffer_index, allocating it if necessary.

Trait Implementations§

source§

impl Drop for XSurface

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl GpuDisplaySurface for XSurface

source§

fn surface_descriptor(&self) -> u64

Returns an unique ID associated with the surface. This is typically generated by the compositor or cast of a raw pointer.
source§

fn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>>

Returns the next framebuffer, allocating if necessary.
source§

fn next_buffer_in_use(&self) -> bool

Returns true if the next buffer in the swapchain is already in use.
source§

fn close_requested(&self) -> bool

Returns true if the surface should be closed.
source§

fn flip(&mut self)

Puts the next buffer on the screen, making it the current buffer.
source§

fn buffer_completion_type(&self) -> u32

Returns the type of the completed buffer.
source§

fn draw_current_buffer(&mut self)

Draws the current buffer on the screen.
source§

fn on_client_message(&mut self, client_data: u64)

Handles a compositor-specific client event.
source§

fn on_shm_completion(&mut self, shm_complete: u64)

Handles a compositor-specific shared memory completion event.
source§

fn flip_to( &mut self, _import_id: u32, _acquire_timepoint: Option<SemaphoreTimepoint>, _release_timepoint: Option<SemaphoreTimepoint>, _extra_info: Option<FlipToExtraInfo> ) -> Result<Waitable>

Puts the specified import_id on the screen.
source§

fn commit(&mut self) -> GpuDisplayResult<()>

Commits the surface to the compositor.
source§

fn set_mouse_mode(&mut self, _mouse_mode: MouseMode)

Sets the mouse mode used on this surface.
source§

fn set_position(&mut self, _x: u32, _y: u32)

Sets the position of the identified subsurface relative to its parent.

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert 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>

Convert 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)

Convert &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)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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.
source§

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

Performs the conversion.