Trait gpu_display::GpuDisplaySurface
source · pub(crate) trait GpuDisplaySurface {
Show 13 methods
// Provided methods
fn surface_descriptor(&self) -> u64 { ... }
fn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>> { ... }
fn next_buffer_in_use(&self) -> bool { ... }
fn close_requested(&self) -> bool { ... }
fn flip(&mut self) { ... }
fn flip_to(
&mut self,
_import_id: u32,
_acquire_timepoint: Option<SemaphoreTimepoint>,
_release_timepoint: Option<SemaphoreTimepoint>,
_extra_info: Option<FlipToExtraInfo>
) -> Result<Waitable> { ... }
fn commit(&mut self) -> GpuDisplayResult<()> { ... }
fn set_mouse_mode(&mut self, _mouse_mode: MouseMode) { ... }
fn set_position(&mut self, _x: u32, _y: u32) { ... }
fn buffer_completion_type(&self) -> u32 { ... }
fn draw_current_buffer(&mut self) { ... }
fn on_client_message(&mut self, _client_data: u64) { ... }
fn on_shm_completion(&mut self, _shm_complete: u64) { ... }
}
Provided Methods§
sourcefn 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.
sourcefn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>>
fn framebuffer(&mut self) -> Option<GpuDisplayFramebuffer<'_>>
Returns the next framebuffer, allocating if necessary.
sourcefn 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.
sourcefn close_requested(&self) -> bool
fn close_requested(&self) -> bool
Returns true if the surface should be closed.
sourcefn 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.
sourcefn commit(&mut self) -> GpuDisplayResult<()>
fn commit(&mut self) -> GpuDisplayResult<()>
Commits the surface to the compositor.
sourcefn 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.
sourcefn 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.
sourcefn buffer_completion_type(&self) -> u32
fn buffer_completion_type(&self) -> u32
Returns the type of the completed buffer.
sourcefn draw_current_buffer(&mut self)
fn draw_current_buffer(&mut self)
Draws the current buffer on the screen.
sourcefn on_client_message(&mut self, _client_data: u64)
fn on_client_message(&mut self, _client_data: u64)
Handles a compositor-specific client event.
sourcefn 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.