pub(crate) struct ServoShellWindow {
pub(crate) webview_collection: RefCell<WebViewCollection>,
platform_window: Rc<dyn PlatformWindow>,
close_scheduled: Cell<bool>,
needs_update: Cell<bool>,
needs_repaint: Cell<bool>,
pending_favicon_loads: RefCell<Vec<WebViewId>>,
}Fields§
§webview_collection: RefCell<WebViewCollection>The WebViews that have been added to this window.
platform_window: Rc<dyn PlatformWindow>A handle to the PlatformWindow that servoshell is rendering in.
close_scheduled: Cell<bool>Whether or not this window should be closed at the end of the spin of the next event loop.
needs_update: Cell<bool>Whether or not the application interface needs to be updated.
needs_repaint: Cell<bool>Whether or not Servo needs to repaint its display. Currently this is global
because every WebView shares a RenderingContext.
pending_favicon_loads: RefCell<Vec<WebViewId>>List of webviews that have favicon textures which are not yet uploaded to the GPU by egui.
Implementations§
Source§impl ServoShellWindow
impl ServoShellWindow
pub(crate) fn new(platform_window: Rc<dyn PlatformWindow>) -> Self
pub(crate) fn id(&self) -> ServoShellWindowId
pub(crate) fn create_and_activate_toplevel_webview( &self, state: Rc<RunningAppState>, url: Url, ) -> WebView
pub(crate) fn create_toplevel_webview( &self, state: Rc<RunningAppState>, url: Url, ) -> WebView
Sourcepub(crate) fn repaint_webviews(&self)
pub(crate) fn repaint_webviews(&self)
Repaint the focused WebView.
Sourcepub(crate) fn should_close(&self) -> bool
pub(crate) fn should_close(&self) -> bool
Whether or not this ServoShellWindow has any WebViews.
pub(crate) fn contains_webview(&self, id: WebViewId) -> bool
pub(crate) fn webview_by_id(&self, id: WebViewId) -> Option<WebView>
pub(crate) fn set_needs_update(&self)
pub(crate) fn set_needs_repaint(&self)
pub(crate) fn schedule_close(&self)
pub(crate) fn platform_window(&self) -> Rc<dyn PlatformWindow>
pub(crate) fn focused(&self) -> bool
pub(crate) fn add_webview(&self, webview: WebView)
pub(crate) fn webview_ids(&self) -> Vec<WebViewId>
Sourcepub(crate) fn webviews(&self) -> Vec<(WebViewId, WebView)>
pub(crate) fn webviews(&self) -> Vec<(WebViewId, WebView)>
Returns all WebViews in creation order.
pub(crate) fn activate_webview(&self, webview_id: WebViewId)
pub(crate) fn activate_webview_by_index(&self, index_to_activate: usize)
pub(crate) fn get_active_webview_index(&self) -> Option<usize>
pub(crate) fn update_and_request_repaint_if_necessary( &self, state: &RunningAppState, )
Sourcepub(crate) fn close_webview(&self, webview_id: WebViewId)
pub(crate) fn close_webview(&self, webview_id: WebViewId)
pub(crate) fn notify_favicon_changed(&self, webview: WebView)
pub(crate) fn hidpi_scale_factor_changed(&self)
pub(crate) fn active_webview(&self) -> Option<WebView>
pub(crate) fn active_or_newest_webview(&self) -> Option<WebView>
Sourcepub(crate) fn take_pending_favicon_loads(&self) -> Vec<WebViewId>
pub(crate) fn take_pending_favicon_loads(&self) -> Vec<WebViewId>
Return a list of all webviews that have favicons that have not yet been loaded by egui.
pub(crate) fn show_embedder_control( &self, webview: WebView, embedder_control: EmbedderControl, )
pub(crate) fn hide_embedder_control( &self, webview: WebView, embedder_control: EmbedderControlId, )
Auto Trait Implementations§
impl !Freeze for ServoShellWindow
impl !RefUnwindSafe for ServoShellWindow
impl !Send for ServoShellWindow
impl !Sync for ServoShellWindow
impl Unpin for ServoShellWindow
impl !UnwindSafe for ServoShellWindow
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