servo

Struct WebView

source
pub struct WebView(Rc<RefCell<WebViewInner>>);

Tuple Fields§

§0: Rc<RefCell<WebViewInner>>

Implementations§

source§

impl WebView

Handle for a webview.

  • The webview exists for exactly as long as there are WebView handles (FIXME: this is not true yet; webviews can still close of their own volition)
  • All methods are infallible; if the constellation dies, the embedder finds out when calling Servo::handle_events
source

pub(crate) fn new( constellation_proxy: &ConstellationProxy, compositor: Rc<RefCell<IOCompositor>>, ) -> Self

source

fn inner(&self) -> Ref<'_, WebViewInner>

source

fn inner_mut(&self) -> RefMut<'_, WebViewInner>

source

pub(crate) fn from_weak_handle( inner: &Weak<RefCell<WebViewInner>>, ) -> Option<Self>

source

pub(crate) fn weak_handle(&self) -> Weak<RefCell<WebViewInner>>

source

pub fn delegate(&self) -> Rc<dyn WebViewDelegate>

source

pub fn set_delegate(&self, delegate: Rc<dyn WebViewDelegate>)

source

pub fn clipboard_delegate(&self) -> Rc<dyn ClipboardDelegate>

source

pub fn set_clipboard_delegate(&self, delegate: Rc<dyn ClipboardDelegate>)

source

pub fn id(&self) -> WebViewId

source

pub fn load_status(&self) -> LoadStatus

source

pub(crate) fn set_load_status(self, new_value: LoadStatus)

source

pub fn url(&self) -> Option<Url>

source

pub(crate) fn set_url(self, new_value: Url)

source

pub fn status_text(&self) -> Option<String>

source

pub(crate) fn set_status_text(self, new_value: Option<String>)

source

pub fn page_title(&self) -> Option<String>

source

pub(crate) fn set_page_title(self, new_value: Option<String>)

source

pub fn favicon_url(&self) -> Option<Url>

source

pub(crate) fn set_favicon_url(self, new_value: Url)

source

pub fn focused(&self) -> bool

source

pub(crate) fn set_focused(self, new_value: bool)

source

pub fn cursor(&self) -> Cursor

source

pub(crate) fn set_cursor(self, new_value: Cursor)

source

pub fn focus(&self)

source

pub fn blur(&self)

source

pub fn rect(&self) -> DeviceRect

source

pub fn move_resize(&self, rect: DeviceRect)

source

pub fn show(&self, hide_others: bool)

source

pub fn hide(&self)

source

pub fn raise_to_top(&self, hide_others: bool)

source

pub fn notify_theme_change(&self, theme: Theme)

source

pub fn load(&self, url: Url)

source

pub fn reload(&self)

source

pub fn go_back(&self, amount: usize)

source

pub fn go_forward(&self, amount: usize)

source

pub fn notify_pointer_button_event(&self, event: MouseWindowEvent)

source

pub fn notify_pointer_move_event(&self, event: DevicePoint)

source

pub fn notify_touch_event( &self, event_type: TouchEventType, id: TouchId, point: DevicePoint, )

source

pub fn notify_wheel_event(&self, delta: WheelDelta, point: DevicePoint)

source

pub fn notify_scroll_event( &self, location: ScrollLocation, point: DeviceIntPoint, touch_event_type: TouchEventType, )

source

pub fn notify_keyboard_event(&self, event: KeyboardEvent)

source

pub fn notify_ime_event(&self, event: CompositionEvent)

source

pub fn notify_ime_dismissed_event(&self)

source

pub fn notify_gamepad_event(&self, event: GamepadEvent)

source

pub fn notify_media_session_action_event(&self, event: MediaSessionActionType)

source

pub fn notify_clipboard_event(&self, event: ClipboardEventType)

source

pub fn notify_vsync(&self)

source

pub fn notify_rendering_context_resized(&self)

source

pub fn set_zoom(&self, new_zoom: f32)

source

pub fn reset_zoom(&self)

source

pub fn set_pinch_zoom(&self, new_pinch_zoom: f32)

source

pub fn exit_fullscreen(&self)

source

pub fn set_throttled(&self, throttled: bool)

source

pub fn toggle_webrender_debugging(&self, debugging: WebRenderDebugOption)

source

pub fn capture_webrender(&self)

source

pub fn toggle_sampling_profiler(&self, rate: Duration, max_duration: Duration)

source

pub fn send_error(&self, message: String)

Trait Implementations§

source§

impl Clone for WebView

source§

fn clone(&self) -> WebView

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Hash for WebView

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for WebView

source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl Freeze for WebView

§

impl !RefUnwindSafe for WebView

§

impl !Send for WebView

§

impl !Sync for WebView

§

impl Unpin for WebView

§

impl !UnwindSafe for WebView

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> Filterable for T

source§

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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 more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T