pub struct HeadlessWindow {
id: ServoShellWindowId,
fullscreen: Cell<bool>,
device_pixel_ratio_override: Option<Scale<f32, DeviceIndependentPixel, DevicePixel>>,
inner_size: Cell<DeviceIntSize>,
screen_size: Size2D<i32, DevicePixel>,
window_position: Cell<Point2D<i32, DevicePixel>>,
rendering_context: Rc<SoftwareRenderingContext>,
}Fields§
§id: ServoShellWindowId§fullscreen: Cell<bool>§device_pixel_ratio_override: Option<Scale<f32, DeviceIndependentPixel, DevicePixel>>§inner_size: Cell<DeviceIntSize>§screen_size: Size2D<i32, DevicePixel>§window_position: Cell<Point2D<i32, DevicePixel>>§rendering_context: Rc<SoftwareRenderingContext>Implementations§
Source§impl HeadlessWindow
impl HeadlessWindow
pub fn new(servoshell_preferences: &ServoShellPreferences) -> Rc<Self>
Trait Implementations§
Source§impl Drop for HeadlessWindow
impl Drop for HeadlessWindow
Source§impl PlatformWindow for HeadlessWindow
impl PlatformWindow for HeadlessWindow
fn id(&self) -> ServoShellWindowId
fn screen_geometry(&self) -> ScreenGeometry
fn set_position(&self, point: DeviceIntPoint)
Source§fn request_repaint(&self, window: &ServoShellWindow)
fn request_repaint(&self, window: &ServoShellWindow)
Request that the window redraw itself. It is up to the window to do this
once the windowing system is ready. If this is a headless window, the redraw
will happen immediately.
Source§fn request_resize(
&self,
webview: &WebView,
new_size: DeviceIntSize,
) -> Option<DeviceIntSize>
fn request_resize( &self, webview: &WebView, new_size: DeviceIntSize, ) -> Option<DeviceIntSize>
Request a new outer size for the window, including external decorations.
This should be the same as
window.outerWidth and `window.outerHeight``fn device_hidpi_scale_factor( &self, ) -> Scale<f32, DeviceIndependentPixel, DevicePixel>
fn hidpi_scale_factor(&self) -> Scale<f32, DeviceIndependentPixel, DevicePixel>
fn set_fullscreen(&self, state: bool)
fn get_fullscreen(&self) -> bool
fn new_glwindow(&self, _event_loop: &ActiveEventLoop) -> Rc<dyn GlWindow>
fn window_rect(&self) -> DeviceIndependentIntRect
Source§fn rendering_context(&self) -> Rc<dyn RenderingContext>
fn rendering_context(&self) -> Rc<dyn RenderingContext>
This returns
RenderingContext matching the viewport.fn maximize(&self, webview: &WebView)
fn show_console_message(&self, level: ConsoleLogLevel, message: &str)
Source§fn rebuild_user_interface(&self, _: &RunningAppState, _: &ServoShellWindow)
fn rebuild_user_interface(&self, _: &RunningAppState, _: &ServoShellWindow)
Request that the
Window rebuild its user interface, if it has one. This should
not repaint, but should prepare the user interface for painting when it is
actually requested.Source§fn update_user_interface_state(
&self,
_: &RunningAppState,
_: &ServoShellWindow,
) -> bool
fn update_user_interface_state( &self, _: &RunningAppState, _: &ServoShellWindow, ) -> bool
Inform the
Window that the state of a WebView has changed and that it should
do an incremental update of user interface state. Returns true if the user
interface actually changed and a rebuild and repaint is needed, false otherwise.fn set_cursor(&self, _cursor: Cursor)
fn theme(&self) -> Theme
fn focus(&self)
fn has_platform_focus(&self) -> bool
fn show_embedder_control(&self, _: WebViewId, _: EmbedderControl)
fn hide_embedder_control(&self, _: WebViewId, _: EmbedderControlId)
fn dismiss_embedder_controls_for_webview(&self, _: WebViewId)
fn show_bluetooth_device_dialog( &self, _: WebViewId, _request: BluetoothDeviceSelectionRequest, )
fn show_permission_dialog(&self, _: WebViewId, _: PermissionRequest)
fn show_http_authentication_dialog( &self, _: WebViewId, _: AuthenticationRequest, )
fn notify_input_event_handled( &self, _webview: &WebView, _id: InputEventId, _result: InputEventResult, )
fn notify_media_session_event(&self, _: MediaSessionEvent)
fn notify_crashed( &self, _: WebView, _reason: String, _backtrace: Option<String>, )
Source§fn as_headed_window(&self) -> Option<&HeadedWindow>
fn as_headed_window(&self) -> Option<&HeadedWindow>
If this window is a headed window, access the concrete type.
fn notify_accessibility_tree_update(&self, _: WebView, _: TreeUpdate)
Auto Trait Implementations§
impl !Freeze for HeadlessWindow
impl !RefUnwindSafe for HeadlessWindow
impl !Send for HeadlessWindow
impl !Sync for HeadlessWindow
impl Unpin for HeadlessWindow
impl UnsafeUnpin for HeadlessWindow
impl !UnwindSafe for HeadlessWindow
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert