[][src]Struct alacritty::window::Window

pub struct Window {
    pub is_focused: bool,
    // some fields omitted
}

A window which can be used for displaying the terminal

Wraps the underlying windowing library to provide a stable API in Alacritty

Fields

is_focused: bool

Whether or not the window is the focused window.

Methods

impl Window[src]

pub fn new(
    event_loop: EventsLoop,
    options: &Options,
    window_config: &WindowConfig,
    dimensions: Option<LogicalSize>
) -> Result<Window, Error>
[src]

Create a new window

This creates a window and fully initializes a window.

pub fn device_properties(&self) -> DeviceProperties[src]

Get some properties about the device

Some window properties are provided since subsystems like font rasterization depend on DPI and scale factor.

pub fn inner_size_pixels(&self) -> Option<LogicalSize>[src]

pub fn set_inner_size(&mut self, size: LogicalSize)[src]

pub fn hidpi_factor(&self) -> f64[src]

pub fn create_window_proxy(&self) -> Proxy[src]

pub fn swap_buffers(&self) -> Result<(), Error>[src]

pub fn poll_events<F>(&mut self, func: F) where
    F: FnMut(Event), 
[src]

Poll for any available events

pub fn resize(&self, size: PhysicalSize)[src]

pub fn wait_events<F>(&mut self, func: F) where
    F: FnMut(Event) -> ControlFlow
[src]

Block waiting for events

pub fn set_title(&self, title: &str)[src]

Set the window title

pub fn set_mouse_cursor(&self, cursor: MouseCursor)[src]

pub fn set_mouse_visible(&mut self, visible: bool)[src]

Set mouse cursor visible

pub fn get_platform_window(
    title: &str,
    class: &str,
    window_config: &WindowConfig
) -> WindowBuilder
[src]

pub fn set_urgent(&self, is_urgent: bool)[src]

pub fn set_ime_spot(&self, pos: LogicalPosition)[src]

pub fn get_window_id(&self) -> Option<usize>[src]

pub fn hide(&self)[src]

Hide the window

Trait Implementations

impl OsExtensions for Window[src]

Auto Trait Implementations

impl !Send for Window

impl !Sync for Window

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> SetParameter for T[src]

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 
[src]

Sets value as a parameter of self.

impl<T> Erased for T[src]