Struct gpu_display::gpu_display_wl::WaylandSurface
source · struct WaylandSurface {
surface: DwlSurface,
row_size: u32,
buffer_size: usize,
buffer_index: Cell<usize>,
buffer_mem: MemoryMapping,
}
Fields§
§surface: DwlSurface
§row_size: u32
§buffer_size: usize
§buffer_index: Cell<usize>
§buffer_mem: MemoryMapping
Implementations§
source§impl WaylandSurface
impl WaylandSurface
fn surface(&self) -> *mut dwl_surface
Trait Implementations§
source§impl GpuDisplaySurface for WaylandSurface
impl GpuDisplaySurface for WaylandSurface
source§fn surface_descriptor(&self) -> u64
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<'_>>
fn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>>
Returns the next framebuffer, allocating if necessary.
source§fn next_buffer_in_use(&self) -> bool
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
fn close_requested(&self) -> bool
Returns true if the surface should be closed.
source§fn flip_to(
&mut self,
import_id: u32,
_acquire_timepoint: Option<SemaphoreTimepoint>,
_release_timepoint: Option<SemaphoreTimepoint>,
_extra_info: Option<FlipToExtraInfo>
) -> Result<Waitable>
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<()>
fn commit(&mut self) -> GpuDisplayResult<()>
Commits the surface to the compositor.
source§fn set_position(&mut self, x: u32, y: u32)
fn set_position(&mut self, x: u32, y: u32)
Sets the position of the identified subsurface relative to its parent.
source§fn set_mouse_mode(&mut self, _mouse_mode: MouseMode)
fn set_mouse_mode(&mut self, _mouse_mode: MouseMode)
Sets the mouse mode used on this surface.
source§fn buffer_completion_type(&self) -> u32
fn buffer_completion_type(&self) -> u32
Returns the type of the completed buffer.
source§fn draw_current_buffer(&mut self)
fn draw_current_buffer(&mut self)
Draws the current buffer on the screen.
source§fn on_client_message(&mut self, _client_data: u64)
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)
fn on_shm_completion(&mut self, _shm_complete: u64)
Handles a compositor-specific shared memory completion event.
Auto Trait Implementations§
impl !RefUnwindSafe for WaylandSurface
impl !Send for WaylandSurface
impl !Sync for WaylandSurface
impl Unpin for WaylandSurface
impl UnwindSafe for WaylandSurface
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
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn 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>
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)
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)
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.