pub struct WindowBackend {
pub id: u32,
/* private fields */
}Expand description
Data associated to a specific window for overlay rendering.
Fields§
§id: u32Unique identifier for the window.
Implementations§
Source§impl WindowBackend
impl WindowBackend
Sourcepub fn gpu_luid(&self) -> GpuLuid
pub fn gpu_luid(&self) -> GpuLuid
Get the locally unique identifier for the GPU. This is the GPU adapter used by the window to present to surface. Overlay surface texture must be created with this GPU. Otherwise, surface cannot be rendered.
Sourcepub fn update_surface(&self, handle: Option<NonZeroU32>) -> Result<()>
pub fn update_surface(&self, handle: Option<NonZeroU32>) -> Result<()>
Update overlay surface using the given shared handle.
Sourcepub fn layout(&self) -> OverlayLayout
pub fn layout(&self) -> OverlayLayout
Get overlay layout.
Sourcepub fn update_layout(&self, f: impl FnOnce(&mut OverlayLayout))
pub fn update_layout(&self, f: impl FnOnce(&mut OverlayLayout))
Update overlay layout.
Sourcepub fn invalidate_layout(&self)
pub fn invalidate_layout(&self)
Invalidate layout and recompute position.
Sourcepub fn listen_input(&self, flags: ListenInputFlags)
pub fn listen_input(&self, flags: ListenInputFlags)
Set which input events are being listened to.
Sourcepub fn set_blocking_cursor(&self, cursor: Option<Cursor>)
pub fn set_blocking_cursor(&self, cursor: Option<Cursor>)
Sets the cursor to be displayed while input is blocked.
Sourcepub fn block_input(&self, block: bool)
pub fn block_input(&self, block: bool)
Blocks or unblocks input for the window.
Sourcepub fn execute_gui(&self, f: impl FnOnce(&WindowBackend) + Send + 'static)
pub fn execute_gui(&self, f: impl FnOnce(&WindowBackend) + Send + 'static)
Execute function on the GUI thread.
Calling execute_gui inside the closure will deadlock.
Auto Trait Implementations§
impl !Freeze for WindowBackend
impl !RefUnwindSafe for WindowBackend
impl Send for WindowBackend
impl Sync for WindowBackend
impl Unpin for WindowBackend
impl !UnwindSafe for WindowBackend
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