Struct gpu_display::gpu_display_x::XSurface
source · 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
impl XSurface
sourcefn current_buffer(&self) -> usize
fn current_buffer(&self) -> usize
Returns index of the current (on-screen) buffer, or 0 if there are no buffers.
sourcefn draw_buffer(&mut self, buffer_index: usize)
fn draw_buffer(&mut self, buffer_index: usize)
Draws the indicated buffer onto the screen.
sourcefn lazily_allocate_buffer(&mut self, buffer_index: usize) -> Option<&Buffer>
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 GpuDisplaySurface for XSurface
impl GpuDisplaySurface for XSurface
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 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.
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.
Auto Trait Implementations§
impl RefUnwindSafe for XSurface
impl !Send for XSurface
impl !Sync for XSurface
impl Unpin for XSurface
impl UnwindSafe for XSurface
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.