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

pub struct Window {
    pub should_draw: Arc<AtomicBool>,
    pub wayland_surface: Option<Attached<WlSurface>>,
    pub dpr: f64,
    windowed_context: WindowedContext<PossiblyCurrent>,
    current_mouse_cursor: CursorIcon,
    mouse_visible: bool,
}

A window which can be used for displaying the terminal.

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

Fields

should_draw: Arc<AtomicBool>

Flag tracking frame redraw requests from Wayland compositor.

wayland_surface: Option<Attached<WlSurface>>

Attached Wayland surface to request new frame events.

dpr: f64

Cached DPR for quickly scaling pixel sizes.

windowed_context: WindowedContext<PossiblyCurrent>current_mouse_cursor: CursorIconmouse_visible: bool

Implementations

impl Window[src]

pub fn new<E>(
    event_loop: &EventLoop<E>,
    config: &TermConfig<UIConfig>,
    size: Option<PhysicalSize<u32>>,
    wayland_event_queue: Option<&EventQueue>
) -> Result<Window, Error>
[src]

Create a new window.

This creates a window and fully initializes a window.

pub fn set_inner_size(&mut self, size: PhysicalSize<u32>)[src]

pub fn inner_size(&self) -> PhysicalSize<u32>[src]

pub fn set_visible(&self, visibility: bool)[src]

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

Set the window title.

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

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

Set mouse cursor visible.

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

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

pub fn set_outer_position(&self, pos: PhysicalPosition<i32>)[src]

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

pub fn window_id(&self) -> WindowId[src]

pub fn set_maximized(&self, maximized: bool)[src]

pub fn set_minimized(&self, minimized: bool)[src]

pub fn toggle_fullscreen(&mut self)[src]

Toggle the window's fullscreen state.

pub fn set_fullscreen(&mut self, fullscreen: bool)[src]

pub fn wayland_display(&self) -> Option<*mut c_void>[src]

pub fn wayland_surface(&self) -> Option<&Attached<WlSurface>>[src]

pub fn set_wayland_theme(&mut self, colors: &Colors)[src]

pub fn update_ime_position(&mut self, point: Point, size: &SizeInfo)[src]

Adjust the IME editor position according to the new location of the cursor.

pub fn swap_buffers(&self)[src]

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

fn window(&self) -> &GlutinWindow[src]

Auto Trait Implementations

impl !RefUnwindSafe for Window

impl !Send for Window

impl !Sync for Window

impl Unpin for Window

impl !UnwindSafe for Window

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.