tauri_runtime_wry/
webview.rs1#[cfg(any(
6 target_os = "linux",
7 target_os = "dragonfly",
8 target_os = "freebsd",
9 target_os = "netbsd",
10 target_os = "openbsd"
11))]
12mod imp {
13 pub type Webview = webkit2gtk::WebView;
14}
15
16#[cfg(target_vendor = "apple")]
17mod imp {
18 use std::ffi::c_void;
19
20 pub struct Webview {
21 pub webview: *mut c_void,
22 pub manager: *mut c_void,
23 #[cfg(target_os = "macos")]
24 pub ns_window: *mut c_void,
25 #[cfg(target_os = "ios")]
26 pub view_controller: *mut c_void,
27 }
28}
29
30#[cfg(windows)]
31mod imp {
32 use webview2_com::Microsoft::Web::WebView2::Win32::{
33 ICoreWebView2Controller, ICoreWebView2Environment,
34 };
35 pub struct Webview {
36 pub controller: ICoreWebView2Controller,
37 pub environment: ICoreWebView2Environment,
38 }
39}
40
41#[cfg(target_os = "android")]
42mod imp {
43 use wry::JniHandle;
44 pub type Webview = JniHandle;
45}
46
47pub use imp::*;