[][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.


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>


impl Window[src]

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

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

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(
    button: MouseButton,
    action: ElementState,
    coords: TypedPoint2D<i32, DevicePixel>

Helper function to handle a click

fn device_hidpi_factor(
) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel>

fn servo_hidpi_factor(
) -> TypedScale<f32, DeviceIndependentPixel, DevicePixel>

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>, 

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized

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

impl<T> BorrowMut for T where
    T: ?Sized

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

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>, 

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]