Skip to main content

WindowService

Trait WindowService 

Source
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§

Source

fn create_window(&mut self, title: &str, size: SizeF) -> WindowId

Source

fn close_window(&mut self, window: WindowId)

Source

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

Source

fn set_size(&mut self, window: WindowId, size: SizeF)

Source

fn request_redraw(&mut self, window: WindowId)

Pede que a janela seja repintada no próximo frame.

Source

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".

Implementors§