pub trait WindowService {
// Required methods
fn create_window(&mut self, title: &str, size: SizeF) -> WindowId;
fn close_window(&mut self, window: WindowId);
fn set_title(&mut self, window: WindowId, title: &str);
fn set_size(&mut self, window: WindowId, size: SizeF);
fn request_redraw(&mut self, window: WindowId);
fn scale_factor(&self, window: WindowId) -> f32;
}Expand description
Janelas nativas (como IFMXWindowService).
Required Methods§
fn create_window(&mut self, title: &str, size: SizeF) -> WindowId
fn close_window(&mut self, window: WindowId)
fn set_title(&mut self, window: WindowId, title: &str)
fn set_size(&mut self, window: WindowId, size: SizeF)
Sourcefn request_redraw(&mut self, window: WindowId)
fn request_redraw(&mut self, window: WindowId)
Pede que a janela seja repintada no próximo frame.
Sourcefn scale_factor(&self, window: WindowId) -> f32
fn scale_factor(&self, window: WindowId) -> f32
Escala de DPI da janela (1.0 = 96 dpi).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".