Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): expose
with_webview
API to access the platform webview (#…
- Loading branch information
1 parent
72e577d
commit c82b476
Showing
7 changed files
with
239 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"tauri": "patch" | ||
"tauri-runtime": patch | ||
"tauri-runtime-wry": patch | ||
--- | ||
|
||
Expose methods to access the underlying native handles of the webview. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2019-2021 Tauri Programme within The Commons Conservancy | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// SPDX-License-Identifier: MIT | ||
|
||
#[cfg(any( | ||
target_os = "linux", | ||
target_os = "dragonfly", | ||
target_os = "freebsd", | ||
target_os = "netbsd", | ||
target_os = "openbsd" | ||
))] | ||
mod imp { | ||
use std::rc::Rc; | ||
|
||
pub type Webview = Rc<webkit2gtk::WebView>; | ||
} | ||
|
||
#[cfg(target_os = "macos")] | ||
mod imp { | ||
use cocoa::base::id; | ||
|
||
pub struct Webview { | ||
pub webview: id, | ||
pub manager: id, | ||
pub ns_window: id, | ||
} | ||
} | ||
|
||
#[cfg(windows)] | ||
mod imp { | ||
use webview2_com::Microsoft::Web::WebView2::Win32::ICoreWebView2Controller; | ||
pub struct Webview { | ||
pub controller: ICoreWebView2Controller, | ||
} | ||
} | ||
|
||
pub use imp::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters