webview: Public the raw wry webview handle (#1739)
This commit is contained in:
parent
514aea00be
commit
13eceab1ac
1 changed files with 9 additions and 4 deletions
|
|
@ -1,14 +1,14 @@
|
||||||
use std::{ops::Deref, rc::Rc};
|
use std::{ops::Deref, rc::Rc};
|
||||||
|
|
||||||
use wry::{
|
use wry::{
|
||||||
dpi::{self, LogicalSize},
|
|
||||||
Rect,
|
Rect,
|
||||||
|
dpi::{self, LogicalSize},
|
||||||
};
|
};
|
||||||
|
|
||||||
use gpui::{
|
use gpui::{
|
||||||
canvas, div, App, Bounds, ContentMask, DismissEvent, Element, ElementId, Entity, EventEmitter,
|
App, Bounds, ContentMask, DismissEvent, Element, ElementId, Entity, EventEmitter, FocusHandle,
|
||||||
FocusHandle, Focusable, GlobalElementId, Hitbox, InteractiveElement, IntoElement, LayoutId,
|
Focusable, GlobalElementId, Hitbox, InteractiveElement, IntoElement, LayoutId, MouseDownEvent,
|
||||||
MouseDownEvent, ParentElement as _, Pixels, Render, Size, Style, Styled as _, Window,
|
ParentElement as _, Pixels, Render, Size, Style, Styled as _, Window, canvas, div,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::PixelsExt;
|
use crate::PixelsExt;
|
||||||
|
|
@ -74,6 +74,11 @@ impl WebView {
|
||||||
pub fn load_url(&mut self, url: &str) {
|
pub fn load_url(&mut self, url: &str) {
|
||||||
self.webview.load_url(url).unwrap();
|
self.webview.load_url(url).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the raw wry webview.
|
||||||
|
pub fn raw(&self) -> &wry::WebView {
|
||||||
|
&self.webview
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Deref for WebView {
|
impl Deref for WebView {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue