[][src]Struct servo::glutin_app::window::Window

pub struct Window {
    kind: WindowKind,
    screen_size: TypedSize2D<u32, DeviceIndependentPixel>,
    inner_size: Cell<TypedSize2D<u32, DeviceIndependentPixel>>,
    mouse_down_button: Cell<Option<MouseButton>>,
    mouse_down_point: Cell<TypedPoint2D<i32, DevicePixel>>,
    event_queue: RefCell<Vec<WindowEvent>>,
    mouse_pos: Cell<TypedPoint2D<i32, DevicePixel>>,
    last_pressed: Cell<Option<KeyboardEvent>>,
    animation_state: Cell<AnimationState>,
    fullscreen: Cell<bool>,
    gl: Rc<dyn Gl>,
    suspended: Cell<bool>,
}

The type of a window.

Fields

kind: WindowKindscreen_size: TypedSize2D<u32, DeviceIndependentPixel>inner_size: Cell<TypedSize2D<u32, DeviceIndependentPixel>>mouse_down_button: Cell<Option<MouseButton>>mouse_down_point: Cell<TypedPoint2D<i32, DevicePixel>>event_queue: RefCell<Vec<WindowEvent>>mouse_pos: Cell<TypedPoint2D<i32, DevicePixel>>last_pressed: Cell<Option<KeyboardEvent>>animation_state: Cell<AnimationState>fullscreen: Cell<bool>gl: Rc<dyn Gl>suspended: Cell<bool>

Methods

impl Window[src]

pub fn new(
    is_foreground: bool,
    window_size: TypedSize2D<u32, DeviceIndependentPixel>
) -> Rc<Window>
[src]

pub fn get_events(&self) -> Vec<WindowEvent>[src]

pub fn page_height(&self) -> f32[src]

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

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

pub fn set_position(&self, point: DeviceIntPoint)[src]

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

pub fn get_fullscreen(&self) -> bool[src]

fn is_animating(&self) -> bool[src]

pub fn run<T>(&self, servo_callback: T) where
    T: FnMut() -> bool
[src]

fn gl_version() -> GlRequest[src]

fn handle_received_character(&self, ch: char)[src]

fn handle_keyboard_input(&self, input: KeyboardInput)[src]

fn winit_event_to_servo_event(&self, event: Event)[src]

fn handle_mouse(
    &self,
    button: MouseButton,
    action: ElementState,
    coords: TypedPoint2D<i32, DevicePixel>
)
[src]

Helper function to handle a click

fn device_hidpi_factor(
    &self
) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel>
[src]

fn servo_hidpi_factor(
    &self
) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel>
[src]

pub fn set_cursor(&self, cursor: Cursor)[src]

Trait Implementations

impl WindowMethods for Window[src]

Auto Trait Implementations

impl !Send for Window

impl !Sync for Window

Blanket Implementations

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

impl<T> From for 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> Erased for T[src]

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> Same for T[src]

type Output = T

Should always be Self

impl<T> MaybeBoxed for T[src]

impl<T> MaybeBoxed for T[src]