[−][src]Struct alacritty::window::Window
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: boolWhether 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]
event_loop: EventsLoop,
options: &Options,
window_config: &WindowConfig,
dimensions: Option<LogicalSize>
) -> Result<Window, Error>
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]
F: FnMut(Event),
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]
F: FnMut(Event) -> ControlFlow,
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]
title: &str,
class: &str,
window_config: &WindowConfig
) -> WindowBuilder
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]
fn run_os_extensions(&self)[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T> Borrow for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> SetParameter for T[src]
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>, [src]
T: Parameter<Self>,
Sets value as a parameter of self.