Struct gpu_display::gpu_display_stub::StubSurface
source · struct StubSurface {
width: u32,
height: u32,
buffer: Option<Buffer>,
}
Fields§
§width: u32
§height: u32
§buffer: Option<Buffer>
Implementations§
source§impl StubSurface
impl StubSurface
sourcefn lazily_allocate_buffer(&mut self) -> Option<&mut Buffer>
fn lazily_allocate_buffer(&mut self) -> Option<&mut Buffer>
Gets the buffer at buffer_index, allocating it if necessary.
Trait Implementations§
source§impl Drop for StubSurface
impl Drop for StubSurface
source§impl GpuDisplaySurface for StubSurface
impl GpuDisplaySurface for StubSurface
source§fn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>>
fn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>>
Returns the next framebuffer, allocating if necessary.
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 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_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 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 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 StubSurface
impl Send for StubSurface
impl Sync for StubSurface
impl Unpin for StubSurface
impl UnwindSafe for StubSurface
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.