pub struct LivePlatformWindow {Show 13 fields
pub config: WindowConfig,
pub surface_config: SurfaceConfig,
pub surface_handle: SurfaceHandle,
pub frame_pacer: FramePacer,
pub scale_factor: f32,
pub is_focused: bool,
pub cursor: CursorIcon,
pub redraw_requested: bool,
pub event_queue: VecDeque<PlatformEvent>,
pub monitors: Vec<MonitorInfo>,
pub current_monitor_id: Option<u64>,
pub display_buffer: Vec<u8>,
pub is_native_presented: bool,
}Expand description
Live interactive platform window with surface configuration, frame pacing, and event queuing.
Fields§
§config: WindowConfig§surface_config: SurfaceConfig§surface_handle: SurfaceHandle§frame_pacer: FramePacer§scale_factor: f32§is_focused: bool§cursor: CursorIcon§redraw_requested: bool§event_queue: VecDeque<PlatformEvent>§monitors: Vec<MonitorInfo>§current_monitor_id: Option<u64>§display_buffer: Vec<u8>§is_native_presented: boolImplementations§
Source§impl LivePlatformWindow
impl LivePlatformWindow
Sourcepub fn new(config: WindowConfig) -> LivePlatformWindow
pub fn new(config: WindowConfig) -> LivePlatformWindow
Creates a live platform window initialized with the given configuration.
Sourcepub fn surface_config(&self) -> &SurfaceConfig
pub fn surface_config(&self) -> &SurfaceConfig
Access surface configuration descriptor.
Sourcepub fn frame_pacer_mut(&mut self) -> &mut FramePacer
pub fn frame_pacer_mut(&mut self) -> &mut FramePacer
Mutable access to frame pacer.
Sourcepub fn surface_handle(&self) -> SurfaceHandle
pub fn surface_handle(&self) -> SurfaceHandle
Returns abstract surface handle.
Sourcepub fn take_redraw_request(&mut self) -> bool
pub fn take_redraw_request(&mut self) -> bool
Consumes and clears redraw request flag.
Trait Implementations§
Source§impl Clone for LivePlatformWindow
impl Clone for LivePlatformWindow
Source§fn clone(&self) -> LivePlatformWindow
fn clone(&self) -> LivePlatformWindow
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LivePlatformWindow
impl Debug for LivePlatformWindow
Source§impl NativeSurfaceWindow for LivePlatformWindow
impl NativeSurfaceWindow for LivePlatformWindow
Source§fn present_surface(
&mut self,
pixels: &[u8],
width: u32,
height: u32,
) -> Result<(), PresentError>
fn present_surface( &mut self, pixels: &[u8], width: u32, height: u32, ) -> Result<(), PresentError>
Blits a 32-bit BGRA uncompressed buffer to the window client area.
Source§impl PlatformWindow for LivePlatformWindow
impl PlatformWindow for LivePlatformWindow
fn title(&self) -> &str
fn set_title(&mut self, title: &str)
fn size(&self) -> (u32, u32)
fn set_size(&mut self, width: u32, height: u32)
fn scale_factor(&self) -> f32
fn set_scale_factor(&mut self, scale_factor: f32)
fn mode(&self) -> WindowMode
fn set_mode(&mut self, mode: WindowMode)
fn is_focused(&self) -> bool
fn set_focused(&mut self, focused: bool)
fn cursor(&self) -> CursorIcon
fn set_cursor(&mut self, cursor: CursorIcon)
fn request_redraw(&mut self)
fn is_redraw_requested(&self) -> bool
fn poll_events(&mut self) -> Vec<PlatformEvent>
fn push_event(&mut self, event: PlatformEvent)
Source§fn current_monitor(&self) -> Option<MonitorInfo>
fn current_monitor(&self) -> Option<MonitorInfo>
Returns the monitor containing the center of this window, if known.
Source§fn available_monitors(&self) -> Vec<MonitorInfo>
fn available_monitors(&self) -> Vec<MonitorInfo>
Returns the list of currently connected physical display monitors.
Source§fn primary_monitor(&self) -> Option<MonitorInfo>
fn primary_monitor(&self) -> Option<MonitorInfo>
Returns the primary system monitor.
Source§fn set_ime_cursor_location(&mut self, x: i32, y: i32, width: i32, height: i32)
fn set_ime_cursor_location(&mut self, x: i32, y: i32, width: i32, height: i32)
Sets candidate window positioning following active text caret coordinate.
Source§fn set_ime_surrounding_text(&mut self, text: &str, cursor_index: i32)
fn set_ime_surrounding_text(&mut self, text: &str, cursor_index: i32)
Updates surrounding text buffer for context-aware IME prediction.
Source§fn on_accessibility_update(&mut self, _json_payload: &str)
fn on_accessibility_update(&mut self, _json_payload: &str)
Transmits an incremental AccessKit/OS accessibility tree update to native screen readers.
Source§fn begin_window_drag(&mut self, _x: f32, _y: f32)
fn begin_window_drag(&mut self, _x: f32, _y: f32)
Initiates an interactive window drag operation with the native window manager.
Source§fn begin_window_resize(&mut self, _edge: CsdHitZone, _x: f32, _y: f32)
fn begin_window_resize(&mut self, _edge: CsdHitZone, _x: f32, _y: f32)
Initiates an interactive window resize operation with the native window manager.
Source§fn toggle_maximize(&mut self) -> bool
fn toggle_maximize(&mut self) -> bool
Toggles the window maximized state and returns true if the window is now maximized.
Auto Trait Implementations§
impl Forget for LivePlatformWindow
impl Freeze for LivePlatformWindow
impl Move for LivePlatformWindow
impl RefUnwindSafe for LivePlatformWindow
impl Send for LivePlatformWindow
impl Sync for LivePlatformWindow
impl Unpin for LivePlatformWindow
impl UnsafeUnpin for LivePlatformWindow
impl UnwindSafe for LivePlatformWindow
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