pub struct WebView(Rc<RefCell<WebViewInner>>);
Tuple Fields§
§0: Rc<RefCell<WebViewInner>>
Implementations§
source§impl WebView
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
pub(crate) fn new( constellation_proxy: &ConstellationProxy, compositor: Rc<RefCell<IOCompositor>>, ) -> Self
fn inner(&self) -> Ref<'_, WebViewInner>
fn inner_mut(&self) -> RefMut<'_, WebViewInner>
pub(crate) fn from_weak_handle( inner: &Weak<RefCell<WebViewInner>>, ) -> Option<Self>
pub(crate) fn weak_handle(&self) -> Weak<RefCell<WebViewInner>>
pub fn delegate(&self) -> Rc<dyn WebViewDelegate>
pub fn set_delegate(&self, delegate: Rc<dyn WebViewDelegate>)
pub fn clipboard_delegate(&self) -> Rc<dyn ClipboardDelegate>
pub fn set_clipboard_delegate(&self, delegate: Rc<dyn ClipboardDelegate>)
pub fn id(&self) -> WebViewId
pub fn load_status(&self) -> LoadStatus
pub(crate) fn set_load_status(self, new_value: LoadStatus)
pub fn url(&self) -> Option<Url>
pub(crate) fn set_url(self, new_value: Url)
pub fn status_text(&self) -> Option<String>
pub(crate) fn set_status_text(self, new_value: Option<String>)
pub fn page_title(&self) -> Option<String>
pub(crate) fn set_page_title(self, new_value: Option<String>)
pub fn favicon_url(&self) -> Option<Url>
pub(crate) fn set_favicon_url(self, new_value: Url)
pub fn focused(&self) -> bool
pub(crate) fn set_focused(self, new_value: bool)
pub fn cursor(&self) -> Cursor
pub(crate) fn set_cursor(self, new_value: Cursor)
pub fn focus(&self)
pub fn blur(&self)
pub fn rect(&self) -> DeviceRect
pub fn move_resize(&self, rect: DeviceRect)
pub fn show(&self, hide_others: bool)
pub fn hide(&self)
pub fn raise_to_top(&self, hide_others: bool)
pub fn notify_theme_change(&self, theme: Theme)
pub fn load(&self, url: Url)
pub fn reload(&self)
pub fn go_back(&self, amount: usize)
pub fn go_forward(&self, amount: usize)
pub fn notify_pointer_move_event(&self, event: DevicePoint)
pub fn notify_touch_event( &self, event_type: TouchEventType, id: TouchId, point: DevicePoint, )
pub fn notify_wheel_event(&self, delta: WheelDelta, point: DevicePoint)
pub fn notify_scroll_event( &self, location: ScrollLocation, point: DeviceIntPoint, touch_event_type: TouchEventType, )
pub fn notify_keyboard_event(&self, event: KeyboardEvent)
pub fn notify_ime_event(&self, event: CompositionEvent)
pub fn notify_ime_dismissed_event(&self)
pub fn notify_gamepad_event(&self, event: GamepadEvent)
pub fn notify_media_session_action_event(&self, event: MediaSessionActionType)
pub fn notify_clipboard_event(&self, event: ClipboardEventType)
pub fn notify_vsync(&self)
pub fn notify_rendering_context_resized(&self)
pub fn set_zoom(&self, new_zoom: f32)
pub fn reset_zoom(&self)
pub fn set_pinch_zoom(&self, new_pinch_zoom: f32)
pub fn exit_fullscreen(&self)
pub fn set_throttled(&self, throttled: bool)
pub fn toggle_webrender_debugging(&self, debugging: WebRenderDebugOption)
pub fn capture_webrender(&self)
pub fn toggle_sampling_profiler(&self, rate: Duration, max_duration: Duration)
pub fn send_error(&self, message: String)
Trait Implementations§
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> 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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