pub struct SurfaceHandle {
pub window_id: u64,
pub raw_window_ptr: usize,
pub raw_display_ptr: usize,
pub width: u32,
pub height: u32,
pub scale_factor_snapped: u32,
}Expand description
Abstract opaque handle to a native window surface for presentation.
Fields§
§window_id: u64§raw_window_ptr: usize§raw_display_ptr: usize§width: u32§height: u32§scale_factor_snapped: u32Implementations§
Source§impl SurfaceHandle
impl SurfaceHandle
Sourcepub fn new_headless(width: u32, height: u32, scale_factor: f32) -> Self
pub fn new_headless(width: u32, height: u32, scale_factor: f32) -> Self
Creates a headless surface handle for testing, CI automation, and offscreen rendering.
Sourcepub fn scale_factor(&self) -> f32
pub fn scale_factor(&self) -> f32
Scale factor as a floating-point multiplier.
Trait Implementations§
Source§impl Clone for SurfaceHandle
impl Clone for SurfaceHandle
impl Copy for SurfaceHandle
Source§impl Debug for SurfaceHandle
impl Debug for SurfaceHandle
impl Eq for SurfaceHandle
Source§impl PartialEq for SurfaceHandle
impl PartialEq for SurfaceHandle
impl StructuralPartialEq for SurfaceHandle
Auto Trait Implementations§
impl Forget for SurfaceHandle
impl Freeze for SurfaceHandle
impl Move for SurfaceHandle
impl RefUnwindSafe for SurfaceHandle
impl Send for SurfaceHandle
impl Sync for SurfaceHandle
impl Unpin for SurfaceHandle
impl UnsafeUnpin for SurfaceHandle
impl UnwindSafe for SurfaceHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.