Skip to main content

LivePlatformWindow

Struct LivePlatformWindow 

Source
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: bool

Implementations§

Source§

impl LivePlatformWindow

Source

pub fn new(config: WindowConfig) -> LivePlatformWindow

Creates a live platform window initialized with the given configuration.

Source

pub fn surface_config(&self) -> &SurfaceConfig

Access surface configuration descriptor.

Source

pub fn frame_pacer_mut(&mut self) -> &mut FramePacer

Mutable access to frame pacer.

Source

pub fn surface_handle(&self) -> SurfaceHandle

Returns abstract surface handle.

Source

pub fn take_redraw_request(&mut self) -> bool

Consumes and clears redraw request flag.

Trait Implementations§

Source§

impl Clone for LivePlatformWindow

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Debug for LivePlatformWindow

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl NativeSurfaceWindow for LivePlatformWindow

Source§

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

Source§

fn title(&self) -> &str

Source§

fn set_title(&mut self, title: &str)

Source§

fn size(&self) -> (u32, u32)

Source§

fn set_size(&mut self, width: u32, height: u32)

Source§

fn scale_factor(&self) -> f32

Source§

fn set_scale_factor(&mut self, scale_factor: f32)

Source§

fn mode(&self) -> WindowMode

Source§

fn set_mode(&mut self, mode: WindowMode)

Source§

fn is_focused(&self) -> bool

Source§

fn set_focused(&mut self, focused: bool)

Source§

fn cursor(&self) -> CursorIcon

Source§

fn set_cursor(&mut self, cursor: CursorIcon)

Source§

fn request_redraw(&mut self)

Source§

fn is_redraw_requested(&self) -> bool

Source§

fn poll_events(&mut self) -> Vec<PlatformEvent>

Source§

fn push_event(&mut self, event: PlatformEvent)

Source§

fn current_monitor(&self) -> Option<MonitorInfo>

Returns the monitor containing the center of this window, if known.
Source§

fn available_monitors(&self) -> Vec<MonitorInfo>

Returns the list of currently connected physical display monitors.
Source§

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)

Sets candidate window positioning following active text caret coordinate.
Source§

fn set_ime_surrounding_text(&mut self, text: &str, cursor_index: i32)

Updates surrounding text buffer for context-aware IME prediction.
Source§

fn reset_ime(&mut self)

Resets active IME composition session.
Source§

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)

Initiates an interactive window drag operation with the native window manager.
Source§

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

Toggles the window maximized state and returns true if the window is now maximized.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoInitialState<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,