Struct servo::headless_window::Window
source · [−]pub struct Window {
webrender_surfman: WebrenderSurfman,
animation_state: Cell<AnimationState>,
fullscreen: Cell<bool>,
device_pixels_per_px: Option<f32>,
}
Fields
webrender_surfman: WebrenderSurfman
animation_state: Cell<AnimationState>
fullscreen: Cell<bool>
device_pixels_per_px: Option<f32>
Implementations
sourceimpl Window
impl Window
pub fn new(
size: Size2D<u32, DeviceIndependentPixel>,
device_pixels_per_px: Option<f32>
) -> Rc<dyn WindowPortsMethods>
fn servo_hidpi_factor(&self) -> Scale<f32, DeviceIndependentPixel, DevicePixel>
Trait Implementations
sourceimpl GlWindow for Window
impl GlWindow for Window
fn get_render_target(
&self,
_device: &mut Device,
_context: &mut Context
) -> GlWindowRenderTarget
fn get_rotation(&self) -> Rotation3D<f32, UnknownUnit, UnknownUnit>
fn get_translation(&self) -> Vector3D<f32, UnknownUnit>
fn get_mode(&self) -> GlWindowMode
sourceimpl WindowMethods for Window
impl WindowMethods for Window
sourcefn get_coordinates(&self) -> EmbedderCoordinates
fn get_coordinates(&self) -> EmbedderCoordinates
Get the coordinates of the native window, the screen and the framebuffer.
sourcefn set_animation_state(&self, state: AnimationState)
fn set_animation_state(&self, state: AnimationState)
Set whether the application is currently animating. Typically, when animations are active, the window will want to avoid blocking on UI events, and just run the event loop at the vsync interval. Read more
sourcefn get_gl_context(&self) -> GlContext
fn get_gl_context(&self) -> GlContext
Get the media GL context
sourcefn get_native_display(&self) -> NativeDisplay
fn get_native_display(&self) -> NativeDisplay
Get the media native display
sourcefn get_gl_api(&self) -> GlApi
fn get_gl_api(&self) -> GlApi
Get the GL api
sourcefn webrender_surfman(&self) -> WebrenderSurfman
fn webrender_surfman(&self) -> WebrenderSurfman
Get the webrender surfman instance
sourceimpl WindowPortsMethods for Window
impl WindowPortsMethods for Window
fn get_events(&self) -> Vec<WindowEvent>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
fn has_events(&self) -> bool
fn id(&self) -> WindowId
fn page_height(&self) -> f32
fn set_fullscreen(&self, state: bool)
fn get_fullscreen(&self) -> bool
fn is_animating(&self) -> bool
fn winit_event_to_servo_event(&self, _event: WindowEvent<'_>)
fn new_glwindow(
&self,
_events_loop: &EventLoopWindowTarget<ServoEvent>
) -> Box<dyn GlWindow>
fn set_title(&self, _title: &str)
fn set_inner_size(&self, _size: DeviceIntSize)
fn set_position(&self, _point: DeviceIntPoint)
fn set_cursor(&self, _cursor: Cursor)
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert
sourceimpl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more