1#[inline]
4pub unsafe fn CompareBrowserVersions<P0, P1>(
5 version1: P0,
6 version2: P1,
7 result: *mut i32,
8) -> windows_core::Result<()>
9where
10 P0: windows_core::Param<windows_core::PCWSTR>,
11 P1: windows_core::Param<windows_core::PCWSTR>,
12{
13 windows_link::link!("webview2loader" "system" fn CompareBrowserVersions(version1 : windows_core::PCWSTR, version2 : windows_core::PCWSTR, result : *mut i32) -> windows_core::HRESULT);
14 unsafe {
15 CompareBrowserVersions(version1.param().abi(), version2.param().abi(), result as _).ok()
16 }
17}
18#[inline]
19pub unsafe fn CreateCoreWebView2Environment<P0>(
20 environmentcreatedhandler: P0,
21) -> windows_core::Result<()>
22where
23 P0: windows_core::Param<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>,
24{
25 windows_link::link!("webview2loader" "system" fn CreateCoreWebView2Environment(environmentcreatedhandler : * mut core::ffi::c_void) -> windows_core::HRESULT);
26 unsafe { CreateCoreWebView2Environment(environmentcreatedhandler.param().abi()).ok() }
27}
28#[inline]
29pub unsafe fn CreateCoreWebView2EnvironmentWithOptions<P0, P1, P2, P3>(
30 browserexecutablefolder: P0,
31 userdatafolder: P1,
32 environmentoptions: P2,
33 environmentcreatedhandler: P3,
34) -> windows_core::Result<()>
35where
36 P0: windows_core::Param<windows_core::PCWSTR>,
37 P1: windows_core::Param<windows_core::PCWSTR>,
38 P2: windows_core::Param<ICoreWebView2EnvironmentOptions>,
39 P3: windows_core::Param<ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler>,
40{
41 windows_link::link!("webview2loader" "system" fn CreateCoreWebView2EnvironmentWithOptions(browserexecutablefolder : windows_core::PCWSTR, userdatafolder : windows_core::PCWSTR, environmentoptions : * mut core::ffi::c_void, environmentcreatedhandler : * mut core::ffi::c_void) -> windows_core::HRESULT);
42 unsafe {
43 CreateCoreWebView2EnvironmentWithOptions(
44 browserexecutablefolder.param().abi(),
45 userdatafolder.param().abi(),
46 environmentoptions.param().abi(),
47 environmentcreatedhandler.param().abi(),
48 )
49 .ok()
50 }
51}
52#[inline]
53pub unsafe fn GetAvailableCoreWebView2BrowserVersionString<P0>(
54 browserexecutablefolder: P0,
55 versioninfo: *mut windows_core::PWSTR,
56) -> windows_core::Result<()>
57where
58 P0: windows_core::Param<windows_core::PCWSTR>,
59{
60 windows_link::link!("webview2loader" "system" fn GetAvailableCoreWebView2BrowserVersionString(browserexecutablefolder : windows_core::PCWSTR, versioninfo : *mut windows_core::PWSTR) -> windows_core::HRESULT);
61 unsafe {
62 GetAvailableCoreWebView2BrowserVersionString(
63 browserexecutablefolder.param().abi(),
64 versioninfo as _,
65 )
66 .ok()
67 }
68}
69#[inline]
70pub unsafe fn GetAvailableCoreWebView2BrowserVersionStringWithOptions<P0, P1>(
71 browserexecutablefolder: P0,
72 environmentoptions: P1,
73 versioninfo: *mut windows_core::PWSTR,
74) -> windows_core::Result<()>
75where
76 P0: windows_core::Param<windows_core::PCWSTR>,
77 P1: windows_core::Param<ICoreWebView2EnvironmentOptions>,
78{
79 windows_link::link!("webview2loader" "system" fn GetAvailableCoreWebView2BrowserVersionStringWithOptions(browserexecutablefolder : windows_core::PCWSTR, environmentoptions : * mut core::ffi::c_void, versioninfo : *mut windows_core::PWSTR) -> windows_core::HRESULT);
80 unsafe {
81 GetAvailableCoreWebView2BrowserVersionStringWithOptions(
82 browserexecutablefolder.param().abi(),
83 environmentoptions.param().abi(),
84 versioninfo as _,
85 )
86 .ok()
87 }
88}
89#[repr(transparent)]
90#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
91pub struct COREWEBVIEW2_BOUNDS_MODE(pub i32);
92pub const COREWEBVIEW2_BOUNDS_MODE_USE_RASTERIZATION_SCALE: COREWEBVIEW2_BOUNDS_MODE =
93 COREWEBVIEW2_BOUNDS_MODE(1i32);
94pub const COREWEBVIEW2_BOUNDS_MODE_USE_RAW_PIXELS: COREWEBVIEW2_BOUNDS_MODE =
95 COREWEBVIEW2_BOUNDS_MODE(0i32);
96#[repr(transparent)]
97#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
98pub struct COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(pub i32);
99pub const COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_FAILED: COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND =
100 COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(1i32);
101pub const COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND_NORMAL: COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND =
102 COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND(0i32);
103#[repr(transparent)]
104#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
105pub struct COREWEBVIEW2_BROWSING_DATA_KINDS(pub i32);
106impl COREWEBVIEW2_BROWSING_DATA_KINDS {
107 pub const fn contains(&self, other: Self) -> bool {
108 self.0 & other.0 == other.0
109 }
110}
111impl core::ops::BitOr for COREWEBVIEW2_BROWSING_DATA_KINDS {
112 type Output = Self;
113 fn bitor(self, other: Self) -> Self {
114 Self(self.0 | other.0)
115 }
116}
117impl core::ops::BitAnd for COREWEBVIEW2_BROWSING_DATA_KINDS {
118 type Output = Self;
119 fn bitand(self, other: Self) -> Self {
120 Self(self.0 & other.0)
121 }
122}
123impl core::ops::BitOrAssign for COREWEBVIEW2_BROWSING_DATA_KINDS {
124 fn bitor_assign(&mut self, other: Self) {
125 self.0.bitor_assign(other.0)
126 }
127}
128impl core::ops::BitAndAssign for COREWEBVIEW2_BROWSING_DATA_KINDS {
129 fn bitand_assign(&mut self, other: Self) {
130 self.0.bitand_assign(other.0)
131 }
132}
133impl core::ops::Not for COREWEBVIEW2_BROWSING_DATA_KINDS {
134 type Output = Self;
135 fn not(self) -> Self {
136 Self(self.0.not())
137 }
138}
139pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_DOM_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
140 COREWEBVIEW2_BROWSING_DATA_KINDS(32i32);
141pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_PROFILE: COREWEBVIEW2_BROWSING_DATA_KINDS =
142 COREWEBVIEW2_BROWSING_DATA_KINDS(16384i32);
143pub const COREWEBVIEW2_BROWSING_DATA_KINDS_ALL_SITE: COREWEBVIEW2_BROWSING_DATA_KINDS =
144 COREWEBVIEW2_BROWSING_DATA_KINDS(128i32);
145pub const COREWEBVIEW2_BROWSING_DATA_KINDS_BROWSING_HISTORY: COREWEBVIEW2_BROWSING_DATA_KINDS =
146 COREWEBVIEW2_BROWSING_DATA_KINDS(4096i32);
147pub const COREWEBVIEW2_BROWSING_DATA_KINDS_CACHE_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
148 COREWEBVIEW2_BROWSING_DATA_KINDS(16i32);
149pub const COREWEBVIEW2_BROWSING_DATA_KINDS_COOKIES: COREWEBVIEW2_BROWSING_DATA_KINDS =
150 COREWEBVIEW2_BROWSING_DATA_KINDS(64i32);
151pub const COREWEBVIEW2_BROWSING_DATA_KINDS_DISK_CACHE: COREWEBVIEW2_BROWSING_DATA_KINDS =
152 COREWEBVIEW2_BROWSING_DATA_KINDS(256i32);
153pub const COREWEBVIEW2_BROWSING_DATA_KINDS_DOWNLOAD_HISTORY: COREWEBVIEW2_BROWSING_DATA_KINDS =
154 COREWEBVIEW2_BROWSING_DATA_KINDS(512i32);
155pub const COREWEBVIEW2_BROWSING_DATA_KINDS_FILE_SYSTEMS: COREWEBVIEW2_BROWSING_DATA_KINDS =
156 COREWEBVIEW2_BROWSING_DATA_KINDS(1i32);
157pub const COREWEBVIEW2_BROWSING_DATA_KINDS_GENERAL_AUTOFILL: COREWEBVIEW2_BROWSING_DATA_KINDS =
158 COREWEBVIEW2_BROWSING_DATA_KINDS(1024i32);
159pub const COREWEBVIEW2_BROWSING_DATA_KINDS_INDEXED_DB: COREWEBVIEW2_BROWSING_DATA_KINDS =
160 COREWEBVIEW2_BROWSING_DATA_KINDS(2i32);
161pub const COREWEBVIEW2_BROWSING_DATA_KINDS_LOCAL_STORAGE: COREWEBVIEW2_BROWSING_DATA_KINDS =
162 COREWEBVIEW2_BROWSING_DATA_KINDS(4i32);
163pub const COREWEBVIEW2_BROWSING_DATA_KINDS_PASSWORD_AUTOSAVE: COREWEBVIEW2_BROWSING_DATA_KINDS =
164 COREWEBVIEW2_BROWSING_DATA_KINDS(2048i32);
165pub const COREWEBVIEW2_BROWSING_DATA_KINDS_SERVICE_WORKERS: COREWEBVIEW2_BROWSING_DATA_KINDS =
166 COREWEBVIEW2_BROWSING_DATA_KINDS(32768i32);
167pub const COREWEBVIEW2_BROWSING_DATA_KINDS_SETTINGS: COREWEBVIEW2_BROWSING_DATA_KINDS =
168 COREWEBVIEW2_BROWSING_DATA_KINDS(8192i32);
169pub const COREWEBVIEW2_BROWSING_DATA_KINDS_WEB_SQL: COREWEBVIEW2_BROWSING_DATA_KINDS =
170 COREWEBVIEW2_BROWSING_DATA_KINDS(8i32);
171#[repr(transparent)]
172#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
173pub struct COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(pub i32);
174pub const COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_JPEG:
175 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT = COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(1i32);
176pub const COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT_PNG: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT =
177 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT(0i32);
178#[repr(transparent)]
179#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
180pub struct COREWEBVIEW2_CHANNEL_SEARCH_KIND(pub i32);
181pub const COREWEBVIEW2_CHANNEL_SEARCH_KIND_LEAST_STABLE: COREWEBVIEW2_CHANNEL_SEARCH_KIND =
182 COREWEBVIEW2_CHANNEL_SEARCH_KIND(1i32);
183pub const COREWEBVIEW2_CHANNEL_SEARCH_KIND_MOST_STABLE: COREWEBVIEW2_CHANNEL_SEARCH_KIND =
184 COREWEBVIEW2_CHANNEL_SEARCH_KIND(0i32);
185#[repr(transparent)]
186#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
187pub struct COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(pub i32);
188pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_OTHER: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
189 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(2i32);
190pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_PIN: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
191 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(1i32);
192pub const COREWEBVIEW2_CLIENT_CERTIFICATE_KIND_SMART_CARD: COREWEBVIEW2_CLIENT_CERTIFICATE_KIND =
193 COREWEBVIEW2_CLIENT_CERTIFICATE_KIND(0i32);
194#[repr(C)]
195#[derive(Clone, Copy, Debug, PartialEq)]
196pub struct COREWEBVIEW2_COLOR {
197 pub A: u8,
198 pub R: u8,
199 pub G: u8,
200 pub B: u8,
201}
202impl Default for COREWEBVIEW2_COLOR {
203 fn default() -> Self {
204 unsafe { core::mem::zeroed() }
205 }
206}
207#[repr(transparent)]
208#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
209pub struct COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(pub i32);
210pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_CHECK_BOX: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
211 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(1i32);
212pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_COMMAND: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
213 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(0i32);
214pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_RADIO: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
215 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(2i32);
216pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SEPARATOR: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
217 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(3i32);
218pub const COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND_SUBMENU: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND =
219 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND(4i32);
220#[repr(transparent)]
221#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
222pub struct COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(pub i32);
223pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_AUDIO: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
224 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(3i32);
225pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_IMAGE: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
226 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(1i32);
227pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_PAGE: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
228 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(0i32);
229pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_SELECTED_TEXT:
230 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND = COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(2i32);
231pub const COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND_VIDEO: COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND =
232 COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND(4i32);
233#[repr(transparent)]
234#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
235pub struct COREWEBVIEW2_COOKIE_SAME_SITE_KIND(pub i32);
236pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_LAX: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
237 COREWEBVIEW2_COOKIE_SAME_SITE_KIND(1i32);
238pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_NONE: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
239 COREWEBVIEW2_COOKIE_SAME_SITE_KIND(0i32);
240pub const COREWEBVIEW2_COOKIE_SAME_SITE_KIND_STRICT: COREWEBVIEW2_COOKIE_SAME_SITE_KIND =
241 COREWEBVIEW2_COOKIE_SAME_SITE_KIND(2i32);
242#[repr(transparent)]
243#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
244pub struct COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(pub i32);
245pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_LEFT:
246 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
247 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(2i32);
248pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_BOTTOM_RIGHT:
249 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
250 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(3i32);
251pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_LEFT:
252 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
253 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(0i32);
254pub const COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT_TOP_RIGHT:
255 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT =
256 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT(1i32);
257#[repr(transparent)]
258#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
259pub struct COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(pub i32);
260pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_DOWNLOAD_PROCESS_CRASHED:
261 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(29i32);
262pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_ACCESS_DENIED:
263 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(2i32);
264pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_BLOCKED_BY_POLICY:
265 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(8i32);
266pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_FAILED:
267 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(1i32);
268pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_HASH_MISMATCH:
269 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(11i32);
270pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_MALICIOUS:
271 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(6i32);
272pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NAME_TOO_LONG:
273 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(4i32);
274pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_NO_SPACE:
275 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(3i32);
276pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED:
277 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(9i32);
278pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_LARGE:
279 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(5i32);
280pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TOO_SHORT:
281 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(10i32);
282pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_FILE_TRANSIENT_ERROR:
283 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(7i32);
284pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_DISCONNECTED:
285 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(14i32);
286pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED:
287 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(12i32);
288pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_INVALID_REQUEST:
289 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(16i32);
290pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_SERVER_DOWN:
291 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(15i32);
292pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NETWORK_TIMEOUT:
293 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(13i32);
294pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_NONE: COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON =
295 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(0i32);
296pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_BAD_CONTENT:
297 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(19i32);
298pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CERTIFICATE_PROBLEM:
299 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(21i32);
300pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CONTENT_LENGTH_MISMATCH:
301 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(24i32);
302pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_CROSS_ORIGIN_REDIRECT:
303 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(25i32);
304pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED:
305 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(17i32);
306pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_FORBIDDEN:
307 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(22i32);
308pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_NO_RANGE:
309 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(18i32);
310pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNAUTHORIZED:
311 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(20i32);
312pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_SERVER_UNEXPECTED_RESPONSE:
313 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(23i32);
314pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_CANCELED:
315 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(26i32);
316pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_PAUSED:
317 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(28i32);
318pub const COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON_USER_SHUTDOWN:
319 COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON = COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON(27i32);
320#[repr(transparent)]
321#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
322pub struct COREWEBVIEW2_DOWNLOAD_STATE(pub i32);
323pub const COREWEBVIEW2_DOWNLOAD_STATE_COMPLETED: COREWEBVIEW2_DOWNLOAD_STATE =
324 COREWEBVIEW2_DOWNLOAD_STATE(2i32);
325pub const COREWEBVIEW2_DOWNLOAD_STATE_INTERRUPTED: COREWEBVIEW2_DOWNLOAD_STATE =
326 COREWEBVIEW2_DOWNLOAD_STATE(1i32);
327pub const COREWEBVIEW2_DOWNLOAD_STATE_IN_PROGRESS: COREWEBVIEW2_DOWNLOAD_STATE =
328 COREWEBVIEW2_DOWNLOAD_STATE(0i32);
329#[repr(transparent)]
330#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
331pub struct COREWEBVIEW2_FAVICON_IMAGE_FORMAT(pub i32);
332pub const COREWEBVIEW2_FAVICON_IMAGE_FORMAT_JPEG: COREWEBVIEW2_FAVICON_IMAGE_FORMAT =
333 COREWEBVIEW2_FAVICON_IMAGE_FORMAT(1i32);
334pub const COREWEBVIEW2_FAVICON_IMAGE_FORMAT_PNG: COREWEBVIEW2_FAVICON_IMAGE_FORMAT =
335 COREWEBVIEW2_FAVICON_IMAGE_FORMAT(0i32);
336#[repr(transparent)]
337#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
338pub struct COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND(pub i32);
339pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND_DIRECTORY: COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND =
340 COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND(1i32);
341pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND_FILE: COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND =
342 COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND(0i32);
343#[repr(transparent)]
344#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
345pub struct COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION(pub i32);
346pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION_READ_ONLY:
347 COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION = COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION(0i32);
348pub const COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION_READ_WRITE:
349 COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION = COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION(1i32);
350#[repr(transparent)]
351#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
352pub struct COREWEBVIEW2_FRAME_KIND(pub i32);
353pub const COREWEBVIEW2_FRAME_KIND_EMBED: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(3i32);
354pub const COREWEBVIEW2_FRAME_KIND_IFRAME: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(2i32);
355pub const COREWEBVIEW2_FRAME_KIND_MAIN_FRAME: COREWEBVIEW2_FRAME_KIND =
356 COREWEBVIEW2_FRAME_KIND(1i32);
357pub const COREWEBVIEW2_FRAME_KIND_OBJECT: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(4i32);
358pub const COREWEBVIEW2_FRAME_KIND_UNKNOWN: COREWEBVIEW2_FRAME_KIND = COREWEBVIEW2_FRAME_KIND(0i32);
359#[repr(transparent)]
360#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
361pub struct COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(pub i32);
362pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_ALLOW: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
363 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(1i32);
364pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
365 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(0i32);
366pub const COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND_DENY_CORS: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND =
367 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND(2i32);
368#[repr(transparent)]
369#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
370pub struct COREWEBVIEW2_KEY_EVENT_KIND(pub i32);
371pub const COREWEBVIEW2_KEY_EVENT_KIND_KEY_DOWN: COREWEBVIEW2_KEY_EVENT_KIND =
372 COREWEBVIEW2_KEY_EVENT_KIND(0i32);
373pub const COREWEBVIEW2_KEY_EVENT_KIND_KEY_UP: COREWEBVIEW2_KEY_EVENT_KIND =
374 COREWEBVIEW2_KEY_EVENT_KIND(1i32);
375pub const COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_DOWN: COREWEBVIEW2_KEY_EVENT_KIND =
376 COREWEBVIEW2_KEY_EVENT_KIND(2i32);
377pub const COREWEBVIEW2_KEY_EVENT_KIND_SYSTEM_KEY_UP: COREWEBVIEW2_KEY_EVENT_KIND =
378 COREWEBVIEW2_KEY_EVENT_KIND(3i32);
379#[repr(transparent)]
380#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
381pub struct COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL(pub i32);
382pub const COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_LOW: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL =
383 COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL(1i32);
384pub const COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL_NORMAL: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL =
385 COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL(0i32);
386#[repr(transparent)]
387#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
388pub struct COREWEBVIEW2_MOUSE_EVENT_KIND(pub i32);
389pub const COREWEBVIEW2_MOUSE_EVENT_KIND_HORIZONTAL_WHEEL: COREWEBVIEW2_MOUSE_EVENT_KIND =
390 COREWEBVIEW2_MOUSE_EVENT_KIND(526i32);
391pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEAVE: COREWEBVIEW2_MOUSE_EVENT_KIND =
392 COREWEBVIEW2_MOUSE_EVENT_KIND(675i32);
393pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
394 COREWEBVIEW2_MOUSE_EVENT_KIND(515i32);
395pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
396 COREWEBVIEW2_MOUSE_EVENT_KIND(513i32);
397pub const COREWEBVIEW2_MOUSE_EVENT_KIND_LEFT_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
398 COREWEBVIEW2_MOUSE_EVENT_KIND(514i32);
399pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
400 COREWEBVIEW2_MOUSE_EVENT_KIND(521i32);
401pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
402 COREWEBVIEW2_MOUSE_EVENT_KIND(519i32);
403pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MIDDLE_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
404 COREWEBVIEW2_MOUSE_EVENT_KIND(520i32);
405pub const COREWEBVIEW2_MOUSE_EVENT_KIND_MOVE: COREWEBVIEW2_MOUSE_EVENT_KIND =
406 COREWEBVIEW2_MOUSE_EVENT_KIND(512i32);
407pub const COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_DOWN:
408 COREWEBVIEW2_MOUSE_EVENT_KIND = COREWEBVIEW2_MOUSE_EVENT_KIND(164i32);
409pub const COREWEBVIEW2_MOUSE_EVENT_KIND_NON_CLIENT_RIGHT_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
410 COREWEBVIEW2_MOUSE_EVENT_KIND(165i32);
411pub const COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
412 COREWEBVIEW2_MOUSE_EVENT_KIND(518i32);
413pub const COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
414 COREWEBVIEW2_MOUSE_EVENT_KIND(516i32);
415pub const COREWEBVIEW2_MOUSE_EVENT_KIND_RIGHT_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
416 COREWEBVIEW2_MOUSE_EVENT_KIND(517i32);
417pub const COREWEBVIEW2_MOUSE_EVENT_KIND_WHEEL: COREWEBVIEW2_MOUSE_EVENT_KIND =
418 COREWEBVIEW2_MOUSE_EVENT_KIND(522i32);
419pub const COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOUBLE_CLICK: COREWEBVIEW2_MOUSE_EVENT_KIND =
420 COREWEBVIEW2_MOUSE_EVENT_KIND(525i32);
421pub const COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_DOWN: COREWEBVIEW2_MOUSE_EVENT_KIND =
422 COREWEBVIEW2_MOUSE_EVENT_KIND(523i32);
423pub const COREWEBVIEW2_MOUSE_EVENT_KIND_X_BUTTON_UP: COREWEBVIEW2_MOUSE_EVENT_KIND =
424 COREWEBVIEW2_MOUSE_EVENT_KIND(524i32);
425#[repr(transparent)]
426#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
427pub struct COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(pub i32);
428impl COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
429 pub const fn contains(&self, other: Self) -> bool {
430 self.0 & other.0 == other.0
431 }
432}
433impl core::ops::BitOr for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
434 type Output = Self;
435 fn bitor(self, other: Self) -> Self {
436 Self(self.0 | other.0)
437 }
438}
439impl core::ops::BitAnd for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
440 type Output = Self;
441 fn bitand(self, other: Self) -> Self {
442 Self(self.0 & other.0)
443 }
444}
445impl core::ops::BitOrAssign for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
446 fn bitor_assign(&mut self, other: Self) {
447 self.0.bitor_assign(other.0)
448 }
449}
450impl core::ops::BitAndAssign for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
451 fn bitand_assign(&mut self, other: Self) {
452 self.0.bitand_assign(other.0)
453 }
454}
455impl core::ops::Not for COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS {
456 type Output = Self;
457 fn not(self) -> Self {
458 Self(self.0.not())
459 }
460}
461pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_CONTROL: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
462 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(8i32);
463pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_LEFT_BUTTON: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
464 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(1i32);
465pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_MIDDLE_BUTTON:
466 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS = COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(16i32);
467pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_NONE: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
468 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(0i32);
469pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_RIGHT_BUTTON:
470 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS = COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(2i32);
471pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_SHIFT: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
472 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(4i32);
473pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON1: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
474 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(32i32);
475pub const COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS_X_BUTTON2: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS =
476 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS(64i32);
477#[repr(transparent)]
478#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
479pub struct COREWEBVIEW2_MOVE_FOCUS_REASON(pub i32);
480pub const COREWEBVIEW2_MOVE_FOCUS_REASON_NEXT: COREWEBVIEW2_MOVE_FOCUS_REASON =
481 COREWEBVIEW2_MOVE_FOCUS_REASON(1i32);
482pub const COREWEBVIEW2_MOVE_FOCUS_REASON_PREVIOUS: COREWEBVIEW2_MOVE_FOCUS_REASON =
483 COREWEBVIEW2_MOVE_FOCUS_REASON(2i32);
484pub const COREWEBVIEW2_MOVE_FOCUS_REASON_PROGRAMMATIC: COREWEBVIEW2_MOVE_FOCUS_REASON =
485 COREWEBVIEW2_MOVE_FOCUS_REASON(0i32);
486#[repr(transparent)]
487#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
488pub struct COREWEBVIEW2_NAVIGATION_KIND(pub i32);
489pub const COREWEBVIEW2_NAVIGATION_KIND_BACK_OR_FORWARD: COREWEBVIEW2_NAVIGATION_KIND =
490 COREWEBVIEW2_NAVIGATION_KIND(1i32);
491pub const COREWEBVIEW2_NAVIGATION_KIND_NEW_DOCUMENT: COREWEBVIEW2_NAVIGATION_KIND =
492 COREWEBVIEW2_NAVIGATION_KIND(2i32);
493pub const COREWEBVIEW2_NAVIGATION_KIND_RELOAD: COREWEBVIEW2_NAVIGATION_KIND =
494 COREWEBVIEW2_NAVIGATION_KIND(0i32);
495#[repr(transparent)]
496#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
497pub struct COREWEBVIEW2_NON_CLIENT_REGION_KIND(pub i32);
498pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_CAPTION: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
499 COREWEBVIEW2_NON_CLIENT_REGION_KIND(2i32);
500pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_CLIENT: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
501 COREWEBVIEW2_NON_CLIENT_REGION_KIND(1i32);
502pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_CLOSE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
503 COREWEBVIEW2_NON_CLIENT_REGION_KIND(20i32);
504pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_MAXIMIZE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
505 COREWEBVIEW2_NON_CLIENT_REGION_KIND(9i32);
506pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_MINIMIZE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
507 COREWEBVIEW2_NON_CLIENT_REGION_KIND(8i32);
508pub const COREWEBVIEW2_NON_CLIENT_REGION_KIND_NOWHERE: COREWEBVIEW2_NON_CLIENT_REGION_KIND =
509 COREWEBVIEW2_NON_CLIENT_REGION_KIND(0i32);
510#[repr(transparent)]
511#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
512pub struct COREWEBVIEW2_PDF_TOOLBAR_ITEMS(pub i32);
513impl COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
514 pub const fn contains(&self, other: Self) -> bool {
515 self.0 & other.0 == other.0
516 }
517}
518impl core::ops::BitOr for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
519 type Output = Self;
520 fn bitor(self, other: Self) -> Self {
521 Self(self.0 | other.0)
522 }
523}
524impl core::ops::BitAnd for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
525 type Output = Self;
526 fn bitand(self, other: Self) -> Self {
527 Self(self.0 & other.0)
528 }
529}
530impl core::ops::BitOrAssign for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
531 fn bitor_assign(&mut self, other: Self) {
532 self.0.bitor_assign(other.0)
533 }
534}
535impl core::ops::BitAndAssign for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
536 fn bitand_assign(&mut self, other: Self) {
537 self.0.bitand_assign(other.0)
538 }
539}
540impl core::ops::Not for COREWEBVIEW2_PDF_TOOLBAR_ITEMS {
541 type Output = Self;
542 fn not(self) -> Self {
543 Self(self.0.not())
544 }
545}
546pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_BOOKMARKS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
547 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(256i32);
548pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FIT_PAGE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
549 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(64i32);
550pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_FULL_SCREEN: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
551 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(2048i32);
552pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_MORE_SETTINGS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
553 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(4096i32);
554pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_NONE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
555 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(0i32);
556pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_LAYOUT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
557 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(128i32);
558pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PAGE_SELECTOR: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
559 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(512i32);
560pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_PRINT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
561 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(2i32);
562pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ROTATE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
563 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(32i32);
564pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
565 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(1i32);
566pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SAVE_AS: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
567 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(4i32);
568pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_SEARCH: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
569 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(1024i32);
570pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_IN: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
571 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(8i32);
572pub const COREWEBVIEW2_PDF_TOOLBAR_ITEMS_ZOOM_OUT: COREWEBVIEW2_PDF_TOOLBAR_ITEMS =
573 COREWEBVIEW2_PDF_TOOLBAR_ITEMS(16i32);
574#[repr(transparent)]
575#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
576pub struct COREWEBVIEW2_PERMISSION_KIND(pub i32);
577pub const COREWEBVIEW2_PERMISSION_KIND_AUTOPLAY: COREWEBVIEW2_PERMISSION_KIND =
578 COREWEBVIEW2_PERMISSION_KIND(9i32);
579pub const COREWEBVIEW2_PERMISSION_KIND_CAMERA: COREWEBVIEW2_PERMISSION_KIND =
580 COREWEBVIEW2_PERMISSION_KIND(2i32);
581pub const COREWEBVIEW2_PERMISSION_KIND_CLIPBOARD_READ: COREWEBVIEW2_PERMISSION_KIND =
582 COREWEBVIEW2_PERMISSION_KIND(6i32);
583pub const COREWEBVIEW2_PERMISSION_KIND_FILE_READ_WRITE: COREWEBVIEW2_PERMISSION_KIND =
584 COREWEBVIEW2_PERMISSION_KIND(8i32);
585pub const COREWEBVIEW2_PERMISSION_KIND_GEOLOCATION: COREWEBVIEW2_PERMISSION_KIND =
586 COREWEBVIEW2_PERMISSION_KIND(3i32);
587pub const COREWEBVIEW2_PERMISSION_KIND_LOCAL_FONTS: COREWEBVIEW2_PERMISSION_KIND =
588 COREWEBVIEW2_PERMISSION_KIND(10i32);
589pub const COREWEBVIEW2_PERMISSION_KIND_MICROPHONE: COREWEBVIEW2_PERMISSION_KIND =
590 COREWEBVIEW2_PERMISSION_KIND(1i32);
591pub const COREWEBVIEW2_PERMISSION_KIND_MIDI_SYSTEM_EXCLUSIVE_MESSAGES:
592 COREWEBVIEW2_PERMISSION_KIND = COREWEBVIEW2_PERMISSION_KIND(11i32);
593pub const COREWEBVIEW2_PERMISSION_KIND_MULTIPLE_AUTOMATIC_DOWNLOADS: COREWEBVIEW2_PERMISSION_KIND =
594 COREWEBVIEW2_PERMISSION_KIND(7i32);
595pub const COREWEBVIEW2_PERMISSION_KIND_NOTIFICATIONS: COREWEBVIEW2_PERMISSION_KIND =
596 COREWEBVIEW2_PERMISSION_KIND(4i32);
597pub const COREWEBVIEW2_PERMISSION_KIND_OTHER_SENSORS: COREWEBVIEW2_PERMISSION_KIND =
598 COREWEBVIEW2_PERMISSION_KIND(5i32);
599pub const COREWEBVIEW2_PERMISSION_KIND_UNKNOWN_PERMISSION: COREWEBVIEW2_PERMISSION_KIND =
600 COREWEBVIEW2_PERMISSION_KIND(0i32);
601pub const COREWEBVIEW2_PERMISSION_KIND_WINDOW_MANAGEMENT: COREWEBVIEW2_PERMISSION_KIND =
602 COREWEBVIEW2_PERMISSION_KIND(12i32);
603#[repr(transparent)]
604#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
605pub struct COREWEBVIEW2_PERMISSION_STATE(pub i32);
606pub const COREWEBVIEW2_PERMISSION_STATE_ALLOW: COREWEBVIEW2_PERMISSION_STATE =
607 COREWEBVIEW2_PERMISSION_STATE(1i32);
608pub const COREWEBVIEW2_PERMISSION_STATE_DEFAULT: COREWEBVIEW2_PERMISSION_STATE =
609 COREWEBVIEW2_PERMISSION_STATE(0i32);
610pub const COREWEBVIEW2_PERMISSION_STATE_DENY: COREWEBVIEW2_PERMISSION_STATE =
611 COREWEBVIEW2_PERMISSION_STATE(2i32);
612#[repr(C)]
613#[derive(Clone, Copy, Debug, PartialEq)]
614pub struct COREWEBVIEW2_PHYSICAL_KEY_STATUS {
615 pub RepeatCount: u32,
616 pub ScanCode: u32,
617 pub IsExtendedKey: windows_core::BOOL,
618 pub IsMenuKeyDown: windows_core::BOOL,
619 pub WasKeyDown: windows_core::BOOL,
620 pub IsKeyReleased: windows_core::BOOL,
621}
622impl Default for COREWEBVIEW2_PHYSICAL_KEY_STATUS {
623 fn default() -> Self {
624 unsafe { core::mem::zeroed() }
625 }
626}
627#[repr(transparent)]
628#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
629pub struct COREWEBVIEW2_POINTER_EVENT_KIND(pub i32);
630pub const COREWEBVIEW2_POINTER_EVENT_KIND_ACTIVATE: COREWEBVIEW2_POINTER_EVENT_KIND =
631 COREWEBVIEW2_POINTER_EVENT_KIND(587i32);
632pub const COREWEBVIEW2_POINTER_EVENT_KIND_DOWN: COREWEBVIEW2_POINTER_EVENT_KIND =
633 COREWEBVIEW2_POINTER_EVENT_KIND(582i32);
634pub const COREWEBVIEW2_POINTER_EVENT_KIND_ENTER: COREWEBVIEW2_POINTER_EVENT_KIND =
635 COREWEBVIEW2_POINTER_EVENT_KIND(585i32);
636pub const COREWEBVIEW2_POINTER_EVENT_KIND_LEAVE: COREWEBVIEW2_POINTER_EVENT_KIND =
637 COREWEBVIEW2_POINTER_EVENT_KIND(586i32);
638pub const COREWEBVIEW2_POINTER_EVENT_KIND_UP: COREWEBVIEW2_POINTER_EVENT_KIND =
639 COREWEBVIEW2_POINTER_EVENT_KIND(583i32);
640pub const COREWEBVIEW2_POINTER_EVENT_KIND_UPDATE: COREWEBVIEW2_POINTER_EVENT_KIND =
641 COREWEBVIEW2_POINTER_EVENT_KIND(581i32);
642#[repr(transparent)]
643#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
644pub struct COREWEBVIEW2_PREFERRED_COLOR_SCHEME(pub i32);
645pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_AUTO: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
646 COREWEBVIEW2_PREFERRED_COLOR_SCHEME(0i32);
647pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_DARK: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
648 COREWEBVIEW2_PREFERRED_COLOR_SCHEME(2i32);
649pub const COREWEBVIEW2_PREFERRED_COLOR_SCHEME_LIGHT: COREWEBVIEW2_PREFERRED_COLOR_SCHEME =
650 COREWEBVIEW2_PREFERRED_COLOR_SCHEME(1i32);
651#[repr(transparent)]
652#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
653pub struct COREWEBVIEW2_PRINT_COLLATION(pub i32);
654pub const COREWEBVIEW2_PRINT_COLLATION_COLLATED: COREWEBVIEW2_PRINT_COLLATION =
655 COREWEBVIEW2_PRINT_COLLATION(1i32);
656pub const COREWEBVIEW2_PRINT_COLLATION_DEFAULT: COREWEBVIEW2_PRINT_COLLATION =
657 COREWEBVIEW2_PRINT_COLLATION(0i32);
658pub const COREWEBVIEW2_PRINT_COLLATION_UNCOLLATED: COREWEBVIEW2_PRINT_COLLATION =
659 COREWEBVIEW2_PRINT_COLLATION(2i32);
660#[repr(transparent)]
661#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
662pub struct COREWEBVIEW2_PRINT_COLOR_MODE(pub i32);
663pub const COREWEBVIEW2_PRINT_COLOR_MODE_COLOR: COREWEBVIEW2_PRINT_COLOR_MODE =
664 COREWEBVIEW2_PRINT_COLOR_MODE(1i32);
665pub const COREWEBVIEW2_PRINT_COLOR_MODE_DEFAULT: COREWEBVIEW2_PRINT_COLOR_MODE =
666 COREWEBVIEW2_PRINT_COLOR_MODE(0i32);
667pub const COREWEBVIEW2_PRINT_COLOR_MODE_GRAYSCALE: COREWEBVIEW2_PRINT_COLOR_MODE =
668 COREWEBVIEW2_PRINT_COLOR_MODE(2i32);
669#[repr(transparent)]
670#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
671pub struct COREWEBVIEW2_PRINT_DIALOG_KIND(pub i32);
672pub const COREWEBVIEW2_PRINT_DIALOG_KIND_BROWSER: COREWEBVIEW2_PRINT_DIALOG_KIND =
673 COREWEBVIEW2_PRINT_DIALOG_KIND(0i32);
674pub const COREWEBVIEW2_PRINT_DIALOG_KIND_SYSTEM: COREWEBVIEW2_PRINT_DIALOG_KIND =
675 COREWEBVIEW2_PRINT_DIALOG_KIND(1i32);
676#[repr(transparent)]
677#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
678pub struct COREWEBVIEW2_PRINT_DUPLEX(pub i32);
679pub const COREWEBVIEW2_PRINT_DUPLEX_DEFAULT: COREWEBVIEW2_PRINT_DUPLEX =
680 COREWEBVIEW2_PRINT_DUPLEX(0i32);
681pub const COREWEBVIEW2_PRINT_DUPLEX_ONE_SIDED: COREWEBVIEW2_PRINT_DUPLEX =
682 COREWEBVIEW2_PRINT_DUPLEX(1i32);
683pub const COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_LONG_EDGE: COREWEBVIEW2_PRINT_DUPLEX =
684 COREWEBVIEW2_PRINT_DUPLEX(2i32);
685pub const COREWEBVIEW2_PRINT_DUPLEX_TWO_SIDED_SHORT_EDGE: COREWEBVIEW2_PRINT_DUPLEX =
686 COREWEBVIEW2_PRINT_DUPLEX(3i32);
687#[repr(transparent)]
688#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
689pub struct COREWEBVIEW2_PRINT_MEDIA_SIZE(pub i32);
690pub const COREWEBVIEW2_PRINT_MEDIA_SIZE_CUSTOM: COREWEBVIEW2_PRINT_MEDIA_SIZE =
691 COREWEBVIEW2_PRINT_MEDIA_SIZE(1i32);
692pub const COREWEBVIEW2_PRINT_MEDIA_SIZE_DEFAULT: COREWEBVIEW2_PRINT_MEDIA_SIZE =
693 COREWEBVIEW2_PRINT_MEDIA_SIZE(0i32);
694#[repr(transparent)]
695#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
696pub struct COREWEBVIEW2_PRINT_ORIENTATION(pub i32);
697pub const COREWEBVIEW2_PRINT_ORIENTATION_LANDSCAPE: COREWEBVIEW2_PRINT_ORIENTATION =
698 COREWEBVIEW2_PRINT_ORIENTATION(1i32);
699pub const COREWEBVIEW2_PRINT_ORIENTATION_PORTRAIT: COREWEBVIEW2_PRINT_ORIENTATION =
700 COREWEBVIEW2_PRINT_ORIENTATION(0i32);
701#[repr(transparent)]
702#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
703pub struct COREWEBVIEW2_PRINT_STATUS(pub i32);
704pub const COREWEBVIEW2_PRINT_STATUS_OTHER_ERROR: COREWEBVIEW2_PRINT_STATUS =
705 COREWEBVIEW2_PRINT_STATUS(2i32);
706pub const COREWEBVIEW2_PRINT_STATUS_PRINTER_UNAVAILABLE: COREWEBVIEW2_PRINT_STATUS =
707 COREWEBVIEW2_PRINT_STATUS(1i32);
708pub const COREWEBVIEW2_PRINT_STATUS_SUCCEEDED: COREWEBVIEW2_PRINT_STATUS =
709 COREWEBVIEW2_PRINT_STATUS(0i32);
710#[repr(transparent)]
711#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
712pub struct COREWEBVIEW2_PROCESS_FAILED_KIND(pub i32);
713pub const COREWEBVIEW2_PROCESS_FAILED_KIND_BROWSER_PROCESS_EXITED:
714 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(0i32);
715pub const COREWEBVIEW2_PROCESS_FAILED_KIND_FRAME_RENDER_PROCESS_EXITED:
716 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(3i32);
717pub const COREWEBVIEW2_PROCESS_FAILED_KIND_GPU_PROCESS_EXITED: COREWEBVIEW2_PROCESS_FAILED_KIND =
718 COREWEBVIEW2_PROCESS_FAILED_KIND(6i32);
719pub const COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_BROKER_PROCESS_EXITED:
720 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(8i32);
721pub const COREWEBVIEW2_PROCESS_FAILED_KIND_PPAPI_PLUGIN_PROCESS_EXITED:
722 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(7i32);
723pub const COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_EXITED: COREWEBVIEW2_PROCESS_FAILED_KIND =
724 COREWEBVIEW2_PROCESS_FAILED_KIND(1i32);
725pub const COREWEBVIEW2_PROCESS_FAILED_KIND_RENDER_PROCESS_UNRESPONSIVE:
726 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(2i32);
727pub const COREWEBVIEW2_PROCESS_FAILED_KIND_SANDBOX_HELPER_PROCESS_EXITED:
728 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(5i32);
729pub const COREWEBVIEW2_PROCESS_FAILED_KIND_UNKNOWN_PROCESS_EXITED:
730 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(9i32);
731pub const COREWEBVIEW2_PROCESS_FAILED_KIND_UTILITY_PROCESS_EXITED:
732 COREWEBVIEW2_PROCESS_FAILED_KIND = COREWEBVIEW2_PROCESS_FAILED_KIND(4i32);
733#[repr(transparent)]
734#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
735pub struct COREWEBVIEW2_PROCESS_FAILED_REASON(pub i32);
736pub const COREWEBVIEW2_PROCESS_FAILED_REASON_CRASHED: COREWEBVIEW2_PROCESS_FAILED_REASON =
737 COREWEBVIEW2_PROCESS_FAILED_REASON(3i32);
738pub const COREWEBVIEW2_PROCESS_FAILED_REASON_LAUNCH_FAILED: COREWEBVIEW2_PROCESS_FAILED_REASON =
739 COREWEBVIEW2_PROCESS_FAILED_REASON(4i32);
740pub const COREWEBVIEW2_PROCESS_FAILED_REASON_OUT_OF_MEMORY: COREWEBVIEW2_PROCESS_FAILED_REASON =
741 COREWEBVIEW2_PROCESS_FAILED_REASON(5i32);
742pub const COREWEBVIEW2_PROCESS_FAILED_REASON_PROFILE_DELETED: COREWEBVIEW2_PROCESS_FAILED_REASON =
743 COREWEBVIEW2_PROCESS_FAILED_REASON(6i32);
744pub const COREWEBVIEW2_PROCESS_FAILED_REASON_TERMINATED: COREWEBVIEW2_PROCESS_FAILED_REASON =
745 COREWEBVIEW2_PROCESS_FAILED_REASON(2i32);
746pub const COREWEBVIEW2_PROCESS_FAILED_REASON_UNEXPECTED: COREWEBVIEW2_PROCESS_FAILED_REASON =
747 COREWEBVIEW2_PROCESS_FAILED_REASON(0i32);
748pub const COREWEBVIEW2_PROCESS_FAILED_REASON_UNRESPONSIVE: COREWEBVIEW2_PROCESS_FAILED_REASON =
749 COREWEBVIEW2_PROCESS_FAILED_REASON(1i32);
750#[repr(transparent)]
751#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
752pub struct COREWEBVIEW2_PROCESS_KIND(pub i32);
753pub const COREWEBVIEW2_PROCESS_KIND_BROWSER: COREWEBVIEW2_PROCESS_KIND =
754 COREWEBVIEW2_PROCESS_KIND(0i32);
755pub const COREWEBVIEW2_PROCESS_KIND_GPU: COREWEBVIEW2_PROCESS_KIND =
756 COREWEBVIEW2_PROCESS_KIND(4i32);
757pub const COREWEBVIEW2_PROCESS_KIND_PPAPI_BROKER: COREWEBVIEW2_PROCESS_KIND =
758 COREWEBVIEW2_PROCESS_KIND(6i32);
759pub const COREWEBVIEW2_PROCESS_KIND_PPAPI_PLUGIN: COREWEBVIEW2_PROCESS_KIND =
760 COREWEBVIEW2_PROCESS_KIND(5i32);
761pub const COREWEBVIEW2_PROCESS_KIND_RENDERER: COREWEBVIEW2_PROCESS_KIND =
762 COREWEBVIEW2_PROCESS_KIND(1i32);
763pub const COREWEBVIEW2_PROCESS_KIND_SANDBOX_HELPER: COREWEBVIEW2_PROCESS_KIND =
764 COREWEBVIEW2_PROCESS_KIND(3i32);
765pub const COREWEBVIEW2_PROCESS_KIND_UTILITY: COREWEBVIEW2_PROCESS_KIND =
766 COREWEBVIEW2_PROCESS_KIND(2i32);
767#[repr(transparent)]
768#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
769pub struct COREWEBVIEW2_RELEASE_CHANNELS(pub i32);
770impl COREWEBVIEW2_RELEASE_CHANNELS {
771 pub const fn contains(&self, other: Self) -> bool {
772 self.0 & other.0 == other.0
773 }
774}
775impl core::ops::BitOr for COREWEBVIEW2_RELEASE_CHANNELS {
776 type Output = Self;
777 fn bitor(self, other: Self) -> Self {
778 Self(self.0 | other.0)
779 }
780}
781impl core::ops::BitAnd for COREWEBVIEW2_RELEASE_CHANNELS {
782 type Output = Self;
783 fn bitand(self, other: Self) -> Self {
784 Self(self.0 & other.0)
785 }
786}
787impl core::ops::BitOrAssign for COREWEBVIEW2_RELEASE_CHANNELS {
788 fn bitor_assign(&mut self, other: Self) {
789 self.0.bitor_assign(other.0)
790 }
791}
792impl core::ops::BitAndAssign for COREWEBVIEW2_RELEASE_CHANNELS {
793 fn bitand_assign(&mut self, other: Self) {
794 self.0.bitand_assign(other.0)
795 }
796}
797impl core::ops::Not for COREWEBVIEW2_RELEASE_CHANNELS {
798 type Output = Self;
799 fn not(self) -> Self {
800 Self(self.0.not())
801 }
802}
803pub const COREWEBVIEW2_RELEASE_CHANNELS_BETA: COREWEBVIEW2_RELEASE_CHANNELS =
804 COREWEBVIEW2_RELEASE_CHANNELS(2i32);
805pub const COREWEBVIEW2_RELEASE_CHANNELS_CANARY: COREWEBVIEW2_RELEASE_CHANNELS =
806 COREWEBVIEW2_RELEASE_CHANNELS(8i32);
807pub const COREWEBVIEW2_RELEASE_CHANNELS_DEV: COREWEBVIEW2_RELEASE_CHANNELS =
808 COREWEBVIEW2_RELEASE_CHANNELS(4i32);
809pub const COREWEBVIEW2_RELEASE_CHANNELS_NONE: COREWEBVIEW2_RELEASE_CHANNELS =
810 COREWEBVIEW2_RELEASE_CHANNELS(0i32);
811pub const COREWEBVIEW2_RELEASE_CHANNELS_STABLE: COREWEBVIEW2_RELEASE_CHANNELS =
812 COREWEBVIEW2_RELEASE_CHANNELS(1i32);
813#[repr(transparent)]
814#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
815pub struct COREWEBVIEW2_SAVE_AS_KIND(pub i32);
816pub const COREWEBVIEW2_SAVE_AS_KIND_COMPLETE: COREWEBVIEW2_SAVE_AS_KIND =
817 COREWEBVIEW2_SAVE_AS_KIND(3i32);
818pub const COREWEBVIEW2_SAVE_AS_KIND_DEFAULT: COREWEBVIEW2_SAVE_AS_KIND =
819 COREWEBVIEW2_SAVE_AS_KIND(0i32);
820pub const COREWEBVIEW2_SAVE_AS_KIND_HTML_ONLY: COREWEBVIEW2_SAVE_AS_KIND =
821 COREWEBVIEW2_SAVE_AS_KIND(1i32);
822pub const COREWEBVIEW2_SAVE_AS_KIND_SINGLE_FILE: COREWEBVIEW2_SAVE_AS_KIND =
823 COREWEBVIEW2_SAVE_AS_KIND(2i32);
824#[repr(transparent)]
825#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
826pub struct COREWEBVIEW2_SAVE_AS_UI_RESULT(pub i32);
827pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_CANCELLED: COREWEBVIEW2_SAVE_AS_UI_RESULT =
828 COREWEBVIEW2_SAVE_AS_UI_RESULT(4i32);
829pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_FILE_ALREADY_EXISTS: COREWEBVIEW2_SAVE_AS_UI_RESULT =
830 COREWEBVIEW2_SAVE_AS_UI_RESULT(2i32);
831pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_INVALID_PATH: COREWEBVIEW2_SAVE_AS_UI_RESULT =
832 COREWEBVIEW2_SAVE_AS_UI_RESULT(1i32);
833pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_KIND_NOT_SUPPORTED: COREWEBVIEW2_SAVE_AS_UI_RESULT =
834 COREWEBVIEW2_SAVE_AS_UI_RESULT(3i32);
835pub const COREWEBVIEW2_SAVE_AS_UI_RESULT_SUCCESS: COREWEBVIEW2_SAVE_AS_UI_RESULT =
836 COREWEBVIEW2_SAVE_AS_UI_RESULT(0i32);
837#[repr(transparent)]
838#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
839pub struct COREWEBVIEW2_SCRIPT_DIALOG_KIND(pub i32);
840pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_ALERT: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
841 COREWEBVIEW2_SCRIPT_DIALOG_KIND(0i32);
842pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_BEFOREUNLOAD: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
843 COREWEBVIEW2_SCRIPT_DIALOG_KIND(3i32);
844pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_CONFIRM: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
845 COREWEBVIEW2_SCRIPT_DIALOG_KIND(1i32);
846pub const COREWEBVIEW2_SCRIPT_DIALOG_KIND_PROMPT: COREWEBVIEW2_SCRIPT_DIALOG_KIND =
847 COREWEBVIEW2_SCRIPT_DIALOG_KIND(2i32);
848#[repr(transparent)]
849#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
850pub struct COREWEBVIEW2_SCROLLBAR_STYLE(pub i32);
851pub const COREWEBVIEW2_SCROLLBAR_STYLE_DEFAULT: COREWEBVIEW2_SCROLLBAR_STYLE =
852 COREWEBVIEW2_SCROLLBAR_STYLE(0i32);
853pub const COREWEBVIEW2_SCROLLBAR_STYLE_FLUENT_OVERLAY: COREWEBVIEW2_SCROLLBAR_STYLE =
854 COREWEBVIEW2_SCROLLBAR_STYLE(1i32);
855#[repr(transparent)]
856#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
857pub struct COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(pub i32);
858pub const COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_ALWAYS_ALLOW:
859 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION =
860 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(0i32);
861pub const COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_CANCEL:
862 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION =
863 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(1i32);
864pub const COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION_DEFAULT:
865 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION =
866 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION(2i32);
867#[repr(transparent)]
868#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
869pub struct COREWEBVIEW2_SHARED_BUFFER_ACCESS(pub i32);
870pub const COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_ONLY: COREWEBVIEW2_SHARED_BUFFER_ACCESS =
871 COREWEBVIEW2_SHARED_BUFFER_ACCESS(0i32);
872pub const COREWEBVIEW2_SHARED_BUFFER_ACCESS_READ_WRITE: COREWEBVIEW2_SHARED_BUFFER_ACCESS =
873 COREWEBVIEW2_SHARED_BUFFER_ACCESS(1i32);
874#[repr(transparent)]
875#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
876pub struct COREWEBVIEW2_TEXT_DIRECTION_KIND(pub i32);
877pub const COREWEBVIEW2_TEXT_DIRECTION_KIND_DEFAULT: COREWEBVIEW2_TEXT_DIRECTION_KIND =
878 COREWEBVIEW2_TEXT_DIRECTION_KIND(0i32);
879pub const COREWEBVIEW2_TEXT_DIRECTION_KIND_LEFT_TO_RIGHT: COREWEBVIEW2_TEXT_DIRECTION_KIND =
880 COREWEBVIEW2_TEXT_DIRECTION_KIND(1i32);
881pub const COREWEBVIEW2_TEXT_DIRECTION_KIND_RIGHT_TO_LEFT: COREWEBVIEW2_TEXT_DIRECTION_KIND =
882 COREWEBVIEW2_TEXT_DIRECTION_KIND(2i32);
883#[repr(transparent)]
884#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
885pub struct COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(pub i32);
886pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BALANCED: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
887 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(2i32);
888pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_BASIC: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
889 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(1i32);
890pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_NONE: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
891 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(0i32);
892pub const COREWEBVIEW2_TRACKING_PREVENTION_LEVEL_STRICT: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL =
893 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL(3i32);
894#[repr(transparent)]
895#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
896pub struct COREWEBVIEW2_WEB_ERROR_STATUS(pub i32);
897pub const COREWEBVIEW2_WEB_ERROR_STATUS_CANNOT_CONNECT: COREWEBVIEW2_WEB_ERROR_STATUS =
898 COREWEBVIEW2_WEB_ERROR_STATUS(12i32);
899pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_COMMON_NAME_IS_INCORRECT:
900 COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(1i32);
901pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_EXPIRED: COREWEBVIEW2_WEB_ERROR_STATUS =
902 COREWEBVIEW2_WEB_ERROR_STATUS(2i32);
903pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_IS_INVALID: COREWEBVIEW2_WEB_ERROR_STATUS =
904 COREWEBVIEW2_WEB_ERROR_STATUS(5i32);
905pub const COREWEBVIEW2_WEB_ERROR_STATUS_CERTIFICATE_REVOKED: COREWEBVIEW2_WEB_ERROR_STATUS =
906 COREWEBVIEW2_WEB_ERROR_STATUS(4i32);
907pub const COREWEBVIEW2_WEB_ERROR_STATUS_CLIENT_CERTIFICATE_CONTAINS_ERRORS:
908 COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(3i32);
909pub const COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED: COREWEBVIEW2_WEB_ERROR_STATUS =
910 COREWEBVIEW2_WEB_ERROR_STATUS(9i32);
911pub const COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_RESET: COREWEBVIEW2_WEB_ERROR_STATUS =
912 COREWEBVIEW2_WEB_ERROR_STATUS(10i32);
913pub const COREWEBVIEW2_WEB_ERROR_STATUS_DISCONNECTED: COREWEBVIEW2_WEB_ERROR_STATUS =
914 COREWEBVIEW2_WEB_ERROR_STATUS(11i32);
915pub const COREWEBVIEW2_WEB_ERROR_STATUS_ERROR_HTTP_INVALID_SERVER_RESPONSE:
916 COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(8i32);
917pub const COREWEBVIEW2_WEB_ERROR_STATUS_HOST_NAME_NOT_RESOLVED: COREWEBVIEW2_WEB_ERROR_STATUS =
918 COREWEBVIEW2_WEB_ERROR_STATUS(13i32);
919pub const COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED: COREWEBVIEW2_WEB_ERROR_STATUS =
920 COREWEBVIEW2_WEB_ERROR_STATUS(14i32);
921pub const COREWEBVIEW2_WEB_ERROR_STATUS_REDIRECT_FAILED: COREWEBVIEW2_WEB_ERROR_STATUS =
922 COREWEBVIEW2_WEB_ERROR_STATUS(15i32);
923pub const COREWEBVIEW2_WEB_ERROR_STATUS_SERVER_UNREACHABLE: COREWEBVIEW2_WEB_ERROR_STATUS =
924 COREWEBVIEW2_WEB_ERROR_STATUS(6i32);
925pub const COREWEBVIEW2_WEB_ERROR_STATUS_TIMEOUT: COREWEBVIEW2_WEB_ERROR_STATUS =
926 COREWEBVIEW2_WEB_ERROR_STATUS(7i32);
927pub const COREWEBVIEW2_WEB_ERROR_STATUS_UNEXPECTED_ERROR: COREWEBVIEW2_WEB_ERROR_STATUS =
928 COREWEBVIEW2_WEB_ERROR_STATUS(16i32);
929pub const COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN: COREWEBVIEW2_WEB_ERROR_STATUS =
930 COREWEBVIEW2_WEB_ERROR_STATUS(0i32);
931pub const COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED:
932 COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(17i32);
933pub const COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED:
934 COREWEBVIEW2_WEB_ERROR_STATUS = COREWEBVIEW2_WEB_ERROR_STATUS(18i32);
935#[repr(transparent)]
936#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
937pub struct COREWEBVIEW2_WEB_RESOURCE_CONTEXT(pub i32);
938pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_ALL: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
939 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(0i32);
940pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_CSP_VIOLATION_REPORT:
941 COREWEBVIEW2_WEB_RESOURCE_CONTEXT = COREWEBVIEW2_WEB_RESOURCE_CONTEXT(15i32);
942pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_DOCUMENT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
943 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(1i32);
944pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_EVENT_SOURCE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
945 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(10i32);
946pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FETCH: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
947 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(8i32);
948pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_FONT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
949 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(5i32);
950pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_IMAGE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
951 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(3i32);
952pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MANIFEST: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
953 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(12i32);
954pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_MEDIA: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
955 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(4i32);
956pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_OTHER: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
957 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(16i32);
958pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_PING: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
959 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(14i32);
960pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SCRIPT: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
961 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(6i32);
962pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_SIGNED_EXCHANGE: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
963 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(13i32);
964pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_STYLESHEET: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
965 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(2i32);
966pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_TEXT_TRACK: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
967 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(9i32);
968pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_WEBSOCKET: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
969 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(11i32);
970pub const COREWEBVIEW2_WEB_RESOURCE_CONTEXT_XML_HTTP_REQUEST: COREWEBVIEW2_WEB_RESOURCE_CONTEXT =
971 COREWEBVIEW2_WEB_RESOURCE_CONTEXT(7i32);
972#[repr(transparent)]
973#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
974pub struct COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(pub i32);
975impl COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
976 pub const fn contains(&self, other: Self) -> bool {
977 self.0 & other.0 == other.0
978 }
979}
980impl core::ops::BitOr for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
981 type Output = Self;
982 fn bitor(self, other: Self) -> Self {
983 Self(self.0 | other.0)
984 }
985}
986impl core::ops::BitAnd for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
987 type Output = Self;
988 fn bitand(self, other: Self) -> Self {
989 Self(self.0 & other.0)
990 }
991}
992impl core::ops::BitOrAssign for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
993 fn bitor_assign(&mut self, other: Self) {
994 self.0.bitor_assign(other.0)
995 }
996}
997impl core::ops::BitAndAssign for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
998 fn bitand_assign(&mut self, other: Self) {
999 self.0.bitand_assign(other.0)
1000 }
1001}
1002impl core::ops::Not for COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS {
1003 type Output = Self;
1004 fn not(self) -> Self {
1005 Self(self.0.not())
1006 }
1007}
1008pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_ALL:
1009 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
1010 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(-1i32);
1011pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_DOCUMENT:
1012 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
1013 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(1i32);
1014pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_NONE:
1015 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
1016 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(0i32);
1017pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_SERVICE_WORKER:
1018 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
1019 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(4i32);
1020pub const COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS_SHARED_WORKER:
1021 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS =
1022 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS(2i32);
1023pub const CORE_WEBVIEW_TARGET_PRODUCT_VERSION: windows_core::PCWSTR =
1024 windows_core::w!("131.0.2903.40");
1025windows_core::imp::define_interface!(
1026 ICoreWebView2,
1027 ICoreWebView2_Vtbl,
1028 0x76eceacb_0462_4d94_ac83_423a6793775e
1029);
1030windows_core::imp::interface_hierarchy!(ICoreWebView2, windows_core::IUnknown);
1031impl ICoreWebView2 {
1032 pub unsafe fn Settings(&self) -> windows_core::Result<ICoreWebView2Settings> {
1033 unsafe {
1034 let mut result__ = core::mem::zeroed();
1035 (windows_core::Interface::vtable(self).Settings)(
1036 windows_core::Interface::as_raw(self),
1037 &mut result__,
1038 )
1039 .and_then(|| windows_core::Type::from_abi(result__))
1040 }
1041 }
1042 pub unsafe fn Source(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
1043 unsafe {
1044 (windows_core::Interface::vtable(self).Source)(
1045 windows_core::Interface::as_raw(self),
1046 uri as _,
1047 )
1048 .ok()
1049 }
1050 }
1051 pub unsafe fn Navigate<P0>(&self, uri: P0) -> windows_core::Result<()>
1052 where
1053 P0: windows_core::Param<windows_core::PCWSTR>,
1054 {
1055 unsafe {
1056 (windows_core::Interface::vtable(self).Navigate)(
1057 windows_core::Interface::as_raw(self),
1058 uri.param().abi(),
1059 )
1060 .ok()
1061 }
1062 }
1063 pub unsafe fn NavigateToString<P0>(&self, htmlcontent: P0) -> windows_core::Result<()>
1064 where
1065 P0: windows_core::Param<windows_core::PCWSTR>,
1066 {
1067 unsafe {
1068 (windows_core::Interface::vtable(self).NavigateToString)(
1069 windows_core::Interface::as_raw(self),
1070 htmlcontent.param().abi(),
1071 )
1072 .ok()
1073 }
1074 }
1075 pub unsafe fn add_NavigationStarting<P0>(
1076 &self,
1077 eventhandler: P0,
1078 token: *mut i64,
1079 ) -> windows_core::Result<()>
1080 where
1081 P0: windows_core::Param<ICoreWebView2NavigationStartingEventHandler>,
1082 {
1083 unsafe {
1084 (windows_core::Interface::vtable(self).add_NavigationStarting)(
1085 windows_core::Interface::as_raw(self),
1086 eventhandler.param().abi(),
1087 token as _,
1088 )
1089 .ok()
1090 }
1091 }
1092 pub unsafe fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()> {
1093 unsafe {
1094 (windows_core::Interface::vtable(self).remove_NavigationStarting)(
1095 windows_core::Interface::as_raw(self),
1096 token,
1097 )
1098 .ok()
1099 }
1100 }
1101 pub unsafe fn add_ContentLoading<P0>(
1102 &self,
1103 eventhandler: P0,
1104 token: *mut i64,
1105 ) -> windows_core::Result<()>
1106 where
1107 P0: windows_core::Param<ICoreWebView2ContentLoadingEventHandler>,
1108 {
1109 unsafe {
1110 (windows_core::Interface::vtable(self).add_ContentLoading)(
1111 windows_core::Interface::as_raw(self),
1112 eventhandler.param().abi(),
1113 token as _,
1114 )
1115 .ok()
1116 }
1117 }
1118 pub unsafe fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()> {
1119 unsafe {
1120 (windows_core::Interface::vtable(self).remove_ContentLoading)(
1121 windows_core::Interface::as_raw(self),
1122 token,
1123 )
1124 .ok()
1125 }
1126 }
1127 pub unsafe fn add_SourceChanged<P0>(
1128 &self,
1129 eventhandler: P0,
1130 token: *mut i64,
1131 ) -> windows_core::Result<()>
1132 where
1133 P0: windows_core::Param<ICoreWebView2SourceChangedEventHandler>,
1134 {
1135 unsafe {
1136 (windows_core::Interface::vtable(self).add_SourceChanged)(
1137 windows_core::Interface::as_raw(self),
1138 eventhandler.param().abi(),
1139 token as _,
1140 )
1141 .ok()
1142 }
1143 }
1144 pub unsafe fn remove_SourceChanged(&self, token: i64) -> windows_core::Result<()> {
1145 unsafe {
1146 (windows_core::Interface::vtable(self).remove_SourceChanged)(
1147 windows_core::Interface::as_raw(self),
1148 token,
1149 )
1150 .ok()
1151 }
1152 }
1153 pub unsafe fn add_HistoryChanged<P0>(
1154 &self,
1155 eventhandler: P0,
1156 token: *mut i64,
1157 ) -> windows_core::Result<()>
1158 where
1159 P0: windows_core::Param<ICoreWebView2HistoryChangedEventHandler>,
1160 {
1161 unsafe {
1162 (windows_core::Interface::vtable(self).add_HistoryChanged)(
1163 windows_core::Interface::as_raw(self),
1164 eventhandler.param().abi(),
1165 token as _,
1166 )
1167 .ok()
1168 }
1169 }
1170 pub unsafe fn remove_HistoryChanged(&self, token: i64) -> windows_core::Result<()> {
1171 unsafe {
1172 (windows_core::Interface::vtable(self).remove_HistoryChanged)(
1173 windows_core::Interface::as_raw(self),
1174 token,
1175 )
1176 .ok()
1177 }
1178 }
1179 pub unsafe fn add_NavigationCompleted<P0>(
1180 &self,
1181 eventhandler: P0,
1182 token: *mut i64,
1183 ) -> windows_core::Result<()>
1184 where
1185 P0: windows_core::Param<ICoreWebView2NavigationCompletedEventHandler>,
1186 {
1187 unsafe {
1188 (windows_core::Interface::vtable(self).add_NavigationCompleted)(
1189 windows_core::Interface::as_raw(self),
1190 eventhandler.param().abi(),
1191 token as _,
1192 )
1193 .ok()
1194 }
1195 }
1196 pub unsafe fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()> {
1197 unsafe {
1198 (windows_core::Interface::vtable(self).remove_NavigationCompleted)(
1199 windows_core::Interface::as_raw(self),
1200 token,
1201 )
1202 .ok()
1203 }
1204 }
1205 pub unsafe fn add_FrameNavigationStarting<P0>(
1206 &self,
1207 eventhandler: P0,
1208 token: *mut i64,
1209 ) -> windows_core::Result<()>
1210 where
1211 P0: windows_core::Param<ICoreWebView2NavigationStartingEventHandler>,
1212 {
1213 unsafe {
1214 (windows_core::Interface::vtable(self).add_FrameNavigationStarting)(
1215 windows_core::Interface::as_raw(self),
1216 eventhandler.param().abi(),
1217 token as _,
1218 )
1219 .ok()
1220 }
1221 }
1222 pub unsafe fn remove_FrameNavigationStarting(&self, token: i64) -> windows_core::Result<()> {
1223 unsafe {
1224 (windows_core::Interface::vtable(self).remove_FrameNavigationStarting)(
1225 windows_core::Interface::as_raw(self),
1226 token,
1227 )
1228 .ok()
1229 }
1230 }
1231 pub unsafe fn add_FrameNavigationCompleted<P0>(
1232 &self,
1233 eventhandler: P0,
1234 token: *mut i64,
1235 ) -> windows_core::Result<()>
1236 where
1237 P0: windows_core::Param<ICoreWebView2NavigationCompletedEventHandler>,
1238 {
1239 unsafe {
1240 (windows_core::Interface::vtable(self).add_FrameNavigationCompleted)(
1241 windows_core::Interface::as_raw(self),
1242 eventhandler.param().abi(),
1243 token as _,
1244 )
1245 .ok()
1246 }
1247 }
1248 pub unsafe fn remove_FrameNavigationCompleted(&self, token: i64) -> windows_core::Result<()> {
1249 unsafe {
1250 (windows_core::Interface::vtable(self).remove_FrameNavigationCompleted)(
1251 windows_core::Interface::as_raw(self),
1252 token,
1253 )
1254 .ok()
1255 }
1256 }
1257 pub unsafe fn add_ScriptDialogOpening<P0>(
1258 &self,
1259 eventhandler: P0,
1260 token: *mut i64,
1261 ) -> windows_core::Result<()>
1262 where
1263 P0: windows_core::Param<ICoreWebView2ScriptDialogOpeningEventHandler>,
1264 {
1265 unsafe {
1266 (windows_core::Interface::vtable(self).add_ScriptDialogOpening)(
1267 windows_core::Interface::as_raw(self),
1268 eventhandler.param().abi(),
1269 token as _,
1270 )
1271 .ok()
1272 }
1273 }
1274 pub unsafe fn remove_ScriptDialogOpening(&self, token: i64) -> windows_core::Result<()> {
1275 unsafe {
1276 (windows_core::Interface::vtable(self).remove_ScriptDialogOpening)(
1277 windows_core::Interface::as_raw(self),
1278 token,
1279 )
1280 .ok()
1281 }
1282 }
1283 pub unsafe fn add_PermissionRequested<P0>(
1284 &self,
1285 eventhandler: P0,
1286 token: *mut i64,
1287 ) -> windows_core::Result<()>
1288 where
1289 P0: windows_core::Param<ICoreWebView2PermissionRequestedEventHandler>,
1290 {
1291 unsafe {
1292 (windows_core::Interface::vtable(self).add_PermissionRequested)(
1293 windows_core::Interface::as_raw(self),
1294 eventhandler.param().abi(),
1295 token as _,
1296 )
1297 .ok()
1298 }
1299 }
1300 pub unsafe fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()> {
1301 unsafe {
1302 (windows_core::Interface::vtable(self).remove_PermissionRequested)(
1303 windows_core::Interface::as_raw(self),
1304 token,
1305 )
1306 .ok()
1307 }
1308 }
1309 pub unsafe fn add_ProcessFailed<P0>(
1310 &self,
1311 eventhandler: P0,
1312 token: *mut i64,
1313 ) -> windows_core::Result<()>
1314 where
1315 P0: windows_core::Param<ICoreWebView2ProcessFailedEventHandler>,
1316 {
1317 unsafe {
1318 (windows_core::Interface::vtable(self).add_ProcessFailed)(
1319 windows_core::Interface::as_raw(self),
1320 eventhandler.param().abi(),
1321 token as _,
1322 )
1323 .ok()
1324 }
1325 }
1326 pub unsafe fn remove_ProcessFailed(&self, token: i64) -> windows_core::Result<()> {
1327 unsafe {
1328 (windows_core::Interface::vtable(self).remove_ProcessFailed)(
1329 windows_core::Interface::as_raw(self),
1330 token,
1331 )
1332 .ok()
1333 }
1334 }
1335 pub unsafe fn AddScriptToExecuteOnDocumentCreated<P0, P1>(
1336 &self,
1337 javascript: P0,
1338 handler: P1,
1339 ) -> windows_core::Result<()>
1340 where
1341 P0: windows_core::Param<windows_core::PCWSTR>,
1342 P1: windows_core::Param<ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler>,
1343 {
1344 unsafe {
1345 (windows_core::Interface::vtable(self).AddScriptToExecuteOnDocumentCreated)(
1346 windows_core::Interface::as_raw(self),
1347 javascript.param().abi(),
1348 handler.param().abi(),
1349 )
1350 .ok()
1351 }
1352 }
1353 pub unsafe fn RemoveScriptToExecuteOnDocumentCreated<P0>(
1354 &self,
1355 id: P0,
1356 ) -> windows_core::Result<()>
1357 where
1358 P0: windows_core::Param<windows_core::PCWSTR>,
1359 {
1360 unsafe {
1361 (windows_core::Interface::vtable(self).RemoveScriptToExecuteOnDocumentCreated)(
1362 windows_core::Interface::as_raw(self),
1363 id.param().abi(),
1364 )
1365 .ok()
1366 }
1367 }
1368 pub unsafe fn ExecuteScript<P0, P1>(
1369 &self,
1370 javascript: P0,
1371 handler: P1,
1372 ) -> windows_core::Result<()>
1373 where
1374 P0: windows_core::Param<windows_core::PCWSTR>,
1375 P1: windows_core::Param<ICoreWebView2ExecuteScriptCompletedHandler>,
1376 {
1377 unsafe {
1378 (windows_core::Interface::vtable(self).ExecuteScript)(
1379 windows_core::Interface::as_raw(self),
1380 javascript.param().abi(),
1381 handler.param().abi(),
1382 )
1383 .ok()
1384 }
1385 }
1386 pub unsafe fn CapturePreview<P1, P2>(
1387 &self,
1388 imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
1389 imagestream: P1,
1390 handler: P2,
1391 ) -> windows_core::Result<()>
1392 where
1393 P1: windows_core::Param<windows::Win32::System::Com::IStream>,
1394 P2: windows_core::Param<ICoreWebView2CapturePreviewCompletedHandler>,
1395 {
1396 unsafe {
1397 (windows_core::Interface::vtable(self).CapturePreview)(
1398 windows_core::Interface::as_raw(self),
1399 imageformat,
1400 imagestream.param().abi(),
1401 handler.param().abi(),
1402 )
1403 .ok()
1404 }
1405 }
1406 pub unsafe fn Reload(&self) -> windows_core::Result<()> {
1407 unsafe {
1408 (windows_core::Interface::vtable(self).Reload)(windows_core::Interface::as_raw(self))
1409 .ok()
1410 }
1411 }
1412 pub unsafe fn PostWebMessageAsJson<P0>(&self, webmessageasjson: P0) -> windows_core::Result<()>
1413 where
1414 P0: windows_core::Param<windows_core::PCWSTR>,
1415 {
1416 unsafe {
1417 (windows_core::Interface::vtable(self).PostWebMessageAsJson)(
1418 windows_core::Interface::as_raw(self),
1419 webmessageasjson.param().abi(),
1420 )
1421 .ok()
1422 }
1423 }
1424 pub unsafe fn PostWebMessageAsString<P0>(
1425 &self,
1426 webmessageasstring: P0,
1427 ) -> windows_core::Result<()>
1428 where
1429 P0: windows_core::Param<windows_core::PCWSTR>,
1430 {
1431 unsafe {
1432 (windows_core::Interface::vtable(self).PostWebMessageAsString)(
1433 windows_core::Interface::as_raw(self),
1434 webmessageasstring.param().abi(),
1435 )
1436 .ok()
1437 }
1438 }
1439 pub unsafe fn add_WebMessageReceived<P0>(
1440 &self,
1441 handler: P0,
1442 token: *mut i64,
1443 ) -> windows_core::Result<()>
1444 where
1445 P0: windows_core::Param<ICoreWebView2WebMessageReceivedEventHandler>,
1446 {
1447 unsafe {
1448 (windows_core::Interface::vtable(self).add_WebMessageReceived)(
1449 windows_core::Interface::as_raw(self),
1450 handler.param().abi(),
1451 token as _,
1452 )
1453 .ok()
1454 }
1455 }
1456 pub unsafe fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()> {
1457 unsafe {
1458 (windows_core::Interface::vtable(self).remove_WebMessageReceived)(
1459 windows_core::Interface::as_raw(self),
1460 token,
1461 )
1462 .ok()
1463 }
1464 }
1465 pub unsafe fn CallDevToolsProtocolMethod<P0, P1, P2>(
1466 &self,
1467 methodname: P0,
1468 parametersasjson: P1,
1469 handler: P2,
1470 ) -> windows_core::Result<()>
1471 where
1472 P0: windows_core::Param<windows_core::PCWSTR>,
1473 P1: windows_core::Param<windows_core::PCWSTR>,
1474 P2: windows_core::Param<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
1475 {
1476 unsafe {
1477 (windows_core::Interface::vtable(self).CallDevToolsProtocolMethod)(
1478 windows_core::Interface::as_raw(self),
1479 methodname.param().abi(),
1480 parametersasjson.param().abi(),
1481 handler.param().abi(),
1482 )
1483 .ok()
1484 }
1485 }
1486 pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()> {
1487 unsafe {
1488 (windows_core::Interface::vtable(self).BrowserProcessId)(
1489 windows_core::Interface::as_raw(self),
1490 value as _,
1491 )
1492 .ok()
1493 }
1494 }
1495 pub unsafe fn CanGoBack(&self, cangoback: *mut windows_core::BOOL) -> windows_core::Result<()> {
1496 unsafe {
1497 (windows_core::Interface::vtable(self).CanGoBack)(
1498 windows_core::Interface::as_raw(self),
1499 cangoback as _,
1500 )
1501 .ok()
1502 }
1503 }
1504 pub unsafe fn CanGoForward(
1505 &self,
1506 cangoforward: *mut windows_core::BOOL,
1507 ) -> windows_core::Result<()> {
1508 unsafe {
1509 (windows_core::Interface::vtable(self).CanGoForward)(
1510 windows_core::Interface::as_raw(self),
1511 cangoforward as _,
1512 )
1513 .ok()
1514 }
1515 }
1516 pub unsafe fn GoBack(&self) -> windows_core::Result<()> {
1517 unsafe {
1518 (windows_core::Interface::vtable(self).GoBack)(windows_core::Interface::as_raw(self))
1519 .ok()
1520 }
1521 }
1522 pub unsafe fn GoForward(&self) -> windows_core::Result<()> {
1523 unsafe {
1524 (windows_core::Interface::vtable(self).GoForward)(windows_core::Interface::as_raw(self))
1525 .ok()
1526 }
1527 }
1528 pub unsafe fn GetDevToolsProtocolEventReceiver<P0>(
1529 &self,
1530 eventname: P0,
1531 ) -> windows_core::Result<ICoreWebView2DevToolsProtocolEventReceiver>
1532 where
1533 P0: windows_core::Param<windows_core::PCWSTR>,
1534 {
1535 unsafe {
1536 let mut result__ = core::mem::zeroed();
1537 (windows_core::Interface::vtable(self).GetDevToolsProtocolEventReceiver)(
1538 windows_core::Interface::as_raw(self),
1539 eventname.param().abi(),
1540 &mut result__,
1541 )
1542 .and_then(|| windows_core::Type::from_abi(result__))
1543 }
1544 }
1545 pub unsafe fn Stop(&self) -> windows_core::Result<()> {
1546 unsafe {
1547 (windows_core::Interface::vtable(self).Stop)(windows_core::Interface::as_raw(self)).ok()
1548 }
1549 }
1550 pub unsafe fn add_NewWindowRequested<P0>(
1551 &self,
1552 eventhandler: P0,
1553 token: *mut i64,
1554 ) -> windows_core::Result<()>
1555 where
1556 P0: windows_core::Param<ICoreWebView2NewWindowRequestedEventHandler>,
1557 {
1558 unsafe {
1559 (windows_core::Interface::vtable(self).add_NewWindowRequested)(
1560 windows_core::Interface::as_raw(self),
1561 eventhandler.param().abi(),
1562 token as _,
1563 )
1564 .ok()
1565 }
1566 }
1567 pub unsafe fn remove_NewWindowRequested(&self, token: i64) -> windows_core::Result<()> {
1568 unsafe {
1569 (windows_core::Interface::vtable(self).remove_NewWindowRequested)(
1570 windows_core::Interface::as_raw(self),
1571 token,
1572 )
1573 .ok()
1574 }
1575 }
1576 pub unsafe fn add_DocumentTitleChanged<P0>(
1577 &self,
1578 eventhandler: P0,
1579 token: *mut i64,
1580 ) -> windows_core::Result<()>
1581 where
1582 P0: windows_core::Param<ICoreWebView2DocumentTitleChangedEventHandler>,
1583 {
1584 unsafe {
1585 (windows_core::Interface::vtable(self).add_DocumentTitleChanged)(
1586 windows_core::Interface::as_raw(self),
1587 eventhandler.param().abi(),
1588 token as _,
1589 )
1590 .ok()
1591 }
1592 }
1593 pub unsafe fn remove_DocumentTitleChanged(&self, token: i64) -> windows_core::Result<()> {
1594 unsafe {
1595 (windows_core::Interface::vtable(self).remove_DocumentTitleChanged)(
1596 windows_core::Interface::as_raw(self),
1597 token,
1598 )
1599 .ok()
1600 }
1601 }
1602 pub unsafe fn DocumentTitle(
1603 &self,
1604 title: *mut windows_core::PWSTR,
1605 ) -> windows_core::Result<()> {
1606 unsafe {
1607 (windows_core::Interface::vtable(self).DocumentTitle)(
1608 windows_core::Interface::as_raw(self),
1609 title as _,
1610 )
1611 .ok()
1612 }
1613 }
1614 pub unsafe fn AddHostObjectToScript<P0>(
1615 &self,
1616 name: P0,
1617 object: *mut windows::Win32::System::Variant::VARIANT,
1618 ) -> windows_core::Result<()>
1619 where
1620 P0: windows_core::Param<windows_core::PCWSTR>,
1621 {
1622 unsafe {
1623 (windows_core::Interface::vtable(self).AddHostObjectToScript)(
1624 windows_core::Interface::as_raw(self),
1625 name.param().abi(),
1626 core::mem::transmute(object),
1627 )
1628 .ok()
1629 }
1630 }
1631 pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> windows_core::Result<()>
1632 where
1633 P0: windows_core::Param<windows_core::PCWSTR>,
1634 {
1635 unsafe {
1636 (windows_core::Interface::vtable(self).RemoveHostObjectFromScript)(
1637 windows_core::Interface::as_raw(self),
1638 name.param().abi(),
1639 )
1640 .ok()
1641 }
1642 }
1643 pub unsafe fn OpenDevToolsWindow(&self) -> windows_core::Result<()> {
1644 unsafe {
1645 (windows_core::Interface::vtable(self).OpenDevToolsWindow)(
1646 windows_core::Interface::as_raw(self),
1647 )
1648 .ok()
1649 }
1650 }
1651 pub unsafe fn add_ContainsFullScreenElementChanged<P0>(
1652 &self,
1653 eventhandler: P0,
1654 token: *mut i64,
1655 ) -> windows_core::Result<()>
1656 where
1657 P0: windows_core::Param<ICoreWebView2ContainsFullScreenElementChangedEventHandler>,
1658 {
1659 unsafe {
1660 (windows_core::Interface::vtable(self).add_ContainsFullScreenElementChanged)(
1661 windows_core::Interface::as_raw(self),
1662 eventhandler.param().abi(),
1663 token as _,
1664 )
1665 .ok()
1666 }
1667 }
1668 pub unsafe fn remove_ContainsFullScreenElementChanged(
1669 &self,
1670 token: i64,
1671 ) -> windows_core::Result<()> {
1672 unsafe {
1673 (windows_core::Interface::vtable(self).remove_ContainsFullScreenElementChanged)(
1674 windows_core::Interface::as_raw(self),
1675 token,
1676 )
1677 .ok()
1678 }
1679 }
1680 pub unsafe fn ContainsFullScreenElement(
1681 &self,
1682 containsfullscreenelement: *mut windows_core::BOOL,
1683 ) -> windows_core::Result<()> {
1684 unsafe {
1685 (windows_core::Interface::vtable(self).ContainsFullScreenElement)(
1686 windows_core::Interface::as_raw(self),
1687 containsfullscreenelement as _,
1688 )
1689 .ok()
1690 }
1691 }
1692 pub unsafe fn add_WebResourceRequested<P0>(
1693 &self,
1694 eventhandler: P0,
1695 token: *mut i64,
1696 ) -> windows_core::Result<()>
1697 where
1698 P0: windows_core::Param<ICoreWebView2WebResourceRequestedEventHandler>,
1699 {
1700 unsafe {
1701 (windows_core::Interface::vtable(self).add_WebResourceRequested)(
1702 windows_core::Interface::as_raw(self),
1703 eventhandler.param().abi(),
1704 token as _,
1705 )
1706 .ok()
1707 }
1708 }
1709 pub unsafe fn remove_WebResourceRequested(&self, token: i64) -> windows_core::Result<()> {
1710 unsafe {
1711 (windows_core::Interface::vtable(self).remove_WebResourceRequested)(
1712 windows_core::Interface::as_raw(self),
1713 token,
1714 )
1715 .ok()
1716 }
1717 }
1718 pub unsafe fn AddWebResourceRequestedFilter<P0>(
1719 &self,
1720 uri: P0,
1721 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
1722 ) -> windows_core::Result<()>
1723 where
1724 P0: windows_core::Param<windows_core::PCWSTR>,
1725 {
1726 unsafe {
1727 (windows_core::Interface::vtable(self).AddWebResourceRequestedFilter)(
1728 windows_core::Interface::as_raw(self),
1729 uri.param().abi(),
1730 resourcecontext,
1731 )
1732 .ok()
1733 }
1734 }
1735 pub unsafe fn RemoveWebResourceRequestedFilter<P0>(
1736 &self,
1737 uri: P0,
1738 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
1739 ) -> windows_core::Result<()>
1740 where
1741 P0: windows_core::Param<windows_core::PCWSTR>,
1742 {
1743 unsafe {
1744 (windows_core::Interface::vtable(self).RemoveWebResourceRequestedFilter)(
1745 windows_core::Interface::as_raw(self),
1746 uri.param().abi(),
1747 resourcecontext,
1748 )
1749 .ok()
1750 }
1751 }
1752 pub unsafe fn add_WindowCloseRequested<P0>(
1753 &self,
1754 eventhandler: P0,
1755 token: *mut i64,
1756 ) -> windows_core::Result<()>
1757 where
1758 P0: windows_core::Param<ICoreWebView2WindowCloseRequestedEventHandler>,
1759 {
1760 unsafe {
1761 (windows_core::Interface::vtable(self).add_WindowCloseRequested)(
1762 windows_core::Interface::as_raw(self),
1763 eventhandler.param().abi(),
1764 token as _,
1765 )
1766 .ok()
1767 }
1768 }
1769 pub unsafe fn remove_WindowCloseRequested(&self, token: i64) -> windows_core::Result<()> {
1770 unsafe {
1771 (windows_core::Interface::vtable(self).remove_WindowCloseRequested)(
1772 windows_core::Interface::as_raw(self),
1773 token,
1774 )
1775 .ok()
1776 }
1777 }
1778}
1779#[repr(C)]
1780pub struct ICoreWebView2_Vtbl {
1781 pub base__: windows_core::IUnknown_Vtbl,
1782 pub Settings: unsafe extern "system" fn(
1783 *mut core::ffi::c_void,
1784 *mut *mut core::ffi::c_void,
1785 ) -> windows_core::HRESULT,
1786 pub Source: unsafe extern "system" fn(
1787 *mut core::ffi::c_void,
1788 *mut windows_core::PWSTR,
1789 ) -> windows_core::HRESULT,
1790 pub Navigate: unsafe extern "system" fn(
1791 *mut core::ffi::c_void,
1792 windows_core::PCWSTR,
1793 ) -> windows_core::HRESULT,
1794 pub NavigateToString: unsafe extern "system" fn(
1795 *mut core::ffi::c_void,
1796 windows_core::PCWSTR,
1797 ) -> windows_core::HRESULT,
1798 pub add_NavigationStarting: unsafe extern "system" fn(
1799 *mut core::ffi::c_void,
1800 *mut core::ffi::c_void,
1801 *mut i64,
1802 ) -> windows_core::HRESULT,
1803 pub remove_NavigationStarting:
1804 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1805 pub add_ContentLoading: unsafe extern "system" fn(
1806 *mut core::ffi::c_void,
1807 *mut core::ffi::c_void,
1808 *mut i64,
1809 ) -> windows_core::HRESULT,
1810 pub remove_ContentLoading:
1811 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1812 pub add_SourceChanged: unsafe extern "system" fn(
1813 *mut core::ffi::c_void,
1814 *mut core::ffi::c_void,
1815 *mut i64,
1816 ) -> windows_core::HRESULT,
1817 pub remove_SourceChanged:
1818 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1819 pub add_HistoryChanged: unsafe extern "system" fn(
1820 *mut core::ffi::c_void,
1821 *mut core::ffi::c_void,
1822 *mut i64,
1823 ) -> windows_core::HRESULT,
1824 pub remove_HistoryChanged:
1825 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1826 pub add_NavigationCompleted: unsafe extern "system" fn(
1827 *mut core::ffi::c_void,
1828 *mut core::ffi::c_void,
1829 *mut i64,
1830 ) -> windows_core::HRESULT,
1831 pub remove_NavigationCompleted:
1832 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1833 pub add_FrameNavigationStarting: unsafe extern "system" fn(
1834 *mut core::ffi::c_void,
1835 *mut core::ffi::c_void,
1836 *mut i64,
1837 ) -> windows_core::HRESULT,
1838 pub remove_FrameNavigationStarting:
1839 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1840 pub add_FrameNavigationCompleted: unsafe extern "system" fn(
1841 *mut core::ffi::c_void,
1842 *mut core::ffi::c_void,
1843 *mut i64,
1844 ) -> windows_core::HRESULT,
1845 pub remove_FrameNavigationCompleted:
1846 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1847 pub add_ScriptDialogOpening: unsafe extern "system" fn(
1848 *mut core::ffi::c_void,
1849 *mut core::ffi::c_void,
1850 *mut i64,
1851 ) -> windows_core::HRESULT,
1852 pub remove_ScriptDialogOpening:
1853 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1854 pub add_PermissionRequested: unsafe extern "system" fn(
1855 *mut core::ffi::c_void,
1856 *mut core::ffi::c_void,
1857 *mut i64,
1858 ) -> windows_core::HRESULT,
1859 pub remove_PermissionRequested:
1860 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1861 pub add_ProcessFailed: unsafe extern "system" fn(
1862 *mut core::ffi::c_void,
1863 *mut core::ffi::c_void,
1864 *mut i64,
1865 ) -> windows_core::HRESULT,
1866 pub remove_ProcessFailed:
1867 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1868 pub AddScriptToExecuteOnDocumentCreated: unsafe extern "system" fn(
1869 *mut core::ffi::c_void,
1870 windows_core::PCWSTR,
1871 *mut core::ffi::c_void,
1872 )
1873 -> windows_core::HRESULT,
1874 pub RemoveScriptToExecuteOnDocumentCreated: unsafe extern "system" fn(
1875 *mut core::ffi::c_void,
1876 windows_core::PCWSTR,
1877 )
1878 -> windows_core::HRESULT,
1879 pub ExecuteScript: unsafe extern "system" fn(
1880 *mut core::ffi::c_void,
1881 windows_core::PCWSTR,
1882 *mut core::ffi::c_void,
1883 ) -> windows_core::HRESULT,
1884 pub CapturePreview: unsafe extern "system" fn(
1885 *mut core::ffi::c_void,
1886 COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
1887 *mut core::ffi::c_void,
1888 *mut core::ffi::c_void,
1889 ) -> windows_core::HRESULT,
1890 pub Reload: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
1891 pub PostWebMessageAsJson: unsafe extern "system" fn(
1892 *mut core::ffi::c_void,
1893 windows_core::PCWSTR,
1894 ) -> windows_core::HRESULT,
1895 pub PostWebMessageAsString: unsafe extern "system" fn(
1896 *mut core::ffi::c_void,
1897 windows_core::PCWSTR,
1898 ) -> windows_core::HRESULT,
1899 pub add_WebMessageReceived: unsafe extern "system" fn(
1900 *mut core::ffi::c_void,
1901 *mut core::ffi::c_void,
1902 *mut i64,
1903 ) -> windows_core::HRESULT,
1904 pub remove_WebMessageReceived:
1905 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1906 pub CallDevToolsProtocolMethod: unsafe extern "system" fn(
1907 *mut core::ffi::c_void,
1908 windows_core::PCWSTR,
1909 windows_core::PCWSTR,
1910 *mut core::ffi::c_void,
1911 ) -> windows_core::HRESULT,
1912 pub BrowserProcessId:
1913 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
1914 pub CanGoBack: unsafe extern "system" fn(
1915 *mut core::ffi::c_void,
1916 *mut windows_core::BOOL,
1917 ) -> windows_core::HRESULT,
1918 pub CanGoForward: unsafe extern "system" fn(
1919 *mut core::ffi::c_void,
1920 *mut windows_core::BOOL,
1921 ) -> windows_core::HRESULT,
1922 pub GoBack: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
1923 pub GoForward: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
1924 pub GetDevToolsProtocolEventReceiver: unsafe extern "system" fn(
1925 *mut core::ffi::c_void,
1926 windows_core::PCWSTR,
1927 *mut *mut core::ffi::c_void,
1928 ) -> windows_core::HRESULT,
1929 pub Stop: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
1930 pub add_NewWindowRequested: unsafe extern "system" fn(
1931 *mut core::ffi::c_void,
1932 *mut core::ffi::c_void,
1933 *mut i64,
1934 ) -> windows_core::HRESULT,
1935 pub remove_NewWindowRequested:
1936 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1937 pub add_DocumentTitleChanged: unsafe extern "system" fn(
1938 *mut core::ffi::c_void,
1939 *mut core::ffi::c_void,
1940 *mut i64,
1941 ) -> windows_core::HRESULT,
1942 pub remove_DocumentTitleChanged:
1943 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1944 pub DocumentTitle: unsafe extern "system" fn(
1945 *mut core::ffi::c_void,
1946 *mut windows_core::PWSTR,
1947 ) -> windows_core::HRESULT,
1948 pub AddHostObjectToScript: unsafe extern "system" fn(
1949 *mut core::ffi::c_void,
1950 windows_core::PCWSTR,
1951 *mut windows::Win32::System::Variant::VARIANT,
1952 ) -> windows_core::HRESULT,
1953 pub RemoveHostObjectFromScript: unsafe extern "system" fn(
1954 *mut core::ffi::c_void,
1955 windows_core::PCWSTR,
1956 ) -> windows_core::HRESULT,
1957 pub OpenDevToolsWindow:
1958 unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
1959 pub add_ContainsFullScreenElementChanged: unsafe extern "system" fn(
1960 *mut core::ffi::c_void,
1961 *mut core::ffi::c_void,
1962 *mut i64,
1963 )
1964 -> windows_core::HRESULT,
1965 pub remove_ContainsFullScreenElementChanged:
1966 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1967 pub ContainsFullScreenElement: unsafe extern "system" fn(
1968 *mut core::ffi::c_void,
1969 *mut windows_core::BOOL,
1970 ) -> windows_core::HRESULT,
1971 pub add_WebResourceRequested: unsafe extern "system" fn(
1972 *mut core::ffi::c_void,
1973 *mut core::ffi::c_void,
1974 *mut i64,
1975 ) -> windows_core::HRESULT,
1976 pub remove_WebResourceRequested:
1977 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1978 pub AddWebResourceRequestedFilter: unsafe extern "system" fn(
1979 *mut core::ffi::c_void,
1980 windows_core::PCWSTR,
1981 COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
1982 ) -> windows_core::HRESULT,
1983 pub RemoveWebResourceRequestedFilter: unsafe extern "system" fn(
1984 *mut core::ffi::c_void,
1985 windows_core::PCWSTR,
1986 COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
1987 ) -> windows_core::HRESULT,
1988 pub add_WindowCloseRequested: unsafe extern "system" fn(
1989 *mut core::ffi::c_void,
1990 *mut core::ffi::c_void,
1991 *mut i64,
1992 ) -> windows_core::HRESULT,
1993 pub remove_WindowCloseRequested:
1994 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
1995}
1996pub trait ICoreWebView2_Impl: windows_core::IUnknownImpl {
1997 fn Settings(&self) -> windows_core::Result<ICoreWebView2Settings>;
1998 fn Source(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
1999 fn Navigate(&self, uri: &windows_core::PCWSTR) -> windows_core::Result<()>;
2000 fn NavigateToString(&self, htmlcontent: &windows_core::PCWSTR) -> windows_core::Result<()>;
2001 fn add_NavigationStarting(
2002 &self,
2003 eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventHandler>,
2004 token: *mut i64,
2005 ) -> windows_core::Result<()>;
2006 fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()>;
2007 fn add_ContentLoading(
2008 &self,
2009 eventhandler: windows_core::Ref<'_, ICoreWebView2ContentLoadingEventHandler>,
2010 token: *mut i64,
2011 ) -> windows_core::Result<()>;
2012 fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()>;
2013 fn add_SourceChanged(
2014 &self,
2015 eventhandler: windows_core::Ref<'_, ICoreWebView2SourceChangedEventHandler>,
2016 token: *mut i64,
2017 ) -> windows_core::Result<()>;
2018 fn remove_SourceChanged(&self, token: i64) -> windows_core::Result<()>;
2019 fn add_HistoryChanged(
2020 &self,
2021 eventhandler: windows_core::Ref<'_, ICoreWebView2HistoryChangedEventHandler>,
2022 token: *mut i64,
2023 ) -> windows_core::Result<()>;
2024 fn remove_HistoryChanged(&self, token: i64) -> windows_core::Result<()>;
2025 fn add_NavigationCompleted(
2026 &self,
2027 eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventHandler>,
2028 token: *mut i64,
2029 ) -> windows_core::Result<()>;
2030 fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()>;
2031 fn add_FrameNavigationStarting(
2032 &self,
2033 eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventHandler>,
2034 token: *mut i64,
2035 ) -> windows_core::Result<()>;
2036 fn remove_FrameNavigationStarting(&self, token: i64) -> windows_core::Result<()>;
2037 fn add_FrameNavigationCompleted(
2038 &self,
2039 eventhandler: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventHandler>,
2040 token: *mut i64,
2041 ) -> windows_core::Result<()>;
2042 fn remove_FrameNavigationCompleted(&self, token: i64) -> windows_core::Result<()>;
2043 fn add_ScriptDialogOpening(
2044 &self,
2045 eventhandler: windows_core::Ref<'_, ICoreWebView2ScriptDialogOpeningEventHandler>,
2046 token: *mut i64,
2047 ) -> windows_core::Result<()>;
2048 fn remove_ScriptDialogOpening(&self, token: i64) -> windows_core::Result<()>;
2049 fn add_PermissionRequested(
2050 &self,
2051 eventhandler: windows_core::Ref<'_, ICoreWebView2PermissionRequestedEventHandler>,
2052 token: *mut i64,
2053 ) -> windows_core::Result<()>;
2054 fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()>;
2055 fn add_ProcessFailed(
2056 &self,
2057 eventhandler: windows_core::Ref<'_, ICoreWebView2ProcessFailedEventHandler>,
2058 token: *mut i64,
2059 ) -> windows_core::Result<()>;
2060 fn remove_ProcessFailed(&self, token: i64) -> windows_core::Result<()>;
2061 fn AddScriptToExecuteOnDocumentCreated(
2062 &self,
2063 javascript: &windows_core::PCWSTR,
2064 handler: windows_core::Ref<
2065 '_,
2066 ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
2067 >,
2068 ) -> windows_core::Result<()>;
2069 fn RemoveScriptToExecuteOnDocumentCreated(
2070 &self,
2071 id: &windows_core::PCWSTR,
2072 ) -> windows_core::Result<()>;
2073 fn ExecuteScript(
2074 &self,
2075 javascript: &windows_core::PCWSTR,
2076 handler: windows_core::Ref<'_, ICoreWebView2ExecuteScriptCompletedHandler>,
2077 ) -> windows_core::Result<()>;
2078 fn CapturePreview(
2079 &self,
2080 imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
2081 imagestream: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
2082 handler: windows_core::Ref<'_, ICoreWebView2CapturePreviewCompletedHandler>,
2083 ) -> windows_core::Result<()>;
2084 fn Reload(&self) -> windows_core::Result<()>;
2085 fn PostWebMessageAsJson(
2086 &self,
2087 webmessageasjson: &windows_core::PCWSTR,
2088 ) -> windows_core::Result<()>;
2089 fn PostWebMessageAsString(
2090 &self,
2091 webmessageasstring: &windows_core::PCWSTR,
2092 ) -> windows_core::Result<()>;
2093 fn add_WebMessageReceived(
2094 &self,
2095 handler: windows_core::Ref<'_, ICoreWebView2WebMessageReceivedEventHandler>,
2096 token: *mut i64,
2097 ) -> windows_core::Result<()>;
2098 fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()>;
2099 fn CallDevToolsProtocolMethod(
2100 &self,
2101 methodname: &windows_core::PCWSTR,
2102 parametersasjson: &windows_core::PCWSTR,
2103 handler: windows_core::Ref<'_, ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
2104 ) -> windows_core::Result<()>;
2105 fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()>;
2106 fn CanGoBack(&self, cangoback: *mut windows_core::BOOL) -> windows_core::Result<()>;
2107 fn CanGoForward(&self, cangoforward: *mut windows_core::BOOL) -> windows_core::Result<()>;
2108 fn GoBack(&self) -> windows_core::Result<()>;
2109 fn GoForward(&self) -> windows_core::Result<()>;
2110 fn GetDevToolsProtocolEventReceiver(
2111 &self,
2112 eventname: &windows_core::PCWSTR,
2113 ) -> windows_core::Result<ICoreWebView2DevToolsProtocolEventReceiver>;
2114 fn Stop(&self) -> windows_core::Result<()>;
2115 fn add_NewWindowRequested(
2116 &self,
2117 eventhandler: windows_core::Ref<'_, ICoreWebView2NewWindowRequestedEventHandler>,
2118 token: *mut i64,
2119 ) -> windows_core::Result<()>;
2120 fn remove_NewWindowRequested(&self, token: i64) -> windows_core::Result<()>;
2121 fn add_DocumentTitleChanged(
2122 &self,
2123 eventhandler: windows_core::Ref<'_, ICoreWebView2DocumentTitleChangedEventHandler>,
2124 token: *mut i64,
2125 ) -> windows_core::Result<()>;
2126 fn remove_DocumentTitleChanged(&self, token: i64) -> windows_core::Result<()>;
2127 fn DocumentTitle(&self, title: *mut windows_core::PWSTR) -> windows_core::Result<()>;
2128 fn AddHostObjectToScript(
2129 &self,
2130 name: &windows_core::PCWSTR,
2131 object: *mut windows::Win32::System::Variant::VARIANT,
2132 ) -> windows_core::Result<()>;
2133 fn RemoveHostObjectFromScript(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>;
2134 fn OpenDevToolsWindow(&self) -> windows_core::Result<()>;
2135 fn add_ContainsFullScreenElementChanged(
2136 &self,
2137 eventhandler: windows_core::Ref<
2138 '_,
2139 ICoreWebView2ContainsFullScreenElementChangedEventHandler,
2140 >,
2141 token: *mut i64,
2142 ) -> windows_core::Result<()>;
2143 fn remove_ContainsFullScreenElementChanged(&self, token: i64) -> windows_core::Result<()>;
2144 fn ContainsFullScreenElement(
2145 &self,
2146 containsfullscreenelement: *mut windows_core::BOOL,
2147 ) -> windows_core::Result<()>;
2148 fn add_WebResourceRequested(
2149 &self,
2150 eventhandler: windows_core::Ref<'_, ICoreWebView2WebResourceRequestedEventHandler>,
2151 token: *mut i64,
2152 ) -> windows_core::Result<()>;
2153 fn remove_WebResourceRequested(&self, token: i64) -> windows_core::Result<()>;
2154 fn AddWebResourceRequestedFilter(
2155 &self,
2156 uri: &windows_core::PCWSTR,
2157 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
2158 ) -> windows_core::Result<()>;
2159 fn RemoveWebResourceRequestedFilter(
2160 &self,
2161 uri: &windows_core::PCWSTR,
2162 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
2163 ) -> windows_core::Result<()>;
2164 fn add_WindowCloseRequested(
2165 &self,
2166 eventhandler: windows_core::Ref<'_, ICoreWebView2WindowCloseRequestedEventHandler>,
2167 token: *mut i64,
2168 ) -> windows_core::Result<()>;
2169 fn remove_WindowCloseRequested(&self, token: i64) -> windows_core::Result<()>;
2170}
2171impl ICoreWebView2_Vtbl {
2172 pub const fn new<Identity: ICoreWebView2_Impl, const OFFSET: isize>() -> Self {
2173 unsafe extern "system" fn Settings<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2174 this: *mut core::ffi::c_void,
2175 settings: *mut *mut core::ffi::c_void,
2176 ) -> windows_core::HRESULT {
2177 unsafe {
2178 let this: &Identity =
2179 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2180 match ICoreWebView2_Impl::Settings(this) {
2181 Ok(ok__) => {
2182 settings.write(core::mem::transmute(ok__));
2183 windows_core::HRESULT(0)
2184 }
2185 Err(err) => err.into(),
2186 }
2187 }
2188 }
2189 unsafe extern "system" fn Source<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2190 this: *mut core::ffi::c_void,
2191 uri: *mut windows_core::PWSTR,
2192 ) -> windows_core::HRESULT {
2193 unsafe {
2194 let this: &Identity =
2195 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2196 ICoreWebView2_Impl::Source(this, core::mem::transmute_copy(&uri)).into()
2197 }
2198 }
2199 unsafe extern "system" fn Navigate<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2200 this: *mut core::ffi::c_void,
2201 uri: windows_core::PCWSTR,
2202 ) -> windows_core::HRESULT {
2203 unsafe {
2204 let this: &Identity =
2205 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2206 ICoreWebView2_Impl::Navigate(this, core::mem::transmute(&uri)).into()
2207 }
2208 }
2209 unsafe extern "system" fn NavigateToString<
2210 Identity: ICoreWebView2_Impl,
2211 const OFFSET: isize,
2212 >(
2213 this: *mut core::ffi::c_void,
2214 htmlcontent: windows_core::PCWSTR,
2215 ) -> windows_core::HRESULT {
2216 unsafe {
2217 let this: &Identity =
2218 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2219 ICoreWebView2_Impl::NavigateToString(this, core::mem::transmute(&htmlcontent))
2220 .into()
2221 }
2222 }
2223 unsafe extern "system" fn add_NavigationStarting<
2224 Identity: ICoreWebView2_Impl,
2225 const OFFSET: isize,
2226 >(
2227 this: *mut core::ffi::c_void,
2228 eventhandler: *mut core::ffi::c_void,
2229 token: *mut i64,
2230 ) -> windows_core::HRESULT {
2231 unsafe {
2232 let this: &Identity =
2233 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2234 ICoreWebView2_Impl::add_NavigationStarting(
2235 this,
2236 core::mem::transmute_copy(&eventhandler),
2237 core::mem::transmute_copy(&token),
2238 )
2239 .into()
2240 }
2241 }
2242 unsafe extern "system" fn remove_NavigationStarting<
2243 Identity: ICoreWebView2_Impl,
2244 const OFFSET: isize,
2245 >(
2246 this: *mut core::ffi::c_void,
2247 token: i64,
2248 ) -> windows_core::HRESULT {
2249 unsafe {
2250 let this: &Identity =
2251 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2252 ICoreWebView2_Impl::remove_NavigationStarting(
2253 this,
2254 core::mem::transmute_copy(&token),
2255 )
2256 .into()
2257 }
2258 }
2259 unsafe extern "system" fn add_ContentLoading<
2260 Identity: ICoreWebView2_Impl,
2261 const OFFSET: isize,
2262 >(
2263 this: *mut core::ffi::c_void,
2264 eventhandler: *mut core::ffi::c_void,
2265 token: *mut i64,
2266 ) -> windows_core::HRESULT {
2267 unsafe {
2268 let this: &Identity =
2269 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2270 ICoreWebView2_Impl::add_ContentLoading(
2271 this,
2272 core::mem::transmute_copy(&eventhandler),
2273 core::mem::transmute_copy(&token),
2274 )
2275 .into()
2276 }
2277 }
2278 unsafe extern "system" fn remove_ContentLoading<
2279 Identity: ICoreWebView2_Impl,
2280 const OFFSET: isize,
2281 >(
2282 this: *mut core::ffi::c_void,
2283 token: i64,
2284 ) -> windows_core::HRESULT {
2285 unsafe {
2286 let this: &Identity =
2287 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2288 ICoreWebView2_Impl::remove_ContentLoading(this, core::mem::transmute_copy(&token))
2289 .into()
2290 }
2291 }
2292 unsafe extern "system" fn add_SourceChanged<
2293 Identity: ICoreWebView2_Impl,
2294 const OFFSET: isize,
2295 >(
2296 this: *mut core::ffi::c_void,
2297 eventhandler: *mut core::ffi::c_void,
2298 token: *mut i64,
2299 ) -> windows_core::HRESULT {
2300 unsafe {
2301 let this: &Identity =
2302 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2303 ICoreWebView2_Impl::add_SourceChanged(
2304 this,
2305 core::mem::transmute_copy(&eventhandler),
2306 core::mem::transmute_copy(&token),
2307 )
2308 .into()
2309 }
2310 }
2311 unsafe extern "system" fn remove_SourceChanged<
2312 Identity: ICoreWebView2_Impl,
2313 const OFFSET: isize,
2314 >(
2315 this: *mut core::ffi::c_void,
2316 token: i64,
2317 ) -> windows_core::HRESULT {
2318 unsafe {
2319 let this: &Identity =
2320 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2321 ICoreWebView2_Impl::remove_SourceChanged(this, core::mem::transmute_copy(&token))
2322 .into()
2323 }
2324 }
2325 unsafe extern "system" fn add_HistoryChanged<
2326 Identity: ICoreWebView2_Impl,
2327 const OFFSET: isize,
2328 >(
2329 this: *mut core::ffi::c_void,
2330 eventhandler: *mut core::ffi::c_void,
2331 token: *mut i64,
2332 ) -> windows_core::HRESULT {
2333 unsafe {
2334 let this: &Identity =
2335 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2336 ICoreWebView2_Impl::add_HistoryChanged(
2337 this,
2338 core::mem::transmute_copy(&eventhandler),
2339 core::mem::transmute_copy(&token),
2340 )
2341 .into()
2342 }
2343 }
2344 unsafe extern "system" fn remove_HistoryChanged<
2345 Identity: ICoreWebView2_Impl,
2346 const OFFSET: isize,
2347 >(
2348 this: *mut core::ffi::c_void,
2349 token: i64,
2350 ) -> windows_core::HRESULT {
2351 unsafe {
2352 let this: &Identity =
2353 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2354 ICoreWebView2_Impl::remove_HistoryChanged(this, core::mem::transmute_copy(&token))
2355 .into()
2356 }
2357 }
2358 unsafe extern "system" fn add_NavigationCompleted<
2359 Identity: ICoreWebView2_Impl,
2360 const OFFSET: isize,
2361 >(
2362 this: *mut core::ffi::c_void,
2363 eventhandler: *mut core::ffi::c_void,
2364 token: *mut i64,
2365 ) -> windows_core::HRESULT {
2366 unsafe {
2367 let this: &Identity =
2368 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2369 ICoreWebView2_Impl::add_NavigationCompleted(
2370 this,
2371 core::mem::transmute_copy(&eventhandler),
2372 core::mem::transmute_copy(&token),
2373 )
2374 .into()
2375 }
2376 }
2377 unsafe extern "system" fn remove_NavigationCompleted<
2378 Identity: ICoreWebView2_Impl,
2379 const OFFSET: isize,
2380 >(
2381 this: *mut core::ffi::c_void,
2382 token: i64,
2383 ) -> windows_core::HRESULT {
2384 unsafe {
2385 let this: &Identity =
2386 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2387 ICoreWebView2_Impl::remove_NavigationCompleted(
2388 this,
2389 core::mem::transmute_copy(&token),
2390 )
2391 .into()
2392 }
2393 }
2394 unsafe extern "system" fn add_FrameNavigationStarting<
2395 Identity: ICoreWebView2_Impl,
2396 const OFFSET: isize,
2397 >(
2398 this: *mut core::ffi::c_void,
2399 eventhandler: *mut core::ffi::c_void,
2400 token: *mut i64,
2401 ) -> windows_core::HRESULT {
2402 unsafe {
2403 let this: &Identity =
2404 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2405 ICoreWebView2_Impl::add_FrameNavigationStarting(
2406 this,
2407 core::mem::transmute_copy(&eventhandler),
2408 core::mem::transmute_copy(&token),
2409 )
2410 .into()
2411 }
2412 }
2413 unsafe extern "system" fn remove_FrameNavigationStarting<
2414 Identity: ICoreWebView2_Impl,
2415 const OFFSET: isize,
2416 >(
2417 this: *mut core::ffi::c_void,
2418 token: i64,
2419 ) -> windows_core::HRESULT {
2420 unsafe {
2421 let this: &Identity =
2422 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2423 ICoreWebView2_Impl::remove_FrameNavigationStarting(
2424 this,
2425 core::mem::transmute_copy(&token),
2426 )
2427 .into()
2428 }
2429 }
2430 unsafe extern "system" fn add_FrameNavigationCompleted<
2431 Identity: ICoreWebView2_Impl,
2432 const OFFSET: isize,
2433 >(
2434 this: *mut core::ffi::c_void,
2435 eventhandler: *mut core::ffi::c_void,
2436 token: *mut i64,
2437 ) -> windows_core::HRESULT {
2438 unsafe {
2439 let this: &Identity =
2440 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2441 ICoreWebView2_Impl::add_FrameNavigationCompleted(
2442 this,
2443 core::mem::transmute_copy(&eventhandler),
2444 core::mem::transmute_copy(&token),
2445 )
2446 .into()
2447 }
2448 }
2449 unsafe extern "system" fn remove_FrameNavigationCompleted<
2450 Identity: ICoreWebView2_Impl,
2451 const OFFSET: isize,
2452 >(
2453 this: *mut core::ffi::c_void,
2454 token: i64,
2455 ) -> windows_core::HRESULT {
2456 unsafe {
2457 let this: &Identity =
2458 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2459 ICoreWebView2_Impl::remove_FrameNavigationCompleted(
2460 this,
2461 core::mem::transmute_copy(&token),
2462 )
2463 .into()
2464 }
2465 }
2466 unsafe extern "system" fn add_ScriptDialogOpening<
2467 Identity: ICoreWebView2_Impl,
2468 const OFFSET: isize,
2469 >(
2470 this: *mut core::ffi::c_void,
2471 eventhandler: *mut core::ffi::c_void,
2472 token: *mut i64,
2473 ) -> windows_core::HRESULT {
2474 unsafe {
2475 let this: &Identity =
2476 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2477 ICoreWebView2_Impl::add_ScriptDialogOpening(
2478 this,
2479 core::mem::transmute_copy(&eventhandler),
2480 core::mem::transmute_copy(&token),
2481 )
2482 .into()
2483 }
2484 }
2485 unsafe extern "system" fn remove_ScriptDialogOpening<
2486 Identity: ICoreWebView2_Impl,
2487 const OFFSET: isize,
2488 >(
2489 this: *mut core::ffi::c_void,
2490 token: i64,
2491 ) -> windows_core::HRESULT {
2492 unsafe {
2493 let this: &Identity =
2494 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2495 ICoreWebView2_Impl::remove_ScriptDialogOpening(
2496 this,
2497 core::mem::transmute_copy(&token),
2498 )
2499 .into()
2500 }
2501 }
2502 unsafe extern "system" fn add_PermissionRequested<
2503 Identity: ICoreWebView2_Impl,
2504 const OFFSET: isize,
2505 >(
2506 this: *mut core::ffi::c_void,
2507 eventhandler: *mut core::ffi::c_void,
2508 token: *mut i64,
2509 ) -> windows_core::HRESULT {
2510 unsafe {
2511 let this: &Identity =
2512 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2513 ICoreWebView2_Impl::add_PermissionRequested(
2514 this,
2515 core::mem::transmute_copy(&eventhandler),
2516 core::mem::transmute_copy(&token),
2517 )
2518 .into()
2519 }
2520 }
2521 unsafe extern "system" fn remove_PermissionRequested<
2522 Identity: ICoreWebView2_Impl,
2523 const OFFSET: isize,
2524 >(
2525 this: *mut core::ffi::c_void,
2526 token: i64,
2527 ) -> windows_core::HRESULT {
2528 unsafe {
2529 let this: &Identity =
2530 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2531 ICoreWebView2_Impl::remove_PermissionRequested(
2532 this,
2533 core::mem::transmute_copy(&token),
2534 )
2535 .into()
2536 }
2537 }
2538 unsafe extern "system" fn add_ProcessFailed<
2539 Identity: ICoreWebView2_Impl,
2540 const OFFSET: isize,
2541 >(
2542 this: *mut core::ffi::c_void,
2543 eventhandler: *mut core::ffi::c_void,
2544 token: *mut i64,
2545 ) -> windows_core::HRESULT {
2546 unsafe {
2547 let this: &Identity =
2548 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2549 ICoreWebView2_Impl::add_ProcessFailed(
2550 this,
2551 core::mem::transmute_copy(&eventhandler),
2552 core::mem::transmute_copy(&token),
2553 )
2554 .into()
2555 }
2556 }
2557 unsafe extern "system" fn remove_ProcessFailed<
2558 Identity: ICoreWebView2_Impl,
2559 const OFFSET: isize,
2560 >(
2561 this: *mut core::ffi::c_void,
2562 token: i64,
2563 ) -> windows_core::HRESULT {
2564 unsafe {
2565 let this: &Identity =
2566 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2567 ICoreWebView2_Impl::remove_ProcessFailed(this, core::mem::transmute_copy(&token))
2568 .into()
2569 }
2570 }
2571 unsafe extern "system" fn AddScriptToExecuteOnDocumentCreated<
2572 Identity: ICoreWebView2_Impl,
2573 const OFFSET: isize,
2574 >(
2575 this: *mut core::ffi::c_void,
2576 javascript: windows_core::PCWSTR,
2577 handler: *mut core::ffi::c_void,
2578 ) -> windows_core::HRESULT {
2579 unsafe {
2580 let this: &Identity =
2581 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2582 ICoreWebView2_Impl::AddScriptToExecuteOnDocumentCreated(
2583 this,
2584 core::mem::transmute(&javascript),
2585 core::mem::transmute_copy(&handler),
2586 )
2587 .into()
2588 }
2589 }
2590 unsafe extern "system" fn RemoveScriptToExecuteOnDocumentCreated<
2591 Identity: ICoreWebView2_Impl,
2592 const OFFSET: isize,
2593 >(
2594 this: *mut core::ffi::c_void,
2595 id: windows_core::PCWSTR,
2596 ) -> windows_core::HRESULT {
2597 unsafe {
2598 let this: &Identity =
2599 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2600 ICoreWebView2_Impl::RemoveScriptToExecuteOnDocumentCreated(
2601 this,
2602 core::mem::transmute(&id),
2603 )
2604 .into()
2605 }
2606 }
2607 unsafe extern "system" fn ExecuteScript<
2608 Identity: ICoreWebView2_Impl,
2609 const OFFSET: isize,
2610 >(
2611 this: *mut core::ffi::c_void,
2612 javascript: windows_core::PCWSTR,
2613 handler: *mut core::ffi::c_void,
2614 ) -> windows_core::HRESULT {
2615 unsafe {
2616 let this: &Identity =
2617 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2618 ICoreWebView2_Impl::ExecuteScript(
2619 this,
2620 core::mem::transmute(&javascript),
2621 core::mem::transmute_copy(&handler),
2622 )
2623 .into()
2624 }
2625 }
2626 unsafe extern "system" fn CapturePreview<
2627 Identity: ICoreWebView2_Impl,
2628 const OFFSET: isize,
2629 >(
2630 this: *mut core::ffi::c_void,
2631 imageformat: COREWEBVIEW2_CAPTURE_PREVIEW_IMAGE_FORMAT,
2632 imagestream: *mut core::ffi::c_void,
2633 handler: *mut core::ffi::c_void,
2634 ) -> windows_core::HRESULT {
2635 unsafe {
2636 let this: &Identity =
2637 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2638 ICoreWebView2_Impl::CapturePreview(
2639 this,
2640 core::mem::transmute_copy(&imageformat),
2641 core::mem::transmute_copy(&imagestream),
2642 core::mem::transmute_copy(&handler),
2643 )
2644 .into()
2645 }
2646 }
2647 unsafe extern "system" fn Reload<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2648 this: *mut core::ffi::c_void,
2649 ) -> windows_core::HRESULT {
2650 unsafe {
2651 let this: &Identity =
2652 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2653 ICoreWebView2_Impl::Reload(this).into()
2654 }
2655 }
2656 unsafe extern "system" fn PostWebMessageAsJson<
2657 Identity: ICoreWebView2_Impl,
2658 const OFFSET: isize,
2659 >(
2660 this: *mut core::ffi::c_void,
2661 webmessageasjson: windows_core::PCWSTR,
2662 ) -> windows_core::HRESULT {
2663 unsafe {
2664 let this: &Identity =
2665 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2666 ICoreWebView2_Impl::PostWebMessageAsJson(
2667 this,
2668 core::mem::transmute(&webmessageasjson),
2669 )
2670 .into()
2671 }
2672 }
2673 unsafe extern "system" fn PostWebMessageAsString<
2674 Identity: ICoreWebView2_Impl,
2675 const OFFSET: isize,
2676 >(
2677 this: *mut core::ffi::c_void,
2678 webmessageasstring: windows_core::PCWSTR,
2679 ) -> windows_core::HRESULT {
2680 unsafe {
2681 let this: &Identity =
2682 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2683 ICoreWebView2_Impl::PostWebMessageAsString(
2684 this,
2685 core::mem::transmute(&webmessageasstring),
2686 )
2687 .into()
2688 }
2689 }
2690 unsafe extern "system" fn add_WebMessageReceived<
2691 Identity: ICoreWebView2_Impl,
2692 const OFFSET: isize,
2693 >(
2694 this: *mut core::ffi::c_void,
2695 handler: *mut core::ffi::c_void,
2696 token: *mut i64,
2697 ) -> windows_core::HRESULT {
2698 unsafe {
2699 let this: &Identity =
2700 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2701 ICoreWebView2_Impl::add_WebMessageReceived(
2702 this,
2703 core::mem::transmute_copy(&handler),
2704 core::mem::transmute_copy(&token),
2705 )
2706 .into()
2707 }
2708 }
2709 unsafe extern "system" fn remove_WebMessageReceived<
2710 Identity: ICoreWebView2_Impl,
2711 const OFFSET: isize,
2712 >(
2713 this: *mut core::ffi::c_void,
2714 token: i64,
2715 ) -> windows_core::HRESULT {
2716 unsafe {
2717 let this: &Identity =
2718 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2719 ICoreWebView2_Impl::remove_WebMessageReceived(
2720 this,
2721 core::mem::transmute_copy(&token),
2722 )
2723 .into()
2724 }
2725 }
2726 unsafe extern "system" fn CallDevToolsProtocolMethod<
2727 Identity: ICoreWebView2_Impl,
2728 const OFFSET: isize,
2729 >(
2730 this: *mut core::ffi::c_void,
2731 methodname: windows_core::PCWSTR,
2732 parametersasjson: windows_core::PCWSTR,
2733 handler: *mut core::ffi::c_void,
2734 ) -> windows_core::HRESULT {
2735 unsafe {
2736 let this: &Identity =
2737 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2738 ICoreWebView2_Impl::CallDevToolsProtocolMethod(
2739 this,
2740 core::mem::transmute(&methodname),
2741 core::mem::transmute(¶metersasjson),
2742 core::mem::transmute_copy(&handler),
2743 )
2744 .into()
2745 }
2746 }
2747 unsafe extern "system" fn BrowserProcessId<
2748 Identity: ICoreWebView2_Impl,
2749 const OFFSET: isize,
2750 >(
2751 this: *mut core::ffi::c_void,
2752 value: *mut u32,
2753 ) -> windows_core::HRESULT {
2754 unsafe {
2755 let this: &Identity =
2756 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2757 ICoreWebView2_Impl::BrowserProcessId(this, core::mem::transmute_copy(&value)).into()
2758 }
2759 }
2760 unsafe extern "system" fn CanGoBack<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2761 this: *mut core::ffi::c_void,
2762 cangoback: *mut windows_core::BOOL,
2763 ) -> windows_core::HRESULT {
2764 unsafe {
2765 let this: &Identity =
2766 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2767 ICoreWebView2_Impl::CanGoBack(this, core::mem::transmute_copy(&cangoback)).into()
2768 }
2769 }
2770 unsafe extern "system" fn CanGoForward<
2771 Identity: ICoreWebView2_Impl,
2772 const OFFSET: isize,
2773 >(
2774 this: *mut core::ffi::c_void,
2775 cangoforward: *mut windows_core::BOOL,
2776 ) -> windows_core::HRESULT {
2777 unsafe {
2778 let this: &Identity =
2779 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2780 ICoreWebView2_Impl::CanGoForward(this, core::mem::transmute_copy(&cangoforward))
2781 .into()
2782 }
2783 }
2784 unsafe extern "system" fn GoBack<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2785 this: *mut core::ffi::c_void,
2786 ) -> windows_core::HRESULT {
2787 unsafe {
2788 let this: &Identity =
2789 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2790 ICoreWebView2_Impl::GoBack(this).into()
2791 }
2792 }
2793 unsafe extern "system" fn GoForward<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2794 this: *mut core::ffi::c_void,
2795 ) -> windows_core::HRESULT {
2796 unsafe {
2797 let this: &Identity =
2798 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2799 ICoreWebView2_Impl::GoForward(this).into()
2800 }
2801 }
2802 unsafe extern "system" fn GetDevToolsProtocolEventReceiver<
2803 Identity: ICoreWebView2_Impl,
2804 const OFFSET: isize,
2805 >(
2806 this: *mut core::ffi::c_void,
2807 eventname: windows_core::PCWSTR,
2808 receiver: *mut *mut core::ffi::c_void,
2809 ) -> windows_core::HRESULT {
2810 unsafe {
2811 let this: &Identity =
2812 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2813 match ICoreWebView2_Impl::GetDevToolsProtocolEventReceiver(
2814 this,
2815 core::mem::transmute(&eventname),
2816 ) {
2817 Ok(ok__) => {
2818 receiver.write(core::mem::transmute(ok__));
2819 windows_core::HRESULT(0)
2820 }
2821 Err(err) => err.into(),
2822 }
2823 }
2824 }
2825 unsafe extern "system" fn Stop<Identity: ICoreWebView2_Impl, const OFFSET: isize>(
2826 this: *mut core::ffi::c_void,
2827 ) -> windows_core::HRESULT {
2828 unsafe {
2829 let this: &Identity =
2830 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2831 ICoreWebView2_Impl::Stop(this).into()
2832 }
2833 }
2834 unsafe extern "system" fn add_NewWindowRequested<
2835 Identity: ICoreWebView2_Impl,
2836 const OFFSET: isize,
2837 >(
2838 this: *mut core::ffi::c_void,
2839 eventhandler: *mut core::ffi::c_void,
2840 token: *mut i64,
2841 ) -> windows_core::HRESULT {
2842 unsafe {
2843 let this: &Identity =
2844 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2845 ICoreWebView2_Impl::add_NewWindowRequested(
2846 this,
2847 core::mem::transmute_copy(&eventhandler),
2848 core::mem::transmute_copy(&token),
2849 )
2850 .into()
2851 }
2852 }
2853 unsafe extern "system" fn remove_NewWindowRequested<
2854 Identity: ICoreWebView2_Impl,
2855 const OFFSET: isize,
2856 >(
2857 this: *mut core::ffi::c_void,
2858 token: i64,
2859 ) -> windows_core::HRESULT {
2860 unsafe {
2861 let this: &Identity =
2862 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2863 ICoreWebView2_Impl::remove_NewWindowRequested(
2864 this,
2865 core::mem::transmute_copy(&token),
2866 )
2867 .into()
2868 }
2869 }
2870 unsafe extern "system" fn add_DocumentTitleChanged<
2871 Identity: ICoreWebView2_Impl,
2872 const OFFSET: isize,
2873 >(
2874 this: *mut core::ffi::c_void,
2875 eventhandler: *mut core::ffi::c_void,
2876 token: *mut i64,
2877 ) -> windows_core::HRESULT {
2878 unsafe {
2879 let this: &Identity =
2880 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2881 ICoreWebView2_Impl::add_DocumentTitleChanged(
2882 this,
2883 core::mem::transmute_copy(&eventhandler),
2884 core::mem::transmute_copy(&token),
2885 )
2886 .into()
2887 }
2888 }
2889 unsafe extern "system" fn remove_DocumentTitleChanged<
2890 Identity: ICoreWebView2_Impl,
2891 const OFFSET: isize,
2892 >(
2893 this: *mut core::ffi::c_void,
2894 token: i64,
2895 ) -> windows_core::HRESULT {
2896 unsafe {
2897 let this: &Identity =
2898 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2899 ICoreWebView2_Impl::remove_DocumentTitleChanged(
2900 this,
2901 core::mem::transmute_copy(&token),
2902 )
2903 .into()
2904 }
2905 }
2906 unsafe extern "system" fn DocumentTitle<
2907 Identity: ICoreWebView2_Impl,
2908 const OFFSET: isize,
2909 >(
2910 this: *mut core::ffi::c_void,
2911 title: *mut windows_core::PWSTR,
2912 ) -> windows_core::HRESULT {
2913 unsafe {
2914 let this: &Identity =
2915 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2916 ICoreWebView2_Impl::DocumentTitle(this, core::mem::transmute_copy(&title)).into()
2917 }
2918 }
2919 unsafe extern "system" fn AddHostObjectToScript<
2920 Identity: ICoreWebView2_Impl,
2921 const OFFSET: isize,
2922 >(
2923 this: *mut core::ffi::c_void,
2924 name: windows_core::PCWSTR,
2925 object: *mut windows::Win32::System::Variant::VARIANT,
2926 ) -> windows_core::HRESULT {
2927 unsafe {
2928 let this: &Identity =
2929 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2930 ICoreWebView2_Impl::AddHostObjectToScript(
2931 this,
2932 core::mem::transmute(&name),
2933 core::mem::transmute_copy(&object),
2934 )
2935 .into()
2936 }
2937 }
2938 unsafe extern "system" fn RemoveHostObjectFromScript<
2939 Identity: ICoreWebView2_Impl,
2940 const OFFSET: isize,
2941 >(
2942 this: *mut core::ffi::c_void,
2943 name: windows_core::PCWSTR,
2944 ) -> windows_core::HRESULT {
2945 unsafe {
2946 let this: &Identity =
2947 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2948 ICoreWebView2_Impl::RemoveHostObjectFromScript(this, core::mem::transmute(&name))
2949 .into()
2950 }
2951 }
2952 unsafe extern "system" fn OpenDevToolsWindow<
2953 Identity: ICoreWebView2_Impl,
2954 const OFFSET: isize,
2955 >(
2956 this: *mut core::ffi::c_void,
2957 ) -> windows_core::HRESULT {
2958 unsafe {
2959 let this: &Identity =
2960 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2961 ICoreWebView2_Impl::OpenDevToolsWindow(this).into()
2962 }
2963 }
2964 unsafe extern "system" fn add_ContainsFullScreenElementChanged<
2965 Identity: ICoreWebView2_Impl,
2966 const OFFSET: isize,
2967 >(
2968 this: *mut core::ffi::c_void,
2969 eventhandler: *mut core::ffi::c_void,
2970 token: *mut i64,
2971 ) -> windows_core::HRESULT {
2972 unsafe {
2973 let this: &Identity =
2974 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2975 ICoreWebView2_Impl::add_ContainsFullScreenElementChanged(
2976 this,
2977 core::mem::transmute_copy(&eventhandler),
2978 core::mem::transmute_copy(&token),
2979 )
2980 .into()
2981 }
2982 }
2983 unsafe extern "system" fn remove_ContainsFullScreenElementChanged<
2984 Identity: ICoreWebView2_Impl,
2985 const OFFSET: isize,
2986 >(
2987 this: *mut core::ffi::c_void,
2988 token: i64,
2989 ) -> windows_core::HRESULT {
2990 unsafe {
2991 let this: &Identity =
2992 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
2993 ICoreWebView2_Impl::remove_ContainsFullScreenElementChanged(
2994 this,
2995 core::mem::transmute_copy(&token),
2996 )
2997 .into()
2998 }
2999 }
3000 unsafe extern "system" fn ContainsFullScreenElement<
3001 Identity: ICoreWebView2_Impl,
3002 const OFFSET: isize,
3003 >(
3004 this: *mut core::ffi::c_void,
3005 containsfullscreenelement: *mut windows_core::BOOL,
3006 ) -> windows_core::HRESULT {
3007 unsafe {
3008 let this: &Identity =
3009 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3010 ICoreWebView2_Impl::ContainsFullScreenElement(
3011 this,
3012 core::mem::transmute_copy(&containsfullscreenelement),
3013 )
3014 .into()
3015 }
3016 }
3017 unsafe extern "system" fn add_WebResourceRequested<
3018 Identity: ICoreWebView2_Impl,
3019 const OFFSET: isize,
3020 >(
3021 this: *mut core::ffi::c_void,
3022 eventhandler: *mut core::ffi::c_void,
3023 token: *mut i64,
3024 ) -> windows_core::HRESULT {
3025 unsafe {
3026 let this: &Identity =
3027 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3028 ICoreWebView2_Impl::add_WebResourceRequested(
3029 this,
3030 core::mem::transmute_copy(&eventhandler),
3031 core::mem::transmute_copy(&token),
3032 )
3033 .into()
3034 }
3035 }
3036 unsafe extern "system" fn remove_WebResourceRequested<
3037 Identity: ICoreWebView2_Impl,
3038 const OFFSET: isize,
3039 >(
3040 this: *mut core::ffi::c_void,
3041 token: i64,
3042 ) -> windows_core::HRESULT {
3043 unsafe {
3044 let this: &Identity =
3045 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3046 ICoreWebView2_Impl::remove_WebResourceRequested(
3047 this,
3048 core::mem::transmute_copy(&token),
3049 )
3050 .into()
3051 }
3052 }
3053 unsafe extern "system" fn AddWebResourceRequestedFilter<
3054 Identity: ICoreWebView2_Impl,
3055 const OFFSET: isize,
3056 >(
3057 this: *mut core::ffi::c_void,
3058 uri: windows_core::PCWSTR,
3059 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
3060 ) -> windows_core::HRESULT {
3061 unsafe {
3062 let this: &Identity =
3063 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3064 ICoreWebView2_Impl::AddWebResourceRequestedFilter(
3065 this,
3066 core::mem::transmute(&uri),
3067 core::mem::transmute_copy(&resourcecontext),
3068 )
3069 .into()
3070 }
3071 }
3072 unsafe extern "system" fn RemoveWebResourceRequestedFilter<
3073 Identity: ICoreWebView2_Impl,
3074 const OFFSET: isize,
3075 >(
3076 this: *mut core::ffi::c_void,
3077 uri: windows_core::PCWSTR,
3078 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
3079 ) -> windows_core::HRESULT {
3080 unsafe {
3081 let this: &Identity =
3082 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3083 ICoreWebView2_Impl::RemoveWebResourceRequestedFilter(
3084 this,
3085 core::mem::transmute(&uri),
3086 core::mem::transmute_copy(&resourcecontext),
3087 )
3088 .into()
3089 }
3090 }
3091 unsafe extern "system" fn add_WindowCloseRequested<
3092 Identity: ICoreWebView2_Impl,
3093 const OFFSET: isize,
3094 >(
3095 this: *mut core::ffi::c_void,
3096 eventhandler: *mut core::ffi::c_void,
3097 token: *mut i64,
3098 ) -> windows_core::HRESULT {
3099 unsafe {
3100 let this: &Identity =
3101 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3102 ICoreWebView2_Impl::add_WindowCloseRequested(
3103 this,
3104 core::mem::transmute_copy(&eventhandler),
3105 core::mem::transmute_copy(&token),
3106 )
3107 .into()
3108 }
3109 }
3110 unsafe extern "system" fn remove_WindowCloseRequested<
3111 Identity: ICoreWebView2_Impl,
3112 const OFFSET: isize,
3113 >(
3114 this: *mut core::ffi::c_void,
3115 token: i64,
3116 ) -> windows_core::HRESULT {
3117 unsafe {
3118 let this: &Identity =
3119 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3120 ICoreWebView2_Impl::remove_WindowCloseRequested(
3121 this,
3122 core::mem::transmute_copy(&token),
3123 )
3124 .into()
3125 }
3126 }
3127 Self {
3128 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
3129 Settings: Settings::<Identity, OFFSET>,
3130 Source: Source::<Identity, OFFSET>,
3131 Navigate: Navigate::<Identity, OFFSET>,
3132 NavigateToString: NavigateToString::<Identity, OFFSET>,
3133 add_NavigationStarting: add_NavigationStarting::<Identity, OFFSET>,
3134 remove_NavigationStarting: remove_NavigationStarting::<Identity, OFFSET>,
3135 add_ContentLoading: add_ContentLoading::<Identity, OFFSET>,
3136 remove_ContentLoading: remove_ContentLoading::<Identity, OFFSET>,
3137 add_SourceChanged: add_SourceChanged::<Identity, OFFSET>,
3138 remove_SourceChanged: remove_SourceChanged::<Identity, OFFSET>,
3139 add_HistoryChanged: add_HistoryChanged::<Identity, OFFSET>,
3140 remove_HistoryChanged: remove_HistoryChanged::<Identity, OFFSET>,
3141 add_NavigationCompleted: add_NavigationCompleted::<Identity, OFFSET>,
3142 remove_NavigationCompleted: remove_NavigationCompleted::<Identity, OFFSET>,
3143 add_FrameNavigationStarting: add_FrameNavigationStarting::<Identity, OFFSET>,
3144 remove_FrameNavigationStarting: remove_FrameNavigationStarting::<Identity, OFFSET>,
3145 add_FrameNavigationCompleted: add_FrameNavigationCompleted::<Identity, OFFSET>,
3146 remove_FrameNavigationCompleted: remove_FrameNavigationCompleted::<Identity, OFFSET>,
3147 add_ScriptDialogOpening: add_ScriptDialogOpening::<Identity, OFFSET>,
3148 remove_ScriptDialogOpening: remove_ScriptDialogOpening::<Identity, OFFSET>,
3149 add_PermissionRequested: add_PermissionRequested::<Identity, OFFSET>,
3150 remove_PermissionRequested: remove_PermissionRequested::<Identity, OFFSET>,
3151 add_ProcessFailed: add_ProcessFailed::<Identity, OFFSET>,
3152 remove_ProcessFailed: remove_ProcessFailed::<Identity, OFFSET>,
3153 AddScriptToExecuteOnDocumentCreated: AddScriptToExecuteOnDocumentCreated::<
3154 Identity,
3155 OFFSET,
3156 >,
3157 RemoveScriptToExecuteOnDocumentCreated: RemoveScriptToExecuteOnDocumentCreated::<
3158 Identity,
3159 OFFSET,
3160 >,
3161 ExecuteScript: ExecuteScript::<Identity, OFFSET>,
3162 CapturePreview: CapturePreview::<Identity, OFFSET>,
3163 Reload: Reload::<Identity, OFFSET>,
3164 PostWebMessageAsJson: PostWebMessageAsJson::<Identity, OFFSET>,
3165 PostWebMessageAsString: PostWebMessageAsString::<Identity, OFFSET>,
3166 add_WebMessageReceived: add_WebMessageReceived::<Identity, OFFSET>,
3167 remove_WebMessageReceived: remove_WebMessageReceived::<Identity, OFFSET>,
3168 CallDevToolsProtocolMethod: CallDevToolsProtocolMethod::<Identity, OFFSET>,
3169 BrowserProcessId: BrowserProcessId::<Identity, OFFSET>,
3170 CanGoBack: CanGoBack::<Identity, OFFSET>,
3171 CanGoForward: CanGoForward::<Identity, OFFSET>,
3172 GoBack: GoBack::<Identity, OFFSET>,
3173 GoForward: GoForward::<Identity, OFFSET>,
3174 GetDevToolsProtocolEventReceiver: GetDevToolsProtocolEventReceiver::<Identity, OFFSET>,
3175 Stop: Stop::<Identity, OFFSET>,
3176 add_NewWindowRequested: add_NewWindowRequested::<Identity, OFFSET>,
3177 remove_NewWindowRequested: remove_NewWindowRequested::<Identity, OFFSET>,
3178 add_DocumentTitleChanged: add_DocumentTitleChanged::<Identity, OFFSET>,
3179 remove_DocumentTitleChanged: remove_DocumentTitleChanged::<Identity, OFFSET>,
3180 DocumentTitle: DocumentTitle::<Identity, OFFSET>,
3181 AddHostObjectToScript: AddHostObjectToScript::<Identity, OFFSET>,
3182 RemoveHostObjectFromScript: RemoveHostObjectFromScript::<Identity, OFFSET>,
3183 OpenDevToolsWindow: OpenDevToolsWindow::<Identity, OFFSET>,
3184 add_ContainsFullScreenElementChanged: add_ContainsFullScreenElementChanged::<
3185 Identity,
3186 OFFSET,
3187 >,
3188 remove_ContainsFullScreenElementChanged: remove_ContainsFullScreenElementChanged::<
3189 Identity,
3190 OFFSET,
3191 >,
3192 ContainsFullScreenElement: ContainsFullScreenElement::<Identity, OFFSET>,
3193 add_WebResourceRequested: add_WebResourceRequested::<Identity, OFFSET>,
3194 remove_WebResourceRequested: remove_WebResourceRequested::<Identity, OFFSET>,
3195 AddWebResourceRequestedFilter: AddWebResourceRequestedFilter::<Identity, OFFSET>,
3196 RemoveWebResourceRequestedFilter: RemoveWebResourceRequestedFilter::<Identity, OFFSET>,
3197 add_WindowCloseRequested: add_WindowCloseRequested::<Identity, OFFSET>,
3198 remove_WindowCloseRequested: remove_WindowCloseRequested::<Identity, OFFSET>,
3199 }
3200 }
3201 pub fn matches(iid: &windows_core::GUID) -> bool {
3202 iid == &<ICoreWebView2 as windows_core::Interface>::IID
3203 }
3204}
3205impl windows_core::RuntimeName for ICoreWebView2 {}
3206windows_core::imp::define_interface!(
3207 ICoreWebView2AcceleratorKeyPressedEventArgs,
3208 ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl,
3209 0x9f760f8a_fb79_42be_9990_7b56900fa9c7
3210);
3211windows_core::imp::interface_hierarchy!(
3212 ICoreWebView2AcceleratorKeyPressedEventArgs,
3213 windows_core::IUnknown
3214);
3215impl ICoreWebView2AcceleratorKeyPressedEventArgs {
3216 pub unsafe fn KeyEventKind(
3217 &self,
3218 keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
3219 ) -> windows_core::Result<()> {
3220 unsafe {
3221 (windows_core::Interface::vtable(self).KeyEventKind)(
3222 windows_core::Interface::as_raw(self),
3223 keyeventkind as _,
3224 )
3225 .ok()
3226 }
3227 }
3228 pub unsafe fn VirtualKey(&self, virtualkey: *mut u32) -> windows_core::Result<()> {
3229 unsafe {
3230 (windows_core::Interface::vtable(self).VirtualKey)(
3231 windows_core::Interface::as_raw(self),
3232 virtualkey as _,
3233 )
3234 .ok()
3235 }
3236 }
3237 pub unsafe fn KeyEventLParam(&self, lparam: *mut i32) -> windows_core::Result<()> {
3238 unsafe {
3239 (windows_core::Interface::vtable(self).KeyEventLParam)(
3240 windows_core::Interface::as_raw(self),
3241 lparam as _,
3242 )
3243 .ok()
3244 }
3245 }
3246 pub unsafe fn PhysicalKeyStatus(
3247 &self,
3248 physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
3249 ) -> windows_core::Result<()> {
3250 unsafe {
3251 (windows_core::Interface::vtable(self).PhysicalKeyStatus)(
3252 windows_core::Interface::as_raw(self),
3253 physicalkeystatus as _,
3254 )
3255 .ok()
3256 }
3257 }
3258 pub unsafe fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()> {
3259 unsafe {
3260 (windows_core::Interface::vtable(self).Handled)(
3261 windows_core::Interface::as_raw(self),
3262 handled as _,
3263 )
3264 .ok()
3265 }
3266 }
3267 pub unsafe fn SetHandled(&self, handled: bool) -> windows_core::Result<()> {
3268 unsafe {
3269 (windows_core::Interface::vtable(self).SetHandled)(
3270 windows_core::Interface::as_raw(self),
3271 handled.into(),
3272 )
3273 .ok()
3274 }
3275 }
3276}
3277#[repr(C)]
3278pub struct ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
3279 pub base__: windows_core::IUnknown_Vtbl,
3280 pub KeyEventKind: unsafe extern "system" fn(
3281 *mut core::ffi::c_void,
3282 *mut COREWEBVIEW2_KEY_EVENT_KIND,
3283 ) -> windows_core::HRESULT,
3284 pub VirtualKey:
3285 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
3286 pub KeyEventLParam:
3287 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
3288 pub PhysicalKeyStatus: unsafe extern "system" fn(
3289 *mut core::ffi::c_void,
3290 *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
3291 ) -> windows_core::HRESULT,
3292 pub Handled: unsafe extern "system" fn(
3293 *mut core::ffi::c_void,
3294 *mut windows_core::BOOL,
3295 ) -> windows_core::HRESULT,
3296 pub SetHandled: unsafe extern "system" fn(
3297 *mut core::ffi::c_void,
3298 windows_core::BOOL,
3299 ) -> windows_core::HRESULT,
3300}
3301pub trait ICoreWebView2AcceleratorKeyPressedEventArgs_Impl: windows_core::IUnknownImpl {
3302 fn KeyEventKind(
3303 &self,
3304 keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
3305 ) -> windows_core::Result<()>;
3306 fn VirtualKey(&self, virtualkey: *mut u32) -> windows_core::Result<()>;
3307 fn KeyEventLParam(&self, lparam: *mut i32) -> windows_core::Result<()>;
3308 fn PhysicalKeyStatus(
3309 &self,
3310 physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
3311 ) -> windows_core::Result<()>;
3312 fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()>;
3313 fn SetHandled(&self, handled: windows_core::BOOL) -> windows_core::Result<()>;
3314}
3315impl ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl {
3316 pub const fn new<
3317 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3318 const OFFSET: isize,
3319 >() -> Self {
3320 unsafe extern "system" fn KeyEventKind<
3321 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3322 const OFFSET: isize,
3323 >(
3324 this: *mut core::ffi::c_void,
3325 keyeventkind: *mut COREWEBVIEW2_KEY_EVENT_KIND,
3326 ) -> windows_core::HRESULT {
3327 unsafe {
3328 let this: &Identity =
3329 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3330 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::KeyEventKind(
3331 this,
3332 core::mem::transmute_copy(&keyeventkind),
3333 )
3334 .into()
3335 }
3336 }
3337 unsafe extern "system" fn VirtualKey<
3338 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3339 const OFFSET: isize,
3340 >(
3341 this: *mut core::ffi::c_void,
3342 virtualkey: *mut u32,
3343 ) -> windows_core::HRESULT {
3344 unsafe {
3345 let this: &Identity =
3346 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3347 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::VirtualKey(
3348 this,
3349 core::mem::transmute_copy(&virtualkey),
3350 )
3351 .into()
3352 }
3353 }
3354 unsafe extern "system" fn KeyEventLParam<
3355 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3356 const OFFSET: isize,
3357 >(
3358 this: *mut core::ffi::c_void,
3359 lparam: *mut i32,
3360 ) -> windows_core::HRESULT {
3361 unsafe {
3362 let this: &Identity =
3363 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3364 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::KeyEventLParam(
3365 this,
3366 core::mem::transmute_copy(&lparam),
3367 )
3368 .into()
3369 }
3370 }
3371 unsafe extern "system" fn PhysicalKeyStatus<
3372 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3373 const OFFSET: isize,
3374 >(
3375 this: *mut core::ffi::c_void,
3376 physicalkeystatus: *mut COREWEBVIEW2_PHYSICAL_KEY_STATUS,
3377 ) -> windows_core::HRESULT {
3378 unsafe {
3379 let this: &Identity =
3380 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3381 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::PhysicalKeyStatus(
3382 this,
3383 core::mem::transmute_copy(&physicalkeystatus),
3384 )
3385 .into()
3386 }
3387 }
3388 unsafe extern "system" fn Handled<
3389 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3390 const OFFSET: isize,
3391 >(
3392 this: *mut core::ffi::c_void,
3393 handled: *mut windows_core::BOOL,
3394 ) -> windows_core::HRESULT {
3395 unsafe {
3396 let this: &Identity =
3397 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3398 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::Handled(
3399 this,
3400 core::mem::transmute_copy(&handled),
3401 )
3402 .into()
3403 }
3404 }
3405 unsafe extern "system" fn SetHandled<
3406 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs_Impl,
3407 const OFFSET: isize,
3408 >(
3409 this: *mut core::ffi::c_void,
3410 handled: windows_core::BOOL,
3411 ) -> windows_core::HRESULT {
3412 unsafe {
3413 let this: &Identity =
3414 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3415 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl::SetHandled(
3416 this,
3417 core::mem::transmute_copy(&handled),
3418 )
3419 .into()
3420 }
3421 }
3422 Self {
3423 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
3424 KeyEventKind: KeyEventKind::<Identity, OFFSET>,
3425 VirtualKey: VirtualKey::<Identity, OFFSET>,
3426 KeyEventLParam: KeyEventLParam::<Identity, OFFSET>,
3427 PhysicalKeyStatus: PhysicalKeyStatus::<Identity, OFFSET>,
3428 Handled: Handled::<Identity, OFFSET>,
3429 SetHandled: SetHandled::<Identity, OFFSET>,
3430 }
3431 }
3432 pub fn matches(iid: &windows_core::GUID) -> bool {
3433 iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs as windows_core::Interface>::IID
3434 }
3435}
3436impl windows_core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventArgs {}
3437windows_core::imp::define_interface!(
3438 ICoreWebView2AcceleratorKeyPressedEventArgs2,
3439 ICoreWebView2AcceleratorKeyPressedEventArgs2_Vtbl,
3440 0x03b2c8c8_7799_4e34_bd66_ed26aa85f2bf
3441);
3442impl core::ops::Deref for ICoreWebView2AcceleratorKeyPressedEventArgs2 {
3443 type Target = ICoreWebView2AcceleratorKeyPressedEventArgs;
3444 fn deref(&self) -> &Self::Target {
3445 unsafe { core::mem::transmute(self) }
3446 }
3447}
3448windows_core::imp::interface_hierarchy!(
3449 ICoreWebView2AcceleratorKeyPressedEventArgs2,
3450 windows_core::IUnknown,
3451 ICoreWebView2AcceleratorKeyPressedEventArgs
3452);
3453impl ICoreWebView2AcceleratorKeyPressedEventArgs2 {
3454 pub unsafe fn IsBrowserAcceleratorKeyEnabled(
3455 &self,
3456 value: *mut windows_core::BOOL,
3457 ) -> windows_core::Result<()> {
3458 unsafe {
3459 (windows_core::Interface::vtable(self).IsBrowserAcceleratorKeyEnabled)(
3460 windows_core::Interface::as_raw(self),
3461 value as _,
3462 )
3463 .ok()
3464 }
3465 }
3466 pub unsafe fn SetIsBrowserAcceleratorKeyEnabled(
3467 &self,
3468 value: bool,
3469 ) -> windows_core::Result<()> {
3470 unsafe {
3471 (windows_core::Interface::vtable(self).SetIsBrowserAcceleratorKeyEnabled)(
3472 windows_core::Interface::as_raw(self),
3473 value.into(),
3474 )
3475 .ok()
3476 }
3477 }
3478}
3479#[repr(C)]
3480pub struct ICoreWebView2AcceleratorKeyPressedEventArgs2_Vtbl {
3481 pub base__: ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl,
3482 pub IsBrowserAcceleratorKeyEnabled: unsafe extern "system" fn(
3483 *mut core::ffi::c_void,
3484 *mut windows_core::BOOL,
3485 ) -> windows_core::HRESULT,
3486 pub SetIsBrowserAcceleratorKeyEnabled: unsafe extern "system" fn(
3487 *mut core::ffi::c_void,
3488 windows_core::BOOL,
3489 ) -> windows_core::HRESULT,
3490}
3491pub trait ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl:
3492 ICoreWebView2AcceleratorKeyPressedEventArgs_Impl
3493{
3494 fn IsBrowserAcceleratorKeyEnabled(
3495 &self,
3496 value: *mut windows_core::BOOL,
3497 ) -> windows_core::Result<()>;
3498 fn SetIsBrowserAcceleratorKeyEnabled(
3499 &self,
3500 value: windows_core::BOOL,
3501 ) -> windows_core::Result<()>;
3502}
3503impl ICoreWebView2AcceleratorKeyPressedEventArgs2_Vtbl {
3504 pub const fn new<
3505 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl,
3506 const OFFSET: isize,
3507 >() -> Self {
3508 unsafe extern "system" fn IsBrowserAcceleratorKeyEnabled<
3509 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl,
3510 const OFFSET: isize,
3511 >(
3512 this: *mut core::ffi::c_void,
3513 value: *mut windows_core::BOOL,
3514 ) -> windows_core::HRESULT {
3515 unsafe {
3516 let this: &Identity =
3517 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3518 ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl::IsBrowserAcceleratorKeyEnabled(
3519 this,
3520 core::mem::transmute_copy(&value),
3521 )
3522 .into()
3523 }
3524 }
3525 unsafe extern "system" fn SetIsBrowserAcceleratorKeyEnabled<
3526 Identity: ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl,
3527 const OFFSET: isize,
3528 >(
3529 this: *mut core::ffi::c_void,
3530 value: windows_core::BOOL,
3531 ) -> windows_core::HRESULT {
3532 unsafe {
3533 let this: &Identity =
3534 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3535 ICoreWebView2AcceleratorKeyPressedEventArgs2_Impl:: SetIsBrowserAcceleratorKeyEnabled ( this , core::mem::transmute_copy ( & value ) , ) . into ( )
3536 }
3537 }
3538 Self {
3539 base__: ICoreWebView2AcceleratorKeyPressedEventArgs_Vtbl::new::<Identity, OFFSET>(),
3540 IsBrowserAcceleratorKeyEnabled: IsBrowserAcceleratorKeyEnabled::<Identity, OFFSET>,
3541 SetIsBrowserAcceleratorKeyEnabled: SetIsBrowserAcceleratorKeyEnabled::<Identity, OFFSET>,
3542 }
3543 }
3544 pub fn matches(iid: &windows_core::GUID) -> bool {
3545 iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs2 as windows_core::Interface>::IID
3546 || iid == &<ICoreWebView2AcceleratorKeyPressedEventArgs as windows_core::Interface>::IID
3547 }
3548}
3549impl windows_core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventArgs2 {}
3550windows_core::imp::define_interface!(
3551 ICoreWebView2AcceleratorKeyPressedEventHandler,
3552 ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl,
3553 0xb29c7e28_fa79_41a8_8e44_65811c76dcb2
3554);
3555windows_core::imp::interface_hierarchy!(
3556 ICoreWebView2AcceleratorKeyPressedEventHandler,
3557 windows_core::IUnknown
3558);
3559impl ICoreWebView2AcceleratorKeyPressedEventHandler {
3560 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
3561 where
3562 P0: windows_core::Param<ICoreWebView2Controller>,
3563 P1: windows_core::Param<ICoreWebView2AcceleratorKeyPressedEventArgs>,
3564 {
3565 unsafe {
3566 (windows_core::Interface::vtable(self).Invoke)(
3567 windows_core::Interface::as_raw(self),
3568 sender.param().abi(),
3569 args.param().abi(),
3570 )
3571 .ok()
3572 }
3573 }
3574}
3575#[repr(C)]
3576pub struct ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
3577 pub base__: windows_core::IUnknown_Vtbl,
3578 pub Invoke: unsafe extern "system" fn(
3579 *mut core::ffi::c_void,
3580 *mut core::ffi::c_void,
3581 *mut core::ffi::c_void,
3582 ) -> windows_core::HRESULT,
3583}
3584pub trait ICoreWebView2AcceleratorKeyPressedEventHandler_Impl: windows_core::IUnknownImpl {
3585 fn Invoke(
3586 &self,
3587 sender: windows_core::Ref<'_, ICoreWebView2Controller>,
3588 args: windows_core::Ref<'_, ICoreWebView2AcceleratorKeyPressedEventArgs>,
3589 ) -> windows_core::Result<()>;
3590}
3591impl ICoreWebView2AcceleratorKeyPressedEventHandler_Vtbl {
3592 pub const fn new<
3593 Identity: ICoreWebView2AcceleratorKeyPressedEventHandler_Impl,
3594 const OFFSET: isize,
3595 >() -> Self {
3596 unsafe extern "system" fn Invoke<
3597 Identity: ICoreWebView2AcceleratorKeyPressedEventHandler_Impl,
3598 const OFFSET: isize,
3599 >(
3600 this: *mut core::ffi::c_void,
3601 sender: *mut core::ffi::c_void,
3602 args: *mut core::ffi::c_void,
3603 ) -> windows_core::HRESULT {
3604 unsafe {
3605 let this: &Identity =
3606 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3607 ICoreWebView2AcceleratorKeyPressedEventHandler_Impl::Invoke(
3608 this,
3609 core::mem::transmute_copy(&sender),
3610 core::mem::transmute_copy(&args),
3611 )
3612 .into()
3613 }
3614 }
3615 Self {
3616 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
3617 Invoke: Invoke::<Identity, OFFSET>,
3618 }
3619 }
3620 pub fn matches(iid: &windows_core::GUID) -> bool {
3621 iid == &<ICoreWebView2AcceleratorKeyPressedEventHandler as windows_core::Interface>::IID
3622 }
3623}
3624impl windows_core::RuntimeName for ICoreWebView2AcceleratorKeyPressedEventHandler {}
3625windows_core::imp::define_interface!(
3626 ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
3627 ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl,
3628 0xb99369f3_9b11_47b5_bc6f_8e7895fcea17
3629);
3630windows_core::imp::interface_hierarchy!(
3631 ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler,
3632 windows_core::IUnknown
3633);
3634impl ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler {
3635 pub unsafe fn Invoke<P1>(
3636 &self,
3637 errorcode: windows_core::HRESULT,
3638 result: P1,
3639 ) -> windows_core::Result<()>
3640 where
3641 P1: windows_core::Param<windows_core::PCWSTR>,
3642 {
3643 unsafe {
3644 (windows_core::Interface::vtable(self).Invoke)(
3645 windows_core::Interface::as_raw(self),
3646 errorcode,
3647 result.param().abi(),
3648 )
3649 .ok()
3650 }
3651 }
3652}
3653#[repr(C)]
3654pub struct ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
3655 pub base__: windows_core::IUnknown_Vtbl,
3656 pub Invoke: unsafe extern "system" fn(
3657 *mut core::ffi::c_void,
3658 windows_core::HRESULT,
3659 windows_core::PCWSTR,
3660 ) -> windows_core::HRESULT,
3661}
3662pub trait ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl:
3663 windows_core::IUnknownImpl
3664{
3665 fn Invoke(
3666 &self,
3667 errorcode: windows_core::HRESULT,
3668 result: &windows_core::PCWSTR,
3669 ) -> windows_core::Result<()>;
3670}
3671impl ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Vtbl {
3672 pub const fn new<
3673 Identity: ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl,
3674 const OFFSET: isize,
3675 >() -> Self {
3676 unsafe extern "system" fn Invoke<
3677 Identity: ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl,
3678 const OFFSET: isize,
3679 >(
3680 this: *mut core::ffi::c_void,
3681 errorcode: windows_core::HRESULT,
3682 result: windows_core::PCWSTR,
3683 ) -> windows_core::HRESULT {
3684 unsafe {
3685 let this: &Identity =
3686 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3687 ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler_Impl::Invoke(
3688 this,
3689 core::mem::transmute_copy(&errorcode),
3690 core::mem::transmute(&result),
3691 )
3692 .into()
3693 }
3694 }
3695 Self {
3696 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
3697 Invoke: Invoke::<Identity, OFFSET>,
3698 }
3699 }
3700 pub fn matches(iid: &windows_core::GUID) -> bool {
3701 iid == & < ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler as windows_core::Interface >::IID
3702 }
3703}
3704impl windows_core::RuntimeName
3705 for ICoreWebView2AddScriptToExecuteOnDocumentCreatedCompletedHandler
3706{
3707}
3708windows_core::imp::define_interface!(
3709 ICoreWebView2BasicAuthenticationRequestedEventArgs,
3710 ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl,
3711 0xef05516f_d897_4f9e_b672_d8e2307a3fb0
3712);
3713windows_core::imp::interface_hierarchy!(
3714 ICoreWebView2BasicAuthenticationRequestedEventArgs,
3715 windows_core::IUnknown
3716);
3717impl ICoreWebView2BasicAuthenticationRequestedEventArgs {
3718 pub unsafe fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
3719 unsafe {
3720 (windows_core::Interface::vtable(self).Uri)(
3721 windows_core::Interface::as_raw(self),
3722 value as _,
3723 )
3724 .ok()
3725 }
3726 }
3727 pub unsafe fn Challenge(
3728 &self,
3729 challenge: *mut windows_core::PWSTR,
3730 ) -> windows_core::Result<()> {
3731 unsafe {
3732 (windows_core::Interface::vtable(self).Challenge)(
3733 windows_core::Interface::as_raw(self),
3734 challenge as _,
3735 )
3736 .ok()
3737 }
3738 }
3739 pub unsafe fn Response(
3740 &self,
3741 ) -> windows_core::Result<ICoreWebView2BasicAuthenticationResponse> {
3742 unsafe {
3743 let mut result__ = core::mem::zeroed();
3744 (windows_core::Interface::vtable(self).Response)(
3745 windows_core::Interface::as_raw(self),
3746 &mut result__,
3747 )
3748 .and_then(|| windows_core::Type::from_abi(result__))
3749 }
3750 }
3751 pub unsafe fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()> {
3752 unsafe {
3753 (windows_core::Interface::vtable(self).Cancel)(
3754 windows_core::Interface::as_raw(self),
3755 cancel as _,
3756 )
3757 .ok()
3758 }
3759 }
3760 pub unsafe fn SetCancel(&self, cancel: bool) -> windows_core::Result<()> {
3761 unsafe {
3762 (windows_core::Interface::vtable(self).SetCancel)(
3763 windows_core::Interface::as_raw(self),
3764 cancel.into(),
3765 )
3766 .ok()
3767 }
3768 }
3769 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
3770 unsafe {
3771 let mut result__ = core::mem::zeroed();
3772 (windows_core::Interface::vtable(self).GetDeferral)(
3773 windows_core::Interface::as_raw(self),
3774 &mut result__,
3775 )
3776 .and_then(|| windows_core::Type::from_abi(result__))
3777 }
3778 }
3779}
3780#[repr(C)]
3781pub struct ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
3782 pub base__: windows_core::IUnknown_Vtbl,
3783 pub Uri: unsafe extern "system" fn(
3784 *mut core::ffi::c_void,
3785 *mut windows_core::PWSTR,
3786 ) -> windows_core::HRESULT,
3787 pub Challenge: unsafe extern "system" fn(
3788 *mut core::ffi::c_void,
3789 *mut windows_core::PWSTR,
3790 ) -> windows_core::HRESULT,
3791 pub Response: unsafe extern "system" fn(
3792 *mut core::ffi::c_void,
3793 *mut *mut core::ffi::c_void,
3794 ) -> windows_core::HRESULT,
3795 pub Cancel: unsafe extern "system" fn(
3796 *mut core::ffi::c_void,
3797 *mut windows_core::BOOL,
3798 ) -> windows_core::HRESULT,
3799 pub SetCancel: unsafe extern "system" fn(
3800 *mut core::ffi::c_void,
3801 windows_core::BOOL,
3802 ) -> windows_core::HRESULT,
3803 pub GetDeferral: unsafe extern "system" fn(
3804 *mut core::ffi::c_void,
3805 *mut *mut core::ffi::c_void,
3806 ) -> windows_core::HRESULT,
3807}
3808pub trait ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl:
3809 windows_core::IUnknownImpl
3810{
3811 fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
3812 fn Challenge(&self, challenge: *mut windows_core::PWSTR) -> windows_core::Result<()>;
3813 fn Response(&self) -> windows_core::Result<ICoreWebView2BasicAuthenticationResponse>;
3814 fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()>;
3815 fn SetCancel(&self, cancel: windows_core::BOOL) -> windows_core::Result<()>;
3816 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
3817}
3818impl ICoreWebView2BasicAuthenticationRequestedEventArgs_Vtbl {
3819 pub const fn new<
3820 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3821 const OFFSET: isize,
3822 >() -> Self {
3823 unsafe extern "system" fn Uri<
3824 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3825 const OFFSET: isize,
3826 >(
3827 this: *mut core::ffi::c_void,
3828 value: *mut windows_core::PWSTR,
3829 ) -> windows_core::HRESULT {
3830 unsafe {
3831 let this: &Identity =
3832 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3833 ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Uri(
3834 this,
3835 core::mem::transmute_copy(&value),
3836 )
3837 .into()
3838 }
3839 }
3840 unsafe extern "system" fn Challenge<
3841 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3842 const OFFSET: isize,
3843 >(
3844 this: *mut core::ffi::c_void,
3845 challenge: *mut windows_core::PWSTR,
3846 ) -> windows_core::HRESULT {
3847 unsafe {
3848 let this: &Identity =
3849 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3850 ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Challenge(
3851 this,
3852 core::mem::transmute_copy(&challenge),
3853 )
3854 .into()
3855 }
3856 }
3857 unsafe extern "system" fn Response<
3858 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3859 const OFFSET: isize,
3860 >(
3861 this: *mut core::ffi::c_void,
3862 response: *mut *mut core::ffi::c_void,
3863 ) -> windows_core::HRESULT {
3864 unsafe {
3865 let this: &Identity =
3866 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3867 match ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Response(this) {
3868 Ok(ok__) => {
3869 response.write(core::mem::transmute(ok__));
3870 windows_core::HRESULT(0)
3871 }
3872 Err(err) => err.into(),
3873 }
3874 }
3875 }
3876 unsafe extern "system" fn Cancel<
3877 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3878 const OFFSET: isize,
3879 >(
3880 this: *mut core::ffi::c_void,
3881 cancel: *mut windows_core::BOOL,
3882 ) -> windows_core::HRESULT {
3883 unsafe {
3884 let this: &Identity =
3885 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3886 ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::Cancel(
3887 this,
3888 core::mem::transmute_copy(&cancel),
3889 )
3890 .into()
3891 }
3892 }
3893 unsafe extern "system" fn SetCancel<
3894 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3895 const OFFSET: isize,
3896 >(
3897 this: *mut core::ffi::c_void,
3898 cancel: windows_core::BOOL,
3899 ) -> windows_core::HRESULT {
3900 unsafe {
3901 let this: &Identity =
3902 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3903 ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::SetCancel(
3904 this,
3905 core::mem::transmute_copy(&cancel),
3906 )
3907 .into()
3908 }
3909 }
3910 unsafe extern "system" fn GetDeferral<
3911 Identity: ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl,
3912 const OFFSET: isize,
3913 >(
3914 this: *mut core::ffi::c_void,
3915 deferral: *mut *mut core::ffi::c_void,
3916 ) -> windows_core::HRESULT {
3917 unsafe {
3918 let this: &Identity =
3919 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
3920 match ICoreWebView2BasicAuthenticationRequestedEventArgs_Impl::GetDeferral(this) {
3921 Ok(ok__) => {
3922 deferral.write(core::mem::transmute(ok__));
3923 windows_core::HRESULT(0)
3924 }
3925 Err(err) => err.into(),
3926 }
3927 }
3928 }
3929 Self {
3930 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
3931 Uri: Uri::<Identity, OFFSET>,
3932 Challenge: Challenge::<Identity, OFFSET>,
3933 Response: Response::<Identity, OFFSET>,
3934 Cancel: Cancel::<Identity, OFFSET>,
3935 SetCancel: SetCancel::<Identity, OFFSET>,
3936 GetDeferral: GetDeferral::<Identity, OFFSET>,
3937 }
3938 }
3939 pub fn matches(iid: &windows_core::GUID) -> bool {
3940 iid == &<ICoreWebView2BasicAuthenticationRequestedEventArgs as windows_core::Interface>::IID
3941 }
3942}
3943impl windows_core::RuntimeName for ICoreWebView2BasicAuthenticationRequestedEventArgs {}
3944windows_core::imp::define_interface!(
3945 ICoreWebView2BasicAuthenticationRequestedEventHandler,
3946 ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl,
3947 0x58b4d6c2_18d4_497e_b39b_9a96533fa278
3948);
3949windows_core::imp::interface_hierarchy!(
3950 ICoreWebView2BasicAuthenticationRequestedEventHandler,
3951 windows_core::IUnknown
3952);
3953impl ICoreWebView2BasicAuthenticationRequestedEventHandler {
3954 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
3955 where
3956 P0: windows_core::Param<ICoreWebView2>,
3957 P1: windows_core::Param<ICoreWebView2BasicAuthenticationRequestedEventArgs>,
3958 {
3959 unsafe {
3960 (windows_core::Interface::vtable(self).Invoke)(
3961 windows_core::Interface::as_raw(self),
3962 sender.param().abi(),
3963 args.param().abi(),
3964 )
3965 .ok()
3966 }
3967 }
3968}
3969#[repr(C)]
3970pub struct ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
3971 pub base__: windows_core::IUnknown_Vtbl,
3972 pub Invoke: unsafe extern "system" fn(
3973 *mut core::ffi::c_void,
3974 *mut core::ffi::c_void,
3975 *mut core::ffi::c_void,
3976 ) -> windows_core::HRESULT,
3977}
3978pub trait ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl:
3979 windows_core::IUnknownImpl
3980{
3981 fn Invoke(
3982 &self,
3983 sender: windows_core::Ref<'_, ICoreWebView2>,
3984 args: windows_core::Ref<'_, ICoreWebView2BasicAuthenticationRequestedEventArgs>,
3985 ) -> windows_core::Result<()>;
3986}
3987impl ICoreWebView2BasicAuthenticationRequestedEventHandler_Vtbl {
3988 pub const fn new<
3989 Identity: ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl,
3990 const OFFSET: isize,
3991 >() -> Self {
3992 unsafe extern "system" fn Invoke<
3993 Identity: ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl,
3994 const OFFSET: isize,
3995 >(
3996 this: *mut core::ffi::c_void,
3997 sender: *mut core::ffi::c_void,
3998 args: *mut core::ffi::c_void,
3999 ) -> windows_core::HRESULT {
4000 unsafe {
4001 let this: &Identity =
4002 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4003 ICoreWebView2BasicAuthenticationRequestedEventHandler_Impl::Invoke(
4004 this,
4005 core::mem::transmute_copy(&sender),
4006 core::mem::transmute_copy(&args),
4007 )
4008 .into()
4009 }
4010 }
4011 Self {
4012 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4013 Invoke: Invoke::<Identity, OFFSET>,
4014 }
4015 }
4016 pub fn matches(iid: &windows_core::GUID) -> bool {
4017 iid == & < ICoreWebView2BasicAuthenticationRequestedEventHandler as windows_core::Interface >::IID
4018 }
4019}
4020impl windows_core::RuntimeName for ICoreWebView2BasicAuthenticationRequestedEventHandler {}
4021windows_core::imp::define_interface!(
4022 ICoreWebView2BasicAuthenticationResponse,
4023 ICoreWebView2BasicAuthenticationResponse_Vtbl,
4024 0x07023f7d_2d77_4d67_9040_6e7d428c6a40
4025);
4026windows_core::imp::interface_hierarchy!(
4027 ICoreWebView2BasicAuthenticationResponse,
4028 windows_core::IUnknown
4029);
4030impl ICoreWebView2BasicAuthenticationResponse {
4031 pub unsafe fn UserName(&self, username: *mut windows_core::PWSTR) -> windows_core::Result<()> {
4032 unsafe {
4033 (windows_core::Interface::vtable(self).UserName)(
4034 windows_core::Interface::as_raw(self),
4035 username as _,
4036 )
4037 .ok()
4038 }
4039 }
4040 pub unsafe fn SetUserName<P0>(&self, username: P0) -> windows_core::Result<()>
4041 where
4042 P0: windows_core::Param<windows_core::PCWSTR>,
4043 {
4044 unsafe {
4045 (windows_core::Interface::vtable(self).SetUserName)(
4046 windows_core::Interface::as_raw(self),
4047 username.param().abi(),
4048 )
4049 .ok()
4050 }
4051 }
4052 pub unsafe fn Password(&self, password: *mut windows_core::PWSTR) -> windows_core::Result<()> {
4053 unsafe {
4054 (windows_core::Interface::vtable(self).Password)(
4055 windows_core::Interface::as_raw(self),
4056 password as _,
4057 )
4058 .ok()
4059 }
4060 }
4061 pub unsafe fn SetPassword<P0>(&self, password: P0) -> windows_core::Result<()>
4062 where
4063 P0: windows_core::Param<windows_core::PCWSTR>,
4064 {
4065 unsafe {
4066 (windows_core::Interface::vtable(self).SetPassword)(
4067 windows_core::Interface::as_raw(self),
4068 password.param().abi(),
4069 )
4070 .ok()
4071 }
4072 }
4073}
4074#[repr(C)]
4075pub struct ICoreWebView2BasicAuthenticationResponse_Vtbl {
4076 pub base__: windows_core::IUnknown_Vtbl,
4077 pub UserName: unsafe extern "system" fn(
4078 *mut core::ffi::c_void,
4079 *mut windows_core::PWSTR,
4080 ) -> windows_core::HRESULT,
4081 pub SetUserName: unsafe extern "system" fn(
4082 *mut core::ffi::c_void,
4083 windows_core::PCWSTR,
4084 ) -> windows_core::HRESULT,
4085 pub Password: unsafe extern "system" fn(
4086 *mut core::ffi::c_void,
4087 *mut windows_core::PWSTR,
4088 ) -> windows_core::HRESULT,
4089 pub SetPassword: unsafe extern "system" fn(
4090 *mut core::ffi::c_void,
4091 windows_core::PCWSTR,
4092 ) -> windows_core::HRESULT,
4093}
4094pub trait ICoreWebView2BasicAuthenticationResponse_Impl: windows_core::IUnknownImpl {
4095 fn UserName(&self, username: *mut windows_core::PWSTR) -> windows_core::Result<()>;
4096 fn SetUserName(&self, username: &windows_core::PCWSTR) -> windows_core::Result<()>;
4097 fn Password(&self, password: *mut windows_core::PWSTR) -> windows_core::Result<()>;
4098 fn SetPassword(&self, password: &windows_core::PCWSTR) -> windows_core::Result<()>;
4099}
4100impl ICoreWebView2BasicAuthenticationResponse_Vtbl {
4101 pub const fn new<
4102 Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
4103 const OFFSET: isize,
4104 >() -> Self {
4105 unsafe extern "system" fn UserName<
4106 Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
4107 const OFFSET: isize,
4108 >(
4109 this: *mut core::ffi::c_void,
4110 username: *mut windows_core::PWSTR,
4111 ) -> windows_core::HRESULT {
4112 unsafe {
4113 let this: &Identity =
4114 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4115 ICoreWebView2BasicAuthenticationResponse_Impl::UserName(
4116 this,
4117 core::mem::transmute_copy(&username),
4118 )
4119 .into()
4120 }
4121 }
4122 unsafe extern "system" fn SetUserName<
4123 Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
4124 const OFFSET: isize,
4125 >(
4126 this: *mut core::ffi::c_void,
4127 username: windows_core::PCWSTR,
4128 ) -> windows_core::HRESULT {
4129 unsafe {
4130 let this: &Identity =
4131 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4132 ICoreWebView2BasicAuthenticationResponse_Impl::SetUserName(
4133 this,
4134 core::mem::transmute(&username),
4135 )
4136 .into()
4137 }
4138 }
4139 unsafe extern "system" fn Password<
4140 Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
4141 const OFFSET: isize,
4142 >(
4143 this: *mut core::ffi::c_void,
4144 password: *mut windows_core::PWSTR,
4145 ) -> windows_core::HRESULT {
4146 unsafe {
4147 let this: &Identity =
4148 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4149 ICoreWebView2BasicAuthenticationResponse_Impl::Password(
4150 this,
4151 core::mem::transmute_copy(&password),
4152 )
4153 .into()
4154 }
4155 }
4156 unsafe extern "system" fn SetPassword<
4157 Identity: ICoreWebView2BasicAuthenticationResponse_Impl,
4158 const OFFSET: isize,
4159 >(
4160 this: *mut core::ffi::c_void,
4161 password: windows_core::PCWSTR,
4162 ) -> windows_core::HRESULT {
4163 unsafe {
4164 let this: &Identity =
4165 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4166 ICoreWebView2BasicAuthenticationResponse_Impl::SetPassword(
4167 this,
4168 core::mem::transmute(&password),
4169 )
4170 .into()
4171 }
4172 }
4173 Self {
4174 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4175 UserName: UserName::<Identity, OFFSET>,
4176 SetUserName: SetUserName::<Identity, OFFSET>,
4177 Password: Password::<Identity, OFFSET>,
4178 SetPassword: SetPassword::<Identity, OFFSET>,
4179 }
4180 }
4181 pub fn matches(iid: &windows_core::GUID) -> bool {
4182 iid == &<ICoreWebView2BasicAuthenticationResponse as windows_core::Interface>::IID
4183 }
4184}
4185impl windows_core::RuntimeName for ICoreWebView2BasicAuthenticationResponse {}
4186windows_core::imp::define_interface!(
4187 ICoreWebView2BrowserExtension,
4188 ICoreWebView2BrowserExtension_Vtbl,
4189 0x7ef7ffa0_fac5_462c_b189_3d9edbe575da
4190);
4191windows_core::imp::interface_hierarchy!(ICoreWebView2BrowserExtension, windows_core::IUnknown);
4192impl ICoreWebView2BrowserExtension {
4193 pub unsafe fn Id(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
4194 unsafe {
4195 (windows_core::Interface::vtable(self).Id)(
4196 windows_core::Interface::as_raw(self),
4197 value as _,
4198 )
4199 .ok()
4200 }
4201 }
4202 pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
4203 unsafe {
4204 (windows_core::Interface::vtable(self).Name)(
4205 windows_core::Interface::as_raw(self),
4206 value as _,
4207 )
4208 .ok()
4209 }
4210 }
4211 pub unsafe fn Remove<P0>(&self, handler: P0) -> windows_core::Result<()>
4212 where
4213 P0: windows_core::Param<ICoreWebView2BrowserExtensionRemoveCompletedHandler>,
4214 {
4215 unsafe {
4216 (windows_core::Interface::vtable(self).Remove)(
4217 windows_core::Interface::as_raw(self),
4218 handler.param().abi(),
4219 )
4220 .ok()
4221 }
4222 }
4223 pub unsafe fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
4224 unsafe {
4225 (windows_core::Interface::vtable(self).IsEnabled)(
4226 windows_core::Interface::as_raw(self),
4227 value as _,
4228 )
4229 .ok()
4230 }
4231 }
4232 pub unsafe fn Enable<P1>(&self, isenabled: bool, handler: P1) -> windows_core::Result<()>
4233 where
4234 P1: windows_core::Param<ICoreWebView2BrowserExtensionEnableCompletedHandler>,
4235 {
4236 unsafe {
4237 (windows_core::Interface::vtable(self).Enable)(
4238 windows_core::Interface::as_raw(self),
4239 isenabled.into(),
4240 handler.param().abi(),
4241 )
4242 .ok()
4243 }
4244 }
4245}
4246#[repr(C)]
4247pub struct ICoreWebView2BrowserExtension_Vtbl {
4248 pub base__: windows_core::IUnknown_Vtbl,
4249 pub Id: unsafe extern "system" fn(
4250 *mut core::ffi::c_void,
4251 *mut windows_core::PWSTR,
4252 ) -> windows_core::HRESULT,
4253 pub Name: unsafe extern "system" fn(
4254 *mut core::ffi::c_void,
4255 *mut windows_core::PWSTR,
4256 ) -> windows_core::HRESULT,
4257 pub Remove: unsafe extern "system" fn(
4258 *mut core::ffi::c_void,
4259 *mut core::ffi::c_void,
4260 ) -> windows_core::HRESULT,
4261 pub IsEnabled: unsafe extern "system" fn(
4262 *mut core::ffi::c_void,
4263 *mut windows_core::BOOL,
4264 ) -> windows_core::HRESULT,
4265 pub Enable: unsafe extern "system" fn(
4266 *mut core::ffi::c_void,
4267 windows_core::BOOL,
4268 *mut core::ffi::c_void,
4269 ) -> windows_core::HRESULT,
4270}
4271pub trait ICoreWebView2BrowserExtension_Impl: windows_core::IUnknownImpl {
4272 fn Id(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
4273 fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
4274 fn Remove(
4275 &self,
4276 handler: windows_core::Ref<'_, ICoreWebView2BrowserExtensionRemoveCompletedHandler>,
4277 ) -> windows_core::Result<()>;
4278 fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
4279 fn Enable(
4280 &self,
4281 isenabled: windows_core::BOOL,
4282 handler: windows_core::Ref<'_, ICoreWebView2BrowserExtensionEnableCompletedHandler>,
4283 ) -> windows_core::Result<()>;
4284}
4285impl ICoreWebView2BrowserExtension_Vtbl {
4286 pub const fn new<Identity: ICoreWebView2BrowserExtension_Impl, const OFFSET: isize>() -> Self {
4287 unsafe extern "system" fn Id<
4288 Identity: ICoreWebView2BrowserExtension_Impl,
4289 const OFFSET: isize,
4290 >(
4291 this: *mut core::ffi::c_void,
4292 value: *mut windows_core::PWSTR,
4293 ) -> windows_core::HRESULT {
4294 unsafe {
4295 let this: &Identity =
4296 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4297 ICoreWebView2BrowserExtension_Impl::Id(this, core::mem::transmute_copy(&value))
4298 .into()
4299 }
4300 }
4301 unsafe extern "system" fn Name<
4302 Identity: ICoreWebView2BrowserExtension_Impl,
4303 const OFFSET: isize,
4304 >(
4305 this: *mut core::ffi::c_void,
4306 value: *mut windows_core::PWSTR,
4307 ) -> windows_core::HRESULT {
4308 unsafe {
4309 let this: &Identity =
4310 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4311 ICoreWebView2BrowserExtension_Impl::Name(this, core::mem::transmute_copy(&value))
4312 .into()
4313 }
4314 }
4315 unsafe extern "system" fn Remove<
4316 Identity: ICoreWebView2BrowserExtension_Impl,
4317 const OFFSET: isize,
4318 >(
4319 this: *mut core::ffi::c_void,
4320 handler: *mut core::ffi::c_void,
4321 ) -> windows_core::HRESULT {
4322 unsafe {
4323 let this: &Identity =
4324 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4325 ICoreWebView2BrowserExtension_Impl::Remove(
4326 this,
4327 core::mem::transmute_copy(&handler),
4328 )
4329 .into()
4330 }
4331 }
4332 unsafe extern "system" fn IsEnabled<
4333 Identity: ICoreWebView2BrowserExtension_Impl,
4334 const OFFSET: isize,
4335 >(
4336 this: *mut core::ffi::c_void,
4337 value: *mut windows_core::BOOL,
4338 ) -> windows_core::HRESULT {
4339 unsafe {
4340 let this: &Identity =
4341 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4342 ICoreWebView2BrowserExtension_Impl::IsEnabled(
4343 this,
4344 core::mem::transmute_copy(&value),
4345 )
4346 .into()
4347 }
4348 }
4349 unsafe extern "system" fn Enable<
4350 Identity: ICoreWebView2BrowserExtension_Impl,
4351 const OFFSET: isize,
4352 >(
4353 this: *mut core::ffi::c_void,
4354 isenabled: windows_core::BOOL,
4355 handler: *mut core::ffi::c_void,
4356 ) -> windows_core::HRESULT {
4357 unsafe {
4358 let this: &Identity =
4359 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4360 ICoreWebView2BrowserExtension_Impl::Enable(
4361 this,
4362 core::mem::transmute_copy(&isenabled),
4363 core::mem::transmute_copy(&handler),
4364 )
4365 .into()
4366 }
4367 }
4368 Self {
4369 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4370 Id: Id::<Identity, OFFSET>,
4371 Name: Name::<Identity, OFFSET>,
4372 Remove: Remove::<Identity, OFFSET>,
4373 IsEnabled: IsEnabled::<Identity, OFFSET>,
4374 Enable: Enable::<Identity, OFFSET>,
4375 }
4376 }
4377 pub fn matches(iid: &windows_core::GUID) -> bool {
4378 iid == &<ICoreWebView2BrowserExtension as windows_core::Interface>::IID
4379 }
4380}
4381impl windows_core::RuntimeName for ICoreWebView2BrowserExtension {}
4382windows_core::imp::define_interface!(
4383 ICoreWebView2BrowserExtensionEnableCompletedHandler,
4384 ICoreWebView2BrowserExtensionEnableCompletedHandler_Vtbl,
4385 0x30c186ce_7fad_421f_a3bc_a8eaf071ddb8
4386);
4387windows_core::imp::interface_hierarchy!(
4388 ICoreWebView2BrowserExtensionEnableCompletedHandler,
4389 windows_core::IUnknown
4390);
4391impl ICoreWebView2BrowserExtensionEnableCompletedHandler {
4392 pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
4393 unsafe {
4394 (windows_core::Interface::vtable(self).Invoke)(
4395 windows_core::Interface::as_raw(self),
4396 errorcode,
4397 )
4398 .ok()
4399 }
4400 }
4401}
4402#[repr(C)]
4403pub struct ICoreWebView2BrowserExtensionEnableCompletedHandler_Vtbl {
4404 pub base__: windows_core::IUnknown_Vtbl,
4405 pub Invoke: unsafe extern "system" fn(
4406 *mut core::ffi::c_void,
4407 windows_core::HRESULT,
4408 ) -> windows_core::HRESULT,
4409}
4410pub trait ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl:
4411 windows_core::IUnknownImpl
4412{
4413 fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
4414}
4415impl ICoreWebView2BrowserExtensionEnableCompletedHandler_Vtbl {
4416 pub const fn new<
4417 Identity: ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl,
4418 const OFFSET: isize,
4419 >() -> Self {
4420 unsafe extern "system" fn Invoke<
4421 Identity: ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl,
4422 const OFFSET: isize,
4423 >(
4424 this: *mut core::ffi::c_void,
4425 errorcode: windows_core::HRESULT,
4426 ) -> windows_core::HRESULT {
4427 unsafe {
4428 let this: &Identity =
4429 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4430 ICoreWebView2BrowserExtensionEnableCompletedHandler_Impl::Invoke(
4431 this,
4432 core::mem::transmute_copy(&errorcode),
4433 )
4434 .into()
4435 }
4436 }
4437 Self {
4438 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4439 Invoke: Invoke::<Identity, OFFSET>,
4440 }
4441 }
4442 pub fn matches(iid: &windows_core::GUID) -> bool {
4443 iid == & < ICoreWebView2BrowserExtensionEnableCompletedHandler as windows_core::Interface >::IID
4444 }
4445}
4446impl windows_core::RuntimeName for ICoreWebView2BrowserExtensionEnableCompletedHandler {}
4447windows_core::imp::define_interface!(
4448 ICoreWebView2BrowserExtensionList,
4449 ICoreWebView2BrowserExtensionList_Vtbl,
4450 0x2ef3d2dc_bd5f_4f4d_90af_fd67798f0c2f
4451);
4452windows_core::imp::interface_hierarchy!(ICoreWebView2BrowserExtensionList, windows_core::IUnknown);
4453impl ICoreWebView2BrowserExtensionList {
4454 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
4455 unsafe {
4456 (windows_core::Interface::vtable(self).Count)(
4457 windows_core::Interface::as_raw(self),
4458 value as _,
4459 )
4460 .ok()
4461 }
4462 }
4463 pub unsafe fn GetValueAtIndex(
4464 &self,
4465 index: u32,
4466 ) -> windows_core::Result<ICoreWebView2BrowserExtension> {
4467 unsafe {
4468 let mut result__ = core::mem::zeroed();
4469 (windows_core::Interface::vtable(self).GetValueAtIndex)(
4470 windows_core::Interface::as_raw(self),
4471 index,
4472 &mut result__,
4473 )
4474 .and_then(|| windows_core::Type::from_abi(result__))
4475 }
4476 }
4477}
4478#[repr(C)]
4479pub struct ICoreWebView2BrowserExtensionList_Vtbl {
4480 pub base__: windows_core::IUnknown_Vtbl,
4481 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
4482 pub GetValueAtIndex: unsafe extern "system" fn(
4483 *mut core::ffi::c_void,
4484 u32,
4485 *mut *mut core::ffi::c_void,
4486 ) -> windows_core::HRESULT,
4487}
4488pub trait ICoreWebView2BrowserExtensionList_Impl: windows_core::IUnknownImpl {
4489 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
4490 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2BrowserExtension>;
4491}
4492impl ICoreWebView2BrowserExtensionList_Vtbl {
4493 pub const fn new<Identity: ICoreWebView2BrowserExtensionList_Impl, const OFFSET: isize>() -> Self
4494 {
4495 unsafe extern "system" fn Count<
4496 Identity: ICoreWebView2BrowserExtensionList_Impl,
4497 const OFFSET: isize,
4498 >(
4499 this: *mut core::ffi::c_void,
4500 value: *mut u32,
4501 ) -> windows_core::HRESULT {
4502 unsafe {
4503 let this: &Identity =
4504 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4505 ICoreWebView2BrowserExtensionList_Impl::Count(
4506 this,
4507 core::mem::transmute_copy(&value),
4508 )
4509 .into()
4510 }
4511 }
4512 unsafe extern "system" fn GetValueAtIndex<
4513 Identity: ICoreWebView2BrowserExtensionList_Impl,
4514 const OFFSET: isize,
4515 >(
4516 this: *mut core::ffi::c_void,
4517 index: u32,
4518 value: *mut *mut core::ffi::c_void,
4519 ) -> windows_core::HRESULT {
4520 unsafe {
4521 let this: &Identity =
4522 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4523 match ICoreWebView2BrowserExtensionList_Impl::GetValueAtIndex(
4524 this,
4525 core::mem::transmute_copy(&index),
4526 ) {
4527 Ok(ok__) => {
4528 value.write(core::mem::transmute(ok__));
4529 windows_core::HRESULT(0)
4530 }
4531 Err(err) => err.into(),
4532 }
4533 }
4534 }
4535 Self {
4536 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4537 Count: Count::<Identity, OFFSET>,
4538 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
4539 }
4540 }
4541 pub fn matches(iid: &windows_core::GUID) -> bool {
4542 iid == &<ICoreWebView2BrowserExtensionList as windows_core::Interface>::IID
4543 }
4544}
4545impl windows_core::RuntimeName for ICoreWebView2BrowserExtensionList {}
4546windows_core::imp::define_interface!(
4547 ICoreWebView2BrowserExtensionRemoveCompletedHandler,
4548 ICoreWebView2BrowserExtensionRemoveCompletedHandler_Vtbl,
4549 0x8e41909a_9b18_4bb1_8cdf_930f467a50be
4550);
4551windows_core::imp::interface_hierarchy!(
4552 ICoreWebView2BrowserExtensionRemoveCompletedHandler,
4553 windows_core::IUnknown
4554);
4555impl ICoreWebView2BrowserExtensionRemoveCompletedHandler {
4556 pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
4557 unsafe {
4558 (windows_core::Interface::vtable(self).Invoke)(
4559 windows_core::Interface::as_raw(self),
4560 errorcode,
4561 )
4562 .ok()
4563 }
4564 }
4565}
4566#[repr(C)]
4567pub struct ICoreWebView2BrowserExtensionRemoveCompletedHandler_Vtbl {
4568 pub base__: windows_core::IUnknown_Vtbl,
4569 pub Invoke: unsafe extern "system" fn(
4570 *mut core::ffi::c_void,
4571 windows_core::HRESULT,
4572 ) -> windows_core::HRESULT,
4573}
4574pub trait ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl:
4575 windows_core::IUnknownImpl
4576{
4577 fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
4578}
4579impl ICoreWebView2BrowserExtensionRemoveCompletedHandler_Vtbl {
4580 pub const fn new<
4581 Identity: ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl,
4582 const OFFSET: isize,
4583 >() -> Self {
4584 unsafe extern "system" fn Invoke<
4585 Identity: ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl,
4586 const OFFSET: isize,
4587 >(
4588 this: *mut core::ffi::c_void,
4589 errorcode: windows_core::HRESULT,
4590 ) -> windows_core::HRESULT {
4591 unsafe {
4592 let this: &Identity =
4593 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4594 ICoreWebView2BrowserExtensionRemoveCompletedHandler_Impl::Invoke(
4595 this,
4596 core::mem::transmute_copy(&errorcode),
4597 )
4598 .into()
4599 }
4600 }
4601 Self {
4602 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4603 Invoke: Invoke::<Identity, OFFSET>,
4604 }
4605 }
4606 pub fn matches(iid: &windows_core::GUID) -> bool {
4607 iid == & < ICoreWebView2BrowserExtensionRemoveCompletedHandler as windows_core::Interface >::IID
4608 }
4609}
4610impl windows_core::RuntimeName for ICoreWebView2BrowserExtensionRemoveCompletedHandler {}
4611windows_core::imp::define_interface!(
4612 ICoreWebView2BrowserProcessExitedEventArgs,
4613 ICoreWebView2BrowserProcessExitedEventArgs_Vtbl,
4614 0x1f00663f_af8c_4782_9cdd_dd01c52e34cb
4615);
4616windows_core::imp::interface_hierarchy!(
4617 ICoreWebView2BrowserProcessExitedEventArgs,
4618 windows_core::IUnknown
4619);
4620impl ICoreWebView2BrowserProcessExitedEventArgs {
4621 pub unsafe fn BrowserProcessExitKind(
4622 &self,
4623 value: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
4624 ) -> windows_core::Result<()> {
4625 unsafe {
4626 (windows_core::Interface::vtable(self).BrowserProcessExitKind)(
4627 windows_core::Interface::as_raw(self),
4628 value as _,
4629 )
4630 .ok()
4631 }
4632 }
4633 pub unsafe fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()> {
4634 unsafe {
4635 (windows_core::Interface::vtable(self).BrowserProcessId)(
4636 windows_core::Interface::as_raw(self),
4637 value as _,
4638 )
4639 .ok()
4640 }
4641 }
4642}
4643#[repr(C)]
4644pub struct ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
4645 pub base__: windows_core::IUnknown_Vtbl,
4646 pub BrowserProcessExitKind: unsafe extern "system" fn(
4647 *mut core::ffi::c_void,
4648 *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
4649 ) -> windows_core::HRESULT,
4650 pub BrowserProcessId:
4651 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
4652}
4653pub trait ICoreWebView2BrowserProcessExitedEventArgs_Impl: windows_core::IUnknownImpl {
4654 fn BrowserProcessExitKind(
4655 &self,
4656 value: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
4657 ) -> windows_core::Result<()>;
4658 fn BrowserProcessId(&self, value: *mut u32) -> windows_core::Result<()>;
4659}
4660impl ICoreWebView2BrowserProcessExitedEventArgs_Vtbl {
4661 pub const fn new<
4662 Identity: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
4663 const OFFSET: isize,
4664 >() -> Self {
4665 unsafe extern "system" fn BrowserProcessExitKind<
4666 Identity: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
4667 const OFFSET: isize,
4668 >(
4669 this: *mut core::ffi::c_void,
4670 value: *mut COREWEBVIEW2_BROWSER_PROCESS_EXIT_KIND,
4671 ) -> windows_core::HRESULT {
4672 unsafe {
4673 let this: &Identity =
4674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4675 ICoreWebView2BrowserProcessExitedEventArgs_Impl::BrowserProcessExitKind(
4676 this,
4677 core::mem::transmute_copy(&value),
4678 )
4679 .into()
4680 }
4681 }
4682 unsafe extern "system" fn BrowserProcessId<
4683 Identity: ICoreWebView2BrowserProcessExitedEventArgs_Impl,
4684 const OFFSET: isize,
4685 >(
4686 this: *mut core::ffi::c_void,
4687 value: *mut u32,
4688 ) -> windows_core::HRESULT {
4689 unsafe {
4690 let this: &Identity =
4691 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4692 ICoreWebView2BrowserProcessExitedEventArgs_Impl::BrowserProcessId(
4693 this,
4694 core::mem::transmute_copy(&value),
4695 )
4696 .into()
4697 }
4698 }
4699 Self {
4700 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4701 BrowserProcessExitKind: BrowserProcessExitKind::<Identity, OFFSET>,
4702 BrowserProcessId: BrowserProcessId::<Identity, OFFSET>,
4703 }
4704 }
4705 pub fn matches(iid: &windows_core::GUID) -> bool {
4706 iid == &<ICoreWebView2BrowserProcessExitedEventArgs as windows_core::Interface>::IID
4707 }
4708}
4709impl windows_core::RuntimeName for ICoreWebView2BrowserProcessExitedEventArgs {}
4710windows_core::imp::define_interface!(
4711 ICoreWebView2BrowserProcessExitedEventHandler,
4712 ICoreWebView2BrowserProcessExitedEventHandler_Vtbl,
4713 0xfa504257_a216_4911_a860_fe8825712861
4714);
4715windows_core::imp::interface_hierarchy!(
4716 ICoreWebView2BrowserProcessExitedEventHandler,
4717 windows_core::IUnknown
4718);
4719impl ICoreWebView2BrowserProcessExitedEventHandler {
4720 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
4721 where
4722 P0: windows_core::Param<ICoreWebView2Environment>,
4723 P1: windows_core::Param<ICoreWebView2BrowserProcessExitedEventArgs>,
4724 {
4725 unsafe {
4726 (windows_core::Interface::vtable(self).Invoke)(
4727 windows_core::Interface::as_raw(self),
4728 sender.param().abi(),
4729 args.param().abi(),
4730 )
4731 .ok()
4732 }
4733 }
4734}
4735#[repr(C)]
4736pub struct ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
4737 pub base__: windows_core::IUnknown_Vtbl,
4738 pub Invoke: unsafe extern "system" fn(
4739 *mut core::ffi::c_void,
4740 *mut core::ffi::c_void,
4741 *mut core::ffi::c_void,
4742 ) -> windows_core::HRESULT,
4743}
4744pub trait ICoreWebView2BrowserProcessExitedEventHandler_Impl: windows_core::IUnknownImpl {
4745 fn Invoke(
4746 &self,
4747 sender: windows_core::Ref<'_, ICoreWebView2Environment>,
4748 args: windows_core::Ref<'_, ICoreWebView2BrowserProcessExitedEventArgs>,
4749 ) -> windows_core::Result<()>;
4750}
4751impl ICoreWebView2BrowserProcessExitedEventHandler_Vtbl {
4752 pub const fn new<
4753 Identity: ICoreWebView2BrowserProcessExitedEventHandler_Impl,
4754 const OFFSET: isize,
4755 >() -> Self {
4756 unsafe extern "system" fn Invoke<
4757 Identity: ICoreWebView2BrowserProcessExitedEventHandler_Impl,
4758 const OFFSET: isize,
4759 >(
4760 this: *mut core::ffi::c_void,
4761 sender: *mut core::ffi::c_void,
4762 args: *mut core::ffi::c_void,
4763 ) -> windows_core::HRESULT {
4764 unsafe {
4765 let this: &Identity =
4766 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4767 ICoreWebView2BrowserProcessExitedEventHandler_Impl::Invoke(
4768 this,
4769 core::mem::transmute_copy(&sender),
4770 core::mem::transmute_copy(&args),
4771 )
4772 .into()
4773 }
4774 }
4775 Self {
4776 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4777 Invoke: Invoke::<Identity, OFFSET>,
4778 }
4779 }
4780 pub fn matches(iid: &windows_core::GUID) -> bool {
4781 iid == &<ICoreWebView2BrowserProcessExitedEventHandler as windows_core::Interface>::IID
4782 }
4783}
4784impl windows_core::RuntimeName for ICoreWebView2BrowserProcessExitedEventHandler {}
4785windows_core::imp::define_interface!(
4786 ICoreWebView2BytesReceivedChangedEventHandler,
4787 ICoreWebView2BytesReceivedChangedEventHandler_Vtbl,
4788 0x828e8ab6_d94c_4264_9cef_5217170d6251
4789);
4790windows_core::imp::interface_hierarchy!(
4791 ICoreWebView2BytesReceivedChangedEventHandler,
4792 windows_core::IUnknown
4793);
4794impl ICoreWebView2BytesReceivedChangedEventHandler {
4795 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
4796 where
4797 P0: windows_core::Param<ICoreWebView2DownloadOperation>,
4798 P1: windows_core::Param<windows_core::IUnknown>,
4799 {
4800 unsafe {
4801 (windows_core::Interface::vtable(self).Invoke)(
4802 windows_core::Interface::as_raw(self),
4803 sender.param().abi(),
4804 args.param().abi(),
4805 )
4806 .ok()
4807 }
4808 }
4809}
4810#[repr(C)]
4811pub struct ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
4812 pub base__: windows_core::IUnknown_Vtbl,
4813 pub Invoke: unsafe extern "system" fn(
4814 *mut core::ffi::c_void,
4815 *mut core::ffi::c_void,
4816 *mut core::ffi::c_void,
4817 ) -> windows_core::HRESULT,
4818}
4819pub trait ICoreWebView2BytesReceivedChangedEventHandler_Impl: windows_core::IUnknownImpl {
4820 fn Invoke(
4821 &self,
4822 sender: windows_core::Ref<'_, ICoreWebView2DownloadOperation>,
4823 args: windows_core::Ref<'_, windows_core::IUnknown>,
4824 ) -> windows_core::Result<()>;
4825}
4826impl ICoreWebView2BytesReceivedChangedEventHandler_Vtbl {
4827 pub const fn new<
4828 Identity: ICoreWebView2BytesReceivedChangedEventHandler_Impl,
4829 const OFFSET: isize,
4830 >() -> Self {
4831 unsafe extern "system" fn Invoke<
4832 Identity: ICoreWebView2BytesReceivedChangedEventHandler_Impl,
4833 const OFFSET: isize,
4834 >(
4835 this: *mut core::ffi::c_void,
4836 sender: *mut core::ffi::c_void,
4837 args: *mut core::ffi::c_void,
4838 ) -> windows_core::HRESULT {
4839 unsafe {
4840 let this: &Identity =
4841 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4842 ICoreWebView2BytesReceivedChangedEventHandler_Impl::Invoke(
4843 this,
4844 core::mem::transmute_copy(&sender),
4845 core::mem::transmute_copy(&args),
4846 )
4847 .into()
4848 }
4849 }
4850 Self {
4851 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4852 Invoke: Invoke::<Identity, OFFSET>,
4853 }
4854 }
4855 pub fn matches(iid: &windows_core::GUID) -> bool {
4856 iid == &<ICoreWebView2BytesReceivedChangedEventHandler as windows_core::Interface>::IID
4857 }
4858}
4859impl windows_core::RuntimeName for ICoreWebView2BytesReceivedChangedEventHandler {}
4860windows_core::imp::define_interface!(
4861 ICoreWebView2CallDevToolsProtocolMethodCompletedHandler,
4862 ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl,
4863 0x5c4889f0_5ef6_4c5a_952c_d8f1b92d0574
4864);
4865windows_core::imp::interface_hierarchy!(
4866 ICoreWebView2CallDevToolsProtocolMethodCompletedHandler,
4867 windows_core::IUnknown
4868);
4869impl ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {
4870 pub unsafe fn Invoke<P1>(
4871 &self,
4872 errorcode: windows_core::HRESULT,
4873 result: P1,
4874 ) -> windows_core::Result<()>
4875 where
4876 P1: windows_core::Param<windows_core::PCWSTR>,
4877 {
4878 unsafe {
4879 (windows_core::Interface::vtable(self).Invoke)(
4880 windows_core::Interface::as_raw(self),
4881 errorcode,
4882 result.param().abi(),
4883 )
4884 .ok()
4885 }
4886 }
4887}
4888#[repr(C)]
4889pub struct ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
4890 pub base__: windows_core::IUnknown_Vtbl,
4891 pub Invoke: unsafe extern "system" fn(
4892 *mut core::ffi::c_void,
4893 windows_core::HRESULT,
4894 windows_core::PCWSTR,
4895 ) -> windows_core::HRESULT,
4896}
4897pub trait ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl:
4898 windows_core::IUnknownImpl
4899{
4900 fn Invoke(
4901 &self,
4902 errorcode: windows_core::HRESULT,
4903 result: &windows_core::PCWSTR,
4904 ) -> windows_core::Result<()>;
4905}
4906impl ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Vtbl {
4907 pub const fn new<
4908 Identity: ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl,
4909 const OFFSET: isize,
4910 >() -> Self {
4911 unsafe extern "system" fn Invoke<
4912 Identity: ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl,
4913 const OFFSET: isize,
4914 >(
4915 this: *mut core::ffi::c_void,
4916 errorcode: windows_core::HRESULT,
4917 result: windows_core::PCWSTR,
4918 ) -> windows_core::HRESULT {
4919 unsafe {
4920 let this: &Identity =
4921 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4922 ICoreWebView2CallDevToolsProtocolMethodCompletedHandler_Impl::Invoke(
4923 this,
4924 core::mem::transmute_copy(&errorcode),
4925 core::mem::transmute(&result),
4926 )
4927 .into()
4928 }
4929 }
4930 Self {
4931 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4932 Invoke: Invoke::<Identity, OFFSET>,
4933 }
4934 }
4935 pub fn matches(iid: &windows_core::GUID) -> bool {
4936 iid == & < ICoreWebView2CallDevToolsProtocolMethodCompletedHandler as windows_core::Interface >::IID
4937 }
4938}
4939impl windows_core::RuntimeName for ICoreWebView2CallDevToolsProtocolMethodCompletedHandler {}
4940windows_core::imp::define_interface!(
4941 ICoreWebView2CapturePreviewCompletedHandler,
4942 ICoreWebView2CapturePreviewCompletedHandler_Vtbl,
4943 0x697e05e9_3d8f_45fa_96f4_8ffe1ededaf5
4944);
4945windows_core::imp::interface_hierarchy!(
4946 ICoreWebView2CapturePreviewCompletedHandler,
4947 windows_core::IUnknown
4948);
4949impl ICoreWebView2CapturePreviewCompletedHandler {
4950 pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
4951 unsafe {
4952 (windows_core::Interface::vtable(self).Invoke)(
4953 windows_core::Interface::as_raw(self),
4954 errorcode,
4955 )
4956 .ok()
4957 }
4958 }
4959}
4960#[repr(C)]
4961pub struct ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
4962 pub base__: windows_core::IUnknown_Vtbl,
4963 pub Invoke: unsafe extern "system" fn(
4964 *mut core::ffi::c_void,
4965 windows_core::HRESULT,
4966 ) -> windows_core::HRESULT,
4967}
4968pub trait ICoreWebView2CapturePreviewCompletedHandler_Impl: windows_core::IUnknownImpl {
4969 fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
4970}
4971impl ICoreWebView2CapturePreviewCompletedHandler_Vtbl {
4972 pub const fn new<
4973 Identity: ICoreWebView2CapturePreviewCompletedHandler_Impl,
4974 const OFFSET: isize,
4975 >() -> Self {
4976 unsafe extern "system" fn Invoke<
4977 Identity: ICoreWebView2CapturePreviewCompletedHandler_Impl,
4978 const OFFSET: isize,
4979 >(
4980 this: *mut core::ffi::c_void,
4981 errorcode: windows_core::HRESULT,
4982 ) -> windows_core::HRESULT {
4983 unsafe {
4984 let this: &Identity =
4985 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
4986 ICoreWebView2CapturePreviewCompletedHandler_Impl::Invoke(
4987 this,
4988 core::mem::transmute_copy(&errorcode),
4989 )
4990 .into()
4991 }
4992 }
4993 Self {
4994 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
4995 Invoke: Invoke::<Identity, OFFSET>,
4996 }
4997 }
4998 pub fn matches(iid: &windows_core::GUID) -> bool {
4999 iid == &<ICoreWebView2CapturePreviewCompletedHandler as windows_core::Interface>::IID
5000 }
5001}
5002impl windows_core::RuntimeName for ICoreWebView2CapturePreviewCompletedHandler {}
5003windows_core::imp::define_interface!(
5004 ICoreWebView2Certificate,
5005 ICoreWebView2Certificate_Vtbl,
5006 0xc5fb2fce_1cac_4aee_9c79_5ed0362eaae0
5007);
5008windows_core::imp::interface_hierarchy!(ICoreWebView2Certificate, windows_core::IUnknown);
5009impl ICoreWebView2Certificate {
5010 pub unsafe fn Subject(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5011 unsafe {
5012 (windows_core::Interface::vtable(self).Subject)(
5013 windows_core::Interface::as_raw(self),
5014 value as _,
5015 )
5016 .ok()
5017 }
5018 }
5019 pub unsafe fn Issuer(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5020 unsafe {
5021 (windows_core::Interface::vtable(self).Issuer)(
5022 windows_core::Interface::as_raw(self),
5023 value as _,
5024 )
5025 .ok()
5026 }
5027 }
5028 pub unsafe fn ValidFrom(&self, value: *mut f64) -> windows_core::Result<()> {
5029 unsafe {
5030 (windows_core::Interface::vtable(self).ValidFrom)(
5031 windows_core::Interface::as_raw(self),
5032 value as _,
5033 )
5034 .ok()
5035 }
5036 }
5037 pub unsafe fn ValidTo(&self, value: *mut f64) -> windows_core::Result<()> {
5038 unsafe {
5039 (windows_core::Interface::vtable(self).ValidTo)(
5040 windows_core::Interface::as_raw(self),
5041 value as _,
5042 )
5043 .ok()
5044 }
5045 }
5046 pub unsafe fn DerEncodedSerialNumber(
5047 &self,
5048 value: *mut windows_core::PWSTR,
5049 ) -> windows_core::Result<()> {
5050 unsafe {
5051 (windows_core::Interface::vtable(self).DerEncodedSerialNumber)(
5052 windows_core::Interface::as_raw(self),
5053 value as _,
5054 )
5055 .ok()
5056 }
5057 }
5058 pub unsafe fn DisplayName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5059 unsafe {
5060 (windows_core::Interface::vtable(self).DisplayName)(
5061 windows_core::Interface::as_raw(self),
5062 value as _,
5063 )
5064 .ok()
5065 }
5066 }
5067 pub unsafe fn ToPemEncoding(
5068 &self,
5069 pemencodeddata: *mut windows_core::PWSTR,
5070 ) -> windows_core::Result<()> {
5071 unsafe {
5072 (windows_core::Interface::vtable(self).ToPemEncoding)(
5073 windows_core::Interface::as_raw(self),
5074 pemencodeddata as _,
5075 )
5076 .ok()
5077 }
5078 }
5079 pub unsafe fn PemEncodedIssuerCertificateChain(
5080 &self,
5081 ) -> windows_core::Result<ICoreWebView2StringCollection> {
5082 unsafe {
5083 let mut result__ = core::mem::zeroed();
5084 (windows_core::Interface::vtable(self).PemEncodedIssuerCertificateChain)(
5085 windows_core::Interface::as_raw(self),
5086 &mut result__,
5087 )
5088 .and_then(|| windows_core::Type::from_abi(result__))
5089 }
5090 }
5091}
5092#[repr(C)]
5093pub struct ICoreWebView2Certificate_Vtbl {
5094 pub base__: windows_core::IUnknown_Vtbl,
5095 pub Subject: unsafe extern "system" fn(
5096 *mut core::ffi::c_void,
5097 *mut windows_core::PWSTR,
5098 ) -> windows_core::HRESULT,
5099 pub Issuer: unsafe extern "system" fn(
5100 *mut core::ffi::c_void,
5101 *mut windows_core::PWSTR,
5102 ) -> windows_core::HRESULT,
5103 pub ValidFrom:
5104 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
5105 pub ValidTo:
5106 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
5107 pub DerEncodedSerialNumber: unsafe extern "system" fn(
5108 *mut core::ffi::c_void,
5109 *mut windows_core::PWSTR,
5110 ) -> windows_core::HRESULT,
5111 pub DisplayName: unsafe extern "system" fn(
5112 *mut core::ffi::c_void,
5113 *mut windows_core::PWSTR,
5114 ) -> windows_core::HRESULT,
5115 pub ToPemEncoding: unsafe extern "system" fn(
5116 *mut core::ffi::c_void,
5117 *mut windows_core::PWSTR,
5118 ) -> windows_core::HRESULT,
5119 pub PemEncodedIssuerCertificateChain: unsafe extern "system" fn(
5120 *mut core::ffi::c_void,
5121 *mut *mut core::ffi::c_void,
5122 ) -> windows_core::HRESULT,
5123}
5124pub trait ICoreWebView2Certificate_Impl: windows_core::IUnknownImpl {
5125 fn Subject(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5126 fn Issuer(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5127 fn ValidFrom(&self, value: *mut f64) -> windows_core::Result<()>;
5128 fn ValidTo(&self, value: *mut f64) -> windows_core::Result<()>;
5129 fn DerEncodedSerialNumber(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5130 fn DisplayName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5131 fn ToPemEncoding(&self, pemencodeddata: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5132 fn PemEncodedIssuerCertificateChain(
5133 &self,
5134 ) -> windows_core::Result<ICoreWebView2StringCollection>;
5135}
5136impl ICoreWebView2Certificate_Vtbl {
5137 pub const fn new<Identity: ICoreWebView2Certificate_Impl, const OFFSET: isize>() -> Self {
5138 unsafe extern "system" fn Subject<
5139 Identity: ICoreWebView2Certificate_Impl,
5140 const OFFSET: isize,
5141 >(
5142 this: *mut core::ffi::c_void,
5143 value: *mut windows_core::PWSTR,
5144 ) -> windows_core::HRESULT {
5145 unsafe {
5146 let this: &Identity =
5147 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5148 ICoreWebView2Certificate_Impl::Subject(this, core::mem::transmute_copy(&value))
5149 .into()
5150 }
5151 }
5152 unsafe extern "system" fn Issuer<
5153 Identity: ICoreWebView2Certificate_Impl,
5154 const OFFSET: isize,
5155 >(
5156 this: *mut core::ffi::c_void,
5157 value: *mut windows_core::PWSTR,
5158 ) -> windows_core::HRESULT {
5159 unsafe {
5160 let this: &Identity =
5161 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5162 ICoreWebView2Certificate_Impl::Issuer(this, core::mem::transmute_copy(&value))
5163 .into()
5164 }
5165 }
5166 unsafe extern "system" fn ValidFrom<
5167 Identity: ICoreWebView2Certificate_Impl,
5168 const OFFSET: isize,
5169 >(
5170 this: *mut core::ffi::c_void,
5171 value: *mut f64,
5172 ) -> windows_core::HRESULT {
5173 unsafe {
5174 let this: &Identity =
5175 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5176 ICoreWebView2Certificate_Impl::ValidFrom(this, core::mem::transmute_copy(&value))
5177 .into()
5178 }
5179 }
5180 unsafe extern "system" fn ValidTo<
5181 Identity: ICoreWebView2Certificate_Impl,
5182 const OFFSET: isize,
5183 >(
5184 this: *mut core::ffi::c_void,
5185 value: *mut f64,
5186 ) -> windows_core::HRESULT {
5187 unsafe {
5188 let this: &Identity =
5189 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5190 ICoreWebView2Certificate_Impl::ValidTo(this, core::mem::transmute_copy(&value))
5191 .into()
5192 }
5193 }
5194 unsafe extern "system" fn DerEncodedSerialNumber<
5195 Identity: ICoreWebView2Certificate_Impl,
5196 const OFFSET: isize,
5197 >(
5198 this: *mut core::ffi::c_void,
5199 value: *mut windows_core::PWSTR,
5200 ) -> windows_core::HRESULT {
5201 unsafe {
5202 let this: &Identity =
5203 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5204 ICoreWebView2Certificate_Impl::DerEncodedSerialNumber(
5205 this,
5206 core::mem::transmute_copy(&value),
5207 )
5208 .into()
5209 }
5210 }
5211 unsafe extern "system" fn DisplayName<
5212 Identity: ICoreWebView2Certificate_Impl,
5213 const OFFSET: isize,
5214 >(
5215 this: *mut core::ffi::c_void,
5216 value: *mut windows_core::PWSTR,
5217 ) -> windows_core::HRESULT {
5218 unsafe {
5219 let this: &Identity =
5220 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5221 ICoreWebView2Certificate_Impl::DisplayName(this, core::mem::transmute_copy(&value))
5222 .into()
5223 }
5224 }
5225 unsafe extern "system" fn ToPemEncoding<
5226 Identity: ICoreWebView2Certificate_Impl,
5227 const OFFSET: isize,
5228 >(
5229 this: *mut core::ffi::c_void,
5230 pemencodeddata: *mut windows_core::PWSTR,
5231 ) -> windows_core::HRESULT {
5232 unsafe {
5233 let this: &Identity =
5234 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5235 ICoreWebView2Certificate_Impl::ToPemEncoding(
5236 this,
5237 core::mem::transmute_copy(&pemencodeddata),
5238 )
5239 .into()
5240 }
5241 }
5242 unsafe extern "system" fn PemEncodedIssuerCertificateChain<
5243 Identity: ICoreWebView2Certificate_Impl,
5244 const OFFSET: isize,
5245 >(
5246 this: *mut core::ffi::c_void,
5247 value: *mut *mut core::ffi::c_void,
5248 ) -> windows_core::HRESULT {
5249 unsafe {
5250 let this: &Identity =
5251 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5252 match ICoreWebView2Certificate_Impl::PemEncodedIssuerCertificateChain(this) {
5253 Ok(ok__) => {
5254 value.write(core::mem::transmute(ok__));
5255 windows_core::HRESULT(0)
5256 }
5257 Err(err) => err.into(),
5258 }
5259 }
5260 }
5261 Self {
5262 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
5263 Subject: Subject::<Identity, OFFSET>,
5264 Issuer: Issuer::<Identity, OFFSET>,
5265 ValidFrom: ValidFrom::<Identity, OFFSET>,
5266 ValidTo: ValidTo::<Identity, OFFSET>,
5267 DerEncodedSerialNumber: DerEncodedSerialNumber::<Identity, OFFSET>,
5268 DisplayName: DisplayName::<Identity, OFFSET>,
5269 ToPemEncoding: ToPemEncoding::<Identity, OFFSET>,
5270 PemEncodedIssuerCertificateChain: PemEncodedIssuerCertificateChain::<Identity, OFFSET>,
5271 }
5272 }
5273 pub fn matches(iid: &windows_core::GUID) -> bool {
5274 iid == &<ICoreWebView2Certificate as windows_core::Interface>::IID
5275 }
5276}
5277impl windows_core::RuntimeName for ICoreWebView2Certificate {}
5278windows_core::imp::define_interface!(
5279 ICoreWebView2ClearBrowsingDataCompletedHandler,
5280 ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl,
5281 0xe9710a06_1d1d_49b2_8234_226f35846ae5
5282);
5283windows_core::imp::interface_hierarchy!(
5284 ICoreWebView2ClearBrowsingDataCompletedHandler,
5285 windows_core::IUnknown
5286);
5287impl ICoreWebView2ClearBrowsingDataCompletedHandler {
5288 pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
5289 unsafe {
5290 (windows_core::Interface::vtable(self).Invoke)(
5291 windows_core::Interface::as_raw(self),
5292 errorcode,
5293 )
5294 .ok()
5295 }
5296 }
5297}
5298#[repr(C)]
5299pub struct ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
5300 pub base__: windows_core::IUnknown_Vtbl,
5301 pub Invoke: unsafe extern "system" fn(
5302 *mut core::ffi::c_void,
5303 windows_core::HRESULT,
5304 ) -> windows_core::HRESULT,
5305}
5306pub trait ICoreWebView2ClearBrowsingDataCompletedHandler_Impl: windows_core::IUnknownImpl {
5307 fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
5308}
5309impl ICoreWebView2ClearBrowsingDataCompletedHandler_Vtbl {
5310 pub const fn new<
5311 Identity: ICoreWebView2ClearBrowsingDataCompletedHandler_Impl,
5312 const OFFSET: isize,
5313 >() -> Self {
5314 unsafe extern "system" fn Invoke<
5315 Identity: ICoreWebView2ClearBrowsingDataCompletedHandler_Impl,
5316 const OFFSET: isize,
5317 >(
5318 this: *mut core::ffi::c_void,
5319 errorcode: windows_core::HRESULT,
5320 ) -> windows_core::HRESULT {
5321 unsafe {
5322 let this: &Identity =
5323 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5324 ICoreWebView2ClearBrowsingDataCompletedHandler_Impl::Invoke(
5325 this,
5326 core::mem::transmute_copy(&errorcode),
5327 )
5328 .into()
5329 }
5330 }
5331 Self {
5332 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
5333 Invoke: Invoke::<Identity, OFFSET>,
5334 }
5335 }
5336 pub fn matches(iid: &windows_core::GUID) -> bool {
5337 iid == &<ICoreWebView2ClearBrowsingDataCompletedHandler as windows_core::Interface>::IID
5338 }
5339}
5340impl windows_core::RuntimeName for ICoreWebView2ClearBrowsingDataCompletedHandler {}
5341windows_core::imp::define_interface!(
5342 ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
5343 ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl,
5344 0x3b40aac6_acfe_4ffd_8211_f607b96e2d5b
5345);
5346windows_core::imp::interface_hierarchy!(
5347 ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
5348 windows_core::IUnknown
5349);
5350impl ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {
5351 pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
5352 unsafe {
5353 (windows_core::Interface::vtable(self).Invoke)(
5354 windows_core::Interface::as_raw(self),
5355 errorcode,
5356 )
5357 .ok()
5358 }
5359 }
5360}
5361#[repr(C)]
5362pub struct ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
5363 pub base__: windows_core::IUnknown_Vtbl,
5364 pub Invoke: unsafe extern "system" fn(
5365 *mut core::ffi::c_void,
5366 windows_core::HRESULT,
5367 ) -> windows_core::HRESULT,
5368}
5369pub trait ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl:
5370 windows_core::IUnknownImpl
5371{
5372 fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
5373}
5374impl ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Vtbl {
5375 pub const fn new<
5376 Identity: ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl,
5377 const OFFSET: isize,
5378 >() -> Self {
5379 unsafe extern "system" fn Invoke<
5380 Identity: ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl,
5381 const OFFSET: isize,
5382 >(
5383 this: *mut core::ffi::c_void,
5384 errorcode: windows_core::HRESULT,
5385 ) -> windows_core::HRESULT {
5386 unsafe {
5387 let this: &Identity =
5388 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5389 ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler_Impl::Invoke(
5390 this,
5391 core::mem::transmute_copy(&errorcode),
5392 )
5393 .into()
5394 }
5395 }
5396 Self {
5397 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
5398 Invoke: Invoke::<Identity, OFFSET>,
5399 }
5400 }
5401 pub fn matches(iid: &windows_core::GUID) -> bool {
5402 iid == & < ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler as windows_core::Interface >::IID
5403 }
5404}
5405impl windows_core::RuntimeName for ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler {}
5406windows_core::imp::define_interface!(
5407 ICoreWebView2ClientCertificate,
5408 ICoreWebView2ClientCertificate_Vtbl,
5409 0xe7188076_bcc3_11eb_8529_0242ac130003
5410);
5411windows_core::imp::interface_hierarchy!(ICoreWebView2ClientCertificate, windows_core::IUnknown);
5412impl ICoreWebView2ClientCertificate {
5413 pub unsafe fn Subject(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5414 unsafe {
5415 (windows_core::Interface::vtable(self).Subject)(
5416 windows_core::Interface::as_raw(self),
5417 value as _,
5418 )
5419 .ok()
5420 }
5421 }
5422 pub unsafe fn Issuer(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5423 unsafe {
5424 (windows_core::Interface::vtable(self).Issuer)(
5425 windows_core::Interface::as_raw(self),
5426 value as _,
5427 )
5428 .ok()
5429 }
5430 }
5431 pub unsafe fn ValidFrom(&self, value: *mut f64) -> windows_core::Result<()> {
5432 unsafe {
5433 (windows_core::Interface::vtable(self).ValidFrom)(
5434 windows_core::Interface::as_raw(self),
5435 value as _,
5436 )
5437 .ok()
5438 }
5439 }
5440 pub unsafe fn ValidTo(&self, value: *mut f64) -> windows_core::Result<()> {
5441 unsafe {
5442 (windows_core::Interface::vtable(self).ValidTo)(
5443 windows_core::Interface::as_raw(self),
5444 value as _,
5445 )
5446 .ok()
5447 }
5448 }
5449 pub unsafe fn DerEncodedSerialNumber(
5450 &self,
5451 value: *mut windows_core::PWSTR,
5452 ) -> windows_core::Result<()> {
5453 unsafe {
5454 (windows_core::Interface::vtable(self).DerEncodedSerialNumber)(
5455 windows_core::Interface::as_raw(self),
5456 value as _,
5457 )
5458 .ok()
5459 }
5460 }
5461 pub unsafe fn DisplayName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5462 unsafe {
5463 (windows_core::Interface::vtable(self).DisplayName)(
5464 windows_core::Interface::as_raw(self),
5465 value as _,
5466 )
5467 .ok()
5468 }
5469 }
5470 pub unsafe fn ToPemEncoding(
5471 &self,
5472 pemencodeddata: *mut windows_core::PWSTR,
5473 ) -> windows_core::Result<()> {
5474 unsafe {
5475 (windows_core::Interface::vtable(self).ToPemEncoding)(
5476 windows_core::Interface::as_raw(self),
5477 pemencodeddata as _,
5478 )
5479 .ok()
5480 }
5481 }
5482 pub unsafe fn PemEncodedIssuerCertificateChain(
5483 &self,
5484 ) -> windows_core::Result<ICoreWebView2StringCollection> {
5485 unsafe {
5486 let mut result__ = core::mem::zeroed();
5487 (windows_core::Interface::vtable(self).PemEncodedIssuerCertificateChain)(
5488 windows_core::Interface::as_raw(self),
5489 &mut result__,
5490 )
5491 .and_then(|| windows_core::Type::from_abi(result__))
5492 }
5493 }
5494 pub unsafe fn Kind(
5495 &self,
5496 value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
5497 ) -> windows_core::Result<()> {
5498 unsafe {
5499 (windows_core::Interface::vtable(self).Kind)(
5500 windows_core::Interface::as_raw(self),
5501 value as _,
5502 )
5503 .ok()
5504 }
5505 }
5506}
5507#[repr(C)]
5508pub struct ICoreWebView2ClientCertificate_Vtbl {
5509 pub base__: windows_core::IUnknown_Vtbl,
5510 pub Subject: unsafe extern "system" fn(
5511 *mut core::ffi::c_void,
5512 *mut windows_core::PWSTR,
5513 ) -> windows_core::HRESULT,
5514 pub Issuer: unsafe extern "system" fn(
5515 *mut core::ffi::c_void,
5516 *mut windows_core::PWSTR,
5517 ) -> windows_core::HRESULT,
5518 pub ValidFrom:
5519 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
5520 pub ValidTo:
5521 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
5522 pub DerEncodedSerialNumber: unsafe extern "system" fn(
5523 *mut core::ffi::c_void,
5524 *mut windows_core::PWSTR,
5525 ) -> windows_core::HRESULT,
5526 pub DisplayName: unsafe extern "system" fn(
5527 *mut core::ffi::c_void,
5528 *mut windows_core::PWSTR,
5529 ) -> windows_core::HRESULT,
5530 pub ToPemEncoding: unsafe extern "system" fn(
5531 *mut core::ffi::c_void,
5532 *mut windows_core::PWSTR,
5533 ) -> windows_core::HRESULT,
5534 pub PemEncodedIssuerCertificateChain: unsafe extern "system" fn(
5535 *mut core::ffi::c_void,
5536 *mut *mut core::ffi::c_void,
5537 ) -> windows_core::HRESULT,
5538 pub Kind: unsafe extern "system" fn(
5539 *mut core::ffi::c_void,
5540 *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
5541 ) -> windows_core::HRESULT,
5542}
5543pub trait ICoreWebView2ClientCertificate_Impl: windows_core::IUnknownImpl {
5544 fn Subject(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5545 fn Issuer(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5546 fn ValidFrom(&self, value: *mut f64) -> windows_core::Result<()>;
5547 fn ValidTo(&self, value: *mut f64) -> windows_core::Result<()>;
5548 fn DerEncodedSerialNumber(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5549 fn DisplayName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5550 fn ToPemEncoding(&self, pemencodeddata: *mut windows_core::PWSTR) -> windows_core::Result<()>;
5551 fn PemEncodedIssuerCertificateChain(
5552 &self,
5553 ) -> windows_core::Result<ICoreWebView2StringCollection>;
5554 fn Kind(&self, value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND) -> windows_core::Result<()>;
5555}
5556impl ICoreWebView2ClientCertificate_Vtbl {
5557 pub const fn new<Identity: ICoreWebView2ClientCertificate_Impl, const OFFSET: isize>() -> Self {
5558 unsafe extern "system" fn Subject<
5559 Identity: ICoreWebView2ClientCertificate_Impl,
5560 const OFFSET: isize,
5561 >(
5562 this: *mut core::ffi::c_void,
5563 value: *mut windows_core::PWSTR,
5564 ) -> windows_core::HRESULT {
5565 unsafe {
5566 let this: &Identity =
5567 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5568 ICoreWebView2ClientCertificate_Impl::Subject(
5569 this,
5570 core::mem::transmute_copy(&value),
5571 )
5572 .into()
5573 }
5574 }
5575 unsafe extern "system" fn Issuer<
5576 Identity: ICoreWebView2ClientCertificate_Impl,
5577 const OFFSET: isize,
5578 >(
5579 this: *mut core::ffi::c_void,
5580 value: *mut windows_core::PWSTR,
5581 ) -> windows_core::HRESULT {
5582 unsafe {
5583 let this: &Identity =
5584 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5585 ICoreWebView2ClientCertificate_Impl::Issuer(this, core::mem::transmute_copy(&value))
5586 .into()
5587 }
5588 }
5589 unsafe extern "system" fn ValidFrom<
5590 Identity: ICoreWebView2ClientCertificate_Impl,
5591 const OFFSET: isize,
5592 >(
5593 this: *mut core::ffi::c_void,
5594 value: *mut f64,
5595 ) -> windows_core::HRESULT {
5596 unsafe {
5597 let this: &Identity =
5598 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5599 ICoreWebView2ClientCertificate_Impl::ValidFrom(
5600 this,
5601 core::mem::transmute_copy(&value),
5602 )
5603 .into()
5604 }
5605 }
5606 unsafe extern "system" fn ValidTo<
5607 Identity: ICoreWebView2ClientCertificate_Impl,
5608 const OFFSET: isize,
5609 >(
5610 this: *mut core::ffi::c_void,
5611 value: *mut f64,
5612 ) -> windows_core::HRESULT {
5613 unsafe {
5614 let this: &Identity =
5615 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5616 ICoreWebView2ClientCertificate_Impl::ValidTo(
5617 this,
5618 core::mem::transmute_copy(&value),
5619 )
5620 .into()
5621 }
5622 }
5623 unsafe extern "system" fn DerEncodedSerialNumber<
5624 Identity: ICoreWebView2ClientCertificate_Impl,
5625 const OFFSET: isize,
5626 >(
5627 this: *mut core::ffi::c_void,
5628 value: *mut windows_core::PWSTR,
5629 ) -> windows_core::HRESULT {
5630 unsafe {
5631 let this: &Identity =
5632 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5633 ICoreWebView2ClientCertificate_Impl::DerEncodedSerialNumber(
5634 this,
5635 core::mem::transmute_copy(&value),
5636 )
5637 .into()
5638 }
5639 }
5640 unsafe extern "system" fn DisplayName<
5641 Identity: ICoreWebView2ClientCertificate_Impl,
5642 const OFFSET: isize,
5643 >(
5644 this: *mut core::ffi::c_void,
5645 value: *mut windows_core::PWSTR,
5646 ) -> windows_core::HRESULT {
5647 unsafe {
5648 let this: &Identity =
5649 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5650 ICoreWebView2ClientCertificate_Impl::DisplayName(
5651 this,
5652 core::mem::transmute_copy(&value),
5653 )
5654 .into()
5655 }
5656 }
5657 unsafe extern "system" fn ToPemEncoding<
5658 Identity: ICoreWebView2ClientCertificate_Impl,
5659 const OFFSET: isize,
5660 >(
5661 this: *mut core::ffi::c_void,
5662 pemencodeddata: *mut windows_core::PWSTR,
5663 ) -> windows_core::HRESULT {
5664 unsafe {
5665 let this: &Identity =
5666 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5667 ICoreWebView2ClientCertificate_Impl::ToPemEncoding(
5668 this,
5669 core::mem::transmute_copy(&pemencodeddata),
5670 )
5671 .into()
5672 }
5673 }
5674 unsafe extern "system" fn PemEncodedIssuerCertificateChain<
5675 Identity: ICoreWebView2ClientCertificate_Impl,
5676 const OFFSET: isize,
5677 >(
5678 this: *mut core::ffi::c_void,
5679 value: *mut *mut core::ffi::c_void,
5680 ) -> windows_core::HRESULT {
5681 unsafe {
5682 let this: &Identity =
5683 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5684 match ICoreWebView2ClientCertificate_Impl::PemEncodedIssuerCertificateChain(this) {
5685 Ok(ok__) => {
5686 value.write(core::mem::transmute(ok__));
5687 windows_core::HRESULT(0)
5688 }
5689 Err(err) => err.into(),
5690 }
5691 }
5692 }
5693 unsafe extern "system" fn Kind<
5694 Identity: ICoreWebView2ClientCertificate_Impl,
5695 const OFFSET: isize,
5696 >(
5697 this: *mut core::ffi::c_void,
5698 value: *mut COREWEBVIEW2_CLIENT_CERTIFICATE_KIND,
5699 ) -> windows_core::HRESULT {
5700 unsafe {
5701 let this: &Identity =
5702 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5703 ICoreWebView2ClientCertificate_Impl::Kind(this, core::mem::transmute_copy(&value))
5704 .into()
5705 }
5706 }
5707 Self {
5708 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
5709 Subject: Subject::<Identity, OFFSET>,
5710 Issuer: Issuer::<Identity, OFFSET>,
5711 ValidFrom: ValidFrom::<Identity, OFFSET>,
5712 ValidTo: ValidTo::<Identity, OFFSET>,
5713 DerEncodedSerialNumber: DerEncodedSerialNumber::<Identity, OFFSET>,
5714 DisplayName: DisplayName::<Identity, OFFSET>,
5715 ToPemEncoding: ToPemEncoding::<Identity, OFFSET>,
5716 PemEncodedIssuerCertificateChain: PemEncodedIssuerCertificateChain::<Identity, OFFSET>,
5717 Kind: Kind::<Identity, OFFSET>,
5718 }
5719 }
5720 pub fn matches(iid: &windows_core::GUID) -> bool {
5721 iid == &<ICoreWebView2ClientCertificate as windows_core::Interface>::IID
5722 }
5723}
5724impl windows_core::RuntimeName for ICoreWebView2ClientCertificate {}
5725windows_core::imp::define_interface!(
5726 ICoreWebView2ClientCertificateCollection,
5727 ICoreWebView2ClientCertificateCollection_Vtbl,
5728 0xef5674d2_bcc3_11eb_8529_0242ac130003
5729);
5730windows_core::imp::interface_hierarchy!(
5731 ICoreWebView2ClientCertificateCollection,
5732 windows_core::IUnknown
5733);
5734impl ICoreWebView2ClientCertificateCollection {
5735 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
5736 unsafe {
5737 (windows_core::Interface::vtable(self).Count)(
5738 windows_core::Interface::as_raw(self),
5739 value as _,
5740 )
5741 .ok()
5742 }
5743 }
5744 pub unsafe fn GetValueAtIndex(
5745 &self,
5746 index: u32,
5747 ) -> windows_core::Result<ICoreWebView2ClientCertificate> {
5748 unsafe {
5749 let mut result__ = core::mem::zeroed();
5750 (windows_core::Interface::vtable(self).GetValueAtIndex)(
5751 windows_core::Interface::as_raw(self),
5752 index,
5753 &mut result__,
5754 )
5755 .and_then(|| windows_core::Type::from_abi(result__))
5756 }
5757 }
5758}
5759#[repr(C)]
5760pub struct ICoreWebView2ClientCertificateCollection_Vtbl {
5761 pub base__: windows_core::IUnknown_Vtbl,
5762 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
5763 pub GetValueAtIndex: unsafe extern "system" fn(
5764 *mut core::ffi::c_void,
5765 u32,
5766 *mut *mut core::ffi::c_void,
5767 ) -> windows_core::HRESULT,
5768}
5769pub trait ICoreWebView2ClientCertificateCollection_Impl: windows_core::IUnknownImpl {
5770 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
5771 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2ClientCertificate>;
5772}
5773impl ICoreWebView2ClientCertificateCollection_Vtbl {
5774 pub const fn new<
5775 Identity: ICoreWebView2ClientCertificateCollection_Impl,
5776 const OFFSET: isize,
5777 >() -> Self {
5778 unsafe extern "system" fn Count<
5779 Identity: ICoreWebView2ClientCertificateCollection_Impl,
5780 const OFFSET: isize,
5781 >(
5782 this: *mut core::ffi::c_void,
5783 value: *mut u32,
5784 ) -> windows_core::HRESULT {
5785 unsafe {
5786 let this: &Identity =
5787 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5788 ICoreWebView2ClientCertificateCollection_Impl::Count(
5789 this,
5790 core::mem::transmute_copy(&value),
5791 )
5792 .into()
5793 }
5794 }
5795 unsafe extern "system" fn GetValueAtIndex<
5796 Identity: ICoreWebView2ClientCertificateCollection_Impl,
5797 const OFFSET: isize,
5798 >(
5799 this: *mut core::ffi::c_void,
5800 index: u32,
5801 value: *mut *mut core::ffi::c_void,
5802 ) -> windows_core::HRESULT {
5803 unsafe {
5804 let this: &Identity =
5805 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
5806 match ICoreWebView2ClientCertificateCollection_Impl::GetValueAtIndex(
5807 this,
5808 core::mem::transmute_copy(&index),
5809 ) {
5810 Ok(ok__) => {
5811 value.write(core::mem::transmute(ok__));
5812 windows_core::HRESULT(0)
5813 }
5814 Err(err) => err.into(),
5815 }
5816 }
5817 }
5818 Self {
5819 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
5820 Count: Count::<Identity, OFFSET>,
5821 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
5822 }
5823 }
5824 pub fn matches(iid: &windows_core::GUID) -> bool {
5825 iid == &<ICoreWebView2ClientCertificateCollection as windows_core::Interface>::IID
5826 }
5827}
5828impl windows_core::RuntimeName for ICoreWebView2ClientCertificateCollection {}
5829windows_core::imp::define_interface!(
5830 ICoreWebView2ClientCertificateRequestedEventArgs,
5831 ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl,
5832 0xbc59db28_bcc3_11eb_8529_0242ac130003
5833);
5834windows_core::imp::interface_hierarchy!(
5835 ICoreWebView2ClientCertificateRequestedEventArgs,
5836 windows_core::IUnknown
5837);
5838impl ICoreWebView2ClientCertificateRequestedEventArgs {
5839 pub unsafe fn Host(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
5840 unsafe {
5841 (windows_core::Interface::vtable(self).Host)(
5842 windows_core::Interface::as_raw(self),
5843 value as _,
5844 )
5845 .ok()
5846 }
5847 }
5848 pub unsafe fn Port(&self, value: *mut i32) -> windows_core::Result<()> {
5849 unsafe {
5850 (windows_core::Interface::vtable(self).Port)(
5851 windows_core::Interface::as_raw(self),
5852 value as _,
5853 )
5854 .ok()
5855 }
5856 }
5857 pub unsafe fn IsProxy(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
5858 unsafe {
5859 (windows_core::Interface::vtable(self).IsProxy)(
5860 windows_core::Interface::as_raw(self),
5861 value as _,
5862 )
5863 .ok()
5864 }
5865 }
5866 pub unsafe fn AllowedCertificateAuthorities(
5867 &self,
5868 ) -> windows_core::Result<ICoreWebView2StringCollection> {
5869 unsafe {
5870 let mut result__ = core::mem::zeroed();
5871 (windows_core::Interface::vtable(self).AllowedCertificateAuthorities)(
5872 windows_core::Interface::as_raw(self),
5873 &mut result__,
5874 )
5875 .and_then(|| windows_core::Type::from_abi(result__))
5876 }
5877 }
5878 pub unsafe fn MutuallyTrustedCertificates(
5879 &self,
5880 ) -> windows_core::Result<ICoreWebView2ClientCertificateCollection> {
5881 unsafe {
5882 let mut result__ = core::mem::zeroed();
5883 (windows_core::Interface::vtable(self).MutuallyTrustedCertificates)(
5884 windows_core::Interface::as_raw(self),
5885 &mut result__,
5886 )
5887 .and_then(|| windows_core::Type::from_abi(result__))
5888 }
5889 }
5890 pub unsafe fn SelectedCertificate(
5891 &self,
5892 ) -> windows_core::Result<ICoreWebView2ClientCertificate> {
5893 unsafe {
5894 let mut result__ = core::mem::zeroed();
5895 (windows_core::Interface::vtable(self).SelectedCertificate)(
5896 windows_core::Interface::as_raw(self),
5897 &mut result__,
5898 )
5899 .and_then(|| windows_core::Type::from_abi(result__))
5900 }
5901 }
5902 pub unsafe fn SetSelectedCertificate<P0>(&self, value: P0) -> windows_core::Result<()>
5903 where
5904 P0: windows_core::Param<ICoreWebView2ClientCertificate>,
5905 {
5906 unsafe {
5907 (windows_core::Interface::vtable(self).SetSelectedCertificate)(
5908 windows_core::Interface::as_raw(self),
5909 value.param().abi(),
5910 )
5911 .ok()
5912 }
5913 }
5914 pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
5915 unsafe {
5916 (windows_core::Interface::vtable(self).Cancel)(
5917 windows_core::Interface::as_raw(self),
5918 value as _,
5919 )
5920 .ok()
5921 }
5922 }
5923 pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
5924 unsafe {
5925 (windows_core::Interface::vtable(self).SetCancel)(
5926 windows_core::Interface::as_raw(self),
5927 value.into(),
5928 )
5929 .ok()
5930 }
5931 }
5932 pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
5933 unsafe {
5934 (windows_core::Interface::vtable(self).Handled)(
5935 windows_core::Interface::as_raw(self),
5936 value as _,
5937 )
5938 .ok()
5939 }
5940 }
5941 pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
5942 unsafe {
5943 (windows_core::Interface::vtable(self).SetHandled)(
5944 windows_core::Interface::as_raw(self),
5945 value.into(),
5946 )
5947 .ok()
5948 }
5949 }
5950 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
5951 unsafe {
5952 let mut result__ = core::mem::zeroed();
5953 (windows_core::Interface::vtable(self).GetDeferral)(
5954 windows_core::Interface::as_raw(self),
5955 &mut result__,
5956 )
5957 .and_then(|| windows_core::Type::from_abi(result__))
5958 }
5959 }
5960}
5961#[repr(C)]
5962pub struct ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
5963 pub base__: windows_core::IUnknown_Vtbl,
5964 pub Host: unsafe extern "system" fn(
5965 *mut core::ffi::c_void,
5966 *mut windows_core::PWSTR,
5967 ) -> windows_core::HRESULT,
5968 pub Port: unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
5969 pub IsProxy: unsafe extern "system" fn(
5970 *mut core::ffi::c_void,
5971 *mut windows_core::BOOL,
5972 ) -> windows_core::HRESULT,
5973 pub AllowedCertificateAuthorities: unsafe extern "system" fn(
5974 *mut core::ffi::c_void,
5975 *mut *mut core::ffi::c_void,
5976 ) -> windows_core::HRESULT,
5977 pub MutuallyTrustedCertificates: unsafe extern "system" fn(
5978 *mut core::ffi::c_void,
5979 *mut *mut core::ffi::c_void,
5980 ) -> windows_core::HRESULT,
5981 pub SelectedCertificate: unsafe extern "system" fn(
5982 *mut core::ffi::c_void,
5983 *mut *mut core::ffi::c_void,
5984 ) -> windows_core::HRESULT,
5985 pub SetSelectedCertificate: unsafe extern "system" fn(
5986 *mut core::ffi::c_void,
5987 *mut core::ffi::c_void,
5988 ) -> windows_core::HRESULT,
5989 pub Cancel: unsafe extern "system" fn(
5990 *mut core::ffi::c_void,
5991 *mut windows_core::BOOL,
5992 ) -> windows_core::HRESULT,
5993 pub SetCancel: unsafe extern "system" fn(
5994 *mut core::ffi::c_void,
5995 windows_core::BOOL,
5996 ) -> windows_core::HRESULT,
5997 pub Handled: unsafe extern "system" fn(
5998 *mut core::ffi::c_void,
5999 *mut windows_core::BOOL,
6000 ) -> windows_core::HRESULT,
6001 pub SetHandled: unsafe extern "system" fn(
6002 *mut core::ffi::c_void,
6003 windows_core::BOOL,
6004 ) -> windows_core::HRESULT,
6005 pub GetDeferral: unsafe extern "system" fn(
6006 *mut core::ffi::c_void,
6007 *mut *mut core::ffi::c_void,
6008 ) -> windows_core::HRESULT,
6009}
6010pub trait ICoreWebView2ClientCertificateRequestedEventArgs_Impl:
6011 windows_core::IUnknownImpl
6012{
6013 fn Host(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
6014 fn Port(&self, value: *mut i32) -> windows_core::Result<()>;
6015 fn IsProxy(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
6016 fn AllowedCertificateAuthorities(&self) -> windows_core::Result<ICoreWebView2StringCollection>;
6017 fn MutuallyTrustedCertificates(
6018 &self,
6019 ) -> windows_core::Result<ICoreWebView2ClientCertificateCollection>;
6020 fn SelectedCertificate(&self) -> windows_core::Result<ICoreWebView2ClientCertificate>;
6021 fn SetSelectedCertificate(
6022 &self,
6023 value: windows_core::Ref<'_, ICoreWebView2ClientCertificate>,
6024 ) -> windows_core::Result<()>;
6025 fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
6026 fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
6027 fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
6028 fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
6029 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
6030}
6031impl ICoreWebView2ClientCertificateRequestedEventArgs_Vtbl {
6032 pub const fn new<
6033 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6034 const OFFSET: isize,
6035 >() -> Self {
6036 unsafe extern "system" fn Host<
6037 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6038 const OFFSET: isize,
6039 >(
6040 this: *mut core::ffi::c_void,
6041 value: *mut windows_core::PWSTR,
6042 ) -> windows_core::HRESULT {
6043 unsafe {
6044 let this: &Identity =
6045 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6046 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Host(
6047 this,
6048 core::mem::transmute_copy(&value),
6049 )
6050 .into()
6051 }
6052 }
6053 unsafe extern "system" fn Port<
6054 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6055 const OFFSET: isize,
6056 >(
6057 this: *mut core::ffi::c_void,
6058 value: *mut i32,
6059 ) -> windows_core::HRESULT {
6060 unsafe {
6061 let this: &Identity =
6062 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6063 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Port(
6064 this,
6065 core::mem::transmute_copy(&value),
6066 )
6067 .into()
6068 }
6069 }
6070 unsafe extern "system" fn IsProxy<
6071 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6072 const OFFSET: isize,
6073 >(
6074 this: *mut core::ffi::c_void,
6075 value: *mut windows_core::BOOL,
6076 ) -> windows_core::HRESULT {
6077 unsafe {
6078 let this: &Identity =
6079 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6080 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::IsProxy(
6081 this,
6082 core::mem::transmute_copy(&value),
6083 )
6084 .into()
6085 }
6086 }
6087 unsafe extern "system" fn AllowedCertificateAuthorities<
6088 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6089 const OFFSET: isize,
6090 >(
6091 this: *mut core::ffi::c_void,
6092 value: *mut *mut core::ffi::c_void,
6093 ) -> windows_core::HRESULT {
6094 unsafe {
6095 let this: &Identity =
6096 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6097 match ICoreWebView2ClientCertificateRequestedEventArgs_Impl:: AllowedCertificateAuthorities ( this , ) { Ok ( ok__ ) => { value . write ( core::mem::transmute ( ok__ ) ) ; windows_core::HRESULT ( 0 ) } Err ( err ) => err . into ( ) }
6098 }
6099 }
6100 unsafe extern "system" fn MutuallyTrustedCertificates<
6101 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6102 const OFFSET: isize,
6103 >(
6104 this: *mut core::ffi::c_void,
6105 value: *mut *mut core::ffi::c_void,
6106 ) -> windows_core::HRESULT {
6107 unsafe {
6108 let this: &Identity =
6109 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6110 match ICoreWebView2ClientCertificateRequestedEventArgs_Impl:: MutuallyTrustedCertificates ( this , ) { Ok ( ok__ ) => { value . write ( core::mem::transmute ( ok__ ) ) ; windows_core::HRESULT ( 0 ) } Err ( err ) => err . into ( ) }
6111 }
6112 }
6113 unsafe extern "system" fn SelectedCertificate<
6114 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6115 const OFFSET: isize,
6116 >(
6117 this: *mut core::ffi::c_void,
6118 value: *mut *mut core::ffi::c_void,
6119 ) -> windows_core::HRESULT {
6120 unsafe {
6121 let this: &Identity =
6122 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6123 match ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SelectedCertificate(
6124 this,
6125 ) {
6126 Ok(ok__) => {
6127 value.write(core::mem::transmute(ok__));
6128 windows_core::HRESULT(0)
6129 }
6130 Err(err) => err.into(),
6131 }
6132 }
6133 }
6134 unsafe extern "system" fn SetSelectedCertificate<
6135 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6136 const OFFSET: isize,
6137 >(
6138 this: *mut core::ffi::c_void,
6139 value: *mut core::ffi::c_void,
6140 ) -> windows_core::HRESULT {
6141 unsafe {
6142 let this: &Identity =
6143 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6144 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SetSelectedCertificate(
6145 this,
6146 core::mem::transmute_copy(&value),
6147 )
6148 .into()
6149 }
6150 }
6151 unsafe extern "system" fn Cancel<
6152 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6153 const OFFSET: isize,
6154 >(
6155 this: *mut core::ffi::c_void,
6156 value: *mut windows_core::BOOL,
6157 ) -> windows_core::HRESULT {
6158 unsafe {
6159 let this: &Identity =
6160 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6161 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Cancel(
6162 this,
6163 core::mem::transmute_copy(&value),
6164 )
6165 .into()
6166 }
6167 }
6168 unsafe extern "system" fn SetCancel<
6169 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6170 const OFFSET: isize,
6171 >(
6172 this: *mut core::ffi::c_void,
6173 value: windows_core::BOOL,
6174 ) -> windows_core::HRESULT {
6175 unsafe {
6176 let this: &Identity =
6177 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6178 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SetCancel(
6179 this,
6180 core::mem::transmute_copy(&value),
6181 )
6182 .into()
6183 }
6184 }
6185 unsafe extern "system" fn Handled<
6186 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6187 const OFFSET: isize,
6188 >(
6189 this: *mut core::ffi::c_void,
6190 value: *mut windows_core::BOOL,
6191 ) -> windows_core::HRESULT {
6192 unsafe {
6193 let this: &Identity =
6194 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6195 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::Handled(
6196 this,
6197 core::mem::transmute_copy(&value),
6198 )
6199 .into()
6200 }
6201 }
6202 unsafe extern "system" fn SetHandled<
6203 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6204 const OFFSET: isize,
6205 >(
6206 this: *mut core::ffi::c_void,
6207 value: windows_core::BOOL,
6208 ) -> windows_core::HRESULT {
6209 unsafe {
6210 let this: &Identity =
6211 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6212 ICoreWebView2ClientCertificateRequestedEventArgs_Impl::SetHandled(
6213 this,
6214 core::mem::transmute_copy(&value),
6215 )
6216 .into()
6217 }
6218 }
6219 unsafe extern "system" fn GetDeferral<
6220 Identity: ICoreWebView2ClientCertificateRequestedEventArgs_Impl,
6221 const OFFSET: isize,
6222 >(
6223 this: *mut core::ffi::c_void,
6224 deferral: *mut *mut core::ffi::c_void,
6225 ) -> windows_core::HRESULT {
6226 unsafe {
6227 let this: &Identity =
6228 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6229 match ICoreWebView2ClientCertificateRequestedEventArgs_Impl::GetDeferral(this) {
6230 Ok(ok__) => {
6231 deferral.write(core::mem::transmute(ok__));
6232 windows_core::HRESULT(0)
6233 }
6234 Err(err) => err.into(),
6235 }
6236 }
6237 }
6238 Self {
6239 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
6240 Host: Host::<Identity, OFFSET>,
6241 Port: Port::<Identity, OFFSET>,
6242 IsProxy: IsProxy::<Identity, OFFSET>,
6243 AllowedCertificateAuthorities: AllowedCertificateAuthorities::<Identity, OFFSET>,
6244 MutuallyTrustedCertificates: MutuallyTrustedCertificates::<Identity, OFFSET>,
6245 SelectedCertificate: SelectedCertificate::<Identity, OFFSET>,
6246 SetSelectedCertificate: SetSelectedCertificate::<Identity, OFFSET>,
6247 Cancel: Cancel::<Identity, OFFSET>,
6248 SetCancel: SetCancel::<Identity, OFFSET>,
6249 Handled: Handled::<Identity, OFFSET>,
6250 SetHandled: SetHandled::<Identity, OFFSET>,
6251 GetDeferral: GetDeferral::<Identity, OFFSET>,
6252 }
6253 }
6254 pub fn matches(iid: &windows_core::GUID) -> bool {
6255 iid == &<ICoreWebView2ClientCertificateRequestedEventArgs as windows_core::Interface>::IID
6256 }
6257}
6258impl windows_core::RuntimeName for ICoreWebView2ClientCertificateRequestedEventArgs {}
6259windows_core::imp::define_interface!(
6260 ICoreWebView2ClientCertificateRequestedEventHandler,
6261 ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl,
6262 0xd7175ba2_bcc3_11eb_8529_0242ac130003
6263);
6264windows_core::imp::interface_hierarchy!(
6265 ICoreWebView2ClientCertificateRequestedEventHandler,
6266 windows_core::IUnknown
6267);
6268impl ICoreWebView2ClientCertificateRequestedEventHandler {
6269 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
6270 where
6271 P0: windows_core::Param<ICoreWebView2>,
6272 P1: windows_core::Param<ICoreWebView2ClientCertificateRequestedEventArgs>,
6273 {
6274 unsafe {
6275 (windows_core::Interface::vtable(self).Invoke)(
6276 windows_core::Interface::as_raw(self),
6277 sender.param().abi(),
6278 args.param().abi(),
6279 )
6280 .ok()
6281 }
6282 }
6283}
6284#[repr(C)]
6285pub struct ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
6286 pub base__: windows_core::IUnknown_Vtbl,
6287 pub Invoke: unsafe extern "system" fn(
6288 *mut core::ffi::c_void,
6289 *mut core::ffi::c_void,
6290 *mut core::ffi::c_void,
6291 ) -> windows_core::HRESULT,
6292}
6293pub trait ICoreWebView2ClientCertificateRequestedEventHandler_Impl:
6294 windows_core::IUnknownImpl
6295{
6296 fn Invoke(
6297 &self,
6298 sender: windows_core::Ref<'_, ICoreWebView2>,
6299 args: windows_core::Ref<'_, ICoreWebView2ClientCertificateRequestedEventArgs>,
6300 ) -> windows_core::Result<()>;
6301}
6302impl ICoreWebView2ClientCertificateRequestedEventHandler_Vtbl {
6303 pub const fn new<
6304 Identity: ICoreWebView2ClientCertificateRequestedEventHandler_Impl,
6305 const OFFSET: isize,
6306 >() -> Self {
6307 unsafe extern "system" fn Invoke<
6308 Identity: ICoreWebView2ClientCertificateRequestedEventHandler_Impl,
6309 const OFFSET: isize,
6310 >(
6311 this: *mut core::ffi::c_void,
6312 sender: *mut core::ffi::c_void,
6313 args: *mut core::ffi::c_void,
6314 ) -> windows_core::HRESULT {
6315 unsafe {
6316 let this: &Identity =
6317 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6318 ICoreWebView2ClientCertificateRequestedEventHandler_Impl::Invoke(
6319 this,
6320 core::mem::transmute_copy(&sender),
6321 core::mem::transmute_copy(&args),
6322 )
6323 .into()
6324 }
6325 }
6326 Self {
6327 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
6328 Invoke: Invoke::<Identity, OFFSET>,
6329 }
6330 }
6331 pub fn matches(iid: &windows_core::GUID) -> bool {
6332 iid == & < ICoreWebView2ClientCertificateRequestedEventHandler as windows_core::Interface >::IID
6333 }
6334}
6335impl windows_core::RuntimeName for ICoreWebView2ClientCertificateRequestedEventHandler {}
6336windows_core::imp::define_interface!(
6337 ICoreWebView2CompositionController,
6338 ICoreWebView2CompositionController_Vtbl,
6339 0x3df9b733_b9ae_4a15_86b4_eb9ee9826469
6340);
6341windows_core::imp::interface_hierarchy!(ICoreWebView2CompositionController, windows_core::IUnknown);
6342impl ICoreWebView2CompositionController {
6343 pub unsafe fn RootVisualTarget(&self) -> windows_core::Result<windows_core::IUnknown> {
6344 unsafe {
6345 let mut result__ = core::mem::zeroed();
6346 (windows_core::Interface::vtable(self).RootVisualTarget)(
6347 windows_core::Interface::as_raw(self),
6348 &mut result__,
6349 )
6350 .and_then(|| windows_core::Type::from_abi(result__))
6351 }
6352 }
6353 pub unsafe fn SetRootVisualTarget<P0>(&self, target: P0) -> windows_core::Result<()>
6354 where
6355 P0: windows_core::Param<windows_core::IUnknown>,
6356 {
6357 unsafe {
6358 (windows_core::Interface::vtable(self).SetRootVisualTarget)(
6359 windows_core::Interface::as_raw(self),
6360 target.param().abi(),
6361 )
6362 .ok()
6363 }
6364 }
6365 pub unsafe fn SendMouseInput(
6366 &self,
6367 eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
6368 virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
6369 mousedata: u32,
6370 point: windows::Win32::Foundation::POINT,
6371 ) -> windows_core::Result<()> {
6372 unsafe {
6373 (windows_core::Interface::vtable(self).SendMouseInput)(
6374 windows_core::Interface::as_raw(self),
6375 eventkind,
6376 virtualkeys,
6377 mousedata,
6378 core::mem::transmute(point),
6379 )
6380 .ok()
6381 }
6382 }
6383 pub unsafe fn SendPointerInput<P1>(
6384 &self,
6385 eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
6386 pointerinfo: P1,
6387 ) -> windows_core::Result<()>
6388 where
6389 P1: windows_core::Param<ICoreWebView2PointerInfo>,
6390 {
6391 unsafe {
6392 (windows_core::Interface::vtable(self).SendPointerInput)(
6393 windows_core::Interface::as_raw(self),
6394 eventkind,
6395 pointerinfo.param().abi(),
6396 )
6397 .ok()
6398 }
6399 }
6400 pub unsafe fn Cursor(
6401 &self,
6402 cursor: *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
6403 ) -> windows_core::Result<()> {
6404 unsafe {
6405 (windows_core::Interface::vtable(self).Cursor)(
6406 windows_core::Interface::as_raw(self),
6407 cursor as _,
6408 )
6409 .ok()
6410 }
6411 }
6412 pub unsafe fn SystemCursorId(&self, systemcursorid: *mut u32) -> windows_core::Result<()> {
6413 unsafe {
6414 (windows_core::Interface::vtable(self).SystemCursorId)(
6415 windows_core::Interface::as_raw(self),
6416 systemcursorid as _,
6417 )
6418 .ok()
6419 }
6420 }
6421 pub unsafe fn add_CursorChanged<P0>(
6422 &self,
6423 eventhandler: P0,
6424 token: *mut i64,
6425 ) -> windows_core::Result<()>
6426 where
6427 P0: windows_core::Param<ICoreWebView2CursorChangedEventHandler>,
6428 {
6429 unsafe {
6430 (windows_core::Interface::vtable(self).add_CursorChanged)(
6431 windows_core::Interface::as_raw(self),
6432 eventhandler.param().abi(),
6433 token as _,
6434 )
6435 .ok()
6436 }
6437 }
6438 pub unsafe fn remove_CursorChanged(&self, token: i64) -> windows_core::Result<()> {
6439 unsafe {
6440 (windows_core::Interface::vtable(self).remove_CursorChanged)(
6441 windows_core::Interface::as_raw(self),
6442 token,
6443 )
6444 .ok()
6445 }
6446 }
6447}
6448#[repr(C)]
6449pub struct ICoreWebView2CompositionController_Vtbl {
6450 pub base__: windows_core::IUnknown_Vtbl,
6451 pub RootVisualTarget: unsafe extern "system" fn(
6452 *mut core::ffi::c_void,
6453 *mut *mut core::ffi::c_void,
6454 ) -> windows_core::HRESULT,
6455 pub SetRootVisualTarget: unsafe extern "system" fn(
6456 *mut core::ffi::c_void,
6457 *mut core::ffi::c_void,
6458 ) -> windows_core::HRESULT,
6459 pub SendMouseInput: unsafe extern "system" fn(
6460 *mut core::ffi::c_void,
6461 COREWEBVIEW2_MOUSE_EVENT_KIND,
6462 COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
6463 u32,
6464 windows::Win32::Foundation::POINT,
6465 ) -> windows_core::HRESULT,
6466 pub SendPointerInput: unsafe extern "system" fn(
6467 *mut core::ffi::c_void,
6468 COREWEBVIEW2_POINTER_EVENT_KIND,
6469 *mut core::ffi::c_void,
6470 ) -> windows_core::HRESULT,
6471 pub Cursor: unsafe extern "system" fn(
6472 *mut core::ffi::c_void,
6473 *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
6474 ) -> windows_core::HRESULT,
6475 pub SystemCursorId:
6476 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
6477 pub add_CursorChanged: unsafe extern "system" fn(
6478 *mut core::ffi::c_void,
6479 *mut core::ffi::c_void,
6480 *mut i64,
6481 ) -> windows_core::HRESULT,
6482 pub remove_CursorChanged:
6483 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
6484}
6485pub trait ICoreWebView2CompositionController_Impl: windows_core::IUnknownImpl {
6486 fn RootVisualTarget(&self) -> windows_core::Result<windows_core::IUnknown>;
6487 fn SetRootVisualTarget(
6488 &self,
6489 target: windows_core::Ref<'_, windows_core::IUnknown>,
6490 ) -> windows_core::Result<()>;
6491 fn SendMouseInput(
6492 &self,
6493 eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
6494 virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
6495 mousedata: u32,
6496 point: &windows::Win32::Foundation::POINT,
6497 ) -> windows_core::Result<()>;
6498 fn SendPointerInput(
6499 &self,
6500 eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
6501 pointerinfo: windows_core::Ref<'_, ICoreWebView2PointerInfo>,
6502 ) -> windows_core::Result<()>;
6503 fn Cursor(
6504 &self,
6505 cursor: *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
6506 ) -> windows_core::Result<()>;
6507 fn SystemCursorId(&self, systemcursorid: *mut u32) -> windows_core::Result<()>;
6508 fn add_CursorChanged(
6509 &self,
6510 eventhandler: windows_core::Ref<'_, ICoreWebView2CursorChangedEventHandler>,
6511 token: *mut i64,
6512 ) -> windows_core::Result<()>;
6513 fn remove_CursorChanged(&self, token: i64) -> windows_core::Result<()>;
6514}
6515impl ICoreWebView2CompositionController_Vtbl {
6516 pub const fn new<Identity: ICoreWebView2CompositionController_Impl, const OFFSET: isize>(
6517 ) -> Self {
6518 unsafe extern "system" fn RootVisualTarget<
6519 Identity: ICoreWebView2CompositionController_Impl,
6520 const OFFSET: isize,
6521 >(
6522 this: *mut core::ffi::c_void,
6523 target: *mut *mut core::ffi::c_void,
6524 ) -> windows_core::HRESULT {
6525 unsafe {
6526 let this: &Identity =
6527 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6528 match ICoreWebView2CompositionController_Impl::RootVisualTarget(this) {
6529 Ok(ok__) => {
6530 target.write(core::mem::transmute(ok__));
6531 windows_core::HRESULT(0)
6532 }
6533 Err(err) => err.into(),
6534 }
6535 }
6536 }
6537 unsafe extern "system" fn SetRootVisualTarget<
6538 Identity: ICoreWebView2CompositionController_Impl,
6539 const OFFSET: isize,
6540 >(
6541 this: *mut core::ffi::c_void,
6542 target: *mut core::ffi::c_void,
6543 ) -> windows_core::HRESULT {
6544 unsafe {
6545 let this: &Identity =
6546 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6547 ICoreWebView2CompositionController_Impl::SetRootVisualTarget(
6548 this,
6549 core::mem::transmute_copy(&target),
6550 )
6551 .into()
6552 }
6553 }
6554 unsafe extern "system" fn SendMouseInput<
6555 Identity: ICoreWebView2CompositionController_Impl,
6556 const OFFSET: isize,
6557 >(
6558 this: *mut core::ffi::c_void,
6559 eventkind: COREWEBVIEW2_MOUSE_EVENT_KIND,
6560 virtualkeys: COREWEBVIEW2_MOUSE_EVENT_VIRTUAL_KEYS,
6561 mousedata: u32,
6562 point: windows::Win32::Foundation::POINT,
6563 ) -> windows_core::HRESULT {
6564 unsafe {
6565 let this: &Identity =
6566 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6567 ICoreWebView2CompositionController_Impl::SendMouseInput(
6568 this,
6569 core::mem::transmute_copy(&eventkind),
6570 core::mem::transmute_copy(&virtualkeys),
6571 core::mem::transmute_copy(&mousedata),
6572 core::mem::transmute(&point),
6573 )
6574 .into()
6575 }
6576 }
6577 unsafe extern "system" fn SendPointerInput<
6578 Identity: ICoreWebView2CompositionController_Impl,
6579 const OFFSET: isize,
6580 >(
6581 this: *mut core::ffi::c_void,
6582 eventkind: COREWEBVIEW2_POINTER_EVENT_KIND,
6583 pointerinfo: *mut core::ffi::c_void,
6584 ) -> windows_core::HRESULT {
6585 unsafe {
6586 let this: &Identity =
6587 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6588 ICoreWebView2CompositionController_Impl::SendPointerInput(
6589 this,
6590 core::mem::transmute_copy(&eventkind),
6591 core::mem::transmute_copy(&pointerinfo),
6592 )
6593 .into()
6594 }
6595 }
6596 unsafe extern "system" fn Cursor<
6597 Identity: ICoreWebView2CompositionController_Impl,
6598 const OFFSET: isize,
6599 >(
6600 this: *mut core::ffi::c_void,
6601 cursor: *mut windows::Win32::UI::WindowsAndMessaging::HCURSOR,
6602 ) -> windows_core::HRESULT {
6603 unsafe {
6604 let this: &Identity =
6605 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6606 ICoreWebView2CompositionController_Impl::Cursor(
6607 this,
6608 core::mem::transmute_copy(&cursor),
6609 )
6610 .into()
6611 }
6612 }
6613 unsafe extern "system" fn SystemCursorId<
6614 Identity: ICoreWebView2CompositionController_Impl,
6615 const OFFSET: isize,
6616 >(
6617 this: *mut core::ffi::c_void,
6618 systemcursorid: *mut u32,
6619 ) -> windows_core::HRESULT {
6620 unsafe {
6621 let this: &Identity =
6622 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6623 ICoreWebView2CompositionController_Impl::SystemCursorId(
6624 this,
6625 core::mem::transmute_copy(&systemcursorid),
6626 )
6627 .into()
6628 }
6629 }
6630 unsafe extern "system" fn add_CursorChanged<
6631 Identity: ICoreWebView2CompositionController_Impl,
6632 const OFFSET: isize,
6633 >(
6634 this: *mut core::ffi::c_void,
6635 eventhandler: *mut core::ffi::c_void,
6636 token: *mut i64,
6637 ) -> windows_core::HRESULT {
6638 unsafe {
6639 let this: &Identity =
6640 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6641 ICoreWebView2CompositionController_Impl::add_CursorChanged(
6642 this,
6643 core::mem::transmute_copy(&eventhandler),
6644 core::mem::transmute_copy(&token),
6645 )
6646 .into()
6647 }
6648 }
6649 unsafe extern "system" fn remove_CursorChanged<
6650 Identity: ICoreWebView2CompositionController_Impl,
6651 const OFFSET: isize,
6652 >(
6653 this: *mut core::ffi::c_void,
6654 token: i64,
6655 ) -> windows_core::HRESULT {
6656 unsafe {
6657 let this: &Identity =
6658 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6659 ICoreWebView2CompositionController_Impl::remove_CursorChanged(
6660 this,
6661 core::mem::transmute_copy(&token),
6662 )
6663 .into()
6664 }
6665 }
6666 Self {
6667 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
6668 RootVisualTarget: RootVisualTarget::<Identity, OFFSET>,
6669 SetRootVisualTarget: SetRootVisualTarget::<Identity, OFFSET>,
6670 SendMouseInput: SendMouseInput::<Identity, OFFSET>,
6671 SendPointerInput: SendPointerInput::<Identity, OFFSET>,
6672 Cursor: Cursor::<Identity, OFFSET>,
6673 SystemCursorId: SystemCursorId::<Identity, OFFSET>,
6674 add_CursorChanged: add_CursorChanged::<Identity, OFFSET>,
6675 remove_CursorChanged: remove_CursorChanged::<Identity, OFFSET>,
6676 }
6677 }
6678 pub fn matches(iid: &windows_core::GUID) -> bool {
6679 iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
6680 }
6681}
6682impl windows_core::RuntimeName for ICoreWebView2CompositionController {}
6683windows_core::imp::define_interface!(
6684 ICoreWebView2CompositionController2,
6685 ICoreWebView2CompositionController2_Vtbl,
6686 0x0b6a3d24_49cb_4806_ba20_b5e0734a7b26
6687);
6688impl core::ops::Deref for ICoreWebView2CompositionController2 {
6689 type Target = ICoreWebView2CompositionController;
6690 fn deref(&self) -> &Self::Target {
6691 unsafe { core::mem::transmute(self) }
6692 }
6693}
6694windows_core::imp::interface_hierarchy!(
6695 ICoreWebView2CompositionController2,
6696 windows_core::IUnknown,
6697 ICoreWebView2CompositionController
6698);
6699impl ICoreWebView2CompositionController2 {
6700 pub unsafe fn AutomationProvider(&self) -> windows_core::Result<windows_core::IUnknown> {
6701 unsafe {
6702 let mut result__ = core::mem::zeroed();
6703 (windows_core::Interface::vtable(self).AutomationProvider)(
6704 windows_core::Interface::as_raw(self),
6705 &mut result__,
6706 )
6707 .and_then(|| windows_core::Type::from_abi(result__))
6708 }
6709 }
6710}
6711#[repr(C)]
6712pub struct ICoreWebView2CompositionController2_Vtbl {
6713 pub base__: ICoreWebView2CompositionController_Vtbl,
6714 pub AutomationProvider: unsafe extern "system" fn(
6715 *mut core::ffi::c_void,
6716 *mut *mut core::ffi::c_void,
6717 ) -> windows_core::HRESULT,
6718}
6719pub trait ICoreWebView2CompositionController2_Impl:
6720 ICoreWebView2CompositionController_Impl
6721{
6722 fn AutomationProvider(&self) -> windows_core::Result<windows_core::IUnknown>;
6723}
6724impl ICoreWebView2CompositionController2_Vtbl {
6725 pub const fn new<Identity: ICoreWebView2CompositionController2_Impl, const OFFSET: isize>(
6726 ) -> Self {
6727 unsafe extern "system" fn AutomationProvider<
6728 Identity: ICoreWebView2CompositionController2_Impl,
6729 const OFFSET: isize,
6730 >(
6731 this: *mut core::ffi::c_void,
6732 value: *mut *mut core::ffi::c_void,
6733 ) -> windows_core::HRESULT {
6734 unsafe {
6735 let this: &Identity =
6736 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6737 match ICoreWebView2CompositionController2_Impl::AutomationProvider(this) {
6738 Ok(ok__) => {
6739 value.write(core::mem::transmute(ok__));
6740 windows_core::HRESULT(0)
6741 }
6742 Err(err) => err.into(),
6743 }
6744 }
6745 }
6746 Self {
6747 base__: ICoreWebView2CompositionController_Vtbl::new::<Identity, OFFSET>(),
6748 AutomationProvider: AutomationProvider::<Identity, OFFSET>,
6749 }
6750 }
6751 pub fn matches(iid: &windows_core::GUID) -> bool {
6752 iid == &<ICoreWebView2CompositionController2 as windows_core::Interface>::IID
6753 || iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
6754 }
6755}
6756impl windows_core::RuntimeName for ICoreWebView2CompositionController2 {}
6757windows_core::imp::define_interface!(
6758 ICoreWebView2CompositionController3,
6759 ICoreWebView2CompositionController3_Vtbl,
6760 0x9570570e_4d76_4361_9ee1_f04d0dbdfb1e
6761);
6762impl core::ops::Deref for ICoreWebView2CompositionController3 {
6763 type Target = ICoreWebView2CompositionController2;
6764 fn deref(&self) -> &Self::Target {
6765 unsafe { core::mem::transmute(self) }
6766 }
6767}
6768windows_core::imp::interface_hierarchy!(
6769 ICoreWebView2CompositionController3,
6770 windows_core::IUnknown,
6771 ICoreWebView2CompositionController,
6772 ICoreWebView2CompositionController2
6773);
6774impl ICoreWebView2CompositionController3 {
6775 pub unsafe fn DragEnter<P0>(
6776 &self,
6777 dataobject: P0,
6778 keystate: u32,
6779 point: windows::Win32::Foundation::POINT,
6780 effect: *mut u32,
6781 ) -> windows_core::Result<()>
6782 where
6783 P0: windows_core::Param<windows::Win32::System::Com::IDataObject>,
6784 {
6785 unsafe {
6786 (windows_core::Interface::vtable(self).DragEnter)(
6787 windows_core::Interface::as_raw(self),
6788 dataobject.param().abi(),
6789 keystate,
6790 core::mem::transmute(point),
6791 effect as _,
6792 )
6793 .ok()
6794 }
6795 }
6796 pub unsafe fn DragLeave(&self) -> windows_core::Result<()> {
6797 unsafe {
6798 (windows_core::Interface::vtable(self).DragLeave)(windows_core::Interface::as_raw(self))
6799 .ok()
6800 }
6801 }
6802 pub unsafe fn DragOver(
6803 &self,
6804 keystate: u32,
6805 point: windows::Win32::Foundation::POINT,
6806 effect: *mut u32,
6807 ) -> windows_core::Result<()> {
6808 unsafe {
6809 (windows_core::Interface::vtable(self).DragOver)(
6810 windows_core::Interface::as_raw(self),
6811 keystate,
6812 core::mem::transmute(point),
6813 effect as _,
6814 )
6815 .ok()
6816 }
6817 }
6818 pub unsafe fn Drop<P0>(
6819 &self,
6820 dataobject: P0,
6821 keystate: u32,
6822 point: windows::Win32::Foundation::POINT,
6823 effect: *mut u32,
6824 ) -> windows_core::Result<()>
6825 where
6826 P0: windows_core::Param<windows::Win32::System::Com::IDataObject>,
6827 {
6828 unsafe {
6829 (windows_core::Interface::vtable(self).Drop)(
6830 windows_core::Interface::as_raw(self),
6831 dataobject.param().abi(),
6832 keystate,
6833 core::mem::transmute(point),
6834 effect as _,
6835 )
6836 .ok()
6837 }
6838 }
6839}
6840#[repr(C)]
6841pub struct ICoreWebView2CompositionController3_Vtbl {
6842 pub base__: ICoreWebView2CompositionController2_Vtbl,
6843 pub DragEnter: unsafe extern "system" fn(
6844 *mut core::ffi::c_void,
6845 *mut core::ffi::c_void,
6846 u32,
6847 windows::Win32::Foundation::POINT,
6848 *mut u32,
6849 ) -> windows_core::HRESULT,
6850 pub DragLeave: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
6851 pub DragOver: unsafe extern "system" fn(
6852 *mut core::ffi::c_void,
6853 u32,
6854 windows::Win32::Foundation::POINT,
6855 *mut u32,
6856 ) -> windows_core::HRESULT,
6857 pub Drop: unsafe extern "system" fn(
6858 *mut core::ffi::c_void,
6859 *mut core::ffi::c_void,
6860 u32,
6861 windows::Win32::Foundation::POINT,
6862 *mut u32,
6863 ) -> windows_core::HRESULT,
6864}
6865pub trait ICoreWebView2CompositionController3_Impl:
6866 ICoreWebView2CompositionController2_Impl
6867{
6868 fn DragEnter(
6869 &self,
6870 dataobject: windows_core::Ref<'_, windows::Win32::System::Com::IDataObject>,
6871 keystate: u32,
6872 point: &windows::Win32::Foundation::POINT,
6873 effect: *mut u32,
6874 ) -> windows_core::Result<()>;
6875 fn DragLeave(&self) -> windows_core::Result<()>;
6876 fn DragOver(
6877 &self,
6878 keystate: u32,
6879 point: &windows::Win32::Foundation::POINT,
6880 effect: *mut u32,
6881 ) -> windows_core::Result<()>;
6882 fn Drop(
6883 &self,
6884 dataobject: windows_core::Ref<'_, windows::Win32::System::Com::IDataObject>,
6885 keystate: u32,
6886 point: &windows::Win32::Foundation::POINT,
6887 effect: *mut u32,
6888 ) -> windows_core::Result<()>;
6889}
6890impl ICoreWebView2CompositionController3_Vtbl {
6891 pub const fn new<Identity: ICoreWebView2CompositionController3_Impl, const OFFSET: isize>(
6892 ) -> Self {
6893 unsafe extern "system" fn DragEnter<
6894 Identity: ICoreWebView2CompositionController3_Impl,
6895 const OFFSET: isize,
6896 >(
6897 this: *mut core::ffi::c_void,
6898 dataobject: *mut core::ffi::c_void,
6899 keystate: u32,
6900 point: windows::Win32::Foundation::POINT,
6901 effect: *mut u32,
6902 ) -> windows_core::HRESULT {
6903 unsafe {
6904 let this: &Identity =
6905 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6906 ICoreWebView2CompositionController3_Impl::DragEnter(
6907 this,
6908 core::mem::transmute_copy(&dataobject),
6909 core::mem::transmute_copy(&keystate),
6910 core::mem::transmute(&point),
6911 core::mem::transmute_copy(&effect),
6912 )
6913 .into()
6914 }
6915 }
6916 unsafe extern "system" fn DragLeave<
6917 Identity: ICoreWebView2CompositionController3_Impl,
6918 const OFFSET: isize,
6919 >(
6920 this: *mut core::ffi::c_void,
6921 ) -> windows_core::HRESULT {
6922 unsafe {
6923 let this: &Identity =
6924 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6925 ICoreWebView2CompositionController3_Impl::DragLeave(this).into()
6926 }
6927 }
6928 unsafe extern "system" fn DragOver<
6929 Identity: ICoreWebView2CompositionController3_Impl,
6930 const OFFSET: isize,
6931 >(
6932 this: *mut core::ffi::c_void,
6933 keystate: u32,
6934 point: windows::Win32::Foundation::POINT,
6935 effect: *mut u32,
6936 ) -> windows_core::HRESULT {
6937 unsafe {
6938 let this: &Identity =
6939 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6940 ICoreWebView2CompositionController3_Impl::DragOver(
6941 this,
6942 core::mem::transmute_copy(&keystate),
6943 core::mem::transmute(&point),
6944 core::mem::transmute_copy(&effect),
6945 )
6946 .into()
6947 }
6948 }
6949 unsafe extern "system" fn Drop<
6950 Identity: ICoreWebView2CompositionController3_Impl,
6951 const OFFSET: isize,
6952 >(
6953 this: *mut core::ffi::c_void,
6954 dataobject: *mut core::ffi::c_void,
6955 keystate: u32,
6956 point: windows::Win32::Foundation::POINT,
6957 effect: *mut u32,
6958 ) -> windows_core::HRESULT {
6959 unsafe {
6960 let this: &Identity =
6961 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
6962 ICoreWebView2CompositionController3_Impl::Drop(
6963 this,
6964 core::mem::transmute_copy(&dataobject),
6965 core::mem::transmute_copy(&keystate),
6966 core::mem::transmute(&point),
6967 core::mem::transmute_copy(&effect),
6968 )
6969 .into()
6970 }
6971 }
6972 Self {
6973 base__: ICoreWebView2CompositionController2_Vtbl::new::<Identity, OFFSET>(),
6974 DragEnter: DragEnter::<Identity, OFFSET>,
6975 DragLeave: DragLeave::<Identity, OFFSET>,
6976 DragOver: DragOver::<Identity, OFFSET>,
6977 Drop: Drop::<Identity, OFFSET>,
6978 }
6979 }
6980 pub fn matches(iid: &windows_core::GUID) -> bool {
6981 iid == &<ICoreWebView2CompositionController3 as windows_core::Interface>::IID
6982 || iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
6983 || iid == &<ICoreWebView2CompositionController2 as windows_core::Interface>::IID
6984 }
6985}
6986impl windows_core::RuntimeName for ICoreWebView2CompositionController3 {}
6987windows_core::imp::define_interface!(
6988 ICoreWebView2CompositionController4,
6989 ICoreWebView2CompositionController4_Vtbl,
6990 0x7c367b9b_3d2b_450f_9e58_d61a20f486aa
6991);
6992impl core::ops::Deref for ICoreWebView2CompositionController4 {
6993 type Target = ICoreWebView2CompositionController3;
6994 fn deref(&self) -> &Self::Target {
6995 unsafe { core::mem::transmute(self) }
6996 }
6997}
6998windows_core::imp::interface_hierarchy!(
6999 ICoreWebView2CompositionController4,
7000 windows_core::IUnknown,
7001 ICoreWebView2CompositionController,
7002 ICoreWebView2CompositionController2,
7003 ICoreWebView2CompositionController3
7004);
7005impl ICoreWebView2CompositionController4 {
7006 pub unsafe fn GetNonClientRegionAtPoint(
7007 &self,
7008 point: windows::Win32::Foundation::POINT,
7009 value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7010 ) -> windows_core::Result<()> {
7011 unsafe {
7012 (windows_core::Interface::vtable(self).GetNonClientRegionAtPoint)(
7013 windows_core::Interface::as_raw(self),
7014 core::mem::transmute(point),
7015 value as _,
7016 )
7017 .ok()
7018 }
7019 }
7020 pub unsafe fn QueryNonClientRegion(
7021 &self,
7022 kind: COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7023 ) -> windows_core::Result<ICoreWebView2RegionRectCollectionView> {
7024 unsafe {
7025 let mut result__ = core::mem::zeroed();
7026 (windows_core::Interface::vtable(self).QueryNonClientRegion)(
7027 windows_core::Interface::as_raw(self),
7028 kind,
7029 &mut result__,
7030 )
7031 .and_then(|| windows_core::Type::from_abi(result__))
7032 }
7033 }
7034 pub unsafe fn add_NonClientRegionChanged<P0>(
7035 &self,
7036 eventhandler: P0,
7037 token: *mut i64,
7038 ) -> windows_core::Result<()>
7039 where
7040 P0: windows_core::Param<ICoreWebView2NonClientRegionChangedEventHandler>,
7041 {
7042 unsafe {
7043 (windows_core::Interface::vtable(self).add_NonClientRegionChanged)(
7044 windows_core::Interface::as_raw(self),
7045 eventhandler.param().abi(),
7046 token as _,
7047 )
7048 .ok()
7049 }
7050 }
7051 pub unsafe fn remove_NonClientRegionChanged(&self, token: i64) -> windows_core::Result<()> {
7052 unsafe {
7053 (windows_core::Interface::vtable(self).remove_NonClientRegionChanged)(
7054 windows_core::Interface::as_raw(self),
7055 token,
7056 )
7057 .ok()
7058 }
7059 }
7060}
7061#[repr(C)]
7062pub struct ICoreWebView2CompositionController4_Vtbl {
7063 pub base__: ICoreWebView2CompositionController3_Vtbl,
7064 pub GetNonClientRegionAtPoint: unsafe extern "system" fn(
7065 *mut core::ffi::c_void,
7066 windows::Win32::Foundation::POINT,
7067 *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7068 ) -> windows_core::HRESULT,
7069 pub QueryNonClientRegion: unsafe extern "system" fn(
7070 *mut core::ffi::c_void,
7071 COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7072 *mut *mut core::ffi::c_void,
7073 ) -> windows_core::HRESULT,
7074 pub add_NonClientRegionChanged: unsafe extern "system" fn(
7075 *mut core::ffi::c_void,
7076 *mut core::ffi::c_void,
7077 *mut i64,
7078 ) -> windows_core::HRESULT,
7079 pub remove_NonClientRegionChanged:
7080 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
7081}
7082pub trait ICoreWebView2CompositionController4_Impl:
7083 ICoreWebView2CompositionController3_Impl
7084{
7085 fn GetNonClientRegionAtPoint(
7086 &self,
7087 point: &windows::Win32::Foundation::POINT,
7088 value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7089 ) -> windows_core::Result<()>;
7090 fn QueryNonClientRegion(
7091 &self,
7092 kind: COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7093 ) -> windows_core::Result<ICoreWebView2RegionRectCollectionView>;
7094 fn add_NonClientRegionChanged(
7095 &self,
7096 eventhandler: windows_core::Ref<'_, ICoreWebView2NonClientRegionChangedEventHandler>,
7097 token: *mut i64,
7098 ) -> windows_core::Result<()>;
7099 fn remove_NonClientRegionChanged(&self, token: i64) -> windows_core::Result<()>;
7100}
7101impl ICoreWebView2CompositionController4_Vtbl {
7102 pub const fn new<Identity: ICoreWebView2CompositionController4_Impl, const OFFSET: isize>(
7103 ) -> Self {
7104 unsafe extern "system" fn GetNonClientRegionAtPoint<
7105 Identity: ICoreWebView2CompositionController4_Impl,
7106 const OFFSET: isize,
7107 >(
7108 this: *mut core::ffi::c_void,
7109 point: windows::Win32::Foundation::POINT,
7110 value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7111 ) -> windows_core::HRESULT {
7112 unsafe {
7113 let this: &Identity =
7114 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7115 ICoreWebView2CompositionController4_Impl::GetNonClientRegionAtPoint(
7116 this,
7117 core::mem::transmute(&point),
7118 core::mem::transmute_copy(&value),
7119 )
7120 .into()
7121 }
7122 }
7123 unsafe extern "system" fn QueryNonClientRegion<
7124 Identity: ICoreWebView2CompositionController4_Impl,
7125 const OFFSET: isize,
7126 >(
7127 this: *mut core::ffi::c_void,
7128 kind: COREWEBVIEW2_NON_CLIENT_REGION_KIND,
7129 rects: *mut *mut core::ffi::c_void,
7130 ) -> windows_core::HRESULT {
7131 unsafe {
7132 let this: &Identity =
7133 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7134 match ICoreWebView2CompositionController4_Impl::QueryNonClientRegion(
7135 this,
7136 core::mem::transmute_copy(&kind),
7137 ) {
7138 Ok(ok__) => {
7139 rects.write(core::mem::transmute(ok__));
7140 windows_core::HRESULT(0)
7141 }
7142 Err(err) => err.into(),
7143 }
7144 }
7145 }
7146 unsafe extern "system" fn add_NonClientRegionChanged<
7147 Identity: ICoreWebView2CompositionController4_Impl,
7148 const OFFSET: isize,
7149 >(
7150 this: *mut core::ffi::c_void,
7151 eventhandler: *mut core::ffi::c_void,
7152 token: *mut i64,
7153 ) -> windows_core::HRESULT {
7154 unsafe {
7155 let this: &Identity =
7156 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7157 ICoreWebView2CompositionController4_Impl::add_NonClientRegionChanged(
7158 this,
7159 core::mem::transmute_copy(&eventhandler),
7160 core::mem::transmute_copy(&token),
7161 )
7162 .into()
7163 }
7164 }
7165 unsafe extern "system" fn remove_NonClientRegionChanged<
7166 Identity: ICoreWebView2CompositionController4_Impl,
7167 const OFFSET: isize,
7168 >(
7169 this: *mut core::ffi::c_void,
7170 token: i64,
7171 ) -> windows_core::HRESULT {
7172 unsafe {
7173 let this: &Identity =
7174 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7175 ICoreWebView2CompositionController4_Impl::remove_NonClientRegionChanged(
7176 this,
7177 core::mem::transmute_copy(&token),
7178 )
7179 .into()
7180 }
7181 }
7182 Self {
7183 base__: ICoreWebView2CompositionController3_Vtbl::new::<Identity, OFFSET>(),
7184 GetNonClientRegionAtPoint: GetNonClientRegionAtPoint::<Identity, OFFSET>,
7185 QueryNonClientRegion: QueryNonClientRegion::<Identity, OFFSET>,
7186 add_NonClientRegionChanged: add_NonClientRegionChanged::<Identity, OFFSET>,
7187 remove_NonClientRegionChanged: remove_NonClientRegionChanged::<Identity, OFFSET>,
7188 }
7189 }
7190 pub fn matches(iid: &windows_core::GUID) -> bool {
7191 iid == &<ICoreWebView2CompositionController4 as windows_core::Interface>::IID
7192 || iid == &<ICoreWebView2CompositionController as windows_core::Interface>::IID
7193 || iid == &<ICoreWebView2CompositionController2 as windows_core::Interface>::IID
7194 || iid == &<ICoreWebView2CompositionController3 as windows_core::Interface>::IID
7195 }
7196}
7197impl windows_core::RuntimeName for ICoreWebView2CompositionController4 {}
7198windows_core::imp::define_interface!(
7199 ICoreWebView2ContainsFullScreenElementChangedEventHandler,
7200 ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl,
7201 0xe45d98b1_afef_45be_8baf_6c7728867f73
7202);
7203windows_core::imp::interface_hierarchy!(
7204 ICoreWebView2ContainsFullScreenElementChangedEventHandler,
7205 windows_core::IUnknown
7206);
7207impl ICoreWebView2ContainsFullScreenElementChangedEventHandler {
7208 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
7209 where
7210 P0: windows_core::Param<ICoreWebView2>,
7211 P1: windows_core::Param<windows_core::IUnknown>,
7212 {
7213 unsafe {
7214 (windows_core::Interface::vtable(self).Invoke)(
7215 windows_core::Interface::as_raw(self),
7216 sender.param().abi(),
7217 args.param().abi(),
7218 )
7219 .ok()
7220 }
7221 }
7222}
7223#[repr(C)]
7224pub struct ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
7225 pub base__: windows_core::IUnknown_Vtbl,
7226 pub Invoke: unsafe extern "system" fn(
7227 *mut core::ffi::c_void,
7228 *mut core::ffi::c_void,
7229 *mut core::ffi::c_void,
7230 ) -> windows_core::HRESULT,
7231}
7232pub trait ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl:
7233 windows_core::IUnknownImpl
7234{
7235 fn Invoke(
7236 &self,
7237 sender: windows_core::Ref<'_, ICoreWebView2>,
7238 args: windows_core::Ref<'_, windows_core::IUnknown>,
7239 ) -> windows_core::Result<()>;
7240}
7241impl ICoreWebView2ContainsFullScreenElementChangedEventHandler_Vtbl {
7242 pub const fn new<
7243 Identity: ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl,
7244 const OFFSET: isize,
7245 >() -> Self {
7246 unsafe extern "system" fn Invoke<
7247 Identity: ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl,
7248 const OFFSET: isize,
7249 >(
7250 this: *mut core::ffi::c_void,
7251 sender: *mut core::ffi::c_void,
7252 args: *mut core::ffi::c_void,
7253 ) -> windows_core::HRESULT {
7254 unsafe {
7255 let this: &Identity =
7256 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7257 ICoreWebView2ContainsFullScreenElementChangedEventHandler_Impl::Invoke(
7258 this,
7259 core::mem::transmute_copy(&sender),
7260 core::mem::transmute_copy(&args),
7261 )
7262 .into()
7263 }
7264 }
7265 Self {
7266 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
7267 Invoke: Invoke::<Identity, OFFSET>,
7268 }
7269 }
7270 pub fn matches(iid: &windows_core::GUID) -> bool {
7271 iid == & < ICoreWebView2ContainsFullScreenElementChangedEventHandler as windows_core::Interface >::IID
7272 }
7273}
7274impl windows_core::RuntimeName for ICoreWebView2ContainsFullScreenElementChangedEventHandler {}
7275windows_core::imp::define_interface!(
7276 ICoreWebView2ContentLoadingEventArgs,
7277 ICoreWebView2ContentLoadingEventArgs_Vtbl,
7278 0x0c8a1275_9b6b_4901_87ad_70df25bafa6e
7279);
7280windows_core::imp::interface_hierarchy!(
7281 ICoreWebView2ContentLoadingEventArgs,
7282 windows_core::IUnknown
7283);
7284impl ICoreWebView2ContentLoadingEventArgs {
7285 pub unsafe fn IsErrorPage(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
7286 unsafe {
7287 (windows_core::Interface::vtable(self).IsErrorPage)(
7288 windows_core::Interface::as_raw(self),
7289 value as _,
7290 )
7291 .ok()
7292 }
7293 }
7294 pub unsafe fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()> {
7295 unsafe {
7296 (windows_core::Interface::vtable(self).NavigationId)(
7297 windows_core::Interface::as_raw(self),
7298 value as _,
7299 )
7300 .ok()
7301 }
7302 }
7303}
7304#[repr(C)]
7305pub struct ICoreWebView2ContentLoadingEventArgs_Vtbl {
7306 pub base__: windows_core::IUnknown_Vtbl,
7307 pub IsErrorPage: unsafe extern "system" fn(
7308 *mut core::ffi::c_void,
7309 *mut windows_core::BOOL,
7310 ) -> windows_core::HRESULT,
7311 pub NavigationId:
7312 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
7313}
7314pub trait ICoreWebView2ContentLoadingEventArgs_Impl: windows_core::IUnknownImpl {
7315 fn IsErrorPage(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
7316 fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()>;
7317}
7318impl ICoreWebView2ContentLoadingEventArgs_Vtbl {
7319 pub const fn new<Identity: ICoreWebView2ContentLoadingEventArgs_Impl, const OFFSET: isize>(
7320 ) -> Self {
7321 unsafe extern "system" fn IsErrorPage<
7322 Identity: ICoreWebView2ContentLoadingEventArgs_Impl,
7323 const OFFSET: isize,
7324 >(
7325 this: *mut core::ffi::c_void,
7326 value: *mut windows_core::BOOL,
7327 ) -> windows_core::HRESULT {
7328 unsafe {
7329 let this: &Identity =
7330 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7331 ICoreWebView2ContentLoadingEventArgs_Impl::IsErrorPage(
7332 this,
7333 core::mem::transmute_copy(&value),
7334 )
7335 .into()
7336 }
7337 }
7338 unsafe extern "system" fn NavigationId<
7339 Identity: ICoreWebView2ContentLoadingEventArgs_Impl,
7340 const OFFSET: isize,
7341 >(
7342 this: *mut core::ffi::c_void,
7343 value: *mut u64,
7344 ) -> windows_core::HRESULT {
7345 unsafe {
7346 let this: &Identity =
7347 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7348 ICoreWebView2ContentLoadingEventArgs_Impl::NavigationId(
7349 this,
7350 core::mem::transmute_copy(&value),
7351 )
7352 .into()
7353 }
7354 }
7355 Self {
7356 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
7357 IsErrorPage: IsErrorPage::<Identity, OFFSET>,
7358 NavigationId: NavigationId::<Identity, OFFSET>,
7359 }
7360 }
7361 pub fn matches(iid: &windows_core::GUID) -> bool {
7362 iid == &<ICoreWebView2ContentLoadingEventArgs as windows_core::Interface>::IID
7363 }
7364}
7365impl windows_core::RuntimeName for ICoreWebView2ContentLoadingEventArgs {}
7366windows_core::imp::define_interface!(
7367 ICoreWebView2ContentLoadingEventHandler,
7368 ICoreWebView2ContentLoadingEventHandler_Vtbl,
7369 0x364471e7_f2be_4910_bdba_d72077d51c4b
7370);
7371windows_core::imp::interface_hierarchy!(
7372 ICoreWebView2ContentLoadingEventHandler,
7373 windows_core::IUnknown
7374);
7375impl ICoreWebView2ContentLoadingEventHandler {
7376 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
7377 where
7378 P0: windows_core::Param<ICoreWebView2>,
7379 P1: windows_core::Param<ICoreWebView2ContentLoadingEventArgs>,
7380 {
7381 unsafe {
7382 (windows_core::Interface::vtable(self).Invoke)(
7383 windows_core::Interface::as_raw(self),
7384 sender.param().abi(),
7385 args.param().abi(),
7386 )
7387 .ok()
7388 }
7389 }
7390}
7391#[repr(C)]
7392pub struct ICoreWebView2ContentLoadingEventHandler_Vtbl {
7393 pub base__: windows_core::IUnknown_Vtbl,
7394 pub Invoke: unsafe extern "system" fn(
7395 *mut core::ffi::c_void,
7396 *mut core::ffi::c_void,
7397 *mut core::ffi::c_void,
7398 ) -> windows_core::HRESULT,
7399}
7400pub trait ICoreWebView2ContentLoadingEventHandler_Impl: windows_core::IUnknownImpl {
7401 fn Invoke(
7402 &self,
7403 sender: windows_core::Ref<'_, ICoreWebView2>,
7404 args: windows_core::Ref<'_, ICoreWebView2ContentLoadingEventArgs>,
7405 ) -> windows_core::Result<()>;
7406}
7407impl ICoreWebView2ContentLoadingEventHandler_Vtbl {
7408 pub const fn new<
7409 Identity: ICoreWebView2ContentLoadingEventHandler_Impl,
7410 const OFFSET: isize,
7411 >() -> Self {
7412 unsafe extern "system" fn Invoke<
7413 Identity: ICoreWebView2ContentLoadingEventHandler_Impl,
7414 const OFFSET: isize,
7415 >(
7416 this: *mut core::ffi::c_void,
7417 sender: *mut core::ffi::c_void,
7418 args: *mut core::ffi::c_void,
7419 ) -> windows_core::HRESULT {
7420 unsafe {
7421 let this: &Identity =
7422 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7423 ICoreWebView2ContentLoadingEventHandler_Impl::Invoke(
7424 this,
7425 core::mem::transmute_copy(&sender),
7426 core::mem::transmute_copy(&args),
7427 )
7428 .into()
7429 }
7430 }
7431 Self {
7432 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
7433 Invoke: Invoke::<Identity, OFFSET>,
7434 }
7435 }
7436 pub fn matches(iid: &windows_core::GUID) -> bool {
7437 iid == &<ICoreWebView2ContentLoadingEventHandler as windows_core::Interface>::IID
7438 }
7439}
7440impl windows_core::RuntimeName for ICoreWebView2ContentLoadingEventHandler {}
7441windows_core::imp::define_interface!(
7442 ICoreWebView2ContextMenuItem,
7443 ICoreWebView2ContextMenuItem_Vtbl,
7444 0x7aed49e3_a93f_497a_811c_749c6b6b6c65
7445);
7446windows_core::imp::interface_hierarchy!(ICoreWebView2ContextMenuItem, windows_core::IUnknown);
7447impl ICoreWebView2ContextMenuItem {
7448 pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
7449 unsafe {
7450 (windows_core::Interface::vtable(self).Name)(
7451 windows_core::Interface::as_raw(self),
7452 value as _,
7453 )
7454 .ok()
7455 }
7456 }
7457 pub unsafe fn Label(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
7458 unsafe {
7459 (windows_core::Interface::vtable(self).Label)(
7460 windows_core::Interface::as_raw(self),
7461 value as _,
7462 )
7463 .ok()
7464 }
7465 }
7466 pub unsafe fn CommandId(&self, value: *mut i32) -> windows_core::Result<()> {
7467 unsafe {
7468 (windows_core::Interface::vtable(self).CommandId)(
7469 windows_core::Interface::as_raw(self),
7470 value as _,
7471 )
7472 .ok()
7473 }
7474 }
7475 pub unsafe fn ShortcutKeyDescription(
7476 &self,
7477 value: *mut windows_core::PWSTR,
7478 ) -> windows_core::Result<()> {
7479 unsafe {
7480 (windows_core::Interface::vtable(self).ShortcutKeyDescription)(
7481 windows_core::Interface::as_raw(self),
7482 value as _,
7483 )
7484 .ok()
7485 }
7486 }
7487 pub unsafe fn Icon(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
7488 unsafe {
7489 let mut result__ = core::mem::zeroed();
7490 (windows_core::Interface::vtable(self).Icon)(
7491 windows_core::Interface::as_raw(self),
7492 &mut result__,
7493 )
7494 .and_then(|| windows_core::Type::from_abi(result__))
7495 }
7496 }
7497 pub unsafe fn Kind(
7498 &self,
7499 value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
7500 ) -> windows_core::Result<()> {
7501 unsafe {
7502 (windows_core::Interface::vtable(self).Kind)(
7503 windows_core::Interface::as_raw(self),
7504 value as _,
7505 )
7506 .ok()
7507 }
7508 }
7509 pub unsafe fn SetIsEnabled(&self, value: bool) -> windows_core::Result<()> {
7510 unsafe {
7511 (windows_core::Interface::vtable(self).SetIsEnabled)(
7512 windows_core::Interface::as_raw(self),
7513 value.into(),
7514 )
7515 .ok()
7516 }
7517 }
7518 pub unsafe fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
7519 unsafe {
7520 (windows_core::Interface::vtable(self).IsEnabled)(
7521 windows_core::Interface::as_raw(self),
7522 value as _,
7523 )
7524 .ok()
7525 }
7526 }
7527 pub unsafe fn SetIsChecked(&self, value: bool) -> windows_core::Result<()> {
7528 unsafe {
7529 (windows_core::Interface::vtable(self).SetIsChecked)(
7530 windows_core::Interface::as_raw(self),
7531 value.into(),
7532 )
7533 .ok()
7534 }
7535 }
7536 pub unsafe fn IsChecked(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
7537 unsafe {
7538 (windows_core::Interface::vtable(self).IsChecked)(
7539 windows_core::Interface::as_raw(self),
7540 value as _,
7541 )
7542 .ok()
7543 }
7544 }
7545 pub unsafe fn Children(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection> {
7546 unsafe {
7547 let mut result__ = core::mem::zeroed();
7548 (windows_core::Interface::vtable(self).Children)(
7549 windows_core::Interface::as_raw(self),
7550 &mut result__,
7551 )
7552 .and_then(|| windows_core::Type::from_abi(result__))
7553 }
7554 }
7555 pub unsafe fn add_CustomItemSelected<P0>(
7556 &self,
7557 eventhandler: P0,
7558 token: *mut i64,
7559 ) -> windows_core::Result<()>
7560 where
7561 P0: windows_core::Param<ICoreWebView2CustomItemSelectedEventHandler>,
7562 {
7563 unsafe {
7564 (windows_core::Interface::vtable(self).add_CustomItemSelected)(
7565 windows_core::Interface::as_raw(self),
7566 eventhandler.param().abi(),
7567 token as _,
7568 )
7569 .ok()
7570 }
7571 }
7572 pub unsafe fn remove_CustomItemSelected(&self, token: i64) -> windows_core::Result<()> {
7573 unsafe {
7574 (windows_core::Interface::vtable(self).remove_CustomItemSelected)(
7575 windows_core::Interface::as_raw(self),
7576 token,
7577 )
7578 .ok()
7579 }
7580 }
7581}
7582#[repr(C)]
7583pub struct ICoreWebView2ContextMenuItem_Vtbl {
7584 pub base__: windows_core::IUnknown_Vtbl,
7585 pub Name: unsafe extern "system" fn(
7586 *mut core::ffi::c_void,
7587 *mut windows_core::PWSTR,
7588 ) -> windows_core::HRESULT,
7589 pub Label: unsafe extern "system" fn(
7590 *mut core::ffi::c_void,
7591 *mut windows_core::PWSTR,
7592 ) -> windows_core::HRESULT,
7593 pub CommandId:
7594 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
7595 pub ShortcutKeyDescription: unsafe extern "system" fn(
7596 *mut core::ffi::c_void,
7597 *mut windows_core::PWSTR,
7598 ) -> windows_core::HRESULT,
7599 pub Icon: unsafe extern "system" fn(
7600 *mut core::ffi::c_void,
7601 *mut *mut core::ffi::c_void,
7602 ) -> windows_core::HRESULT,
7603 pub Kind: unsafe extern "system" fn(
7604 *mut core::ffi::c_void,
7605 *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
7606 ) -> windows_core::HRESULT,
7607 pub SetIsEnabled: unsafe extern "system" fn(
7608 *mut core::ffi::c_void,
7609 windows_core::BOOL,
7610 ) -> windows_core::HRESULT,
7611 pub IsEnabled: unsafe extern "system" fn(
7612 *mut core::ffi::c_void,
7613 *mut windows_core::BOOL,
7614 ) -> windows_core::HRESULT,
7615 pub SetIsChecked: unsafe extern "system" fn(
7616 *mut core::ffi::c_void,
7617 windows_core::BOOL,
7618 ) -> windows_core::HRESULT,
7619 pub IsChecked: unsafe extern "system" fn(
7620 *mut core::ffi::c_void,
7621 *mut windows_core::BOOL,
7622 ) -> windows_core::HRESULT,
7623 pub Children: unsafe extern "system" fn(
7624 *mut core::ffi::c_void,
7625 *mut *mut core::ffi::c_void,
7626 ) -> windows_core::HRESULT,
7627 pub add_CustomItemSelected: unsafe extern "system" fn(
7628 *mut core::ffi::c_void,
7629 *mut core::ffi::c_void,
7630 *mut i64,
7631 ) -> windows_core::HRESULT,
7632 pub remove_CustomItemSelected:
7633 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
7634}
7635pub trait ICoreWebView2ContextMenuItem_Impl: windows_core::IUnknownImpl {
7636 fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
7637 fn Label(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
7638 fn CommandId(&self, value: *mut i32) -> windows_core::Result<()>;
7639 fn ShortcutKeyDescription(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
7640 fn Icon(&self) -> windows_core::Result<windows::Win32::System::Com::IStream>;
7641 fn Kind(&self, value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND) -> windows_core::Result<()>;
7642 fn SetIsEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
7643 fn IsEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
7644 fn SetIsChecked(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
7645 fn IsChecked(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
7646 fn Children(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection>;
7647 fn add_CustomItemSelected(
7648 &self,
7649 eventhandler: windows_core::Ref<'_, ICoreWebView2CustomItemSelectedEventHandler>,
7650 token: *mut i64,
7651 ) -> windows_core::Result<()>;
7652 fn remove_CustomItemSelected(&self, token: i64) -> windows_core::Result<()>;
7653}
7654impl ICoreWebView2ContextMenuItem_Vtbl {
7655 pub const fn new<Identity: ICoreWebView2ContextMenuItem_Impl, const OFFSET: isize>() -> Self {
7656 unsafe extern "system" fn Name<
7657 Identity: ICoreWebView2ContextMenuItem_Impl,
7658 const OFFSET: isize,
7659 >(
7660 this: *mut core::ffi::c_void,
7661 value: *mut windows_core::PWSTR,
7662 ) -> windows_core::HRESULT {
7663 unsafe {
7664 let this: &Identity =
7665 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7666 ICoreWebView2ContextMenuItem_Impl::Name(this, core::mem::transmute_copy(&value))
7667 .into()
7668 }
7669 }
7670 unsafe extern "system" fn Label<
7671 Identity: ICoreWebView2ContextMenuItem_Impl,
7672 const OFFSET: isize,
7673 >(
7674 this: *mut core::ffi::c_void,
7675 value: *mut windows_core::PWSTR,
7676 ) -> windows_core::HRESULT {
7677 unsafe {
7678 let this: &Identity =
7679 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7680 ICoreWebView2ContextMenuItem_Impl::Label(this, core::mem::transmute_copy(&value))
7681 .into()
7682 }
7683 }
7684 unsafe extern "system" fn CommandId<
7685 Identity: ICoreWebView2ContextMenuItem_Impl,
7686 const OFFSET: isize,
7687 >(
7688 this: *mut core::ffi::c_void,
7689 value: *mut i32,
7690 ) -> windows_core::HRESULT {
7691 unsafe {
7692 let this: &Identity =
7693 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7694 ICoreWebView2ContextMenuItem_Impl::CommandId(
7695 this,
7696 core::mem::transmute_copy(&value),
7697 )
7698 .into()
7699 }
7700 }
7701 unsafe extern "system" fn ShortcutKeyDescription<
7702 Identity: ICoreWebView2ContextMenuItem_Impl,
7703 const OFFSET: isize,
7704 >(
7705 this: *mut core::ffi::c_void,
7706 value: *mut windows_core::PWSTR,
7707 ) -> windows_core::HRESULT {
7708 unsafe {
7709 let this: &Identity =
7710 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7711 ICoreWebView2ContextMenuItem_Impl::ShortcutKeyDescription(
7712 this,
7713 core::mem::transmute_copy(&value),
7714 )
7715 .into()
7716 }
7717 }
7718 unsafe extern "system" fn Icon<
7719 Identity: ICoreWebView2ContextMenuItem_Impl,
7720 const OFFSET: isize,
7721 >(
7722 this: *mut core::ffi::c_void,
7723 value: *mut *mut core::ffi::c_void,
7724 ) -> windows_core::HRESULT {
7725 unsafe {
7726 let this: &Identity =
7727 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7728 match ICoreWebView2ContextMenuItem_Impl::Icon(this) {
7729 Ok(ok__) => {
7730 value.write(core::mem::transmute(ok__));
7731 windows_core::HRESULT(0)
7732 }
7733 Err(err) => err.into(),
7734 }
7735 }
7736 }
7737 unsafe extern "system" fn Kind<
7738 Identity: ICoreWebView2ContextMenuItem_Impl,
7739 const OFFSET: isize,
7740 >(
7741 this: *mut core::ffi::c_void,
7742 value: *mut COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
7743 ) -> windows_core::HRESULT {
7744 unsafe {
7745 let this: &Identity =
7746 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7747 ICoreWebView2ContextMenuItem_Impl::Kind(this, core::mem::transmute_copy(&value))
7748 .into()
7749 }
7750 }
7751 unsafe extern "system" fn SetIsEnabled<
7752 Identity: ICoreWebView2ContextMenuItem_Impl,
7753 const OFFSET: isize,
7754 >(
7755 this: *mut core::ffi::c_void,
7756 value: windows_core::BOOL,
7757 ) -> windows_core::HRESULT {
7758 unsafe {
7759 let this: &Identity =
7760 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7761 ICoreWebView2ContextMenuItem_Impl::SetIsEnabled(
7762 this,
7763 core::mem::transmute_copy(&value),
7764 )
7765 .into()
7766 }
7767 }
7768 unsafe extern "system" fn IsEnabled<
7769 Identity: ICoreWebView2ContextMenuItem_Impl,
7770 const OFFSET: isize,
7771 >(
7772 this: *mut core::ffi::c_void,
7773 value: *mut windows_core::BOOL,
7774 ) -> windows_core::HRESULT {
7775 unsafe {
7776 let this: &Identity =
7777 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7778 ICoreWebView2ContextMenuItem_Impl::IsEnabled(
7779 this,
7780 core::mem::transmute_copy(&value),
7781 )
7782 .into()
7783 }
7784 }
7785 unsafe extern "system" fn SetIsChecked<
7786 Identity: ICoreWebView2ContextMenuItem_Impl,
7787 const OFFSET: isize,
7788 >(
7789 this: *mut core::ffi::c_void,
7790 value: windows_core::BOOL,
7791 ) -> windows_core::HRESULT {
7792 unsafe {
7793 let this: &Identity =
7794 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7795 ICoreWebView2ContextMenuItem_Impl::SetIsChecked(
7796 this,
7797 core::mem::transmute_copy(&value),
7798 )
7799 .into()
7800 }
7801 }
7802 unsafe extern "system" fn IsChecked<
7803 Identity: ICoreWebView2ContextMenuItem_Impl,
7804 const OFFSET: isize,
7805 >(
7806 this: *mut core::ffi::c_void,
7807 value: *mut windows_core::BOOL,
7808 ) -> windows_core::HRESULT {
7809 unsafe {
7810 let this: &Identity =
7811 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7812 ICoreWebView2ContextMenuItem_Impl::IsChecked(
7813 this,
7814 core::mem::transmute_copy(&value),
7815 )
7816 .into()
7817 }
7818 }
7819 unsafe extern "system" fn Children<
7820 Identity: ICoreWebView2ContextMenuItem_Impl,
7821 const OFFSET: isize,
7822 >(
7823 this: *mut core::ffi::c_void,
7824 value: *mut *mut core::ffi::c_void,
7825 ) -> windows_core::HRESULT {
7826 unsafe {
7827 let this: &Identity =
7828 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7829 match ICoreWebView2ContextMenuItem_Impl::Children(this) {
7830 Ok(ok__) => {
7831 value.write(core::mem::transmute(ok__));
7832 windows_core::HRESULT(0)
7833 }
7834 Err(err) => err.into(),
7835 }
7836 }
7837 }
7838 unsafe extern "system" fn add_CustomItemSelected<
7839 Identity: ICoreWebView2ContextMenuItem_Impl,
7840 const OFFSET: isize,
7841 >(
7842 this: *mut core::ffi::c_void,
7843 eventhandler: *mut core::ffi::c_void,
7844 token: *mut i64,
7845 ) -> windows_core::HRESULT {
7846 unsafe {
7847 let this: &Identity =
7848 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7849 ICoreWebView2ContextMenuItem_Impl::add_CustomItemSelected(
7850 this,
7851 core::mem::transmute_copy(&eventhandler),
7852 core::mem::transmute_copy(&token),
7853 )
7854 .into()
7855 }
7856 }
7857 unsafe extern "system" fn remove_CustomItemSelected<
7858 Identity: ICoreWebView2ContextMenuItem_Impl,
7859 const OFFSET: isize,
7860 >(
7861 this: *mut core::ffi::c_void,
7862 token: i64,
7863 ) -> windows_core::HRESULT {
7864 unsafe {
7865 let this: &Identity =
7866 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7867 ICoreWebView2ContextMenuItem_Impl::remove_CustomItemSelected(
7868 this,
7869 core::mem::transmute_copy(&token),
7870 )
7871 .into()
7872 }
7873 }
7874 Self {
7875 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
7876 Name: Name::<Identity, OFFSET>,
7877 Label: Label::<Identity, OFFSET>,
7878 CommandId: CommandId::<Identity, OFFSET>,
7879 ShortcutKeyDescription: ShortcutKeyDescription::<Identity, OFFSET>,
7880 Icon: Icon::<Identity, OFFSET>,
7881 Kind: Kind::<Identity, OFFSET>,
7882 SetIsEnabled: SetIsEnabled::<Identity, OFFSET>,
7883 IsEnabled: IsEnabled::<Identity, OFFSET>,
7884 SetIsChecked: SetIsChecked::<Identity, OFFSET>,
7885 IsChecked: IsChecked::<Identity, OFFSET>,
7886 Children: Children::<Identity, OFFSET>,
7887 add_CustomItemSelected: add_CustomItemSelected::<Identity, OFFSET>,
7888 remove_CustomItemSelected: remove_CustomItemSelected::<Identity, OFFSET>,
7889 }
7890 }
7891 pub fn matches(iid: &windows_core::GUID) -> bool {
7892 iid == &<ICoreWebView2ContextMenuItem as windows_core::Interface>::IID
7893 }
7894}
7895impl windows_core::RuntimeName for ICoreWebView2ContextMenuItem {}
7896windows_core::imp::define_interface!(
7897 ICoreWebView2ContextMenuItemCollection,
7898 ICoreWebView2ContextMenuItemCollection_Vtbl,
7899 0xf562a2f5_c415_45cf_b909_d4b7c1e276d3
7900);
7901windows_core::imp::interface_hierarchy!(
7902 ICoreWebView2ContextMenuItemCollection,
7903 windows_core::IUnknown
7904);
7905impl ICoreWebView2ContextMenuItemCollection {
7906 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
7907 unsafe {
7908 (windows_core::Interface::vtable(self).Count)(
7909 windows_core::Interface::as_raw(self),
7910 value as _,
7911 )
7912 .ok()
7913 }
7914 }
7915 pub unsafe fn GetValueAtIndex(
7916 &self,
7917 index: u32,
7918 ) -> windows_core::Result<ICoreWebView2ContextMenuItem> {
7919 unsafe {
7920 let mut result__ = core::mem::zeroed();
7921 (windows_core::Interface::vtable(self).GetValueAtIndex)(
7922 windows_core::Interface::as_raw(self),
7923 index,
7924 &mut result__,
7925 )
7926 .and_then(|| windows_core::Type::from_abi(result__))
7927 }
7928 }
7929 pub unsafe fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()> {
7930 unsafe {
7931 (windows_core::Interface::vtable(self).RemoveValueAtIndex)(
7932 windows_core::Interface::as_raw(self),
7933 index,
7934 )
7935 .ok()
7936 }
7937 }
7938 pub unsafe fn InsertValueAtIndex<P1>(&self, index: u32, value: P1) -> windows_core::Result<()>
7939 where
7940 P1: windows_core::Param<ICoreWebView2ContextMenuItem>,
7941 {
7942 unsafe {
7943 (windows_core::Interface::vtable(self).InsertValueAtIndex)(
7944 windows_core::Interface::as_raw(self),
7945 index,
7946 value.param().abi(),
7947 )
7948 .ok()
7949 }
7950 }
7951}
7952#[repr(C)]
7953pub struct ICoreWebView2ContextMenuItemCollection_Vtbl {
7954 pub base__: windows_core::IUnknown_Vtbl,
7955 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
7956 pub GetValueAtIndex: unsafe extern "system" fn(
7957 *mut core::ffi::c_void,
7958 u32,
7959 *mut *mut core::ffi::c_void,
7960 ) -> windows_core::HRESULT,
7961 pub RemoveValueAtIndex:
7962 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
7963 pub InsertValueAtIndex: unsafe extern "system" fn(
7964 *mut core::ffi::c_void,
7965 u32,
7966 *mut core::ffi::c_void,
7967 ) -> windows_core::HRESULT,
7968}
7969pub trait ICoreWebView2ContextMenuItemCollection_Impl: windows_core::IUnknownImpl {
7970 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
7971 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2ContextMenuItem>;
7972 fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()>;
7973 fn InsertValueAtIndex(
7974 &self,
7975 index: u32,
7976 value: windows_core::Ref<'_, ICoreWebView2ContextMenuItem>,
7977 ) -> windows_core::Result<()>;
7978}
7979impl ICoreWebView2ContextMenuItemCollection_Vtbl {
7980 pub const fn new<Identity: ICoreWebView2ContextMenuItemCollection_Impl, const OFFSET: isize>(
7981 ) -> Self {
7982 unsafe extern "system" fn Count<
7983 Identity: ICoreWebView2ContextMenuItemCollection_Impl,
7984 const OFFSET: isize,
7985 >(
7986 this: *mut core::ffi::c_void,
7987 value: *mut u32,
7988 ) -> windows_core::HRESULT {
7989 unsafe {
7990 let this: &Identity =
7991 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
7992 ICoreWebView2ContextMenuItemCollection_Impl::Count(
7993 this,
7994 core::mem::transmute_copy(&value),
7995 )
7996 .into()
7997 }
7998 }
7999 unsafe extern "system" fn GetValueAtIndex<
8000 Identity: ICoreWebView2ContextMenuItemCollection_Impl,
8001 const OFFSET: isize,
8002 >(
8003 this: *mut core::ffi::c_void,
8004 index: u32,
8005 value: *mut *mut core::ffi::c_void,
8006 ) -> windows_core::HRESULT {
8007 unsafe {
8008 let this: &Identity =
8009 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8010 match ICoreWebView2ContextMenuItemCollection_Impl::GetValueAtIndex(
8011 this,
8012 core::mem::transmute_copy(&index),
8013 ) {
8014 Ok(ok__) => {
8015 value.write(core::mem::transmute(ok__));
8016 windows_core::HRESULT(0)
8017 }
8018 Err(err) => err.into(),
8019 }
8020 }
8021 }
8022 unsafe extern "system" fn RemoveValueAtIndex<
8023 Identity: ICoreWebView2ContextMenuItemCollection_Impl,
8024 const OFFSET: isize,
8025 >(
8026 this: *mut core::ffi::c_void,
8027 index: u32,
8028 ) -> windows_core::HRESULT {
8029 unsafe {
8030 let this: &Identity =
8031 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8032 ICoreWebView2ContextMenuItemCollection_Impl::RemoveValueAtIndex(
8033 this,
8034 core::mem::transmute_copy(&index),
8035 )
8036 .into()
8037 }
8038 }
8039 unsafe extern "system" fn InsertValueAtIndex<
8040 Identity: ICoreWebView2ContextMenuItemCollection_Impl,
8041 const OFFSET: isize,
8042 >(
8043 this: *mut core::ffi::c_void,
8044 index: u32,
8045 value: *mut core::ffi::c_void,
8046 ) -> windows_core::HRESULT {
8047 unsafe {
8048 let this: &Identity =
8049 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8050 ICoreWebView2ContextMenuItemCollection_Impl::InsertValueAtIndex(
8051 this,
8052 core::mem::transmute_copy(&index),
8053 core::mem::transmute_copy(&value),
8054 )
8055 .into()
8056 }
8057 }
8058 Self {
8059 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
8060 Count: Count::<Identity, OFFSET>,
8061 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
8062 RemoveValueAtIndex: RemoveValueAtIndex::<Identity, OFFSET>,
8063 InsertValueAtIndex: InsertValueAtIndex::<Identity, OFFSET>,
8064 }
8065 }
8066 pub fn matches(iid: &windows_core::GUID) -> bool {
8067 iid == &<ICoreWebView2ContextMenuItemCollection as windows_core::Interface>::IID
8068 }
8069}
8070impl windows_core::RuntimeName for ICoreWebView2ContextMenuItemCollection {}
8071windows_core::imp::define_interface!(
8072 ICoreWebView2ContextMenuRequestedEventArgs,
8073 ICoreWebView2ContextMenuRequestedEventArgs_Vtbl,
8074 0xa1d309ee_c03f_11eb_8529_0242ac130003
8075);
8076windows_core::imp::interface_hierarchy!(
8077 ICoreWebView2ContextMenuRequestedEventArgs,
8078 windows_core::IUnknown
8079);
8080impl ICoreWebView2ContextMenuRequestedEventArgs {
8081 pub unsafe fn MenuItems(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection> {
8082 unsafe {
8083 let mut result__ = core::mem::zeroed();
8084 (windows_core::Interface::vtable(self).MenuItems)(
8085 windows_core::Interface::as_raw(self),
8086 &mut result__,
8087 )
8088 .and_then(|| windows_core::Type::from_abi(result__))
8089 }
8090 }
8091 pub unsafe fn ContextMenuTarget(&self) -> windows_core::Result<ICoreWebView2ContextMenuTarget> {
8092 unsafe {
8093 let mut result__ = core::mem::zeroed();
8094 (windows_core::Interface::vtable(self).ContextMenuTarget)(
8095 windows_core::Interface::as_raw(self),
8096 &mut result__,
8097 )
8098 .and_then(|| windows_core::Type::from_abi(result__))
8099 }
8100 }
8101 pub unsafe fn Location(
8102 &self,
8103 value: *mut windows::Win32::Foundation::POINT,
8104 ) -> windows_core::Result<()> {
8105 unsafe {
8106 (windows_core::Interface::vtable(self).Location)(
8107 windows_core::Interface::as_raw(self),
8108 value as _,
8109 )
8110 .ok()
8111 }
8112 }
8113 pub unsafe fn SetSelectedCommandId(&self, value: i32) -> windows_core::Result<()> {
8114 unsafe {
8115 (windows_core::Interface::vtable(self).SetSelectedCommandId)(
8116 windows_core::Interface::as_raw(self),
8117 value,
8118 )
8119 .ok()
8120 }
8121 }
8122 pub unsafe fn SelectedCommandId(&self, value: *mut i32) -> windows_core::Result<()> {
8123 unsafe {
8124 (windows_core::Interface::vtable(self).SelectedCommandId)(
8125 windows_core::Interface::as_raw(self),
8126 value as _,
8127 )
8128 .ok()
8129 }
8130 }
8131 pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
8132 unsafe {
8133 (windows_core::Interface::vtable(self).SetHandled)(
8134 windows_core::Interface::as_raw(self),
8135 value.into(),
8136 )
8137 .ok()
8138 }
8139 }
8140 pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
8141 unsafe {
8142 (windows_core::Interface::vtable(self).Handled)(
8143 windows_core::Interface::as_raw(self),
8144 value as _,
8145 )
8146 .ok()
8147 }
8148 }
8149 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
8150 unsafe {
8151 let mut result__ = core::mem::zeroed();
8152 (windows_core::Interface::vtable(self).GetDeferral)(
8153 windows_core::Interface::as_raw(self),
8154 &mut result__,
8155 )
8156 .and_then(|| windows_core::Type::from_abi(result__))
8157 }
8158 }
8159}
8160#[repr(C)]
8161pub struct ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
8162 pub base__: windows_core::IUnknown_Vtbl,
8163 pub MenuItems: unsafe extern "system" fn(
8164 *mut core::ffi::c_void,
8165 *mut *mut core::ffi::c_void,
8166 ) -> windows_core::HRESULT,
8167 pub ContextMenuTarget: unsafe extern "system" fn(
8168 *mut core::ffi::c_void,
8169 *mut *mut core::ffi::c_void,
8170 ) -> windows_core::HRESULT,
8171 pub Location: unsafe extern "system" fn(
8172 *mut core::ffi::c_void,
8173 *mut windows::Win32::Foundation::POINT,
8174 ) -> windows_core::HRESULT,
8175 pub SetSelectedCommandId:
8176 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
8177 pub SelectedCommandId:
8178 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
8179 pub SetHandled: unsafe extern "system" fn(
8180 *mut core::ffi::c_void,
8181 windows_core::BOOL,
8182 ) -> windows_core::HRESULT,
8183 pub Handled: unsafe extern "system" fn(
8184 *mut core::ffi::c_void,
8185 *mut windows_core::BOOL,
8186 ) -> windows_core::HRESULT,
8187 pub GetDeferral: unsafe extern "system" fn(
8188 *mut core::ffi::c_void,
8189 *mut *mut core::ffi::c_void,
8190 ) -> windows_core::HRESULT,
8191}
8192pub trait ICoreWebView2ContextMenuRequestedEventArgs_Impl: windows_core::IUnknownImpl {
8193 fn MenuItems(&self) -> windows_core::Result<ICoreWebView2ContextMenuItemCollection>;
8194 fn ContextMenuTarget(&self) -> windows_core::Result<ICoreWebView2ContextMenuTarget>;
8195 fn Location(&self, value: *mut windows::Win32::Foundation::POINT) -> windows_core::Result<()>;
8196 fn SetSelectedCommandId(&self, value: i32) -> windows_core::Result<()>;
8197 fn SelectedCommandId(&self, value: *mut i32) -> windows_core::Result<()>;
8198 fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
8199 fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8200 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
8201}
8202impl ICoreWebView2ContextMenuRequestedEventArgs_Vtbl {
8203 pub const fn new<
8204 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8205 const OFFSET: isize,
8206 >() -> Self {
8207 unsafe extern "system" fn MenuItems<
8208 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8209 const OFFSET: isize,
8210 >(
8211 this: *mut core::ffi::c_void,
8212 value: *mut *mut core::ffi::c_void,
8213 ) -> windows_core::HRESULT {
8214 unsafe {
8215 let this: &Identity =
8216 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8217 match ICoreWebView2ContextMenuRequestedEventArgs_Impl::MenuItems(this) {
8218 Ok(ok__) => {
8219 value.write(core::mem::transmute(ok__));
8220 windows_core::HRESULT(0)
8221 }
8222 Err(err) => err.into(),
8223 }
8224 }
8225 }
8226 unsafe extern "system" fn ContextMenuTarget<
8227 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8228 const OFFSET: isize,
8229 >(
8230 this: *mut core::ffi::c_void,
8231 value: *mut *mut core::ffi::c_void,
8232 ) -> windows_core::HRESULT {
8233 unsafe {
8234 let this: &Identity =
8235 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8236 match ICoreWebView2ContextMenuRequestedEventArgs_Impl::ContextMenuTarget(this) {
8237 Ok(ok__) => {
8238 value.write(core::mem::transmute(ok__));
8239 windows_core::HRESULT(0)
8240 }
8241 Err(err) => err.into(),
8242 }
8243 }
8244 }
8245 unsafe extern "system" fn Location<
8246 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8247 const OFFSET: isize,
8248 >(
8249 this: *mut core::ffi::c_void,
8250 value: *mut windows::Win32::Foundation::POINT,
8251 ) -> windows_core::HRESULT {
8252 unsafe {
8253 let this: &Identity =
8254 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8255 ICoreWebView2ContextMenuRequestedEventArgs_Impl::Location(
8256 this,
8257 core::mem::transmute_copy(&value),
8258 )
8259 .into()
8260 }
8261 }
8262 unsafe extern "system" fn SetSelectedCommandId<
8263 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8264 const OFFSET: isize,
8265 >(
8266 this: *mut core::ffi::c_void,
8267 value: i32,
8268 ) -> windows_core::HRESULT {
8269 unsafe {
8270 let this: &Identity =
8271 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8272 ICoreWebView2ContextMenuRequestedEventArgs_Impl::SetSelectedCommandId(
8273 this,
8274 core::mem::transmute_copy(&value),
8275 )
8276 .into()
8277 }
8278 }
8279 unsafe extern "system" fn SelectedCommandId<
8280 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8281 const OFFSET: isize,
8282 >(
8283 this: *mut core::ffi::c_void,
8284 value: *mut i32,
8285 ) -> windows_core::HRESULT {
8286 unsafe {
8287 let this: &Identity =
8288 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8289 ICoreWebView2ContextMenuRequestedEventArgs_Impl::SelectedCommandId(
8290 this,
8291 core::mem::transmute_copy(&value),
8292 )
8293 .into()
8294 }
8295 }
8296 unsafe extern "system" fn SetHandled<
8297 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8298 const OFFSET: isize,
8299 >(
8300 this: *mut core::ffi::c_void,
8301 value: windows_core::BOOL,
8302 ) -> windows_core::HRESULT {
8303 unsafe {
8304 let this: &Identity =
8305 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8306 ICoreWebView2ContextMenuRequestedEventArgs_Impl::SetHandled(
8307 this,
8308 core::mem::transmute_copy(&value),
8309 )
8310 .into()
8311 }
8312 }
8313 unsafe extern "system" fn Handled<
8314 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8315 const OFFSET: isize,
8316 >(
8317 this: *mut core::ffi::c_void,
8318 value: *mut windows_core::BOOL,
8319 ) -> windows_core::HRESULT {
8320 unsafe {
8321 let this: &Identity =
8322 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8323 ICoreWebView2ContextMenuRequestedEventArgs_Impl::Handled(
8324 this,
8325 core::mem::transmute_copy(&value),
8326 )
8327 .into()
8328 }
8329 }
8330 unsafe extern "system" fn GetDeferral<
8331 Identity: ICoreWebView2ContextMenuRequestedEventArgs_Impl,
8332 const OFFSET: isize,
8333 >(
8334 this: *mut core::ffi::c_void,
8335 deferral: *mut *mut core::ffi::c_void,
8336 ) -> windows_core::HRESULT {
8337 unsafe {
8338 let this: &Identity =
8339 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8340 match ICoreWebView2ContextMenuRequestedEventArgs_Impl::GetDeferral(this) {
8341 Ok(ok__) => {
8342 deferral.write(core::mem::transmute(ok__));
8343 windows_core::HRESULT(0)
8344 }
8345 Err(err) => err.into(),
8346 }
8347 }
8348 }
8349 Self {
8350 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
8351 MenuItems: MenuItems::<Identity, OFFSET>,
8352 ContextMenuTarget: ContextMenuTarget::<Identity, OFFSET>,
8353 Location: Location::<Identity, OFFSET>,
8354 SetSelectedCommandId: SetSelectedCommandId::<Identity, OFFSET>,
8355 SelectedCommandId: SelectedCommandId::<Identity, OFFSET>,
8356 SetHandled: SetHandled::<Identity, OFFSET>,
8357 Handled: Handled::<Identity, OFFSET>,
8358 GetDeferral: GetDeferral::<Identity, OFFSET>,
8359 }
8360 }
8361 pub fn matches(iid: &windows_core::GUID) -> bool {
8362 iid == &<ICoreWebView2ContextMenuRequestedEventArgs as windows_core::Interface>::IID
8363 }
8364}
8365impl windows_core::RuntimeName for ICoreWebView2ContextMenuRequestedEventArgs {}
8366windows_core::imp::define_interface!(
8367 ICoreWebView2ContextMenuRequestedEventHandler,
8368 ICoreWebView2ContextMenuRequestedEventHandler_Vtbl,
8369 0x04d3fe1d_ab87_42fb_a898_da241d35b63c
8370);
8371windows_core::imp::interface_hierarchy!(
8372 ICoreWebView2ContextMenuRequestedEventHandler,
8373 windows_core::IUnknown
8374);
8375impl ICoreWebView2ContextMenuRequestedEventHandler {
8376 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
8377 where
8378 P0: windows_core::Param<ICoreWebView2>,
8379 P1: windows_core::Param<ICoreWebView2ContextMenuRequestedEventArgs>,
8380 {
8381 unsafe {
8382 (windows_core::Interface::vtable(self).Invoke)(
8383 windows_core::Interface::as_raw(self),
8384 sender.param().abi(),
8385 args.param().abi(),
8386 )
8387 .ok()
8388 }
8389 }
8390}
8391#[repr(C)]
8392pub struct ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
8393 pub base__: windows_core::IUnknown_Vtbl,
8394 pub Invoke: unsafe extern "system" fn(
8395 *mut core::ffi::c_void,
8396 *mut core::ffi::c_void,
8397 *mut core::ffi::c_void,
8398 ) -> windows_core::HRESULT,
8399}
8400pub trait ICoreWebView2ContextMenuRequestedEventHandler_Impl: windows_core::IUnknownImpl {
8401 fn Invoke(
8402 &self,
8403 sender: windows_core::Ref<'_, ICoreWebView2>,
8404 args: windows_core::Ref<'_, ICoreWebView2ContextMenuRequestedEventArgs>,
8405 ) -> windows_core::Result<()>;
8406}
8407impl ICoreWebView2ContextMenuRequestedEventHandler_Vtbl {
8408 pub const fn new<
8409 Identity: ICoreWebView2ContextMenuRequestedEventHandler_Impl,
8410 const OFFSET: isize,
8411 >() -> Self {
8412 unsafe extern "system" fn Invoke<
8413 Identity: ICoreWebView2ContextMenuRequestedEventHandler_Impl,
8414 const OFFSET: isize,
8415 >(
8416 this: *mut core::ffi::c_void,
8417 sender: *mut core::ffi::c_void,
8418 args: *mut core::ffi::c_void,
8419 ) -> windows_core::HRESULT {
8420 unsafe {
8421 let this: &Identity =
8422 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8423 ICoreWebView2ContextMenuRequestedEventHandler_Impl::Invoke(
8424 this,
8425 core::mem::transmute_copy(&sender),
8426 core::mem::transmute_copy(&args),
8427 )
8428 .into()
8429 }
8430 }
8431 Self {
8432 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
8433 Invoke: Invoke::<Identity, OFFSET>,
8434 }
8435 }
8436 pub fn matches(iid: &windows_core::GUID) -> bool {
8437 iid == &<ICoreWebView2ContextMenuRequestedEventHandler as windows_core::Interface>::IID
8438 }
8439}
8440impl windows_core::RuntimeName for ICoreWebView2ContextMenuRequestedEventHandler {}
8441windows_core::imp::define_interface!(
8442 ICoreWebView2ContextMenuTarget,
8443 ICoreWebView2ContextMenuTarget_Vtbl,
8444 0xb8611d99_eed6_4f3f_902c_a198502ad472
8445);
8446windows_core::imp::interface_hierarchy!(ICoreWebView2ContextMenuTarget, windows_core::IUnknown);
8447impl ICoreWebView2ContextMenuTarget {
8448 pub unsafe fn Kind(
8449 &self,
8450 value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
8451 ) -> windows_core::Result<()> {
8452 unsafe {
8453 (windows_core::Interface::vtable(self).Kind)(
8454 windows_core::Interface::as_raw(self),
8455 value as _,
8456 )
8457 .ok()
8458 }
8459 }
8460 pub unsafe fn IsEditable(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
8461 unsafe {
8462 (windows_core::Interface::vtable(self).IsEditable)(
8463 windows_core::Interface::as_raw(self),
8464 value as _,
8465 )
8466 .ok()
8467 }
8468 }
8469 pub unsafe fn IsRequestedForMainFrame(
8470 &self,
8471 value: *mut windows_core::BOOL,
8472 ) -> windows_core::Result<()> {
8473 unsafe {
8474 (windows_core::Interface::vtable(self).IsRequestedForMainFrame)(
8475 windows_core::Interface::as_raw(self),
8476 value as _,
8477 )
8478 .ok()
8479 }
8480 }
8481 pub unsafe fn PageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
8482 unsafe {
8483 (windows_core::Interface::vtable(self).PageUri)(
8484 windows_core::Interface::as_raw(self),
8485 value as _,
8486 )
8487 .ok()
8488 }
8489 }
8490 pub unsafe fn FrameUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
8491 unsafe {
8492 (windows_core::Interface::vtable(self).FrameUri)(
8493 windows_core::Interface::as_raw(self),
8494 value as _,
8495 )
8496 .ok()
8497 }
8498 }
8499 pub unsafe fn HasLinkUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
8500 unsafe {
8501 (windows_core::Interface::vtable(self).HasLinkUri)(
8502 windows_core::Interface::as_raw(self),
8503 value as _,
8504 )
8505 .ok()
8506 }
8507 }
8508 pub unsafe fn LinkUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
8509 unsafe {
8510 (windows_core::Interface::vtable(self).LinkUri)(
8511 windows_core::Interface::as_raw(self),
8512 value as _,
8513 )
8514 .ok()
8515 }
8516 }
8517 pub unsafe fn HasLinkText(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
8518 unsafe {
8519 (windows_core::Interface::vtable(self).HasLinkText)(
8520 windows_core::Interface::as_raw(self),
8521 value as _,
8522 )
8523 .ok()
8524 }
8525 }
8526 pub unsafe fn LinkText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
8527 unsafe {
8528 (windows_core::Interface::vtable(self).LinkText)(
8529 windows_core::Interface::as_raw(self),
8530 value as _,
8531 )
8532 .ok()
8533 }
8534 }
8535 pub unsafe fn HasSourceUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
8536 unsafe {
8537 (windows_core::Interface::vtable(self).HasSourceUri)(
8538 windows_core::Interface::as_raw(self),
8539 value as _,
8540 )
8541 .ok()
8542 }
8543 }
8544 pub unsafe fn SourceUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
8545 unsafe {
8546 (windows_core::Interface::vtable(self).SourceUri)(
8547 windows_core::Interface::as_raw(self),
8548 value as _,
8549 )
8550 .ok()
8551 }
8552 }
8553 pub unsafe fn HasSelection(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
8554 unsafe {
8555 (windows_core::Interface::vtable(self).HasSelection)(
8556 windows_core::Interface::as_raw(self),
8557 value as _,
8558 )
8559 .ok()
8560 }
8561 }
8562 pub unsafe fn SelectionText(
8563 &self,
8564 value: *mut windows_core::PWSTR,
8565 ) -> windows_core::Result<()> {
8566 unsafe {
8567 (windows_core::Interface::vtable(self).SelectionText)(
8568 windows_core::Interface::as_raw(self),
8569 value as _,
8570 )
8571 .ok()
8572 }
8573 }
8574}
8575#[repr(C)]
8576pub struct ICoreWebView2ContextMenuTarget_Vtbl {
8577 pub base__: windows_core::IUnknown_Vtbl,
8578 pub Kind: unsafe extern "system" fn(
8579 *mut core::ffi::c_void,
8580 *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
8581 ) -> windows_core::HRESULT,
8582 pub IsEditable: unsafe extern "system" fn(
8583 *mut core::ffi::c_void,
8584 *mut windows_core::BOOL,
8585 ) -> windows_core::HRESULT,
8586 pub IsRequestedForMainFrame: unsafe extern "system" fn(
8587 *mut core::ffi::c_void,
8588 *mut windows_core::BOOL,
8589 ) -> windows_core::HRESULT,
8590 pub PageUri: unsafe extern "system" fn(
8591 *mut core::ffi::c_void,
8592 *mut windows_core::PWSTR,
8593 ) -> windows_core::HRESULT,
8594 pub FrameUri: unsafe extern "system" fn(
8595 *mut core::ffi::c_void,
8596 *mut windows_core::PWSTR,
8597 ) -> windows_core::HRESULT,
8598 pub HasLinkUri: unsafe extern "system" fn(
8599 *mut core::ffi::c_void,
8600 *mut windows_core::BOOL,
8601 ) -> windows_core::HRESULT,
8602 pub LinkUri: unsafe extern "system" fn(
8603 *mut core::ffi::c_void,
8604 *mut windows_core::PWSTR,
8605 ) -> windows_core::HRESULT,
8606 pub HasLinkText: unsafe extern "system" fn(
8607 *mut core::ffi::c_void,
8608 *mut windows_core::BOOL,
8609 ) -> windows_core::HRESULT,
8610 pub LinkText: unsafe extern "system" fn(
8611 *mut core::ffi::c_void,
8612 *mut windows_core::PWSTR,
8613 ) -> windows_core::HRESULT,
8614 pub HasSourceUri: unsafe extern "system" fn(
8615 *mut core::ffi::c_void,
8616 *mut windows_core::BOOL,
8617 ) -> windows_core::HRESULT,
8618 pub SourceUri: unsafe extern "system" fn(
8619 *mut core::ffi::c_void,
8620 *mut windows_core::PWSTR,
8621 ) -> windows_core::HRESULT,
8622 pub HasSelection: unsafe extern "system" fn(
8623 *mut core::ffi::c_void,
8624 *mut windows_core::BOOL,
8625 ) -> windows_core::HRESULT,
8626 pub SelectionText: unsafe extern "system" fn(
8627 *mut core::ffi::c_void,
8628 *mut windows_core::PWSTR,
8629 ) -> windows_core::HRESULT,
8630}
8631pub trait ICoreWebView2ContextMenuTarget_Impl: windows_core::IUnknownImpl {
8632 fn Kind(&self, value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND) -> windows_core::Result<()>;
8633 fn IsEditable(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8634 fn IsRequestedForMainFrame(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8635 fn PageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
8636 fn FrameUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
8637 fn HasLinkUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8638 fn LinkUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
8639 fn HasLinkText(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8640 fn LinkText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
8641 fn HasSourceUri(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8642 fn SourceUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
8643 fn HasSelection(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
8644 fn SelectionText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
8645}
8646impl ICoreWebView2ContextMenuTarget_Vtbl {
8647 pub const fn new<Identity: ICoreWebView2ContextMenuTarget_Impl, const OFFSET: isize>() -> Self {
8648 unsafe extern "system" fn Kind<
8649 Identity: ICoreWebView2ContextMenuTarget_Impl,
8650 const OFFSET: isize,
8651 >(
8652 this: *mut core::ffi::c_void,
8653 value: *mut COREWEBVIEW2_CONTEXT_MENU_TARGET_KIND,
8654 ) -> windows_core::HRESULT {
8655 unsafe {
8656 let this: &Identity =
8657 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8658 ICoreWebView2ContextMenuTarget_Impl::Kind(this, core::mem::transmute_copy(&value))
8659 .into()
8660 }
8661 }
8662 unsafe extern "system" fn IsEditable<
8663 Identity: ICoreWebView2ContextMenuTarget_Impl,
8664 const OFFSET: isize,
8665 >(
8666 this: *mut core::ffi::c_void,
8667 value: *mut windows_core::BOOL,
8668 ) -> windows_core::HRESULT {
8669 unsafe {
8670 let this: &Identity =
8671 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8672 ICoreWebView2ContextMenuTarget_Impl::IsEditable(
8673 this,
8674 core::mem::transmute_copy(&value),
8675 )
8676 .into()
8677 }
8678 }
8679 unsafe extern "system" fn IsRequestedForMainFrame<
8680 Identity: ICoreWebView2ContextMenuTarget_Impl,
8681 const OFFSET: isize,
8682 >(
8683 this: *mut core::ffi::c_void,
8684 value: *mut windows_core::BOOL,
8685 ) -> windows_core::HRESULT {
8686 unsafe {
8687 let this: &Identity =
8688 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8689 ICoreWebView2ContextMenuTarget_Impl::IsRequestedForMainFrame(
8690 this,
8691 core::mem::transmute_copy(&value),
8692 )
8693 .into()
8694 }
8695 }
8696 unsafe extern "system" fn PageUri<
8697 Identity: ICoreWebView2ContextMenuTarget_Impl,
8698 const OFFSET: isize,
8699 >(
8700 this: *mut core::ffi::c_void,
8701 value: *mut windows_core::PWSTR,
8702 ) -> windows_core::HRESULT {
8703 unsafe {
8704 let this: &Identity =
8705 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8706 ICoreWebView2ContextMenuTarget_Impl::PageUri(
8707 this,
8708 core::mem::transmute_copy(&value),
8709 )
8710 .into()
8711 }
8712 }
8713 unsafe extern "system" fn FrameUri<
8714 Identity: ICoreWebView2ContextMenuTarget_Impl,
8715 const OFFSET: isize,
8716 >(
8717 this: *mut core::ffi::c_void,
8718 value: *mut windows_core::PWSTR,
8719 ) -> windows_core::HRESULT {
8720 unsafe {
8721 let this: &Identity =
8722 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8723 ICoreWebView2ContextMenuTarget_Impl::FrameUri(
8724 this,
8725 core::mem::transmute_copy(&value),
8726 )
8727 .into()
8728 }
8729 }
8730 unsafe extern "system" fn HasLinkUri<
8731 Identity: ICoreWebView2ContextMenuTarget_Impl,
8732 const OFFSET: isize,
8733 >(
8734 this: *mut core::ffi::c_void,
8735 value: *mut windows_core::BOOL,
8736 ) -> windows_core::HRESULT {
8737 unsafe {
8738 let this: &Identity =
8739 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8740 ICoreWebView2ContextMenuTarget_Impl::HasLinkUri(
8741 this,
8742 core::mem::transmute_copy(&value),
8743 )
8744 .into()
8745 }
8746 }
8747 unsafe extern "system" fn LinkUri<
8748 Identity: ICoreWebView2ContextMenuTarget_Impl,
8749 const OFFSET: isize,
8750 >(
8751 this: *mut core::ffi::c_void,
8752 value: *mut windows_core::PWSTR,
8753 ) -> windows_core::HRESULT {
8754 unsafe {
8755 let this: &Identity =
8756 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8757 ICoreWebView2ContextMenuTarget_Impl::LinkUri(
8758 this,
8759 core::mem::transmute_copy(&value),
8760 )
8761 .into()
8762 }
8763 }
8764 unsafe extern "system" fn HasLinkText<
8765 Identity: ICoreWebView2ContextMenuTarget_Impl,
8766 const OFFSET: isize,
8767 >(
8768 this: *mut core::ffi::c_void,
8769 value: *mut windows_core::BOOL,
8770 ) -> windows_core::HRESULT {
8771 unsafe {
8772 let this: &Identity =
8773 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8774 ICoreWebView2ContextMenuTarget_Impl::HasLinkText(
8775 this,
8776 core::mem::transmute_copy(&value),
8777 )
8778 .into()
8779 }
8780 }
8781 unsafe extern "system" fn LinkText<
8782 Identity: ICoreWebView2ContextMenuTarget_Impl,
8783 const OFFSET: isize,
8784 >(
8785 this: *mut core::ffi::c_void,
8786 value: *mut windows_core::PWSTR,
8787 ) -> windows_core::HRESULT {
8788 unsafe {
8789 let this: &Identity =
8790 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8791 ICoreWebView2ContextMenuTarget_Impl::LinkText(
8792 this,
8793 core::mem::transmute_copy(&value),
8794 )
8795 .into()
8796 }
8797 }
8798 unsafe extern "system" fn HasSourceUri<
8799 Identity: ICoreWebView2ContextMenuTarget_Impl,
8800 const OFFSET: isize,
8801 >(
8802 this: *mut core::ffi::c_void,
8803 value: *mut windows_core::BOOL,
8804 ) -> windows_core::HRESULT {
8805 unsafe {
8806 let this: &Identity =
8807 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8808 ICoreWebView2ContextMenuTarget_Impl::HasSourceUri(
8809 this,
8810 core::mem::transmute_copy(&value),
8811 )
8812 .into()
8813 }
8814 }
8815 unsafe extern "system" fn SourceUri<
8816 Identity: ICoreWebView2ContextMenuTarget_Impl,
8817 const OFFSET: isize,
8818 >(
8819 this: *mut core::ffi::c_void,
8820 value: *mut windows_core::PWSTR,
8821 ) -> windows_core::HRESULT {
8822 unsafe {
8823 let this: &Identity =
8824 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8825 ICoreWebView2ContextMenuTarget_Impl::SourceUri(
8826 this,
8827 core::mem::transmute_copy(&value),
8828 )
8829 .into()
8830 }
8831 }
8832 unsafe extern "system" fn HasSelection<
8833 Identity: ICoreWebView2ContextMenuTarget_Impl,
8834 const OFFSET: isize,
8835 >(
8836 this: *mut core::ffi::c_void,
8837 value: *mut windows_core::BOOL,
8838 ) -> windows_core::HRESULT {
8839 unsafe {
8840 let this: &Identity =
8841 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8842 ICoreWebView2ContextMenuTarget_Impl::HasSelection(
8843 this,
8844 core::mem::transmute_copy(&value),
8845 )
8846 .into()
8847 }
8848 }
8849 unsafe extern "system" fn SelectionText<
8850 Identity: ICoreWebView2ContextMenuTarget_Impl,
8851 const OFFSET: isize,
8852 >(
8853 this: *mut core::ffi::c_void,
8854 value: *mut windows_core::PWSTR,
8855 ) -> windows_core::HRESULT {
8856 unsafe {
8857 let this: &Identity =
8858 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
8859 ICoreWebView2ContextMenuTarget_Impl::SelectionText(
8860 this,
8861 core::mem::transmute_copy(&value),
8862 )
8863 .into()
8864 }
8865 }
8866 Self {
8867 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
8868 Kind: Kind::<Identity, OFFSET>,
8869 IsEditable: IsEditable::<Identity, OFFSET>,
8870 IsRequestedForMainFrame: IsRequestedForMainFrame::<Identity, OFFSET>,
8871 PageUri: PageUri::<Identity, OFFSET>,
8872 FrameUri: FrameUri::<Identity, OFFSET>,
8873 HasLinkUri: HasLinkUri::<Identity, OFFSET>,
8874 LinkUri: LinkUri::<Identity, OFFSET>,
8875 HasLinkText: HasLinkText::<Identity, OFFSET>,
8876 LinkText: LinkText::<Identity, OFFSET>,
8877 HasSourceUri: HasSourceUri::<Identity, OFFSET>,
8878 SourceUri: SourceUri::<Identity, OFFSET>,
8879 HasSelection: HasSelection::<Identity, OFFSET>,
8880 SelectionText: SelectionText::<Identity, OFFSET>,
8881 }
8882 }
8883 pub fn matches(iid: &windows_core::GUID) -> bool {
8884 iid == &<ICoreWebView2ContextMenuTarget as windows_core::Interface>::IID
8885 }
8886}
8887impl windows_core::RuntimeName for ICoreWebView2ContextMenuTarget {}
8888windows_core::imp::define_interface!(
8889 ICoreWebView2Controller,
8890 ICoreWebView2Controller_Vtbl,
8891 0x4d00c0d1_9434_4eb6_8078_8697a560334f
8892);
8893windows_core::imp::interface_hierarchy!(ICoreWebView2Controller, windows_core::IUnknown);
8894impl ICoreWebView2Controller {
8895 pub unsafe fn IsVisible(&self, isvisible: *mut windows_core::BOOL) -> windows_core::Result<()> {
8896 unsafe {
8897 (windows_core::Interface::vtable(self).IsVisible)(
8898 windows_core::Interface::as_raw(self),
8899 isvisible as _,
8900 )
8901 .ok()
8902 }
8903 }
8904 pub unsafe fn SetIsVisible(&self, isvisible: bool) -> windows_core::Result<()> {
8905 unsafe {
8906 (windows_core::Interface::vtable(self).SetIsVisible)(
8907 windows_core::Interface::as_raw(self),
8908 isvisible.into(),
8909 )
8910 .ok()
8911 }
8912 }
8913 pub unsafe fn Bounds(
8914 &self,
8915 bounds: *mut windows::Win32::Foundation::RECT,
8916 ) -> windows_core::Result<()> {
8917 unsafe {
8918 (windows_core::Interface::vtable(self).Bounds)(
8919 windows_core::Interface::as_raw(self),
8920 bounds as _,
8921 )
8922 .ok()
8923 }
8924 }
8925 pub unsafe fn SetBounds(
8926 &self,
8927 bounds: windows::Win32::Foundation::RECT,
8928 ) -> windows_core::Result<()> {
8929 unsafe {
8930 (windows_core::Interface::vtable(self).SetBounds)(
8931 windows_core::Interface::as_raw(self),
8932 core::mem::transmute(bounds),
8933 )
8934 .ok()
8935 }
8936 }
8937 pub unsafe fn ZoomFactor(&self, zoomfactor: *mut f64) -> windows_core::Result<()> {
8938 unsafe {
8939 (windows_core::Interface::vtable(self).ZoomFactor)(
8940 windows_core::Interface::as_raw(self),
8941 zoomfactor as _,
8942 )
8943 .ok()
8944 }
8945 }
8946 pub unsafe fn SetZoomFactor(&self, zoomfactor: f64) -> windows_core::Result<()> {
8947 unsafe {
8948 (windows_core::Interface::vtable(self).SetZoomFactor)(
8949 windows_core::Interface::as_raw(self),
8950 zoomfactor,
8951 )
8952 .ok()
8953 }
8954 }
8955 pub unsafe fn add_ZoomFactorChanged<P0>(
8956 &self,
8957 eventhandler: P0,
8958 token: *mut i64,
8959 ) -> windows_core::Result<()>
8960 where
8961 P0: windows_core::Param<ICoreWebView2ZoomFactorChangedEventHandler>,
8962 {
8963 unsafe {
8964 (windows_core::Interface::vtable(self).add_ZoomFactorChanged)(
8965 windows_core::Interface::as_raw(self),
8966 eventhandler.param().abi(),
8967 token as _,
8968 )
8969 .ok()
8970 }
8971 }
8972 pub unsafe fn remove_ZoomFactorChanged(&self, token: i64) -> windows_core::Result<()> {
8973 unsafe {
8974 (windows_core::Interface::vtable(self).remove_ZoomFactorChanged)(
8975 windows_core::Interface::as_raw(self),
8976 token,
8977 )
8978 .ok()
8979 }
8980 }
8981 pub unsafe fn SetBoundsAndZoomFactor(
8982 &self,
8983 bounds: windows::Win32::Foundation::RECT,
8984 zoomfactor: f64,
8985 ) -> windows_core::Result<()> {
8986 unsafe {
8987 (windows_core::Interface::vtable(self).SetBoundsAndZoomFactor)(
8988 windows_core::Interface::as_raw(self),
8989 core::mem::transmute(bounds),
8990 zoomfactor,
8991 )
8992 .ok()
8993 }
8994 }
8995 pub unsafe fn MoveFocus(
8996 &self,
8997 reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
8998 ) -> windows_core::Result<()> {
8999 unsafe {
9000 (windows_core::Interface::vtable(self).MoveFocus)(
9001 windows_core::Interface::as_raw(self),
9002 reason,
9003 )
9004 .ok()
9005 }
9006 }
9007 pub unsafe fn add_MoveFocusRequested<P0>(
9008 &self,
9009 eventhandler: P0,
9010 token: *mut i64,
9011 ) -> windows_core::Result<()>
9012 where
9013 P0: windows_core::Param<ICoreWebView2MoveFocusRequestedEventHandler>,
9014 {
9015 unsafe {
9016 (windows_core::Interface::vtable(self).add_MoveFocusRequested)(
9017 windows_core::Interface::as_raw(self),
9018 eventhandler.param().abi(),
9019 token as _,
9020 )
9021 .ok()
9022 }
9023 }
9024 pub unsafe fn remove_MoveFocusRequested(&self, token: i64) -> windows_core::Result<()> {
9025 unsafe {
9026 (windows_core::Interface::vtable(self).remove_MoveFocusRequested)(
9027 windows_core::Interface::as_raw(self),
9028 token,
9029 )
9030 .ok()
9031 }
9032 }
9033 pub unsafe fn add_GotFocus<P0>(
9034 &self,
9035 eventhandler: P0,
9036 token: *mut i64,
9037 ) -> windows_core::Result<()>
9038 where
9039 P0: windows_core::Param<ICoreWebView2FocusChangedEventHandler>,
9040 {
9041 unsafe {
9042 (windows_core::Interface::vtable(self).add_GotFocus)(
9043 windows_core::Interface::as_raw(self),
9044 eventhandler.param().abi(),
9045 token as _,
9046 )
9047 .ok()
9048 }
9049 }
9050 pub unsafe fn remove_GotFocus(&self, token: i64) -> windows_core::Result<()> {
9051 unsafe {
9052 (windows_core::Interface::vtable(self).remove_GotFocus)(
9053 windows_core::Interface::as_raw(self),
9054 token,
9055 )
9056 .ok()
9057 }
9058 }
9059 pub unsafe fn add_LostFocus<P0>(
9060 &self,
9061 eventhandler: P0,
9062 token: *mut i64,
9063 ) -> windows_core::Result<()>
9064 where
9065 P0: windows_core::Param<ICoreWebView2FocusChangedEventHandler>,
9066 {
9067 unsafe {
9068 (windows_core::Interface::vtable(self).add_LostFocus)(
9069 windows_core::Interface::as_raw(self),
9070 eventhandler.param().abi(),
9071 token as _,
9072 )
9073 .ok()
9074 }
9075 }
9076 pub unsafe fn remove_LostFocus(&self, token: i64) -> windows_core::Result<()> {
9077 unsafe {
9078 (windows_core::Interface::vtable(self).remove_LostFocus)(
9079 windows_core::Interface::as_raw(self),
9080 token,
9081 )
9082 .ok()
9083 }
9084 }
9085 pub unsafe fn add_AcceleratorKeyPressed<P0>(
9086 &self,
9087 eventhandler: P0,
9088 token: *mut i64,
9089 ) -> windows_core::Result<()>
9090 where
9091 P0: windows_core::Param<ICoreWebView2AcceleratorKeyPressedEventHandler>,
9092 {
9093 unsafe {
9094 (windows_core::Interface::vtable(self).add_AcceleratorKeyPressed)(
9095 windows_core::Interface::as_raw(self),
9096 eventhandler.param().abi(),
9097 token as _,
9098 )
9099 .ok()
9100 }
9101 }
9102 pub unsafe fn remove_AcceleratorKeyPressed(&self, token: i64) -> windows_core::Result<()> {
9103 unsafe {
9104 (windows_core::Interface::vtable(self).remove_AcceleratorKeyPressed)(
9105 windows_core::Interface::as_raw(self),
9106 token,
9107 )
9108 .ok()
9109 }
9110 }
9111 pub unsafe fn ParentWindow(
9112 &self,
9113 parentwindow: *mut windows::Win32::Foundation::HWND,
9114 ) -> windows_core::Result<()> {
9115 unsafe {
9116 (windows_core::Interface::vtable(self).ParentWindow)(
9117 windows_core::Interface::as_raw(self),
9118 parentwindow as _,
9119 )
9120 .ok()
9121 }
9122 }
9123 pub unsafe fn SetParentWindow(
9124 &self,
9125 parentwindow: windows::Win32::Foundation::HWND,
9126 ) -> windows_core::Result<()> {
9127 unsafe {
9128 (windows_core::Interface::vtable(self).SetParentWindow)(
9129 windows_core::Interface::as_raw(self),
9130 parentwindow,
9131 )
9132 .ok()
9133 }
9134 }
9135 pub unsafe fn NotifyParentWindowPositionChanged(&self) -> windows_core::Result<()> {
9136 unsafe {
9137 (windows_core::Interface::vtable(self).NotifyParentWindowPositionChanged)(
9138 windows_core::Interface::as_raw(self),
9139 )
9140 .ok()
9141 }
9142 }
9143 pub unsafe fn Close(&self) -> windows_core::Result<()> {
9144 unsafe {
9145 (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self))
9146 .ok()
9147 }
9148 }
9149 pub unsafe fn CoreWebView2(&self) -> windows_core::Result<ICoreWebView2> {
9150 unsafe {
9151 let mut result__ = core::mem::zeroed();
9152 (windows_core::Interface::vtable(self).CoreWebView2)(
9153 windows_core::Interface::as_raw(self),
9154 &mut result__,
9155 )
9156 .and_then(|| windows_core::Type::from_abi(result__))
9157 }
9158 }
9159}
9160#[repr(C)]
9161pub struct ICoreWebView2Controller_Vtbl {
9162 pub base__: windows_core::IUnknown_Vtbl,
9163 pub IsVisible: unsafe extern "system" fn(
9164 *mut core::ffi::c_void,
9165 *mut windows_core::BOOL,
9166 ) -> windows_core::HRESULT,
9167 pub SetIsVisible: unsafe extern "system" fn(
9168 *mut core::ffi::c_void,
9169 windows_core::BOOL,
9170 ) -> windows_core::HRESULT,
9171 pub Bounds: unsafe extern "system" fn(
9172 *mut core::ffi::c_void,
9173 *mut windows::Win32::Foundation::RECT,
9174 ) -> windows_core::HRESULT,
9175 pub SetBounds: unsafe extern "system" fn(
9176 *mut core::ffi::c_void,
9177 windows::Win32::Foundation::RECT,
9178 ) -> windows_core::HRESULT,
9179 pub ZoomFactor:
9180 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
9181 pub SetZoomFactor:
9182 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
9183 pub add_ZoomFactorChanged: unsafe extern "system" fn(
9184 *mut core::ffi::c_void,
9185 *mut core::ffi::c_void,
9186 *mut i64,
9187 ) -> windows_core::HRESULT,
9188 pub remove_ZoomFactorChanged:
9189 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
9190 pub SetBoundsAndZoomFactor: unsafe extern "system" fn(
9191 *mut core::ffi::c_void,
9192 windows::Win32::Foundation::RECT,
9193 f64,
9194 ) -> windows_core::HRESULT,
9195 pub MoveFocus: unsafe extern "system" fn(
9196 *mut core::ffi::c_void,
9197 COREWEBVIEW2_MOVE_FOCUS_REASON,
9198 ) -> windows_core::HRESULT,
9199 pub add_MoveFocusRequested: unsafe extern "system" fn(
9200 *mut core::ffi::c_void,
9201 *mut core::ffi::c_void,
9202 *mut i64,
9203 ) -> windows_core::HRESULT,
9204 pub remove_MoveFocusRequested:
9205 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
9206 pub add_GotFocus: unsafe extern "system" fn(
9207 *mut core::ffi::c_void,
9208 *mut core::ffi::c_void,
9209 *mut i64,
9210 ) -> windows_core::HRESULT,
9211 pub remove_GotFocus:
9212 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
9213 pub add_LostFocus: unsafe extern "system" fn(
9214 *mut core::ffi::c_void,
9215 *mut core::ffi::c_void,
9216 *mut i64,
9217 ) -> windows_core::HRESULT,
9218 pub remove_LostFocus:
9219 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
9220 pub add_AcceleratorKeyPressed: unsafe extern "system" fn(
9221 *mut core::ffi::c_void,
9222 *mut core::ffi::c_void,
9223 *mut i64,
9224 ) -> windows_core::HRESULT,
9225 pub remove_AcceleratorKeyPressed:
9226 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
9227 pub ParentWindow: unsafe extern "system" fn(
9228 *mut core::ffi::c_void,
9229 *mut windows::Win32::Foundation::HWND,
9230 ) -> windows_core::HRESULT,
9231 pub SetParentWindow: unsafe extern "system" fn(
9232 *mut core::ffi::c_void,
9233 windows::Win32::Foundation::HWND,
9234 ) -> windows_core::HRESULT,
9235 pub NotifyParentWindowPositionChanged:
9236 unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
9237 pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
9238 pub CoreWebView2: unsafe extern "system" fn(
9239 *mut core::ffi::c_void,
9240 *mut *mut core::ffi::c_void,
9241 ) -> windows_core::HRESULT,
9242}
9243pub trait ICoreWebView2Controller_Impl: windows_core::IUnknownImpl {
9244 fn IsVisible(&self, isvisible: *mut windows_core::BOOL) -> windows_core::Result<()>;
9245 fn SetIsVisible(&self, isvisible: windows_core::BOOL) -> windows_core::Result<()>;
9246 fn Bounds(&self, bounds: *mut windows::Win32::Foundation::RECT) -> windows_core::Result<()>;
9247 fn SetBounds(&self, bounds: &windows::Win32::Foundation::RECT) -> windows_core::Result<()>;
9248 fn ZoomFactor(&self, zoomfactor: *mut f64) -> windows_core::Result<()>;
9249 fn SetZoomFactor(&self, zoomfactor: f64) -> windows_core::Result<()>;
9250 fn add_ZoomFactorChanged(
9251 &self,
9252 eventhandler: windows_core::Ref<'_, ICoreWebView2ZoomFactorChangedEventHandler>,
9253 token: *mut i64,
9254 ) -> windows_core::Result<()>;
9255 fn remove_ZoomFactorChanged(&self, token: i64) -> windows_core::Result<()>;
9256 fn SetBoundsAndZoomFactor(
9257 &self,
9258 bounds: &windows::Win32::Foundation::RECT,
9259 zoomfactor: f64,
9260 ) -> windows_core::Result<()>;
9261 fn MoveFocus(&self, reason: COREWEBVIEW2_MOVE_FOCUS_REASON) -> windows_core::Result<()>;
9262 fn add_MoveFocusRequested(
9263 &self,
9264 eventhandler: windows_core::Ref<'_, ICoreWebView2MoveFocusRequestedEventHandler>,
9265 token: *mut i64,
9266 ) -> windows_core::Result<()>;
9267 fn remove_MoveFocusRequested(&self, token: i64) -> windows_core::Result<()>;
9268 fn add_GotFocus(
9269 &self,
9270 eventhandler: windows_core::Ref<'_, ICoreWebView2FocusChangedEventHandler>,
9271 token: *mut i64,
9272 ) -> windows_core::Result<()>;
9273 fn remove_GotFocus(&self, token: i64) -> windows_core::Result<()>;
9274 fn add_LostFocus(
9275 &self,
9276 eventhandler: windows_core::Ref<'_, ICoreWebView2FocusChangedEventHandler>,
9277 token: *mut i64,
9278 ) -> windows_core::Result<()>;
9279 fn remove_LostFocus(&self, token: i64) -> windows_core::Result<()>;
9280 fn add_AcceleratorKeyPressed(
9281 &self,
9282 eventhandler: windows_core::Ref<'_, ICoreWebView2AcceleratorKeyPressedEventHandler>,
9283 token: *mut i64,
9284 ) -> windows_core::Result<()>;
9285 fn remove_AcceleratorKeyPressed(&self, token: i64) -> windows_core::Result<()>;
9286 fn ParentWindow(
9287 &self,
9288 parentwindow: *mut windows::Win32::Foundation::HWND,
9289 ) -> windows_core::Result<()>;
9290 fn SetParentWindow(
9291 &self,
9292 parentwindow: windows::Win32::Foundation::HWND,
9293 ) -> windows_core::Result<()>;
9294 fn NotifyParentWindowPositionChanged(&self) -> windows_core::Result<()>;
9295 fn Close(&self) -> windows_core::Result<()>;
9296 fn CoreWebView2(&self) -> windows_core::Result<ICoreWebView2>;
9297}
9298impl ICoreWebView2Controller_Vtbl {
9299 pub const fn new<Identity: ICoreWebView2Controller_Impl, const OFFSET: isize>() -> Self {
9300 unsafe extern "system" fn IsVisible<
9301 Identity: ICoreWebView2Controller_Impl,
9302 const OFFSET: isize,
9303 >(
9304 this: *mut core::ffi::c_void,
9305 isvisible: *mut windows_core::BOOL,
9306 ) -> windows_core::HRESULT {
9307 unsafe {
9308 let this: &Identity =
9309 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9310 ICoreWebView2Controller_Impl::IsVisible(this, core::mem::transmute_copy(&isvisible))
9311 .into()
9312 }
9313 }
9314 unsafe extern "system" fn SetIsVisible<
9315 Identity: ICoreWebView2Controller_Impl,
9316 const OFFSET: isize,
9317 >(
9318 this: *mut core::ffi::c_void,
9319 isvisible: windows_core::BOOL,
9320 ) -> windows_core::HRESULT {
9321 unsafe {
9322 let this: &Identity =
9323 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9324 ICoreWebView2Controller_Impl::SetIsVisible(
9325 this,
9326 core::mem::transmute_copy(&isvisible),
9327 )
9328 .into()
9329 }
9330 }
9331 unsafe extern "system" fn Bounds<
9332 Identity: ICoreWebView2Controller_Impl,
9333 const OFFSET: isize,
9334 >(
9335 this: *mut core::ffi::c_void,
9336 bounds: *mut windows::Win32::Foundation::RECT,
9337 ) -> windows_core::HRESULT {
9338 unsafe {
9339 let this: &Identity =
9340 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9341 ICoreWebView2Controller_Impl::Bounds(this, core::mem::transmute_copy(&bounds))
9342 .into()
9343 }
9344 }
9345 unsafe extern "system" fn SetBounds<
9346 Identity: ICoreWebView2Controller_Impl,
9347 const OFFSET: isize,
9348 >(
9349 this: *mut core::ffi::c_void,
9350 bounds: windows::Win32::Foundation::RECT,
9351 ) -> windows_core::HRESULT {
9352 unsafe {
9353 let this: &Identity =
9354 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9355 ICoreWebView2Controller_Impl::SetBounds(this, core::mem::transmute(&bounds)).into()
9356 }
9357 }
9358 unsafe extern "system" fn ZoomFactor<
9359 Identity: ICoreWebView2Controller_Impl,
9360 const OFFSET: isize,
9361 >(
9362 this: *mut core::ffi::c_void,
9363 zoomfactor: *mut f64,
9364 ) -> windows_core::HRESULT {
9365 unsafe {
9366 let this: &Identity =
9367 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9368 ICoreWebView2Controller_Impl::ZoomFactor(
9369 this,
9370 core::mem::transmute_copy(&zoomfactor),
9371 )
9372 .into()
9373 }
9374 }
9375 unsafe extern "system" fn SetZoomFactor<
9376 Identity: ICoreWebView2Controller_Impl,
9377 const OFFSET: isize,
9378 >(
9379 this: *mut core::ffi::c_void,
9380 zoomfactor: f64,
9381 ) -> windows_core::HRESULT {
9382 unsafe {
9383 let this: &Identity =
9384 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9385 ICoreWebView2Controller_Impl::SetZoomFactor(
9386 this,
9387 core::mem::transmute_copy(&zoomfactor),
9388 )
9389 .into()
9390 }
9391 }
9392 unsafe extern "system" fn add_ZoomFactorChanged<
9393 Identity: ICoreWebView2Controller_Impl,
9394 const OFFSET: isize,
9395 >(
9396 this: *mut core::ffi::c_void,
9397 eventhandler: *mut core::ffi::c_void,
9398 token: *mut i64,
9399 ) -> windows_core::HRESULT {
9400 unsafe {
9401 let this: &Identity =
9402 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9403 ICoreWebView2Controller_Impl::add_ZoomFactorChanged(
9404 this,
9405 core::mem::transmute_copy(&eventhandler),
9406 core::mem::transmute_copy(&token),
9407 )
9408 .into()
9409 }
9410 }
9411 unsafe extern "system" fn remove_ZoomFactorChanged<
9412 Identity: ICoreWebView2Controller_Impl,
9413 const OFFSET: isize,
9414 >(
9415 this: *mut core::ffi::c_void,
9416 token: i64,
9417 ) -> windows_core::HRESULT {
9418 unsafe {
9419 let this: &Identity =
9420 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9421 ICoreWebView2Controller_Impl::remove_ZoomFactorChanged(
9422 this,
9423 core::mem::transmute_copy(&token),
9424 )
9425 .into()
9426 }
9427 }
9428 unsafe extern "system" fn SetBoundsAndZoomFactor<
9429 Identity: ICoreWebView2Controller_Impl,
9430 const OFFSET: isize,
9431 >(
9432 this: *mut core::ffi::c_void,
9433 bounds: windows::Win32::Foundation::RECT,
9434 zoomfactor: f64,
9435 ) -> windows_core::HRESULT {
9436 unsafe {
9437 let this: &Identity =
9438 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9439 ICoreWebView2Controller_Impl::SetBoundsAndZoomFactor(
9440 this,
9441 core::mem::transmute(&bounds),
9442 core::mem::transmute_copy(&zoomfactor),
9443 )
9444 .into()
9445 }
9446 }
9447 unsafe extern "system" fn MoveFocus<
9448 Identity: ICoreWebView2Controller_Impl,
9449 const OFFSET: isize,
9450 >(
9451 this: *mut core::ffi::c_void,
9452 reason: COREWEBVIEW2_MOVE_FOCUS_REASON,
9453 ) -> windows_core::HRESULT {
9454 unsafe {
9455 let this: &Identity =
9456 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9457 ICoreWebView2Controller_Impl::MoveFocus(this, core::mem::transmute_copy(&reason))
9458 .into()
9459 }
9460 }
9461 unsafe extern "system" fn add_MoveFocusRequested<
9462 Identity: ICoreWebView2Controller_Impl,
9463 const OFFSET: isize,
9464 >(
9465 this: *mut core::ffi::c_void,
9466 eventhandler: *mut core::ffi::c_void,
9467 token: *mut i64,
9468 ) -> windows_core::HRESULT {
9469 unsafe {
9470 let this: &Identity =
9471 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9472 ICoreWebView2Controller_Impl::add_MoveFocusRequested(
9473 this,
9474 core::mem::transmute_copy(&eventhandler),
9475 core::mem::transmute_copy(&token),
9476 )
9477 .into()
9478 }
9479 }
9480 unsafe extern "system" fn remove_MoveFocusRequested<
9481 Identity: ICoreWebView2Controller_Impl,
9482 const OFFSET: isize,
9483 >(
9484 this: *mut core::ffi::c_void,
9485 token: i64,
9486 ) -> windows_core::HRESULT {
9487 unsafe {
9488 let this: &Identity =
9489 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9490 ICoreWebView2Controller_Impl::remove_MoveFocusRequested(
9491 this,
9492 core::mem::transmute_copy(&token),
9493 )
9494 .into()
9495 }
9496 }
9497 unsafe extern "system" fn add_GotFocus<
9498 Identity: ICoreWebView2Controller_Impl,
9499 const OFFSET: isize,
9500 >(
9501 this: *mut core::ffi::c_void,
9502 eventhandler: *mut core::ffi::c_void,
9503 token: *mut i64,
9504 ) -> windows_core::HRESULT {
9505 unsafe {
9506 let this: &Identity =
9507 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9508 ICoreWebView2Controller_Impl::add_GotFocus(
9509 this,
9510 core::mem::transmute_copy(&eventhandler),
9511 core::mem::transmute_copy(&token),
9512 )
9513 .into()
9514 }
9515 }
9516 unsafe extern "system" fn remove_GotFocus<
9517 Identity: ICoreWebView2Controller_Impl,
9518 const OFFSET: isize,
9519 >(
9520 this: *mut core::ffi::c_void,
9521 token: i64,
9522 ) -> windows_core::HRESULT {
9523 unsafe {
9524 let this: &Identity =
9525 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9526 ICoreWebView2Controller_Impl::remove_GotFocus(
9527 this,
9528 core::mem::transmute_copy(&token),
9529 )
9530 .into()
9531 }
9532 }
9533 unsafe extern "system" fn add_LostFocus<
9534 Identity: ICoreWebView2Controller_Impl,
9535 const OFFSET: isize,
9536 >(
9537 this: *mut core::ffi::c_void,
9538 eventhandler: *mut core::ffi::c_void,
9539 token: *mut i64,
9540 ) -> windows_core::HRESULT {
9541 unsafe {
9542 let this: &Identity =
9543 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9544 ICoreWebView2Controller_Impl::add_LostFocus(
9545 this,
9546 core::mem::transmute_copy(&eventhandler),
9547 core::mem::transmute_copy(&token),
9548 )
9549 .into()
9550 }
9551 }
9552 unsafe extern "system" fn remove_LostFocus<
9553 Identity: ICoreWebView2Controller_Impl,
9554 const OFFSET: isize,
9555 >(
9556 this: *mut core::ffi::c_void,
9557 token: i64,
9558 ) -> windows_core::HRESULT {
9559 unsafe {
9560 let this: &Identity =
9561 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9562 ICoreWebView2Controller_Impl::remove_LostFocus(
9563 this,
9564 core::mem::transmute_copy(&token),
9565 )
9566 .into()
9567 }
9568 }
9569 unsafe extern "system" fn add_AcceleratorKeyPressed<
9570 Identity: ICoreWebView2Controller_Impl,
9571 const OFFSET: isize,
9572 >(
9573 this: *mut core::ffi::c_void,
9574 eventhandler: *mut core::ffi::c_void,
9575 token: *mut i64,
9576 ) -> windows_core::HRESULT {
9577 unsafe {
9578 let this: &Identity =
9579 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9580 ICoreWebView2Controller_Impl::add_AcceleratorKeyPressed(
9581 this,
9582 core::mem::transmute_copy(&eventhandler),
9583 core::mem::transmute_copy(&token),
9584 )
9585 .into()
9586 }
9587 }
9588 unsafe extern "system" fn remove_AcceleratorKeyPressed<
9589 Identity: ICoreWebView2Controller_Impl,
9590 const OFFSET: isize,
9591 >(
9592 this: *mut core::ffi::c_void,
9593 token: i64,
9594 ) -> windows_core::HRESULT {
9595 unsafe {
9596 let this: &Identity =
9597 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9598 ICoreWebView2Controller_Impl::remove_AcceleratorKeyPressed(
9599 this,
9600 core::mem::transmute_copy(&token),
9601 )
9602 .into()
9603 }
9604 }
9605 unsafe extern "system" fn ParentWindow<
9606 Identity: ICoreWebView2Controller_Impl,
9607 const OFFSET: isize,
9608 >(
9609 this: *mut core::ffi::c_void,
9610 parentwindow: *mut windows::Win32::Foundation::HWND,
9611 ) -> windows_core::HRESULT {
9612 unsafe {
9613 let this: &Identity =
9614 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9615 ICoreWebView2Controller_Impl::ParentWindow(
9616 this,
9617 core::mem::transmute_copy(&parentwindow),
9618 )
9619 .into()
9620 }
9621 }
9622 unsafe extern "system" fn SetParentWindow<
9623 Identity: ICoreWebView2Controller_Impl,
9624 const OFFSET: isize,
9625 >(
9626 this: *mut core::ffi::c_void,
9627 parentwindow: windows::Win32::Foundation::HWND,
9628 ) -> windows_core::HRESULT {
9629 unsafe {
9630 let this: &Identity =
9631 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9632 ICoreWebView2Controller_Impl::SetParentWindow(
9633 this,
9634 core::mem::transmute_copy(&parentwindow),
9635 )
9636 .into()
9637 }
9638 }
9639 unsafe extern "system" fn NotifyParentWindowPositionChanged<
9640 Identity: ICoreWebView2Controller_Impl,
9641 const OFFSET: isize,
9642 >(
9643 this: *mut core::ffi::c_void,
9644 ) -> windows_core::HRESULT {
9645 unsafe {
9646 let this: &Identity =
9647 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9648 ICoreWebView2Controller_Impl::NotifyParentWindowPositionChanged(this).into()
9649 }
9650 }
9651 unsafe extern "system" fn Close<
9652 Identity: ICoreWebView2Controller_Impl,
9653 const OFFSET: isize,
9654 >(
9655 this: *mut core::ffi::c_void,
9656 ) -> windows_core::HRESULT {
9657 unsafe {
9658 let this: &Identity =
9659 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9660 ICoreWebView2Controller_Impl::Close(this).into()
9661 }
9662 }
9663 unsafe extern "system" fn CoreWebView2<
9664 Identity: ICoreWebView2Controller_Impl,
9665 const OFFSET: isize,
9666 >(
9667 this: *mut core::ffi::c_void,
9668 corewebview2: *mut *mut core::ffi::c_void,
9669 ) -> windows_core::HRESULT {
9670 unsafe {
9671 let this: &Identity =
9672 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9673 match ICoreWebView2Controller_Impl::CoreWebView2(this) {
9674 Ok(ok__) => {
9675 corewebview2.write(core::mem::transmute(ok__));
9676 windows_core::HRESULT(0)
9677 }
9678 Err(err) => err.into(),
9679 }
9680 }
9681 }
9682 Self {
9683 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
9684 IsVisible: IsVisible::<Identity, OFFSET>,
9685 SetIsVisible: SetIsVisible::<Identity, OFFSET>,
9686 Bounds: Bounds::<Identity, OFFSET>,
9687 SetBounds: SetBounds::<Identity, OFFSET>,
9688 ZoomFactor: ZoomFactor::<Identity, OFFSET>,
9689 SetZoomFactor: SetZoomFactor::<Identity, OFFSET>,
9690 add_ZoomFactorChanged: add_ZoomFactorChanged::<Identity, OFFSET>,
9691 remove_ZoomFactorChanged: remove_ZoomFactorChanged::<Identity, OFFSET>,
9692 SetBoundsAndZoomFactor: SetBoundsAndZoomFactor::<Identity, OFFSET>,
9693 MoveFocus: MoveFocus::<Identity, OFFSET>,
9694 add_MoveFocusRequested: add_MoveFocusRequested::<Identity, OFFSET>,
9695 remove_MoveFocusRequested: remove_MoveFocusRequested::<Identity, OFFSET>,
9696 add_GotFocus: add_GotFocus::<Identity, OFFSET>,
9697 remove_GotFocus: remove_GotFocus::<Identity, OFFSET>,
9698 add_LostFocus: add_LostFocus::<Identity, OFFSET>,
9699 remove_LostFocus: remove_LostFocus::<Identity, OFFSET>,
9700 add_AcceleratorKeyPressed: add_AcceleratorKeyPressed::<Identity, OFFSET>,
9701 remove_AcceleratorKeyPressed: remove_AcceleratorKeyPressed::<Identity, OFFSET>,
9702 ParentWindow: ParentWindow::<Identity, OFFSET>,
9703 SetParentWindow: SetParentWindow::<Identity, OFFSET>,
9704 NotifyParentWindowPositionChanged: NotifyParentWindowPositionChanged::<Identity, OFFSET>,
9705 Close: Close::<Identity, OFFSET>,
9706 CoreWebView2: CoreWebView2::<Identity, OFFSET>,
9707 }
9708 }
9709 pub fn matches(iid: &windows_core::GUID) -> bool {
9710 iid == &<ICoreWebView2Controller as windows_core::Interface>::IID
9711 }
9712}
9713impl windows_core::RuntimeName for ICoreWebView2Controller {}
9714windows_core::imp::define_interface!(
9715 ICoreWebView2Controller2,
9716 ICoreWebView2Controller2_Vtbl,
9717 0xc979903e_d4ca_4228_92eb_47ee3fa96eab
9718);
9719impl core::ops::Deref for ICoreWebView2Controller2 {
9720 type Target = ICoreWebView2Controller;
9721 fn deref(&self) -> &Self::Target {
9722 unsafe { core::mem::transmute(self) }
9723 }
9724}
9725windows_core::imp::interface_hierarchy!(
9726 ICoreWebView2Controller2,
9727 windows_core::IUnknown,
9728 ICoreWebView2Controller
9729);
9730impl ICoreWebView2Controller2 {
9731 pub unsafe fn DefaultBackgroundColor(
9732 &self,
9733 value: *mut COREWEBVIEW2_COLOR,
9734 ) -> windows_core::Result<()> {
9735 unsafe {
9736 (windows_core::Interface::vtable(self).DefaultBackgroundColor)(
9737 windows_core::Interface::as_raw(self),
9738 value as _,
9739 )
9740 .ok()
9741 }
9742 }
9743 pub unsafe fn SetDefaultBackgroundColor(
9744 &self,
9745 value: COREWEBVIEW2_COLOR,
9746 ) -> windows_core::Result<()> {
9747 unsafe {
9748 (windows_core::Interface::vtable(self).SetDefaultBackgroundColor)(
9749 windows_core::Interface::as_raw(self),
9750 core::mem::transmute(value),
9751 )
9752 .ok()
9753 }
9754 }
9755}
9756#[repr(C)]
9757pub struct ICoreWebView2Controller2_Vtbl {
9758 pub base__: ICoreWebView2Controller_Vtbl,
9759 pub DefaultBackgroundColor: unsafe extern "system" fn(
9760 *mut core::ffi::c_void,
9761 *mut COREWEBVIEW2_COLOR,
9762 ) -> windows_core::HRESULT,
9763 pub SetDefaultBackgroundColor: unsafe extern "system" fn(
9764 *mut core::ffi::c_void,
9765 COREWEBVIEW2_COLOR,
9766 ) -> windows_core::HRESULT,
9767}
9768pub trait ICoreWebView2Controller2_Impl: ICoreWebView2Controller_Impl {
9769 fn DefaultBackgroundColor(&self, value: *mut COREWEBVIEW2_COLOR) -> windows_core::Result<()>;
9770 fn SetDefaultBackgroundColor(&self, value: &COREWEBVIEW2_COLOR) -> windows_core::Result<()>;
9771}
9772impl ICoreWebView2Controller2_Vtbl {
9773 pub const fn new<Identity: ICoreWebView2Controller2_Impl, const OFFSET: isize>() -> Self {
9774 unsafe extern "system" fn DefaultBackgroundColor<
9775 Identity: ICoreWebView2Controller2_Impl,
9776 const OFFSET: isize,
9777 >(
9778 this: *mut core::ffi::c_void,
9779 value: *mut COREWEBVIEW2_COLOR,
9780 ) -> windows_core::HRESULT {
9781 unsafe {
9782 let this: &Identity =
9783 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9784 ICoreWebView2Controller2_Impl::DefaultBackgroundColor(
9785 this,
9786 core::mem::transmute_copy(&value),
9787 )
9788 .into()
9789 }
9790 }
9791 unsafe extern "system" fn SetDefaultBackgroundColor<
9792 Identity: ICoreWebView2Controller2_Impl,
9793 const OFFSET: isize,
9794 >(
9795 this: *mut core::ffi::c_void,
9796 value: COREWEBVIEW2_COLOR,
9797 ) -> windows_core::HRESULT {
9798 unsafe {
9799 let this: &Identity =
9800 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9801 ICoreWebView2Controller2_Impl::SetDefaultBackgroundColor(
9802 this,
9803 core::mem::transmute(&value),
9804 )
9805 .into()
9806 }
9807 }
9808 Self {
9809 base__: ICoreWebView2Controller_Vtbl::new::<Identity, OFFSET>(),
9810 DefaultBackgroundColor: DefaultBackgroundColor::<Identity, OFFSET>,
9811 SetDefaultBackgroundColor: SetDefaultBackgroundColor::<Identity, OFFSET>,
9812 }
9813 }
9814 pub fn matches(iid: &windows_core::GUID) -> bool {
9815 iid == &<ICoreWebView2Controller2 as windows_core::Interface>::IID
9816 || iid == &<ICoreWebView2Controller as windows_core::Interface>::IID
9817 }
9818}
9819impl windows_core::RuntimeName for ICoreWebView2Controller2 {}
9820windows_core::imp::define_interface!(
9821 ICoreWebView2Controller3,
9822 ICoreWebView2Controller3_Vtbl,
9823 0xf9614724_5d2b_41dc_aef7_73d62b51543b
9824);
9825impl core::ops::Deref for ICoreWebView2Controller3 {
9826 type Target = ICoreWebView2Controller2;
9827 fn deref(&self) -> &Self::Target {
9828 unsafe { core::mem::transmute(self) }
9829 }
9830}
9831windows_core::imp::interface_hierarchy!(
9832 ICoreWebView2Controller3,
9833 windows_core::IUnknown,
9834 ICoreWebView2Controller,
9835 ICoreWebView2Controller2
9836);
9837impl ICoreWebView2Controller3 {
9838 pub unsafe fn RasterizationScale(&self, scale: *mut f64) -> windows_core::Result<()> {
9839 unsafe {
9840 (windows_core::Interface::vtable(self).RasterizationScale)(
9841 windows_core::Interface::as_raw(self),
9842 scale as _,
9843 )
9844 .ok()
9845 }
9846 }
9847 pub unsafe fn SetRasterizationScale(&self, scale: f64) -> windows_core::Result<()> {
9848 unsafe {
9849 (windows_core::Interface::vtable(self).SetRasterizationScale)(
9850 windows_core::Interface::as_raw(self),
9851 scale,
9852 )
9853 .ok()
9854 }
9855 }
9856 pub unsafe fn ShouldDetectMonitorScaleChanges(
9857 &self,
9858 value: *mut windows_core::BOOL,
9859 ) -> windows_core::Result<()> {
9860 unsafe {
9861 (windows_core::Interface::vtable(self).ShouldDetectMonitorScaleChanges)(
9862 windows_core::Interface::as_raw(self),
9863 value as _,
9864 )
9865 .ok()
9866 }
9867 }
9868 pub unsafe fn SetShouldDetectMonitorScaleChanges(
9869 &self,
9870 value: bool,
9871 ) -> windows_core::Result<()> {
9872 unsafe {
9873 (windows_core::Interface::vtable(self).SetShouldDetectMonitorScaleChanges)(
9874 windows_core::Interface::as_raw(self),
9875 value.into(),
9876 )
9877 .ok()
9878 }
9879 }
9880 pub unsafe fn add_RasterizationScaleChanged<P0>(
9881 &self,
9882 eventhandler: P0,
9883 token: *mut i64,
9884 ) -> windows_core::Result<()>
9885 where
9886 P0: windows_core::Param<ICoreWebView2RasterizationScaleChangedEventHandler>,
9887 {
9888 unsafe {
9889 (windows_core::Interface::vtable(self).add_RasterizationScaleChanged)(
9890 windows_core::Interface::as_raw(self),
9891 eventhandler.param().abi(),
9892 token as _,
9893 )
9894 .ok()
9895 }
9896 }
9897 pub unsafe fn remove_RasterizationScaleChanged(&self, token: i64) -> windows_core::Result<()> {
9898 unsafe {
9899 (windows_core::Interface::vtable(self).remove_RasterizationScaleChanged)(
9900 windows_core::Interface::as_raw(self),
9901 token,
9902 )
9903 .ok()
9904 }
9905 }
9906 pub unsafe fn BoundsMode(
9907 &self,
9908 boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
9909 ) -> windows_core::Result<()> {
9910 unsafe {
9911 (windows_core::Interface::vtable(self).BoundsMode)(
9912 windows_core::Interface::as_raw(self),
9913 boundsmode as _,
9914 )
9915 .ok()
9916 }
9917 }
9918 pub unsafe fn SetBoundsMode(
9919 &self,
9920 boundsmode: COREWEBVIEW2_BOUNDS_MODE,
9921 ) -> windows_core::Result<()> {
9922 unsafe {
9923 (windows_core::Interface::vtable(self).SetBoundsMode)(
9924 windows_core::Interface::as_raw(self),
9925 boundsmode,
9926 )
9927 .ok()
9928 }
9929 }
9930}
9931#[repr(C)]
9932pub struct ICoreWebView2Controller3_Vtbl {
9933 pub base__: ICoreWebView2Controller2_Vtbl,
9934 pub RasterizationScale:
9935 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
9936 pub SetRasterizationScale:
9937 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
9938 pub ShouldDetectMonitorScaleChanges: unsafe extern "system" fn(
9939 *mut core::ffi::c_void,
9940 *mut windows_core::BOOL,
9941 ) -> windows_core::HRESULT,
9942 pub SetShouldDetectMonitorScaleChanges: unsafe extern "system" fn(
9943 *mut core::ffi::c_void,
9944 windows_core::BOOL,
9945 ) -> windows_core::HRESULT,
9946 pub add_RasterizationScaleChanged: unsafe extern "system" fn(
9947 *mut core::ffi::c_void,
9948 *mut core::ffi::c_void,
9949 *mut i64,
9950 ) -> windows_core::HRESULT,
9951 pub remove_RasterizationScaleChanged:
9952 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
9953 pub BoundsMode: unsafe extern "system" fn(
9954 *mut core::ffi::c_void,
9955 *mut COREWEBVIEW2_BOUNDS_MODE,
9956 ) -> windows_core::HRESULT,
9957 pub SetBoundsMode: unsafe extern "system" fn(
9958 *mut core::ffi::c_void,
9959 COREWEBVIEW2_BOUNDS_MODE,
9960 ) -> windows_core::HRESULT,
9961}
9962pub trait ICoreWebView2Controller3_Impl: ICoreWebView2Controller2_Impl {
9963 fn RasterizationScale(&self, scale: *mut f64) -> windows_core::Result<()>;
9964 fn SetRasterizationScale(&self, scale: f64) -> windows_core::Result<()>;
9965 fn ShouldDetectMonitorScaleChanges(
9966 &self,
9967 value: *mut windows_core::BOOL,
9968 ) -> windows_core::Result<()>;
9969 fn SetShouldDetectMonitorScaleChanges(
9970 &self,
9971 value: windows_core::BOOL,
9972 ) -> windows_core::Result<()>;
9973 fn add_RasterizationScaleChanged(
9974 &self,
9975 eventhandler: windows_core::Ref<'_, ICoreWebView2RasterizationScaleChangedEventHandler>,
9976 token: *mut i64,
9977 ) -> windows_core::Result<()>;
9978 fn remove_RasterizationScaleChanged(&self, token: i64) -> windows_core::Result<()>;
9979 fn BoundsMode(&self, boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE) -> windows_core::Result<()>;
9980 fn SetBoundsMode(&self, boundsmode: COREWEBVIEW2_BOUNDS_MODE) -> windows_core::Result<()>;
9981}
9982impl ICoreWebView2Controller3_Vtbl {
9983 pub const fn new<Identity: ICoreWebView2Controller3_Impl, const OFFSET: isize>() -> Self {
9984 unsafe extern "system" fn RasterizationScale<
9985 Identity: ICoreWebView2Controller3_Impl,
9986 const OFFSET: isize,
9987 >(
9988 this: *mut core::ffi::c_void,
9989 scale: *mut f64,
9990 ) -> windows_core::HRESULT {
9991 unsafe {
9992 let this: &Identity =
9993 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
9994 ICoreWebView2Controller3_Impl::RasterizationScale(
9995 this,
9996 core::mem::transmute_copy(&scale),
9997 )
9998 .into()
9999 }
10000 }
10001 unsafe extern "system" fn SetRasterizationScale<
10002 Identity: ICoreWebView2Controller3_Impl,
10003 const OFFSET: isize,
10004 >(
10005 this: *mut core::ffi::c_void,
10006 scale: f64,
10007 ) -> windows_core::HRESULT {
10008 unsafe {
10009 let this: &Identity =
10010 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10011 ICoreWebView2Controller3_Impl::SetRasterizationScale(
10012 this,
10013 core::mem::transmute_copy(&scale),
10014 )
10015 .into()
10016 }
10017 }
10018 unsafe extern "system" fn ShouldDetectMonitorScaleChanges<
10019 Identity: ICoreWebView2Controller3_Impl,
10020 const OFFSET: isize,
10021 >(
10022 this: *mut core::ffi::c_void,
10023 value: *mut windows_core::BOOL,
10024 ) -> windows_core::HRESULT {
10025 unsafe {
10026 let this: &Identity =
10027 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10028 ICoreWebView2Controller3_Impl::ShouldDetectMonitorScaleChanges(
10029 this,
10030 core::mem::transmute_copy(&value),
10031 )
10032 .into()
10033 }
10034 }
10035 unsafe extern "system" fn SetShouldDetectMonitorScaleChanges<
10036 Identity: ICoreWebView2Controller3_Impl,
10037 const OFFSET: isize,
10038 >(
10039 this: *mut core::ffi::c_void,
10040 value: windows_core::BOOL,
10041 ) -> windows_core::HRESULT {
10042 unsafe {
10043 let this: &Identity =
10044 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10045 ICoreWebView2Controller3_Impl::SetShouldDetectMonitorScaleChanges(
10046 this,
10047 core::mem::transmute_copy(&value),
10048 )
10049 .into()
10050 }
10051 }
10052 unsafe extern "system" fn add_RasterizationScaleChanged<
10053 Identity: ICoreWebView2Controller3_Impl,
10054 const OFFSET: isize,
10055 >(
10056 this: *mut core::ffi::c_void,
10057 eventhandler: *mut core::ffi::c_void,
10058 token: *mut i64,
10059 ) -> windows_core::HRESULT {
10060 unsafe {
10061 let this: &Identity =
10062 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10063 ICoreWebView2Controller3_Impl::add_RasterizationScaleChanged(
10064 this,
10065 core::mem::transmute_copy(&eventhandler),
10066 core::mem::transmute_copy(&token),
10067 )
10068 .into()
10069 }
10070 }
10071 unsafe extern "system" fn remove_RasterizationScaleChanged<
10072 Identity: ICoreWebView2Controller3_Impl,
10073 const OFFSET: isize,
10074 >(
10075 this: *mut core::ffi::c_void,
10076 token: i64,
10077 ) -> windows_core::HRESULT {
10078 unsafe {
10079 let this: &Identity =
10080 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10081 ICoreWebView2Controller3_Impl::remove_RasterizationScaleChanged(
10082 this,
10083 core::mem::transmute_copy(&token),
10084 )
10085 .into()
10086 }
10087 }
10088 unsafe extern "system" fn BoundsMode<
10089 Identity: ICoreWebView2Controller3_Impl,
10090 const OFFSET: isize,
10091 >(
10092 this: *mut core::ffi::c_void,
10093 boundsmode: *mut COREWEBVIEW2_BOUNDS_MODE,
10094 ) -> windows_core::HRESULT {
10095 unsafe {
10096 let this: &Identity =
10097 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10098 ICoreWebView2Controller3_Impl::BoundsMode(
10099 this,
10100 core::mem::transmute_copy(&boundsmode),
10101 )
10102 .into()
10103 }
10104 }
10105 unsafe extern "system" fn SetBoundsMode<
10106 Identity: ICoreWebView2Controller3_Impl,
10107 const OFFSET: isize,
10108 >(
10109 this: *mut core::ffi::c_void,
10110 boundsmode: COREWEBVIEW2_BOUNDS_MODE,
10111 ) -> windows_core::HRESULT {
10112 unsafe {
10113 let this: &Identity =
10114 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10115 ICoreWebView2Controller3_Impl::SetBoundsMode(
10116 this,
10117 core::mem::transmute_copy(&boundsmode),
10118 )
10119 .into()
10120 }
10121 }
10122 Self {
10123 base__: ICoreWebView2Controller2_Vtbl::new::<Identity, OFFSET>(),
10124 RasterizationScale: RasterizationScale::<Identity, OFFSET>,
10125 SetRasterizationScale: SetRasterizationScale::<Identity, OFFSET>,
10126 ShouldDetectMonitorScaleChanges: ShouldDetectMonitorScaleChanges::<Identity, OFFSET>,
10127 SetShouldDetectMonitorScaleChanges: SetShouldDetectMonitorScaleChanges::<
10128 Identity,
10129 OFFSET,
10130 >,
10131 add_RasterizationScaleChanged: add_RasterizationScaleChanged::<Identity, OFFSET>,
10132 remove_RasterizationScaleChanged: remove_RasterizationScaleChanged::<Identity, OFFSET>,
10133 BoundsMode: BoundsMode::<Identity, OFFSET>,
10134 SetBoundsMode: SetBoundsMode::<Identity, OFFSET>,
10135 }
10136 }
10137 pub fn matches(iid: &windows_core::GUID) -> bool {
10138 iid == &<ICoreWebView2Controller3 as windows_core::Interface>::IID
10139 || iid == &<ICoreWebView2Controller as windows_core::Interface>::IID
10140 || iid == &<ICoreWebView2Controller2 as windows_core::Interface>::IID
10141 }
10142}
10143impl windows_core::RuntimeName for ICoreWebView2Controller3 {}
10144windows_core::imp::define_interface!(
10145 ICoreWebView2Controller4,
10146 ICoreWebView2Controller4_Vtbl,
10147 0x97d418d5_a426_4e49_a151_e1a10f327d9e
10148);
10149impl core::ops::Deref for ICoreWebView2Controller4 {
10150 type Target = ICoreWebView2Controller3;
10151 fn deref(&self) -> &Self::Target {
10152 unsafe { core::mem::transmute(self) }
10153 }
10154}
10155windows_core::imp::interface_hierarchy!(
10156 ICoreWebView2Controller4,
10157 windows_core::IUnknown,
10158 ICoreWebView2Controller,
10159 ICoreWebView2Controller2,
10160 ICoreWebView2Controller3
10161);
10162impl ICoreWebView2Controller4 {
10163 pub unsafe fn AllowExternalDrop(
10164 &self,
10165 value: *mut windows_core::BOOL,
10166 ) -> windows_core::Result<()> {
10167 unsafe {
10168 (windows_core::Interface::vtable(self).AllowExternalDrop)(
10169 windows_core::Interface::as_raw(self),
10170 value as _,
10171 )
10172 .ok()
10173 }
10174 }
10175 pub unsafe fn SetAllowExternalDrop(&self, value: bool) -> windows_core::Result<()> {
10176 unsafe {
10177 (windows_core::Interface::vtable(self).SetAllowExternalDrop)(
10178 windows_core::Interface::as_raw(self),
10179 value.into(),
10180 )
10181 .ok()
10182 }
10183 }
10184}
10185#[repr(C)]
10186pub struct ICoreWebView2Controller4_Vtbl {
10187 pub base__: ICoreWebView2Controller3_Vtbl,
10188 pub AllowExternalDrop: unsafe extern "system" fn(
10189 *mut core::ffi::c_void,
10190 *mut windows_core::BOOL,
10191 ) -> windows_core::HRESULT,
10192 pub SetAllowExternalDrop: unsafe extern "system" fn(
10193 *mut core::ffi::c_void,
10194 windows_core::BOOL,
10195 ) -> windows_core::HRESULT,
10196}
10197pub trait ICoreWebView2Controller4_Impl: ICoreWebView2Controller3_Impl {
10198 fn AllowExternalDrop(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
10199 fn SetAllowExternalDrop(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
10200}
10201impl ICoreWebView2Controller4_Vtbl {
10202 pub const fn new<Identity: ICoreWebView2Controller4_Impl, const OFFSET: isize>() -> Self {
10203 unsafe extern "system" fn AllowExternalDrop<
10204 Identity: ICoreWebView2Controller4_Impl,
10205 const OFFSET: isize,
10206 >(
10207 this: *mut core::ffi::c_void,
10208 value: *mut windows_core::BOOL,
10209 ) -> windows_core::HRESULT {
10210 unsafe {
10211 let this: &Identity =
10212 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10213 ICoreWebView2Controller4_Impl::AllowExternalDrop(
10214 this,
10215 core::mem::transmute_copy(&value),
10216 )
10217 .into()
10218 }
10219 }
10220 unsafe extern "system" fn SetAllowExternalDrop<
10221 Identity: ICoreWebView2Controller4_Impl,
10222 const OFFSET: isize,
10223 >(
10224 this: *mut core::ffi::c_void,
10225 value: windows_core::BOOL,
10226 ) -> windows_core::HRESULT {
10227 unsafe {
10228 let this: &Identity =
10229 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10230 ICoreWebView2Controller4_Impl::SetAllowExternalDrop(
10231 this,
10232 core::mem::transmute_copy(&value),
10233 )
10234 .into()
10235 }
10236 }
10237 Self {
10238 base__: ICoreWebView2Controller3_Vtbl::new::<Identity, OFFSET>(),
10239 AllowExternalDrop: AllowExternalDrop::<Identity, OFFSET>,
10240 SetAllowExternalDrop: SetAllowExternalDrop::<Identity, OFFSET>,
10241 }
10242 }
10243 pub fn matches(iid: &windows_core::GUID) -> bool {
10244 iid == &<ICoreWebView2Controller4 as windows_core::Interface>::IID
10245 || iid == &<ICoreWebView2Controller as windows_core::Interface>::IID
10246 || iid == &<ICoreWebView2Controller2 as windows_core::Interface>::IID
10247 || iid == &<ICoreWebView2Controller3 as windows_core::Interface>::IID
10248 }
10249}
10250impl windows_core::RuntimeName for ICoreWebView2Controller4 {}
10251windows_core::imp::define_interface!(
10252 ICoreWebView2ControllerOptions,
10253 ICoreWebView2ControllerOptions_Vtbl,
10254 0x12aae616_8ccb_44ec_bcb3_eb1831881635
10255);
10256windows_core::imp::interface_hierarchy!(ICoreWebView2ControllerOptions, windows_core::IUnknown);
10257impl ICoreWebView2ControllerOptions {
10258 pub unsafe fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
10259 unsafe {
10260 (windows_core::Interface::vtable(self).ProfileName)(
10261 windows_core::Interface::as_raw(self),
10262 value as _,
10263 )
10264 .ok()
10265 }
10266 }
10267 pub unsafe fn SetProfileName<P0>(&self, value: P0) -> windows_core::Result<()>
10268 where
10269 P0: windows_core::Param<windows_core::PCWSTR>,
10270 {
10271 unsafe {
10272 (windows_core::Interface::vtable(self).SetProfileName)(
10273 windows_core::Interface::as_raw(self),
10274 value.param().abi(),
10275 )
10276 .ok()
10277 }
10278 }
10279 pub unsafe fn IsInPrivateModeEnabled(
10280 &self,
10281 value: *mut windows_core::BOOL,
10282 ) -> windows_core::Result<()> {
10283 unsafe {
10284 (windows_core::Interface::vtable(self).IsInPrivateModeEnabled)(
10285 windows_core::Interface::as_raw(self),
10286 value as _,
10287 )
10288 .ok()
10289 }
10290 }
10291 pub unsafe fn SetIsInPrivateModeEnabled(&self, value: bool) -> windows_core::Result<()> {
10292 unsafe {
10293 (windows_core::Interface::vtable(self).SetIsInPrivateModeEnabled)(
10294 windows_core::Interface::as_raw(self),
10295 value.into(),
10296 )
10297 .ok()
10298 }
10299 }
10300}
10301#[repr(C)]
10302pub struct ICoreWebView2ControllerOptions_Vtbl {
10303 pub base__: windows_core::IUnknown_Vtbl,
10304 pub ProfileName: unsafe extern "system" fn(
10305 *mut core::ffi::c_void,
10306 *mut windows_core::PWSTR,
10307 ) -> windows_core::HRESULT,
10308 pub SetProfileName: unsafe extern "system" fn(
10309 *mut core::ffi::c_void,
10310 windows_core::PCWSTR,
10311 ) -> windows_core::HRESULT,
10312 pub IsInPrivateModeEnabled: unsafe extern "system" fn(
10313 *mut core::ffi::c_void,
10314 *mut windows_core::BOOL,
10315 ) -> windows_core::HRESULT,
10316 pub SetIsInPrivateModeEnabled: unsafe extern "system" fn(
10317 *mut core::ffi::c_void,
10318 windows_core::BOOL,
10319 ) -> windows_core::HRESULT,
10320}
10321pub trait ICoreWebView2ControllerOptions_Impl: windows_core::IUnknownImpl {
10322 fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
10323 fn SetProfileName(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
10324 fn IsInPrivateModeEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
10325 fn SetIsInPrivateModeEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
10326}
10327impl ICoreWebView2ControllerOptions_Vtbl {
10328 pub const fn new<Identity: ICoreWebView2ControllerOptions_Impl, const OFFSET: isize>() -> Self {
10329 unsafe extern "system" fn ProfileName<
10330 Identity: ICoreWebView2ControllerOptions_Impl,
10331 const OFFSET: isize,
10332 >(
10333 this: *mut core::ffi::c_void,
10334 value: *mut windows_core::PWSTR,
10335 ) -> windows_core::HRESULT {
10336 unsafe {
10337 let this: &Identity =
10338 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10339 ICoreWebView2ControllerOptions_Impl::ProfileName(
10340 this,
10341 core::mem::transmute_copy(&value),
10342 )
10343 .into()
10344 }
10345 }
10346 unsafe extern "system" fn SetProfileName<
10347 Identity: ICoreWebView2ControllerOptions_Impl,
10348 const OFFSET: isize,
10349 >(
10350 this: *mut core::ffi::c_void,
10351 value: windows_core::PCWSTR,
10352 ) -> windows_core::HRESULT {
10353 unsafe {
10354 let this: &Identity =
10355 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10356 ICoreWebView2ControllerOptions_Impl::SetProfileName(
10357 this,
10358 core::mem::transmute(&value),
10359 )
10360 .into()
10361 }
10362 }
10363 unsafe extern "system" fn IsInPrivateModeEnabled<
10364 Identity: ICoreWebView2ControllerOptions_Impl,
10365 const OFFSET: isize,
10366 >(
10367 this: *mut core::ffi::c_void,
10368 value: *mut windows_core::BOOL,
10369 ) -> windows_core::HRESULT {
10370 unsafe {
10371 let this: &Identity =
10372 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10373 ICoreWebView2ControllerOptions_Impl::IsInPrivateModeEnabled(
10374 this,
10375 core::mem::transmute_copy(&value),
10376 )
10377 .into()
10378 }
10379 }
10380 unsafe extern "system" fn SetIsInPrivateModeEnabled<
10381 Identity: ICoreWebView2ControllerOptions_Impl,
10382 const OFFSET: isize,
10383 >(
10384 this: *mut core::ffi::c_void,
10385 value: windows_core::BOOL,
10386 ) -> windows_core::HRESULT {
10387 unsafe {
10388 let this: &Identity =
10389 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10390 ICoreWebView2ControllerOptions_Impl::SetIsInPrivateModeEnabled(
10391 this,
10392 core::mem::transmute_copy(&value),
10393 )
10394 .into()
10395 }
10396 }
10397 Self {
10398 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
10399 ProfileName: ProfileName::<Identity, OFFSET>,
10400 SetProfileName: SetProfileName::<Identity, OFFSET>,
10401 IsInPrivateModeEnabled: IsInPrivateModeEnabled::<Identity, OFFSET>,
10402 SetIsInPrivateModeEnabled: SetIsInPrivateModeEnabled::<Identity, OFFSET>,
10403 }
10404 }
10405 pub fn matches(iid: &windows_core::GUID) -> bool {
10406 iid == &<ICoreWebView2ControllerOptions as windows_core::Interface>::IID
10407 }
10408}
10409impl windows_core::RuntimeName for ICoreWebView2ControllerOptions {}
10410windows_core::imp::define_interface!(
10411 ICoreWebView2ControllerOptions2,
10412 ICoreWebView2ControllerOptions2_Vtbl,
10413 0x06c991d8_9e7e_11ed_a8fc_0242ac120002
10414);
10415impl core::ops::Deref for ICoreWebView2ControllerOptions2 {
10416 type Target = ICoreWebView2ControllerOptions;
10417 fn deref(&self) -> &Self::Target {
10418 unsafe { core::mem::transmute(self) }
10419 }
10420}
10421windows_core::imp::interface_hierarchy!(
10422 ICoreWebView2ControllerOptions2,
10423 windows_core::IUnknown,
10424 ICoreWebView2ControllerOptions
10425);
10426impl ICoreWebView2ControllerOptions2 {
10427 pub unsafe fn ScriptLocale(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
10428 unsafe {
10429 (windows_core::Interface::vtable(self).ScriptLocale)(
10430 windows_core::Interface::as_raw(self),
10431 value as _,
10432 )
10433 .ok()
10434 }
10435 }
10436 pub unsafe fn SetScriptLocale<P0>(&self, value: P0) -> windows_core::Result<()>
10437 where
10438 P0: windows_core::Param<windows_core::PCWSTR>,
10439 {
10440 unsafe {
10441 (windows_core::Interface::vtable(self).SetScriptLocale)(
10442 windows_core::Interface::as_raw(self),
10443 value.param().abi(),
10444 )
10445 .ok()
10446 }
10447 }
10448}
10449#[repr(C)]
10450pub struct ICoreWebView2ControllerOptions2_Vtbl {
10451 pub base__: ICoreWebView2ControllerOptions_Vtbl,
10452 pub ScriptLocale: unsafe extern "system" fn(
10453 *mut core::ffi::c_void,
10454 *mut windows_core::PWSTR,
10455 ) -> windows_core::HRESULT,
10456 pub SetScriptLocale: unsafe extern "system" fn(
10457 *mut core::ffi::c_void,
10458 windows_core::PCWSTR,
10459 ) -> windows_core::HRESULT,
10460}
10461pub trait ICoreWebView2ControllerOptions2_Impl: ICoreWebView2ControllerOptions_Impl {
10462 fn ScriptLocale(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
10463 fn SetScriptLocale(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
10464}
10465impl ICoreWebView2ControllerOptions2_Vtbl {
10466 pub const fn new<Identity: ICoreWebView2ControllerOptions2_Impl, const OFFSET: isize>() -> Self
10467 {
10468 unsafe extern "system" fn ScriptLocale<
10469 Identity: ICoreWebView2ControllerOptions2_Impl,
10470 const OFFSET: isize,
10471 >(
10472 this: *mut core::ffi::c_void,
10473 value: *mut windows_core::PWSTR,
10474 ) -> windows_core::HRESULT {
10475 unsafe {
10476 let this: &Identity =
10477 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10478 ICoreWebView2ControllerOptions2_Impl::ScriptLocale(
10479 this,
10480 core::mem::transmute_copy(&value),
10481 )
10482 .into()
10483 }
10484 }
10485 unsafe extern "system" fn SetScriptLocale<
10486 Identity: ICoreWebView2ControllerOptions2_Impl,
10487 const OFFSET: isize,
10488 >(
10489 this: *mut core::ffi::c_void,
10490 value: windows_core::PCWSTR,
10491 ) -> windows_core::HRESULT {
10492 unsafe {
10493 let this: &Identity =
10494 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10495 ICoreWebView2ControllerOptions2_Impl::SetScriptLocale(
10496 this,
10497 core::mem::transmute(&value),
10498 )
10499 .into()
10500 }
10501 }
10502 Self {
10503 base__: ICoreWebView2ControllerOptions_Vtbl::new::<Identity, OFFSET>(),
10504 ScriptLocale: ScriptLocale::<Identity, OFFSET>,
10505 SetScriptLocale: SetScriptLocale::<Identity, OFFSET>,
10506 }
10507 }
10508 pub fn matches(iid: &windows_core::GUID) -> bool {
10509 iid == &<ICoreWebView2ControllerOptions2 as windows_core::Interface>::IID
10510 || iid == &<ICoreWebView2ControllerOptions as windows_core::Interface>::IID
10511 }
10512}
10513impl windows_core::RuntimeName for ICoreWebView2ControllerOptions2 {}
10514windows_core::imp::define_interface!(
10515 ICoreWebView2Cookie,
10516 ICoreWebView2Cookie_Vtbl,
10517 0xad26d6be_1486_43e6_bf87_a2034006ca21
10518);
10519windows_core::imp::interface_hierarchy!(ICoreWebView2Cookie, windows_core::IUnknown);
10520impl ICoreWebView2Cookie {
10521 pub unsafe fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()> {
10522 unsafe {
10523 (windows_core::Interface::vtable(self).Name)(
10524 windows_core::Interface::as_raw(self),
10525 name as _,
10526 )
10527 .ok()
10528 }
10529 }
10530 pub unsafe fn Value(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
10531 unsafe {
10532 (windows_core::Interface::vtable(self).Value)(
10533 windows_core::Interface::as_raw(self),
10534 value as _,
10535 )
10536 .ok()
10537 }
10538 }
10539 pub unsafe fn SetValue<P0>(&self, value: P0) -> windows_core::Result<()>
10540 where
10541 P0: windows_core::Param<windows_core::PCWSTR>,
10542 {
10543 unsafe {
10544 (windows_core::Interface::vtable(self).SetValue)(
10545 windows_core::Interface::as_raw(self),
10546 value.param().abi(),
10547 )
10548 .ok()
10549 }
10550 }
10551 pub unsafe fn Domain(&self, domain: *mut windows_core::PWSTR) -> windows_core::Result<()> {
10552 unsafe {
10553 (windows_core::Interface::vtable(self).Domain)(
10554 windows_core::Interface::as_raw(self),
10555 domain as _,
10556 )
10557 .ok()
10558 }
10559 }
10560 pub unsafe fn Path(&self, path: *mut windows_core::PWSTR) -> windows_core::Result<()> {
10561 unsafe {
10562 (windows_core::Interface::vtable(self).Path)(
10563 windows_core::Interface::as_raw(self),
10564 path as _,
10565 )
10566 .ok()
10567 }
10568 }
10569 pub unsafe fn Expires(&self, expires: *mut f64) -> windows_core::Result<()> {
10570 unsafe {
10571 (windows_core::Interface::vtable(self).Expires)(
10572 windows_core::Interface::as_raw(self),
10573 expires as _,
10574 )
10575 .ok()
10576 }
10577 }
10578 pub unsafe fn SetExpires(&self, expires: f64) -> windows_core::Result<()> {
10579 unsafe {
10580 (windows_core::Interface::vtable(self).SetExpires)(
10581 windows_core::Interface::as_raw(self),
10582 expires,
10583 )
10584 .ok()
10585 }
10586 }
10587 pub unsafe fn IsHttpOnly(
10588 &self,
10589 ishttponly: *mut windows_core::BOOL,
10590 ) -> windows_core::Result<()> {
10591 unsafe {
10592 (windows_core::Interface::vtable(self).IsHttpOnly)(
10593 windows_core::Interface::as_raw(self),
10594 ishttponly as _,
10595 )
10596 .ok()
10597 }
10598 }
10599 pub unsafe fn SetIsHttpOnly(&self, ishttponly: bool) -> windows_core::Result<()> {
10600 unsafe {
10601 (windows_core::Interface::vtable(self).SetIsHttpOnly)(
10602 windows_core::Interface::as_raw(self),
10603 ishttponly.into(),
10604 )
10605 .ok()
10606 }
10607 }
10608 pub unsafe fn SameSite(
10609 &self,
10610 samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10611 ) -> windows_core::Result<()> {
10612 unsafe {
10613 (windows_core::Interface::vtable(self).SameSite)(
10614 windows_core::Interface::as_raw(self),
10615 samesite as _,
10616 )
10617 .ok()
10618 }
10619 }
10620 pub unsafe fn SetSameSite(
10621 &self,
10622 samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10623 ) -> windows_core::Result<()> {
10624 unsafe {
10625 (windows_core::Interface::vtable(self).SetSameSite)(
10626 windows_core::Interface::as_raw(self),
10627 samesite,
10628 )
10629 .ok()
10630 }
10631 }
10632 pub unsafe fn IsSecure(&self, issecure: *mut windows_core::BOOL) -> windows_core::Result<()> {
10633 unsafe {
10634 (windows_core::Interface::vtable(self).IsSecure)(
10635 windows_core::Interface::as_raw(self),
10636 issecure as _,
10637 )
10638 .ok()
10639 }
10640 }
10641 pub unsafe fn SetIsSecure(&self, issecure: bool) -> windows_core::Result<()> {
10642 unsafe {
10643 (windows_core::Interface::vtable(self).SetIsSecure)(
10644 windows_core::Interface::as_raw(self),
10645 issecure.into(),
10646 )
10647 .ok()
10648 }
10649 }
10650 pub unsafe fn IsSession(&self, issession: *mut windows_core::BOOL) -> windows_core::Result<()> {
10651 unsafe {
10652 (windows_core::Interface::vtable(self).IsSession)(
10653 windows_core::Interface::as_raw(self),
10654 issession as _,
10655 )
10656 .ok()
10657 }
10658 }
10659}
10660#[repr(C)]
10661pub struct ICoreWebView2Cookie_Vtbl {
10662 pub base__: windows_core::IUnknown_Vtbl,
10663 pub Name: unsafe extern "system" fn(
10664 *mut core::ffi::c_void,
10665 *mut windows_core::PWSTR,
10666 ) -> windows_core::HRESULT,
10667 pub Value: unsafe extern "system" fn(
10668 *mut core::ffi::c_void,
10669 *mut windows_core::PWSTR,
10670 ) -> windows_core::HRESULT,
10671 pub SetValue: unsafe extern "system" fn(
10672 *mut core::ffi::c_void,
10673 windows_core::PCWSTR,
10674 ) -> windows_core::HRESULT,
10675 pub Domain: unsafe extern "system" fn(
10676 *mut core::ffi::c_void,
10677 *mut windows_core::PWSTR,
10678 ) -> windows_core::HRESULT,
10679 pub Path: unsafe extern "system" fn(
10680 *mut core::ffi::c_void,
10681 *mut windows_core::PWSTR,
10682 ) -> windows_core::HRESULT,
10683 pub Expires:
10684 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
10685 pub SetExpires: unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
10686 pub IsHttpOnly: unsafe extern "system" fn(
10687 *mut core::ffi::c_void,
10688 *mut windows_core::BOOL,
10689 ) -> windows_core::HRESULT,
10690 pub SetIsHttpOnly: unsafe extern "system" fn(
10691 *mut core::ffi::c_void,
10692 windows_core::BOOL,
10693 ) -> windows_core::HRESULT,
10694 pub SameSite: unsafe extern "system" fn(
10695 *mut core::ffi::c_void,
10696 *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10697 ) -> windows_core::HRESULT,
10698 pub SetSameSite: unsafe extern "system" fn(
10699 *mut core::ffi::c_void,
10700 COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10701 ) -> windows_core::HRESULT,
10702 pub IsSecure: unsafe extern "system" fn(
10703 *mut core::ffi::c_void,
10704 *mut windows_core::BOOL,
10705 ) -> windows_core::HRESULT,
10706 pub SetIsSecure: unsafe extern "system" fn(
10707 *mut core::ffi::c_void,
10708 windows_core::BOOL,
10709 ) -> windows_core::HRESULT,
10710 pub IsSession: unsafe extern "system" fn(
10711 *mut core::ffi::c_void,
10712 *mut windows_core::BOOL,
10713 ) -> windows_core::HRESULT,
10714}
10715pub trait ICoreWebView2Cookie_Impl: windows_core::IUnknownImpl {
10716 fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()>;
10717 fn Value(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
10718 fn SetValue(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
10719 fn Domain(&self, domain: *mut windows_core::PWSTR) -> windows_core::Result<()>;
10720 fn Path(&self, path: *mut windows_core::PWSTR) -> windows_core::Result<()>;
10721 fn Expires(&self, expires: *mut f64) -> windows_core::Result<()>;
10722 fn SetExpires(&self, expires: f64) -> windows_core::Result<()>;
10723 fn IsHttpOnly(&self, ishttponly: *mut windows_core::BOOL) -> windows_core::Result<()>;
10724 fn SetIsHttpOnly(&self, ishttponly: windows_core::BOOL) -> windows_core::Result<()>;
10725 fn SameSite(
10726 &self,
10727 samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10728 ) -> windows_core::Result<()>;
10729 fn SetSameSite(&self, samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND)
10730 -> windows_core::Result<()>;
10731 fn IsSecure(&self, issecure: *mut windows_core::BOOL) -> windows_core::Result<()>;
10732 fn SetIsSecure(&self, issecure: windows_core::BOOL) -> windows_core::Result<()>;
10733 fn IsSession(&self, issession: *mut windows_core::BOOL) -> windows_core::Result<()>;
10734}
10735impl ICoreWebView2Cookie_Vtbl {
10736 pub const fn new<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>() -> Self {
10737 unsafe extern "system" fn Name<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>(
10738 this: *mut core::ffi::c_void,
10739 name: *mut windows_core::PWSTR,
10740 ) -> windows_core::HRESULT {
10741 unsafe {
10742 let this: &Identity =
10743 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10744 ICoreWebView2Cookie_Impl::Name(this, core::mem::transmute_copy(&name)).into()
10745 }
10746 }
10747 unsafe extern "system" fn Value<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>(
10748 this: *mut core::ffi::c_void,
10749 value: *mut windows_core::PWSTR,
10750 ) -> windows_core::HRESULT {
10751 unsafe {
10752 let this: &Identity =
10753 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10754 ICoreWebView2Cookie_Impl::Value(this, core::mem::transmute_copy(&value)).into()
10755 }
10756 }
10757 unsafe extern "system" fn SetValue<
10758 Identity: ICoreWebView2Cookie_Impl,
10759 const OFFSET: isize,
10760 >(
10761 this: *mut core::ffi::c_void,
10762 value: windows_core::PCWSTR,
10763 ) -> windows_core::HRESULT {
10764 unsafe {
10765 let this: &Identity =
10766 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10767 ICoreWebView2Cookie_Impl::SetValue(this, core::mem::transmute(&value)).into()
10768 }
10769 }
10770 unsafe extern "system" fn Domain<
10771 Identity: ICoreWebView2Cookie_Impl,
10772 const OFFSET: isize,
10773 >(
10774 this: *mut core::ffi::c_void,
10775 domain: *mut windows_core::PWSTR,
10776 ) -> windows_core::HRESULT {
10777 unsafe {
10778 let this: &Identity =
10779 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10780 ICoreWebView2Cookie_Impl::Domain(this, core::mem::transmute_copy(&domain)).into()
10781 }
10782 }
10783 unsafe extern "system" fn Path<Identity: ICoreWebView2Cookie_Impl, const OFFSET: isize>(
10784 this: *mut core::ffi::c_void,
10785 path: *mut windows_core::PWSTR,
10786 ) -> windows_core::HRESULT {
10787 unsafe {
10788 let this: &Identity =
10789 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10790 ICoreWebView2Cookie_Impl::Path(this, core::mem::transmute_copy(&path)).into()
10791 }
10792 }
10793 unsafe extern "system" fn Expires<
10794 Identity: ICoreWebView2Cookie_Impl,
10795 const OFFSET: isize,
10796 >(
10797 this: *mut core::ffi::c_void,
10798 expires: *mut f64,
10799 ) -> windows_core::HRESULT {
10800 unsafe {
10801 let this: &Identity =
10802 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10803 ICoreWebView2Cookie_Impl::Expires(this, core::mem::transmute_copy(&expires)).into()
10804 }
10805 }
10806 unsafe extern "system" fn SetExpires<
10807 Identity: ICoreWebView2Cookie_Impl,
10808 const OFFSET: isize,
10809 >(
10810 this: *mut core::ffi::c_void,
10811 expires: f64,
10812 ) -> windows_core::HRESULT {
10813 unsafe {
10814 let this: &Identity =
10815 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10816 ICoreWebView2Cookie_Impl::SetExpires(this, core::mem::transmute_copy(&expires))
10817 .into()
10818 }
10819 }
10820 unsafe extern "system" fn IsHttpOnly<
10821 Identity: ICoreWebView2Cookie_Impl,
10822 const OFFSET: isize,
10823 >(
10824 this: *mut core::ffi::c_void,
10825 ishttponly: *mut windows_core::BOOL,
10826 ) -> windows_core::HRESULT {
10827 unsafe {
10828 let this: &Identity =
10829 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10830 ICoreWebView2Cookie_Impl::IsHttpOnly(this, core::mem::transmute_copy(&ishttponly))
10831 .into()
10832 }
10833 }
10834 unsafe extern "system" fn SetIsHttpOnly<
10835 Identity: ICoreWebView2Cookie_Impl,
10836 const OFFSET: isize,
10837 >(
10838 this: *mut core::ffi::c_void,
10839 ishttponly: windows_core::BOOL,
10840 ) -> windows_core::HRESULT {
10841 unsafe {
10842 let this: &Identity =
10843 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10844 ICoreWebView2Cookie_Impl::SetIsHttpOnly(
10845 this,
10846 core::mem::transmute_copy(&ishttponly),
10847 )
10848 .into()
10849 }
10850 }
10851 unsafe extern "system" fn SameSite<
10852 Identity: ICoreWebView2Cookie_Impl,
10853 const OFFSET: isize,
10854 >(
10855 this: *mut core::ffi::c_void,
10856 samesite: *mut COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10857 ) -> windows_core::HRESULT {
10858 unsafe {
10859 let this: &Identity =
10860 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10861 ICoreWebView2Cookie_Impl::SameSite(this, core::mem::transmute_copy(&samesite))
10862 .into()
10863 }
10864 }
10865 unsafe extern "system" fn SetSameSite<
10866 Identity: ICoreWebView2Cookie_Impl,
10867 const OFFSET: isize,
10868 >(
10869 this: *mut core::ffi::c_void,
10870 samesite: COREWEBVIEW2_COOKIE_SAME_SITE_KIND,
10871 ) -> windows_core::HRESULT {
10872 unsafe {
10873 let this: &Identity =
10874 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10875 ICoreWebView2Cookie_Impl::SetSameSite(this, core::mem::transmute_copy(&samesite))
10876 .into()
10877 }
10878 }
10879 unsafe extern "system" fn IsSecure<
10880 Identity: ICoreWebView2Cookie_Impl,
10881 const OFFSET: isize,
10882 >(
10883 this: *mut core::ffi::c_void,
10884 issecure: *mut windows_core::BOOL,
10885 ) -> windows_core::HRESULT {
10886 unsafe {
10887 let this: &Identity =
10888 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10889 ICoreWebView2Cookie_Impl::IsSecure(this, core::mem::transmute_copy(&issecure))
10890 .into()
10891 }
10892 }
10893 unsafe extern "system" fn SetIsSecure<
10894 Identity: ICoreWebView2Cookie_Impl,
10895 const OFFSET: isize,
10896 >(
10897 this: *mut core::ffi::c_void,
10898 issecure: windows_core::BOOL,
10899 ) -> windows_core::HRESULT {
10900 unsafe {
10901 let this: &Identity =
10902 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10903 ICoreWebView2Cookie_Impl::SetIsSecure(this, core::mem::transmute_copy(&issecure))
10904 .into()
10905 }
10906 }
10907 unsafe extern "system" fn IsSession<
10908 Identity: ICoreWebView2Cookie_Impl,
10909 const OFFSET: isize,
10910 >(
10911 this: *mut core::ffi::c_void,
10912 issession: *mut windows_core::BOOL,
10913 ) -> windows_core::HRESULT {
10914 unsafe {
10915 let this: &Identity =
10916 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10917 ICoreWebView2Cookie_Impl::IsSession(this, core::mem::transmute_copy(&issession))
10918 .into()
10919 }
10920 }
10921 Self {
10922 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
10923 Name: Name::<Identity, OFFSET>,
10924 Value: Value::<Identity, OFFSET>,
10925 SetValue: SetValue::<Identity, OFFSET>,
10926 Domain: Domain::<Identity, OFFSET>,
10927 Path: Path::<Identity, OFFSET>,
10928 Expires: Expires::<Identity, OFFSET>,
10929 SetExpires: SetExpires::<Identity, OFFSET>,
10930 IsHttpOnly: IsHttpOnly::<Identity, OFFSET>,
10931 SetIsHttpOnly: SetIsHttpOnly::<Identity, OFFSET>,
10932 SameSite: SameSite::<Identity, OFFSET>,
10933 SetSameSite: SetSameSite::<Identity, OFFSET>,
10934 IsSecure: IsSecure::<Identity, OFFSET>,
10935 SetIsSecure: SetIsSecure::<Identity, OFFSET>,
10936 IsSession: IsSession::<Identity, OFFSET>,
10937 }
10938 }
10939 pub fn matches(iid: &windows_core::GUID) -> bool {
10940 iid == &<ICoreWebView2Cookie as windows_core::Interface>::IID
10941 }
10942}
10943impl windows_core::RuntimeName for ICoreWebView2Cookie {}
10944windows_core::imp::define_interface!(
10945 ICoreWebView2CookieList,
10946 ICoreWebView2CookieList_Vtbl,
10947 0xf7f6f714_5d2a_43c6_9503_346ece02d186
10948);
10949windows_core::imp::interface_hierarchy!(ICoreWebView2CookieList, windows_core::IUnknown);
10950impl ICoreWebView2CookieList {
10951 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
10952 unsafe {
10953 (windows_core::Interface::vtable(self).Count)(
10954 windows_core::Interface::as_raw(self),
10955 value as _,
10956 )
10957 .ok()
10958 }
10959 }
10960 pub unsafe fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2Cookie> {
10961 unsafe {
10962 let mut result__ = core::mem::zeroed();
10963 (windows_core::Interface::vtable(self).GetValueAtIndex)(
10964 windows_core::Interface::as_raw(self),
10965 index,
10966 &mut result__,
10967 )
10968 .and_then(|| windows_core::Type::from_abi(result__))
10969 }
10970 }
10971}
10972#[repr(C)]
10973pub struct ICoreWebView2CookieList_Vtbl {
10974 pub base__: windows_core::IUnknown_Vtbl,
10975 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
10976 pub GetValueAtIndex: unsafe extern "system" fn(
10977 *mut core::ffi::c_void,
10978 u32,
10979 *mut *mut core::ffi::c_void,
10980 ) -> windows_core::HRESULT,
10981}
10982pub trait ICoreWebView2CookieList_Impl: windows_core::IUnknownImpl {
10983 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
10984 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2Cookie>;
10985}
10986impl ICoreWebView2CookieList_Vtbl {
10987 pub const fn new<Identity: ICoreWebView2CookieList_Impl, const OFFSET: isize>() -> Self {
10988 unsafe extern "system" fn Count<
10989 Identity: ICoreWebView2CookieList_Impl,
10990 const OFFSET: isize,
10991 >(
10992 this: *mut core::ffi::c_void,
10993 value: *mut u32,
10994 ) -> windows_core::HRESULT {
10995 unsafe {
10996 let this: &Identity =
10997 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
10998 ICoreWebView2CookieList_Impl::Count(this, core::mem::transmute_copy(&value)).into()
10999 }
11000 }
11001 unsafe extern "system" fn GetValueAtIndex<
11002 Identity: ICoreWebView2CookieList_Impl,
11003 const OFFSET: isize,
11004 >(
11005 this: *mut core::ffi::c_void,
11006 index: u32,
11007 value: *mut *mut core::ffi::c_void,
11008 ) -> windows_core::HRESULT {
11009 unsafe {
11010 let this: &Identity =
11011 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11012 match ICoreWebView2CookieList_Impl::GetValueAtIndex(
11013 this,
11014 core::mem::transmute_copy(&index),
11015 ) {
11016 Ok(ok__) => {
11017 value.write(core::mem::transmute(ok__));
11018 windows_core::HRESULT(0)
11019 }
11020 Err(err) => err.into(),
11021 }
11022 }
11023 }
11024 Self {
11025 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11026 Count: Count::<Identity, OFFSET>,
11027 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
11028 }
11029 }
11030 pub fn matches(iid: &windows_core::GUID) -> bool {
11031 iid == &<ICoreWebView2CookieList as windows_core::Interface>::IID
11032 }
11033}
11034impl windows_core::RuntimeName for ICoreWebView2CookieList {}
11035windows_core::imp::define_interface!(
11036 ICoreWebView2CookieManager,
11037 ICoreWebView2CookieManager_Vtbl,
11038 0x177cd9e7_b6f5_451a_94a0_5d7a3a4c4141
11039);
11040windows_core::imp::interface_hierarchy!(ICoreWebView2CookieManager, windows_core::IUnknown);
11041impl ICoreWebView2CookieManager {
11042 pub unsafe fn CreateCookie<P0, P1, P2, P3>(
11043 &self,
11044 name: P0,
11045 value: P1,
11046 domain: P2,
11047 path: P3,
11048 ) -> windows_core::Result<ICoreWebView2Cookie>
11049 where
11050 P0: windows_core::Param<windows_core::PCWSTR>,
11051 P1: windows_core::Param<windows_core::PCWSTR>,
11052 P2: windows_core::Param<windows_core::PCWSTR>,
11053 P3: windows_core::Param<windows_core::PCWSTR>,
11054 {
11055 unsafe {
11056 let mut result__ = core::mem::zeroed();
11057 (windows_core::Interface::vtable(self).CreateCookie)(
11058 windows_core::Interface::as_raw(self),
11059 name.param().abi(),
11060 value.param().abi(),
11061 domain.param().abi(),
11062 path.param().abi(),
11063 &mut result__,
11064 )
11065 .and_then(|| windows_core::Type::from_abi(result__))
11066 }
11067 }
11068 pub unsafe fn CopyCookie<P0>(
11069 &self,
11070 cookieparam: P0,
11071 ) -> windows_core::Result<ICoreWebView2Cookie>
11072 where
11073 P0: windows_core::Param<ICoreWebView2Cookie>,
11074 {
11075 unsafe {
11076 let mut result__ = core::mem::zeroed();
11077 (windows_core::Interface::vtable(self).CopyCookie)(
11078 windows_core::Interface::as_raw(self),
11079 cookieparam.param().abi(),
11080 &mut result__,
11081 )
11082 .and_then(|| windows_core::Type::from_abi(result__))
11083 }
11084 }
11085 pub unsafe fn GetCookies<P0, P1>(&self, uri: P0, handler: P1) -> windows_core::Result<()>
11086 where
11087 P0: windows_core::Param<windows_core::PCWSTR>,
11088 P1: windows_core::Param<ICoreWebView2GetCookiesCompletedHandler>,
11089 {
11090 unsafe {
11091 (windows_core::Interface::vtable(self).GetCookies)(
11092 windows_core::Interface::as_raw(self),
11093 uri.param().abi(),
11094 handler.param().abi(),
11095 )
11096 .ok()
11097 }
11098 }
11099 pub unsafe fn AddOrUpdateCookie<P0>(&self, cookie: P0) -> windows_core::Result<()>
11100 where
11101 P0: windows_core::Param<ICoreWebView2Cookie>,
11102 {
11103 unsafe {
11104 (windows_core::Interface::vtable(self).AddOrUpdateCookie)(
11105 windows_core::Interface::as_raw(self),
11106 cookie.param().abi(),
11107 )
11108 .ok()
11109 }
11110 }
11111 pub unsafe fn DeleteCookie<P0>(&self, cookie: P0) -> windows_core::Result<()>
11112 where
11113 P0: windows_core::Param<ICoreWebView2Cookie>,
11114 {
11115 unsafe {
11116 (windows_core::Interface::vtable(self).DeleteCookie)(
11117 windows_core::Interface::as_raw(self),
11118 cookie.param().abi(),
11119 )
11120 .ok()
11121 }
11122 }
11123 pub unsafe fn DeleteCookies<P0, P1>(&self, name: P0, uri: P1) -> windows_core::Result<()>
11124 where
11125 P0: windows_core::Param<windows_core::PCWSTR>,
11126 P1: windows_core::Param<windows_core::PCWSTR>,
11127 {
11128 unsafe {
11129 (windows_core::Interface::vtable(self).DeleteCookies)(
11130 windows_core::Interface::as_raw(self),
11131 name.param().abi(),
11132 uri.param().abi(),
11133 )
11134 .ok()
11135 }
11136 }
11137 pub unsafe fn DeleteCookiesWithDomainAndPath<P0, P1, P2>(
11138 &self,
11139 name: P0,
11140 domain: P1,
11141 path: P2,
11142 ) -> windows_core::Result<()>
11143 where
11144 P0: windows_core::Param<windows_core::PCWSTR>,
11145 P1: windows_core::Param<windows_core::PCWSTR>,
11146 P2: windows_core::Param<windows_core::PCWSTR>,
11147 {
11148 unsafe {
11149 (windows_core::Interface::vtable(self).DeleteCookiesWithDomainAndPath)(
11150 windows_core::Interface::as_raw(self),
11151 name.param().abi(),
11152 domain.param().abi(),
11153 path.param().abi(),
11154 )
11155 .ok()
11156 }
11157 }
11158 pub unsafe fn DeleteAllCookies(&self) -> windows_core::Result<()> {
11159 unsafe {
11160 (windows_core::Interface::vtable(self).DeleteAllCookies)(
11161 windows_core::Interface::as_raw(self),
11162 )
11163 .ok()
11164 }
11165 }
11166}
11167#[repr(C)]
11168pub struct ICoreWebView2CookieManager_Vtbl {
11169 pub base__: windows_core::IUnknown_Vtbl,
11170 pub CreateCookie: unsafe extern "system" fn(
11171 *mut core::ffi::c_void,
11172 windows_core::PCWSTR,
11173 windows_core::PCWSTR,
11174 windows_core::PCWSTR,
11175 windows_core::PCWSTR,
11176 *mut *mut core::ffi::c_void,
11177 ) -> windows_core::HRESULT,
11178 pub CopyCookie: unsafe extern "system" fn(
11179 *mut core::ffi::c_void,
11180 *mut core::ffi::c_void,
11181 *mut *mut core::ffi::c_void,
11182 ) -> windows_core::HRESULT,
11183 pub GetCookies: unsafe extern "system" fn(
11184 *mut core::ffi::c_void,
11185 windows_core::PCWSTR,
11186 *mut core::ffi::c_void,
11187 ) -> windows_core::HRESULT,
11188 pub AddOrUpdateCookie: unsafe extern "system" fn(
11189 *mut core::ffi::c_void,
11190 *mut core::ffi::c_void,
11191 ) -> windows_core::HRESULT,
11192 pub DeleteCookie: unsafe extern "system" fn(
11193 *mut core::ffi::c_void,
11194 *mut core::ffi::c_void,
11195 ) -> windows_core::HRESULT,
11196 pub DeleteCookies: unsafe extern "system" fn(
11197 *mut core::ffi::c_void,
11198 windows_core::PCWSTR,
11199 windows_core::PCWSTR,
11200 ) -> windows_core::HRESULT,
11201 pub DeleteCookiesWithDomainAndPath: unsafe extern "system" fn(
11202 *mut core::ffi::c_void,
11203 windows_core::PCWSTR,
11204 windows_core::PCWSTR,
11205 windows_core::PCWSTR,
11206 ) -> windows_core::HRESULT,
11207 pub DeleteAllCookies:
11208 unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
11209}
11210pub trait ICoreWebView2CookieManager_Impl: windows_core::IUnknownImpl {
11211 fn CreateCookie(
11212 &self,
11213 name: &windows_core::PCWSTR,
11214 value: &windows_core::PCWSTR,
11215 domain: &windows_core::PCWSTR,
11216 path: &windows_core::PCWSTR,
11217 ) -> windows_core::Result<ICoreWebView2Cookie>;
11218 fn CopyCookie(
11219 &self,
11220 cookieparam: windows_core::Ref<'_, ICoreWebView2Cookie>,
11221 ) -> windows_core::Result<ICoreWebView2Cookie>;
11222 fn GetCookies(
11223 &self,
11224 uri: &windows_core::PCWSTR,
11225 handler: windows_core::Ref<'_, ICoreWebView2GetCookiesCompletedHandler>,
11226 ) -> windows_core::Result<()>;
11227 fn AddOrUpdateCookie(
11228 &self,
11229 cookie: windows_core::Ref<'_, ICoreWebView2Cookie>,
11230 ) -> windows_core::Result<()>;
11231 fn DeleteCookie(
11232 &self,
11233 cookie: windows_core::Ref<'_, ICoreWebView2Cookie>,
11234 ) -> windows_core::Result<()>;
11235 fn DeleteCookies(
11236 &self,
11237 name: &windows_core::PCWSTR,
11238 uri: &windows_core::PCWSTR,
11239 ) -> windows_core::Result<()>;
11240 fn DeleteCookiesWithDomainAndPath(
11241 &self,
11242 name: &windows_core::PCWSTR,
11243 domain: &windows_core::PCWSTR,
11244 path: &windows_core::PCWSTR,
11245 ) -> windows_core::Result<()>;
11246 fn DeleteAllCookies(&self) -> windows_core::Result<()>;
11247}
11248impl ICoreWebView2CookieManager_Vtbl {
11249 pub const fn new<Identity: ICoreWebView2CookieManager_Impl, const OFFSET: isize>() -> Self {
11250 unsafe extern "system" fn CreateCookie<
11251 Identity: ICoreWebView2CookieManager_Impl,
11252 const OFFSET: isize,
11253 >(
11254 this: *mut core::ffi::c_void,
11255 name: windows_core::PCWSTR,
11256 value: windows_core::PCWSTR,
11257 domain: windows_core::PCWSTR,
11258 path: windows_core::PCWSTR,
11259 cookie: *mut *mut core::ffi::c_void,
11260 ) -> windows_core::HRESULT {
11261 unsafe {
11262 let this: &Identity =
11263 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11264 match ICoreWebView2CookieManager_Impl::CreateCookie(
11265 this,
11266 core::mem::transmute(&name),
11267 core::mem::transmute(&value),
11268 core::mem::transmute(&domain),
11269 core::mem::transmute(&path),
11270 ) {
11271 Ok(ok__) => {
11272 cookie.write(core::mem::transmute(ok__));
11273 windows_core::HRESULT(0)
11274 }
11275 Err(err) => err.into(),
11276 }
11277 }
11278 }
11279 unsafe extern "system" fn CopyCookie<
11280 Identity: ICoreWebView2CookieManager_Impl,
11281 const OFFSET: isize,
11282 >(
11283 this: *mut core::ffi::c_void,
11284 cookieparam: *mut core::ffi::c_void,
11285 cookie: *mut *mut core::ffi::c_void,
11286 ) -> windows_core::HRESULT {
11287 unsafe {
11288 let this: &Identity =
11289 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11290 match ICoreWebView2CookieManager_Impl::CopyCookie(
11291 this,
11292 core::mem::transmute_copy(&cookieparam),
11293 ) {
11294 Ok(ok__) => {
11295 cookie.write(core::mem::transmute(ok__));
11296 windows_core::HRESULT(0)
11297 }
11298 Err(err) => err.into(),
11299 }
11300 }
11301 }
11302 unsafe extern "system" fn GetCookies<
11303 Identity: ICoreWebView2CookieManager_Impl,
11304 const OFFSET: isize,
11305 >(
11306 this: *mut core::ffi::c_void,
11307 uri: windows_core::PCWSTR,
11308 handler: *mut core::ffi::c_void,
11309 ) -> windows_core::HRESULT {
11310 unsafe {
11311 let this: &Identity =
11312 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11313 ICoreWebView2CookieManager_Impl::GetCookies(
11314 this,
11315 core::mem::transmute(&uri),
11316 core::mem::transmute_copy(&handler),
11317 )
11318 .into()
11319 }
11320 }
11321 unsafe extern "system" fn AddOrUpdateCookie<
11322 Identity: ICoreWebView2CookieManager_Impl,
11323 const OFFSET: isize,
11324 >(
11325 this: *mut core::ffi::c_void,
11326 cookie: *mut core::ffi::c_void,
11327 ) -> windows_core::HRESULT {
11328 unsafe {
11329 let this: &Identity =
11330 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11331 ICoreWebView2CookieManager_Impl::AddOrUpdateCookie(
11332 this,
11333 core::mem::transmute_copy(&cookie),
11334 )
11335 .into()
11336 }
11337 }
11338 unsafe extern "system" fn DeleteCookie<
11339 Identity: ICoreWebView2CookieManager_Impl,
11340 const OFFSET: isize,
11341 >(
11342 this: *mut core::ffi::c_void,
11343 cookie: *mut core::ffi::c_void,
11344 ) -> windows_core::HRESULT {
11345 unsafe {
11346 let this: &Identity =
11347 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11348 ICoreWebView2CookieManager_Impl::DeleteCookie(
11349 this,
11350 core::mem::transmute_copy(&cookie),
11351 )
11352 .into()
11353 }
11354 }
11355 unsafe extern "system" fn DeleteCookies<
11356 Identity: ICoreWebView2CookieManager_Impl,
11357 const OFFSET: isize,
11358 >(
11359 this: *mut core::ffi::c_void,
11360 name: windows_core::PCWSTR,
11361 uri: windows_core::PCWSTR,
11362 ) -> windows_core::HRESULT {
11363 unsafe {
11364 let this: &Identity =
11365 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11366 ICoreWebView2CookieManager_Impl::DeleteCookies(
11367 this,
11368 core::mem::transmute(&name),
11369 core::mem::transmute(&uri),
11370 )
11371 .into()
11372 }
11373 }
11374 unsafe extern "system" fn DeleteCookiesWithDomainAndPath<
11375 Identity: ICoreWebView2CookieManager_Impl,
11376 const OFFSET: isize,
11377 >(
11378 this: *mut core::ffi::c_void,
11379 name: windows_core::PCWSTR,
11380 domain: windows_core::PCWSTR,
11381 path: windows_core::PCWSTR,
11382 ) -> windows_core::HRESULT {
11383 unsafe {
11384 let this: &Identity =
11385 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11386 ICoreWebView2CookieManager_Impl::DeleteCookiesWithDomainAndPath(
11387 this,
11388 core::mem::transmute(&name),
11389 core::mem::transmute(&domain),
11390 core::mem::transmute(&path),
11391 )
11392 .into()
11393 }
11394 }
11395 unsafe extern "system" fn DeleteAllCookies<
11396 Identity: ICoreWebView2CookieManager_Impl,
11397 const OFFSET: isize,
11398 >(
11399 this: *mut core::ffi::c_void,
11400 ) -> windows_core::HRESULT {
11401 unsafe {
11402 let this: &Identity =
11403 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11404 ICoreWebView2CookieManager_Impl::DeleteAllCookies(this).into()
11405 }
11406 }
11407 Self {
11408 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11409 CreateCookie: CreateCookie::<Identity, OFFSET>,
11410 CopyCookie: CopyCookie::<Identity, OFFSET>,
11411 GetCookies: GetCookies::<Identity, OFFSET>,
11412 AddOrUpdateCookie: AddOrUpdateCookie::<Identity, OFFSET>,
11413 DeleteCookie: DeleteCookie::<Identity, OFFSET>,
11414 DeleteCookies: DeleteCookies::<Identity, OFFSET>,
11415 DeleteCookiesWithDomainAndPath: DeleteCookiesWithDomainAndPath::<Identity, OFFSET>,
11416 DeleteAllCookies: DeleteAllCookies::<Identity, OFFSET>,
11417 }
11418 }
11419 pub fn matches(iid: &windows_core::GUID) -> bool {
11420 iid == &<ICoreWebView2CookieManager as windows_core::Interface>::IID
11421 }
11422}
11423impl windows_core::RuntimeName for ICoreWebView2CookieManager {}
11424windows_core::imp::define_interface!(
11425 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
11426 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl,
11427 0x02fab84b_1428_4fb7_ad45_1b2e64736184
11428);
11429windows_core::imp::interface_hierarchy!(
11430 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
11431 windows_core::IUnknown
11432);
11433impl ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler {
11434 pub unsafe fn Invoke<P1>(
11435 &self,
11436 errorcode: windows_core::HRESULT,
11437 result: P1,
11438 ) -> windows_core::Result<()>
11439 where
11440 P1: windows_core::Param<ICoreWebView2CompositionController>,
11441 {
11442 unsafe {
11443 (windows_core::Interface::vtable(self).Invoke)(
11444 windows_core::Interface::as_raw(self),
11445 errorcode,
11446 result.param().abi(),
11447 )
11448 .ok()
11449 }
11450 }
11451}
11452#[repr(C)]
11453pub struct ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
11454 pub base__: windows_core::IUnknown_Vtbl,
11455 pub Invoke: unsafe extern "system" fn(
11456 *mut core::ffi::c_void,
11457 windows_core::HRESULT,
11458 *mut core::ffi::c_void,
11459 ) -> windows_core::HRESULT,
11460}
11461pub trait ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl:
11462 windows_core::IUnknownImpl
11463{
11464 fn Invoke(
11465 &self,
11466 errorcode: windows_core::HRESULT,
11467 result: windows_core::Ref<'_, ICoreWebView2CompositionController>,
11468 ) -> windows_core::Result<()>;
11469}
11470impl ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Vtbl {
11471 pub const fn new<
11472 Identity: ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl,
11473 const OFFSET: isize,
11474 >() -> Self {
11475 unsafe extern "system" fn Invoke<
11476 Identity: ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl,
11477 const OFFSET: isize,
11478 >(
11479 this: *mut core::ffi::c_void,
11480 errorcode: windows_core::HRESULT,
11481 result: *mut core::ffi::c_void,
11482 ) -> windows_core::HRESULT {
11483 unsafe {
11484 let this: &Identity =
11485 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11486 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler_Impl::Invoke(
11487 this,
11488 core::mem::transmute_copy(&errorcode),
11489 core::mem::transmute_copy(&result),
11490 )
11491 .into()
11492 }
11493 }
11494 Self {
11495 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11496 Invoke: Invoke::<Identity, OFFSET>,
11497 }
11498 }
11499 pub fn matches(iid: &windows_core::GUID) -> bool {
11500 iid == & < ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler as windows_core::Interface >::IID
11501 }
11502}
11503impl windows_core::RuntimeName
11504 for ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler
11505{
11506}
11507windows_core::imp::define_interface!(
11508 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
11509 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl,
11510 0x6c4819f3_c9b7_4260_8127_c9f5bde7f68c
11511);
11512windows_core::imp::interface_hierarchy!(
11513 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler,
11514 windows_core::IUnknown
11515);
11516impl ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {
11517 pub unsafe fn Invoke<P1>(
11518 &self,
11519 errorcode: windows_core::HRESULT,
11520 result: P1,
11521 ) -> windows_core::Result<()>
11522 where
11523 P1: windows_core::Param<ICoreWebView2Controller>,
11524 {
11525 unsafe {
11526 (windows_core::Interface::vtable(self).Invoke)(
11527 windows_core::Interface::as_raw(self),
11528 errorcode,
11529 result.param().abi(),
11530 )
11531 .ok()
11532 }
11533 }
11534}
11535#[repr(C)]
11536pub struct ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
11537 pub base__: windows_core::IUnknown_Vtbl,
11538 pub Invoke: unsafe extern "system" fn(
11539 *mut core::ffi::c_void,
11540 windows_core::HRESULT,
11541 *mut core::ffi::c_void,
11542 ) -> windows_core::HRESULT,
11543}
11544pub trait ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl:
11545 windows_core::IUnknownImpl
11546{
11547 fn Invoke(
11548 &self,
11549 errorcode: windows_core::HRESULT,
11550 result: windows_core::Ref<'_, ICoreWebView2Controller>,
11551 ) -> windows_core::Result<()>;
11552}
11553impl ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Vtbl {
11554 pub const fn new<
11555 Identity: ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl,
11556 const OFFSET: isize,
11557 >() -> Self {
11558 unsafe extern "system" fn Invoke<
11559 Identity: ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl,
11560 const OFFSET: isize,
11561 >(
11562 this: *mut core::ffi::c_void,
11563 errorcode: windows_core::HRESULT,
11564 result: *mut core::ffi::c_void,
11565 ) -> windows_core::HRESULT {
11566 unsafe {
11567 let this: &Identity =
11568 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11569 ICoreWebView2CreateCoreWebView2ControllerCompletedHandler_Impl::Invoke(
11570 this,
11571 core::mem::transmute_copy(&errorcode),
11572 core::mem::transmute_copy(&result),
11573 )
11574 .into()
11575 }
11576 }
11577 Self {
11578 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11579 Invoke: Invoke::<Identity, OFFSET>,
11580 }
11581 }
11582 pub fn matches(iid: &windows_core::GUID) -> bool {
11583 iid == & < ICoreWebView2CreateCoreWebView2ControllerCompletedHandler as windows_core::Interface >::IID
11584 }
11585}
11586impl windows_core::RuntimeName for ICoreWebView2CreateCoreWebView2ControllerCompletedHandler {}
11587windows_core::imp::define_interface!(
11588 ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
11589 ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl,
11590 0x4e8a3389_c9d8_4bd2_b6b5_124fee6cc14d
11591);
11592windows_core::imp::interface_hierarchy!(
11593 ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler,
11594 windows_core::IUnknown
11595);
11596impl ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {
11597 pub unsafe fn Invoke<P1>(
11598 &self,
11599 errorcode: windows_core::HRESULT,
11600 result: P1,
11601 ) -> windows_core::Result<()>
11602 where
11603 P1: windows_core::Param<ICoreWebView2Environment>,
11604 {
11605 unsafe {
11606 (windows_core::Interface::vtable(self).Invoke)(
11607 windows_core::Interface::as_raw(self),
11608 errorcode,
11609 result.param().abi(),
11610 )
11611 .ok()
11612 }
11613 }
11614}
11615#[repr(C)]
11616pub struct ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
11617 pub base__: windows_core::IUnknown_Vtbl,
11618 pub Invoke: unsafe extern "system" fn(
11619 *mut core::ffi::c_void,
11620 windows_core::HRESULT,
11621 *mut core::ffi::c_void,
11622 ) -> windows_core::HRESULT,
11623}
11624pub trait ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl:
11625 windows_core::IUnknownImpl
11626{
11627 fn Invoke(
11628 &self,
11629 errorcode: windows_core::HRESULT,
11630 result: windows_core::Ref<'_, ICoreWebView2Environment>,
11631 ) -> windows_core::Result<()>;
11632}
11633impl ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Vtbl {
11634 pub const fn new<
11635 Identity: ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl,
11636 const OFFSET: isize,
11637 >() -> Self {
11638 unsafe extern "system" fn Invoke<
11639 Identity: ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl,
11640 const OFFSET: isize,
11641 >(
11642 this: *mut core::ffi::c_void,
11643 errorcode: windows_core::HRESULT,
11644 result: *mut core::ffi::c_void,
11645 ) -> windows_core::HRESULT {
11646 unsafe {
11647 let this: &Identity =
11648 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11649 ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_Impl::Invoke(
11650 this,
11651 core::mem::transmute_copy(&errorcode),
11652 core::mem::transmute_copy(&result),
11653 )
11654 .into()
11655 }
11656 }
11657 Self {
11658 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11659 Invoke: Invoke::<Identity, OFFSET>,
11660 }
11661 }
11662 pub fn matches(iid: &windows_core::GUID) -> bool {
11663 iid == & < ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler as windows_core::Interface >::IID
11664 }
11665}
11666impl windows_core::RuntimeName for ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler {}
11667windows_core::imp::define_interface!(
11668 ICoreWebView2CursorChangedEventHandler,
11669 ICoreWebView2CursorChangedEventHandler_Vtbl,
11670 0x9da43ccc_26e1_4dad_b56c_d8961c94c571
11671);
11672windows_core::imp::interface_hierarchy!(
11673 ICoreWebView2CursorChangedEventHandler,
11674 windows_core::IUnknown
11675);
11676impl ICoreWebView2CursorChangedEventHandler {
11677 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
11678 where
11679 P0: windows_core::Param<ICoreWebView2CompositionController>,
11680 P1: windows_core::Param<windows_core::IUnknown>,
11681 {
11682 unsafe {
11683 (windows_core::Interface::vtable(self).Invoke)(
11684 windows_core::Interface::as_raw(self),
11685 sender.param().abi(),
11686 args.param().abi(),
11687 )
11688 .ok()
11689 }
11690 }
11691}
11692#[repr(C)]
11693pub struct ICoreWebView2CursorChangedEventHandler_Vtbl {
11694 pub base__: windows_core::IUnknown_Vtbl,
11695 pub Invoke: unsafe extern "system" fn(
11696 *mut core::ffi::c_void,
11697 *mut core::ffi::c_void,
11698 *mut core::ffi::c_void,
11699 ) -> windows_core::HRESULT,
11700}
11701pub trait ICoreWebView2CursorChangedEventHandler_Impl: windows_core::IUnknownImpl {
11702 fn Invoke(
11703 &self,
11704 sender: windows_core::Ref<'_, ICoreWebView2CompositionController>,
11705 args: windows_core::Ref<'_, windows_core::IUnknown>,
11706 ) -> windows_core::Result<()>;
11707}
11708impl ICoreWebView2CursorChangedEventHandler_Vtbl {
11709 pub const fn new<Identity: ICoreWebView2CursorChangedEventHandler_Impl, const OFFSET: isize>(
11710 ) -> Self {
11711 unsafe extern "system" fn Invoke<
11712 Identity: ICoreWebView2CursorChangedEventHandler_Impl,
11713 const OFFSET: isize,
11714 >(
11715 this: *mut core::ffi::c_void,
11716 sender: *mut core::ffi::c_void,
11717 args: *mut core::ffi::c_void,
11718 ) -> windows_core::HRESULT {
11719 unsafe {
11720 let this: &Identity =
11721 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11722 ICoreWebView2CursorChangedEventHandler_Impl::Invoke(
11723 this,
11724 core::mem::transmute_copy(&sender),
11725 core::mem::transmute_copy(&args),
11726 )
11727 .into()
11728 }
11729 }
11730 Self {
11731 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11732 Invoke: Invoke::<Identity, OFFSET>,
11733 }
11734 }
11735 pub fn matches(iid: &windows_core::GUID) -> bool {
11736 iid == &<ICoreWebView2CursorChangedEventHandler as windows_core::Interface>::IID
11737 }
11738}
11739impl windows_core::RuntimeName for ICoreWebView2CursorChangedEventHandler {}
11740windows_core::imp::define_interface!(
11741 ICoreWebView2CustomItemSelectedEventHandler,
11742 ICoreWebView2CustomItemSelectedEventHandler_Vtbl,
11743 0x49e1d0bc_fe9e_4481_b7c2_32324aa21998
11744);
11745windows_core::imp::interface_hierarchy!(
11746 ICoreWebView2CustomItemSelectedEventHandler,
11747 windows_core::IUnknown
11748);
11749impl ICoreWebView2CustomItemSelectedEventHandler {
11750 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
11751 where
11752 P0: windows_core::Param<ICoreWebView2ContextMenuItem>,
11753 P1: windows_core::Param<windows_core::IUnknown>,
11754 {
11755 unsafe {
11756 (windows_core::Interface::vtable(self).Invoke)(
11757 windows_core::Interface::as_raw(self),
11758 sender.param().abi(),
11759 args.param().abi(),
11760 )
11761 .ok()
11762 }
11763 }
11764}
11765#[repr(C)]
11766pub struct ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
11767 pub base__: windows_core::IUnknown_Vtbl,
11768 pub Invoke: unsafe extern "system" fn(
11769 *mut core::ffi::c_void,
11770 *mut core::ffi::c_void,
11771 *mut core::ffi::c_void,
11772 ) -> windows_core::HRESULT,
11773}
11774pub trait ICoreWebView2CustomItemSelectedEventHandler_Impl: windows_core::IUnknownImpl {
11775 fn Invoke(
11776 &self,
11777 sender: windows_core::Ref<'_, ICoreWebView2ContextMenuItem>,
11778 args: windows_core::Ref<'_, windows_core::IUnknown>,
11779 ) -> windows_core::Result<()>;
11780}
11781impl ICoreWebView2CustomItemSelectedEventHandler_Vtbl {
11782 pub const fn new<
11783 Identity: ICoreWebView2CustomItemSelectedEventHandler_Impl,
11784 const OFFSET: isize,
11785 >() -> Self {
11786 unsafe extern "system" fn Invoke<
11787 Identity: ICoreWebView2CustomItemSelectedEventHandler_Impl,
11788 const OFFSET: isize,
11789 >(
11790 this: *mut core::ffi::c_void,
11791 sender: *mut core::ffi::c_void,
11792 args: *mut core::ffi::c_void,
11793 ) -> windows_core::HRESULT {
11794 unsafe {
11795 let this: &Identity =
11796 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11797 ICoreWebView2CustomItemSelectedEventHandler_Impl::Invoke(
11798 this,
11799 core::mem::transmute_copy(&sender),
11800 core::mem::transmute_copy(&args),
11801 )
11802 .into()
11803 }
11804 }
11805 Self {
11806 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
11807 Invoke: Invoke::<Identity, OFFSET>,
11808 }
11809 }
11810 pub fn matches(iid: &windows_core::GUID) -> bool {
11811 iid == &<ICoreWebView2CustomItemSelectedEventHandler as windows_core::Interface>::IID
11812 }
11813}
11814impl windows_core::RuntimeName for ICoreWebView2CustomItemSelectedEventHandler {}
11815windows_core::imp::define_interface!(
11816 ICoreWebView2CustomSchemeRegistration,
11817 ICoreWebView2CustomSchemeRegistration_Vtbl,
11818 0xd60ac92c_37a6_4b26_a39e_95cfe59047bb
11819);
11820windows_core::imp::interface_hierarchy!(
11821 ICoreWebView2CustomSchemeRegistration,
11822 windows_core::IUnknown
11823);
11824impl ICoreWebView2CustomSchemeRegistration {
11825 pub unsafe fn SchemeName(
11826 &self,
11827 schemename: *mut windows_core::PWSTR,
11828 ) -> windows_core::Result<()> {
11829 unsafe {
11830 (windows_core::Interface::vtable(self).SchemeName)(
11831 windows_core::Interface::as_raw(self),
11832 schemename as _,
11833 )
11834 .ok()
11835 }
11836 }
11837 pub unsafe fn TreatAsSecure(
11838 &self,
11839 treatassecure: *mut windows_core::BOOL,
11840 ) -> windows_core::Result<()> {
11841 unsafe {
11842 (windows_core::Interface::vtable(self).TreatAsSecure)(
11843 windows_core::Interface::as_raw(self),
11844 treatassecure as _,
11845 )
11846 .ok()
11847 }
11848 }
11849 pub unsafe fn SetTreatAsSecure(&self, value: bool) -> windows_core::Result<()> {
11850 unsafe {
11851 (windows_core::Interface::vtable(self).SetTreatAsSecure)(
11852 windows_core::Interface::as_raw(self),
11853 value.into(),
11854 )
11855 .ok()
11856 }
11857 }
11858 pub unsafe fn GetAllowedOrigins(
11859 &self,
11860 allowedoriginscount: *mut u32,
11861 allowedorigins: *mut *mut windows_core::PWSTR,
11862 ) -> windows_core::Result<()> {
11863 unsafe {
11864 (windows_core::Interface::vtable(self).GetAllowedOrigins)(
11865 windows_core::Interface::as_raw(self),
11866 allowedoriginscount as _,
11867 allowedorigins as _,
11868 )
11869 .ok()
11870 }
11871 }
11872 pub unsafe fn SetAllowedOrigins(
11873 &self,
11874 allowedoriginscount: u32,
11875 allowedorigins: *const windows_core::PCWSTR,
11876 ) -> windows_core::Result<()> {
11877 unsafe {
11878 (windows_core::Interface::vtable(self).SetAllowedOrigins)(
11879 windows_core::Interface::as_raw(self),
11880 allowedoriginscount,
11881 allowedorigins,
11882 )
11883 .ok()
11884 }
11885 }
11886 pub unsafe fn HasAuthorityComponent(
11887 &self,
11888 hasauthoritycomponent: *mut windows_core::BOOL,
11889 ) -> windows_core::Result<()> {
11890 unsafe {
11891 (windows_core::Interface::vtable(self).HasAuthorityComponent)(
11892 windows_core::Interface::as_raw(self),
11893 hasauthoritycomponent as _,
11894 )
11895 .ok()
11896 }
11897 }
11898 pub unsafe fn SetHasAuthorityComponent(
11899 &self,
11900 hasauthoritycomponent: bool,
11901 ) -> windows_core::Result<()> {
11902 unsafe {
11903 (windows_core::Interface::vtable(self).SetHasAuthorityComponent)(
11904 windows_core::Interface::as_raw(self),
11905 hasauthoritycomponent.into(),
11906 )
11907 .ok()
11908 }
11909 }
11910}
11911#[repr(C)]
11912pub struct ICoreWebView2CustomSchemeRegistration_Vtbl {
11913 pub base__: windows_core::IUnknown_Vtbl,
11914 pub SchemeName: unsafe extern "system" fn(
11915 *mut core::ffi::c_void,
11916 *mut windows_core::PWSTR,
11917 ) -> windows_core::HRESULT,
11918 pub TreatAsSecure: unsafe extern "system" fn(
11919 *mut core::ffi::c_void,
11920 *mut windows_core::BOOL,
11921 ) -> windows_core::HRESULT,
11922 pub SetTreatAsSecure: unsafe extern "system" fn(
11923 *mut core::ffi::c_void,
11924 windows_core::BOOL,
11925 ) -> windows_core::HRESULT,
11926 pub GetAllowedOrigins: unsafe extern "system" fn(
11927 *mut core::ffi::c_void,
11928 *mut u32,
11929 *mut *mut windows_core::PWSTR,
11930 ) -> windows_core::HRESULT,
11931 pub SetAllowedOrigins: unsafe extern "system" fn(
11932 *mut core::ffi::c_void,
11933 u32,
11934 *const windows_core::PCWSTR,
11935 ) -> windows_core::HRESULT,
11936 pub HasAuthorityComponent: unsafe extern "system" fn(
11937 *mut core::ffi::c_void,
11938 *mut windows_core::BOOL,
11939 ) -> windows_core::HRESULT,
11940 pub SetHasAuthorityComponent: unsafe extern "system" fn(
11941 *mut core::ffi::c_void,
11942 windows_core::BOOL,
11943 ) -> windows_core::HRESULT,
11944}
11945pub trait ICoreWebView2CustomSchemeRegistration_Impl: windows_core::IUnknownImpl {
11946 fn SchemeName(&self, schemename: *mut windows_core::PWSTR) -> windows_core::Result<()>;
11947 fn TreatAsSecure(&self, treatassecure: *mut windows_core::BOOL) -> windows_core::Result<()>;
11948 fn SetTreatAsSecure(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
11949 fn GetAllowedOrigins(
11950 &self,
11951 allowedoriginscount: *mut u32,
11952 allowedorigins: *mut *mut windows_core::PWSTR,
11953 ) -> windows_core::Result<()>;
11954 fn SetAllowedOrigins(
11955 &self,
11956 allowedoriginscount: u32,
11957 allowedorigins: *const windows_core::PCWSTR,
11958 ) -> windows_core::Result<()>;
11959 fn HasAuthorityComponent(
11960 &self,
11961 hasauthoritycomponent: *mut windows_core::BOOL,
11962 ) -> windows_core::Result<()>;
11963 fn SetHasAuthorityComponent(
11964 &self,
11965 hasauthoritycomponent: windows_core::BOOL,
11966 ) -> windows_core::Result<()>;
11967}
11968impl ICoreWebView2CustomSchemeRegistration_Vtbl {
11969 pub const fn new<Identity: ICoreWebView2CustomSchemeRegistration_Impl, const OFFSET: isize>(
11970 ) -> Self {
11971 unsafe extern "system" fn SchemeName<
11972 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
11973 const OFFSET: isize,
11974 >(
11975 this: *mut core::ffi::c_void,
11976 schemename: *mut windows_core::PWSTR,
11977 ) -> windows_core::HRESULT {
11978 unsafe {
11979 let this: &Identity =
11980 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11981 ICoreWebView2CustomSchemeRegistration_Impl::SchemeName(
11982 this,
11983 core::mem::transmute_copy(&schemename),
11984 )
11985 .into()
11986 }
11987 }
11988 unsafe extern "system" fn TreatAsSecure<
11989 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
11990 const OFFSET: isize,
11991 >(
11992 this: *mut core::ffi::c_void,
11993 treatassecure: *mut windows_core::BOOL,
11994 ) -> windows_core::HRESULT {
11995 unsafe {
11996 let this: &Identity =
11997 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
11998 ICoreWebView2CustomSchemeRegistration_Impl::TreatAsSecure(
11999 this,
12000 core::mem::transmute_copy(&treatassecure),
12001 )
12002 .into()
12003 }
12004 }
12005 unsafe extern "system" fn SetTreatAsSecure<
12006 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
12007 const OFFSET: isize,
12008 >(
12009 this: *mut core::ffi::c_void,
12010 value: windows_core::BOOL,
12011 ) -> windows_core::HRESULT {
12012 unsafe {
12013 let this: &Identity =
12014 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12015 ICoreWebView2CustomSchemeRegistration_Impl::SetTreatAsSecure(
12016 this,
12017 core::mem::transmute_copy(&value),
12018 )
12019 .into()
12020 }
12021 }
12022 unsafe extern "system" fn GetAllowedOrigins<
12023 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
12024 const OFFSET: isize,
12025 >(
12026 this: *mut core::ffi::c_void,
12027 allowedoriginscount: *mut u32,
12028 allowedorigins: *mut *mut windows_core::PWSTR,
12029 ) -> windows_core::HRESULT {
12030 unsafe {
12031 let this: &Identity =
12032 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12033 ICoreWebView2CustomSchemeRegistration_Impl::GetAllowedOrigins(
12034 this,
12035 core::mem::transmute_copy(&allowedoriginscount),
12036 core::mem::transmute_copy(&allowedorigins),
12037 )
12038 .into()
12039 }
12040 }
12041 unsafe extern "system" fn SetAllowedOrigins<
12042 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
12043 const OFFSET: isize,
12044 >(
12045 this: *mut core::ffi::c_void,
12046 allowedoriginscount: u32,
12047 allowedorigins: *const windows_core::PCWSTR,
12048 ) -> windows_core::HRESULT {
12049 unsafe {
12050 let this: &Identity =
12051 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12052 ICoreWebView2CustomSchemeRegistration_Impl::SetAllowedOrigins(
12053 this,
12054 core::mem::transmute_copy(&allowedoriginscount),
12055 core::mem::transmute_copy(&allowedorigins),
12056 )
12057 .into()
12058 }
12059 }
12060 unsafe extern "system" fn HasAuthorityComponent<
12061 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
12062 const OFFSET: isize,
12063 >(
12064 this: *mut core::ffi::c_void,
12065 hasauthoritycomponent: *mut windows_core::BOOL,
12066 ) -> windows_core::HRESULT {
12067 unsafe {
12068 let this: &Identity =
12069 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12070 ICoreWebView2CustomSchemeRegistration_Impl::HasAuthorityComponent(
12071 this,
12072 core::mem::transmute_copy(&hasauthoritycomponent),
12073 )
12074 .into()
12075 }
12076 }
12077 unsafe extern "system" fn SetHasAuthorityComponent<
12078 Identity: ICoreWebView2CustomSchemeRegistration_Impl,
12079 const OFFSET: isize,
12080 >(
12081 this: *mut core::ffi::c_void,
12082 hasauthoritycomponent: windows_core::BOOL,
12083 ) -> windows_core::HRESULT {
12084 unsafe {
12085 let this: &Identity =
12086 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12087 ICoreWebView2CustomSchemeRegistration_Impl::SetHasAuthorityComponent(
12088 this,
12089 core::mem::transmute_copy(&hasauthoritycomponent),
12090 )
12091 .into()
12092 }
12093 }
12094 Self {
12095 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12096 SchemeName: SchemeName::<Identity, OFFSET>,
12097 TreatAsSecure: TreatAsSecure::<Identity, OFFSET>,
12098 SetTreatAsSecure: SetTreatAsSecure::<Identity, OFFSET>,
12099 GetAllowedOrigins: GetAllowedOrigins::<Identity, OFFSET>,
12100 SetAllowedOrigins: SetAllowedOrigins::<Identity, OFFSET>,
12101 HasAuthorityComponent: HasAuthorityComponent::<Identity, OFFSET>,
12102 SetHasAuthorityComponent: SetHasAuthorityComponent::<Identity, OFFSET>,
12103 }
12104 }
12105 pub fn matches(iid: &windows_core::GUID) -> bool {
12106 iid == &<ICoreWebView2CustomSchemeRegistration as windows_core::Interface>::IID
12107 }
12108}
12109impl windows_core::RuntimeName for ICoreWebView2CustomSchemeRegistration {}
12110windows_core::imp::define_interface!(
12111 ICoreWebView2DOMContentLoadedEventArgs,
12112 ICoreWebView2DOMContentLoadedEventArgs_Vtbl,
12113 0x16b1e21a_c503_44f2_84c9_70aba5031283
12114);
12115windows_core::imp::interface_hierarchy!(
12116 ICoreWebView2DOMContentLoadedEventArgs,
12117 windows_core::IUnknown
12118);
12119impl ICoreWebView2DOMContentLoadedEventArgs {
12120 pub unsafe fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()> {
12121 unsafe {
12122 (windows_core::Interface::vtable(self).NavigationId)(
12123 windows_core::Interface::as_raw(self),
12124 value as _,
12125 )
12126 .ok()
12127 }
12128 }
12129}
12130#[repr(C)]
12131pub struct ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
12132 pub base__: windows_core::IUnknown_Vtbl,
12133 pub NavigationId:
12134 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
12135}
12136pub trait ICoreWebView2DOMContentLoadedEventArgs_Impl: windows_core::IUnknownImpl {
12137 fn NavigationId(&self, value: *mut u64) -> windows_core::Result<()>;
12138}
12139impl ICoreWebView2DOMContentLoadedEventArgs_Vtbl {
12140 pub const fn new<Identity: ICoreWebView2DOMContentLoadedEventArgs_Impl, const OFFSET: isize>(
12141 ) -> Self {
12142 unsafe extern "system" fn NavigationId<
12143 Identity: ICoreWebView2DOMContentLoadedEventArgs_Impl,
12144 const OFFSET: isize,
12145 >(
12146 this: *mut core::ffi::c_void,
12147 value: *mut u64,
12148 ) -> windows_core::HRESULT {
12149 unsafe {
12150 let this: &Identity =
12151 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12152 ICoreWebView2DOMContentLoadedEventArgs_Impl::NavigationId(
12153 this,
12154 core::mem::transmute_copy(&value),
12155 )
12156 .into()
12157 }
12158 }
12159 Self {
12160 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12161 NavigationId: NavigationId::<Identity, OFFSET>,
12162 }
12163 }
12164 pub fn matches(iid: &windows_core::GUID) -> bool {
12165 iid == &<ICoreWebView2DOMContentLoadedEventArgs as windows_core::Interface>::IID
12166 }
12167}
12168impl windows_core::RuntimeName for ICoreWebView2DOMContentLoadedEventArgs {}
12169windows_core::imp::define_interface!(
12170 ICoreWebView2DOMContentLoadedEventHandler,
12171 ICoreWebView2DOMContentLoadedEventHandler_Vtbl,
12172 0x4bac7e9c_199e_49ed_87ed_249303acf019
12173);
12174windows_core::imp::interface_hierarchy!(
12175 ICoreWebView2DOMContentLoadedEventHandler,
12176 windows_core::IUnknown
12177);
12178impl ICoreWebView2DOMContentLoadedEventHandler {
12179 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
12180 where
12181 P0: windows_core::Param<ICoreWebView2>,
12182 P1: windows_core::Param<ICoreWebView2DOMContentLoadedEventArgs>,
12183 {
12184 unsafe {
12185 (windows_core::Interface::vtable(self).Invoke)(
12186 windows_core::Interface::as_raw(self),
12187 sender.param().abi(),
12188 args.param().abi(),
12189 )
12190 .ok()
12191 }
12192 }
12193}
12194#[repr(C)]
12195pub struct ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
12196 pub base__: windows_core::IUnknown_Vtbl,
12197 pub Invoke: unsafe extern "system" fn(
12198 *mut core::ffi::c_void,
12199 *mut core::ffi::c_void,
12200 *mut core::ffi::c_void,
12201 ) -> windows_core::HRESULT,
12202}
12203pub trait ICoreWebView2DOMContentLoadedEventHandler_Impl: windows_core::IUnknownImpl {
12204 fn Invoke(
12205 &self,
12206 sender: windows_core::Ref<'_, ICoreWebView2>,
12207 args: windows_core::Ref<'_, ICoreWebView2DOMContentLoadedEventArgs>,
12208 ) -> windows_core::Result<()>;
12209}
12210impl ICoreWebView2DOMContentLoadedEventHandler_Vtbl {
12211 pub const fn new<
12212 Identity: ICoreWebView2DOMContentLoadedEventHandler_Impl,
12213 const OFFSET: isize,
12214 >() -> Self {
12215 unsafe extern "system" fn Invoke<
12216 Identity: ICoreWebView2DOMContentLoadedEventHandler_Impl,
12217 const OFFSET: isize,
12218 >(
12219 this: *mut core::ffi::c_void,
12220 sender: *mut core::ffi::c_void,
12221 args: *mut core::ffi::c_void,
12222 ) -> windows_core::HRESULT {
12223 unsafe {
12224 let this: &Identity =
12225 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12226 ICoreWebView2DOMContentLoadedEventHandler_Impl::Invoke(
12227 this,
12228 core::mem::transmute_copy(&sender),
12229 core::mem::transmute_copy(&args),
12230 )
12231 .into()
12232 }
12233 }
12234 Self {
12235 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12236 Invoke: Invoke::<Identity, OFFSET>,
12237 }
12238 }
12239 pub fn matches(iid: &windows_core::GUID) -> bool {
12240 iid == &<ICoreWebView2DOMContentLoadedEventHandler as windows_core::Interface>::IID
12241 }
12242}
12243impl windows_core::RuntimeName for ICoreWebView2DOMContentLoadedEventHandler {}
12244windows_core::imp::define_interface!(
12245 ICoreWebView2Deferral,
12246 ICoreWebView2Deferral_Vtbl,
12247 0xc10e7f7b_b585_46f0_a623_8befbf3e4ee0
12248);
12249windows_core::imp::interface_hierarchy!(ICoreWebView2Deferral, windows_core::IUnknown);
12250impl ICoreWebView2Deferral {
12251 pub unsafe fn Complete(&self) -> windows_core::Result<()> {
12252 unsafe {
12253 (windows_core::Interface::vtable(self).Complete)(windows_core::Interface::as_raw(self))
12254 .ok()
12255 }
12256 }
12257}
12258#[repr(C)]
12259pub struct ICoreWebView2Deferral_Vtbl {
12260 pub base__: windows_core::IUnknown_Vtbl,
12261 pub Complete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
12262}
12263pub trait ICoreWebView2Deferral_Impl: windows_core::IUnknownImpl {
12264 fn Complete(&self) -> windows_core::Result<()>;
12265}
12266impl ICoreWebView2Deferral_Vtbl {
12267 pub const fn new<Identity: ICoreWebView2Deferral_Impl, const OFFSET: isize>() -> Self {
12268 unsafe extern "system" fn Complete<
12269 Identity: ICoreWebView2Deferral_Impl,
12270 const OFFSET: isize,
12271 >(
12272 this: *mut core::ffi::c_void,
12273 ) -> windows_core::HRESULT {
12274 unsafe {
12275 let this: &Identity =
12276 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12277 ICoreWebView2Deferral_Impl::Complete(this).into()
12278 }
12279 }
12280 Self {
12281 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12282 Complete: Complete::<Identity, OFFSET>,
12283 }
12284 }
12285 pub fn matches(iid: &windows_core::GUID) -> bool {
12286 iid == &<ICoreWebView2Deferral as windows_core::Interface>::IID
12287 }
12288}
12289impl windows_core::RuntimeName for ICoreWebView2Deferral {}
12290windows_core::imp::define_interface!(
12291 ICoreWebView2DevToolsProtocolEventReceivedEventArgs,
12292 ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl,
12293 0x653c2959_bb3a_4377_8632_b58ada4e66c4
12294);
12295windows_core::imp::interface_hierarchy!(
12296 ICoreWebView2DevToolsProtocolEventReceivedEventArgs,
12297 windows_core::IUnknown
12298);
12299impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs {
12300 pub unsafe fn ParameterObjectAsJson(
12301 &self,
12302 value: *mut windows_core::PWSTR,
12303 ) -> windows_core::Result<()> {
12304 unsafe {
12305 (windows_core::Interface::vtable(self).ParameterObjectAsJson)(
12306 windows_core::Interface::as_raw(self),
12307 value as _,
12308 )
12309 .ok()
12310 }
12311 }
12312}
12313#[repr(C)]
12314pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
12315 pub base__: windows_core::IUnknown_Vtbl,
12316 pub ParameterObjectAsJson: unsafe extern "system" fn(
12317 *mut core::ffi::c_void,
12318 *mut windows_core::PWSTR,
12319 ) -> windows_core::HRESULT,
12320}
12321pub trait ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl:
12322 windows_core::IUnknownImpl
12323{
12324 fn ParameterObjectAsJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
12325}
12326impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl {
12327 pub const fn new<
12328 Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl,
12329 const OFFSET: isize,
12330 >() -> Self {
12331 unsafe extern "system" fn ParameterObjectAsJson<
12332 Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl,
12333 const OFFSET: isize,
12334 >(
12335 this: *mut core::ffi::c_void,
12336 value: *mut windows_core::PWSTR,
12337 ) -> windows_core::HRESULT {
12338 unsafe {
12339 let this: &Identity =
12340 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12341 ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl::ParameterObjectAsJson(
12342 this,
12343 core::mem::transmute_copy(&value),
12344 )
12345 .into()
12346 }
12347 }
12348 Self {
12349 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12350 ParameterObjectAsJson: ParameterObjectAsJson::<Identity, OFFSET>,
12351 }
12352 }
12353 pub fn matches(iid: &windows_core::GUID) -> bool {
12354 iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs as windows_core::Interface >::IID
12355 }
12356}
12357impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventArgs {}
12358windows_core::imp::define_interface!(
12359 ICoreWebView2DevToolsProtocolEventReceivedEventArgs2,
12360 ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl,
12361 0x2dc4959d_1494_4393_95ba_bea4cb9ebd1b
12362);
12363impl core::ops::Deref for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
12364 type Target = ICoreWebView2DevToolsProtocolEventReceivedEventArgs;
12365 fn deref(&self) -> &Self::Target {
12366 unsafe { core::mem::transmute(self) }
12367 }
12368}
12369windows_core::imp::interface_hierarchy!(
12370 ICoreWebView2DevToolsProtocolEventReceivedEventArgs2,
12371 windows_core::IUnknown,
12372 ICoreWebView2DevToolsProtocolEventReceivedEventArgs
12373);
12374impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {
12375 pub unsafe fn SessionId(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
12376 unsafe {
12377 (windows_core::Interface::vtable(self).SessionId)(
12378 windows_core::Interface::as_raw(self),
12379 value as _,
12380 )
12381 .ok()
12382 }
12383 }
12384}
12385#[repr(C)]
12386pub struct ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
12387 pub base__: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl,
12388 pub SessionId: unsafe extern "system" fn(
12389 *mut core::ffi::c_void,
12390 *mut windows_core::PWSTR,
12391 ) -> windows_core::HRESULT,
12392}
12393pub trait ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl:
12394 ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Impl
12395{
12396 fn SessionId(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
12397}
12398impl ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Vtbl {
12399 pub const fn new<
12400 Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl,
12401 const OFFSET: isize,
12402 >() -> Self {
12403 unsafe extern "system" fn SessionId<
12404 Identity: ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl,
12405 const OFFSET: isize,
12406 >(
12407 this: *mut core::ffi::c_void,
12408 value: *mut windows_core::PWSTR,
12409 ) -> windows_core::HRESULT {
12410 unsafe {
12411 let this: &Identity =
12412 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12413 ICoreWebView2DevToolsProtocolEventReceivedEventArgs2_Impl::SessionId(
12414 this,
12415 core::mem::transmute_copy(&value),
12416 )
12417 .into()
12418 }
12419 }
12420 Self {
12421 base__: ICoreWebView2DevToolsProtocolEventReceivedEventArgs_Vtbl::new::<Identity, OFFSET>(
12422 ),
12423 SessionId: SessionId::<Identity, OFFSET>,
12424 }
12425 }
12426 pub fn matches(iid: &windows_core::GUID) -> bool {
12427 iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 as windows_core::Interface >::IID || iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventArgs as windows_core::Interface >::IID
12428 }
12429}
12430impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventArgs2 {}
12431windows_core::imp::define_interface!(
12432 ICoreWebView2DevToolsProtocolEventReceivedEventHandler,
12433 ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl,
12434 0xe2fda4be_5456_406c_a261_3d452138362c
12435);
12436windows_core::imp::interface_hierarchy!(
12437 ICoreWebView2DevToolsProtocolEventReceivedEventHandler,
12438 windows_core::IUnknown
12439);
12440impl ICoreWebView2DevToolsProtocolEventReceivedEventHandler {
12441 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
12442 where
12443 P0: windows_core::Param<ICoreWebView2>,
12444 P1: windows_core::Param<ICoreWebView2DevToolsProtocolEventReceivedEventArgs>,
12445 {
12446 unsafe {
12447 (windows_core::Interface::vtable(self).Invoke)(
12448 windows_core::Interface::as_raw(self),
12449 sender.param().abi(),
12450 args.param().abi(),
12451 )
12452 .ok()
12453 }
12454 }
12455}
12456#[repr(C)]
12457pub struct ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
12458 pub base__: windows_core::IUnknown_Vtbl,
12459 pub Invoke: unsafe extern "system" fn(
12460 *mut core::ffi::c_void,
12461 *mut core::ffi::c_void,
12462 *mut core::ffi::c_void,
12463 ) -> windows_core::HRESULT,
12464}
12465pub trait ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl:
12466 windows_core::IUnknownImpl
12467{
12468 fn Invoke(
12469 &self,
12470 sender: windows_core::Ref<'_, ICoreWebView2>,
12471 args: windows_core::Ref<'_, ICoreWebView2DevToolsProtocolEventReceivedEventArgs>,
12472 ) -> windows_core::Result<()>;
12473}
12474impl ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Vtbl {
12475 pub const fn new<
12476 Identity: ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl,
12477 const OFFSET: isize,
12478 >() -> Self {
12479 unsafe extern "system" fn Invoke<
12480 Identity: ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl,
12481 const OFFSET: isize,
12482 >(
12483 this: *mut core::ffi::c_void,
12484 sender: *mut core::ffi::c_void,
12485 args: *mut core::ffi::c_void,
12486 ) -> windows_core::HRESULT {
12487 unsafe {
12488 let this: &Identity =
12489 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12490 ICoreWebView2DevToolsProtocolEventReceivedEventHandler_Impl::Invoke(
12491 this,
12492 core::mem::transmute_copy(&sender),
12493 core::mem::transmute_copy(&args),
12494 )
12495 .into()
12496 }
12497 }
12498 Self {
12499 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12500 Invoke: Invoke::<Identity, OFFSET>,
12501 }
12502 }
12503 pub fn matches(iid: &windows_core::GUID) -> bool {
12504 iid == & < ICoreWebView2DevToolsProtocolEventReceivedEventHandler as windows_core::Interface >::IID
12505 }
12506}
12507impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceivedEventHandler {}
12508windows_core::imp::define_interface!(
12509 ICoreWebView2DevToolsProtocolEventReceiver,
12510 ICoreWebView2DevToolsProtocolEventReceiver_Vtbl,
12511 0xb32ca51a_8371_45e9_9317_af021d080367
12512);
12513windows_core::imp::interface_hierarchy!(
12514 ICoreWebView2DevToolsProtocolEventReceiver,
12515 windows_core::IUnknown
12516);
12517impl ICoreWebView2DevToolsProtocolEventReceiver {
12518 pub unsafe fn add_DevToolsProtocolEventReceived<P0>(
12519 &self,
12520 eventhandler: P0,
12521 token: *mut i64,
12522 ) -> windows_core::Result<()>
12523 where
12524 P0: windows_core::Param<ICoreWebView2DevToolsProtocolEventReceivedEventHandler>,
12525 {
12526 unsafe {
12527 (windows_core::Interface::vtable(self).add_DevToolsProtocolEventReceived)(
12528 windows_core::Interface::as_raw(self),
12529 eventhandler.param().abi(),
12530 token as _,
12531 )
12532 .ok()
12533 }
12534 }
12535 pub unsafe fn remove_DevToolsProtocolEventReceived(
12536 &self,
12537 token: i64,
12538 ) -> windows_core::Result<()> {
12539 unsafe {
12540 (windows_core::Interface::vtable(self).remove_DevToolsProtocolEventReceived)(
12541 windows_core::Interface::as_raw(self),
12542 token,
12543 )
12544 .ok()
12545 }
12546 }
12547}
12548#[repr(C)]
12549pub struct ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
12550 pub base__: windows_core::IUnknown_Vtbl,
12551 pub add_DevToolsProtocolEventReceived: unsafe extern "system" fn(
12552 *mut core::ffi::c_void,
12553 *mut core::ffi::c_void,
12554 *mut i64,
12555 ) -> windows_core::HRESULT,
12556 pub remove_DevToolsProtocolEventReceived:
12557 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
12558}
12559pub trait ICoreWebView2DevToolsProtocolEventReceiver_Impl: windows_core::IUnknownImpl {
12560 fn add_DevToolsProtocolEventReceived(
12561 &self,
12562 eventhandler: windows_core::Ref<'_, ICoreWebView2DevToolsProtocolEventReceivedEventHandler>,
12563 token: *mut i64,
12564 ) -> windows_core::Result<()>;
12565 fn remove_DevToolsProtocolEventReceived(&self, token: i64) -> windows_core::Result<()>;
12566}
12567impl ICoreWebView2DevToolsProtocolEventReceiver_Vtbl {
12568 pub const fn new<
12569 Identity: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
12570 const OFFSET: isize,
12571 >() -> Self {
12572 unsafe extern "system" fn add_DevToolsProtocolEventReceived<
12573 Identity: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
12574 const OFFSET: isize,
12575 >(
12576 this: *mut core::ffi::c_void,
12577 eventhandler: *mut core::ffi::c_void,
12578 token: *mut i64,
12579 ) -> windows_core::HRESULT {
12580 unsafe {
12581 let this: &Identity =
12582 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12583 ICoreWebView2DevToolsProtocolEventReceiver_Impl::add_DevToolsProtocolEventReceived(
12584 this,
12585 core::mem::transmute_copy(&eventhandler),
12586 core::mem::transmute_copy(&token),
12587 )
12588 .into()
12589 }
12590 }
12591 unsafe extern "system" fn remove_DevToolsProtocolEventReceived<
12592 Identity: ICoreWebView2DevToolsProtocolEventReceiver_Impl,
12593 const OFFSET: isize,
12594 >(
12595 this: *mut core::ffi::c_void,
12596 token: i64,
12597 ) -> windows_core::HRESULT {
12598 unsafe {
12599 let this: &Identity =
12600 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12601 ICoreWebView2DevToolsProtocolEventReceiver_Impl:: remove_DevToolsProtocolEventReceived ( this , core::mem::transmute_copy ( & token ) , ) . into ( )
12602 }
12603 }
12604 Self {
12605 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12606 add_DevToolsProtocolEventReceived: add_DevToolsProtocolEventReceived::<Identity, OFFSET>,
12607 remove_DevToolsProtocolEventReceived: remove_DevToolsProtocolEventReceived::<
12608 Identity,
12609 OFFSET,
12610 >,
12611 }
12612 }
12613 pub fn matches(iid: &windows_core::GUID) -> bool {
12614 iid == &<ICoreWebView2DevToolsProtocolEventReceiver as windows_core::Interface>::IID
12615 }
12616}
12617impl windows_core::RuntimeName for ICoreWebView2DevToolsProtocolEventReceiver {}
12618windows_core::imp::define_interface!(
12619 ICoreWebView2DocumentTitleChangedEventHandler,
12620 ICoreWebView2DocumentTitleChangedEventHandler_Vtbl,
12621 0xf5f2b923_953e_4042_9f95_f3a118e1afd4
12622);
12623windows_core::imp::interface_hierarchy!(
12624 ICoreWebView2DocumentTitleChangedEventHandler,
12625 windows_core::IUnknown
12626);
12627impl ICoreWebView2DocumentTitleChangedEventHandler {
12628 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
12629 where
12630 P0: windows_core::Param<ICoreWebView2>,
12631 P1: windows_core::Param<windows_core::IUnknown>,
12632 {
12633 unsafe {
12634 (windows_core::Interface::vtable(self).Invoke)(
12635 windows_core::Interface::as_raw(self),
12636 sender.param().abi(),
12637 args.param().abi(),
12638 )
12639 .ok()
12640 }
12641 }
12642}
12643#[repr(C)]
12644pub struct ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
12645 pub base__: windows_core::IUnknown_Vtbl,
12646 pub Invoke: unsafe extern "system" fn(
12647 *mut core::ffi::c_void,
12648 *mut core::ffi::c_void,
12649 *mut core::ffi::c_void,
12650 ) -> windows_core::HRESULT,
12651}
12652pub trait ICoreWebView2DocumentTitleChangedEventHandler_Impl: windows_core::IUnknownImpl {
12653 fn Invoke(
12654 &self,
12655 sender: windows_core::Ref<'_, ICoreWebView2>,
12656 args: windows_core::Ref<'_, windows_core::IUnknown>,
12657 ) -> windows_core::Result<()>;
12658}
12659impl ICoreWebView2DocumentTitleChangedEventHandler_Vtbl {
12660 pub const fn new<
12661 Identity: ICoreWebView2DocumentTitleChangedEventHandler_Impl,
12662 const OFFSET: isize,
12663 >() -> Self {
12664 unsafe extern "system" fn Invoke<
12665 Identity: ICoreWebView2DocumentTitleChangedEventHandler_Impl,
12666 const OFFSET: isize,
12667 >(
12668 this: *mut core::ffi::c_void,
12669 sender: *mut core::ffi::c_void,
12670 args: *mut core::ffi::c_void,
12671 ) -> windows_core::HRESULT {
12672 unsafe {
12673 let this: &Identity =
12674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
12675 ICoreWebView2DocumentTitleChangedEventHandler_Impl::Invoke(
12676 this,
12677 core::mem::transmute_copy(&sender),
12678 core::mem::transmute_copy(&args),
12679 )
12680 .into()
12681 }
12682 }
12683 Self {
12684 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
12685 Invoke: Invoke::<Identity, OFFSET>,
12686 }
12687 }
12688 pub fn matches(iid: &windows_core::GUID) -> bool {
12689 iid == &<ICoreWebView2DocumentTitleChangedEventHandler as windows_core::Interface>::IID
12690 }
12691}
12692impl windows_core::RuntimeName for ICoreWebView2DocumentTitleChangedEventHandler {}
12693windows_core::imp::define_interface!(
12694 ICoreWebView2DownloadOperation,
12695 ICoreWebView2DownloadOperation_Vtbl,
12696 0x3d6b6cf2_afe1_44c7_a995_c65117714336
12697);
12698windows_core::imp::interface_hierarchy!(ICoreWebView2DownloadOperation, windows_core::IUnknown);
12699impl ICoreWebView2DownloadOperation {
12700 pub unsafe fn add_BytesReceivedChanged<P0>(
12701 &self,
12702 eventhandler: P0,
12703 token: *mut i64,
12704 ) -> windows_core::Result<()>
12705 where
12706 P0: windows_core::Param<ICoreWebView2BytesReceivedChangedEventHandler>,
12707 {
12708 unsafe {
12709 (windows_core::Interface::vtable(self).add_BytesReceivedChanged)(
12710 windows_core::Interface::as_raw(self),
12711 eventhandler.param().abi(),
12712 token as _,
12713 )
12714 .ok()
12715 }
12716 }
12717 pub unsafe fn remove_BytesReceivedChanged(&self, token: i64) -> windows_core::Result<()> {
12718 unsafe {
12719 (windows_core::Interface::vtable(self).remove_BytesReceivedChanged)(
12720 windows_core::Interface::as_raw(self),
12721 token,
12722 )
12723 .ok()
12724 }
12725 }
12726 pub unsafe fn add_EstimatedEndTimeChanged<P0>(
12727 &self,
12728 eventhandler: P0,
12729 token: *mut i64,
12730 ) -> windows_core::Result<()>
12731 where
12732 P0: windows_core::Param<ICoreWebView2EstimatedEndTimeChangedEventHandler>,
12733 {
12734 unsafe {
12735 (windows_core::Interface::vtable(self).add_EstimatedEndTimeChanged)(
12736 windows_core::Interface::as_raw(self),
12737 eventhandler.param().abi(),
12738 token as _,
12739 )
12740 .ok()
12741 }
12742 }
12743 pub unsafe fn remove_EstimatedEndTimeChanged(&self, token: i64) -> windows_core::Result<()> {
12744 unsafe {
12745 (windows_core::Interface::vtable(self).remove_EstimatedEndTimeChanged)(
12746 windows_core::Interface::as_raw(self),
12747 token,
12748 )
12749 .ok()
12750 }
12751 }
12752 pub unsafe fn add_StateChanged<P0>(
12753 &self,
12754 eventhandler: P0,
12755 token: *mut i64,
12756 ) -> windows_core::Result<()>
12757 where
12758 P0: windows_core::Param<ICoreWebView2StateChangedEventHandler>,
12759 {
12760 unsafe {
12761 (windows_core::Interface::vtable(self).add_StateChanged)(
12762 windows_core::Interface::as_raw(self),
12763 eventhandler.param().abi(),
12764 token as _,
12765 )
12766 .ok()
12767 }
12768 }
12769 pub unsafe fn remove_StateChanged(&self, token: i64) -> windows_core::Result<()> {
12770 unsafe {
12771 (windows_core::Interface::vtable(self).remove_StateChanged)(
12772 windows_core::Interface::as_raw(self),
12773 token,
12774 )
12775 .ok()
12776 }
12777 }
12778 pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
12779 unsafe {
12780 (windows_core::Interface::vtable(self).Uri)(
12781 windows_core::Interface::as_raw(self),
12782 uri as _,
12783 )
12784 .ok()
12785 }
12786 }
12787 pub unsafe fn ContentDisposition(
12788 &self,
12789 contentdisposition: *mut windows_core::PWSTR,
12790 ) -> windows_core::Result<()> {
12791 unsafe {
12792 (windows_core::Interface::vtable(self).ContentDisposition)(
12793 windows_core::Interface::as_raw(self),
12794 contentdisposition as _,
12795 )
12796 .ok()
12797 }
12798 }
12799 pub unsafe fn MimeType(&self, mimetype: *mut windows_core::PWSTR) -> windows_core::Result<()> {
12800 unsafe {
12801 (windows_core::Interface::vtable(self).MimeType)(
12802 windows_core::Interface::as_raw(self),
12803 mimetype as _,
12804 )
12805 .ok()
12806 }
12807 }
12808 pub unsafe fn TotalBytesToReceive(
12809 &self,
12810 totalbytestoreceive: *mut i64,
12811 ) -> windows_core::Result<()> {
12812 unsafe {
12813 (windows_core::Interface::vtable(self).TotalBytesToReceive)(
12814 windows_core::Interface::as_raw(self),
12815 totalbytestoreceive as _,
12816 )
12817 .ok()
12818 }
12819 }
12820 pub unsafe fn BytesReceived(&self, bytesreceived: *mut i64) -> windows_core::Result<()> {
12821 unsafe {
12822 (windows_core::Interface::vtable(self).BytesReceived)(
12823 windows_core::Interface::as_raw(self),
12824 bytesreceived as _,
12825 )
12826 .ok()
12827 }
12828 }
12829 pub unsafe fn EstimatedEndTime(
12830 &self,
12831 estimatedendtime: *mut windows_core::PWSTR,
12832 ) -> windows_core::Result<()> {
12833 unsafe {
12834 (windows_core::Interface::vtable(self).EstimatedEndTime)(
12835 windows_core::Interface::as_raw(self),
12836 estimatedendtime as _,
12837 )
12838 .ok()
12839 }
12840 }
12841 pub unsafe fn ResultFilePath(
12842 &self,
12843 resultfilepath: *mut windows_core::PWSTR,
12844 ) -> windows_core::Result<()> {
12845 unsafe {
12846 (windows_core::Interface::vtable(self).ResultFilePath)(
12847 windows_core::Interface::as_raw(self),
12848 resultfilepath as _,
12849 )
12850 .ok()
12851 }
12852 }
12853 pub unsafe fn State(
12854 &self,
12855 downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
12856 ) -> windows_core::Result<()> {
12857 unsafe {
12858 (windows_core::Interface::vtable(self).State)(
12859 windows_core::Interface::as_raw(self),
12860 downloadstate as _,
12861 )
12862 .ok()
12863 }
12864 }
12865 pub unsafe fn InterruptReason(
12866 &self,
12867 interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
12868 ) -> windows_core::Result<()> {
12869 unsafe {
12870 (windows_core::Interface::vtable(self).InterruptReason)(
12871 windows_core::Interface::as_raw(self),
12872 interruptreason as _,
12873 )
12874 .ok()
12875 }
12876 }
12877 pub unsafe fn Cancel(&self) -> windows_core::Result<()> {
12878 unsafe {
12879 (windows_core::Interface::vtable(self).Cancel)(windows_core::Interface::as_raw(self))
12880 .ok()
12881 }
12882 }
12883 pub unsafe fn Pause(&self) -> windows_core::Result<()> {
12884 unsafe {
12885 (windows_core::Interface::vtable(self).Pause)(windows_core::Interface::as_raw(self))
12886 .ok()
12887 }
12888 }
12889 pub unsafe fn Resume(&self) -> windows_core::Result<()> {
12890 unsafe {
12891 (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self))
12892 .ok()
12893 }
12894 }
12895 pub unsafe fn CanResume(&self, canresume: *mut windows_core::BOOL) -> windows_core::Result<()> {
12896 unsafe {
12897 (windows_core::Interface::vtable(self).CanResume)(
12898 windows_core::Interface::as_raw(self),
12899 canresume as _,
12900 )
12901 .ok()
12902 }
12903 }
12904}
12905#[repr(C)]
12906pub struct ICoreWebView2DownloadOperation_Vtbl {
12907 pub base__: windows_core::IUnknown_Vtbl,
12908 pub add_BytesReceivedChanged: unsafe extern "system" fn(
12909 *mut core::ffi::c_void,
12910 *mut core::ffi::c_void,
12911 *mut i64,
12912 ) -> windows_core::HRESULT,
12913 pub remove_BytesReceivedChanged:
12914 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
12915 pub add_EstimatedEndTimeChanged: unsafe extern "system" fn(
12916 *mut core::ffi::c_void,
12917 *mut core::ffi::c_void,
12918 *mut i64,
12919 ) -> windows_core::HRESULT,
12920 pub remove_EstimatedEndTimeChanged:
12921 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
12922 pub add_StateChanged: unsafe extern "system" fn(
12923 *mut core::ffi::c_void,
12924 *mut core::ffi::c_void,
12925 *mut i64,
12926 ) -> windows_core::HRESULT,
12927 pub remove_StateChanged:
12928 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
12929 pub Uri: unsafe extern "system" fn(
12930 *mut core::ffi::c_void,
12931 *mut windows_core::PWSTR,
12932 ) -> windows_core::HRESULT,
12933 pub ContentDisposition: unsafe extern "system" fn(
12934 *mut core::ffi::c_void,
12935 *mut windows_core::PWSTR,
12936 ) -> windows_core::HRESULT,
12937 pub MimeType: unsafe extern "system" fn(
12938 *mut core::ffi::c_void,
12939 *mut windows_core::PWSTR,
12940 ) -> windows_core::HRESULT,
12941 pub TotalBytesToReceive:
12942 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
12943 pub BytesReceived:
12944 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i64) -> windows_core::HRESULT,
12945 pub EstimatedEndTime: unsafe extern "system" fn(
12946 *mut core::ffi::c_void,
12947 *mut windows_core::PWSTR,
12948 ) -> windows_core::HRESULT,
12949 pub ResultFilePath: unsafe extern "system" fn(
12950 *mut core::ffi::c_void,
12951 *mut windows_core::PWSTR,
12952 ) -> windows_core::HRESULT,
12953 pub State: unsafe extern "system" fn(
12954 *mut core::ffi::c_void,
12955 *mut COREWEBVIEW2_DOWNLOAD_STATE,
12956 ) -> windows_core::HRESULT,
12957 pub InterruptReason: unsafe extern "system" fn(
12958 *mut core::ffi::c_void,
12959 *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
12960 ) -> windows_core::HRESULT,
12961 pub Cancel: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
12962 pub Pause: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
12963 pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
12964 pub CanResume: unsafe extern "system" fn(
12965 *mut core::ffi::c_void,
12966 *mut windows_core::BOOL,
12967 ) -> windows_core::HRESULT,
12968}
12969pub trait ICoreWebView2DownloadOperation_Impl: windows_core::IUnknownImpl {
12970 fn add_BytesReceivedChanged(
12971 &self,
12972 eventhandler: windows_core::Ref<'_, ICoreWebView2BytesReceivedChangedEventHandler>,
12973 token: *mut i64,
12974 ) -> windows_core::Result<()>;
12975 fn remove_BytesReceivedChanged(&self, token: i64) -> windows_core::Result<()>;
12976 fn add_EstimatedEndTimeChanged(
12977 &self,
12978 eventhandler: windows_core::Ref<'_, ICoreWebView2EstimatedEndTimeChangedEventHandler>,
12979 token: *mut i64,
12980 ) -> windows_core::Result<()>;
12981 fn remove_EstimatedEndTimeChanged(&self, token: i64) -> windows_core::Result<()>;
12982 fn add_StateChanged(
12983 &self,
12984 eventhandler: windows_core::Ref<'_, ICoreWebView2StateChangedEventHandler>,
12985 token: *mut i64,
12986 ) -> windows_core::Result<()>;
12987 fn remove_StateChanged(&self, token: i64) -> windows_core::Result<()>;
12988 fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
12989 fn ContentDisposition(
12990 &self,
12991 contentdisposition: *mut windows_core::PWSTR,
12992 ) -> windows_core::Result<()>;
12993 fn MimeType(&self, mimetype: *mut windows_core::PWSTR) -> windows_core::Result<()>;
12994 fn TotalBytesToReceive(&self, totalbytestoreceive: *mut i64) -> windows_core::Result<()>;
12995 fn BytesReceived(&self, bytesreceived: *mut i64) -> windows_core::Result<()>;
12996 fn EstimatedEndTime(
12997 &self,
12998 estimatedendtime: *mut windows_core::PWSTR,
12999 ) -> windows_core::Result<()>;
13000 fn ResultFilePath(&self, resultfilepath: *mut windows_core::PWSTR) -> windows_core::Result<()>;
13001 fn State(&self, downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE) -> windows_core::Result<()>;
13002 fn InterruptReason(
13003 &self,
13004 interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
13005 ) -> windows_core::Result<()>;
13006 fn Cancel(&self) -> windows_core::Result<()>;
13007 fn Pause(&self) -> windows_core::Result<()>;
13008 fn Resume(&self) -> windows_core::Result<()>;
13009 fn CanResume(&self, canresume: *mut windows_core::BOOL) -> windows_core::Result<()>;
13010}
13011impl ICoreWebView2DownloadOperation_Vtbl {
13012 pub const fn new<Identity: ICoreWebView2DownloadOperation_Impl, const OFFSET: isize>() -> Self {
13013 unsafe extern "system" fn add_BytesReceivedChanged<
13014 Identity: ICoreWebView2DownloadOperation_Impl,
13015 const OFFSET: isize,
13016 >(
13017 this: *mut core::ffi::c_void,
13018 eventhandler: *mut core::ffi::c_void,
13019 token: *mut i64,
13020 ) -> windows_core::HRESULT {
13021 unsafe {
13022 let this: &Identity =
13023 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13024 ICoreWebView2DownloadOperation_Impl::add_BytesReceivedChanged(
13025 this,
13026 core::mem::transmute_copy(&eventhandler),
13027 core::mem::transmute_copy(&token),
13028 )
13029 .into()
13030 }
13031 }
13032 unsafe extern "system" fn remove_BytesReceivedChanged<
13033 Identity: ICoreWebView2DownloadOperation_Impl,
13034 const OFFSET: isize,
13035 >(
13036 this: *mut core::ffi::c_void,
13037 token: i64,
13038 ) -> windows_core::HRESULT {
13039 unsafe {
13040 let this: &Identity =
13041 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13042 ICoreWebView2DownloadOperation_Impl::remove_BytesReceivedChanged(
13043 this,
13044 core::mem::transmute_copy(&token),
13045 )
13046 .into()
13047 }
13048 }
13049 unsafe extern "system" fn add_EstimatedEndTimeChanged<
13050 Identity: ICoreWebView2DownloadOperation_Impl,
13051 const OFFSET: isize,
13052 >(
13053 this: *mut core::ffi::c_void,
13054 eventhandler: *mut core::ffi::c_void,
13055 token: *mut i64,
13056 ) -> windows_core::HRESULT {
13057 unsafe {
13058 let this: &Identity =
13059 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13060 ICoreWebView2DownloadOperation_Impl::add_EstimatedEndTimeChanged(
13061 this,
13062 core::mem::transmute_copy(&eventhandler),
13063 core::mem::transmute_copy(&token),
13064 )
13065 .into()
13066 }
13067 }
13068 unsafe extern "system" fn remove_EstimatedEndTimeChanged<
13069 Identity: ICoreWebView2DownloadOperation_Impl,
13070 const OFFSET: isize,
13071 >(
13072 this: *mut core::ffi::c_void,
13073 token: i64,
13074 ) -> windows_core::HRESULT {
13075 unsafe {
13076 let this: &Identity =
13077 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13078 ICoreWebView2DownloadOperation_Impl::remove_EstimatedEndTimeChanged(
13079 this,
13080 core::mem::transmute_copy(&token),
13081 )
13082 .into()
13083 }
13084 }
13085 unsafe extern "system" fn add_StateChanged<
13086 Identity: ICoreWebView2DownloadOperation_Impl,
13087 const OFFSET: isize,
13088 >(
13089 this: *mut core::ffi::c_void,
13090 eventhandler: *mut core::ffi::c_void,
13091 token: *mut i64,
13092 ) -> windows_core::HRESULT {
13093 unsafe {
13094 let this: &Identity =
13095 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13096 ICoreWebView2DownloadOperation_Impl::add_StateChanged(
13097 this,
13098 core::mem::transmute_copy(&eventhandler),
13099 core::mem::transmute_copy(&token),
13100 )
13101 .into()
13102 }
13103 }
13104 unsafe extern "system" fn remove_StateChanged<
13105 Identity: ICoreWebView2DownloadOperation_Impl,
13106 const OFFSET: isize,
13107 >(
13108 this: *mut core::ffi::c_void,
13109 token: i64,
13110 ) -> windows_core::HRESULT {
13111 unsafe {
13112 let this: &Identity =
13113 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13114 ICoreWebView2DownloadOperation_Impl::remove_StateChanged(
13115 this,
13116 core::mem::transmute_copy(&token),
13117 )
13118 .into()
13119 }
13120 }
13121 unsafe extern "system" fn Uri<
13122 Identity: ICoreWebView2DownloadOperation_Impl,
13123 const OFFSET: isize,
13124 >(
13125 this: *mut core::ffi::c_void,
13126 uri: *mut windows_core::PWSTR,
13127 ) -> windows_core::HRESULT {
13128 unsafe {
13129 let this: &Identity =
13130 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13131 ICoreWebView2DownloadOperation_Impl::Uri(this, core::mem::transmute_copy(&uri))
13132 .into()
13133 }
13134 }
13135 unsafe extern "system" fn ContentDisposition<
13136 Identity: ICoreWebView2DownloadOperation_Impl,
13137 const OFFSET: isize,
13138 >(
13139 this: *mut core::ffi::c_void,
13140 contentdisposition: *mut windows_core::PWSTR,
13141 ) -> windows_core::HRESULT {
13142 unsafe {
13143 let this: &Identity =
13144 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13145 ICoreWebView2DownloadOperation_Impl::ContentDisposition(
13146 this,
13147 core::mem::transmute_copy(&contentdisposition),
13148 )
13149 .into()
13150 }
13151 }
13152 unsafe extern "system" fn MimeType<
13153 Identity: ICoreWebView2DownloadOperation_Impl,
13154 const OFFSET: isize,
13155 >(
13156 this: *mut core::ffi::c_void,
13157 mimetype: *mut windows_core::PWSTR,
13158 ) -> windows_core::HRESULT {
13159 unsafe {
13160 let this: &Identity =
13161 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13162 ICoreWebView2DownloadOperation_Impl::MimeType(
13163 this,
13164 core::mem::transmute_copy(&mimetype),
13165 )
13166 .into()
13167 }
13168 }
13169 unsafe extern "system" fn TotalBytesToReceive<
13170 Identity: ICoreWebView2DownloadOperation_Impl,
13171 const OFFSET: isize,
13172 >(
13173 this: *mut core::ffi::c_void,
13174 totalbytestoreceive: *mut i64,
13175 ) -> windows_core::HRESULT {
13176 unsafe {
13177 let this: &Identity =
13178 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13179 ICoreWebView2DownloadOperation_Impl::TotalBytesToReceive(
13180 this,
13181 core::mem::transmute_copy(&totalbytestoreceive),
13182 )
13183 .into()
13184 }
13185 }
13186 unsafe extern "system" fn BytesReceived<
13187 Identity: ICoreWebView2DownloadOperation_Impl,
13188 const OFFSET: isize,
13189 >(
13190 this: *mut core::ffi::c_void,
13191 bytesreceived: *mut i64,
13192 ) -> windows_core::HRESULT {
13193 unsafe {
13194 let this: &Identity =
13195 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13196 ICoreWebView2DownloadOperation_Impl::BytesReceived(
13197 this,
13198 core::mem::transmute_copy(&bytesreceived),
13199 )
13200 .into()
13201 }
13202 }
13203 unsafe extern "system" fn EstimatedEndTime<
13204 Identity: ICoreWebView2DownloadOperation_Impl,
13205 const OFFSET: isize,
13206 >(
13207 this: *mut core::ffi::c_void,
13208 estimatedendtime: *mut windows_core::PWSTR,
13209 ) -> windows_core::HRESULT {
13210 unsafe {
13211 let this: &Identity =
13212 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13213 ICoreWebView2DownloadOperation_Impl::EstimatedEndTime(
13214 this,
13215 core::mem::transmute_copy(&estimatedendtime),
13216 )
13217 .into()
13218 }
13219 }
13220 unsafe extern "system" fn ResultFilePath<
13221 Identity: ICoreWebView2DownloadOperation_Impl,
13222 const OFFSET: isize,
13223 >(
13224 this: *mut core::ffi::c_void,
13225 resultfilepath: *mut windows_core::PWSTR,
13226 ) -> windows_core::HRESULT {
13227 unsafe {
13228 let this: &Identity =
13229 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13230 ICoreWebView2DownloadOperation_Impl::ResultFilePath(
13231 this,
13232 core::mem::transmute_copy(&resultfilepath),
13233 )
13234 .into()
13235 }
13236 }
13237 unsafe extern "system" fn State<
13238 Identity: ICoreWebView2DownloadOperation_Impl,
13239 const OFFSET: isize,
13240 >(
13241 this: *mut core::ffi::c_void,
13242 downloadstate: *mut COREWEBVIEW2_DOWNLOAD_STATE,
13243 ) -> windows_core::HRESULT {
13244 unsafe {
13245 let this: &Identity =
13246 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13247 ICoreWebView2DownloadOperation_Impl::State(
13248 this,
13249 core::mem::transmute_copy(&downloadstate),
13250 )
13251 .into()
13252 }
13253 }
13254 unsafe extern "system" fn InterruptReason<
13255 Identity: ICoreWebView2DownloadOperation_Impl,
13256 const OFFSET: isize,
13257 >(
13258 this: *mut core::ffi::c_void,
13259 interruptreason: *mut COREWEBVIEW2_DOWNLOAD_INTERRUPT_REASON,
13260 ) -> windows_core::HRESULT {
13261 unsafe {
13262 let this: &Identity =
13263 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13264 ICoreWebView2DownloadOperation_Impl::InterruptReason(
13265 this,
13266 core::mem::transmute_copy(&interruptreason),
13267 )
13268 .into()
13269 }
13270 }
13271 unsafe extern "system" fn Cancel<
13272 Identity: ICoreWebView2DownloadOperation_Impl,
13273 const OFFSET: isize,
13274 >(
13275 this: *mut core::ffi::c_void,
13276 ) -> windows_core::HRESULT {
13277 unsafe {
13278 let this: &Identity =
13279 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13280 ICoreWebView2DownloadOperation_Impl::Cancel(this).into()
13281 }
13282 }
13283 unsafe extern "system" fn Pause<
13284 Identity: ICoreWebView2DownloadOperation_Impl,
13285 const OFFSET: isize,
13286 >(
13287 this: *mut core::ffi::c_void,
13288 ) -> windows_core::HRESULT {
13289 unsafe {
13290 let this: &Identity =
13291 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13292 ICoreWebView2DownloadOperation_Impl::Pause(this).into()
13293 }
13294 }
13295 unsafe extern "system" fn Resume<
13296 Identity: ICoreWebView2DownloadOperation_Impl,
13297 const OFFSET: isize,
13298 >(
13299 this: *mut core::ffi::c_void,
13300 ) -> windows_core::HRESULT {
13301 unsafe {
13302 let this: &Identity =
13303 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13304 ICoreWebView2DownloadOperation_Impl::Resume(this).into()
13305 }
13306 }
13307 unsafe extern "system" fn CanResume<
13308 Identity: ICoreWebView2DownloadOperation_Impl,
13309 const OFFSET: isize,
13310 >(
13311 this: *mut core::ffi::c_void,
13312 canresume: *mut windows_core::BOOL,
13313 ) -> windows_core::HRESULT {
13314 unsafe {
13315 let this: &Identity =
13316 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13317 ICoreWebView2DownloadOperation_Impl::CanResume(
13318 this,
13319 core::mem::transmute_copy(&canresume),
13320 )
13321 .into()
13322 }
13323 }
13324 Self {
13325 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
13326 add_BytesReceivedChanged: add_BytesReceivedChanged::<Identity, OFFSET>,
13327 remove_BytesReceivedChanged: remove_BytesReceivedChanged::<Identity, OFFSET>,
13328 add_EstimatedEndTimeChanged: add_EstimatedEndTimeChanged::<Identity, OFFSET>,
13329 remove_EstimatedEndTimeChanged: remove_EstimatedEndTimeChanged::<Identity, OFFSET>,
13330 add_StateChanged: add_StateChanged::<Identity, OFFSET>,
13331 remove_StateChanged: remove_StateChanged::<Identity, OFFSET>,
13332 Uri: Uri::<Identity, OFFSET>,
13333 ContentDisposition: ContentDisposition::<Identity, OFFSET>,
13334 MimeType: MimeType::<Identity, OFFSET>,
13335 TotalBytesToReceive: TotalBytesToReceive::<Identity, OFFSET>,
13336 BytesReceived: BytesReceived::<Identity, OFFSET>,
13337 EstimatedEndTime: EstimatedEndTime::<Identity, OFFSET>,
13338 ResultFilePath: ResultFilePath::<Identity, OFFSET>,
13339 State: State::<Identity, OFFSET>,
13340 InterruptReason: InterruptReason::<Identity, OFFSET>,
13341 Cancel: Cancel::<Identity, OFFSET>,
13342 Pause: Pause::<Identity, OFFSET>,
13343 Resume: Resume::<Identity, OFFSET>,
13344 CanResume: CanResume::<Identity, OFFSET>,
13345 }
13346 }
13347 pub fn matches(iid: &windows_core::GUID) -> bool {
13348 iid == &<ICoreWebView2DownloadOperation as windows_core::Interface>::IID
13349 }
13350}
13351impl windows_core::RuntimeName for ICoreWebView2DownloadOperation {}
13352windows_core::imp::define_interface!(
13353 ICoreWebView2DownloadStartingEventArgs,
13354 ICoreWebView2DownloadStartingEventArgs_Vtbl,
13355 0xe99bbe21_43e9_4544_a732_282764eafa60
13356);
13357windows_core::imp::interface_hierarchy!(
13358 ICoreWebView2DownloadStartingEventArgs,
13359 windows_core::IUnknown
13360);
13361impl ICoreWebView2DownloadStartingEventArgs {
13362 pub unsafe fn DownloadOperation(&self) -> windows_core::Result<ICoreWebView2DownloadOperation> {
13363 unsafe {
13364 let mut result__ = core::mem::zeroed();
13365 (windows_core::Interface::vtable(self).DownloadOperation)(
13366 windows_core::Interface::as_raw(self),
13367 &mut result__,
13368 )
13369 .and_then(|| windows_core::Type::from_abi(result__))
13370 }
13371 }
13372 pub unsafe fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()> {
13373 unsafe {
13374 (windows_core::Interface::vtable(self).Cancel)(
13375 windows_core::Interface::as_raw(self),
13376 cancel as _,
13377 )
13378 .ok()
13379 }
13380 }
13381 pub unsafe fn SetCancel(&self, cancel: bool) -> windows_core::Result<()> {
13382 unsafe {
13383 (windows_core::Interface::vtable(self).SetCancel)(
13384 windows_core::Interface::as_raw(self),
13385 cancel.into(),
13386 )
13387 .ok()
13388 }
13389 }
13390 pub unsafe fn ResultFilePath(
13391 &self,
13392 resultfilepath: *mut windows_core::PWSTR,
13393 ) -> windows_core::Result<()> {
13394 unsafe {
13395 (windows_core::Interface::vtable(self).ResultFilePath)(
13396 windows_core::Interface::as_raw(self),
13397 resultfilepath as _,
13398 )
13399 .ok()
13400 }
13401 }
13402 pub unsafe fn SetResultFilePath<P0>(&self, resultfilepath: P0) -> windows_core::Result<()>
13403 where
13404 P0: windows_core::Param<windows_core::PCWSTR>,
13405 {
13406 unsafe {
13407 (windows_core::Interface::vtable(self).SetResultFilePath)(
13408 windows_core::Interface::as_raw(self),
13409 resultfilepath.param().abi(),
13410 )
13411 .ok()
13412 }
13413 }
13414 pub unsafe fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()> {
13415 unsafe {
13416 (windows_core::Interface::vtable(self).Handled)(
13417 windows_core::Interface::as_raw(self),
13418 handled as _,
13419 )
13420 .ok()
13421 }
13422 }
13423 pub unsafe fn SetHandled(&self, handled: bool) -> windows_core::Result<()> {
13424 unsafe {
13425 (windows_core::Interface::vtable(self).SetHandled)(
13426 windows_core::Interface::as_raw(self),
13427 handled.into(),
13428 )
13429 .ok()
13430 }
13431 }
13432 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
13433 unsafe {
13434 let mut result__ = core::mem::zeroed();
13435 (windows_core::Interface::vtable(self).GetDeferral)(
13436 windows_core::Interface::as_raw(self),
13437 &mut result__,
13438 )
13439 .and_then(|| windows_core::Type::from_abi(result__))
13440 }
13441 }
13442}
13443#[repr(C)]
13444pub struct ICoreWebView2DownloadStartingEventArgs_Vtbl {
13445 pub base__: windows_core::IUnknown_Vtbl,
13446 pub DownloadOperation: unsafe extern "system" fn(
13447 *mut core::ffi::c_void,
13448 *mut *mut core::ffi::c_void,
13449 ) -> windows_core::HRESULT,
13450 pub Cancel: unsafe extern "system" fn(
13451 *mut core::ffi::c_void,
13452 *mut windows_core::BOOL,
13453 ) -> windows_core::HRESULT,
13454 pub SetCancel: unsafe extern "system" fn(
13455 *mut core::ffi::c_void,
13456 windows_core::BOOL,
13457 ) -> windows_core::HRESULT,
13458 pub ResultFilePath: unsafe extern "system" fn(
13459 *mut core::ffi::c_void,
13460 *mut windows_core::PWSTR,
13461 ) -> windows_core::HRESULT,
13462 pub SetResultFilePath: unsafe extern "system" fn(
13463 *mut core::ffi::c_void,
13464 windows_core::PCWSTR,
13465 ) -> windows_core::HRESULT,
13466 pub Handled: unsafe extern "system" fn(
13467 *mut core::ffi::c_void,
13468 *mut windows_core::BOOL,
13469 ) -> windows_core::HRESULT,
13470 pub SetHandled: unsafe extern "system" fn(
13471 *mut core::ffi::c_void,
13472 windows_core::BOOL,
13473 ) -> windows_core::HRESULT,
13474 pub GetDeferral: unsafe extern "system" fn(
13475 *mut core::ffi::c_void,
13476 *mut *mut core::ffi::c_void,
13477 ) -> windows_core::HRESULT,
13478}
13479pub trait ICoreWebView2DownloadStartingEventArgs_Impl: windows_core::IUnknownImpl {
13480 fn DownloadOperation(&self) -> windows_core::Result<ICoreWebView2DownloadOperation>;
13481 fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()>;
13482 fn SetCancel(&self, cancel: windows_core::BOOL) -> windows_core::Result<()>;
13483 fn ResultFilePath(&self, resultfilepath: *mut windows_core::PWSTR) -> windows_core::Result<()>;
13484 fn SetResultFilePath(&self, resultfilepath: &windows_core::PCWSTR) -> windows_core::Result<()>;
13485 fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()>;
13486 fn SetHandled(&self, handled: windows_core::BOOL) -> windows_core::Result<()>;
13487 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
13488}
13489impl ICoreWebView2DownloadStartingEventArgs_Vtbl {
13490 pub const fn new<Identity: ICoreWebView2DownloadStartingEventArgs_Impl, const OFFSET: isize>(
13491 ) -> Self {
13492 unsafe extern "system" fn DownloadOperation<
13493 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13494 const OFFSET: isize,
13495 >(
13496 this: *mut core::ffi::c_void,
13497 downloadoperation: *mut *mut core::ffi::c_void,
13498 ) -> windows_core::HRESULT {
13499 unsafe {
13500 let this: &Identity =
13501 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13502 match ICoreWebView2DownloadStartingEventArgs_Impl::DownloadOperation(this) {
13503 Ok(ok__) => {
13504 downloadoperation.write(core::mem::transmute(ok__));
13505 windows_core::HRESULT(0)
13506 }
13507 Err(err) => err.into(),
13508 }
13509 }
13510 }
13511 unsafe extern "system" fn Cancel<
13512 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13513 const OFFSET: isize,
13514 >(
13515 this: *mut core::ffi::c_void,
13516 cancel: *mut windows_core::BOOL,
13517 ) -> windows_core::HRESULT {
13518 unsafe {
13519 let this: &Identity =
13520 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13521 ICoreWebView2DownloadStartingEventArgs_Impl::Cancel(
13522 this,
13523 core::mem::transmute_copy(&cancel),
13524 )
13525 .into()
13526 }
13527 }
13528 unsafe extern "system" fn SetCancel<
13529 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13530 const OFFSET: isize,
13531 >(
13532 this: *mut core::ffi::c_void,
13533 cancel: windows_core::BOOL,
13534 ) -> windows_core::HRESULT {
13535 unsafe {
13536 let this: &Identity =
13537 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13538 ICoreWebView2DownloadStartingEventArgs_Impl::SetCancel(
13539 this,
13540 core::mem::transmute_copy(&cancel),
13541 )
13542 .into()
13543 }
13544 }
13545 unsafe extern "system" fn ResultFilePath<
13546 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13547 const OFFSET: isize,
13548 >(
13549 this: *mut core::ffi::c_void,
13550 resultfilepath: *mut windows_core::PWSTR,
13551 ) -> windows_core::HRESULT {
13552 unsafe {
13553 let this: &Identity =
13554 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13555 ICoreWebView2DownloadStartingEventArgs_Impl::ResultFilePath(
13556 this,
13557 core::mem::transmute_copy(&resultfilepath),
13558 )
13559 .into()
13560 }
13561 }
13562 unsafe extern "system" fn SetResultFilePath<
13563 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13564 const OFFSET: isize,
13565 >(
13566 this: *mut core::ffi::c_void,
13567 resultfilepath: windows_core::PCWSTR,
13568 ) -> windows_core::HRESULT {
13569 unsafe {
13570 let this: &Identity =
13571 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13572 ICoreWebView2DownloadStartingEventArgs_Impl::SetResultFilePath(
13573 this,
13574 core::mem::transmute(&resultfilepath),
13575 )
13576 .into()
13577 }
13578 }
13579 unsafe extern "system" fn Handled<
13580 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13581 const OFFSET: isize,
13582 >(
13583 this: *mut core::ffi::c_void,
13584 handled: *mut windows_core::BOOL,
13585 ) -> windows_core::HRESULT {
13586 unsafe {
13587 let this: &Identity =
13588 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13589 ICoreWebView2DownloadStartingEventArgs_Impl::Handled(
13590 this,
13591 core::mem::transmute_copy(&handled),
13592 )
13593 .into()
13594 }
13595 }
13596 unsafe extern "system" fn SetHandled<
13597 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13598 const OFFSET: isize,
13599 >(
13600 this: *mut core::ffi::c_void,
13601 handled: windows_core::BOOL,
13602 ) -> windows_core::HRESULT {
13603 unsafe {
13604 let this: &Identity =
13605 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13606 ICoreWebView2DownloadStartingEventArgs_Impl::SetHandled(
13607 this,
13608 core::mem::transmute_copy(&handled),
13609 )
13610 .into()
13611 }
13612 }
13613 unsafe extern "system" fn GetDeferral<
13614 Identity: ICoreWebView2DownloadStartingEventArgs_Impl,
13615 const OFFSET: isize,
13616 >(
13617 this: *mut core::ffi::c_void,
13618 deferral: *mut *mut core::ffi::c_void,
13619 ) -> windows_core::HRESULT {
13620 unsafe {
13621 let this: &Identity =
13622 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13623 match ICoreWebView2DownloadStartingEventArgs_Impl::GetDeferral(this) {
13624 Ok(ok__) => {
13625 deferral.write(core::mem::transmute(ok__));
13626 windows_core::HRESULT(0)
13627 }
13628 Err(err) => err.into(),
13629 }
13630 }
13631 }
13632 Self {
13633 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
13634 DownloadOperation: DownloadOperation::<Identity, OFFSET>,
13635 Cancel: Cancel::<Identity, OFFSET>,
13636 SetCancel: SetCancel::<Identity, OFFSET>,
13637 ResultFilePath: ResultFilePath::<Identity, OFFSET>,
13638 SetResultFilePath: SetResultFilePath::<Identity, OFFSET>,
13639 Handled: Handled::<Identity, OFFSET>,
13640 SetHandled: SetHandled::<Identity, OFFSET>,
13641 GetDeferral: GetDeferral::<Identity, OFFSET>,
13642 }
13643 }
13644 pub fn matches(iid: &windows_core::GUID) -> bool {
13645 iid == &<ICoreWebView2DownloadStartingEventArgs as windows_core::Interface>::IID
13646 }
13647}
13648impl windows_core::RuntimeName for ICoreWebView2DownloadStartingEventArgs {}
13649windows_core::imp::define_interface!(
13650 ICoreWebView2DownloadStartingEventHandler,
13651 ICoreWebView2DownloadStartingEventHandler_Vtbl,
13652 0xefedc989_c396_41ca_83f7_07f845a55724
13653);
13654windows_core::imp::interface_hierarchy!(
13655 ICoreWebView2DownloadStartingEventHandler,
13656 windows_core::IUnknown
13657);
13658impl ICoreWebView2DownloadStartingEventHandler {
13659 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
13660 where
13661 P0: windows_core::Param<ICoreWebView2>,
13662 P1: windows_core::Param<ICoreWebView2DownloadStartingEventArgs>,
13663 {
13664 unsafe {
13665 (windows_core::Interface::vtable(self).Invoke)(
13666 windows_core::Interface::as_raw(self),
13667 sender.param().abi(),
13668 args.param().abi(),
13669 )
13670 .ok()
13671 }
13672 }
13673}
13674#[repr(C)]
13675pub struct ICoreWebView2DownloadStartingEventHandler_Vtbl {
13676 pub base__: windows_core::IUnknown_Vtbl,
13677 pub Invoke: unsafe extern "system" fn(
13678 *mut core::ffi::c_void,
13679 *mut core::ffi::c_void,
13680 *mut core::ffi::c_void,
13681 ) -> windows_core::HRESULT,
13682}
13683pub trait ICoreWebView2DownloadStartingEventHandler_Impl: windows_core::IUnknownImpl {
13684 fn Invoke(
13685 &self,
13686 sender: windows_core::Ref<'_, ICoreWebView2>,
13687 args: windows_core::Ref<'_, ICoreWebView2DownloadStartingEventArgs>,
13688 ) -> windows_core::Result<()>;
13689}
13690impl ICoreWebView2DownloadStartingEventHandler_Vtbl {
13691 pub const fn new<
13692 Identity: ICoreWebView2DownloadStartingEventHandler_Impl,
13693 const OFFSET: isize,
13694 >() -> Self {
13695 unsafe extern "system" fn Invoke<
13696 Identity: ICoreWebView2DownloadStartingEventHandler_Impl,
13697 const OFFSET: isize,
13698 >(
13699 this: *mut core::ffi::c_void,
13700 sender: *mut core::ffi::c_void,
13701 args: *mut core::ffi::c_void,
13702 ) -> windows_core::HRESULT {
13703 unsafe {
13704 let this: &Identity =
13705 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13706 ICoreWebView2DownloadStartingEventHandler_Impl::Invoke(
13707 this,
13708 core::mem::transmute_copy(&sender),
13709 core::mem::transmute_copy(&args),
13710 )
13711 .into()
13712 }
13713 }
13714 Self {
13715 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
13716 Invoke: Invoke::<Identity, OFFSET>,
13717 }
13718 }
13719 pub fn matches(iid: &windows_core::GUID) -> bool {
13720 iid == &<ICoreWebView2DownloadStartingEventHandler as windows_core::Interface>::IID
13721 }
13722}
13723impl windows_core::RuntimeName for ICoreWebView2DownloadStartingEventHandler {}
13724windows_core::imp::define_interface!(
13725 ICoreWebView2Environment,
13726 ICoreWebView2Environment_Vtbl,
13727 0xb96d755e_0319_4e92_a296_23436f46a1fc
13728);
13729windows_core::imp::interface_hierarchy!(ICoreWebView2Environment, windows_core::IUnknown);
13730impl ICoreWebView2Environment {
13731 pub unsafe fn CreateCoreWebView2Controller<P1>(
13732 &self,
13733 parentwindow: windows::Win32::Foundation::HWND,
13734 handler: P1,
13735 ) -> windows_core::Result<()>
13736 where
13737 P1: windows_core::Param<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
13738 {
13739 unsafe {
13740 (windows_core::Interface::vtable(self).CreateCoreWebView2Controller)(
13741 windows_core::Interface::as_raw(self),
13742 parentwindow,
13743 handler.param().abi(),
13744 )
13745 .ok()
13746 }
13747 }
13748 pub unsafe fn CreateWebResourceResponse<P0, P2, P3>(
13749 &self,
13750 content: P0,
13751 statuscode: i32,
13752 reasonphrase: P2,
13753 headers: P3,
13754 ) -> windows_core::Result<ICoreWebView2WebResourceResponse>
13755 where
13756 P0: windows_core::Param<windows::Win32::System::Com::IStream>,
13757 P2: windows_core::Param<windows_core::PCWSTR>,
13758 P3: windows_core::Param<windows_core::PCWSTR>,
13759 {
13760 unsafe {
13761 let mut result__ = core::mem::zeroed();
13762 (windows_core::Interface::vtable(self).CreateWebResourceResponse)(
13763 windows_core::Interface::as_raw(self),
13764 content.param().abi(),
13765 statuscode,
13766 reasonphrase.param().abi(),
13767 headers.param().abi(),
13768 &mut result__,
13769 )
13770 .and_then(|| windows_core::Type::from_abi(result__))
13771 }
13772 }
13773 pub unsafe fn BrowserVersionString(
13774 &self,
13775 versioninfo: *mut windows_core::PWSTR,
13776 ) -> windows_core::Result<()> {
13777 unsafe {
13778 (windows_core::Interface::vtable(self).BrowserVersionString)(
13779 windows_core::Interface::as_raw(self),
13780 versioninfo as _,
13781 )
13782 .ok()
13783 }
13784 }
13785 pub unsafe fn add_NewBrowserVersionAvailable<P0>(
13786 &self,
13787 eventhandler: P0,
13788 token: *mut i64,
13789 ) -> windows_core::Result<()>
13790 where
13791 P0: windows_core::Param<ICoreWebView2NewBrowserVersionAvailableEventHandler>,
13792 {
13793 unsafe {
13794 (windows_core::Interface::vtable(self).add_NewBrowserVersionAvailable)(
13795 windows_core::Interface::as_raw(self),
13796 eventhandler.param().abi(),
13797 token as _,
13798 )
13799 .ok()
13800 }
13801 }
13802 pub unsafe fn remove_NewBrowserVersionAvailable(&self, token: i64) -> windows_core::Result<()> {
13803 unsafe {
13804 (windows_core::Interface::vtable(self).remove_NewBrowserVersionAvailable)(
13805 windows_core::Interface::as_raw(self),
13806 token,
13807 )
13808 .ok()
13809 }
13810 }
13811}
13812#[repr(C)]
13813pub struct ICoreWebView2Environment_Vtbl {
13814 pub base__: windows_core::IUnknown_Vtbl,
13815 pub CreateCoreWebView2Controller: unsafe extern "system" fn(
13816 *mut core::ffi::c_void,
13817 windows::Win32::Foundation::HWND,
13818 *mut core::ffi::c_void,
13819 ) -> windows_core::HRESULT,
13820 pub CreateWebResourceResponse: unsafe extern "system" fn(
13821 *mut core::ffi::c_void,
13822 *mut core::ffi::c_void,
13823 i32,
13824 windows_core::PCWSTR,
13825 windows_core::PCWSTR,
13826 *mut *mut core::ffi::c_void,
13827 ) -> windows_core::HRESULT,
13828 pub BrowserVersionString: unsafe extern "system" fn(
13829 *mut core::ffi::c_void,
13830 *mut windows_core::PWSTR,
13831 ) -> windows_core::HRESULT,
13832 pub add_NewBrowserVersionAvailable: unsafe extern "system" fn(
13833 *mut core::ffi::c_void,
13834 *mut core::ffi::c_void,
13835 *mut i64,
13836 ) -> windows_core::HRESULT,
13837 pub remove_NewBrowserVersionAvailable:
13838 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
13839}
13840pub trait ICoreWebView2Environment_Impl: windows_core::IUnknownImpl {
13841 fn CreateCoreWebView2Controller(
13842 &self,
13843 parentwindow: windows::Win32::Foundation::HWND,
13844 handler: windows_core::Ref<'_, ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
13845 ) -> windows_core::Result<()>;
13846 fn CreateWebResourceResponse(
13847 &self,
13848 content: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
13849 statuscode: i32,
13850 reasonphrase: &windows_core::PCWSTR,
13851 headers: &windows_core::PCWSTR,
13852 ) -> windows_core::Result<ICoreWebView2WebResourceResponse>;
13853 fn BrowserVersionString(
13854 &self,
13855 versioninfo: *mut windows_core::PWSTR,
13856 ) -> windows_core::Result<()>;
13857 fn add_NewBrowserVersionAvailable(
13858 &self,
13859 eventhandler: windows_core::Ref<'_, ICoreWebView2NewBrowserVersionAvailableEventHandler>,
13860 token: *mut i64,
13861 ) -> windows_core::Result<()>;
13862 fn remove_NewBrowserVersionAvailable(&self, token: i64) -> windows_core::Result<()>;
13863}
13864impl ICoreWebView2Environment_Vtbl {
13865 pub const fn new<Identity: ICoreWebView2Environment_Impl, const OFFSET: isize>() -> Self {
13866 unsafe extern "system" fn CreateCoreWebView2Controller<
13867 Identity: ICoreWebView2Environment_Impl,
13868 const OFFSET: isize,
13869 >(
13870 this: *mut core::ffi::c_void,
13871 parentwindow: windows::Win32::Foundation::HWND,
13872 handler: *mut core::ffi::c_void,
13873 ) -> windows_core::HRESULT {
13874 unsafe {
13875 let this: &Identity =
13876 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13877 ICoreWebView2Environment_Impl::CreateCoreWebView2Controller(
13878 this,
13879 core::mem::transmute_copy(&parentwindow),
13880 core::mem::transmute_copy(&handler),
13881 )
13882 .into()
13883 }
13884 }
13885 unsafe extern "system" fn CreateWebResourceResponse<
13886 Identity: ICoreWebView2Environment_Impl,
13887 const OFFSET: isize,
13888 >(
13889 this: *mut core::ffi::c_void,
13890 content: *mut core::ffi::c_void,
13891 statuscode: i32,
13892 reasonphrase: windows_core::PCWSTR,
13893 headers: windows_core::PCWSTR,
13894 response: *mut *mut core::ffi::c_void,
13895 ) -> windows_core::HRESULT {
13896 unsafe {
13897 let this: &Identity =
13898 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13899 match ICoreWebView2Environment_Impl::CreateWebResourceResponse(
13900 this,
13901 core::mem::transmute_copy(&content),
13902 core::mem::transmute_copy(&statuscode),
13903 core::mem::transmute(&reasonphrase),
13904 core::mem::transmute(&headers),
13905 ) {
13906 Ok(ok__) => {
13907 response.write(core::mem::transmute(ok__));
13908 windows_core::HRESULT(0)
13909 }
13910 Err(err) => err.into(),
13911 }
13912 }
13913 }
13914 unsafe extern "system" fn BrowserVersionString<
13915 Identity: ICoreWebView2Environment_Impl,
13916 const OFFSET: isize,
13917 >(
13918 this: *mut core::ffi::c_void,
13919 versioninfo: *mut windows_core::PWSTR,
13920 ) -> windows_core::HRESULT {
13921 unsafe {
13922 let this: &Identity =
13923 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13924 ICoreWebView2Environment_Impl::BrowserVersionString(
13925 this,
13926 core::mem::transmute_copy(&versioninfo),
13927 )
13928 .into()
13929 }
13930 }
13931 unsafe extern "system" fn add_NewBrowserVersionAvailable<
13932 Identity: ICoreWebView2Environment_Impl,
13933 const OFFSET: isize,
13934 >(
13935 this: *mut core::ffi::c_void,
13936 eventhandler: *mut core::ffi::c_void,
13937 token: *mut i64,
13938 ) -> windows_core::HRESULT {
13939 unsafe {
13940 let this: &Identity =
13941 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13942 ICoreWebView2Environment_Impl::add_NewBrowserVersionAvailable(
13943 this,
13944 core::mem::transmute_copy(&eventhandler),
13945 core::mem::transmute_copy(&token),
13946 )
13947 .into()
13948 }
13949 }
13950 unsafe extern "system" fn remove_NewBrowserVersionAvailable<
13951 Identity: ICoreWebView2Environment_Impl,
13952 const OFFSET: isize,
13953 >(
13954 this: *mut core::ffi::c_void,
13955 token: i64,
13956 ) -> windows_core::HRESULT {
13957 unsafe {
13958 let this: &Identity =
13959 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
13960 ICoreWebView2Environment_Impl::remove_NewBrowserVersionAvailable(
13961 this,
13962 core::mem::transmute_copy(&token),
13963 )
13964 .into()
13965 }
13966 }
13967 Self {
13968 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
13969 CreateCoreWebView2Controller: CreateCoreWebView2Controller::<Identity, OFFSET>,
13970 CreateWebResourceResponse: CreateWebResourceResponse::<Identity, OFFSET>,
13971 BrowserVersionString: BrowserVersionString::<Identity, OFFSET>,
13972 add_NewBrowserVersionAvailable: add_NewBrowserVersionAvailable::<Identity, OFFSET>,
13973 remove_NewBrowserVersionAvailable: remove_NewBrowserVersionAvailable::<Identity, OFFSET>,
13974 }
13975 }
13976 pub fn matches(iid: &windows_core::GUID) -> bool {
13977 iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
13978 }
13979}
13980impl windows_core::RuntimeName for ICoreWebView2Environment {}
13981windows_core::imp::define_interface!(
13982 ICoreWebView2Environment10,
13983 ICoreWebView2Environment10_Vtbl,
13984 0xee0eb9df_6f12_46ce_b53f_3f47b9c928e0
13985);
13986impl core::ops::Deref for ICoreWebView2Environment10 {
13987 type Target = ICoreWebView2Environment9;
13988 fn deref(&self) -> &Self::Target {
13989 unsafe { core::mem::transmute(self) }
13990 }
13991}
13992windows_core::imp::interface_hierarchy!(
13993 ICoreWebView2Environment10,
13994 windows_core::IUnknown,
13995 ICoreWebView2Environment,
13996 ICoreWebView2Environment2,
13997 ICoreWebView2Environment3,
13998 ICoreWebView2Environment4,
13999 ICoreWebView2Environment5,
14000 ICoreWebView2Environment6,
14001 ICoreWebView2Environment7,
14002 ICoreWebView2Environment8,
14003 ICoreWebView2Environment9
14004);
14005impl ICoreWebView2Environment10 {
14006 pub unsafe fn CreateCoreWebView2ControllerOptions(
14007 &self,
14008 ) -> windows_core::Result<ICoreWebView2ControllerOptions> {
14009 unsafe {
14010 let mut result__ = core::mem::zeroed();
14011 (windows_core::Interface::vtable(self).CreateCoreWebView2ControllerOptions)(
14012 windows_core::Interface::as_raw(self),
14013 &mut result__,
14014 )
14015 .and_then(|| windows_core::Type::from_abi(result__))
14016 }
14017 }
14018 pub unsafe fn CreateCoreWebView2ControllerWithOptions<P1, P2>(
14019 &self,
14020 parentwindow: windows::Win32::Foundation::HWND,
14021 options: P1,
14022 handler: P2,
14023 ) -> windows_core::Result<()>
14024 where
14025 P1: windows_core::Param<ICoreWebView2ControllerOptions>,
14026 P2: windows_core::Param<ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
14027 {
14028 unsafe {
14029 (windows_core::Interface::vtable(self).CreateCoreWebView2ControllerWithOptions)(
14030 windows_core::Interface::as_raw(self),
14031 parentwindow,
14032 options.param().abi(),
14033 handler.param().abi(),
14034 )
14035 .ok()
14036 }
14037 }
14038 pub unsafe fn CreateCoreWebView2CompositionControllerWithOptions<P1, P2>(
14039 &self,
14040 parentwindow: windows::Win32::Foundation::HWND,
14041 options: P1,
14042 handler: P2,
14043 ) -> windows_core::Result<()>
14044 where
14045 P1: windows_core::Param<ICoreWebView2ControllerOptions>,
14046 P2: windows_core::Param<
14047 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
14048 >,
14049 {
14050 unsafe {
14051 (windows_core::Interface::vtable(self)
14052 .CreateCoreWebView2CompositionControllerWithOptions)(
14053 windows_core::Interface::as_raw(self),
14054 parentwindow,
14055 options.param().abi(),
14056 handler.param().abi(),
14057 )
14058 .ok()
14059 }
14060 }
14061}
14062#[repr(C)]
14063pub struct ICoreWebView2Environment10_Vtbl {
14064 pub base__: ICoreWebView2Environment9_Vtbl,
14065 pub CreateCoreWebView2ControllerOptions: unsafe extern "system" fn(
14066 *mut core::ffi::c_void,
14067 *mut *mut core::ffi::c_void,
14068 )
14069 -> windows_core::HRESULT,
14070 pub CreateCoreWebView2ControllerWithOptions: unsafe extern "system" fn(
14071 *mut core::ffi::c_void,
14072 windows::Win32::Foundation::HWND,
14073 *mut core::ffi::c_void,
14074 *mut core::ffi::c_void,
14075 )
14076 -> windows_core::HRESULT,
14077 pub CreateCoreWebView2CompositionControllerWithOptions:
14078 unsafe extern "system" fn(
14079 *mut core::ffi::c_void,
14080 windows::Win32::Foundation::HWND,
14081 *mut core::ffi::c_void,
14082 *mut core::ffi::c_void,
14083 ) -> windows_core::HRESULT,
14084}
14085pub trait ICoreWebView2Environment10_Impl: ICoreWebView2Environment9_Impl {
14086 fn CreateCoreWebView2ControllerOptions(
14087 &self,
14088 ) -> windows_core::Result<ICoreWebView2ControllerOptions>;
14089 fn CreateCoreWebView2ControllerWithOptions(
14090 &self,
14091 parentwindow: windows::Win32::Foundation::HWND,
14092 options: windows_core::Ref<'_, ICoreWebView2ControllerOptions>,
14093 handler: windows_core::Ref<'_, ICoreWebView2CreateCoreWebView2ControllerCompletedHandler>,
14094 ) -> windows_core::Result<()>;
14095 fn CreateCoreWebView2CompositionControllerWithOptions(
14096 &self,
14097 parentwindow: windows::Win32::Foundation::HWND,
14098 options: windows_core::Ref<'_, ICoreWebView2ControllerOptions>,
14099 handler: windows_core::Ref<
14100 '_,
14101 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
14102 >,
14103 ) -> windows_core::Result<()>;
14104}
14105impl ICoreWebView2Environment10_Vtbl {
14106 pub const fn new<Identity: ICoreWebView2Environment10_Impl, const OFFSET: isize>() -> Self {
14107 unsafe extern "system" fn CreateCoreWebView2ControllerOptions<
14108 Identity: ICoreWebView2Environment10_Impl,
14109 const OFFSET: isize,
14110 >(
14111 this: *mut core::ffi::c_void,
14112 value: *mut *mut core::ffi::c_void,
14113 ) -> windows_core::HRESULT {
14114 unsafe {
14115 let this: &Identity =
14116 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14117 match ICoreWebView2Environment10_Impl::CreateCoreWebView2ControllerOptions(this) {
14118 Ok(ok__) => {
14119 value.write(core::mem::transmute(ok__));
14120 windows_core::HRESULT(0)
14121 }
14122 Err(err) => err.into(),
14123 }
14124 }
14125 }
14126 unsafe extern "system" fn CreateCoreWebView2ControllerWithOptions<
14127 Identity: ICoreWebView2Environment10_Impl,
14128 const OFFSET: isize,
14129 >(
14130 this: *mut core::ffi::c_void,
14131 parentwindow: windows::Win32::Foundation::HWND,
14132 options: *mut core::ffi::c_void,
14133 handler: *mut core::ffi::c_void,
14134 ) -> windows_core::HRESULT {
14135 unsafe {
14136 let this: &Identity =
14137 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14138 ICoreWebView2Environment10_Impl::CreateCoreWebView2ControllerWithOptions(
14139 this,
14140 core::mem::transmute_copy(&parentwindow),
14141 core::mem::transmute_copy(&options),
14142 core::mem::transmute_copy(&handler),
14143 )
14144 .into()
14145 }
14146 }
14147 unsafe extern "system" fn CreateCoreWebView2CompositionControllerWithOptions<
14148 Identity: ICoreWebView2Environment10_Impl,
14149 const OFFSET: isize,
14150 >(
14151 this: *mut core::ffi::c_void,
14152 parentwindow: windows::Win32::Foundation::HWND,
14153 options: *mut core::ffi::c_void,
14154 handler: *mut core::ffi::c_void,
14155 ) -> windows_core::HRESULT {
14156 unsafe {
14157 let this: &Identity =
14158 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14159 ICoreWebView2Environment10_Impl::CreateCoreWebView2CompositionControllerWithOptions(
14160 this,
14161 core::mem::transmute_copy(&parentwindow),
14162 core::mem::transmute_copy(&options),
14163 core::mem::transmute_copy(&handler),
14164 )
14165 .into()
14166 }
14167 }
14168 Self {
14169 base__: ICoreWebView2Environment9_Vtbl::new::<Identity, OFFSET>(),
14170 CreateCoreWebView2ControllerOptions: CreateCoreWebView2ControllerOptions::<
14171 Identity,
14172 OFFSET,
14173 >,
14174 CreateCoreWebView2ControllerWithOptions: CreateCoreWebView2ControllerWithOptions::<
14175 Identity,
14176 OFFSET,
14177 >,
14178 CreateCoreWebView2CompositionControllerWithOptions:
14179 CreateCoreWebView2CompositionControllerWithOptions::<Identity, OFFSET>,
14180 }
14181 }
14182 pub fn matches(iid: &windows_core::GUID) -> bool {
14183 iid == &<ICoreWebView2Environment10 as windows_core::Interface>::IID
14184 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14185 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14186 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
14187 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
14188 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
14189 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
14190 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
14191 || iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
14192 || iid == &<ICoreWebView2Environment9 as windows_core::Interface>::IID
14193 }
14194}
14195impl windows_core::RuntimeName for ICoreWebView2Environment10 {}
14196windows_core::imp::define_interface!(
14197 ICoreWebView2Environment11,
14198 ICoreWebView2Environment11_Vtbl,
14199 0xf0913dc6_a0ec_42ef_9805_91dff3a2966a
14200);
14201impl core::ops::Deref for ICoreWebView2Environment11 {
14202 type Target = ICoreWebView2Environment10;
14203 fn deref(&self) -> &Self::Target {
14204 unsafe { core::mem::transmute(self) }
14205 }
14206}
14207windows_core::imp::interface_hierarchy!(
14208 ICoreWebView2Environment11,
14209 windows_core::IUnknown,
14210 ICoreWebView2Environment,
14211 ICoreWebView2Environment2,
14212 ICoreWebView2Environment3,
14213 ICoreWebView2Environment4,
14214 ICoreWebView2Environment5,
14215 ICoreWebView2Environment6,
14216 ICoreWebView2Environment7,
14217 ICoreWebView2Environment8,
14218 ICoreWebView2Environment9,
14219 ICoreWebView2Environment10
14220);
14221impl ICoreWebView2Environment11 {
14222 pub unsafe fn FailureReportFolderPath(
14223 &self,
14224 value: *mut windows_core::PWSTR,
14225 ) -> windows_core::Result<()> {
14226 unsafe {
14227 (windows_core::Interface::vtable(self).FailureReportFolderPath)(
14228 windows_core::Interface::as_raw(self),
14229 value as _,
14230 )
14231 .ok()
14232 }
14233 }
14234}
14235#[repr(C)]
14236pub struct ICoreWebView2Environment11_Vtbl {
14237 pub base__: ICoreWebView2Environment10_Vtbl,
14238 pub FailureReportFolderPath: unsafe extern "system" fn(
14239 *mut core::ffi::c_void,
14240 *mut windows_core::PWSTR,
14241 ) -> windows_core::HRESULT,
14242}
14243pub trait ICoreWebView2Environment11_Impl: ICoreWebView2Environment10_Impl {
14244 fn FailureReportFolderPath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
14245}
14246impl ICoreWebView2Environment11_Vtbl {
14247 pub const fn new<Identity: ICoreWebView2Environment11_Impl, const OFFSET: isize>() -> Self {
14248 unsafe extern "system" fn FailureReportFolderPath<
14249 Identity: ICoreWebView2Environment11_Impl,
14250 const OFFSET: isize,
14251 >(
14252 this: *mut core::ffi::c_void,
14253 value: *mut windows_core::PWSTR,
14254 ) -> windows_core::HRESULT {
14255 unsafe {
14256 let this: &Identity =
14257 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14258 ICoreWebView2Environment11_Impl::FailureReportFolderPath(
14259 this,
14260 core::mem::transmute_copy(&value),
14261 )
14262 .into()
14263 }
14264 }
14265 Self {
14266 base__: ICoreWebView2Environment10_Vtbl::new::<Identity, OFFSET>(),
14267 FailureReportFolderPath: FailureReportFolderPath::<Identity, OFFSET>,
14268 }
14269 }
14270 pub fn matches(iid: &windows_core::GUID) -> bool {
14271 iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
14272 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14273 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14274 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
14275 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
14276 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
14277 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
14278 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
14279 || iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
14280 || iid == &<ICoreWebView2Environment9 as windows_core::Interface>::IID
14281 || iid == &<ICoreWebView2Environment10 as windows_core::Interface>::IID
14282 }
14283}
14284impl windows_core::RuntimeName for ICoreWebView2Environment11 {}
14285windows_core::imp::define_interface!(
14286 ICoreWebView2Environment12,
14287 ICoreWebView2Environment12_Vtbl,
14288 0xf503db9b_739f_48dd_b151_fdfcf253f54e
14289);
14290impl core::ops::Deref for ICoreWebView2Environment12 {
14291 type Target = ICoreWebView2Environment11;
14292 fn deref(&self) -> &Self::Target {
14293 unsafe { core::mem::transmute(self) }
14294 }
14295}
14296windows_core::imp::interface_hierarchy!(
14297 ICoreWebView2Environment12,
14298 windows_core::IUnknown,
14299 ICoreWebView2Environment,
14300 ICoreWebView2Environment2,
14301 ICoreWebView2Environment3,
14302 ICoreWebView2Environment4,
14303 ICoreWebView2Environment5,
14304 ICoreWebView2Environment6,
14305 ICoreWebView2Environment7,
14306 ICoreWebView2Environment8,
14307 ICoreWebView2Environment9,
14308 ICoreWebView2Environment10,
14309 ICoreWebView2Environment11
14310);
14311impl ICoreWebView2Environment12 {
14312 pub unsafe fn CreateSharedBuffer(
14313 &self,
14314 size: u64,
14315 ) -> windows_core::Result<ICoreWebView2SharedBuffer> {
14316 unsafe {
14317 let mut result__ = core::mem::zeroed();
14318 (windows_core::Interface::vtable(self).CreateSharedBuffer)(
14319 windows_core::Interface::as_raw(self),
14320 size,
14321 &mut result__,
14322 )
14323 .and_then(|| windows_core::Type::from_abi(result__))
14324 }
14325 }
14326}
14327#[repr(C)]
14328pub struct ICoreWebView2Environment12_Vtbl {
14329 pub base__: ICoreWebView2Environment11_Vtbl,
14330 pub CreateSharedBuffer: unsafe extern "system" fn(
14331 *mut core::ffi::c_void,
14332 u64,
14333 *mut *mut core::ffi::c_void,
14334 ) -> windows_core::HRESULT,
14335}
14336pub trait ICoreWebView2Environment12_Impl: ICoreWebView2Environment11_Impl {
14337 fn CreateSharedBuffer(&self, size: u64) -> windows_core::Result<ICoreWebView2SharedBuffer>;
14338}
14339impl ICoreWebView2Environment12_Vtbl {
14340 pub const fn new<Identity: ICoreWebView2Environment12_Impl, const OFFSET: isize>() -> Self {
14341 unsafe extern "system" fn CreateSharedBuffer<
14342 Identity: ICoreWebView2Environment12_Impl,
14343 const OFFSET: isize,
14344 >(
14345 this: *mut core::ffi::c_void,
14346 size: u64,
14347 value: *mut *mut core::ffi::c_void,
14348 ) -> windows_core::HRESULT {
14349 unsafe {
14350 let this: &Identity =
14351 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14352 match ICoreWebView2Environment12_Impl::CreateSharedBuffer(
14353 this,
14354 core::mem::transmute_copy(&size),
14355 ) {
14356 Ok(ok__) => {
14357 value.write(core::mem::transmute(ok__));
14358 windows_core::HRESULT(0)
14359 }
14360 Err(err) => err.into(),
14361 }
14362 }
14363 }
14364 Self {
14365 base__: ICoreWebView2Environment11_Vtbl::new::<Identity, OFFSET>(),
14366 CreateSharedBuffer: CreateSharedBuffer::<Identity, OFFSET>,
14367 }
14368 }
14369 pub fn matches(iid: &windows_core::GUID) -> bool {
14370 iid == &<ICoreWebView2Environment12 as windows_core::Interface>::IID
14371 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14372 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14373 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
14374 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
14375 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
14376 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
14377 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
14378 || iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
14379 || iid == &<ICoreWebView2Environment9 as windows_core::Interface>::IID
14380 || iid == &<ICoreWebView2Environment10 as windows_core::Interface>::IID
14381 || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
14382 }
14383}
14384impl windows_core::RuntimeName for ICoreWebView2Environment12 {}
14385windows_core::imp::define_interface!(
14386 ICoreWebView2Environment13,
14387 ICoreWebView2Environment13_Vtbl,
14388 0xaf641f58_72b2_11ee_b962_0242ac120002
14389);
14390impl core::ops::Deref for ICoreWebView2Environment13 {
14391 type Target = ICoreWebView2Environment12;
14392 fn deref(&self) -> &Self::Target {
14393 unsafe { core::mem::transmute(self) }
14394 }
14395}
14396windows_core::imp::interface_hierarchy!(
14397 ICoreWebView2Environment13,
14398 windows_core::IUnknown,
14399 ICoreWebView2Environment,
14400 ICoreWebView2Environment2,
14401 ICoreWebView2Environment3,
14402 ICoreWebView2Environment4,
14403 ICoreWebView2Environment5,
14404 ICoreWebView2Environment6,
14405 ICoreWebView2Environment7,
14406 ICoreWebView2Environment8,
14407 ICoreWebView2Environment9,
14408 ICoreWebView2Environment10,
14409 ICoreWebView2Environment11,
14410 ICoreWebView2Environment12
14411);
14412impl ICoreWebView2Environment13 {
14413 pub unsafe fn GetProcessExtendedInfos<P0>(&self, handler: P0) -> windows_core::Result<()>
14414 where
14415 P0: windows_core::Param<ICoreWebView2GetProcessExtendedInfosCompletedHandler>,
14416 {
14417 unsafe {
14418 (windows_core::Interface::vtable(self).GetProcessExtendedInfos)(
14419 windows_core::Interface::as_raw(self),
14420 handler.param().abi(),
14421 )
14422 .ok()
14423 }
14424 }
14425}
14426#[repr(C)]
14427pub struct ICoreWebView2Environment13_Vtbl {
14428 pub base__: ICoreWebView2Environment12_Vtbl,
14429 pub GetProcessExtendedInfos: unsafe extern "system" fn(
14430 *mut core::ffi::c_void,
14431 *mut core::ffi::c_void,
14432 ) -> windows_core::HRESULT,
14433}
14434pub trait ICoreWebView2Environment13_Impl: ICoreWebView2Environment12_Impl {
14435 fn GetProcessExtendedInfos(
14436 &self,
14437 handler: windows_core::Ref<'_, ICoreWebView2GetProcessExtendedInfosCompletedHandler>,
14438 ) -> windows_core::Result<()>;
14439}
14440impl ICoreWebView2Environment13_Vtbl {
14441 pub const fn new<Identity: ICoreWebView2Environment13_Impl, const OFFSET: isize>() -> Self {
14442 unsafe extern "system" fn GetProcessExtendedInfos<
14443 Identity: ICoreWebView2Environment13_Impl,
14444 const OFFSET: isize,
14445 >(
14446 this: *mut core::ffi::c_void,
14447 handler: *mut core::ffi::c_void,
14448 ) -> windows_core::HRESULT {
14449 unsafe {
14450 let this: &Identity =
14451 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14452 ICoreWebView2Environment13_Impl::GetProcessExtendedInfos(
14453 this,
14454 core::mem::transmute_copy(&handler),
14455 )
14456 .into()
14457 }
14458 }
14459 Self {
14460 base__: ICoreWebView2Environment12_Vtbl::new::<Identity, OFFSET>(),
14461 GetProcessExtendedInfos: GetProcessExtendedInfos::<Identity, OFFSET>,
14462 }
14463 }
14464 pub fn matches(iid: &windows_core::GUID) -> bool {
14465 iid == &<ICoreWebView2Environment13 as windows_core::Interface>::IID
14466 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14467 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14468 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
14469 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
14470 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
14471 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
14472 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
14473 || iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
14474 || iid == &<ICoreWebView2Environment9 as windows_core::Interface>::IID
14475 || iid == &<ICoreWebView2Environment10 as windows_core::Interface>::IID
14476 || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
14477 || iid == &<ICoreWebView2Environment12 as windows_core::Interface>::IID
14478 }
14479}
14480impl windows_core::RuntimeName for ICoreWebView2Environment13 {}
14481windows_core::imp::define_interface!(
14482 ICoreWebView2Environment14,
14483 ICoreWebView2Environment14_Vtbl,
14484 0xa5e9fad9_c875_59da_9bd7_473aa5ca1cef
14485);
14486impl core::ops::Deref for ICoreWebView2Environment14 {
14487 type Target = ICoreWebView2Environment13;
14488 fn deref(&self) -> &Self::Target {
14489 unsafe { core::mem::transmute(self) }
14490 }
14491}
14492windows_core::imp::interface_hierarchy!(
14493 ICoreWebView2Environment14,
14494 windows_core::IUnknown,
14495 ICoreWebView2Environment,
14496 ICoreWebView2Environment2,
14497 ICoreWebView2Environment3,
14498 ICoreWebView2Environment4,
14499 ICoreWebView2Environment5,
14500 ICoreWebView2Environment6,
14501 ICoreWebView2Environment7,
14502 ICoreWebView2Environment8,
14503 ICoreWebView2Environment9,
14504 ICoreWebView2Environment10,
14505 ICoreWebView2Environment11,
14506 ICoreWebView2Environment12,
14507 ICoreWebView2Environment13
14508);
14509impl ICoreWebView2Environment14 {
14510 pub unsafe fn CreateWebFileSystemFileHandle<P0>(
14511 &self,
14512 path: P0,
14513 permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14514 ) -> windows_core::Result<ICoreWebView2FileSystemHandle>
14515 where
14516 P0: windows_core::Param<windows_core::PCWSTR>,
14517 {
14518 unsafe {
14519 let mut result__ = core::mem::zeroed();
14520 (windows_core::Interface::vtable(self).CreateWebFileSystemFileHandle)(
14521 windows_core::Interface::as_raw(self),
14522 path.param().abi(),
14523 permission,
14524 &mut result__,
14525 )
14526 .and_then(|| windows_core::Type::from_abi(result__))
14527 }
14528 }
14529 pub unsafe fn CreateWebFileSystemDirectoryHandle<P0>(
14530 &self,
14531 path: P0,
14532 permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14533 ) -> windows_core::Result<ICoreWebView2FileSystemHandle>
14534 where
14535 P0: windows_core::Param<windows_core::PCWSTR>,
14536 {
14537 unsafe {
14538 let mut result__ = core::mem::zeroed();
14539 (windows_core::Interface::vtable(self).CreateWebFileSystemDirectoryHandle)(
14540 windows_core::Interface::as_raw(self),
14541 path.param().abi(),
14542 permission,
14543 &mut result__,
14544 )
14545 .and_then(|| windows_core::Type::from_abi(result__))
14546 }
14547 }
14548 pub unsafe fn CreateObjectCollection(
14549 &self,
14550 length: u32,
14551 items: *mut Option<windows_core::IUnknown>,
14552 objectcollection: *mut Option<ICoreWebView2ObjectCollection>,
14553 ) -> windows_core::Result<()> {
14554 unsafe {
14555 (windows_core::Interface::vtable(self).CreateObjectCollection)(
14556 windows_core::Interface::as_raw(self),
14557 length,
14558 core::mem::transmute(items),
14559 core::mem::transmute(objectcollection),
14560 )
14561 .ok()
14562 }
14563 }
14564}
14565#[repr(C)]
14566pub struct ICoreWebView2Environment14_Vtbl {
14567 pub base__: ICoreWebView2Environment13_Vtbl,
14568 pub CreateWebFileSystemFileHandle: unsafe extern "system" fn(
14569 *mut core::ffi::c_void,
14570 windows_core::PCWSTR,
14571 COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14572 *mut *mut core::ffi::c_void,
14573 ) -> windows_core::HRESULT,
14574 pub CreateWebFileSystemDirectoryHandle: unsafe extern "system" fn(
14575 *mut core::ffi::c_void,
14576 windows_core::PCWSTR,
14577 COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14578 *mut *mut core::ffi::c_void,
14579 ) -> windows_core::HRESULT,
14580 pub CreateObjectCollection: unsafe extern "system" fn(
14581 *mut core::ffi::c_void,
14582 u32,
14583 *mut *mut core::ffi::c_void,
14584 *mut *mut core::ffi::c_void,
14585 ) -> windows_core::HRESULT,
14586}
14587pub trait ICoreWebView2Environment14_Impl: ICoreWebView2Environment13_Impl {
14588 fn CreateWebFileSystemFileHandle(
14589 &self,
14590 path: &windows_core::PCWSTR,
14591 permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14592 ) -> windows_core::Result<ICoreWebView2FileSystemHandle>;
14593 fn CreateWebFileSystemDirectoryHandle(
14594 &self,
14595 path: &windows_core::PCWSTR,
14596 permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14597 ) -> windows_core::Result<ICoreWebView2FileSystemHandle>;
14598 fn CreateObjectCollection(
14599 &self,
14600 length: u32,
14601 items: windows_core::OutRef<'_, windows_core::IUnknown>,
14602 objectcollection: windows_core::OutRef<'_, ICoreWebView2ObjectCollection>,
14603 ) -> windows_core::Result<()>;
14604}
14605impl ICoreWebView2Environment14_Vtbl {
14606 pub const fn new<Identity: ICoreWebView2Environment14_Impl, const OFFSET: isize>() -> Self {
14607 unsafe extern "system" fn CreateWebFileSystemFileHandle<
14608 Identity: ICoreWebView2Environment14_Impl,
14609 const OFFSET: isize,
14610 >(
14611 this: *mut core::ffi::c_void,
14612 path: windows_core::PCWSTR,
14613 permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14614 value: *mut *mut core::ffi::c_void,
14615 ) -> windows_core::HRESULT {
14616 unsafe {
14617 let this: &Identity =
14618 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14619 match ICoreWebView2Environment14_Impl::CreateWebFileSystemFileHandle(
14620 this,
14621 core::mem::transmute(&path),
14622 core::mem::transmute_copy(&permission),
14623 ) {
14624 Ok(ok__) => {
14625 value.write(core::mem::transmute(ok__));
14626 windows_core::HRESULT(0)
14627 }
14628 Err(err) => err.into(),
14629 }
14630 }
14631 }
14632 unsafe extern "system" fn CreateWebFileSystemDirectoryHandle<
14633 Identity: ICoreWebView2Environment14_Impl,
14634 const OFFSET: isize,
14635 >(
14636 this: *mut core::ffi::c_void,
14637 path: windows_core::PCWSTR,
14638 permission: COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
14639 value: *mut *mut core::ffi::c_void,
14640 ) -> windows_core::HRESULT {
14641 unsafe {
14642 let this: &Identity =
14643 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14644 match ICoreWebView2Environment14_Impl::CreateWebFileSystemDirectoryHandle(
14645 this,
14646 core::mem::transmute(&path),
14647 core::mem::transmute_copy(&permission),
14648 ) {
14649 Ok(ok__) => {
14650 value.write(core::mem::transmute(ok__));
14651 windows_core::HRESULT(0)
14652 }
14653 Err(err) => err.into(),
14654 }
14655 }
14656 }
14657 unsafe extern "system" fn CreateObjectCollection<
14658 Identity: ICoreWebView2Environment14_Impl,
14659 const OFFSET: isize,
14660 >(
14661 this: *mut core::ffi::c_void,
14662 length: u32,
14663 items: *mut *mut core::ffi::c_void,
14664 objectcollection: *mut *mut core::ffi::c_void,
14665 ) -> windows_core::HRESULT {
14666 unsafe {
14667 let this: &Identity =
14668 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14669 ICoreWebView2Environment14_Impl::CreateObjectCollection(
14670 this,
14671 core::mem::transmute_copy(&length),
14672 core::mem::transmute_copy(&items),
14673 core::mem::transmute_copy(&objectcollection),
14674 )
14675 .into()
14676 }
14677 }
14678 Self {
14679 base__: ICoreWebView2Environment13_Vtbl::new::<Identity, OFFSET>(),
14680 CreateWebFileSystemFileHandle: CreateWebFileSystemFileHandle::<Identity, OFFSET>,
14681 CreateWebFileSystemDirectoryHandle: CreateWebFileSystemDirectoryHandle::<
14682 Identity,
14683 OFFSET,
14684 >,
14685 CreateObjectCollection: CreateObjectCollection::<Identity, OFFSET>,
14686 }
14687 }
14688 pub fn matches(iid: &windows_core::GUID) -> bool {
14689 iid == &<ICoreWebView2Environment14 as windows_core::Interface>::IID
14690 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14691 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14692 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
14693 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
14694 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
14695 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
14696 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
14697 || iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
14698 || iid == &<ICoreWebView2Environment9 as windows_core::Interface>::IID
14699 || iid == &<ICoreWebView2Environment10 as windows_core::Interface>::IID
14700 || iid == &<ICoreWebView2Environment11 as windows_core::Interface>::IID
14701 || iid == &<ICoreWebView2Environment12 as windows_core::Interface>::IID
14702 || iid == &<ICoreWebView2Environment13 as windows_core::Interface>::IID
14703 }
14704}
14705impl windows_core::RuntimeName for ICoreWebView2Environment14 {}
14706windows_core::imp::define_interface!(
14707 ICoreWebView2Environment2,
14708 ICoreWebView2Environment2_Vtbl,
14709 0x41f3632b_5ef4_404f_ad82_2d606c5a9a21
14710);
14711impl core::ops::Deref for ICoreWebView2Environment2 {
14712 type Target = ICoreWebView2Environment;
14713 fn deref(&self) -> &Self::Target {
14714 unsafe { core::mem::transmute(self) }
14715 }
14716}
14717windows_core::imp::interface_hierarchy!(
14718 ICoreWebView2Environment2,
14719 windows_core::IUnknown,
14720 ICoreWebView2Environment
14721);
14722impl ICoreWebView2Environment2 {
14723 pub unsafe fn CreateWebResourceRequest<P0, P1, P2, P3>(
14724 &self,
14725 uri: P0,
14726 method: P1,
14727 postdata: P2,
14728 headers: P3,
14729 ) -> windows_core::Result<ICoreWebView2WebResourceRequest>
14730 where
14731 P0: windows_core::Param<windows_core::PCWSTR>,
14732 P1: windows_core::Param<windows_core::PCWSTR>,
14733 P2: windows_core::Param<windows::Win32::System::Com::IStream>,
14734 P3: windows_core::Param<windows_core::PCWSTR>,
14735 {
14736 unsafe {
14737 let mut result__ = core::mem::zeroed();
14738 (windows_core::Interface::vtable(self).CreateWebResourceRequest)(
14739 windows_core::Interface::as_raw(self),
14740 uri.param().abi(),
14741 method.param().abi(),
14742 postdata.param().abi(),
14743 headers.param().abi(),
14744 &mut result__,
14745 )
14746 .and_then(|| windows_core::Type::from_abi(result__))
14747 }
14748 }
14749}
14750#[repr(C)]
14751pub struct ICoreWebView2Environment2_Vtbl {
14752 pub base__: ICoreWebView2Environment_Vtbl,
14753 pub CreateWebResourceRequest: unsafe extern "system" fn(
14754 *mut core::ffi::c_void,
14755 windows_core::PCWSTR,
14756 windows_core::PCWSTR,
14757 *mut core::ffi::c_void,
14758 windows_core::PCWSTR,
14759 *mut *mut core::ffi::c_void,
14760 ) -> windows_core::HRESULT,
14761}
14762pub trait ICoreWebView2Environment2_Impl: ICoreWebView2Environment_Impl {
14763 fn CreateWebResourceRequest(
14764 &self,
14765 uri: &windows_core::PCWSTR,
14766 method: &windows_core::PCWSTR,
14767 postdata: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
14768 headers: &windows_core::PCWSTR,
14769 ) -> windows_core::Result<ICoreWebView2WebResourceRequest>;
14770}
14771impl ICoreWebView2Environment2_Vtbl {
14772 pub const fn new<Identity: ICoreWebView2Environment2_Impl, const OFFSET: isize>() -> Self {
14773 unsafe extern "system" fn CreateWebResourceRequest<
14774 Identity: ICoreWebView2Environment2_Impl,
14775 const OFFSET: isize,
14776 >(
14777 this: *mut core::ffi::c_void,
14778 uri: windows_core::PCWSTR,
14779 method: windows_core::PCWSTR,
14780 postdata: *mut core::ffi::c_void,
14781 headers: windows_core::PCWSTR,
14782 value: *mut *mut core::ffi::c_void,
14783 ) -> windows_core::HRESULT {
14784 unsafe {
14785 let this: &Identity =
14786 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14787 match ICoreWebView2Environment2_Impl::CreateWebResourceRequest(
14788 this,
14789 core::mem::transmute(&uri),
14790 core::mem::transmute(&method),
14791 core::mem::transmute_copy(&postdata),
14792 core::mem::transmute(&headers),
14793 ) {
14794 Ok(ok__) => {
14795 value.write(core::mem::transmute(ok__));
14796 windows_core::HRESULT(0)
14797 }
14798 Err(err) => err.into(),
14799 }
14800 }
14801 }
14802 Self {
14803 base__: ICoreWebView2Environment_Vtbl::new::<Identity, OFFSET>(),
14804 CreateWebResourceRequest: CreateWebResourceRequest::<Identity, OFFSET>,
14805 }
14806 }
14807 pub fn matches(iid: &windows_core::GUID) -> bool {
14808 iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14809 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14810 }
14811}
14812impl windows_core::RuntimeName for ICoreWebView2Environment2 {}
14813windows_core::imp::define_interface!(
14814 ICoreWebView2Environment3,
14815 ICoreWebView2Environment3_Vtbl,
14816 0x80a22ae3_be7c_4ce2_afe1_5a50056cdeeb
14817);
14818impl core::ops::Deref for ICoreWebView2Environment3 {
14819 type Target = ICoreWebView2Environment2;
14820 fn deref(&self) -> &Self::Target {
14821 unsafe { core::mem::transmute(self) }
14822 }
14823}
14824windows_core::imp::interface_hierarchy!(
14825 ICoreWebView2Environment3,
14826 windows_core::IUnknown,
14827 ICoreWebView2Environment,
14828 ICoreWebView2Environment2
14829);
14830impl ICoreWebView2Environment3 {
14831 pub unsafe fn CreateCoreWebView2CompositionController<P1>(
14832 &self,
14833 parentwindow: windows::Win32::Foundation::HWND,
14834 handler: P1,
14835 ) -> windows_core::Result<()>
14836 where
14837 P1: windows_core::Param<
14838 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
14839 >,
14840 {
14841 unsafe {
14842 (windows_core::Interface::vtable(self).CreateCoreWebView2CompositionController)(
14843 windows_core::Interface::as_raw(self),
14844 parentwindow,
14845 handler.param().abi(),
14846 )
14847 .ok()
14848 }
14849 }
14850 pub unsafe fn CreateCoreWebView2PointerInfo(
14851 &self,
14852 ) -> windows_core::Result<ICoreWebView2PointerInfo> {
14853 unsafe {
14854 let mut result__ = core::mem::zeroed();
14855 (windows_core::Interface::vtable(self).CreateCoreWebView2PointerInfo)(
14856 windows_core::Interface::as_raw(self),
14857 &mut result__,
14858 )
14859 .and_then(|| windows_core::Type::from_abi(result__))
14860 }
14861 }
14862}
14863#[repr(C)]
14864pub struct ICoreWebView2Environment3_Vtbl {
14865 pub base__: ICoreWebView2Environment2_Vtbl,
14866 pub CreateCoreWebView2CompositionController: unsafe extern "system" fn(
14867 *mut core::ffi::c_void,
14868 windows::Win32::Foundation::HWND,
14869 *mut core::ffi::c_void,
14870 )
14871 -> windows_core::HRESULT,
14872 pub CreateCoreWebView2PointerInfo: unsafe extern "system" fn(
14873 *mut core::ffi::c_void,
14874 *mut *mut core::ffi::c_void,
14875 ) -> windows_core::HRESULT,
14876}
14877pub trait ICoreWebView2Environment3_Impl: ICoreWebView2Environment2_Impl {
14878 fn CreateCoreWebView2CompositionController(
14879 &self,
14880 parentwindow: windows::Win32::Foundation::HWND,
14881 handler: windows_core::Ref<
14882 '_,
14883 ICoreWebView2CreateCoreWebView2CompositionControllerCompletedHandler,
14884 >,
14885 ) -> windows_core::Result<()>;
14886 fn CreateCoreWebView2PointerInfo(&self) -> windows_core::Result<ICoreWebView2PointerInfo>;
14887}
14888impl ICoreWebView2Environment3_Vtbl {
14889 pub const fn new<Identity: ICoreWebView2Environment3_Impl, const OFFSET: isize>() -> Self {
14890 unsafe extern "system" fn CreateCoreWebView2CompositionController<
14891 Identity: ICoreWebView2Environment3_Impl,
14892 const OFFSET: isize,
14893 >(
14894 this: *mut core::ffi::c_void,
14895 parentwindow: windows::Win32::Foundation::HWND,
14896 handler: *mut core::ffi::c_void,
14897 ) -> windows_core::HRESULT {
14898 unsafe {
14899 let this: &Identity =
14900 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14901 ICoreWebView2Environment3_Impl::CreateCoreWebView2CompositionController(
14902 this,
14903 core::mem::transmute_copy(&parentwindow),
14904 core::mem::transmute_copy(&handler),
14905 )
14906 .into()
14907 }
14908 }
14909 unsafe extern "system" fn CreateCoreWebView2PointerInfo<
14910 Identity: ICoreWebView2Environment3_Impl,
14911 const OFFSET: isize,
14912 >(
14913 this: *mut core::ffi::c_void,
14914 value: *mut *mut core::ffi::c_void,
14915 ) -> windows_core::HRESULT {
14916 unsafe {
14917 let this: &Identity =
14918 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
14919 match ICoreWebView2Environment3_Impl::CreateCoreWebView2PointerInfo(this) {
14920 Ok(ok__) => {
14921 value.write(core::mem::transmute(ok__));
14922 windows_core::HRESULT(0)
14923 }
14924 Err(err) => err.into(),
14925 }
14926 }
14927 }
14928 Self {
14929 base__: ICoreWebView2Environment2_Vtbl::new::<Identity, OFFSET>(),
14930 CreateCoreWebView2CompositionController: CreateCoreWebView2CompositionController::<
14931 Identity,
14932 OFFSET,
14933 >,
14934 CreateCoreWebView2PointerInfo: CreateCoreWebView2PointerInfo::<Identity, OFFSET>,
14935 }
14936 }
14937 pub fn matches(iid: &windows_core::GUID) -> bool {
14938 iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
14939 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
14940 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
14941 }
14942}
14943impl windows_core::RuntimeName for ICoreWebView2Environment3 {}
14944windows_core::imp::define_interface!(
14945 ICoreWebView2Environment4,
14946 ICoreWebView2Environment4_Vtbl,
14947 0x20944379_6dcf_41d6_a0a0_abc0fc50de0d
14948);
14949impl core::ops::Deref for ICoreWebView2Environment4 {
14950 type Target = ICoreWebView2Environment3;
14951 fn deref(&self) -> &Self::Target {
14952 unsafe { core::mem::transmute(self) }
14953 }
14954}
14955windows_core::imp::interface_hierarchy!(
14956 ICoreWebView2Environment4,
14957 windows_core::IUnknown,
14958 ICoreWebView2Environment,
14959 ICoreWebView2Environment2,
14960 ICoreWebView2Environment3
14961);
14962impl ICoreWebView2Environment4 {
14963 pub unsafe fn GetAutomationProviderForWindow(
14964 &self,
14965 hwnd: windows::Win32::Foundation::HWND,
14966 ) -> windows_core::Result<windows_core::IUnknown> {
14967 unsafe {
14968 let mut result__ = core::mem::zeroed();
14969 (windows_core::Interface::vtable(self).GetAutomationProviderForWindow)(
14970 windows_core::Interface::as_raw(self),
14971 hwnd,
14972 &mut result__,
14973 )
14974 .and_then(|| windows_core::Type::from_abi(result__))
14975 }
14976 }
14977}
14978#[repr(C)]
14979pub struct ICoreWebView2Environment4_Vtbl {
14980 pub base__: ICoreWebView2Environment3_Vtbl,
14981 pub GetAutomationProviderForWindow: unsafe extern "system" fn(
14982 *mut core::ffi::c_void,
14983 windows::Win32::Foundation::HWND,
14984 *mut *mut core::ffi::c_void,
14985 ) -> windows_core::HRESULT,
14986}
14987pub trait ICoreWebView2Environment4_Impl: ICoreWebView2Environment3_Impl {
14988 fn GetAutomationProviderForWindow(
14989 &self,
14990 hwnd: windows::Win32::Foundation::HWND,
14991 ) -> windows_core::Result<windows_core::IUnknown>;
14992}
14993impl ICoreWebView2Environment4_Vtbl {
14994 pub const fn new<Identity: ICoreWebView2Environment4_Impl, const OFFSET: isize>() -> Self {
14995 unsafe extern "system" fn GetAutomationProviderForWindow<
14996 Identity: ICoreWebView2Environment4_Impl,
14997 const OFFSET: isize,
14998 >(
14999 this: *mut core::ffi::c_void,
15000 hwnd: windows::Win32::Foundation::HWND,
15001 value: *mut *mut core::ffi::c_void,
15002 ) -> windows_core::HRESULT {
15003 unsafe {
15004 let this: &Identity =
15005 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15006 match ICoreWebView2Environment4_Impl::GetAutomationProviderForWindow(
15007 this,
15008 core::mem::transmute_copy(&hwnd),
15009 ) {
15010 Ok(ok__) => {
15011 value.write(core::mem::transmute(ok__));
15012 windows_core::HRESULT(0)
15013 }
15014 Err(err) => err.into(),
15015 }
15016 }
15017 }
15018 Self {
15019 base__: ICoreWebView2Environment3_Vtbl::new::<Identity, OFFSET>(),
15020 GetAutomationProviderForWindow: GetAutomationProviderForWindow::<Identity, OFFSET>,
15021 }
15022 }
15023 pub fn matches(iid: &windows_core::GUID) -> bool {
15024 iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
15025 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
15026 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
15027 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
15028 }
15029}
15030impl windows_core::RuntimeName for ICoreWebView2Environment4 {}
15031windows_core::imp::define_interface!(
15032 ICoreWebView2Environment5,
15033 ICoreWebView2Environment5_Vtbl,
15034 0x319e423d_e0d7_4b8d_9254_ae9475de9b17
15035);
15036impl core::ops::Deref for ICoreWebView2Environment5 {
15037 type Target = ICoreWebView2Environment4;
15038 fn deref(&self) -> &Self::Target {
15039 unsafe { core::mem::transmute(self) }
15040 }
15041}
15042windows_core::imp::interface_hierarchy!(
15043 ICoreWebView2Environment5,
15044 windows_core::IUnknown,
15045 ICoreWebView2Environment,
15046 ICoreWebView2Environment2,
15047 ICoreWebView2Environment3,
15048 ICoreWebView2Environment4
15049);
15050impl ICoreWebView2Environment5 {
15051 pub unsafe fn add_BrowserProcessExited<P0>(
15052 &self,
15053 eventhandler: P0,
15054 token: *mut i64,
15055 ) -> windows_core::Result<()>
15056 where
15057 P0: windows_core::Param<ICoreWebView2BrowserProcessExitedEventHandler>,
15058 {
15059 unsafe {
15060 (windows_core::Interface::vtable(self).add_BrowserProcessExited)(
15061 windows_core::Interface::as_raw(self),
15062 eventhandler.param().abi(),
15063 token as _,
15064 )
15065 .ok()
15066 }
15067 }
15068 pub unsafe fn remove_BrowserProcessExited(&self, token: i64) -> windows_core::Result<()> {
15069 unsafe {
15070 (windows_core::Interface::vtable(self).remove_BrowserProcessExited)(
15071 windows_core::Interface::as_raw(self),
15072 token,
15073 )
15074 .ok()
15075 }
15076 }
15077}
15078#[repr(C)]
15079pub struct ICoreWebView2Environment5_Vtbl {
15080 pub base__: ICoreWebView2Environment4_Vtbl,
15081 pub add_BrowserProcessExited: unsafe extern "system" fn(
15082 *mut core::ffi::c_void,
15083 *mut core::ffi::c_void,
15084 *mut i64,
15085 ) -> windows_core::HRESULT,
15086 pub remove_BrowserProcessExited:
15087 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
15088}
15089pub trait ICoreWebView2Environment5_Impl: ICoreWebView2Environment4_Impl {
15090 fn add_BrowserProcessExited(
15091 &self,
15092 eventhandler: windows_core::Ref<'_, ICoreWebView2BrowserProcessExitedEventHandler>,
15093 token: *mut i64,
15094 ) -> windows_core::Result<()>;
15095 fn remove_BrowserProcessExited(&self, token: i64) -> windows_core::Result<()>;
15096}
15097impl ICoreWebView2Environment5_Vtbl {
15098 pub const fn new<Identity: ICoreWebView2Environment5_Impl, const OFFSET: isize>() -> Self {
15099 unsafe extern "system" fn add_BrowserProcessExited<
15100 Identity: ICoreWebView2Environment5_Impl,
15101 const OFFSET: isize,
15102 >(
15103 this: *mut core::ffi::c_void,
15104 eventhandler: *mut core::ffi::c_void,
15105 token: *mut i64,
15106 ) -> windows_core::HRESULT {
15107 unsafe {
15108 let this: &Identity =
15109 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15110 ICoreWebView2Environment5_Impl::add_BrowserProcessExited(
15111 this,
15112 core::mem::transmute_copy(&eventhandler),
15113 core::mem::transmute_copy(&token),
15114 )
15115 .into()
15116 }
15117 }
15118 unsafe extern "system" fn remove_BrowserProcessExited<
15119 Identity: ICoreWebView2Environment5_Impl,
15120 const OFFSET: isize,
15121 >(
15122 this: *mut core::ffi::c_void,
15123 token: i64,
15124 ) -> windows_core::HRESULT {
15125 unsafe {
15126 let this: &Identity =
15127 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15128 ICoreWebView2Environment5_Impl::remove_BrowserProcessExited(
15129 this,
15130 core::mem::transmute_copy(&token),
15131 )
15132 .into()
15133 }
15134 }
15135 Self {
15136 base__: ICoreWebView2Environment4_Vtbl::new::<Identity, OFFSET>(),
15137 add_BrowserProcessExited: add_BrowserProcessExited::<Identity, OFFSET>,
15138 remove_BrowserProcessExited: remove_BrowserProcessExited::<Identity, OFFSET>,
15139 }
15140 }
15141 pub fn matches(iid: &windows_core::GUID) -> bool {
15142 iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
15143 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
15144 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
15145 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
15146 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
15147 }
15148}
15149impl windows_core::RuntimeName for ICoreWebView2Environment5 {}
15150windows_core::imp::define_interface!(
15151 ICoreWebView2Environment6,
15152 ICoreWebView2Environment6_Vtbl,
15153 0xe59ee362_acbd_4857_9a8e_d3644d9459a9
15154);
15155impl core::ops::Deref for ICoreWebView2Environment6 {
15156 type Target = ICoreWebView2Environment5;
15157 fn deref(&self) -> &Self::Target {
15158 unsafe { core::mem::transmute(self) }
15159 }
15160}
15161windows_core::imp::interface_hierarchy!(
15162 ICoreWebView2Environment6,
15163 windows_core::IUnknown,
15164 ICoreWebView2Environment,
15165 ICoreWebView2Environment2,
15166 ICoreWebView2Environment3,
15167 ICoreWebView2Environment4,
15168 ICoreWebView2Environment5
15169);
15170impl ICoreWebView2Environment6 {
15171 pub unsafe fn CreatePrintSettings(&self) -> windows_core::Result<ICoreWebView2PrintSettings> {
15172 unsafe {
15173 let mut result__ = core::mem::zeroed();
15174 (windows_core::Interface::vtable(self).CreatePrintSettings)(
15175 windows_core::Interface::as_raw(self),
15176 &mut result__,
15177 )
15178 .and_then(|| windows_core::Type::from_abi(result__))
15179 }
15180 }
15181}
15182#[repr(C)]
15183pub struct ICoreWebView2Environment6_Vtbl {
15184 pub base__: ICoreWebView2Environment5_Vtbl,
15185 pub CreatePrintSettings: unsafe extern "system" fn(
15186 *mut core::ffi::c_void,
15187 *mut *mut core::ffi::c_void,
15188 ) -> windows_core::HRESULT,
15189}
15190pub trait ICoreWebView2Environment6_Impl: ICoreWebView2Environment5_Impl {
15191 fn CreatePrintSettings(&self) -> windows_core::Result<ICoreWebView2PrintSettings>;
15192}
15193impl ICoreWebView2Environment6_Vtbl {
15194 pub const fn new<Identity: ICoreWebView2Environment6_Impl, const OFFSET: isize>() -> Self {
15195 unsafe extern "system" fn CreatePrintSettings<
15196 Identity: ICoreWebView2Environment6_Impl,
15197 const OFFSET: isize,
15198 >(
15199 this: *mut core::ffi::c_void,
15200 value: *mut *mut core::ffi::c_void,
15201 ) -> windows_core::HRESULT {
15202 unsafe {
15203 let this: &Identity =
15204 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15205 match ICoreWebView2Environment6_Impl::CreatePrintSettings(this) {
15206 Ok(ok__) => {
15207 value.write(core::mem::transmute(ok__));
15208 windows_core::HRESULT(0)
15209 }
15210 Err(err) => err.into(),
15211 }
15212 }
15213 }
15214 Self {
15215 base__: ICoreWebView2Environment5_Vtbl::new::<Identity, OFFSET>(),
15216 CreatePrintSettings: CreatePrintSettings::<Identity, OFFSET>,
15217 }
15218 }
15219 pub fn matches(iid: &windows_core::GUID) -> bool {
15220 iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
15221 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
15222 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
15223 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
15224 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
15225 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
15226 }
15227}
15228impl windows_core::RuntimeName for ICoreWebView2Environment6 {}
15229windows_core::imp::define_interface!(
15230 ICoreWebView2Environment7,
15231 ICoreWebView2Environment7_Vtbl,
15232 0x43c22296_3bbd_43a4_9c00_5c0df6dd29a2
15233);
15234impl core::ops::Deref for ICoreWebView2Environment7 {
15235 type Target = ICoreWebView2Environment6;
15236 fn deref(&self) -> &Self::Target {
15237 unsafe { core::mem::transmute(self) }
15238 }
15239}
15240windows_core::imp::interface_hierarchy!(
15241 ICoreWebView2Environment7,
15242 windows_core::IUnknown,
15243 ICoreWebView2Environment,
15244 ICoreWebView2Environment2,
15245 ICoreWebView2Environment3,
15246 ICoreWebView2Environment4,
15247 ICoreWebView2Environment5,
15248 ICoreWebView2Environment6
15249);
15250impl ICoreWebView2Environment7 {
15251 pub unsafe fn UserDataFolder(
15252 &self,
15253 value: *mut windows_core::PWSTR,
15254 ) -> windows_core::Result<()> {
15255 unsafe {
15256 (windows_core::Interface::vtable(self).UserDataFolder)(
15257 windows_core::Interface::as_raw(self),
15258 value as _,
15259 )
15260 .ok()
15261 }
15262 }
15263}
15264#[repr(C)]
15265pub struct ICoreWebView2Environment7_Vtbl {
15266 pub base__: ICoreWebView2Environment6_Vtbl,
15267 pub UserDataFolder: unsafe extern "system" fn(
15268 *mut core::ffi::c_void,
15269 *mut windows_core::PWSTR,
15270 ) -> windows_core::HRESULT,
15271}
15272pub trait ICoreWebView2Environment7_Impl: ICoreWebView2Environment6_Impl {
15273 fn UserDataFolder(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
15274}
15275impl ICoreWebView2Environment7_Vtbl {
15276 pub const fn new<Identity: ICoreWebView2Environment7_Impl, const OFFSET: isize>() -> Self {
15277 unsafe extern "system" fn UserDataFolder<
15278 Identity: ICoreWebView2Environment7_Impl,
15279 const OFFSET: isize,
15280 >(
15281 this: *mut core::ffi::c_void,
15282 value: *mut windows_core::PWSTR,
15283 ) -> windows_core::HRESULT {
15284 unsafe {
15285 let this: &Identity =
15286 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15287 ICoreWebView2Environment7_Impl::UserDataFolder(
15288 this,
15289 core::mem::transmute_copy(&value),
15290 )
15291 .into()
15292 }
15293 }
15294 Self {
15295 base__: ICoreWebView2Environment6_Vtbl::new::<Identity, OFFSET>(),
15296 UserDataFolder: UserDataFolder::<Identity, OFFSET>,
15297 }
15298 }
15299 pub fn matches(iid: &windows_core::GUID) -> bool {
15300 iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
15301 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
15302 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
15303 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
15304 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
15305 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
15306 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
15307 }
15308}
15309impl windows_core::RuntimeName for ICoreWebView2Environment7 {}
15310windows_core::imp::define_interface!(
15311 ICoreWebView2Environment8,
15312 ICoreWebView2Environment8_Vtbl,
15313 0xd6eb91dd_c3d2_45e5_bd29_6dc2bc4de9cf
15314);
15315impl core::ops::Deref for ICoreWebView2Environment8 {
15316 type Target = ICoreWebView2Environment7;
15317 fn deref(&self) -> &Self::Target {
15318 unsafe { core::mem::transmute(self) }
15319 }
15320}
15321windows_core::imp::interface_hierarchy!(
15322 ICoreWebView2Environment8,
15323 windows_core::IUnknown,
15324 ICoreWebView2Environment,
15325 ICoreWebView2Environment2,
15326 ICoreWebView2Environment3,
15327 ICoreWebView2Environment4,
15328 ICoreWebView2Environment5,
15329 ICoreWebView2Environment6,
15330 ICoreWebView2Environment7
15331);
15332impl ICoreWebView2Environment8 {
15333 pub unsafe fn add_ProcessInfosChanged<P0>(
15334 &self,
15335 eventhandler: P0,
15336 token: *mut i64,
15337 ) -> windows_core::Result<()>
15338 where
15339 P0: windows_core::Param<ICoreWebView2ProcessInfosChangedEventHandler>,
15340 {
15341 unsafe {
15342 (windows_core::Interface::vtable(self).add_ProcessInfosChanged)(
15343 windows_core::Interface::as_raw(self),
15344 eventhandler.param().abi(),
15345 token as _,
15346 )
15347 .ok()
15348 }
15349 }
15350 pub unsafe fn remove_ProcessInfosChanged(&self, token: i64) -> windows_core::Result<()> {
15351 unsafe {
15352 (windows_core::Interface::vtable(self).remove_ProcessInfosChanged)(
15353 windows_core::Interface::as_raw(self),
15354 token,
15355 )
15356 .ok()
15357 }
15358 }
15359 pub unsafe fn GetProcessInfos(
15360 &self,
15361 ) -> windows_core::Result<ICoreWebView2ProcessInfoCollection> {
15362 unsafe {
15363 let mut result__ = core::mem::zeroed();
15364 (windows_core::Interface::vtable(self).GetProcessInfos)(
15365 windows_core::Interface::as_raw(self),
15366 &mut result__,
15367 )
15368 .and_then(|| windows_core::Type::from_abi(result__))
15369 }
15370 }
15371}
15372#[repr(C)]
15373pub struct ICoreWebView2Environment8_Vtbl {
15374 pub base__: ICoreWebView2Environment7_Vtbl,
15375 pub add_ProcessInfosChanged: unsafe extern "system" fn(
15376 *mut core::ffi::c_void,
15377 *mut core::ffi::c_void,
15378 *mut i64,
15379 ) -> windows_core::HRESULT,
15380 pub remove_ProcessInfosChanged:
15381 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
15382 pub GetProcessInfos: unsafe extern "system" fn(
15383 *mut core::ffi::c_void,
15384 *mut *mut core::ffi::c_void,
15385 ) -> windows_core::HRESULT,
15386}
15387pub trait ICoreWebView2Environment8_Impl: ICoreWebView2Environment7_Impl {
15388 fn add_ProcessInfosChanged(
15389 &self,
15390 eventhandler: windows_core::Ref<'_, ICoreWebView2ProcessInfosChangedEventHandler>,
15391 token: *mut i64,
15392 ) -> windows_core::Result<()>;
15393 fn remove_ProcessInfosChanged(&self, token: i64) -> windows_core::Result<()>;
15394 fn GetProcessInfos(&self) -> windows_core::Result<ICoreWebView2ProcessInfoCollection>;
15395}
15396impl ICoreWebView2Environment8_Vtbl {
15397 pub const fn new<Identity: ICoreWebView2Environment8_Impl, const OFFSET: isize>() -> Self {
15398 unsafe extern "system" fn add_ProcessInfosChanged<
15399 Identity: ICoreWebView2Environment8_Impl,
15400 const OFFSET: isize,
15401 >(
15402 this: *mut core::ffi::c_void,
15403 eventhandler: *mut core::ffi::c_void,
15404 token: *mut i64,
15405 ) -> windows_core::HRESULT {
15406 unsafe {
15407 let this: &Identity =
15408 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15409 ICoreWebView2Environment8_Impl::add_ProcessInfosChanged(
15410 this,
15411 core::mem::transmute_copy(&eventhandler),
15412 core::mem::transmute_copy(&token),
15413 )
15414 .into()
15415 }
15416 }
15417 unsafe extern "system" fn remove_ProcessInfosChanged<
15418 Identity: ICoreWebView2Environment8_Impl,
15419 const OFFSET: isize,
15420 >(
15421 this: *mut core::ffi::c_void,
15422 token: i64,
15423 ) -> windows_core::HRESULT {
15424 unsafe {
15425 let this: &Identity =
15426 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15427 ICoreWebView2Environment8_Impl::remove_ProcessInfosChanged(
15428 this,
15429 core::mem::transmute_copy(&token),
15430 )
15431 .into()
15432 }
15433 }
15434 unsafe extern "system" fn GetProcessInfos<
15435 Identity: ICoreWebView2Environment8_Impl,
15436 const OFFSET: isize,
15437 >(
15438 this: *mut core::ffi::c_void,
15439 value: *mut *mut core::ffi::c_void,
15440 ) -> windows_core::HRESULT {
15441 unsafe {
15442 let this: &Identity =
15443 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15444 match ICoreWebView2Environment8_Impl::GetProcessInfos(this) {
15445 Ok(ok__) => {
15446 value.write(core::mem::transmute(ok__));
15447 windows_core::HRESULT(0)
15448 }
15449 Err(err) => err.into(),
15450 }
15451 }
15452 }
15453 Self {
15454 base__: ICoreWebView2Environment7_Vtbl::new::<Identity, OFFSET>(),
15455 add_ProcessInfosChanged: add_ProcessInfosChanged::<Identity, OFFSET>,
15456 remove_ProcessInfosChanged: remove_ProcessInfosChanged::<Identity, OFFSET>,
15457 GetProcessInfos: GetProcessInfos::<Identity, OFFSET>,
15458 }
15459 }
15460 pub fn matches(iid: &windows_core::GUID) -> bool {
15461 iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
15462 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
15463 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
15464 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
15465 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
15466 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
15467 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
15468 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
15469 }
15470}
15471impl windows_core::RuntimeName for ICoreWebView2Environment8 {}
15472windows_core::imp::define_interface!(
15473 ICoreWebView2Environment9,
15474 ICoreWebView2Environment9_Vtbl,
15475 0xf06f41bf_4b5a_49d8_b9f6_fa16cd29f274
15476);
15477impl core::ops::Deref for ICoreWebView2Environment9 {
15478 type Target = ICoreWebView2Environment8;
15479 fn deref(&self) -> &Self::Target {
15480 unsafe { core::mem::transmute(self) }
15481 }
15482}
15483windows_core::imp::interface_hierarchy!(
15484 ICoreWebView2Environment9,
15485 windows_core::IUnknown,
15486 ICoreWebView2Environment,
15487 ICoreWebView2Environment2,
15488 ICoreWebView2Environment3,
15489 ICoreWebView2Environment4,
15490 ICoreWebView2Environment5,
15491 ICoreWebView2Environment6,
15492 ICoreWebView2Environment7,
15493 ICoreWebView2Environment8
15494);
15495impl ICoreWebView2Environment9 {
15496 pub unsafe fn CreateContextMenuItem<P0, P1>(
15497 &self,
15498 label: P0,
15499 iconstream: P1,
15500 kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
15501 ) -> windows_core::Result<ICoreWebView2ContextMenuItem>
15502 where
15503 P0: windows_core::Param<windows_core::PCWSTR>,
15504 P1: windows_core::Param<windows::Win32::System::Com::IStream>,
15505 {
15506 unsafe {
15507 let mut result__ = core::mem::zeroed();
15508 (windows_core::Interface::vtable(self).CreateContextMenuItem)(
15509 windows_core::Interface::as_raw(self),
15510 label.param().abi(),
15511 iconstream.param().abi(),
15512 kind,
15513 &mut result__,
15514 )
15515 .and_then(|| windows_core::Type::from_abi(result__))
15516 }
15517 }
15518}
15519#[repr(C)]
15520pub struct ICoreWebView2Environment9_Vtbl {
15521 pub base__: ICoreWebView2Environment8_Vtbl,
15522 pub CreateContextMenuItem: unsafe extern "system" fn(
15523 *mut core::ffi::c_void,
15524 windows_core::PCWSTR,
15525 *mut core::ffi::c_void,
15526 COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
15527 *mut *mut core::ffi::c_void,
15528 ) -> windows_core::HRESULT,
15529}
15530pub trait ICoreWebView2Environment9_Impl: ICoreWebView2Environment8_Impl {
15531 fn CreateContextMenuItem(
15532 &self,
15533 label: &windows_core::PCWSTR,
15534 iconstream: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
15535 kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
15536 ) -> windows_core::Result<ICoreWebView2ContextMenuItem>;
15537}
15538impl ICoreWebView2Environment9_Vtbl {
15539 pub const fn new<Identity: ICoreWebView2Environment9_Impl, const OFFSET: isize>() -> Self {
15540 unsafe extern "system" fn CreateContextMenuItem<
15541 Identity: ICoreWebView2Environment9_Impl,
15542 const OFFSET: isize,
15543 >(
15544 this: *mut core::ffi::c_void,
15545 label: windows_core::PCWSTR,
15546 iconstream: *mut core::ffi::c_void,
15547 kind: COREWEBVIEW2_CONTEXT_MENU_ITEM_KIND,
15548 value: *mut *mut core::ffi::c_void,
15549 ) -> windows_core::HRESULT {
15550 unsafe {
15551 let this: &Identity =
15552 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15553 match ICoreWebView2Environment9_Impl::CreateContextMenuItem(
15554 this,
15555 core::mem::transmute(&label),
15556 core::mem::transmute_copy(&iconstream),
15557 core::mem::transmute_copy(&kind),
15558 ) {
15559 Ok(ok__) => {
15560 value.write(core::mem::transmute(ok__));
15561 windows_core::HRESULT(0)
15562 }
15563 Err(err) => err.into(),
15564 }
15565 }
15566 }
15567 Self {
15568 base__: ICoreWebView2Environment8_Vtbl::new::<Identity, OFFSET>(),
15569 CreateContextMenuItem: CreateContextMenuItem::<Identity, OFFSET>,
15570 }
15571 }
15572 pub fn matches(iid: &windows_core::GUID) -> bool {
15573 iid == &<ICoreWebView2Environment9 as windows_core::Interface>::IID
15574 || iid == &<ICoreWebView2Environment as windows_core::Interface>::IID
15575 || iid == &<ICoreWebView2Environment2 as windows_core::Interface>::IID
15576 || iid == &<ICoreWebView2Environment3 as windows_core::Interface>::IID
15577 || iid == &<ICoreWebView2Environment4 as windows_core::Interface>::IID
15578 || iid == &<ICoreWebView2Environment5 as windows_core::Interface>::IID
15579 || iid == &<ICoreWebView2Environment6 as windows_core::Interface>::IID
15580 || iid == &<ICoreWebView2Environment7 as windows_core::Interface>::IID
15581 || iid == &<ICoreWebView2Environment8 as windows_core::Interface>::IID
15582 }
15583}
15584impl windows_core::RuntimeName for ICoreWebView2Environment9 {}
15585windows_core::imp::define_interface!(
15586 ICoreWebView2EnvironmentOptions,
15587 ICoreWebView2EnvironmentOptions_Vtbl,
15588 0x2fde08a8_1e9a_4766_8c05_95a9ceb9d1c5
15589);
15590windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions, windows_core::IUnknown);
15591impl ICoreWebView2EnvironmentOptions {
15592 pub unsafe fn AdditionalBrowserArguments(
15593 &self,
15594 value: *mut windows_core::PWSTR,
15595 ) -> windows_core::Result<()> {
15596 unsafe {
15597 (windows_core::Interface::vtable(self).AdditionalBrowserArguments)(
15598 windows_core::Interface::as_raw(self),
15599 value as _,
15600 )
15601 .ok()
15602 }
15603 }
15604 pub unsafe fn SetAdditionalBrowserArguments<P0>(&self, value: P0) -> windows_core::Result<()>
15605 where
15606 P0: windows_core::Param<windows_core::PCWSTR>,
15607 {
15608 unsafe {
15609 (windows_core::Interface::vtable(self).SetAdditionalBrowserArguments)(
15610 windows_core::Interface::as_raw(self),
15611 value.param().abi(),
15612 )
15613 .ok()
15614 }
15615 }
15616 pub unsafe fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
15617 unsafe {
15618 (windows_core::Interface::vtable(self).Language)(
15619 windows_core::Interface::as_raw(self),
15620 value as _,
15621 )
15622 .ok()
15623 }
15624 }
15625 pub unsafe fn SetLanguage<P0>(&self, value: P0) -> windows_core::Result<()>
15626 where
15627 P0: windows_core::Param<windows_core::PCWSTR>,
15628 {
15629 unsafe {
15630 (windows_core::Interface::vtable(self).SetLanguage)(
15631 windows_core::Interface::as_raw(self),
15632 value.param().abi(),
15633 )
15634 .ok()
15635 }
15636 }
15637 pub unsafe fn TargetCompatibleBrowserVersion(
15638 &self,
15639 value: *mut windows_core::PWSTR,
15640 ) -> windows_core::Result<()> {
15641 unsafe {
15642 (windows_core::Interface::vtable(self).TargetCompatibleBrowserVersion)(
15643 windows_core::Interface::as_raw(self),
15644 value as _,
15645 )
15646 .ok()
15647 }
15648 }
15649 pub unsafe fn SetTargetCompatibleBrowserVersion<P0>(
15650 &self,
15651 value: P0,
15652 ) -> windows_core::Result<()>
15653 where
15654 P0: windows_core::Param<windows_core::PCWSTR>,
15655 {
15656 unsafe {
15657 (windows_core::Interface::vtable(self).SetTargetCompatibleBrowserVersion)(
15658 windows_core::Interface::as_raw(self),
15659 value.param().abi(),
15660 )
15661 .ok()
15662 }
15663 }
15664 pub unsafe fn AllowSingleSignOnUsingOSPrimaryAccount(
15665 &self,
15666 allow: *mut windows_core::BOOL,
15667 ) -> windows_core::Result<()> {
15668 unsafe {
15669 (windows_core::Interface::vtable(self).AllowSingleSignOnUsingOSPrimaryAccount)(
15670 windows_core::Interface::as_raw(self),
15671 allow as _,
15672 )
15673 .ok()
15674 }
15675 }
15676 pub unsafe fn SetAllowSingleSignOnUsingOSPrimaryAccount(
15677 &self,
15678 allow: bool,
15679 ) -> windows_core::Result<()> {
15680 unsafe {
15681 (windows_core::Interface::vtable(self).SetAllowSingleSignOnUsingOSPrimaryAccount)(
15682 windows_core::Interface::as_raw(self),
15683 allow.into(),
15684 )
15685 .ok()
15686 }
15687 }
15688}
15689#[repr(C)]
15690pub struct ICoreWebView2EnvironmentOptions_Vtbl {
15691 pub base__: windows_core::IUnknown_Vtbl,
15692 pub AdditionalBrowserArguments: unsafe extern "system" fn(
15693 *mut core::ffi::c_void,
15694 *mut windows_core::PWSTR,
15695 ) -> windows_core::HRESULT,
15696 pub SetAdditionalBrowserArguments: unsafe extern "system" fn(
15697 *mut core::ffi::c_void,
15698 windows_core::PCWSTR,
15699 ) -> windows_core::HRESULT,
15700 pub Language: unsafe extern "system" fn(
15701 *mut core::ffi::c_void,
15702 *mut windows_core::PWSTR,
15703 ) -> windows_core::HRESULT,
15704 pub SetLanguage: unsafe extern "system" fn(
15705 *mut core::ffi::c_void,
15706 windows_core::PCWSTR,
15707 ) -> windows_core::HRESULT,
15708 pub TargetCompatibleBrowserVersion: unsafe extern "system" fn(
15709 *mut core::ffi::c_void,
15710 *mut windows_core::PWSTR,
15711 ) -> windows_core::HRESULT,
15712 pub SetTargetCompatibleBrowserVersion: unsafe extern "system" fn(
15713 *mut core::ffi::c_void,
15714 windows_core::PCWSTR,
15715 ) -> windows_core::HRESULT,
15716 pub AllowSingleSignOnUsingOSPrimaryAccount: unsafe extern "system" fn(
15717 *mut core::ffi::c_void,
15718 *mut windows_core::BOOL,
15719 )
15720 -> windows_core::HRESULT,
15721 pub SetAllowSingleSignOnUsingOSPrimaryAccount:
15722 unsafe extern "system" fn(
15723 *mut core::ffi::c_void,
15724 windows_core::BOOL,
15725 ) -> windows_core::HRESULT,
15726}
15727pub trait ICoreWebView2EnvironmentOptions_Impl: windows_core::IUnknownImpl {
15728 fn AdditionalBrowserArguments(
15729 &self,
15730 value: *mut windows_core::PWSTR,
15731 ) -> windows_core::Result<()>;
15732 fn SetAdditionalBrowserArguments(
15733 &self,
15734 value: &windows_core::PCWSTR,
15735 ) -> windows_core::Result<()>;
15736 fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
15737 fn SetLanguage(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
15738 fn TargetCompatibleBrowserVersion(
15739 &self,
15740 value: *mut windows_core::PWSTR,
15741 ) -> windows_core::Result<()>;
15742 fn SetTargetCompatibleBrowserVersion(
15743 &self,
15744 value: &windows_core::PCWSTR,
15745 ) -> windows_core::Result<()>;
15746 fn AllowSingleSignOnUsingOSPrimaryAccount(
15747 &self,
15748 allow: *mut windows_core::BOOL,
15749 ) -> windows_core::Result<()>;
15750 fn SetAllowSingleSignOnUsingOSPrimaryAccount(
15751 &self,
15752 allow: windows_core::BOOL,
15753 ) -> windows_core::Result<()>;
15754}
15755impl ICoreWebView2EnvironmentOptions_Vtbl {
15756 pub const fn new<Identity: ICoreWebView2EnvironmentOptions_Impl, const OFFSET: isize>() -> Self
15757 {
15758 unsafe extern "system" fn AdditionalBrowserArguments<
15759 Identity: ICoreWebView2EnvironmentOptions_Impl,
15760 const OFFSET: isize,
15761 >(
15762 this: *mut core::ffi::c_void,
15763 value: *mut windows_core::PWSTR,
15764 ) -> windows_core::HRESULT {
15765 unsafe {
15766 let this: &Identity =
15767 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15768 ICoreWebView2EnvironmentOptions_Impl::AdditionalBrowserArguments(
15769 this,
15770 core::mem::transmute_copy(&value),
15771 )
15772 .into()
15773 }
15774 }
15775 unsafe extern "system" fn SetAdditionalBrowserArguments<
15776 Identity: ICoreWebView2EnvironmentOptions_Impl,
15777 const OFFSET: isize,
15778 >(
15779 this: *mut core::ffi::c_void,
15780 value: windows_core::PCWSTR,
15781 ) -> windows_core::HRESULT {
15782 unsafe {
15783 let this: &Identity =
15784 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15785 ICoreWebView2EnvironmentOptions_Impl::SetAdditionalBrowserArguments(
15786 this,
15787 core::mem::transmute(&value),
15788 )
15789 .into()
15790 }
15791 }
15792 unsafe extern "system" fn Language<
15793 Identity: ICoreWebView2EnvironmentOptions_Impl,
15794 const OFFSET: isize,
15795 >(
15796 this: *mut core::ffi::c_void,
15797 value: *mut windows_core::PWSTR,
15798 ) -> windows_core::HRESULT {
15799 unsafe {
15800 let this: &Identity =
15801 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15802 ICoreWebView2EnvironmentOptions_Impl::Language(
15803 this,
15804 core::mem::transmute_copy(&value),
15805 )
15806 .into()
15807 }
15808 }
15809 unsafe extern "system" fn SetLanguage<
15810 Identity: ICoreWebView2EnvironmentOptions_Impl,
15811 const OFFSET: isize,
15812 >(
15813 this: *mut core::ffi::c_void,
15814 value: windows_core::PCWSTR,
15815 ) -> windows_core::HRESULT {
15816 unsafe {
15817 let this: &Identity =
15818 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15819 ICoreWebView2EnvironmentOptions_Impl::SetLanguage(
15820 this,
15821 core::mem::transmute(&value),
15822 )
15823 .into()
15824 }
15825 }
15826 unsafe extern "system" fn TargetCompatibleBrowserVersion<
15827 Identity: ICoreWebView2EnvironmentOptions_Impl,
15828 const OFFSET: isize,
15829 >(
15830 this: *mut core::ffi::c_void,
15831 value: *mut windows_core::PWSTR,
15832 ) -> windows_core::HRESULT {
15833 unsafe {
15834 let this: &Identity =
15835 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15836 ICoreWebView2EnvironmentOptions_Impl::TargetCompatibleBrowserVersion(
15837 this,
15838 core::mem::transmute_copy(&value),
15839 )
15840 .into()
15841 }
15842 }
15843 unsafe extern "system" fn SetTargetCompatibleBrowserVersion<
15844 Identity: ICoreWebView2EnvironmentOptions_Impl,
15845 const OFFSET: isize,
15846 >(
15847 this: *mut core::ffi::c_void,
15848 value: windows_core::PCWSTR,
15849 ) -> windows_core::HRESULT {
15850 unsafe {
15851 let this: &Identity =
15852 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15853 ICoreWebView2EnvironmentOptions_Impl::SetTargetCompatibleBrowserVersion(
15854 this,
15855 core::mem::transmute(&value),
15856 )
15857 .into()
15858 }
15859 }
15860 unsafe extern "system" fn AllowSingleSignOnUsingOSPrimaryAccount<
15861 Identity: ICoreWebView2EnvironmentOptions_Impl,
15862 const OFFSET: isize,
15863 >(
15864 this: *mut core::ffi::c_void,
15865 allow: *mut windows_core::BOOL,
15866 ) -> windows_core::HRESULT {
15867 unsafe {
15868 let this: &Identity =
15869 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15870 ICoreWebView2EnvironmentOptions_Impl::AllowSingleSignOnUsingOSPrimaryAccount(
15871 this,
15872 core::mem::transmute_copy(&allow),
15873 )
15874 .into()
15875 }
15876 }
15877 unsafe extern "system" fn SetAllowSingleSignOnUsingOSPrimaryAccount<
15878 Identity: ICoreWebView2EnvironmentOptions_Impl,
15879 const OFFSET: isize,
15880 >(
15881 this: *mut core::ffi::c_void,
15882 allow: windows_core::BOOL,
15883 ) -> windows_core::HRESULT {
15884 unsafe {
15885 let this: &Identity =
15886 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15887 ICoreWebView2EnvironmentOptions_Impl::SetAllowSingleSignOnUsingOSPrimaryAccount(
15888 this,
15889 core::mem::transmute_copy(&allow),
15890 )
15891 .into()
15892 }
15893 }
15894 Self {
15895 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
15896 AdditionalBrowserArguments: AdditionalBrowserArguments::<Identity, OFFSET>,
15897 SetAdditionalBrowserArguments: SetAdditionalBrowserArguments::<Identity, OFFSET>,
15898 Language: Language::<Identity, OFFSET>,
15899 SetLanguage: SetLanguage::<Identity, OFFSET>,
15900 TargetCompatibleBrowserVersion: TargetCompatibleBrowserVersion::<Identity, OFFSET>,
15901 SetTargetCompatibleBrowserVersion: SetTargetCompatibleBrowserVersion::<Identity, OFFSET>,
15902 AllowSingleSignOnUsingOSPrimaryAccount: AllowSingleSignOnUsingOSPrimaryAccount::<
15903 Identity,
15904 OFFSET,
15905 >,
15906 SetAllowSingleSignOnUsingOSPrimaryAccount: SetAllowSingleSignOnUsingOSPrimaryAccount::<
15907 Identity,
15908 OFFSET,
15909 >,
15910 }
15911 }
15912 pub fn matches(iid: &windows_core::GUID) -> bool {
15913 iid == &<ICoreWebView2EnvironmentOptions as windows_core::Interface>::IID
15914 }
15915}
15916impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions {}
15917windows_core::imp::define_interface!(
15918 ICoreWebView2EnvironmentOptions2,
15919 ICoreWebView2EnvironmentOptions2_Vtbl,
15920 0xff85c98a_1ba7_4a6b_90c8_2b752c89e9e2
15921);
15922windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions2, windows_core::IUnknown);
15923impl ICoreWebView2EnvironmentOptions2 {
15924 pub unsafe fn ExclusiveUserDataFolderAccess(
15925 &self,
15926 value: *mut windows_core::BOOL,
15927 ) -> windows_core::Result<()> {
15928 unsafe {
15929 (windows_core::Interface::vtable(self).ExclusiveUserDataFolderAccess)(
15930 windows_core::Interface::as_raw(self),
15931 value as _,
15932 )
15933 .ok()
15934 }
15935 }
15936 pub unsafe fn SetExclusiveUserDataFolderAccess(&self, value: bool) -> windows_core::Result<()> {
15937 unsafe {
15938 (windows_core::Interface::vtable(self).SetExclusiveUserDataFolderAccess)(
15939 windows_core::Interface::as_raw(self),
15940 value.into(),
15941 )
15942 .ok()
15943 }
15944 }
15945}
15946#[repr(C)]
15947pub struct ICoreWebView2EnvironmentOptions2_Vtbl {
15948 pub base__: windows_core::IUnknown_Vtbl,
15949 pub ExclusiveUserDataFolderAccess: unsafe extern "system" fn(
15950 *mut core::ffi::c_void,
15951 *mut windows_core::BOOL,
15952 ) -> windows_core::HRESULT,
15953 pub SetExclusiveUserDataFolderAccess: unsafe extern "system" fn(
15954 *mut core::ffi::c_void,
15955 windows_core::BOOL,
15956 ) -> windows_core::HRESULT,
15957}
15958pub trait ICoreWebView2EnvironmentOptions2_Impl: windows_core::IUnknownImpl {
15959 fn ExclusiveUserDataFolderAccess(
15960 &self,
15961 value: *mut windows_core::BOOL,
15962 ) -> windows_core::Result<()>;
15963 fn SetExclusiveUserDataFolderAccess(
15964 &self,
15965 value: windows_core::BOOL,
15966 ) -> windows_core::Result<()>;
15967}
15968impl ICoreWebView2EnvironmentOptions2_Vtbl {
15969 pub const fn new<Identity: ICoreWebView2EnvironmentOptions2_Impl, const OFFSET: isize>() -> Self
15970 {
15971 unsafe extern "system" fn ExclusiveUserDataFolderAccess<
15972 Identity: ICoreWebView2EnvironmentOptions2_Impl,
15973 const OFFSET: isize,
15974 >(
15975 this: *mut core::ffi::c_void,
15976 value: *mut windows_core::BOOL,
15977 ) -> windows_core::HRESULT {
15978 unsafe {
15979 let this: &Identity =
15980 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15981 ICoreWebView2EnvironmentOptions2_Impl::ExclusiveUserDataFolderAccess(
15982 this,
15983 core::mem::transmute_copy(&value),
15984 )
15985 .into()
15986 }
15987 }
15988 unsafe extern "system" fn SetExclusiveUserDataFolderAccess<
15989 Identity: ICoreWebView2EnvironmentOptions2_Impl,
15990 const OFFSET: isize,
15991 >(
15992 this: *mut core::ffi::c_void,
15993 value: windows_core::BOOL,
15994 ) -> windows_core::HRESULT {
15995 unsafe {
15996 let this: &Identity =
15997 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
15998 ICoreWebView2EnvironmentOptions2_Impl::SetExclusiveUserDataFolderAccess(
15999 this,
16000 core::mem::transmute_copy(&value),
16001 )
16002 .into()
16003 }
16004 }
16005 Self {
16006 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16007 ExclusiveUserDataFolderAccess: ExclusiveUserDataFolderAccess::<Identity, OFFSET>,
16008 SetExclusiveUserDataFolderAccess: SetExclusiveUserDataFolderAccess::<Identity, OFFSET>,
16009 }
16010 }
16011 pub fn matches(iid: &windows_core::GUID) -> bool {
16012 iid == &<ICoreWebView2EnvironmentOptions2 as windows_core::Interface>::IID
16013 }
16014}
16015impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions2 {}
16016windows_core::imp::define_interface!(
16017 ICoreWebView2EnvironmentOptions3,
16018 ICoreWebView2EnvironmentOptions3_Vtbl,
16019 0x4a5c436e_a9e3_4a2e_89c3_910d3513f5cc
16020);
16021windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions3, windows_core::IUnknown);
16022impl ICoreWebView2EnvironmentOptions3 {
16023 pub unsafe fn IsCustomCrashReportingEnabled(
16024 &self,
16025 value: *mut windows_core::BOOL,
16026 ) -> windows_core::Result<()> {
16027 unsafe {
16028 (windows_core::Interface::vtable(self).IsCustomCrashReportingEnabled)(
16029 windows_core::Interface::as_raw(self),
16030 value as _,
16031 )
16032 .ok()
16033 }
16034 }
16035 pub unsafe fn SetIsCustomCrashReportingEnabled(&self, value: bool) -> windows_core::Result<()> {
16036 unsafe {
16037 (windows_core::Interface::vtable(self).SetIsCustomCrashReportingEnabled)(
16038 windows_core::Interface::as_raw(self),
16039 value.into(),
16040 )
16041 .ok()
16042 }
16043 }
16044}
16045#[repr(C)]
16046pub struct ICoreWebView2EnvironmentOptions3_Vtbl {
16047 pub base__: windows_core::IUnknown_Vtbl,
16048 pub IsCustomCrashReportingEnabled: unsafe extern "system" fn(
16049 *mut core::ffi::c_void,
16050 *mut windows_core::BOOL,
16051 ) -> windows_core::HRESULT,
16052 pub SetIsCustomCrashReportingEnabled: unsafe extern "system" fn(
16053 *mut core::ffi::c_void,
16054 windows_core::BOOL,
16055 ) -> windows_core::HRESULT,
16056}
16057pub trait ICoreWebView2EnvironmentOptions3_Impl: windows_core::IUnknownImpl {
16058 fn IsCustomCrashReportingEnabled(
16059 &self,
16060 value: *mut windows_core::BOOL,
16061 ) -> windows_core::Result<()>;
16062 fn SetIsCustomCrashReportingEnabled(
16063 &self,
16064 value: windows_core::BOOL,
16065 ) -> windows_core::Result<()>;
16066}
16067impl ICoreWebView2EnvironmentOptions3_Vtbl {
16068 pub const fn new<Identity: ICoreWebView2EnvironmentOptions3_Impl, const OFFSET: isize>() -> Self
16069 {
16070 unsafe extern "system" fn IsCustomCrashReportingEnabled<
16071 Identity: ICoreWebView2EnvironmentOptions3_Impl,
16072 const OFFSET: isize,
16073 >(
16074 this: *mut core::ffi::c_void,
16075 value: *mut windows_core::BOOL,
16076 ) -> windows_core::HRESULT {
16077 unsafe {
16078 let this: &Identity =
16079 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16080 ICoreWebView2EnvironmentOptions3_Impl::IsCustomCrashReportingEnabled(
16081 this,
16082 core::mem::transmute_copy(&value),
16083 )
16084 .into()
16085 }
16086 }
16087 unsafe extern "system" fn SetIsCustomCrashReportingEnabled<
16088 Identity: ICoreWebView2EnvironmentOptions3_Impl,
16089 const OFFSET: isize,
16090 >(
16091 this: *mut core::ffi::c_void,
16092 value: windows_core::BOOL,
16093 ) -> windows_core::HRESULT {
16094 unsafe {
16095 let this: &Identity =
16096 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16097 ICoreWebView2EnvironmentOptions3_Impl::SetIsCustomCrashReportingEnabled(
16098 this,
16099 core::mem::transmute_copy(&value),
16100 )
16101 .into()
16102 }
16103 }
16104 Self {
16105 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16106 IsCustomCrashReportingEnabled: IsCustomCrashReportingEnabled::<Identity, OFFSET>,
16107 SetIsCustomCrashReportingEnabled: SetIsCustomCrashReportingEnabled::<Identity, OFFSET>,
16108 }
16109 }
16110 pub fn matches(iid: &windows_core::GUID) -> bool {
16111 iid == &<ICoreWebView2EnvironmentOptions3 as windows_core::Interface>::IID
16112 }
16113}
16114impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions3 {}
16115windows_core::imp::define_interface!(
16116 ICoreWebView2EnvironmentOptions4,
16117 ICoreWebView2EnvironmentOptions4_Vtbl,
16118 0xac52d13f_0d38_475a_9dca_876580d6793e
16119);
16120windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions4, windows_core::IUnknown);
16121impl ICoreWebView2EnvironmentOptions4 {
16122 pub unsafe fn GetCustomSchemeRegistrations(
16123 &self,
16124 count: *mut u32,
16125 schemeregistrations: *mut *mut Option<ICoreWebView2CustomSchemeRegistration>,
16126 ) -> windows_core::Result<()> {
16127 unsafe {
16128 (windows_core::Interface::vtable(self).GetCustomSchemeRegistrations)(
16129 windows_core::Interface::as_raw(self),
16130 count as _,
16131 schemeregistrations as _,
16132 )
16133 .ok()
16134 }
16135 }
16136 pub unsafe fn SetCustomSchemeRegistrations(
16137 &self,
16138 count: u32,
16139 ) -> windows_core::Result<ICoreWebView2CustomSchemeRegistration> {
16140 unsafe {
16141 let mut result__ = core::mem::zeroed();
16142 (windows_core::Interface::vtable(self).SetCustomSchemeRegistrations)(
16143 windows_core::Interface::as_raw(self),
16144 count,
16145 &mut result__,
16146 )
16147 .and_then(|| windows_core::Type::from_abi(result__))
16148 }
16149 }
16150}
16151#[repr(C)]
16152pub struct ICoreWebView2EnvironmentOptions4_Vtbl {
16153 pub base__: windows_core::IUnknown_Vtbl,
16154 pub GetCustomSchemeRegistrations: unsafe extern "system" fn(
16155 *mut core::ffi::c_void,
16156 *mut u32,
16157 *mut *mut *mut core::ffi::c_void,
16158 ) -> windows_core::HRESULT,
16159 pub SetCustomSchemeRegistrations: unsafe extern "system" fn(
16160 *mut core::ffi::c_void,
16161 u32,
16162 *mut *mut core::ffi::c_void,
16163 ) -> windows_core::HRESULT,
16164}
16165pub trait ICoreWebView2EnvironmentOptions4_Impl: windows_core::IUnknownImpl {
16166 fn GetCustomSchemeRegistrations(
16167 &self,
16168 count: *mut u32,
16169 schemeregistrations: *mut *mut Option<ICoreWebView2CustomSchemeRegistration>,
16170 ) -> windows_core::Result<()>;
16171 fn SetCustomSchemeRegistrations(
16172 &self,
16173 count: u32,
16174 ) -> windows_core::Result<ICoreWebView2CustomSchemeRegistration>;
16175}
16176impl ICoreWebView2EnvironmentOptions4_Vtbl {
16177 pub const fn new<Identity: ICoreWebView2EnvironmentOptions4_Impl, const OFFSET: isize>() -> Self
16178 {
16179 unsafe extern "system" fn GetCustomSchemeRegistrations<
16180 Identity: ICoreWebView2EnvironmentOptions4_Impl,
16181 const OFFSET: isize,
16182 >(
16183 this: *mut core::ffi::c_void,
16184 count: *mut u32,
16185 schemeregistrations: *mut *mut *mut core::ffi::c_void,
16186 ) -> windows_core::HRESULT {
16187 unsafe {
16188 let this: &Identity =
16189 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16190 ICoreWebView2EnvironmentOptions4_Impl::GetCustomSchemeRegistrations(
16191 this,
16192 core::mem::transmute_copy(&count),
16193 core::mem::transmute_copy(&schemeregistrations),
16194 )
16195 .into()
16196 }
16197 }
16198 unsafe extern "system" fn SetCustomSchemeRegistrations<
16199 Identity: ICoreWebView2EnvironmentOptions4_Impl,
16200 const OFFSET: isize,
16201 >(
16202 this: *mut core::ffi::c_void,
16203 count: u32,
16204 schemeregistrations: *mut *mut core::ffi::c_void,
16205 ) -> windows_core::HRESULT {
16206 unsafe {
16207 let this: &Identity =
16208 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16209 match ICoreWebView2EnvironmentOptions4_Impl::SetCustomSchemeRegistrations(
16210 this,
16211 core::mem::transmute_copy(&count),
16212 ) {
16213 Ok(ok__) => {
16214 schemeregistrations.write(core::mem::transmute(ok__));
16215 windows_core::HRESULT(0)
16216 }
16217 Err(err) => err.into(),
16218 }
16219 }
16220 }
16221 Self {
16222 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16223 GetCustomSchemeRegistrations: GetCustomSchemeRegistrations::<Identity, OFFSET>,
16224 SetCustomSchemeRegistrations: SetCustomSchemeRegistrations::<Identity, OFFSET>,
16225 }
16226 }
16227 pub fn matches(iid: &windows_core::GUID) -> bool {
16228 iid == &<ICoreWebView2EnvironmentOptions4 as windows_core::Interface>::IID
16229 }
16230}
16231impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions4 {}
16232windows_core::imp::define_interface!(
16233 ICoreWebView2EnvironmentOptions5,
16234 ICoreWebView2EnvironmentOptions5_Vtbl,
16235 0x0ae35d64_c47f_4464_814e_259c345d1501
16236);
16237windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions5, windows_core::IUnknown);
16238impl ICoreWebView2EnvironmentOptions5 {
16239 pub unsafe fn EnableTrackingPrevention(
16240 &self,
16241 value: *mut windows_core::BOOL,
16242 ) -> windows_core::Result<()> {
16243 unsafe {
16244 (windows_core::Interface::vtable(self).EnableTrackingPrevention)(
16245 windows_core::Interface::as_raw(self),
16246 value as _,
16247 )
16248 .ok()
16249 }
16250 }
16251 pub unsafe fn SetEnableTrackingPrevention(&self, value: bool) -> windows_core::Result<()> {
16252 unsafe {
16253 (windows_core::Interface::vtable(self).SetEnableTrackingPrevention)(
16254 windows_core::Interface::as_raw(self),
16255 value.into(),
16256 )
16257 .ok()
16258 }
16259 }
16260}
16261#[repr(C)]
16262pub struct ICoreWebView2EnvironmentOptions5_Vtbl {
16263 pub base__: windows_core::IUnknown_Vtbl,
16264 pub EnableTrackingPrevention: unsafe extern "system" fn(
16265 *mut core::ffi::c_void,
16266 *mut windows_core::BOOL,
16267 ) -> windows_core::HRESULT,
16268 pub SetEnableTrackingPrevention: unsafe extern "system" fn(
16269 *mut core::ffi::c_void,
16270 windows_core::BOOL,
16271 ) -> windows_core::HRESULT,
16272}
16273pub trait ICoreWebView2EnvironmentOptions5_Impl: windows_core::IUnknownImpl {
16274 fn EnableTrackingPrevention(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
16275 fn SetEnableTrackingPrevention(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
16276}
16277impl ICoreWebView2EnvironmentOptions5_Vtbl {
16278 pub const fn new<Identity: ICoreWebView2EnvironmentOptions5_Impl, const OFFSET: isize>() -> Self
16279 {
16280 unsafe extern "system" fn EnableTrackingPrevention<
16281 Identity: ICoreWebView2EnvironmentOptions5_Impl,
16282 const OFFSET: isize,
16283 >(
16284 this: *mut core::ffi::c_void,
16285 value: *mut windows_core::BOOL,
16286 ) -> windows_core::HRESULT {
16287 unsafe {
16288 let this: &Identity =
16289 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16290 ICoreWebView2EnvironmentOptions5_Impl::EnableTrackingPrevention(
16291 this,
16292 core::mem::transmute_copy(&value),
16293 )
16294 .into()
16295 }
16296 }
16297 unsafe extern "system" fn SetEnableTrackingPrevention<
16298 Identity: ICoreWebView2EnvironmentOptions5_Impl,
16299 const OFFSET: isize,
16300 >(
16301 this: *mut core::ffi::c_void,
16302 value: windows_core::BOOL,
16303 ) -> windows_core::HRESULT {
16304 unsafe {
16305 let this: &Identity =
16306 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16307 ICoreWebView2EnvironmentOptions5_Impl::SetEnableTrackingPrevention(
16308 this,
16309 core::mem::transmute_copy(&value),
16310 )
16311 .into()
16312 }
16313 }
16314 Self {
16315 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16316 EnableTrackingPrevention: EnableTrackingPrevention::<Identity, OFFSET>,
16317 SetEnableTrackingPrevention: SetEnableTrackingPrevention::<Identity, OFFSET>,
16318 }
16319 }
16320 pub fn matches(iid: &windows_core::GUID) -> bool {
16321 iid == &<ICoreWebView2EnvironmentOptions5 as windows_core::Interface>::IID
16322 }
16323}
16324impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions5 {}
16325windows_core::imp::define_interface!(
16326 ICoreWebView2EnvironmentOptions6,
16327 ICoreWebView2EnvironmentOptions6_Vtbl,
16328 0x57d29cc3_c84f_42a0_b0e2_effbd5e179de
16329);
16330windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions6, windows_core::IUnknown);
16331impl ICoreWebView2EnvironmentOptions6 {
16332 pub unsafe fn AreBrowserExtensionsEnabled(
16333 &self,
16334 value: *mut windows_core::BOOL,
16335 ) -> windows_core::Result<()> {
16336 unsafe {
16337 (windows_core::Interface::vtable(self).AreBrowserExtensionsEnabled)(
16338 windows_core::Interface::as_raw(self),
16339 value as _,
16340 )
16341 .ok()
16342 }
16343 }
16344 pub unsafe fn SetAreBrowserExtensionsEnabled(&self, value: bool) -> windows_core::Result<()> {
16345 unsafe {
16346 (windows_core::Interface::vtable(self).SetAreBrowserExtensionsEnabled)(
16347 windows_core::Interface::as_raw(self),
16348 value.into(),
16349 )
16350 .ok()
16351 }
16352 }
16353}
16354#[repr(C)]
16355pub struct ICoreWebView2EnvironmentOptions6_Vtbl {
16356 pub base__: windows_core::IUnknown_Vtbl,
16357 pub AreBrowserExtensionsEnabled: unsafe extern "system" fn(
16358 *mut core::ffi::c_void,
16359 *mut windows_core::BOOL,
16360 ) -> windows_core::HRESULT,
16361 pub SetAreBrowserExtensionsEnabled: unsafe extern "system" fn(
16362 *mut core::ffi::c_void,
16363 windows_core::BOOL,
16364 ) -> windows_core::HRESULT,
16365}
16366pub trait ICoreWebView2EnvironmentOptions6_Impl: windows_core::IUnknownImpl {
16367 fn AreBrowserExtensionsEnabled(
16368 &self,
16369 value: *mut windows_core::BOOL,
16370 ) -> windows_core::Result<()>;
16371 fn SetAreBrowserExtensionsEnabled(&self, value: windows_core::BOOL)
16372 -> windows_core::Result<()>;
16373}
16374impl ICoreWebView2EnvironmentOptions6_Vtbl {
16375 pub const fn new<Identity: ICoreWebView2EnvironmentOptions6_Impl, const OFFSET: isize>() -> Self
16376 {
16377 unsafe extern "system" fn AreBrowserExtensionsEnabled<
16378 Identity: ICoreWebView2EnvironmentOptions6_Impl,
16379 const OFFSET: isize,
16380 >(
16381 this: *mut core::ffi::c_void,
16382 value: *mut windows_core::BOOL,
16383 ) -> windows_core::HRESULT {
16384 unsafe {
16385 let this: &Identity =
16386 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16387 ICoreWebView2EnvironmentOptions6_Impl::AreBrowserExtensionsEnabled(
16388 this,
16389 core::mem::transmute_copy(&value),
16390 )
16391 .into()
16392 }
16393 }
16394 unsafe extern "system" fn SetAreBrowserExtensionsEnabled<
16395 Identity: ICoreWebView2EnvironmentOptions6_Impl,
16396 const OFFSET: isize,
16397 >(
16398 this: *mut core::ffi::c_void,
16399 value: windows_core::BOOL,
16400 ) -> windows_core::HRESULT {
16401 unsafe {
16402 let this: &Identity =
16403 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16404 ICoreWebView2EnvironmentOptions6_Impl::SetAreBrowserExtensionsEnabled(
16405 this,
16406 core::mem::transmute_copy(&value),
16407 )
16408 .into()
16409 }
16410 }
16411 Self {
16412 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16413 AreBrowserExtensionsEnabled: AreBrowserExtensionsEnabled::<Identity, OFFSET>,
16414 SetAreBrowserExtensionsEnabled: SetAreBrowserExtensionsEnabled::<Identity, OFFSET>,
16415 }
16416 }
16417 pub fn matches(iid: &windows_core::GUID) -> bool {
16418 iid == &<ICoreWebView2EnvironmentOptions6 as windows_core::Interface>::IID
16419 }
16420}
16421impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions6 {}
16422windows_core::imp::define_interface!(
16423 ICoreWebView2EnvironmentOptions7,
16424 ICoreWebView2EnvironmentOptions7_Vtbl,
16425 0xc48d539f_e39f_441c_ae68_1f66e570bdc5
16426);
16427windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions7, windows_core::IUnknown);
16428impl ICoreWebView2EnvironmentOptions7 {
16429 pub unsafe fn ChannelSearchKind(
16430 &self,
16431 value: *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16432 ) -> windows_core::Result<()> {
16433 unsafe {
16434 (windows_core::Interface::vtable(self).ChannelSearchKind)(
16435 windows_core::Interface::as_raw(self),
16436 value as _,
16437 )
16438 .ok()
16439 }
16440 }
16441 pub unsafe fn SetChannelSearchKind(
16442 &self,
16443 value: COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16444 ) -> windows_core::Result<()> {
16445 unsafe {
16446 (windows_core::Interface::vtable(self).SetChannelSearchKind)(
16447 windows_core::Interface::as_raw(self),
16448 value,
16449 )
16450 .ok()
16451 }
16452 }
16453 pub unsafe fn ReleaseChannels(
16454 &self,
16455 value: *mut COREWEBVIEW2_RELEASE_CHANNELS,
16456 ) -> windows_core::Result<()> {
16457 unsafe {
16458 (windows_core::Interface::vtable(self).ReleaseChannels)(
16459 windows_core::Interface::as_raw(self),
16460 value as _,
16461 )
16462 .ok()
16463 }
16464 }
16465 pub unsafe fn SetReleaseChannels(
16466 &self,
16467 value: COREWEBVIEW2_RELEASE_CHANNELS,
16468 ) -> windows_core::Result<()> {
16469 unsafe {
16470 (windows_core::Interface::vtable(self).SetReleaseChannels)(
16471 windows_core::Interface::as_raw(self),
16472 value,
16473 )
16474 .ok()
16475 }
16476 }
16477}
16478#[repr(C)]
16479pub struct ICoreWebView2EnvironmentOptions7_Vtbl {
16480 pub base__: windows_core::IUnknown_Vtbl,
16481 pub ChannelSearchKind: unsafe extern "system" fn(
16482 *mut core::ffi::c_void,
16483 *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16484 ) -> windows_core::HRESULT,
16485 pub SetChannelSearchKind: unsafe extern "system" fn(
16486 *mut core::ffi::c_void,
16487 COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16488 ) -> windows_core::HRESULT,
16489 pub ReleaseChannels: unsafe extern "system" fn(
16490 *mut core::ffi::c_void,
16491 *mut COREWEBVIEW2_RELEASE_CHANNELS,
16492 ) -> windows_core::HRESULT,
16493 pub SetReleaseChannels: unsafe extern "system" fn(
16494 *mut core::ffi::c_void,
16495 COREWEBVIEW2_RELEASE_CHANNELS,
16496 ) -> windows_core::HRESULT,
16497}
16498pub trait ICoreWebView2EnvironmentOptions7_Impl: windows_core::IUnknownImpl {
16499 fn ChannelSearchKind(
16500 &self,
16501 value: *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16502 ) -> windows_core::Result<()>;
16503 fn SetChannelSearchKind(
16504 &self,
16505 value: COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16506 ) -> windows_core::Result<()>;
16507 fn ReleaseChannels(
16508 &self,
16509 value: *mut COREWEBVIEW2_RELEASE_CHANNELS,
16510 ) -> windows_core::Result<()>;
16511 fn SetReleaseChannels(&self, value: COREWEBVIEW2_RELEASE_CHANNELS) -> windows_core::Result<()>;
16512}
16513impl ICoreWebView2EnvironmentOptions7_Vtbl {
16514 pub const fn new<Identity: ICoreWebView2EnvironmentOptions7_Impl, const OFFSET: isize>() -> Self
16515 {
16516 unsafe extern "system" fn ChannelSearchKind<
16517 Identity: ICoreWebView2EnvironmentOptions7_Impl,
16518 const OFFSET: isize,
16519 >(
16520 this: *mut core::ffi::c_void,
16521 value: *mut COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16522 ) -> windows_core::HRESULT {
16523 unsafe {
16524 let this: &Identity =
16525 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16526 ICoreWebView2EnvironmentOptions7_Impl::ChannelSearchKind(
16527 this,
16528 core::mem::transmute_copy(&value),
16529 )
16530 .into()
16531 }
16532 }
16533 unsafe extern "system" fn SetChannelSearchKind<
16534 Identity: ICoreWebView2EnvironmentOptions7_Impl,
16535 const OFFSET: isize,
16536 >(
16537 this: *mut core::ffi::c_void,
16538 value: COREWEBVIEW2_CHANNEL_SEARCH_KIND,
16539 ) -> windows_core::HRESULT {
16540 unsafe {
16541 let this: &Identity =
16542 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16543 ICoreWebView2EnvironmentOptions7_Impl::SetChannelSearchKind(
16544 this,
16545 core::mem::transmute_copy(&value),
16546 )
16547 .into()
16548 }
16549 }
16550 unsafe extern "system" fn ReleaseChannels<
16551 Identity: ICoreWebView2EnvironmentOptions7_Impl,
16552 const OFFSET: isize,
16553 >(
16554 this: *mut core::ffi::c_void,
16555 value: *mut COREWEBVIEW2_RELEASE_CHANNELS,
16556 ) -> windows_core::HRESULT {
16557 unsafe {
16558 let this: &Identity =
16559 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16560 ICoreWebView2EnvironmentOptions7_Impl::ReleaseChannels(
16561 this,
16562 core::mem::transmute_copy(&value),
16563 )
16564 .into()
16565 }
16566 }
16567 unsafe extern "system" fn SetReleaseChannels<
16568 Identity: ICoreWebView2EnvironmentOptions7_Impl,
16569 const OFFSET: isize,
16570 >(
16571 this: *mut core::ffi::c_void,
16572 value: COREWEBVIEW2_RELEASE_CHANNELS,
16573 ) -> windows_core::HRESULT {
16574 unsafe {
16575 let this: &Identity =
16576 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16577 ICoreWebView2EnvironmentOptions7_Impl::SetReleaseChannels(
16578 this,
16579 core::mem::transmute_copy(&value),
16580 )
16581 .into()
16582 }
16583 }
16584 Self {
16585 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16586 ChannelSearchKind: ChannelSearchKind::<Identity, OFFSET>,
16587 SetChannelSearchKind: SetChannelSearchKind::<Identity, OFFSET>,
16588 ReleaseChannels: ReleaseChannels::<Identity, OFFSET>,
16589 SetReleaseChannels: SetReleaseChannels::<Identity, OFFSET>,
16590 }
16591 }
16592 pub fn matches(iid: &windows_core::GUID) -> bool {
16593 iid == &<ICoreWebView2EnvironmentOptions7 as windows_core::Interface>::IID
16594 }
16595}
16596impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions7 {}
16597windows_core::imp::define_interface!(
16598 ICoreWebView2EnvironmentOptions8,
16599 ICoreWebView2EnvironmentOptions8_Vtbl,
16600 0x7c7ecf51_e918_5caf_853c_e9a2bcc27775
16601);
16602windows_core::imp::interface_hierarchy!(ICoreWebView2EnvironmentOptions8, windows_core::IUnknown);
16603impl ICoreWebView2EnvironmentOptions8 {
16604 pub unsafe fn ScrollBarStyle(
16605 &self,
16606 value: *mut COREWEBVIEW2_SCROLLBAR_STYLE,
16607 ) -> windows_core::Result<()> {
16608 unsafe {
16609 (windows_core::Interface::vtable(self).ScrollBarStyle)(
16610 windows_core::Interface::as_raw(self),
16611 value as _,
16612 )
16613 .ok()
16614 }
16615 }
16616 pub unsafe fn SetScrollBarStyle(
16617 &self,
16618 value: COREWEBVIEW2_SCROLLBAR_STYLE,
16619 ) -> windows_core::Result<()> {
16620 unsafe {
16621 (windows_core::Interface::vtable(self).SetScrollBarStyle)(
16622 windows_core::Interface::as_raw(self),
16623 value,
16624 )
16625 .ok()
16626 }
16627 }
16628}
16629#[repr(C)]
16630pub struct ICoreWebView2EnvironmentOptions8_Vtbl {
16631 pub base__: windows_core::IUnknown_Vtbl,
16632 pub ScrollBarStyle: unsafe extern "system" fn(
16633 *mut core::ffi::c_void,
16634 *mut COREWEBVIEW2_SCROLLBAR_STYLE,
16635 ) -> windows_core::HRESULT,
16636 pub SetScrollBarStyle: unsafe extern "system" fn(
16637 *mut core::ffi::c_void,
16638 COREWEBVIEW2_SCROLLBAR_STYLE,
16639 ) -> windows_core::HRESULT,
16640}
16641pub trait ICoreWebView2EnvironmentOptions8_Impl: windows_core::IUnknownImpl {
16642 fn ScrollBarStyle(&self, value: *mut COREWEBVIEW2_SCROLLBAR_STYLE) -> windows_core::Result<()>;
16643 fn SetScrollBarStyle(&self, value: COREWEBVIEW2_SCROLLBAR_STYLE) -> windows_core::Result<()>;
16644}
16645impl ICoreWebView2EnvironmentOptions8_Vtbl {
16646 pub const fn new<Identity: ICoreWebView2EnvironmentOptions8_Impl, const OFFSET: isize>() -> Self
16647 {
16648 unsafe extern "system" fn ScrollBarStyle<
16649 Identity: ICoreWebView2EnvironmentOptions8_Impl,
16650 const OFFSET: isize,
16651 >(
16652 this: *mut core::ffi::c_void,
16653 value: *mut COREWEBVIEW2_SCROLLBAR_STYLE,
16654 ) -> windows_core::HRESULT {
16655 unsafe {
16656 let this: &Identity =
16657 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16658 ICoreWebView2EnvironmentOptions8_Impl::ScrollBarStyle(
16659 this,
16660 core::mem::transmute_copy(&value),
16661 )
16662 .into()
16663 }
16664 }
16665 unsafe extern "system" fn SetScrollBarStyle<
16666 Identity: ICoreWebView2EnvironmentOptions8_Impl,
16667 const OFFSET: isize,
16668 >(
16669 this: *mut core::ffi::c_void,
16670 value: COREWEBVIEW2_SCROLLBAR_STYLE,
16671 ) -> windows_core::HRESULT {
16672 unsafe {
16673 let this: &Identity =
16674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16675 ICoreWebView2EnvironmentOptions8_Impl::SetScrollBarStyle(
16676 this,
16677 core::mem::transmute_copy(&value),
16678 )
16679 .into()
16680 }
16681 }
16682 Self {
16683 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16684 ScrollBarStyle: ScrollBarStyle::<Identity, OFFSET>,
16685 SetScrollBarStyle: SetScrollBarStyle::<Identity, OFFSET>,
16686 }
16687 }
16688 pub fn matches(iid: &windows_core::GUID) -> bool {
16689 iid == &<ICoreWebView2EnvironmentOptions8 as windows_core::Interface>::IID
16690 }
16691}
16692impl windows_core::RuntimeName for ICoreWebView2EnvironmentOptions8 {}
16693windows_core::imp::define_interface!(
16694 ICoreWebView2EstimatedEndTimeChangedEventHandler,
16695 ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl,
16696 0x28f0d425_93fe_4e63_9f8d_2aeec6d3ba1e
16697);
16698windows_core::imp::interface_hierarchy!(
16699 ICoreWebView2EstimatedEndTimeChangedEventHandler,
16700 windows_core::IUnknown
16701);
16702impl ICoreWebView2EstimatedEndTimeChangedEventHandler {
16703 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
16704 where
16705 P0: windows_core::Param<ICoreWebView2DownloadOperation>,
16706 P1: windows_core::Param<windows_core::IUnknown>,
16707 {
16708 unsafe {
16709 (windows_core::Interface::vtable(self).Invoke)(
16710 windows_core::Interface::as_raw(self),
16711 sender.param().abi(),
16712 args.param().abi(),
16713 )
16714 .ok()
16715 }
16716 }
16717}
16718#[repr(C)]
16719pub struct ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
16720 pub base__: windows_core::IUnknown_Vtbl,
16721 pub Invoke: unsafe extern "system" fn(
16722 *mut core::ffi::c_void,
16723 *mut core::ffi::c_void,
16724 *mut core::ffi::c_void,
16725 ) -> windows_core::HRESULT,
16726}
16727pub trait ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl:
16728 windows_core::IUnknownImpl
16729{
16730 fn Invoke(
16731 &self,
16732 sender: windows_core::Ref<'_, ICoreWebView2DownloadOperation>,
16733 args: windows_core::Ref<'_, windows_core::IUnknown>,
16734 ) -> windows_core::Result<()>;
16735}
16736impl ICoreWebView2EstimatedEndTimeChangedEventHandler_Vtbl {
16737 pub const fn new<
16738 Identity: ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl,
16739 const OFFSET: isize,
16740 >() -> Self {
16741 unsafe extern "system" fn Invoke<
16742 Identity: ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl,
16743 const OFFSET: isize,
16744 >(
16745 this: *mut core::ffi::c_void,
16746 sender: *mut core::ffi::c_void,
16747 args: *mut core::ffi::c_void,
16748 ) -> windows_core::HRESULT {
16749 unsafe {
16750 let this: &Identity =
16751 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16752 ICoreWebView2EstimatedEndTimeChangedEventHandler_Impl::Invoke(
16753 this,
16754 core::mem::transmute_copy(&sender),
16755 core::mem::transmute_copy(&args),
16756 )
16757 .into()
16758 }
16759 }
16760 Self {
16761 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16762 Invoke: Invoke::<Identity, OFFSET>,
16763 }
16764 }
16765 pub fn matches(iid: &windows_core::GUID) -> bool {
16766 iid == &<ICoreWebView2EstimatedEndTimeChangedEventHandler as windows_core::Interface>::IID
16767 }
16768}
16769impl windows_core::RuntimeName for ICoreWebView2EstimatedEndTimeChangedEventHandler {}
16770windows_core::imp::define_interface!(
16771 ICoreWebView2ExecuteScriptCompletedHandler,
16772 ICoreWebView2ExecuteScriptCompletedHandler_Vtbl,
16773 0x49511172_cc67_4bca_9923_137112f4c4cc
16774);
16775windows_core::imp::interface_hierarchy!(
16776 ICoreWebView2ExecuteScriptCompletedHandler,
16777 windows_core::IUnknown
16778);
16779impl ICoreWebView2ExecuteScriptCompletedHandler {
16780 pub unsafe fn Invoke<P1>(
16781 &self,
16782 errorcode: windows_core::HRESULT,
16783 result: P1,
16784 ) -> windows_core::Result<()>
16785 where
16786 P1: windows_core::Param<windows_core::PCWSTR>,
16787 {
16788 unsafe {
16789 (windows_core::Interface::vtable(self).Invoke)(
16790 windows_core::Interface::as_raw(self),
16791 errorcode,
16792 result.param().abi(),
16793 )
16794 .ok()
16795 }
16796 }
16797}
16798#[repr(C)]
16799pub struct ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
16800 pub base__: windows_core::IUnknown_Vtbl,
16801 pub Invoke: unsafe extern "system" fn(
16802 *mut core::ffi::c_void,
16803 windows_core::HRESULT,
16804 windows_core::PCWSTR,
16805 ) -> windows_core::HRESULT,
16806}
16807pub trait ICoreWebView2ExecuteScriptCompletedHandler_Impl: windows_core::IUnknownImpl {
16808 fn Invoke(
16809 &self,
16810 errorcode: windows_core::HRESULT,
16811 result: &windows_core::PCWSTR,
16812 ) -> windows_core::Result<()>;
16813}
16814impl ICoreWebView2ExecuteScriptCompletedHandler_Vtbl {
16815 pub const fn new<
16816 Identity: ICoreWebView2ExecuteScriptCompletedHandler_Impl,
16817 const OFFSET: isize,
16818 >() -> Self {
16819 unsafe extern "system" fn Invoke<
16820 Identity: ICoreWebView2ExecuteScriptCompletedHandler_Impl,
16821 const OFFSET: isize,
16822 >(
16823 this: *mut core::ffi::c_void,
16824 errorcode: windows_core::HRESULT,
16825 result: windows_core::PCWSTR,
16826 ) -> windows_core::HRESULT {
16827 unsafe {
16828 let this: &Identity =
16829 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16830 ICoreWebView2ExecuteScriptCompletedHandler_Impl::Invoke(
16831 this,
16832 core::mem::transmute_copy(&errorcode),
16833 core::mem::transmute(&result),
16834 )
16835 .into()
16836 }
16837 }
16838 Self {
16839 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
16840 Invoke: Invoke::<Identity, OFFSET>,
16841 }
16842 }
16843 pub fn matches(iid: &windows_core::GUID) -> bool {
16844 iid == &<ICoreWebView2ExecuteScriptCompletedHandler as windows_core::Interface>::IID
16845 }
16846}
16847impl windows_core::RuntimeName for ICoreWebView2ExecuteScriptCompletedHandler {}
16848windows_core::imp::define_interface!(
16849 ICoreWebView2ExecuteScriptResult,
16850 ICoreWebView2ExecuteScriptResult_Vtbl,
16851 0x0ce15963_3698_4df7_9399_71ed6cdd8c9f
16852);
16853windows_core::imp::interface_hierarchy!(ICoreWebView2ExecuteScriptResult, windows_core::IUnknown);
16854impl ICoreWebView2ExecuteScriptResult {
16855 pub unsafe fn Succeeded(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
16856 unsafe {
16857 (windows_core::Interface::vtable(self).Succeeded)(
16858 windows_core::Interface::as_raw(self),
16859 value as _,
16860 )
16861 .ok()
16862 }
16863 }
16864 pub unsafe fn ResultAsJson(
16865 &self,
16866 jsonresult: *mut windows_core::PWSTR,
16867 ) -> windows_core::Result<()> {
16868 unsafe {
16869 (windows_core::Interface::vtable(self).ResultAsJson)(
16870 windows_core::Interface::as_raw(self),
16871 jsonresult as _,
16872 )
16873 .ok()
16874 }
16875 }
16876 pub unsafe fn TryGetResultAsString(
16877 &self,
16878 stringresult: *mut windows_core::PWSTR,
16879 value: *mut windows_core::BOOL,
16880 ) -> windows_core::Result<()> {
16881 unsafe {
16882 (windows_core::Interface::vtable(self).TryGetResultAsString)(
16883 windows_core::Interface::as_raw(self),
16884 stringresult as _,
16885 value as _,
16886 )
16887 .ok()
16888 }
16889 }
16890 pub unsafe fn Exception(&self) -> windows_core::Result<ICoreWebView2ScriptException> {
16891 unsafe {
16892 let mut result__ = core::mem::zeroed();
16893 (windows_core::Interface::vtable(self).Exception)(
16894 windows_core::Interface::as_raw(self),
16895 &mut result__,
16896 )
16897 .and_then(|| windows_core::Type::from_abi(result__))
16898 }
16899 }
16900}
16901#[repr(C)]
16902pub struct ICoreWebView2ExecuteScriptResult_Vtbl {
16903 pub base__: windows_core::IUnknown_Vtbl,
16904 pub Succeeded: unsafe extern "system" fn(
16905 *mut core::ffi::c_void,
16906 *mut windows_core::BOOL,
16907 ) -> windows_core::HRESULT,
16908 pub ResultAsJson: unsafe extern "system" fn(
16909 *mut core::ffi::c_void,
16910 *mut windows_core::PWSTR,
16911 ) -> windows_core::HRESULT,
16912 pub TryGetResultAsString: unsafe extern "system" fn(
16913 *mut core::ffi::c_void,
16914 *mut windows_core::PWSTR,
16915 *mut windows_core::BOOL,
16916 ) -> windows_core::HRESULT,
16917 pub Exception: unsafe extern "system" fn(
16918 *mut core::ffi::c_void,
16919 *mut *mut core::ffi::c_void,
16920 ) -> windows_core::HRESULT,
16921}
16922pub trait ICoreWebView2ExecuteScriptResult_Impl: windows_core::IUnknownImpl {
16923 fn Succeeded(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
16924 fn ResultAsJson(&self, jsonresult: *mut windows_core::PWSTR) -> windows_core::Result<()>;
16925 fn TryGetResultAsString(
16926 &self,
16927 stringresult: *mut windows_core::PWSTR,
16928 value: *mut windows_core::BOOL,
16929 ) -> windows_core::Result<()>;
16930 fn Exception(&self) -> windows_core::Result<ICoreWebView2ScriptException>;
16931}
16932impl ICoreWebView2ExecuteScriptResult_Vtbl {
16933 pub const fn new<Identity: ICoreWebView2ExecuteScriptResult_Impl, const OFFSET: isize>() -> Self
16934 {
16935 unsafe extern "system" fn Succeeded<
16936 Identity: ICoreWebView2ExecuteScriptResult_Impl,
16937 const OFFSET: isize,
16938 >(
16939 this: *mut core::ffi::c_void,
16940 value: *mut windows_core::BOOL,
16941 ) -> windows_core::HRESULT {
16942 unsafe {
16943 let this: &Identity =
16944 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16945 ICoreWebView2ExecuteScriptResult_Impl::Succeeded(
16946 this,
16947 core::mem::transmute_copy(&value),
16948 )
16949 .into()
16950 }
16951 }
16952 unsafe extern "system" fn ResultAsJson<
16953 Identity: ICoreWebView2ExecuteScriptResult_Impl,
16954 const OFFSET: isize,
16955 >(
16956 this: *mut core::ffi::c_void,
16957 jsonresult: *mut windows_core::PWSTR,
16958 ) -> windows_core::HRESULT {
16959 unsafe {
16960 let this: &Identity =
16961 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16962 ICoreWebView2ExecuteScriptResult_Impl::ResultAsJson(
16963 this,
16964 core::mem::transmute_copy(&jsonresult),
16965 )
16966 .into()
16967 }
16968 }
16969 unsafe extern "system" fn TryGetResultAsString<
16970 Identity: ICoreWebView2ExecuteScriptResult_Impl,
16971 const OFFSET: isize,
16972 >(
16973 this: *mut core::ffi::c_void,
16974 stringresult: *mut windows_core::PWSTR,
16975 value: *mut windows_core::BOOL,
16976 ) -> windows_core::HRESULT {
16977 unsafe {
16978 let this: &Identity =
16979 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16980 ICoreWebView2ExecuteScriptResult_Impl::TryGetResultAsString(
16981 this,
16982 core::mem::transmute_copy(&stringresult),
16983 core::mem::transmute_copy(&value),
16984 )
16985 .into()
16986 }
16987 }
16988 unsafe extern "system" fn Exception<
16989 Identity: ICoreWebView2ExecuteScriptResult_Impl,
16990 const OFFSET: isize,
16991 >(
16992 this: *mut core::ffi::c_void,
16993 exception: *mut *mut core::ffi::c_void,
16994 ) -> windows_core::HRESULT {
16995 unsafe {
16996 let this: &Identity =
16997 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
16998 match ICoreWebView2ExecuteScriptResult_Impl::Exception(this) {
16999 Ok(ok__) => {
17000 exception.write(core::mem::transmute(ok__));
17001 windows_core::HRESULT(0)
17002 }
17003 Err(err) => err.into(),
17004 }
17005 }
17006 }
17007 Self {
17008 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17009 Succeeded: Succeeded::<Identity, OFFSET>,
17010 ResultAsJson: ResultAsJson::<Identity, OFFSET>,
17011 TryGetResultAsString: TryGetResultAsString::<Identity, OFFSET>,
17012 Exception: Exception::<Identity, OFFSET>,
17013 }
17014 }
17015 pub fn matches(iid: &windows_core::GUID) -> bool {
17016 iid == &<ICoreWebView2ExecuteScriptResult as windows_core::Interface>::IID
17017 }
17018}
17019impl windows_core::RuntimeName for ICoreWebView2ExecuteScriptResult {}
17020windows_core::imp::define_interface!(
17021 ICoreWebView2ExecuteScriptWithResultCompletedHandler,
17022 ICoreWebView2ExecuteScriptWithResultCompletedHandler_Vtbl,
17023 0x1bb5317b_8238_4c67_a7ff_baf6558f289d
17024);
17025windows_core::imp::interface_hierarchy!(
17026 ICoreWebView2ExecuteScriptWithResultCompletedHandler,
17027 windows_core::IUnknown
17028);
17029impl ICoreWebView2ExecuteScriptWithResultCompletedHandler {
17030 pub unsafe fn Invoke<P1>(
17031 &self,
17032 errorcode: windows_core::HRESULT,
17033 result: P1,
17034 ) -> windows_core::Result<()>
17035 where
17036 P1: windows_core::Param<ICoreWebView2ExecuteScriptResult>,
17037 {
17038 unsafe {
17039 (windows_core::Interface::vtable(self).Invoke)(
17040 windows_core::Interface::as_raw(self),
17041 errorcode,
17042 result.param().abi(),
17043 )
17044 .ok()
17045 }
17046 }
17047}
17048#[repr(C)]
17049pub struct ICoreWebView2ExecuteScriptWithResultCompletedHandler_Vtbl {
17050 pub base__: windows_core::IUnknown_Vtbl,
17051 pub Invoke: unsafe extern "system" fn(
17052 *mut core::ffi::c_void,
17053 windows_core::HRESULT,
17054 *mut core::ffi::c_void,
17055 ) -> windows_core::HRESULT,
17056}
17057pub trait ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl:
17058 windows_core::IUnknownImpl
17059{
17060 fn Invoke(
17061 &self,
17062 errorcode: windows_core::HRESULT,
17063 result: windows_core::Ref<'_, ICoreWebView2ExecuteScriptResult>,
17064 ) -> windows_core::Result<()>;
17065}
17066impl ICoreWebView2ExecuteScriptWithResultCompletedHandler_Vtbl {
17067 pub const fn new<
17068 Identity: ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl,
17069 const OFFSET: isize,
17070 >() -> Self {
17071 unsafe extern "system" fn Invoke<
17072 Identity: ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl,
17073 const OFFSET: isize,
17074 >(
17075 this: *mut core::ffi::c_void,
17076 errorcode: windows_core::HRESULT,
17077 result: *mut core::ffi::c_void,
17078 ) -> windows_core::HRESULT {
17079 unsafe {
17080 let this: &Identity =
17081 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17082 ICoreWebView2ExecuteScriptWithResultCompletedHandler_Impl::Invoke(
17083 this,
17084 core::mem::transmute_copy(&errorcode),
17085 core::mem::transmute_copy(&result),
17086 )
17087 .into()
17088 }
17089 }
17090 Self {
17091 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17092 Invoke: Invoke::<Identity, OFFSET>,
17093 }
17094 }
17095 pub fn matches(iid: &windows_core::GUID) -> bool {
17096 iid == & < ICoreWebView2ExecuteScriptWithResultCompletedHandler as windows_core::Interface >::IID
17097 }
17098}
17099impl windows_core::RuntimeName for ICoreWebView2ExecuteScriptWithResultCompletedHandler {}
17100windows_core::imp::define_interface!(
17101 ICoreWebView2FaviconChangedEventHandler,
17102 ICoreWebView2FaviconChangedEventHandler_Vtbl,
17103 0x2913da94_833d_4de0_8dca_900fc524a1a4
17104);
17105windows_core::imp::interface_hierarchy!(
17106 ICoreWebView2FaviconChangedEventHandler,
17107 windows_core::IUnknown
17108);
17109impl ICoreWebView2FaviconChangedEventHandler {
17110 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
17111 where
17112 P0: windows_core::Param<ICoreWebView2>,
17113 P1: windows_core::Param<windows_core::IUnknown>,
17114 {
17115 unsafe {
17116 (windows_core::Interface::vtable(self).Invoke)(
17117 windows_core::Interface::as_raw(self),
17118 sender.param().abi(),
17119 args.param().abi(),
17120 )
17121 .ok()
17122 }
17123 }
17124}
17125#[repr(C)]
17126pub struct ICoreWebView2FaviconChangedEventHandler_Vtbl {
17127 pub base__: windows_core::IUnknown_Vtbl,
17128 pub Invoke: unsafe extern "system" fn(
17129 *mut core::ffi::c_void,
17130 *mut core::ffi::c_void,
17131 *mut core::ffi::c_void,
17132 ) -> windows_core::HRESULT,
17133}
17134pub trait ICoreWebView2FaviconChangedEventHandler_Impl: windows_core::IUnknownImpl {
17135 fn Invoke(
17136 &self,
17137 sender: windows_core::Ref<'_, ICoreWebView2>,
17138 args: windows_core::Ref<'_, windows_core::IUnknown>,
17139 ) -> windows_core::Result<()>;
17140}
17141impl ICoreWebView2FaviconChangedEventHandler_Vtbl {
17142 pub const fn new<
17143 Identity: ICoreWebView2FaviconChangedEventHandler_Impl,
17144 const OFFSET: isize,
17145 >() -> Self {
17146 unsafe extern "system" fn Invoke<
17147 Identity: ICoreWebView2FaviconChangedEventHandler_Impl,
17148 const OFFSET: isize,
17149 >(
17150 this: *mut core::ffi::c_void,
17151 sender: *mut core::ffi::c_void,
17152 args: *mut core::ffi::c_void,
17153 ) -> windows_core::HRESULT {
17154 unsafe {
17155 let this: &Identity =
17156 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17157 ICoreWebView2FaviconChangedEventHandler_Impl::Invoke(
17158 this,
17159 core::mem::transmute_copy(&sender),
17160 core::mem::transmute_copy(&args),
17161 )
17162 .into()
17163 }
17164 }
17165 Self {
17166 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17167 Invoke: Invoke::<Identity, OFFSET>,
17168 }
17169 }
17170 pub fn matches(iid: &windows_core::GUID) -> bool {
17171 iid == &<ICoreWebView2FaviconChangedEventHandler as windows_core::Interface>::IID
17172 }
17173}
17174impl windows_core::RuntimeName for ICoreWebView2FaviconChangedEventHandler {}
17175windows_core::imp::define_interface!(
17176 ICoreWebView2File,
17177 ICoreWebView2File_Vtbl,
17178 0xf2c19559_6bc1_4583_a757_90021be9afec
17179);
17180windows_core::imp::interface_hierarchy!(ICoreWebView2File, windows_core::IUnknown);
17181impl ICoreWebView2File {
17182 pub unsafe fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
17183 unsafe {
17184 (windows_core::Interface::vtable(self).Path)(
17185 windows_core::Interface::as_raw(self),
17186 value as _,
17187 )
17188 .ok()
17189 }
17190 }
17191}
17192#[repr(C)]
17193pub struct ICoreWebView2File_Vtbl {
17194 pub base__: windows_core::IUnknown_Vtbl,
17195 pub Path: unsafe extern "system" fn(
17196 *mut core::ffi::c_void,
17197 *mut windows_core::PWSTR,
17198 ) -> windows_core::HRESULT,
17199}
17200pub trait ICoreWebView2File_Impl: windows_core::IUnknownImpl {
17201 fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
17202}
17203impl ICoreWebView2File_Vtbl {
17204 pub const fn new<Identity: ICoreWebView2File_Impl, const OFFSET: isize>() -> Self {
17205 unsafe extern "system" fn Path<Identity: ICoreWebView2File_Impl, const OFFSET: isize>(
17206 this: *mut core::ffi::c_void,
17207 value: *mut windows_core::PWSTR,
17208 ) -> windows_core::HRESULT {
17209 unsafe {
17210 let this: &Identity =
17211 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17212 ICoreWebView2File_Impl::Path(this, core::mem::transmute_copy(&value)).into()
17213 }
17214 }
17215 Self {
17216 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17217 Path: Path::<Identity, OFFSET>,
17218 }
17219 }
17220 pub fn matches(iid: &windows_core::GUID) -> bool {
17221 iid == &<ICoreWebView2File as windows_core::Interface>::IID
17222 }
17223}
17224impl windows_core::RuntimeName for ICoreWebView2File {}
17225windows_core::imp::define_interface!(
17226 ICoreWebView2FileSystemHandle,
17227 ICoreWebView2FileSystemHandle_Vtbl,
17228 0xc65100ac_0de2_5551_a362_23d9bd1d0e1f
17229);
17230windows_core::imp::interface_hierarchy!(ICoreWebView2FileSystemHandle, windows_core::IUnknown);
17231impl ICoreWebView2FileSystemHandle {
17232 pub unsafe fn Kind(
17233 &self,
17234 value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND,
17235 ) -> windows_core::Result<()> {
17236 unsafe {
17237 (windows_core::Interface::vtable(self).Kind)(
17238 windows_core::Interface::as_raw(self),
17239 value as _,
17240 )
17241 .ok()
17242 }
17243 }
17244 pub unsafe fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
17245 unsafe {
17246 (windows_core::Interface::vtable(self).Path)(
17247 windows_core::Interface::as_raw(self),
17248 value as _,
17249 )
17250 .ok()
17251 }
17252 }
17253 pub unsafe fn Permission(
17254 &self,
17255 value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
17256 ) -> windows_core::Result<()> {
17257 unsafe {
17258 (windows_core::Interface::vtable(self).Permission)(
17259 windows_core::Interface::as_raw(self),
17260 value as _,
17261 )
17262 .ok()
17263 }
17264 }
17265}
17266#[repr(C)]
17267pub struct ICoreWebView2FileSystemHandle_Vtbl {
17268 pub base__: windows_core::IUnknown_Vtbl,
17269 pub Kind: unsafe extern "system" fn(
17270 *mut core::ffi::c_void,
17271 *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND,
17272 ) -> windows_core::HRESULT,
17273 pub Path: unsafe extern "system" fn(
17274 *mut core::ffi::c_void,
17275 *mut windows_core::PWSTR,
17276 ) -> windows_core::HRESULT,
17277 pub Permission: unsafe extern "system" fn(
17278 *mut core::ffi::c_void,
17279 *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
17280 ) -> windows_core::HRESULT,
17281}
17282pub trait ICoreWebView2FileSystemHandle_Impl: windows_core::IUnknownImpl {
17283 fn Kind(&self, value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND) -> windows_core::Result<()>;
17284 fn Path(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
17285 fn Permission(
17286 &self,
17287 value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
17288 ) -> windows_core::Result<()>;
17289}
17290impl ICoreWebView2FileSystemHandle_Vtbl {
17291 pub const fn new<Identity: ICoreWebView2FileSystemHandle_Impl, const OFFSET: isize>() -> Self {
17292 unsafe extern "system" fn Kind<
17293 Identity: ICoreWebView2FileSystemHandle_Impl,
17294 const OFFSET: isize,
17295 >(
17296 this: *mut core::ffi::c_void,
17297 value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_KIND,
17298 ) -> windows_core::HRESULT {
17299 unsafe {
17300 let this: &Identity =
17301 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17302 ICoreWebView2FileSystemHandle_Impl::Kind(this, core::mem::transmute_copy(&value))
17303 .into()
17304 }
17305 }
17306 unsafe extern "system" fn Path<
17307 Identity: ICoreWebView2FileSystemHandle_Impl,
17308 const OFFSET: isize,
17309 >(
17310 this: *mut core::ffi::c_void,
17311 value: *mut windows_core::PWSTR,
17312 ) -> windows_core::HRESULT {
17313 unsafe {
17314 let this: &Identity =
17315 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17316 ICoreWebView2FileSystemHandle_Impl::Path(this, core::mem::transmute_copy(&value))
17317 .into()
17318 }
17319 }
17320 unsafe extern "system" fn Permission<
17321 Identity: ICoreWebView2FileSystemHandle_Impl,
17322 const OFFSET: isize,
17323 >(
17324 this: *mut core::ffi::c_void,
17325 value: *mut COREWEBVIEW2_FILE_SYSTEM_HANDLE_PERMISSION,
17326 ) -> windows_core::HRESULT {
17327 unsafe {
17328 let this: &Identity =
17329 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17330 ICoreWebView2FileSystemHandle_Impl::Permission(
17331 this,
17332 core::mem::transmute_copy(&value),
17333 )
17334 .into()
17335 }
17336 }
17337 Self {
17338 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17339 Kind: Kind::<Identity, OFFSET>,
17340 Path: Path::<Identity, OFFSET>,
17341 Permission: Permission::<Identity, OFFSET>,
17342 }
17343 }
17344 pub fn matches(iid: &windows_core::GUID) -> bool {
17345 iid == &<ICoreWebView2FileSystemHandle as windows_core::Interface>::IID
17346 }
17347}
17348impl windows_core::RuntimeName for ICoreWebView2FileSystemHandle {}
17349windows_core::imp::define_interface!(
17350 ICoreWebView2FocusChangedEventHandler,
17351 ICoreWebView2FocusChangedEventHandler_Vtbl,
17352 0x05ea24bd_6452_4926_9014_4b82b498135d
17353);
17354windows_core::imp::interface_hierarchy!(
17355 ICoreWebView2FocusChangedEventHandler,
17356 windows_core::IUnknown
17357);
17358impl ICoreWebView2FocusChangedEventHandler {
17359 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
17360 where
17361 P0: windows_core::Param<ICoreWebView2Controller>,
17362 P1: windows_core::Param<windows_core::IUnknown>,
17363 {
17364 unsafe {
17365 (windows_core::Interface::vtable(self).Invoke)(
17366 windows_core::Interface::as_raw(self),
17367 sender.param().abi(),
17368 args.param().abi(),
17369 )
17370 .ok()
17371 }
17372 }
17373}
17374#[repr(C)]
17375pub struct ICoreWebView2FocusChangedEventHandler_Vtbl {
17376 pub base__: windows_core::IUnknown_Vtbl,
17377 pub Invoke: unsafe extern "system" fn(
17378 *mut core::ffi::c_void,
17379 *mut core::ffi::c_void,
17380 *mut core::ffi::c_void,
17381 ) -> windows_core::HRESULT,
17382}
17383pub trait ICoreWebView2FocusChangedEventHandler_Impl: windows_core::IUnknownImpl {
17384 fn Invoke(
17385 &self,
17386 sender: windows_core::Ref<'_, ICoreWebView2Controller>,
17387 args: windows_core::Ref<'_, windows_core::IUnknown>,
17388 ) -> windows_core::Result<()>;
17389}
17390impl ICoreWebView2FocusChangedEventHandler_Vtbl {
17391 pub const fn new<Identity: ICoreWebView2FocusChangedEventHandler_Impl, const OFFSET: isize>(
17392 ) -> Self {
17393 unsafe extern "system" fn Invoke<
17394 Identity: ICoreWebView2FocusChangedEventHandler_Impl,
17395 const OFFSET: isize,
17396 >(
17397 this: *mut core::ffi::c_void,
17398 sender: *mut core::ffi::c_void,
17399 args: *mut core::ffi::c_void,
17400 ) -> windows_core::HRESULT {
17401 unsafe {
17402 let this: &Identity =
17403 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17404 ICoreWebView2FocusChangedEventHandler_Impl::Invoke(
17405 this,
17406 core::mem::transmute_copy(&sender),
17407 core::mem::transmute_copy(&args),
17408 )
17409 .into()
17410 }
17411 }
17412 Self {
17413 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17414 Invoke: Invoke::<Identity, OFFSET>,
17415 }
17416 }
17417 pub fn matches(iid: &windows_core::GUID) -> bool {
17418 iid == &<ICoreWebView2FocusChangedEventHandler as windows_core::Interface>::IID
17419 }
17420}
17421impl windows_core::RuntimeName for ICoreWebView2FocusChangedEventHandler {}
17422windows_core::imp::define_interface!(
17423 ICoreWebView2Frame,
17424 ICoreWebView2Frame_Vtbl,
17425 0xf1131a5e_9ba9_11eb_a8b3_0242ac130003
17426);
17427windows_core::imp::interface_hierarchy!(ICoreWebView2Frame, windows_core::IUnknown);
17428impl ICoreWebView2Frame {
17429 pub unsafe fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()> {
17430 unsafe {
17431 (windows_core::Interface::vtable(self).Name)(
17432 windows_core::Interface::as_raw(self),
17433 name as _,
17434 )
17435 .ok()
17436 }
17437 }
17438 pub unsafe fn add_NameChanged<P0>(
17439 &self,
17440 eventhandler: P0,
17441 token: *mut i64,
17442 ) -> windows_core::Result<()>
17443 where
17444 P0: windows_core::Param<ICoreWebView2FrameNameChangedEventHandler>,
17445 {
17446 unsafe {
17447 (windows_core::Interface::vtable(self).add_NameChanged)(
17448 windows_core::Interface::as_raw(self),
17449 eventhandler.param().abi(),
17450 token as _,
17451 )
17452 .ok()
17453 }
17454 }
17455 pub unsafe fn remove_NameChanged(&self, token: i64) -> windows_core::Result<()> {
17456 unsafe {
17457 (windows_core::Interface::vtable(self).remove_NameChanged)(
17458 windows_core::Interface::as_raw(self),
17459 token,
17460 )
17461 .ok()
17462 }
17463 }
17464 pub unsafe fn AddHostObjectToScriptWithOrigins<P0>(
17465 &self,
17466 name: P0,
17467 object: *mut windows::Win32::System::Variant::VARIANT,
17468 originscount: u32,
17469 origins: *const windows_core::PCWSTR,
17470 ) -> windows_core::Result<()>
17471 where
17472 P0: windows_core::Param<windows_core::PCWSTR>,
17473 {
17474 unsafe {
17475 (windows_core::Interface::vtable(self).AddHostObjectToScriptWithOrigins)(
17476 windows_core::Interface::as_raw(self),
17477 name.param().abi(),
17478 core::mem::transmute(object),
17479 originscount,
17480 origins,
17481 )
17482 .ok()
17483 }
17484 }
17485 pub unsafe fn RemoveHostObjectFromScript<P0>(&self, name: P0) -> windows_core::Result<()>
17486 where
17487 P0: windows_core::Param<windows_core::PCWSTR>,
17488 {
17489 unsafe {
17490 (windows_core::Interface::vtable(self).RemoveHostObjectFromScript)(
17491 windows_core::Interface::as_raw(self),
17492 name.param().abi(),
17493 )
17494 .ok()
17495 }
17496 }
17497 pub unsafe fn add_Destroyed<P0>(
17498 &self,
17499 eventhandler: P0,
17500 token: *mut i64,
17501 ) -> windows_core::Result<()>
17502 where
17503 P0: windows_core::Param<ICoreWebView2FrameDestroyedEventHandler>,
17504 {
17505 unsafe {
17506 (windows_core::Interface::vtable(self).add_Destroyed)(
17507 windows_core::Interface::as_raw(self),
17508 eventhandler.param().abi(),
17509 token as _,
17510 )
17511 .ok()
17512 }
17513 }
17514 pub unsafe fn remove_Destroyed(&self, token: i64) -> windows_core::Result<()> {
17515 unsafe {
17516 (windows_core::Interface::vtable(self).remove_Destroyed)(
17517 windows_core::Interface::as_raw(self),
17518 token,
17519 )
17520 .ok()
17521 }
17522 }
17523 pub unsafe fn IsDestroyed(
17524 &self,
17525 destroyed: *mut windows_core::BOOL,
17526 ) -> windows_core::Result<()> {
17527 unsafe {
17528 (windows_core::Interface::vtable(self).IsDestroyed)(
17529 windows_core::Interface::as_raw(self),
17530 destroyed as _,
17531 )
17532 .ok()
17533 }
17534 }
17535}
17536#[repr(C)]
17537pub struct ICoreWebView2Frame_Vtbl {
17538 pub base__: windows_core::IUnknown_Vtbl,
17539 pub Name: unsafe extern "system" fn(
17540 *mut core::ffi::c_void,
17541 *mut windows_core::PWSTR,
17542 ) -> windows_core::HRESULT,
17543 pub add_NameChanged: unsafe extern "system" fn(
17544 *mut core::ffi::c_void,
17545 *mut core::ffi::c_void,
17546 *mut i64,
17547 ) -> windows_core::HRESULT,
17548 pub remove_NameChanged:
17549 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17550 pub AddHostObjectToScriptWithOrigins: unsafe extern "system" fn(
17551 *mut core::ffi::c_void,
17552 windows_core::PCWSTR,
17553 *mut windows::Win32::System::Variant::VARIANT,
17554 u32,
17555 *const windows_core::PCWSTR,
17556 ) -> windows_core::HRESULT,
17557 pub RemoveHostObjectFromScript: unsafe extern "system" fn(
17558 *mut core::ffi::c_void,
17559 windows_core::PCWSTR,
17560 ) -> windows_core::HRESULT,
17561 pub add_Destroyed: unsafe extern "system" fn(
17562 *mut core::ffi::c_void,
17563 *mut core::ffi::c_void,
17564 *mut i64,
17565 ) -> windows_core::HRESULT,
17566 pub remove_Destroyed:
17567 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17568 pub IsDestroyed: unsafe extern "system" fn(
17569 *mut core::ffi::c_void,
17570 *mut windows_core::BOOL,
17571 ) -> windows_core::HRESULT,
17572}
17573pub trait ICoreWebView2Frame_Impl: windows_core::IUnknownImpl {
17574 fn Name(&self, name: *mut windows_core::PWSTR) -> windows_core::Result<()>;
17575 fn add_NameChanged(
17576 &self,
17577 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameNameChangedEventHandler>,
17578 token: *mut i64,
17579 ) -> windows_core::Result<()>;
17580 fn remove_NameChanged(&self, token: i64) -> windows_core::Result<()>;
17581 fn AddHostObjectToScriptWithOrigins(
17582 &self,
17583 name: &windows_core::PCWSTR,
17584 object: *mut windows::Win32::System::Variant::VARIANT,
17585 originscount: u32,
17586 origins: *const windows_core::PCWSTR,
17587 ) -> windows_core::Result<()>;
17588 fn RemoveHostObjectFromScript(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>;
17589 fn add_Destroyed(
17590 &self,
17591 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameDestroyedEventHandler>,
17592 token: *mut i64,
17593 ) -> windows_core::Result<()>;
17594 fn remove_Destroyed(&self, token: i64) -> windows_core::Result<()>;
17595 fn IsDestroyed(&self, destroyed: *mut windows_core::BOOL) -> windows_core::Result<()>;
17596}
17597impl ICoreWebView2Frame_Vtbl {
17598 pub const fn new<Identity: ICoreWebView2Frame_Impl, const OFFSET: isize>() -> Self {
17599 unsafe extern "system" fn Name<Identity: ICoreWebView2Frame_Impl, const OFFSET: isize>(
17600 this: *mut core::ffi::c_void,
17601 name: *mut windows_core::PWSTR,
17602 ) -> windows_core::HRESULT {
17603 unsafe {
17604 let this: &Identity =
17605 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17606 ICoreWebView2Frame_Impl::Name(this, core::mem::transmute_copy(&name)).into()
17607 }
17608 }
17609 unsafe extern "system" fn add_NameChanged<
17610 Identity: ICoreWebView2Frame_Impl,
17611 const OFFSET: isize,
17612 >(
17613 this: *mut core::ffi::c_void,
17614 eventhandler: *mut core::ffi::c_void,
17615 token: *mut i64,
17616 ) -> windows_core::HRESULT {
17617 unsafe {
17618 let this: &Identity =
17619 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17620 ICoreWebView2Frame_Impl::add_NameChanged(
17621 this,
17622 core::mem::transmute_copy(&eventhandler),
17623 core::mem::transmute_copy(&token),
17624 )
17625 .into()
17626 }
17627 }
17628 unsafe extern "system" fn remove_NameChanged<
17629 Identity: ICoreWebView2Frame_Impl,
17630 const OFFSET: isize,
17631 >(
17632 this: *mut core::ffi::c_void,
17633 token: i64,
17634 ) -> windows_core::HRESULT {
17635 unsafe {
17636 let this: &Identity =
17637 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17638 ICoreWebView2Frame_Impl::remove_NameChanged(this, core::mem::transmute_copy(&token))
17639 .into()
17640 }
17641 }
17642 unsafe extern "system" fn AddHostObjectToScriptWithOrigins<
17643 Identity: ICoreWebView2Frame_Impl,
17644 const OFFSET: isize,
17645 >(
17646 this: *mut core::ffi::c_void,
17647 name: windows_core::PCWSTR,
17648 object: *mut windows::Win32::System::Variant::VARIANT,
17649 originscount: u32,
17650 origins: *const windows_core::PCWSTR,
17651 ) -> windows_core::HRESULT {
17652 unsafe {
17653 let this: &Identity =
17654 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17655 ICoreWebView2Frame_Impl::AddHostObjectToScriptWithOrigins(
17656 this,
17657 core::mem::transmute(&name),
17658 core::mem::transmute_copy(&object),
17659 core::mem::transmute_copy(&originscount),
17660 core::mem::transmute_copy(&origins),
17661 )
17662 .into()
17663 }
17664 }
17665 unsafe extern "system" fn RemoveHostObjectFromScript<
17666 Identity: ICoreWebView2Frame_Impl,
17667 const OFFSET: isize,
17668 >(
17669 this: *mut core::ffi::c_void,
17670 name: windows_core::PCWSTR,
17671 ) -> windows_core::HRESULT {
17672 unsafe {
17673 let this: &Identity =
17674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17675 ICoreWebView2Frame_Impl::RemoveHostObjectFromScript(
17676 this,
17677 core::mem::transmute(&name),
17678 )
17679 .into()
17680 }
17681 }
17682 unsafe extern "system" fn add_Destroyed<
17683 Identity: ICoreWebView2Frame_Impl,
17684 const OFFSET: isize,
17685 >(
17686 this: *mut core::ffi::c_void,
17687 eventhandler: *mut core::ffi::c_void,
17688 token: *mut i64,
17689 ) -> windows_core::HRESULT {
17690 unsafe {
17691 let this: &Identity =
17692 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17693 ICoreWebView2Frame_Impl::add_Destroyed(
17694 this,
17695 core::mem::transmute_copy(&eventhandler),
17696 core::mem::transmute_copy(&token),
17697 )
17698 .into()
17699 }
17700 }
17701 unsafe extern "system" fn remove_Destroyed<
17702 Identity: ICoreWebView2Frame_Impl,
17703 const OFFSET: isize,
17704 >(
17705 this: *mut core::ffi::c_void,
17706 token: i64,
17707 ) -> windows_core::HRESULT {
17708 unsafe {
17709 let this: &Identity =
17710 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17711 ICoreWebView2Frame_Impl::remove_Destroyed(this, core::mem::transmute_copy(&token))
17712 .into()
17713 }
17714 }
17715 unsafe extern "system" fn IsDestroyed<
17716 Identity: ICoreWebView2Frame_Impl,
17717 const OFFSET: isize,
17718 >(
17719 this: *mut core::ffi::c_void,
17720 destroyed: *mut windows_core::BOOL,
17721 ) -> windows_core::HRESULT {
17722 unsafe {
17723 let this: &Identity =
17724 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
17725 ICoreWebView2Frame_Impl::IsDestroyed(this, core::mem::transmute_copy(&destroyed))
17726 .into()
17727 }
17728 }
17729 Self {
17730 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
17731 Name: Name::<Identity, OFFSET>,
17732 add_NameChanged: add_NameChanged::<Identity, OFFSET>,
17733 remove_NameChanged: remove_NameChanged::<Identity, OFFSET>,
17734 AddHostObjectToScriptWithOrigins: AddHostObjectToScriptWithOrigins::<Identity, OFFSET>,
17735 RemoveHostObjectFromScript: RemoveHostObjectFromScript::<Identity, OFFSET>,
17736 add_Destroyed: add_Destroyed::<Identity, OFFSET>,
17737 remove_Destroyed: remove_Destroyed::<Identity, OFFSET>,
17738 IsDestroyed: IsDestroyed::<Identity, OFFSET>,
17739 }
17740 }
17741 pub fn matches(iid: &windows_core::GUID) -> bool {
17742 iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
17743 }
17744}
17745impl windows_core::RuntimeName for ICoreWebView2Frame {}
17746windows_core::imp::define_interface!(
17747 ICoreWebView2Frame2,
17748 ICoreWebView2Frame2_Vtbl,
17749 0x7a6a5834_d185_4dbf_b63f_4a9bc43107d4
17750);
17751impl core::ops::Deref for ICoreWebView2Frame2 {
17752 type Target = ICoreWebView2Frame;
17753 fn deref(&self) -> &Self::Target {
17754 unsafe { core::mem::transmute(self) }
17755 }
17756}
17757windows_core::imp::interface_hierarchy!(
17758 ICoreWebView2Frame2,
17759 windows_core::IUnknown,
17760 ICoreWebView2Frame
17761);
17762impl ICoreWebView2Frame2 {
17763 pub unsafe fn add_NavigationStarting<P0>(
17764 &self,
17765 eventhandler: P0,
17766 token: *mut i64,
17767 ) -> windows_core::Result<()>
17768 where
17769 P0: windows_core::Param<ICoreWebView2FrameNavigationStartingEventHandler>,
17770 {
17771 unsafe {
17772 (windows_core::Interface::vtable(self).add_NavigationStarting)(
17773 windows_core::Interface::as_raw(self),
17774 eventhandler.param().abi(),
17775 token as _,
17776 )
17777 .ok()
17778 }
17779 }
17780 pub unsafe fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()> {
17781 unsafe {
17782 (windows_core::Interface::vtable(self).remove_NavigationStarting)(
17783 windows_core::Interface::as_raw(self),
17784 token,
17785 )
17786 .ok()
17787 }
17788 }
17789 pub unsafe fn add_ContentLoading<P0>(
17790 &self,
17791 eventhandler: P0,
17792 token: *mut i64,
17793 ) -> windows_core::Result<()>
17794 where
17795 P0: windows_core::Param<ICoreWebView2FrameContentLoadingEventHandler>,
17796 {
17797 unsafe {
17798 (windows_core::Interface::vtable(self).add_ContentLoading)(
17799 windows_core::Interface::as_raw(self),
17800 eventhandler.param().abi(),
17801 token as _,
17802 )
17803 .ok()
17804 }
17805 }
17806 pub unsafe fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()> {
17807 unsafe {
17808 (windows_core::Interface::vtable(self).remove_ContentLoading)(
17809 windows_core::Interface::as_raw(self),
17810 token,
17811 )
17812 .ok()
17813 }
17814 }
17815 pub unsafe fn add_NavigationCompleted<P0>(
17816 &self,
17817 eventhandler: P0,
17818 token: *mut i64,
17819 ) -> windows_core::Result<()>
17820 where
17821 P0: windows_core::Param<ICoreWebView2FrameNavigationCompletedEventHandler>,
17822 {
17823 unsafe {
17824 (windows_core::Interface::vtable(self).add_NavigationCompleted)(
17825 windows_core::Interface::as_raw(self),
17826 eventhandler.param().abi(),
17827 token as _,
17828 )
17829 .ok()
17830 }
17831 }
17832 pub unsafe fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()> {
17833 unsafe {
17834 (windows_core::Interface::vtable(self).remove_NavigationCompleted)(
17835 windows_core::Interface::as_raw(self),
17836 token,
17837 )
17838 .ok()
17839 }
17840 }
17841 pub unsafe fn add_DOMContentLoaded<P0>(
17842 &self,
17843 eventhandler: P0,
17844 token: *mut i64,
17845 ) -> windows_core::Result<()>
17846 where
17847 P0: windows_core::Param<ICoreWebView2FrameDOMContentLoadedEventHandler>,
17848 {
17849 unsafe {
17850 (windows_core::Interface::vtable(self).add_DOMContentLoaded)(
17851 windows_core::Interface::as_raw(self),
17852 eventhandler.param().abi(),
17853 token as _,
17854 )
17855 .ok()
17856 }
17857 }
17858 pub unsafe fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()> {
17859 unsafe {
17860 (windows_core::Interface::vtable(self).remove_DOMContentLoaded)(
17861 windows_core::Interface::as_raw(self),
17862 token,
17863 )
17864 .ok()
17865 }
17866 }
17867 pub unsafe fn ExecuteScript<P0, P1>(
17868 &self,
17869 javascript: P0,
17870 handler: P1,
17871 ) -> windows_core::Result<()>
17872 where
17873 P0: windows_core::Param<windows_core::PCWSTR>,
17874 P1: windows_core::Param<ICoreWebView2ExecuteScriptCompletedHandler>,
17875 {
17876 unsafe {
17877 (windows_core::Interface::vtable(self).ExecuteScript)(
17878 windows_core::Interface::as_raw(self),
17879 javascript.param().abi(),
17880 handler.param().abi(),
17881 )
17882 .ok()
17883 }
17884 }
17885 pub unsafe fn PostWebMessageAsJson<P0>(&self, webmessageasjson: P0) -> windows_core::Result<()>
17886 where
17887 P0: windows_core::Param<windows_core::PCWSTR>,
17888 {
17889 unsafe {
17890 (windows_core::Interface::vtable(self).PostWebMessageAsJson)(
17891 windows_core::Interface::as_raw(self),
17892 webmessageasjson.param().abi(),
17893 )
17894 .ok()
17895 }
17896 }
17897 pub unsafe fn PostWebMessageAsString<P0>(
17898 &self,
17899 webmessageasstring: P0,
17900 ) -> windows_core::Result<()>
17901 where
17902 P0: windows_core::Param<windows_core::PCWSTR>,
17903 {
17904 unsafe {
17905 (windows_core::Interface::vtable(self).PostWebMessageAsString)(
17906 windows_core::Interface::as_raw(self),
17907 webmessageasstring.param().abi(),
17908 )
17909 .ok()
17910 }
17911 }
17912 pub unsafe fn add_WebMessageReceived<P0>(
17913 &self,
17914 handler: P0,
17915 token: *mut i64,
17916 ) -> windows_core::Result<()>
17917 where
17918 P0: windows_core::Param<ICoreWebView2FrameWebMessageReceivedEventHandler>,
17919 {
17920 unsafe {
17921 (windows_core::Interface::vtable(self).add_WebMessageReceived)(
17922 windows_core::Interface::as_raw(self),
17923 handler.param().abi(),
17924 token as _,
17925 )
17926 .ok()
17927 }
17928 }
17929 pub unsafe fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()> {
17930 unsafe {
17931 (windows_core::Interface::vtable(self).remove_WebMessageReceived)(
17932 windows_core::Interface::as_raw(self),
17933 token,
17934 )
17935 .ok()
17936 }
17937 }
17938}
17939#[repr(C)]
17940pub struct ICoreWebView2Frame2_Vtbl {
17941 pub base__: ICoreWebView2Frame_Vtbl,
17942 pub add_NavigationStarting: unsafe extern "system" fn(
17943 *mut core::ffi::c_void,
17944 *mut core::ffi::c_void,
17945 *mut i64,
17946 ) -> windows_core::HRESULT,
17947 pub remove_NavigationStarting:
17948 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17949 pub add_ContentLoading: unsafe extern "system" fn(
17950 *mut core::ffi::c_void,
17951 *mut core::ffi::c_void,
17952 *mut i64,
17953 ) -> windows_core::HRESULT,
17954 pub remove_ContentLoading:
17955 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17956 pub add_NavigationCompleted: unsafe extern "system" fn(
17957 *mut core::ffi::c_void,
17958 *mut core::ffi::c_void,
17959 *mut i64,
17960 ) -> windows_core::HRESULT,
17961 pub remove_NavigationCompleted:
17962 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17963 pub add_DOMContentLoaded: unsafe extern "system" fn(
17964 *mut core::ffi::c_void,
17965 *mut core::ffi::c_void,
17966 *mut i64,
17967 ) -> windows_core::HRESULT,
17968 pub remove_DOMContentLoaded:
17969 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17970 pub ExecuteScript: unsafe extern "system" fn(
17971 *mut core::ffi::c_void,
17972 windows_core::PCWSTR,
17973 *mut core::ffi::c_void,
17974 ) -> windows_core::HRESULT,
17975 pub PostWebMessageAsJson: unsafe extern "system" fn(
17976 *mut core::ffi::c_void,
17977 windows_core::PCWSTR,
17978 ) -> windows_core::HRESULT,
17979 pub PostWebMessageAsString: unsafe extern "system" fn(
17980 *mut core::ffi::c_void,
17981 windows_core::PCWSTR,
17982 ) -> windows_core::HRESULT,
17983 pub add_WebMessageReceived: unsafe extern "system" fn(
17984 *mut core::ffi::c_void,
17985 *mut core::ffi::c_void,
17986 *mut i64,
17987 ) -> windows_core::HRESULT,
17988 pub remove_WebMessageReceived:
17989 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
17990}
17991pub trait ICoreWebView2Frame2_Impl: ICoreWebView2Frame_Impl {
17992 fn add_NavigationStarting(
17993 &self,
17994 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameNavigationStartingEventHandler>,
17995 token: *mut i64,
17996 ) -> windows_core::Result<()>;
17997 fn remove_NavigationStarting(&self, token: i64) -> windows_core::Result<()>;
17998 fn add_ContentLoading(
17999 &self,
18000 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameContentLoadingEventHandler>,
18001 token: *mut i64,
18002 ) -> windows_core::Result<()>;
18003 fn remove_ContentLoading(&self, token: i64) -> windows_core::Result<()>;
18004 fn add_NavigationCompleted(
18005 &self,
18006 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameNavigationCompletedEventHandler>,
18007 token: *mut i64,
18008 ) -> windows_core::Result<()>;
18009 fn remove_NavigationCompleted(&self, token: i64) -> windows_core::Result<()>;
18010 fn add_DOMContentLoaded(
18011 &self,
18012 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameDOMContentLoadedEventHandler>,
18013 token: *mut i64,
18014 ) -> windows_core::Result<()>;
18015 fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()>;
18016 fn ExecuteScript(
18017 &self,
18018 javascript: &windows_core::PCWSTR,
18019 handler: windows_core::Ref<'_, ICoreWebView2ExecuteScriptCompletedHandler>,
18020 ) -> windows_core::Result<()>;
18021 fn PostWebMessageAsJson(
18022 &self,
18023 webmessageasjson: &windows_core::PCWSTR,
18024 ) -> windows_core::Result<()>;
18025 fn PostWebMessageAsString(
18026 &self,
18027 webmessageasstring: &windows_core::PCWSTR,
18028 ) -> windows_core::Result<()>;
18029 fn add_WebMessageReceived(
18030 &self,
18031 handler: windows_core::Ref<'_, ICoreWebView2FrameWebMessageReceivedEventHandler>,
18032 token: *mut i64,
18033 ) -> windows_core::Result<()>;
18034 fn remove_WebMessageReceived(&self, token: i64) -> windows_core::Result<()>;
18035}
18036impl ICoreWebView2Frame2_Vtbl {
18037 pub const fn new<Identity: ICoreWebView2Frame2_Impl, const OFFSET: isize>() -> Self {
18038 unsafe extern "system" fn add_NavigationStarting<
18039 Identity: ICoreWebView2Frame2_Impl,
18040 const OFFSET: isize,
18041 >(
18042 this: *mut core::ffi::c_void,
18043 eventhandler: *mut core::ffi::c_void,
18044 token: *mut i64,
18045 ) -> windows_core::HRESULT {
18046 unsafe {
18047 let this: &Identity =
18048 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18049 ICoreWebView2Frame2_Impl::add_NavigationStarting(
18050 this,
18051 core::mem::transmute_copy(&eventhandler),
18052 core::mem::transmute_copy(&token),
18053 )
18054 .into()
18055 }
18056 }
18057 unsafe extern "system" fn remove_NavigationStarting<
18058 Identity: ICoreWebView2Frame2_Impl,
18059 const OFFSET: isize,
18060 >(
18061 this: *mut core::ffi::c_void,
18062 token: i64,
18063 ) -> windows_core::HRESULT {
18064 unsafe {
18065 let this: &Identity =
18066 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18067 ICoreWebView2Frame2_Impl::remove_NavigationStarting(
18068 this,
18069 core::mem::transmute_copy(&token),
18070 )
18071 .into()
18072 }
18073 }
18074 unsafe extern "system" fn add_ContentLoading<
18075 Identity: ICoreWebView2Frame2_Impl,
18076 const OFFSET: isize,
18077 >(
18078 this: *mut core::ffi::c_void,
18079 eventhandler: *mut core::ffi::c_void,
18080 token: *mut i64,
18081 ) -> windows_core::HRESULT {
18082 unsafe {
18083 let this: &Identity =
18084 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18085 ICoreWebView2Frame2_Impl::add_ContentLoading(
18086 this,
18087 core::mem::transmute_copy(&eventhandler),
18088 core::mem::transmute_copy(&token),
18089 )
18090 .into()
18091 }
18092 }
18093 unsafe extern "system" fn remove_ContentLoading<
18094 Identity: ICoreWebView2Frame2_Impl,
18095 const OFFSET: isize,
18096 >(
18097 this: *mut core::ffi::c_void,
18098 token: i64,
18099 ) -> windows_core::HRESULT {
18100 unsafe {
18101 let this: &Identity =
18102 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18103 ICoreWebView2Frame2_Impl::remove_ContentLoading(
18104 this,
18105 core::mem::transmute_copy(&token),
18106 )
18107 .into()
18108 }
18109 }
18110 unsafe extern "system" fn add_NavigationCompleted<
18111 Identity: ICoreWebView2Frame2_Impl,
18112 const OFFSET: isize,
18113 >(
18114 this: *mut core::ffi::c_void,
18115 eventhandler: *mut core::ffi::c_void,
18116 token: *mut i64,
18117 ) -> windows_core::HRESULT {
18118 unsafe {
18119 let this: &Identity =
18120 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18121 ICoreWebView2Frame2_Impl::add_NavigationCompleted(
18122 this,
18123 core::mem::transmute_copy(&eventhandler),
18124 core::mem::transmute_copy(&token),
18125 )
18126 .into()
18127 }
18128 }
18129 unsafe extern "system" fn remove_NavigationCompleted<
18130 Identity: ICoreWebView2Frame2_Impl,
18131 const OFFSET: isize,
18132 >(
18133 this: *mut core::ffi::c_void,
18134 token: i64,
18135 ) -> windows_core::HRESULT {
18136 unsafe {
18137 let this: &Identity =
18138 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18139 ICoreWebView2Frame2_Impl::remove_NavigationCompleted(
18140 this,
18141 core::mem::transmute_copy(&token),
18142 )
18143 .into()
18144 }
18145 }
18146 unsafe extern "system" fn add_DOMContentLoaded<
18147 Identity: ICoreWebView2Frame2_Impl,
18148 const OFFSET: isize,
18149 >(
18150 this: *mut core::ffi::c_void,
18151 eventhandler: *mut core::ffi::c_void,
18152 token: *mut i64,
18153 ) -> windows_core::HRESULT {
18154 unsafe {
18155 let this: &Identity =
18156 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18157 ICoreWebView2Frame2_Impl::add_DOMContentLoaded(
18158 this,
18159 core::mem::transmute_copy(&eventhandler),
18160 core::mem::transmute_copy(&token),
18161 )
18162 .into()
18163 }
18164 }
18165 unsafe extern "system" fn remove_DOMContentLoaded<
18166 Identity: ICoreWebView2Frame2_Impl,
18167 const OFFSET: isize,
18168 >(
18169 this: *mut core::ffi::c_void,
18170 token: i64,
18171 ) -> windows_core::HRESULT {
18172 unsafe {
18173 let this: &Identity =
18174 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18175 ICoreWebView2Frame2_Impl::remove_DOMContentLoaded(
18176 this,
18177 core::mem::transmute_copy(&token),
18178 )
18179 .into()
18180 }
18181 }
18182 unsafe extern "system" fn ExecuteScript<
18183 Identity: ICoreWebView2Frame2_Impl,
18184 const OFFSET: isize,
18185 >(
18186 this: *mut core::ffi::c_void,
18187 javascript: windows_core::PCWSTR,
18188 handler: *mut core::ffi::c_void,
18189 ) -> windows_core::HRESULT {
18190 unsafe {
18191 let this: &Identity =
18192 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18193 ICoreWebView2Frame2_Impl::ExecuteScript(
18194 this,
18195 core::mem::transmute(&javascript),
18196 core::mem::transmute_copy(&handler),
18197 )
18198 .into()
18199 }
18200 }
18201 unsafe extern "system" fn PostWebMessageAsJson<
18202 Identity: ICoreWebView2Frame2_Impl,
18203 const OFFSET: isize,
18204 >(
18205 this: *mut core::ffi::c_void,
18206 webmessageasjson: windows_core::PCWSTR,
18207 ) -> windows_core::HRESULT {
18208 unsafe {
18209 let this: &Identity =
18210 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18211 ICoreWebView2Frame2_Impl::PostWebMessageAsJson(
18212 this,
18213 core::mem::transmute(&webmessageasjson),
18214 )
18215 .into()
18216 }
18217 }
18218 unsafe extern "system" fn PostWebMessageAsString<
18219 Identity: ICoreWebView2Frame2_Impl,
18220 const OFFSET: isize,
18221 >(
18222 this: *mut core::ffi::c_void,
18223 webmessageasstring: windows_core::PCWSTR,
18224 ) -> windows_core::HRESULT {
18225 unsafe {
18226 let this: &Identity =
18227 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18228 ICoreWebView2Frame2_Impl::PostWebMessageAsString(
18229 this,
18230 core::mem::transmute(&webmessageasstring),
18231 )
18232 .into()
18233 }
18234 }
18235 unsafe extern "system" fn add_WebMessageReceived<
18236 Identity: ICoreWebView2Frame2_Impl,
18237 const OFFSET: isize,
18238 >(
18239 this: *mut core::ffi::c_void,
18240 handler: *mut core::ffi::c_void,
18241 token: *mut i64,
18242 ) -> windows_core::HRESULT {
18243 unsafe {
18244 let this: &Identity =
18245 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18246 ICoreWebView2Frame2_Impl::add_WebMessageReceived(
18247 this,
18248 core::mem::transmute_copy(&handler),
18249 core::mem::transmute_copy(&token),
18250 )
18251 .into()
18252 }
18253 }
18254 unsafe extern "system" fn remove_WebMessageReceived<
18255 Identity: ICoreWebView2Frame2_Impl,
18256 const OFFSET: isize,
18257 >(
18258 this: *mut core::ffi::c_void,
18259 token: i64,
18260 ) -> windows_core::HRESULT {
18261 unsafe {
18262 let this: &Identity =
18263 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18264 ICoreWebView2Frame2_Impl::remove_WebMessageReceived(
18265 this,
18266 core::mem::transmute_copy(&token),
18267 )
18268 .into()
18269 }
18270 }
18271 Self {
18272 base__: ICoreWebView2Frame_Vtbl::new::<Identity, OFFSET>(),
18273 add_NavigationStarting: add_NavigationStarting::<Identity, OFFSET>,
18274 remove_NavigationStarting: remove_NavigationStarting::<Identity, OFFSET>,
18275 add_ContentLoading: add_ContentLoading::<Identity, OFFSET>,
18276 remove_ContentLoading: remove_ContentLoading::<Identity, OFFSET>,
18277 add_NavigationCompleted: add_NavigationCompleted::<Identity, OFFSET>,
18278 remove_NavigationCompleted: remove_NavigationCompleted::<Identity, OFFSET>,
18279 add_DOMContentLoaded: add_DOMContentLoaded::<Identity, OFFSET>,
18280 remove_DOMContentLoaded: remove_DOMContentLoaded::<Identity, OFFSET>,
18281 ExecuteScript: ExecuteScript::<Identity, OFFSET>,
18282 PostWebMessageAsJson: PostWebMessageAsJson::<Identity, OFFSET>,
18283 PostWebMessageAsString: PostWebMessageAsString::<Identity, OFFSET>,
18284 add_WebMessageReceived: add_WebMessageReceived::<Identity, OFFSET>,
18285 remove_WebMessageReceived: remove_WebMessageReceived::<Identity, OFFSET>,
18286 }
18287 }
18288 pub fn matches(iid: &windows_core::GUID) -> bool {
18289 iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
18290 || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
18291 }
18292}
18293impl windows_core::RuntimeName for ICoreWebView2Frame2 {}
18294windows_core::imp::define_interface!(
18295 ICoreWebView2Frame3,
18296 ICoreWebView2Frame3_Vtbl,
18297 0xb50d82cc_cc28_481d_9614_cb048895e6a0
18298);
18299impl core::ops::Deref for ICoreWebView2Frame3 {
18300 type Target = ICoreWebView2Frame2;
18301 fn deref(&self) -> &Self::Target {
18302 unsafe { core::mem::transmute(self) }
18303 }
18304}
18305windows_core::imp::interface_hierarchy!(
18306 ICoreWebView2Frame3,
18307 windows_core::IUnknown,
18308 ICoreWebView2Frame,
18309 ICoreWebView2Frame2
18310);
18311impl ICoreWebView2Frame3 {
18312 pub unsafe fn add_PermissionRequested<P0>(
18313 &self,
18314 eventhandler: P0,
18315 token: *mut i64,
18316 ) -> windows_core::Result<()>
18317 where
18318 P0: windows_core::Param<ICoreWebView2FramePermissionRequestedEventHandler>,
18319 {
18320 unsafe {
18321 (windows_core::Interface::vtable(self).add_PermissionRequested)(
18322 windows_core::Interface::as_raw(self),
18323 eventhandler.param().abi(),
18324 token as _,
18325 )
18326 .ok()
18327 }
18328 }
18329 pub unsafe fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()> {
18330 unsafe {
18331 (windows_core::Interface::vtable(self).remove_PermissionRequested)(
18332 windows_core::Interface::as_raw(self),
18333 token,
18334 )
18335 .ok()
18336 }
18337 }
18338}
18339#[repr(C)]
18340pub struct ICoreWebView2Frame3_Vtbl {
18341 pub base__: ICoreWebView2Frame2_Vtbl,
18342 pub add_PermissionRequested: unsafe extern "system" fn(
18343 *mut core::ffi::c_void,
18344 *mut core::ffi::c_void,
18345 *mut i64,
18346 ) -> windows_core::HRESULT,
18347 pub remove_PermissionRequested:
18348 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
18349}
18350pub trait ICoreWebView2Frame3_Impl: ICoreWebView2Frame2_Impl {
18351 fn add_PermissionRequested(
18352 &self,
18353 eventhandler: windows_core::Ref<'_, ICoreWebView2FramePermissionRequestedEventHandler>,
18354 token: *mut i64,
18355 ) -> windows_core::Result<()>;
18356 fn remove_PermissionRequested(&self, token: i64) -> windows_core::Result<()>;
18357}
18358impl ICoreWebView2Frame3_Vtbl {
18359 pub const fn new<Identity: ICoreWebView2Frame3_Impl, const OFFSET: isize>() -> Self {
18360 unsafe extern "system" fn add_PermissionRequested<
18361 Identity: ICoreWebView2Frame3_Impl,
18362 const OFFSET: isize,
18363 >(
18364 this: *mut core::ffi::c_void,
18365 eventhandler: *mut core::ffi::c_void,
18366 token: *mut i64,
18367 ) -> windows_core::HRESULT {
18368 unsafe {
18369 let this: &Identity =
18370 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18371 ICoreWebView2Frame3_Impl::add_PermissionRequested(
18372 this,
18373 core::mem::transmute_copy(&eventhandler),
18374 core::mem::transmute_copy(&token),
18375 )
18376 .into()
18377 }
18378 }
18379 unsafe extern "system" fn remove_PermissionRequested<
18380 Identity: ICoreWebView2Frame3_Impl,
18381 const OFFSET: isize,
18382 >(
18383 this: *mut core::ffi::c_void,
18384 token: i64,
18385 ) -> windows_core::HRESULT {
18386 unsafe {
18387 let this: &Identity =
18388 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18389 ICoreWebView2Frame3_Impl::remove_PermissionRequested(
18390 this,
18391 core::mem::transmute_copy(&token),
18392 )
18393 .into()
18394 }
18395 }
18396 Self {
18397 base__: ICoreWebView2Frame2_Vtbl::new::<Identity, OFFSET>(),
18398 add_PermissionRequested: add_PermissionRequested::<Identity, OFFSET>,
18399 remove_PermissionRequested: remove_PermissionRequested::<Identity, OFFSET>,
18400 }
18401 }
18402 pub fn matches(iid: &windows_core::GUID) -> bool {
18403 iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
18404 || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
18405 || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
18406 }
18407}
18408impl windows_core::RuntimeName for ICoreWebView2Frame3 {}
18409windows_core::imp::define_interface!(
18410 ICoreWebView2Frame4,
18411 ICoreWebView2Frame4_Vtbl,
18412 0x188782dc_92aa_4732_ab3c_fcc59f6f68b9
18413);
18414impl core::ops::Deref for ICoreWebView2Frame4 {
18415 type Target = ICoreWebView2Frame3;
18416 fn deref(&self) -> &Self::Target {
18417 unsafe { core::mem::transmute(self) }
18418 }
18419}
18420windows_core::imp::interface_hierarchy!(
18421 ICoreWebView2Frame4,
18422 windows_core::IUnknown,
18423 ICoreWebView2Frame,
18424 ICoreWebView2Frame2,
18425 ICoreWebView2Frame3
18426);
18427impl ICoreWebView2Frame4 {
18428 pub unsafe fn PostSharedBufferToScript<P0, P2>(
18429 &self,
18430 sharedbuffer: P0,
18431 access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
18432 additionaldataasjson: P2,
18433 ) -> windows_core::Result<()>
18434 where
18435 P0: windows_core::Param<ICoreWebView2SharedBuffer>,
18436 P2: windows_core::Param<windows_core::PCWSTR>,
18437 {
18438 unsafe {
18439 (windows_core::Interface::vtable(self).PostSharedBufferToScript)(
18440 windows_core::Interface::as_raw(self),
18441 sharedbuffer.param().abi(),
18442 access,
18443 additionaldataasjson.param().abi(),
18444 )
18445 .ok()
18446 }
18447 }
18448}
18449#[repr(C)]
18450pub struct ICoreWebView2Frame4_Vtbl {
18451 pub base__: ICoreWebView2Frame3_Vtbl,
18452 pub PostSharedBufferToScript: unsafe extern "system" fn(
18453 *mut core::ffi::c_void,
18454 *mut core::ffi::c_void,
18455 COREWEBVIEW2_SHARED_BUFFER_ACCESS,
18456 windows_core::PCWSTR,
18457 ) -> windows_core::HRESULT,
18458}
18459pub trait ICoreWebView2Frame4_Impl: ICoreWebView2Frame3_Impl {
18460 fn PostSharedBufferToScript(
18461 &self,
18462 sharedbuffer: windows_core::Ref<'_, ICoreWebView2SharedBuffer>,
18463 access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
18464 additionaldataasjson: &windows_core::PCWSTR,
18465 ) -> windows_core::Result<()>;
18466}
18467impl ICoreWebView2Frame4_Vtbl {
18468 pub const fn new<Identity: ICoreWebView2Frame4_Impl, const OFFSET: isize>() -> Self {
18469 unsafe extern "system" fn PostSharedBufferToScript<
18470 Identity: ICoreWebView2Frame4_Impl,
18471 const OFFSET: isize,
18472 >(
18473 this: *mut core::ffi::c_void,
18474 sharedbuffer: *mut core::ffi::c_void,
18475 access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
18476 additionaldataasjson: windows_core::PCWSTR,
18477 ) -> windows_core::HRESULT {
18478 unsafe {
18479 let this: &Identity =
18480 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18481 ICoreWebView2Frame4_Impl::PostSharedBufferToScript(
18482 this,
18483 core::mem::transmute_copy(&sharedbuffer),
18484 core::mem::transmute_copy(&access),
18485 core::mem::transmute(&additionaldataasjson),
18486 )
18487 .into()
18488 }
18489 }
18490 Self {
18491 base__: ICoreWebView2Frame3_Vtbl::new::<Identity, OFFSET>(),
18492 PostSharedBufferToScript: PostSharedBufferToScript::<Identity, OFFSET>,
18493 }
18494 }
18495 pub fn matches(iid: &windows_core::GUID) -> bool {
18496 iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
18497 || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
18498 || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
18499 || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
18500 }
18501}
18502impl windows_core::RuntimeName for ICoreWebView2Frame4 {}
18503windows_core::imp::define_interface!(
18504 ICoreWebView2Frame5,
18505 ICoreWebView2Frame5_Vtbl,
18506 0x99d199c4_7305_11ee_b962_0242ac120002
18507);
18508impl core::ops::Deref for ICoreWebView2Frame5 {
18509 type Target = ICoreWebView2Frame4;
18510 fn deref(&self) -> &Self::Target {
18511 unsafe { core::mem::transmute(self) }
18512 }
18513}
18514windows_core::imp::interface_hierarchy!(
18515 ICoreWebView2Frame5,
18516 windows_core::IUnknown,
18517 ICoreWebView2Frame,
18518 ICoreWebView2Frame2,
18519 ICoreWebView2Frame3,
18520 ICoreWebView2Frame4
18521);
18522impl ICoreWebView2Frame5 {
18523 pub unsafe fn FrameId(&self, value: *mut u32) -> windows_core::Result<()> {
18524 unsafe {
18525 (windows_core::Interface::vtable(self).FrameId)(
18526 windows_core::Interface::as_raw(self),
18527 value as _,
18528 )
18529 .ok()
18530 }
18531 }
18532}
18533#[repr(C)]
18534pub struct ICoreWebView2Frame5_Vtbl {
18535 pub base__: ICoreWebView2Frame4_Vtbl,
18536 pub FrameId:
18537 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
18538}
18539pub trait ICoreWebView2Frame5_Impl: ICoreWebView2Frame4_Impl {
18540 fn FrameId(&self, value: *mut u32) -> windows_core::Result<()>;
18541}
18542impl ICoreWebView2Frame5_Vtbl {
18543 pub const fn new<Identity: ICoreWebView2Frame5_Impl, const OFFSET: isize>() -> Self {
18544 unsafe extern "system" fn FrameId<
18545 Identity: ICoreWebView2Frame5_Impl,
18546 const OFFSET: isize,
18547 >(
18548 this: *mut core::ffi::c_void,
18549 value: *mut u32,
18550 ) -> windows_core::HRESULT {
18551 unsafe {
18552 let this: &Identity =
18553 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18554 ICoreWebView2Frame5_Impl::FrameId(this, core::mem::transmute_copy(&value)).into()
18555 }
18556 }
18557 Self {
18558 base__: ICoreWebView2Frame4_Vtbl::new::<Identity, OFFSET>(),
18559 FrameId: FrameId::<Identity, OFFSET>,
18560 }
18561 }
18562 pub fn matches(iid: &windows_core::GUID) -> bool {
18563 iid == &<ICoreWebView2Frame5 as windows_core::Interface>::IID
18564 || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
18565 || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
18566 || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
18567 || iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
18568 }
18569}
18570impl windows_core::RuntimeName for ICoreWebView2Frame5 {}
18571windows_core::imp::define_interface!(
18572 ICoreWebView2Frame6,
18573 ICoreWebView2Frame6_Vtbl,
18574 0x0de611fd_31e9_5ddc_9d71_95eda26eff32
18575);
18576impl core::ops::Deref for ICoreWebView2Frame6 {
18577 type Target = ICoreWebView2Frame5;
18578 fn deref(&self) -> &Self::Target {
18579 unsafe { core::mem::transmute(self) }
18580 }
18581}
18582windows_core::imp::interface_hierarchy!(
18583 ICoreWebView2Frame6,
18584 windows_core::IUnknown,
18585 ICoreWebView2Frame,
18586 ICoreWebView2Frame2,
18587 ICoreWebView2Frame3,
18588 ICoreWebView2Frame4,
18589 ICoreWebView2Frame5
18590);
18591impl ICoreWebView2Frame6 {
18592 pub unsafe fn add_ScreenCaptureStarting<P0>(
18593 &self,
18594 eventhandler: P0,
18595 token: *mut i64,
18596 ) -> windows_core::Result<()>
18597 where
18598 P0: windows_core::Param<ICoreWebView2FrameScreenCaptureStartingEventHandler>,
18599 {
18600 unsafe {
18601 (windows_core::Interface::vtable(self).add_ScreenCaptureStarting)(
18602 windows_core::Interface::as_raw(self),
18603 eventhandler.param().abi(),
18604 token as _,
18605 )
18606 .ok()
18607 }
18608 }
18609 pub unsafe fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()> {
18610 unsafe {
18611 (windows_core::Interface::vtable(self).remove_ScreenCaptureStarting)(
18612 windows_core::Interface::as_raw(self),
18613 token,
18614 )
18615 .ok()
18616 }
18617 }
18618}
18619#[repr(C)]
18620pub struct ICoreWebView2Frame6_Vtbl {
18621 pub base__: ICoreWebView2Frame5_Vtbl,
18622 pub add_ScreenCaptureStarting: unsafe extern "system" fn(
18623 *mut core::ffi::c_void,
18624 *mut core::ffi::c_void,
18625 *mut i64,
18626 ) -> windows_core::HRESULT,
18627 pub remove_ScreenCaptureStarting:
18628 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
18629}
18630pub trait ICoreWebView2Frame6_Impl: ICoreWebView2Frame5_Impl {
18631 fn add_ScreenCaptureStarting(
18632 &self,
18633 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameScreenCaptureStartingEventHandler>,
18634 token: *mut i64,
18635 ) -> windows_core::Result<()>;
18636 fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()>;
18637}
18638impl ICoreWebView2Frame6_Vtbl {
18639 pub const fn new<Identity: ICoreWebView2Frame6_Impl, const OFFSET: isize>() -> Self {
18640 unsafe extern "system" fn add_ScreenCaptureStarting<
18641 Identity: ICoreWebView2Frame6_Impl,
18642 const OFFSET: isize,
18643 >(
18644 this: *mut core::ffi::c_void,
18645 eventhandler: *mut core::ffi::c_void,
18646 token: *mut i64,
18647 ) -> windows_core::HRESULT {
18648 unsafe {
18649 let this: &Identity =
18650 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18651 ICoreWebView2Frame6_Impl::add_ScreenCaptureStarting(
18652 this,
18653 core::mem::transmute_copy(&eventhandler),
18654 core::mem::transmute_copy(&token),
18655 )
18656 .into()
18657 }
18658 }
18659 unsafe extern "system" fn remove_ScreenCaptureStarting<
18660 Identity: ICoreWebView2Frame6_Impl,
18661 const OFFSET: isize,
18662 >(
18663 this: *mut core::ffi::c_void,
18664 token: i64,
18665 ) -> windows_core::HRESULT {
18666 unsafe {
18667 let this: &Identity =
18668 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18669 ICoreWebView2Frame6_Impl::remove_ScreenCaptureStarting(
18670 this,
18671 core::mem::transmute_copy(&token),
18672 )
18673 .into()
18674 }
18675 }
18676 Self {
18677 base__: ICoreWebView2Frame5_Vtbl::new::<Identity, OFFSET>(),
18678 add_ScreenCaptureStarting: add_ScreenCaptureStarting::<Identity, OFFSET>,
18679 remove_ScreenCaptureStarting: remove_ScreenCaptureStarting::<Identity, OFFSET>,
18680 }
18681 }
18682 pub fn matches(iid: &windows_core::GUID) -> bool {
18683 iid == &<ICoreWebView2Frame6 as windows_core::Interface>::IID
18684 || iid == &<ICoreWebView2Frame as windows_core::Interface>::IID
18685 || iid == &<ICoreWebView2Frame2 as windows_core::Interface>::IID
18686 || iid == &<ICoreWebView2Frame3 as windows_core::Interface>::IID
18687 || iid == &<ICoreWebView2Frame4 as windows_core::Interface>::IID
18688 || iid == &<ICoreWebView2Frame5 as windows_core::Interface>::IID
18689 }
18690}
18691impl windows_core::RuntimeName for ICoreWebView2Frame6 {}
18692windows_core::imp::define_interface!(
18693 ICoreWebView2FrameContentLoadingEventHandler,
18694 ICoreWebView2FrameContentLoadingEventHandler_Vtbl,
18695 0x0d6156f2_d332_49a7_9e03_7d8f2feeee54
18696);
18697windows_core::imp::interface_hierarchy!(
18698 ICoreWebView2FrameContentLoadingEventHandler,
18699 windows_core::IUnknown
18700);
18701impl ICoreWebView2FrameContentLoadingEventHandler {
18702 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
18703 where
18704 P0: windows_core::Param<ICoreWebView2Frame>,
18705 P1: windows_core::Param<ICoreWebView2ContentLoadingEventArgs>,
18706 {
18707 unsafe {
18708 (windows_core::Interface::vtable(self).Invoke)(
18709 windows_core::Interface::as_raw(self),
18710 sender.param().abi(),
18711 args.param().abi(),
18712 )
18713 .ok()
18714 }
18715 }
18716}
18717#[repr(C)]
18718pub struct ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
18719 pub base__: windows_core::IUnknown_Vtbl,
18720 pub Invoke: unsafe extern "system" fn(
18721 *mut core::ffi::c_void,
18722 *mut core::ffi::c_void,
18723 *mut core::ffi::c_void,
18724 ) -> windows_core::HRESULT,
18725}
18726pub trait ICoreWebView2FrameContentLoadingEventHandler_Impl: windows_core::IUnknownImpl {
18727 fn Invoke(
18728 &self,
18729 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
18730 args: windows_core::Ref<'_, ICoreWebView2ContentLoadingEventArgs>,
18731 ) -> windows_core::Result<()>;
18732}
18733impl ICoreWebView2FrameContentLoadingEventHandler_Vtbl {
18734 pub const fn new<
18735 Identity: ICoreWebView2FrameContentLoadingEventHandler_Impl,
18736 const OFFSET: isize,
18737 >() -> Self {
18738 unsafe extern "system" fn Invoke<
18739 Identity: ICoreWebView2FrameContentLoadingEventHandler_Impl,
18740 const OFFSET: isize,
18741 >(
18742 this: *mut core::ffi::c_void,
18743 sender: *mut core::ffi::c_void,
18744 args: *mut core::ffi::c_void,
18745 ) -> windows_core::HRESULT {
18746 unsafe {
18747 let this: &Identity =
18748 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18749 ICoreWebView2FrameContentLoadingEventHandler_Impl::Invoke(
18750 this,
18751 core::mem::transmute_copy(&sender),
18752 core::mem::transmute_copy(&args),
18753 )
18754 .into()
18755 }
18756 }
18757 Self {
18758 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
18759 Invoke: Invoke::<Identity, OFFSET>,
18760 }
18761 }
18762 pub fn matches(iid: &windows_core::GUID) -> bool {
18763 iid == &<ICoreWebView2FrameContentLoadingEventHandler as windows_core::Interface>::IID
18764 }
18765}
18766impl windows_core::RuntimeName for ICoreWebView2FrameContentLoadingEventHandler {}
18767windows_core::imp::define_interface!(
18768 ICoreWebView2FrameCreatedEventArgs,
18769 ICoreWebView2FrameCreatedEventArgs_Vtbl,
18770 0x4d6e7b5e_9baa_11eb_a8b3_0242ac130003
18771);
18772windows_core::imp::interface_hierarchy!(ICoreWebView2FrameCreatedEventArgs, windows_core::IUnknown);
18773impl ICoreWebView2FrameCreatedEventArgs {
18774 pub unsafe fn Frame(&self) -> windows_core::Result<ICoreWebView2Frame> {
18775 unsafe {
18776 let mut result__ = core::mem::zeroed();
18777 (windows_core::Interface::vtable(self).Frame)(
18778 windows_core::Interface::as_raw(self),
18779 &mut result__,
18780 )
18781 .and_then(|| windows_core::Type::from_abi(result__))
18782 }
18783 }
18784}
18785#[repr(C)]
18786pub struct ICoreWebView2FrameCreatedEventArgs_Vtbl {
18787 pub base__: windows_core::IUnknown_Vtbl,
18788 pub Frame: unsafe extern "system" fn(
18789 *mut core::ffi::c_void,
18790 *mut *mut core::ffi::c_void,
18791 ) -> windows_core::HRESULT,
18792}
18793pub trait ICoreWebView2FrameCreatedEventArgs_Impl: windows_core::IUnknownImpl {
18794 fn Frame(&self) -> windows_core::Result<ICoreWebView2Frame>;
18795}
18796impl ICoreWebView2FrameCreatedEventArgs_Vtbl {
18797 pub const fn new<Identity: ICoreWebView2FrameCreatedEventArgs_Impl, const OFFSET: isize>(
18798 ) -> Self {
18799 unsafe extern "system" fn Frame<
18800 Identity: ICoreWebView2FrameCreatedEventArgs_Impl,
18801 const OFFSET: isize,
18802 >(
18803 this: *mut core::ffi::c_void,
18804 value: *mut *mut core::ffi::c_void,
18805 ) -> windows_core::HRESULT {
18806 unsafe {
18807 let this: &Identity =
18808 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18809 match ICoreWebView2FrameCreatedEventArgs_Impl::Frame(this) {
18810 Ok(ok__) => {
18811 value.write(core::mem::transmute(ok__));
18812 windows_core::HRESULT(0)
18813 }
18814 Err(err) => err.into(),
18815 }
18816 }
18817 }
18818 Self {
18819 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
18820 Frame: Frame::<Identity, OFFSET>,
18821 }
18822 }
18823 pub fn matches(iid: &windows_core::GUID) -> bool {
18824 iid == &<ICoreWebView2FrameCreatedEventArgs as windows_core::Interface>::IID
18825 }
18826}
18827impl windows_core::RuntimeName for ICoreWebView2FrameCreatedEventArgs {}
18828windows_core::imp::define_interface!(
18829 ICoreWebView2FrameCreatedEventHandler,
18830 ICoreWebView2FrameCreatedEventHandler_Vtbl,
18831 0x38059770_9baa_11eb_a8b3_0242ac130003
18832);
18833windows_core::imp::interface_hierarchy!(
18834 ICoreWebView2FrameCreatedEventHandler,
18835 windows_core::IUnknown
18836);
18837impl ICoreWebView2FrameCreatedEventHandler {
18838 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
18839 where
18840 P0: windows_core::Param<ICoreWebView2>,
18841 P1: windows_core::Param<ICoreWebView2FrameCreatedEventArgs>,
18842 {
18843 unsafe {
18844 (windows_core::Interface::vtable(self).Invoke)(
18845 windows_core::Interface::as_raw(self),
18846 sender.param().abi(),
18847 args.param().abi(),
18848 )
18849 .ok()
18850 }
18851 }
18852}
18853#[repr(C)]
18854pub struct ICoreWebView2FrameCreatedEventHandler_Vtbl {
18855 pub base__: windows_core::IUnknown_Vtbl,
18856 pub Invoke: unsafe extern "system" fn(
18857 *mut core::ffi::c_void,
18858 *mut core::ffi::c_void,
18859 *mut core::ffi::c_void,
18860 ) -> windows_core::HRESULT,
18861}
18862pub trait ICoreWebView2FrameCreatedEventHandler_Impl: windows_core::IUnknownImpl {
18863 fn Invoke(
18864 &self,
18865 sender: windows_core::Ref<'_, ICoreWebView2>,
18866 args: windows_core::Ref<'_, ICoreWebView2FrameCreatedEventArgs>,
18867 ) -> windows_core::Result<()>;
18868}
18869impl ICoreWebView2FrameCreatedEventHandler_Vtbl {
18870 pub const fn new<Identity: ICoreWebView2FrameCreatedEventHandler_Impl, const OFFSET: isize>(
18871 ) -> Self {
18872 unsafe extern "system" fn Invoke<
18873 Identity: ICoreWebView2FrameCreatedEventHandler_Impl,
18874 const OFFSET: isize,
18875 >(
18876 this: *mut core::ffi::c_void,
18877 sender: *mut core::ffi::c_void,
18878 args: *mut core::ffi::c_void,
18879 ) -> windows_core::HRESULT {
18880 unsafe {
18881 let this: &Identity =
18882 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18883 ICoreWebView2FrameCreatedEventHandler_Impl::Invoke(
18884 this,
18885 core::mem::transmute_copy(&sender),
18886 core::mem::transmute_copy(&args),
18887 )
18888 .into()
18889 }
18890 }
18891 Self {
18892 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
18893 Invoke: Invoke::<Identity, OFFSET>,
18894 }
18895 }
18896 pub fn matches(iid: &windows_core::GUID) -> bool {
18897 iid == &<ICoreWebView2FrameCreatedEventHandler as windows_core::Interface>::IID
18898 }
18899}
18900impl windows_core::RuntimeName for ICoreWebView2FrameCreatedEventHandler {}
18901windows_core::imp::define_interface!(
18902 ICoreWebView2FrameDOMContentLoadedEventHandler,
18903 ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl,
18904 0x38d9520d_340f_4d1e_a775_43fce9753683
18905);
18906windows_core::imp::interface_hierarchy!(
18907 ICoreWebView2FrameDOMContentLoadedEventHandler,
18908 windows_core::IUnknown
18909);
18910impl ICoreWebView2FrameDOMContentLoadedEventHandler {
18911 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
18912 where
18913 P0: windows_core::Param<ICoreWebView2Frame>,
18914 P1: windows_core::Param<ICoreWebView2DOMContentLoadedEventArgs>,
18915 {
18916 unsafe {
18917 (windows_core::Interface::vtable(self).Invoke)(
18918 windows_core::Interface::as_raw(self),
18919 sender.param().abi(),
18920 args.param().abi(),
18921 )
18922 .ok()
18923 }
18924 }
18925}
18926#[repr(C)]
18927pub struct ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
18928 pub base__: windows_core::IUnknown_Vtbl,
18929 pub Invoke: unsafe extern "system" fn(
18930 *mut core::ffi::c_void,
18931 *mut core::ffi::c_void,
18932 *mut core::ffi::c_void,
18933 ) -> windows_core::HRESULT,
18934}
18935pub trait ICoreWebView2FrameDOMContentLoadedEventHandler_Impl: windows_core::IUnknownImpl {
18936 fn Invoke(
18937 &self,
18938 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
18939 args: windows_core::Ref<'_, ICoreWebView2DOMContentLoadedEventArgs>,
18940 ) -> windows_core::Result<()>;
18941}
18942impl ICoreWebView2FrameDOMContentLoadedEventHandler_Vtbl {
18943 pub const fn new<
18944 Identity: ICoreWebView2FrameDOMContentLoadedEventHandler_Impl,
18945 const OFFSET: isize,
18946 >() -> Self {
18947 unsafe extern "system" fn Invoke<
18948 Identity: ICoreWebView2FrameDOMContentLoadedEventHandler_Impl,
18949 const OFFSET: isize,
18950 >(
18951 this: *mut core::ffi::c_void,
18952 sender: *mut core::ffi::c_void,
18953 args: *mut core::ffi::c_void,
18954 ) -> windows_core::HRESULT {
18955 unsafe {
18956 let this: &Identity =
18957 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
18958 ICoreWebView2FrameDOMContentLoadedEventHandler_Impl::Invoke(
18959 this,
18960 core::mem::transmute_copy(&sender),
18961 core::mem::transmute_copy(&args),
18962 )
18963 .into()
18964 }
18965 }
18966 Self {
18967 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
18968 Invoke: Invoke::<Identity, OFFSET>,
18969 }
18970 }
18971 pub fn matches(iid: &windows_core::GUID) -> bool {
18972 iid == &<ICoreWebView2FrameDOMContentLoadedEventHandler as windows_core::Interface>::IID
18973 }
18974}
18975impl windows_core::RuntimeName for ICoreWebView2FrameDOMContentLoadedEventHandler {}
18976windows_core::imp::define_interface!(
18977 ICoreWebView2FrameDestroyedEventHandler,
18978 ICoreWebView2FrameDestroyedEventHandler_Vtbl,
18979 0x59dd7b4c_9baa_11eb_a8b3_0242ac130003
18980);
18981windows_core::imp::interface_hierarchy!(
18982 ICoreWebView2FrameDestroyedEventHandler,
18983 windows_core::IUnknown
18984);
18985impl ICoreWebView2FrameDestroyedEventHandler {
18986 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
18987 where
18988 P0: windows_core::Param<ICoreWebView2Frame>,
18989 P1: windows_core::Param<windows_core::IUnknown>,
18990 {
18991 unsafe {
18992 (windows_core::Interface::vtable(self).Invoke)(
18993 windows_core::Interface::as_raw(self),
18994 sender.param().abi(),
18995 args.param().abi(),
18996 )
18997 .ok()
18998 }
18999 }
19000}
19001#[repr(C)]
19002pub struct ICoreWebView2FrameDestroyedEventHandler_Vtbl {
19003 pub base__: windows_core::IUnknown_Vtbl,
19004 pub Invoke: unsafe extern "system" fn(
19005 *mut core::ffi::c_void,
19006 *mut core::ffi::c_void,
19007 *mut core::ffi::c_void,
19008 ) -> windows_core::HRESULT,
19009}
19010pub trait ICoreWebView2FrameDestroyedEventHandler_Impl: windows_core::IUnknownImpl {
19011 fn Invoke(
19012 &self,
19013 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19014 args: windows_core::Ref<'_, windows_core::IUnknown>,
19015 ) -> windows_core::Result<()>;
19016}
19017impl ICoreWebView2FrameDestroyedEventHandler_Vtbl {
19018 pub const fn new<
19019 Identity: ICoreWebView2FrameDestroyedEventHandler_Impl,
19020 const OFFSET: isize,
19021 >() -> Self {
19022 unsafe extern "system" fn Invoke<
19023 Identity: ICoreWebView2FrameDestroyedEventHandler_Impl,
19024 const OFFSET: isize,
19025 >(
19026 this: *mut core::ffi::c_void,
19027 sender: *mut core::ffi::c_void,
19028 args: *mut core::ffi::c_void,
19029 ) -> windows_core::HRESULT {
19030 unsafe {
19031 let this: &Identity =
19032 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19033 ICoreWebView2FrameDestroyedEventHandler_Impl::Invoke(
19034 this,
19035 core::mem::transmute_copy(&sender),
19036 core::mem::transmute_copy(&args),
19037 )
19038 .into()
19039 }
19040 }
19041 Self {
19042 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19043 Invoke: Invoke::<Identity, OFFSET>,
19044 }
19045 }
19046 pub fn matches(iid: &windows_core::GUID) -> bool {
19047 iid == &<ICoreWebView2FrameDestroyedEventHandler as windows_core::Interface>::IID
19048 }
19049}
19050impl windows_core::RuntimeName for ICoreWebView2FrameDestroyedEventHandler {}
19051windows_core::imp::define_interface!(
19052 ICoreWebView2FrameInfo,
19053 ICoreWebView2FrameInfo_Vtbl,
19054 0xda86b8a1_bdf3_4f11_9955_528cefa59727
19055);
19056windows_core::imp::interface_hierarchy!(ICoreWebView2FrameInfo, windows_core::IUnknown);
19057impl ICoreWebView2FrameInfo {
19058 pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
19059 unsafe {
19060 (windows_core::Interface::vtable(self).Name)(
19061 windows_core::Interface::as_raw(self),
19062 value as _,
19063 )
19064 .ok()
19065 }
19066 }
19067 pub unsafe fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
19068 unsafe {
19069 (windows_core::Interface::vtable(self).Source)(
19070 windows_core::Interface::as_raw(self),
19071 value as _,
19072 )
19073 .ok()
19074 }
19075 }
19076}
19077#[repr(C)]
19078pub struct ICoreWebView2FrameInfo_Vtbl {
19079 pub base__: windows_core::IUnknown_Vtbl,
19080 pub Name: unsafe extern "system" fn(
19081 *mut core::ffi::c_void,
19082 *mut windows_core::PWSTR,
19083 ) -> windows_core::HRESULT,
19084 pub Source: unsafe extern "system" fn(
19085 *mut core::ffi::c_void,
19086 *mut windows_core::PWSTR,
19087 ) -> windows_core::HRESULT,
19088}
19089pub trait ICoreWebView2FrameInfo_Impl: windows_core::IUnknownImpl {
19090 fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
19091 fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
19092}
19093impl ICoreWebView2FrameInfo_Vtbl {
19094 pub const fn new<Identity: ICoreWebView2FrameInfo_Impl, const OFFSET: isize>() -> Self {
19095 unsafe extern "system" fn Name<
19096 Identity: ICoreWebView2FrameInfo_Impl,
19097 const OFFSET: isize,
19098 >(
19099 this: *mut core::ffi::c_void,
19100 value: *mut windows_core::PWSTR,
19101 ) -> windows_core::HRESULT {
19102 unsafe {
19103 let this: &Identity =
19104 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19105 ICoreWebView2FrameInfo_Impl::Name(this, core::mem::transmute_copy(&value)).into()
19106 }
19107 }
19108 unsafe extern "system" fn Source<
19109 Identity: ICoreWebView2FrameInfo_Impl,
19110 const OFFSET: isize,
19111 >(
19112 this: *mut core::ffi::c_void,
19113 value: *mut windows_core::PWSTR,
19114 ) -> windows_core::HRESULT {
19115 unsafe {
19116 let this: &Identity =
19117 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19118 ICoreWebView2FrameInfo_Impl::Source(this, core::mem::transmute_copy(&value)).into()
19119 }
19120 }
19121 Self {
19122 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19123 Name: Name::<Identity, OFFSET>,
19124 Source: Source::<Identity, OFFSET>,
19125 }
19126 }
19127 pub fn matches(iid: &windows_core::GUID) -> bool {
19128 iid == &<ICoreWebView2FrameInfo as windows_core::Interface>::IID
19129 }
19130}
19131impl windows_core::RuntimeName for ICoreWebView2FrameInfo {}
19132windows_core::imp::define_interface!(
19133 ICoreWebView2FrameInfo2,
19134 ICoreWebView2FrameInfo2_Vtbl,
19135 0x56f85cfa_72c4_11ee_b962_0242ac120002
19136);
19137impl core::ops::Deref for ICoreWebView2FrameInfo2 {
19138 type Target = ICoreWebView2FrameInfo;
19139 fn deref(&self) -> &Self::Target {
19140 unsafe { core::mem::transmute(self) }
19141 }
19142}
19143windows_core::imp::interface_hierarchy!(
19144 ICoreWebView2FrameInfo2,
19145 windows_core::IUnknown,
19146 ICoreWebView2FrameInfo
19147);
19148impl ICoreWebView2FrameInfo2 {
19149 pub unsafe fn ParentFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
19150 unsafe {
19151 let mut result__ = core::mem::zeroed();
19152 (windows_core::Interface::vtable(self).ParentFrameInfo)(
19153 windows_core::Interface::as_raw(self),
19154 &mut result__,
19155 )
19156 .and_then(|| windows_core::Type::from_abi(result__))
19157 }
19158 }
19159 pub unsafe fn FrameId(&self, id: *mut u32) -> windows_core::Result<()> {
19160 unsafe {
19161 (windows_core::Interface::vtable(self).FrameId)(
19162 windows_core::Interface::as_raw(self),
19163 id as _,
19164 )
19165 .ok()
19166 }
19167 }
19168 pub unsafe fn FrameKind(&self, kind: *mut COREWEBVIEW2_FRAME_KIND) -> windows_core::Result<()> {
19169 unsafe {
19170 (windows_core::Interface::vtable(self).FrameKind)(
19171 windows_core::Interface::as_raw(self),
19172 kind as _,
19173 )
19174 .ok()
19175 }
19176 }
19177}
19178#[repr(C)]
19179pub struct ICoreWebView2FrameInfo2_Vtbl {
19180 pub base__: ICoreWebView2FrameInfo_Vtbl,
19181 pub ParentFrameInfo: unsafe extern "system" fn(
19182 *mut core::ffi::c_void,
19183 *mut *mut core::ffi::c_void,
19184 ) -> windows_core::HRESULT,
19185 pub FrameId:
19186 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
19187 pub FrameKind: unsafe extern "system" fn(
19188 *mut core::ffi::c_void,
19189 *mut COREWEBVIEW2_FRAME_KIND,
19190 ) -> windows_core::HRESULT,
19191}
19192pub trait ICoreWebView2FrameInfo2_Impl: ICoreWebView2FrameInfo_Impl {
19193 fn ParentFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
19194 fn FrameId(&self, id: *mut u32) -> windows_core::Result<()>;
19195 fn FrameKind(&self, kind: *mut COREWEBVIEW2_FRAME_KIND) -> windows_core::Result<()>;
19196}
19197impl ICoreWebView2FrameInfo2_Vtbl {
19198 pub const fn new<Identity: ICoreWebView2FrameInfo2_Impl, const OFFSET: isize>() -> Self {
19199 unsafe extern "system" fn ParentFrameInfo<
19200 Identity: ICoreWebView2FrameInfo2_Impl,
19201 const OFFSET: isize,
19202 >(
19203 this: *mut core::ffi::c_void,
19204 frameinfo: *mut *mut core::ffi::c_void,
19205 ) -> windows_core::HRESULT {
19206 unsafe {
19207 let this: &Identity =
19208 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19209 match ICoreWebView2FrameInfo2_Impl::ParentFrameInfo(this) {
19210 Ok(ok__) => {
19211 frameinfo.write(core::mem::transmute(ok__));
19212 windows_core::HRESULT(0)
19213 }
19214 Err(err) => err.into(),
19215 }
19216 }
19217 }
19218 unsafe extern "system" fn FrameId<
19219 Identity: ICoreWebView2FrameInfo2_Impl,
19220 const OFFSET: isize,
19221 >(
19222 this: *mut core::ffi::c_void,
19223 id: *mut u32,
19224 ) -> windows_core::HRESULT {
19225 unsafe {
19226 let this: &Identity =
19227 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19228 ICoreWebView2FrameInfo2_Impl::FrameId(this, core::mem::transmute_copy(&id)).into()
19229 }
19230 }
19231 unsafe extern "system" fn FrameKind<
19232 Identity: ICoreWebView2FrameInfo2_Impl,
19233 const OFFSET: isize,
19234 >(
19235 this: *mut core::ffi::c_void,
19236 kind: *mut COREWEBVIEW2_FRAME_KIND,
19237 ) -> windows_core::HRESULT {
19238 unsafe {
19239 let this: &Identity =
19240 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19241 ICoreWebView2FrameInfo2_Impl::FrameKind(this, core::mem::transmute_copy(&kind))
19242 .into()
19243 }
19244 }
19245 Self {
19246 base__: ICoreWebView2FrameInfo_Vtbl::new::<Identity, OFFSET>(),
19247 ParentFrameInfo: ParentFrameInfo::<Identity, OFFSET>,
19248 FrameId: FrameId::<Identity, OFFSET>,
19249 FrameKind: FrameKind::<Identity, OFFSET>,
19250 }
19251 }
19252 pub fn matches(iid: &windows_core::GUID) -> bool {
19253 iid == &<ICoreWebView2FrameInfo2 as windows_core::Interface>::IID
19254 || iid == &<ICoreWebView2FrameInfo as windows_core::Interface>::IID
19255 }
19256}
19257impl windows_core::RuntimeName for ICoreWebView2FrameInfo2 {}
19258windows_core::imp::define_interface!(
19259 ICoreWebView2FrameInfoCollection,
19260 ICoreWebView2FrameInfoCollection_Vtbl,
19261 0x8f834154_d38e_4d90_affb_6800a7272839
19262);
19263windows_core::imp::interface_hierarchy!(ICoreWebView2FrameInfoCollection, windows_core::IUnknown);
19264impl ICoreWebView2FrameInfoCollection {
19265 pub unsafe fn GetIterator(
19266 &self,
19267 ) -> windows_core::Result<ICoreWebView2FrameInfoCollectionIterator> {
19268 unsafe {
19269 let mut result__ = core::mem::zeroed();
19270 (windows_core::Interface::vtable(self).GetIterator)(
19271 windows_core::Interface::as_raw(self),
19272 &mut result__,
19273 )
19274 .and_then(|| windows_core::Type::from_abi(result__))
19275 }
19276 }
19277}
19278#[repr(C)]
19279pub struct ICoreWebView2FrameInfoCollection_Vtbl {
19280 pub base__: windows_core::IUnknown_Vtbl,
19281 pub GetIterator: unsafe extern "system" fn(
19282 *mut core::ffi::c_void,
19283 *mut *mut core::ffi::c_void,
19284 ) -> windows_core::HRESULT,
19285}
19286pub trait ICoreWebView2FrameInfoCollection_Impl: windows_core::IUnknownImpl {
19287 fn GetIterator(&self) -> windows_core::Result<ICoreWebView2FrameInfoCollectionIterator>;
19288}
19289impl ICoreWebView2FrameInfoCollection_Vtbl {
19290 pub const fn new<Identity: ICoreWebView2FrameInfoCollection_Impl, const OFFSET: isize>() -> Self
19291 {
19292 unsafe extern "system" fn GetIterator<
19293 Identity: ICoreWebView2FrameInfoCollection_Impl,
19294 const OFFSET: isize,
19295 >(
19296 this: *mut core::ffi::c_void,
19297 value: *mut *mut core::ffi::c_void,
19298 ) -> windows_core::HRESULT {
19299 unsafe {
19300 let this: &Identity =
19301 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19302 match ICoreWebView2FrameInfoCollection_Impl::GetIterator(this) {
19303 Ok(ok__) => {
19304 value.write(core::mem::transmute(ok__));
19305 windows_core::HRESULT(0)
19306 }
19307 Err(err) => err.into(),
19308 }
19309 }
19310 }
19311 Self {
19312 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19313 GetIterator: GetIterator::<Identity, OFFSET>,
19314 }
19315 }
19316 pub fn matches(iid: &windows_core::GUID) -> bool {
19317 iid == &<ICoreWebView2FrameInfoCollection as windows_core::Interface>::IID
19318 }
19319}
19320impl windows_core::RuntimeName for ICoreWebView2FrameInfoCollection {}
19321windows_core::imp::define_interface!(
19322 ICoreWebView2FrameInfoCollectionIterator,
19323 ICoreWebView2FrameInfoCollectionIterator_Vtbl,
19324 0x1bf89e2d_1b2b_4629_b28f_05099b41bb03
19325);
19326windows_core::imp::interface_hierarchy!(
19327 ICoreWebView2FrameInfoCollectionIterator,
19328 windows_core::IUnknown
19329);
19330impl ICoreWebView2FrameInfoCollectionIterator {
19331 pub unsafe fn HasCurrent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
19332 unsafe {
19333 (windows_core::Interface::vtable(self).HasCurrent)(
19334 windows_core::Interface::as_raw(self),
19335 value as _,
19336 )
19337 .ok()
19338 }
19339 }
19340 pub unsafe fn GetCurrent(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
19341 unsafe {
19342 let mut result__ = core::mem::zeroed();
19343 (windows_core::Interface::vtable(self).GetCurrent)(
19344 windows_core::Interface::as_raw(self),
19345 &mut result__,
19346 )
19347 .and_then(|| windows_core::Type::from_abi(result__))
19348 }
19349 }
19350 pub unsafe fn MoveNext(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
19351 unsafe {
19352 (windows_core::Interface::vtable(self).MoveNext)(
19353 windows_core::Interface::as_raw(self),
19354 value as _,
19355 )
19356 .ok()
19357 }
19358 }
19359}
19360#[repr(C)]
19361pub struct ICoreWebView2FrameInfoCollectionIterator_Vtbl {
19362 pub base__: windows_core::IUnknown_Vtbl,
19363 pub HasCurrent: unsafe extern "system" fn(
19364 *mut core::ffi::c_void,
19365 *mut windows_core::BOOL,
19366 ) -> windows_core::HRESULT,
19367 pub GetCurrent: unsafe extern "system" fn(
19368 *mut core::ffi::c_void,
19369 *mut *mut core::ffi::c_void,
19370 ) -> windows_core::HRESULT,
19371 pub MoveNext: unsafe extern "system" fn(
19372 *mut core::ffi::c_void,
19373 *mut windows_core::BOOL,
19374 ) -> windows_core::HRESULT,
19375}
19376pub trait ICoreWebView2FrameInfoCollectionIterator_Impl: windows_core::IUnknownImpl {
19377 fn HasCurrent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
19378 fn GetCurrent(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
19379 fn MoveNext(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
19380}
19381impl ICoreWebView2FrameInfoCollectionIterator_Vtbl {
19382 pub const fn new<
19383 Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
19384 const OFFSET: isize,
19385 >() -> Self {
19386 unsafe extern "system" fn HasCurrent<
19387 Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
19388 const OFFSET: isize,
19389 >(
19390 this: *mut core::ffi::c_void,
19391 value: *mut windows_core::BOOL,
19392 ) -> windows_core::HRESULT {
19393 unsafe {
19394 let this: &Identity =
19395 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19396 ICoreWebView2FrameInfoCollectionIterator_Impl::HasCurrent(
19397 this,
19398 core::mem::transmute_copy(&value),
19399 )
19400 .into()
19401 }
19402 }
19403 unsafe extern "system" fn GetCurrent<
19404 Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
19405 const OFFSET: isize,
19406 >(
19407 this: *mut core::ffi::c_void,
19408 value: *mut *mut core::ffi::c_void,
19409 ) -> windows_core::HRESULT {
19410 unsafe {
19411 let this: &Identity =
19412 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19413 match ICoreWebView2FrameInfoCollectionIterator_Impl::GetCurrent(this) {
19414 Ok(ok__) => {
19415 value.write(core::mem::transmute(ok__));
19416 windows_core::HRESULT(0)
19417 }
19418 Err(err) => err.into(),
19419 }
19420 }
19421 }
19422 unsafe extern "system" fn MoveNext<
19423 Identity: ICoreWebView2FrameInfoCollectionIterator_Impl,
19424 const OFFSET: isize,
19425 >(
19426 this: *mut core::ffi::c_void,
19427 value: *mut windows_core::BOOL,
19428 ) -> windows_core::HRESULT {
19429 unsafe {
19430 let this: &Identity =
19431 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19432 ICoreWebView2FrameInfoCollectionIterator_Impl::MoveNext(
19433 this,
19434 core::mem::transmute_copy(&value),
19435 )
19436 .into()
19437 }
19438 }
19439 Self {
19440 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19441 HasCurrent: HasCurrent::<Identity, OFFSET>,
19442 GetCurrent: GetCurrent::<Identity, OFFSET>,
19443 MoveNext: MoveNext::<Identity, OFFSET>,
19444 }
19445 }
19446 pub fn matches(iid: &windows_core::GUID) -> bool {
19447 iid == &<ICoreWebView2FrameInfoCollectionIterator as windows_core::Interface>::IID
19448 }
19449}
19450impl windows_core::RuntimeName for ICoreWebView2FrameInfoCollectionIterator {}
19451windows_core::imp::define_interface!(
19452 ICoreWebView2FrameNameChangedEventHandler,
19453 ICoreWebView2FrameNameChangedEventHandler_Vtbl,
19454 0x435c7dc8_9baa_11eb_a8b3_0242ac130003
19455);
19456windows_core::imp::interface_hierarchy!(
19457 ICoreWebView2FrameNameChangedEventHandler,
19458 windows_core::IUnknown
19459);
19460impl ICoreWebView2FrameNameChangedEventHandler {
19461 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
19462 where
19463 P0: windows_core::Param<ICoreWebView2Frame>,
19464 P1: windows_core::Param<windows_core::IUnknown>,
19465 {
19466 unsafe {
19467 (windows_core::Interface::vtable(self).Invoke)(
19468 windows_core::Interface::as_raw(self),
19469 sender.param().abi(),
19470 args.param().abi(),
19471 )
19472 .ok()
19473 }
19474 }
19475}
19476#[repr(C)]
19477pub struct ICoreWebView2FrameNameChangedEventHandler_Vtbl {
19478 pub base__: windows_core::IUnknown_Vtbl,
19479 pub Invoke: unsafe extern "system" fn(
19480 *mut core::ffi::c_void,
19481 *mut core::ffi::c_void,
19482 *mut core::ffi::c_void,
19483 ) -> windows_core::HRESULT,
19484}
19485pub trait ICoreWebView2FrameNameChangedEventHandler_Impl: windows_core::IUnknownImpl {
19486 fn Invoke(
19487 &self,
19488 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19489 args: windows_core::Ref<'_, windows_core::IUnknown>,
19490 ) -> windows_core::Result<()>;
19491}
19492impl ICoreWebView2FrameNameChangedEventHandler_Vtbl {
19493 pub const fn new<
19494 Identity: ICoreWebView2FrameNameChangedEventHandler_Impl,
19495 const OFFSET: isize,
19496 >() -> Self {
19497 unsafe extern "system" fn Invoke<
19498 Identity: ICoreWebView2FrameNameChangedEventHandler_Impl,
19499 const OFFSET: isize,
19500 >(
19501 this: *mut core::ffi::c_void,
19502 sender: *mut core::ffi::c_void,
19503 args: *mut core::ffi::c_void,
19504 ) -> windows_core::HRESULT {
19505 unsafe {
19506 let this: &Identity =
19507 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19508 ICoreWebView2FrameNameChangedEventHandler_Impl::Invoke(
19509 this,
19510 core::mem::transmute_copy(&sender),
19511 core::mem::transmute_copy(&args),
19512 )
19513 .into()
19514 }
19515 }
19516 Self {
19517 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19518 Invoke: Invoke::<Identity, OFFSET>,
19519 }
19520 }
19521 pub fn matches(iid: &windows_core::GUID) -> bool {
19522 iid == &<ICoreWebView2FrameNameChangedEventHandler as windows_core::Interface>::IID
19523 }
19524}
19525impl windows_core::RuntimeName for ICoreWebView2FrameNameChangedEventHandler {}
19526windows_core::imp::define_interface!(
19527 ICoreWebView2FrameNavigationCompletedEventHandler,
19528 ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl,
19529 0x609302ad_0e36_4f9a_a210_6a45272842a9
19530);
19531windows_core::imp::interface_hierarchy!(
19532 ICoreWebView2FrameNavigationCompletedEventHandler,
19533 windows_core::IUnknown
19534);
19535impl ICoreWebView2FrameNavigationCompletedEventHandler {
19536 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
19537 where
19538 P0: windows_core::Param<ICoreWebView2Frame>,
19539 P1: windows_core::Param<ICoreWebView2NavigationCompletedEventArgs>,
19540 {
19541 unsafe {
19542 (windows_core::Interface::vtable(self).Invoke)(
19543 windows_core::Interface::as_raw(self),
19544 sender.param().abi(),
19545 args.param().abi(),
19546 )
19547 .ok()
19548 }
19549 }
19550}
19551#[repr(C)]
19552pub struct ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
19553 pub base__: windows_core::IUnknown_Vtbl,
19554 pub Invoke: unsafe extern "system" fn(
19555 *mut core::ffi::c_void,
19556 *mut core::ffi::c_void,
19557 *mut core::ffi::c_void,
19558 ) -> windows_core::HRESULT,
19559}
19560pub trait ICoreWebView2FrameNavigationCompletedEventHandler_Impl:
19561 windows_core::IUnknownImpl
19562{
19563 fn Invoke(
19564 &self,
19565 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19566 args: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventArgs>,
19567 ) -> windows_core::Result<()>;
19568}
19569impl ICoreWebView2FrameNavigationCompletedEventHandler_Vtbl {
19570 pub const fn new<
19571 Identity: ICoreWebView2FrameNavigationCompletedEventHandler_Impl,
19572 const OFFSET: isize,
19573 >() -> Self {
19574 unsafe extern "system" fn Invoke<
19575 Identity: ICoreWebView2FrameNavigationCompletedEventHandler_Impl,
19576 const OFFSET: isize,
19577 >(
19578 this: *mut core::ffi::c_void,
19579 sender: *mut core::ffi::c_void,
19580 args: *mut core::ffi::c_void,
19581 ) -> windows_core::HRESULT {
19582 unsafe {
19583 let this: &Identity =
19584 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19585 ICoreWebView2FrameNavigationCompletedEventHandler_Impl::Invoke(
19586 this,
19587 core::mem::transmute_copy(&sender),
19588 core::mem::transmute_copy(&args),
19589 )
19590 .into()
19591 }
19592 }
19593 Self {
19594 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19595 Invoke: Invoke::<Identity, OFFSET>,
19596 }
19597 }
19598 pub fn matches(iid: &windows_core::GUID) -> bool {
19599 iid == &<ICoreWebView2FrameNavigationCompletedEventHandler as windows_core::Interface>::IID
19600 }
19601}
19602impl windows_core::RuntimeName for ICoreWebView2FrameNavigationCompletedEventHandler {}
19603windows_core::imp::define_interface!(
19604 ICoreWebView2FrameNavigationStartingEventHandler,
19605 ICoreWebView2FrameNavigationStartingEventHandler_Vtbl,
19606 0xe79908bf_2d5d_4968_83db_263fea2c1da3
19607);
19608windows_core::imp::interface_hierarchy!(
19609 ICoreWebView2FrameNavigationStartingEventHandler,
19610 windows_core::IUnknown
19611);
19612impl ICoreWebView2FrameNavigationStartingEventHandler {
19613 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
19614 where
19615 P0: windows_core::Param<ICoreWebView2Frame>,
19616 P1: windows_core::Param<ICoreWebView2NavigationStartingEventArgs>,
19617 {
19618 unsafe {
19619 (windows_core::Interface::vtable(self).Invoke)(
19620 windows_core::Interface::as_raw(self),
19621 sender.param().abi(),
19622 args.param().abi(),
19623 )
19624 .ok()
19625 }
19626 }
19627}
19628#[repr(C)]
19629pub struct ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
19630 pub base__: windows_core::IUnknown_Vtbl,
19631 pub Invoke: unsafe extern "system" fn(
19632 *mut core::ffi::c_void,
19633 *mut core::ffi::c_void,
19634 *mut core::ffi::c_void,
19635 ) -> windows_core::HRESULT,
19636}
19637pub trait ICoreWebView2FrameNavigationStartingEventHandler_Impl:
19638 windows_core::IUnknownImpl
19639{
19640 fn Invoke(
19641 &self,
19642 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19643 args: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventArgs>,
19644 ) -> windows_core::Result<()>;
19645}
19646impl ICoreWebView2FrameNavigationStartingEventHandler_Vtbl {
19647 pub const fn new<
19648 Identity: ICoreWebView2FrameNavigationStartingEventHandler_Impl,
19649 const OFFSET: isize,
19650 >() -> Self {
19651 unsafe extern "system" fn Invoke<
19652 Identity: ICoreWebView2FrameNavigationStartingEventHandler_Impl,
19653 const OFFSET: isize,
19654 >(
19655 this: *mut core::ffi::c_void,
19656 sender: *mut core::ffi::c_void,
19657 args: *mut core::ffi::c_void,
19658 ) -> windows_core::HRESULT {
19659 unsafe {
19660 let this: &Identity =
19661 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19662 ICoreWebView2FrameNavigationStartingEventHandler_Impl::Invoke(
19663 this,
19664 core::mem::transmute_copy(&sender),
19665 core::mem::transmute_copy(&args),
19666 )
19667 .into()
19668 }
19669 }
19670 Self {
19671 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19672 Invoke: Invoke::<Identity, OFFSET>,
19673 }
19674 }
19675 pub fn matches(iid: &windows_core::GUID) -> bool {
19676 iid == &<ICoreWebView2FrameNavigationStartingEventHandler as windows_core::Interface>::IID
19677 }
19678}
19679impl windows_core::RuntimeName for ICoreWebView2FrameNavigationStartingEventHandler {}
19680windows_core::imp::define_interface!(
19681 ICoreWebView2FramePermissionRequestedEventHandler,
19682 ICoreWebView2FramePermissionRequestedEventHandler_Vtbl,
19683 0x845d0edd_8bd8_429b_9915_4821789f23e9
19684);
19685windows_core::imp::interface_hierarchy!(
19686 ICoreWebView2FramePermissionRequestedEventHandler,
19687 windows_core::IUnknown
19688);
19689impl ICoreWebView2FramePermissionRequestedEventHandler {
19690 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
19691 where
19692 P0: windows_core::Param<ICoreWebView2Frame>,
19693 P1: windows_core::Param<ICoreWebView2PermissionRequestedEventArgs2>,
19694 {
19695 unsafe {
19696 (windows_core::Interface::vtable(self).Invoke)(
19697 windows_core::Interface::as_raw(self),
19698 sender.param().abi(),
19699 args.param().abi(),
19700 )
19701 .ok()
19702 }
19703 }
19704}
19705#[repr(C)]
19706pub struct ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
19707 pub base__: windows_core::IUnknown_Vtbl,
19708 pub Invoke: unsafe extern "system" fn(
19709 *mut core::ffi::c_void,
19710 *mut core::ffi::c_void,
19711 *mut core::ffi::c_void,
19712 ) -> windows_core::HRESULT,
19713}
19714pub trait ICoreWebView2FramePermissionRequestedEventHandler_Impl:
19715 windows_core::IUnknownImpl
19716{
19717 fn Invoke(
19718 &self,
19719 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19720 args: windows_core::Ref<'_, ICoreWebView2PermissionRequestedEventArgs2>,
19721 ) -> windows_core::Result<()>;
19722}
19723impl ICoreWebView2FramePermissionRequestedEventHandler_Vtbl {
19724 pub const fn new<
19725 Identity: ICoreWebView2FramePermissionRequestedEventHandler_Impl,
19726 const OFFSET: isize,
19727 >() -> Self {
19728 unsafe extern "system" fn Invoke<
19729 Identity: ICoreWebView2FramePermissionRequestedEventHandler_Impl,
19730 const OFFSET: isize,
19731 >(
19732 this: *mut core::ffi::c_void,
19733 sender: *mut core::ffi::c_void,
19734 args: *mut core::ffi::c_void,
19735 ) -> windows_core::HRESULT {
19736 unsafe {
19737 let this: &Identity =
19738 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19739 ICoreWebView2FramePermissionRequestedEventHandler_Impl::Invoke(
19740 this,
19741 core::mem::transmute_copy(&sender),
19742 core::mem::transmute_copy(&args),
19743 )
19744 .into()
19745 }
19746 }
19747 Self {
19748 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19749 Invoke: Invoke::<Identity, OFFSET>,
19750 }
19751 }
19752 pub fn matches(iid: &windows_core::GUID) -> bool {
19753 iid == &<ICoreWebView2FramePermissionRequestedEventHandler as windows_core::Interface>::IID
19754 }
19755}
19756impl windows_core::RuntimeName for ICoreWebView2FramePermissionRequestedEventHandler {}
19757windows_core::imp::define_interface!(
19758 ICoreWebView2FrameScreenCaptureStartingEventHandler,
19759 ICoreWebView2FrameScreenCaptureStartingEventHandler_Vtbl,
19760 0xa6c1d8ad_bb80_59c5_895b_fba1698b9309
19761);
19762windows_core::imp::interface_hierarchy!(
19763 ICoreWebView2FrameScreenCaptureStartingEventHandler,
19764 windows_core::IUnknown
19765);
19766impl ICoreWebView2FrameScreenCaptureStartingEventHandler {
19767 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
19768 where
19769 P0: windows_core::Param<ICoreWebView2Frame>,
19770 P1: windows_core::Param<ICoreWebView2ScreenCaptureStartingEventArgs>,
19771 {
19772 unsafe {
19773 (windows_core::Interface::vtable(self).Invoke)(
19774 windows_core::Interface::as_raw(self),
19775 sender.param().abi(),
19776 args.param().abi(),
19777 )
19778 .ok()
19779 }
19780 }
19781}
19782#[repr(C)]
19783pub struct ICoreWebView2FrameScreenCaptureStartingEventHandler_Vtbl {
19784 pub base__: windows_core::IUnknown_Vtbl,
19785 pub Invoke: unsafe extern "system" fn(
19786 *mut core::ffi::c_void,
19787 *mut core::ffi::c_void,
19788 *mut core::ffi::c_void,
19789 ) -> windows_core::HRESULT,
19790}
19791pub trait ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl:
19792 windows_core::IUnknownImpl
19793{
19794 fn Invoke(
19795 &self,
19796 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19797 args: windows_core::Ref<'_, ICoreWebView2ScreenCaptureStartingEventArgs>,
19798 ) -> windows_core::Result<()>;
19799}
19800impl ICoreWebView2FrameScreenCaptureStartingEventHandler_Vtbl {
19801 pub const fn new<
19802 Identity: ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl,
19803 const OFFSET: isize,
19804 >() -> Self {
19805 unsafe extern "system" fn Invoke<
19806 Identity: ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl,
19807 const OFFSET: isize,
19808 >(
19809 this: *mut core::ffi::c_void,
19810 sender: *mut core::ffi::c_void,
19811 args: *mut core::ffi::c_void,
19812 ) -> windows_core::HRESULT {
19813 unsafe {
19814 let this: &Identity =
19815 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19816 ICoreWebView2FrameScreenCaptureStartingEventHandler_Impl::Invoke(
19817 this,
19818 core::mem::transmute_copy(&sender),
19819 core::mem::transmute_copy(&args),
19820 )
19821 .into()
19822 }
19823 }
19824 Self {
19825 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19826 Invoke: Invoke::<Identity, OFFSET>,
19827 }
19828 }
19829 pub fn matches(iid: &windows_core::GUID) -> bool {
19830 iid == & < ICoreWebView2FrameScreenCaptureStartingEventHandler as windows_core::Interface >::IID
19831 }
19832}
19833impl windows_core::RuntimeName for ICoreWebView2FrameScreenCaptureStartingEventHandler {}
19834windows_core::imp::define_interface!(
19835 ICoreWebView2FrameWebMessageReceivedEventHandler,
19836 ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl,
19837 0xe371e005_6d1d_4517_934b_a8f1629c62a5
19838);
19839windows_core::imp::interface_hierarchy!(
19840 ICoreWebView2FrameWebMessageReceivedEventHandler,
19841 windows_core::IUnknown
19842);
19843impl ICoreWebView2FrameWebMessageReceivedEventHandler {
19844 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
19845 where
19846 P0: windows_core::Param<ICoreWebView2Frame>,
19847 P1: windows_core::Param<ICoreWebView2WebMessageReceivedEventArgs>,
19848 {
19849 unsafe {
19850 (windows_core::Interface::vtable(self).Invoke)(
19851 windows_core::Interface::as_raw(self),
19852 sender.param().abi(),
19853 args.param().abi(),
19854 )
19855 .ok()
19856 }
19857 }
19858}
19859#[repr(C)]
19860pub struct ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
19861 pub base__: windows_core::IUnknown_Vtbl,
19862 pub Invoke: unsafe extern "system" fn(
19863 *mut core::ffi::c_void,
19864 *mut core::ffi::c_void,
19865 *mut core::ffi::c_void,
19866 ) -> windows_core::HRESULT,
19867}
19868pub trait ICoreWebView2FrameWebMessageReceivedEventHandler_Impl:
19869 windows_core::IUnknownImpl
19870{
19871 fn Invoke(
19872 &self,
19873 sender: windows_core::Ref<'_, ICoreWebView2Frame>,
19874 args: windows_core::Ref<'_, ICoreWebView2WebMessageReceivedEventArgs>,
19875 ) -> windows_core::Result<()>;
19876}
19877impl ICoreWebView2FrameWebMessageReceivedEventHandler_Vtbl {
19878 pub const fn new<
19879 Identity: ICoreWebView2FrameWebMessageReceivedEventHandler_Impl,
19880 const OFFSET: isize,
19881 >() -> Self {
19882 unsafe extern "system" fn Invoke<
19883 Identity: ICoreWebView2FrameWebMessageReceivedEventHandler_Impl,
19884 const OFFSET: isize,
19885 >(
19886 this: *mut core::ffi::c_void,
19887 sender: *mut core::ffi::c_void,
19888 args: *mut core::ffi::c_void,
19889 ) -> windows_core::HRESULT {
19890 unsafe {
19891 let this: &Identity =
19892 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19893 ICoreWebView2FrameWebMessageReceivedEventHandler_Impl::Invoke(
19894 this,
19895 core::mem::transmute_copy(&sender),
19896 core::mem::transmute_copy(&args),
19897 )
19898 .into()
19899 }
19900 }
19901 Self {
19902 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19903 Invoke: Invoke::<Identity, OFFSET>,
19904 }
19905 }
19906 pub fn matches(iid: &windows_core::GUID) -> bool {
19907 iid == &<ICoreWebView2FrameWebMessageReceivedEventHandler as windows_core::Interface>::IID
19908 }
19909}
19910impl windows_core::RuntimeName for ICoreWebView2FrameWebMessageReceivedEventHandler {}
19911windows_core::imp::define_interface!(
19912 ICoreWebView2GetCookiesCompletedHandler,
19913 ICoreWebView2GetCookiesCompletedHandler_Vtbl,
19914 0x5a4f5069_5c15_47c3_8646_f4de1c116670
19915);
19916windows_core::imp::interface_hierarchy!(
19917 ICoreWebView2GetCookiesCompletedHandler,
19918 windows_core::IUnknown
19919);
19920impl ICoreWebView2GetCookiesCompletedHandler {
19921 pub unsafe fn Invoke<P1>(
19922 &self,
19923 errorcode: windows_core::HRESULT,
19924 result: P1,
19925 ) -> windows_core::Result<()>
19926 where
19927 P1: windows_core::Param<ICoreWebView2CookieList>,
19928 {
19929 unsafe {
19930 (windows_core::Interface::vtable(self).Invoke)(
19931 windows_core::Interface::as_raw(self),
19932 errorcode,
19933 result.param().abi(),
19934 )
19935 .ok()
19936 }
19937 }
19938}
19939#[repr(C)]
19940pub struct ICoreWebView2GetCookiesCompletedHandler_Vtbl {
19941 pub base__: windows_core::IUnknown_Vtbl,
19942 pub Invoke: unsafe extern "system" fn(
19943 *mut core::ffi::c_void,
19944 windows_core::HRESULT,
19945 *mut core::ffi::c_void,
19946 ) -> windows_core::HRESULT,
19947}
19948pub trait ICoreWebView2GetCookiesCompletedHandler_Impl: windows_core::IUnknownImpl {
19949 fn Invoke(
19950 &self,
19951 errorcode: windows_core::HRESULT,
19952 result: windows_core::Ref<'_, ICoreWebView2CookieList>,
19953 ) -> windows_core::Result<()>;
19954}
19955impl ICoreWebView2GetCookiesCompletedHandler_Vtbl {
19956 pub const fn new<
19957 Identity: ICoreWebView2GetCookiesCompletedHandler_Impl,
19958 const OFFSET: isize,
19959 >() -> Self {
19960 unsafe extern "system" fn Invoke<
19961 Identity: ICoreWebView2GetCookiesCompletedHandler_Impl,
19962 const OFFSET: isize,
19963 >(
19964 this: *mut core::ffi::c_void,
19965 errorcode: windows_core::HRESULT,
19966 result: *mut core::ffi::c_void,
19967 ) -> windows_core::HRESULT {
19968 unsafe {
19969 let this: &Identity =
19970 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
19971 ICoreWebView2GetCookiesCompletedHandler_Impl::Invoke(
19972 this,
19973 core::mem::transmute_copy(&errorcode),
19974 core::mem::transmute_copy(&result),
19975 )
19976 .into()
19977 }
19978 }
19979 Self {
19980 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
19981 Invoke: Invoke::<Identity, OFFSET>,
19982 }
19983 }
19984 pub fn matches(iid: &windows_core::GUID) -> bool {
19985 iid == &<ICoreWebView2GetCookiesCompletedHandler as windows_core::Interface>::IID
19986 }
19987}
19988impl windows_core::RuntimeName for ICoreWebView2GetCookiesCompletedHandler {}
19989windows_core::imp::define_interface!(
19990 ICoreWebView2GetFaviconCompletedHandler,
19991 ICoreWebView2GetFaviconCompletedHandler_Vtbl,
19992 0xa2508329_7da8_49d7_8c05_fa125e4aee8d
19993);
19994windows_core::imp::interface_hierarchy!(
19995 ICoreWebView2GetFaviconCompletedHandler,
19996 windows_core::IUnknown
19997);
19998impl ICoreWebView2GetFaviconCompletedHandler {
19999 pub unsafe fn Invoke<P1>(
20000 &self,
20001 errorcode: windows_core::HRESULT,
20002 result: P1,
20003 ) -> windows_core::Result<()>
20004 where
20005 P1: windows_core::Param<windows::Win32::System::Com::IStream>,
20006 {
20007 unsafe {
20008 (windows_core::Interface::vtable(self).Invoke)(
20009 windows_core::Interface::as_raw(self),
20010 errorcode,
20011 result.param().abi(),
20012 )
20013 .ok()
20014 }
20015 }
20016}
20017#[repr(C)]
20018pub struct ICoreWebView2GetFaviconCompletedHandler_Vtbl {
20019 pub base__: windows_core::IUnknown_Vtbl,
20020 pub Invoke: unsafe extern "system" fn(
20021 *mut core::ffi::c_void,
20022 windows_core::HRESULT,
20023 *mut core::ffi::c_void,
20024 ) -> windows_core::HRESULT,
20025}
20026pub trait ICoreWebView2GetFaviconCompletedHandler_Impl: windows_core::IUnknownImpl {
20027 fn Invoke(
20028 &self,
20029 errorcode: windows_core::HRESULT,
20030 result: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
20031 ) -> windows_core::Result<()>;
20032}
20033impl ICoreWebView2GetFaviconCompletedHandler_Vtbl {
20034 pub const fn new<
20035 Identity: ICoreWebView2GetFaviconCompletedHandler_Impl,
20036 const OFFSET: isize,
20037 >() -> Self {
20038 unsafe extern "system" fn Invoke<
20039 Identity: ICoreWebView2GetFaviconCompletedHandler_Impl,
20040 const OFFSET: isize,
20041 >(
20042 this: *mut core::ffi::c_void,
20043 errorcode: windows_core::HRESULT,
20044 result: *mut core::ffi::c_void,
20045 ) -> windows_core::HRESULT {
20046 unsafe {
20047 let this: &Identity =
20048 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20049 ICoreWebView2GetFaviconCompletedHandler_Impl::Invoke(
20050 this,
20051 core::mem::transmute_copy(&errorcode),
20052 core::mem::transmute_copy(&result),
20053 )
20054 .into()
20055 }
20056 }
20057 Self {
20058 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20059 Invoke: Invoke::<Identity, OFFSET>,
20060 }
20061 }
20062 pub fn matches(iid: &windows_core::GUID) -> bool {
20063 iid == &<ICoreWebView2GetFaviconCompletedHandler as windows_core::Interface>::IID
20064 }
20065}
20066impl windows_core::RuntimeName for ICoreWebView2GetFaviconCompletedHandler {}
20067windows_core::imp::define_interface!(
20068 ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler,
20069 ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Vtbl,
20070 0x38274481_a15c_4563_94cf_990edc9aeb95
20071);
20072windows_core::imp::interface_hierarchy!(
20073 ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler,
20074 windows_core::IUnknown
20075);
20076impl ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler {
20077 pub unsafe fn Invoke<P1>(
20078 &self,
20079 errorcode: windows_core::HRESULT,
20080 result: P1,
20081 ) -> windows_core::Result<()>
20082 where
20083 P1: windows_core::Param<ICoreWebView2PermissionSettingCollectionView>,
20084 {
20085 unsafe {
20086 (windows_core::Interface::vtable(self).Invoke)(
20087 windows_core::Interface::as_raw(self),
20088 errorcode,
20089 result.param().abi(),
20090 )
20091 .ok()
20092 }
20093 }
20094}
20095#[repr(C)]
20096pub struct ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Vtbl {
20097 pub base__: windows_core::IUnknown_Vtbl,
20098 pub Invoke: unsafe extern "system" fn(
20099 *mut core::ffi::c_void,
20100 windows_core::HRESULT,
20101 *mut core::ffi::c_void,
20102 ) -> windows_core::HRESULT,
20103}
20104pub trait ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl:
20105 windows_core::IUnknownImpl
20106{
20107 fn Invoke(
20108 &self,
20109 errorcode: windows_core::HRESULT,
20110 result: windows_core::Ref<'_, ICoreWebView2PermissionSettingCollectionView>,
20111 ) -> windows_core::Result<()>;
20112}
20113impl ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Vtbl {
20114 pub const fn new<
20115 Identity: ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl,
20116 const OFFSET: isize,
20117 >() -> Self {
20118 unsafe extern "system" fn Invoke<
20119 Identity: ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl,
20120 const OFFSET: isize,
20121 >(
20122 this: *mut core::ffi::c_void,
20123 errorcode: windows_core::HRESULT,
20124 result: *mut core::ffi::c_void,
20125 ) -> windows_core::HRESULT {
20126 unsafe {
20127 let this: &Identity =
20128 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20129 ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler_Impl::Invoke(
20130 this,
20131 core::mem::transmute_copy(&errorcode),
20132 core::mem::transmute_copy(&result),
20133 )
20134 .into()
20135 }
20136 }
20137 Self {
20138 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20139 Invoke: Invoke::<Identity, OFFSET>,
20140 }
20141 }
20142 pub fn matches(iid: &windows_core::GUID) -> bool {
20143 iid == & < ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler as windows_core::Interface >::IID
20144 }
20145}
20146impl windows_core::RuntimeName for ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler {}
20147windows_core::imp::define_interface!(
20148 ICoreWebView2GetProcessExtendedInfosCompletedHandler,
20149 ICoreWebView2GetProcessExtendedInfosCompletedHandler_Vtbl,
20150 0xf45e55aa_3bc2_11ee_be56_0242ac120002
20151);
20152windows_core::imp::interface_hierarchy!(
20153 ICoreWebView2GetProcessExtendedInfosCompletedHandler,
20154 windows_core::IUnknown
20155);
20156impl ICoreWebView2GetProcessExtendedInfosCompletedHandler {
20157 pub unsafe fn Invoke<P1>(
20158 &self,
20159 errorcode: windows_core::HRESULT,
20160 result: P1,
20161 ) -> windows_core::Result<()>
20162 where
20163 P1: windows_core::Param<ICoreWebView2ProcessExtendedInfoCollection>,
20164 {
20165 unsafe {
20166 (windows_core::Interface::vtable(self).Invoke)(
20167 windows_core::Interface::as_raw(self),
20168 errorcode,
20169 result.param().abi(),
20170 )
20171 .ok()
20172 }
20173 }
20174}
20175#[repr(C)]
20176pub struct ICoreWebView2GetProcessExtendedInfosCompletedHandler_Vtbl {
20177 pub base__: windows_core::IUnknown_Vtbl,
20178 pub Invoke: unsafe extern "system" fn(
20179 *mut core::ffi::c_void,
20180 windows_core::HRESULT,
20181 *mut core::ffi::c_void,
20182 ) -> windows_core::HRESULT,
20183}
20184pub trait ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl:
20185 windows_core::IUnknownImpl
20186{
20187 fn Invoke(
20188 &self,
20189 errorcode: windows_core::HRESULT,
20190 result: windows_core::Ref<'_, ICoreWebView2ProcessExtendedInfoCollection>,
20191 ) -> windows_core::Result<()>;
20192}
20193impl ICoreWebView2GetProcessExtendedInfosCompletedHandler_Vtbl {
20194 pub const fn new<
20195 Identity: ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl,
20196 const OFFSET: isize,
20197 >() -> Self {
20198 unsafe extern "system" fn Invoke<
20199 Identity: ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl,
20200 const OFFSET: isize,
20201 >(
20202 this: *mut core::ffi::c_void,
20203 errorcode: windows_core::HRESULT,
20204 result: *mut core::ffi::c_void,
20205 ) -> windows_core::HRESULT {
20206 unsafe {
20207 let this: &Identity =
20208 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20209 ICoreWebView2GetProcessExtendedInfosCompletedHandler_Impl::Invoke(
20210 this,
20211 core::mem::transmute_copy(&errorcode),
20212 core::mem::transmute_copy(&result),
20213 )
20214 .into()
20215 }
20216 }
20217 Self {
20218 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20219 Invoke: Invoke::<Identity, OFFSET>,
20220 }
20221 }
20222 pub fn matches(iid: &windows_core::GUID) -> bool {
20223 iid == & < ICoreWebView2GetProcessExtendedInfosCompletedHandler as windows_core::Interface >::IID
20224 }
20225}
20226impl windows_core::RuntimeName for ICoreWebView2GetProcessExtendedInfosCompletedHandler {}
20227windows_core::imp::define_interface!(
20228 ICoreWebView2HistoryChangedEventHandler,
20229 ICoreWebView2HistoryChangedEventHandler_Vtbl,
20230 0xc79a420c_efd9_4058_9295_3e8b4bcab645
20231);
20232windows_core::imp::interface_hierarchy!(
20233 ICoreWebView2HistoryChangedEventHandler,
20234 windows_core::IUnknown
20235);
20236impl ICoreWebView2HistoryChangedEventHandler {
20237 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
20238 where
20239 P0: windows_core::Param<ICoreWebView2>,
20240 P1: windows_core::Param<windows_core::IUnknown>,
20241 {
20242 unsafe {
20243 (windows_core::Interface::vtable(self).Invoke)(
20244 windows_core::Interface::as_raw(self),
20245 sender.param().abi(),
20246 args.param().abi(),
20247 )
20248 .ok()
20249 }
20250 }
20251}
20252#[repr(C)]
20253pub struct ICoreWebView2HistoryChangedEventHandler_Vtbl {
20254 pub base__: windows_core::IUnknown_Vtbl,
20255 pub Invoke: unsafe extern "system" fn(
20256 *mut core::ffi::c_void,
20257 *mut core::ffi::c_void,
20258 *mut core::ffi::c_void,
20259 ) -> windows_core::HRESULT,
20260}
20261pub trait ICoreWebView2HistoryChangedEventHandler_Impl: windows_core::IUnknownImpl {
20262 fn Invoke(
20263 &self,
20264 sender: windows_core::Ref<'_, ICoreWebView2>,
20265 args: windows_core::Ref<'_, windows_core::IUnknown>,
20266 ) -> windows_core::Result<()>;
20267}
20268impl ICoreWebView2HistoryChangedEventHandler_Vtbl {
20269 pub const fn new<
20270 Identity: ICoreWebView2HistoryChangedEventHandler_Impl,
20271 const OFFSET: isize,
20272 >() -> Self {
20273 unsafe extern "system" fn Invoke<
20274 Identity: ICoreWebView2HistoryChangedEventHandler_Impl,
20275 const OFFSET: isize,
20276 >(
20277 this: *mut core::ffi::c_void,
20278 sender: *mut core::ffi::c_void,
20279 args: *mut core::ffi::c_void,
20280 ) -> windows_core::HRESULT {
20281 unsafe {
20282 let this: &Identity =
20283 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20284 ICoreWebView2HistoryChangedEventHandler_Impl::Invoke(
20285 this,
20286 core::mem::transmute_copy(&sender),
20287 core::mem::transmute_copy(&args),
20288 )
20289 .into()
20290 }
20291 }
20292 Self {
20293 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20294 Invoke: Invoke::<Identity, OFFSET>,
20295 }
20296 }
20297 pub fn matches(iid: &windows_core::GUID) -> bool {
20298 iid == &<ICoreWebView2HistoryChangedEventHandler as windows_core::Interface>::IID
20299 }
20300}
20301impl windows_core::RuntimeName for ICoreWebView2HistoryChangedEventHandler {}
20302windows_core::imp::define_interface!(
20303 ICoreWebView2HttpHeadersCollectionIterator,
20304 ICoreWebView2HttpHeadersCollectionIterator_Vtbl,
20305 0x0702fc30_f43b_47bb_ab52_a42cb552ad9f
20306);
20307windows_core::imp::interface_hierarchy!(
20308 ICoreWebView2HttpHeadersCollectionIterator,
20309 windows_core::IUnknown
20310);
20311impl ICoreWebView2HttpHeadersCollectionIterator {
20312 pub unsafe fn GetCurrentHeader(
20313 &self,
20314 name: *mut windows_core::PWSTR,
20315 value: *mut windows_core::PWSTR,
20316 ) -> windows_core::Result<()> {
20317 unsafe {
20318 (windows_core::Interface::vtable(self).GetCurrentHeader)(
20319 windows_core::Interface::as_raw(self),
20320 name as _,
20321 value as _,
20322 )
20323 .ok()
20324 }
20325 }
20326 pub unsafe fn HasCurrentHeader(
20327 &self,
20328 hascurrent: *mut windows_core::BOOL,
20329 ) -> windows_core::Result<()> {
20330 unsafe {
20331 (windows_core::Interface::vtable(self).HasCurrentHeader)(
20332 windows_core::Interface::as_raw(self),
20333 hascurrent as _,
20334 )
20335 .ok()
20336 }
20337 }
20338 pub unsafe fn MoveNext(&self, hasnext: *mut windows_core::BOOL) -> windows_core::Result<()> {
20339 unsafe {
20340 (windows_core::Interface::vtable(self).MoveNext)(
20341 windows_core::Interface::as_raw(self),
20342 hasnext as _,
20343 )
20344 .ok()
20345 }
20346 }
20347}
20348#[repr(C)]
20349pub struct ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
20350 pub base__: windows_core::IUnknown_Vtbl,
20351 pub GetCurrentHeader: unsafe extern "system" fn(
20352 *mut core::ffi::c_void,
20353 *mut windows_core::PWSTR,
20354 *mut windows_core::PWSTR,
20355 ) -> windows_core::HRESULT,
20356 pub HasCurrentHeader: unsafe extern "system" fn(
20357 *mut core::ffi::c_void,
20358 *mut windows_core::BOOL,
20359 ) -> windows_core::HRESULT,
20360 pub MoveNext: unsafe extern "system" fn(
20361 *mut core::ffi::c_void,
20362 *mut windows_core::BOOL,
20363 ) -> windows_core::HRESULT,
20364}
20365pub trait ICoreWebView2HttpHeadersCollectionIterator_Impl: windows_core::IUnknownImpl {
20366 fn GetCurrentHeader(
20367 &self,
20368 name: *mut windows_core::PWSTR,
20369 value: *mut windows_core::PWSTR,
20370 ) -> windows_core::Result<()>;
20371 fn HasCurrentHeader(&self, hascurrent: *mut windows_core::BOOL) -> windows_core::Result<()>;
20372 fn MoveNext(&self, hasnext: *mut windows_core::BOOL) -> windows_core::Result<()>;
20373}
20374impl ICoreWebView2HttpHeadersCollectionIterator_Vtbl {
20375 pub const fn new<
20376 Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
20377 const OFFSET: isize,
20378 >() -> Self {
20379 unsafe extern "system" fn GetCurrentHeader<
20380 Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
20381 const OFFSET: isize,
20382 >(
20383 this: *mut core::ffi::c_void,
20384 name: *mut windows_core::PWSTR,
20385 value: *mut windows_core::PWSTR,
20386 ) -> windows_core::HRESULT {
20387 unsafe {
20388 let this: &Identity =
20389 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20390 ICoreWebView2HttpHeadersCollectionIterator_Impl::GetCurrentHeader(
20391 this,
20392 core::mem::transmute_copy(&name),
20393 core::mem::transmute_copy(&value),
20394 )
20395 .into()
20396 }
20397 }
20398 unsafe extern "system" fn HasCurrentHeader<
20399 Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
20400 const OFFSET: isize,
20401 >(
20402 this: *mut core::ffi::c_void,
20403 hascurrent: *mut windows_core::BOOL,
20404 ) -> windows_core::HRESULT {
20405 unsafe {
20406 let this: &Identity =
20407 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20408 ICoreWebView2HttpHeadersCollectionIterator_Impl::HasCurrentHeader(
20409 this,
20410 core::mem::transmute_copy(&hascurrent),
20411 )
20412 .into()
20413 }
20414 }
20415 unsafe extern "system" fn MoveNext<
20416 Identity: ICoreWebView2HttpHeadersCollectionIterator_Impl,
20417 const OFFSET: isize,
20418 >(
20419 this: *mut core::ffi::c_void,
20420 hasnext: *mut windows_core::BOOL,
20421 ) -> windows_core::HRESULT {
20422 unsafe {
20423 let this: &Identity =
20424 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20425 ICoreWebView2HttpHeadersCollectionIterator_Impl::MoveNext(
20426 this,
20427 core::mem::transmute_copy(&hasnext),
20428 )
20429 .into()
20430 }
20431 }
20432 Self {
20433 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20434 GetCurrentHeader: GetCurrentHeader::<Identity, OFFSET>,
20435 HasCurrentHeader: HasCurrentHeader::<Identity, OFFSET>,
20436 MoveNext: MoveNext::<Identity, OFFSET>,
20437 }
20438 }
20439 pub fn matches(iid: &windows_core::GUID) -> bool {
20440 iid == &<ICoreWebView2HttpHeadersCollectionIterator as windows_core::Interface>::IID
20441 }
20442}
20443impl windows_core::RuntimeName for ICoreWebView2HttpHeadersCollectionIterator {}
20444windows_core::imp::define_interface!(
20445 ICoreWebView2HttpRequestHeaders,
20446 ICoreWebView2HttpRequestHeaders_Vtbl,
20447 0xe86cac0e_5523_465c_b536_8fb9fc8c8c60
20448);
20449windows_core::imp::interface_hierarchy!(ICoreWebView2HttpRequestHeaders, windows_core::IUnknown);
20450impl ICoreWebView2HttpRequestHeaders {
20451 pub unsafe fn GetHeader<P0>(
20452 &self,
20453 name: P0,
20454 value: *mut windows_core::PWSTR,
20455 ) -> windows_core::Result<()>
20456 where
20457 P0: windows_core::Param<windows_core::PCWSTR>,
20458 {
20459 unsafe {
20460 (windows_core::Interface::vtable(self).GetHeader)(
20461 windows_core::Interface::as_raw(self),
20462 name.param().abi(),
20463 value as _,
20464 )
20465 .ok()
20466 }
20467 }
20468 pub unsafe fn GetHeaders<P0>(
20469 &self,
20470 name: P0,
20471 ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>
20472 where
20473 P0: windows_core::Param<windows_core::PCWSTR>,
20474 {
20475 unsafe {
20476 let mut result__ = core::mem::zeroed();
20477 (windows_core::Interface::vtable(self).GetHeaders)(
20478 windows_core::Interface::as_raw(self),
20479 name.param().abi(),
20480 &mut result__,
20481 )
20482 .and_then(|| windows_core::Type::from_abi(result__))
20483 }
20484 }
20485 pub unsafe fn Contains<P0>(
20486 &self,
20487 name: P0,
20488 value: *mut windows_core::BOOL,
20489 ) -> windows_core::Result<()>
20490 where
20491 P0: windows_core::Param<windows_core::PCWSTR>,
20492 {
20493 unsafe {
20494 (windows_core::Interface::vtable(self).Contains)(
20495 windows_core::Interface::as_raw(self),
20496 name.param().abi(),
20497 value as _,
20498 )
20499 .ok()
20500 }
20501 }
20502 pub unsafe fn SetHeader<P0, P1>(&self, name: P0, value: P1) -> windows_core::Result<()>
20503 where
20504 P0: windows_core::Param<windows_core::PCWSTR>,
20505 P1: windows_core::Param<windows_core::PCWSTR>,
20506 {
20507 unsafe {
20508 (windows_core::Interface::vtable(self).SetHeader)(
20509 windows_core::Interface::as_raw(self),
20510 name.param().abi(),
20511 value.param().abi(),
20512 )
20513 .ok()
20514 }
20515 }
20516 pub unsafe fn RemoveHeader<P0>(&self, name: P0) -> windows_core::Result<()>
20517 where
20518 P0: windows_core::Param<windows_core::PCWSTR>,
20519 {
20520 unsafe {
20521 (windows_core::Interface::vtable(self).RemoveHeader)(
20522 windows_core::Interface::as_raw(self),
20523 name.param().abi(),
20524 )
20525 .ok()
20526 }
20527 }
20528 pub unsafe fn GetIterator(
20529 &self,
20530 ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator> {
20531 unsafe {
20532 let mut result__ = core::mem::zeroed();
20533 (windows_core::Interface::vtable(self).GetIterator)(
20534 windows_core::Interface::as_raw(self),
20535 &mut result__,
20536 )
20537 .and_then(|| windows_core::Type::from_abi(result__))
20538 }
20539 }
20540}
20541#[repr(C)]
20542pub struct ICoreWebView2HttpRequestHeaders_Vtbl {
20543 pub base__: windows_core::IUnknown_Vtbl,
20544 pub GetHeader: unsafe extern "system" fn(
20545 *mut core::ffi::c_void,
20546 windows_core::PCWSTR,
20547 *mut windows_core::PWSTR,
20548 ) -> windows_core::HRESULT,
20549 pub GetHeaders: unsafe extern "system" fn(
20550 *mut core::ffi::c_void,
20551 windows_core::PCWSTR,
20552 *mut *mut core::ffi::c_void,
20553 ) -> windows_core::HRESULT,
20554 pub Contains: unsafe extern "system" fn(
20555 *mut core::ffi::c_void,
20556 windows_core::PCWSTR,
20557 *mut windows_core::BOOL,
20558 ) -> windows_core::HRESULT,
20559 pub SetHeader: unsafe extern "system" fn(
20560 *mut core::ffi::c_void,
20561 windows_core::PCWSTR,
20562 windows_core::PCWSTR,
20563 ) -> windows_core::HRESULT,
20564 pub RemoveHeader: unsafe extern "system" fn(
20565 *mut core::ffi::c_void,
20566 windows_core::PCWSTR,
20567 ) -> windows_core::HRESULT,
20568 pub GetIterator: unsafe extern "system" fn(
20569 *mut core::ffi::c_void,
20570 *mut *mut core::ffi::c_void,
20571 ) -> windows_core::HRESULT,
20572}
20573pub trait ICoreWebView2HttpRequestHeaders_Impl: windows_core::IUnknownImpl {
20574 fn GetHeader(
20575 &self,
20576 name: &windows_core::PCWSTR,
20577 value: *mut windows_core::PWSTR,
20578 ) -> windows_core::Result<()>;
20579 fn GetHeaders(
20580 &self,
20581 name: &windows_core::PCWSTR,
20582 ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
20583 fn Contains(
20584 &self,
20585 name: &windows_core::PCWSTR,
20586 value: *mut windows_core::BOOL,
20587 ) -> windows_core::Result<()>;
20588 fn SetHeader(
20589 &self,
20590 name: &windows_core::PCWSTR,
20591 value: &windows_core::PCWSTR,
20592 ) -> windows_core::Result<()>;
20593 fn RemoveHeader(&self, name: &windows_core::PCWSTR) -> windows_core::Result<()>;
20594 fn GetIterator(&self) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
20595}
20596impl ICoreWebView2HttpRequestHeaders_Vtbl {
20597 pub const fn new<Identity: ICoreWebView2HttpRequestHeaders_Impl, const OFFSET: isize>() -> Self
20598 {
20599 unsafe extern "system" fn GetHeader<
20600 Identity: ICoreWebView2HttpRequestHeaders_Impl,
20601 const OFFSET: isize,
20602 >(
20603 this: *mut core::ffi::c_void,
20604 name: windows_core::PCWSTR,
20605 value: *mut windows_core::PWSTR,
20606 ) -> windows_core::HRESULT {
20607 unsafe {
20608 let this: &Identity =
20609 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20610 ICoreWebView2HttpRequestHeaders_Impl::GetHeader(
20611 this,
20612 core::mem::transmute(&name),
20613 core::mem::transmute_copy(&value),
20614 )
20615 .into()
20616 }
20617 }
20618 unsafe extern "system" fn GetHeaders<
20619 Identity: ICoreWebView2HttpRequestHeaders_Impl,
20620 const OFFSET: isize,
20621 >(
20622 this: *mut core::ffi::c_void,
20623 name: windows_core::PCWSTR,
20624 value: *mut *mut core::ffi::c_void,
20625 ) -> windows_core::HRESULT {
20626 unsafe {
20627 let this: &Identity =
20628 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20629 match ICoreWebView2HttpRequestHeaders_Impl::GetHeaders(
20630 this,
20631 core::mem::transmute(&name),
20632 ) {
20633 Ok(ok__) => {
20634 value.write(core::mem::transmute(ok__));
20635 windows_core::HRESULT(0)
20636 }
20637 Err(err) => err.into(),
20638 }
20639 }
20640 }
20641 unsafe extern "system" fn Contains<
20642 Identity: ICoreWebView2HttpRequestHeaders_Impl,
20643 const OFFSET: isize,
20644 >(
20645 this: *mut core::ffi::c_void,
20646 name: windows_core::PCWSTR,
20647 value: *mut windows_core::BOOL,
20648 ) -> windows_core::HRESULT {
20649 unsafe {
20650 let this: &Identity =
20651 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20652 ICoreWebView2HttpRequestHeaders_Impl::Contains(
20653 this,
20654 core::mem::transmute(&name),
20655 core::mem::transmute_copy(&value),
20656 )
20657 .into()
20658 }
20659 }
20660 unsafe extern "system" fn SetHeader<
20661 Identity: ICoreWebView2HttpRequestHeaders_Impl,
20662 const OFFSET: isize,
20663 >(
20664 this: *mut core::ffi::c_void,
20665 name: windows_core::PCWSTR,
20666 value: windows_core::PCWSTR,
20667 ) -> windows_core::HRESULT {
20668 unsafe {
20669 let this: &Identity =
20670 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20671 ICoreWebView2HttpRequestHeaders_Impl::SetHeader(
20672 this,
20673 core::mem::transmute(&name),
20674 core::mem::transmute(&value),
20675 )
20676 .into()
20677 }
20678 }
20679 unsafe extern "system" fn RemoveHeader<
20680 Identity: ICoreWebView2HttpRequestHeaders_Impl,
20681 const OFFSET: isize,
20682 >(
20683 this: *mut core::ffi::c_void,
20684 name: windows_core::PCWSTR,
20685 ) -> windows_core::HRESULT {
20686 unsafe {
20687 let this: &Identity =
20688 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20689 ICoreWebView2HttpRequestHeaders_Impl::RemoveHeader(
20690 this,
20691 core::mem::transmute(&name),
20692 )
20693 .into()
20694 }
20695 }
20696 unsafe extern "system" fn GetIterator<
20697 Identity: ICoreWebView2HttpRequestHeaders_Impl,
20698 const OFFSET: isize,
20699 >(
20700 this: *mut core::ffi::c_void,
20701 value: *mut *mut core::ffi::c_void,
20702 ) -> windows_core::HRESULT {
20703 unsafe {
20704 let this: &Identity =
20705 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20706 match ICoreWebView2HttpRequestHeaders_Impl::GetIterator(this) {
20707 Ok(ok__) => {
20708 value.write(core::mem::transmute(ok__));
20709 windows_core::HRESULT(0)
20710 }
20711 Err(err) => err.into(),
20712 }
20713 }
20714 }
20715 Self {
20716 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20717 GetHeader: GetHeader::<Identity, OFFSET>,
20718 GetHeaders: GetHeaders::<Identity, OFFSET>,
20719 Contains: Contains::<Identity, OFFSET>,
20720 SetHeader: SetHeader::<Identity, OFFSET>,
20721 RemoveHeader: RemoveHeader::<Identity, OFFSET>,
20722 GetIterator: GetIterator::<Identity, OFFSET>,
20723 }
20724 }
20725 pub fn matches(iid: &windows_core::GUID) -> bool {
20726 iid == &<ICoreWebView2HttpRequestHeaders as windows_core::Interface>::IID
20727 }
20728}
20729impl windows_core::RuntimeName for ICoreWebView2HttpRequestHeaders {}
20730windows_core::imp::define_interface!(
20731 ICoreWebView2HttpResponseHeaders,
20732 ICoreWebView2HttpResponseHeaders_Vtbl,
20733 0x03c5ff5a_9b45_4a88_881c_89a9f328619c
20734);
20735windows_core::imp::interface_hierarchy!(ICoreWebView2HttpResponseHeaders, windows_core::IUnknown);
20736impl ICoreWebView2HttpResponseHeaders {
20737 pub unsafe fn AppendHeader<P0, P1>(&self, name: P0, value: P1) -> windows_core::Result<()>
20738 where
20739 P0: windows_core::Param<windows_core::PCWSTR>,
20740 P1: windows_core::Param<windows_core::PCWSTR>,
20741 {
20742 unsafe {
20743 (windows_core::Interface::vtable(self).AppendHeader)(
20744 windows_core::Interface::as_raw(self),
20745 name.param().abi(),
20746 value.param().abi(),
20747 )
20748 .ok()
20749 }
20750 }
20751 pub unsafe fn Contains<P0>(
20752 &self,
20753 name: P0,
20754 value: *mut windows_core::BOOL,
20755 ) -> windows_core::Result<()>
20756 where
20757 P0: windows_core::Param<windows_core::PCWSTR>,
20758 {
20759 unsafe {
20760 (windows_core::Interface::vtable(self).Contains)(
20761 windows_core::Interface::as_raw(self),
20762 name.param().abi(),
20763 value as _,
20764 )
20765 .ok()
20766 }
20767 }
20768 pub unsafe fn GetHeader<P0>(
20769 &self,
20770 name: P0,
20771 value: *mut windows_core::PWSTR,
20772 ) -> windows_core::Result<()>
20773 where
20774 P0: windows_core::Param<windows_core::PCWSTR>,
20775 {
20776 unsafe {
20777 (windows_core::Interface::vtable(self).GetHeader)(
20778 windows_core::Interface::as_raw(self),
20779 name.param().abi(),
20780 value as _,
20781 )
20782 .ok()
20783 }
20784 }
20785 pub unsafe fn GetHeaders<P0>(
20786 &self,
20787 name: P0,
20788 ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>
20789 where
20790 P0: windows_core::Param<windows_core::PCWSTR>,
20791 {
20792 unsafe {
20793 let mut result__ = core::mem::zeroed();
20794 (windows_core::Interface::vtable(self).GetHeaders)(
20795 windows_core::Interface::as_raw(self),
20796 name.param().abi(),
20797 &mut result__,
20798 )
20799 .and_then(|| windows_core::Type::from_abi(result__))
20800 }
20801 }
20802 pub unsafe fn GetIterator(
20803 &self,
20804 ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator> {
20805 unsafe {
20806 let mut result__ = core::mem::zeroed();
20807 (windows_core::Interface::vtable(self).GetIterator)(
20808 windows_core::Interface::as_raw(self),
20809 &mut result__,
20810 )
20811 .and_then(|| windows_core::Type::from_abi(result__))
20812 }
20813 }
20814}
20815#[repr(C)]
20816pub struct ICoreWebView2HttpResponseHeaders_Vtbl {
20817 pub base__: windows_core::IUnknown_Vtbl,
20818 pub AppendHeader: unsafe extern "system" fn(
20819 *mut core::ffi::c_void,
20820 windows_core::PCWSTR,
20821 windows_core::PCWSTR,
20822 ) -> windows_core::HRESULT,
20823 pub Contains: unsafe extern "system" fn(
20824 *mut core::ffi::c_void,
20825 windows_core::PCWSTR,
20826 *mut windows_core::BOOL,
20827 ) -> windows_core::HRESULT,
20828 pub GetHeader: unsafe extern "system" fn(
20829 *mut core::ffi::c_void,
20830 windows_core::PCWSTR,
20831 *mut windows_core::PWSTR,
20832 ) -> windows_core::HRESULT,
20833 pub GetHeaders: unsafe extern "system" fn(
20834 *mut core::ffi::c_void,
20835 windows_core::PCWSTR,
20836 *mut *mut core::ffi::c_void,
20837 ) -> windows_core::HRESULT,
20838 pub GetIterator: unsafe extern "system" fn(
20839 *mut core::ffi::c_void,
20840 *mut *mut core::ffi::c_void,
20841 ) -> windows_core::HRESULT,
20842}
20843pub trait ICoreWebView2HttpResponseHeaders_Impl: windows_core::IUnknownImpl {
20844 fn AppendHeader(
20845 &self,
20846 name: &windows_core::PCWSTR,
20847 value: &windows_core::PCWSTR,
20848 ) -> windows_core::Result<()>;
20849 fn Contains(
20850 &self,
20851 name: &windows_core::PCWSTR,
20852 value: *mut windows_core::BOOL,
20853 ) -> windows_core::Result<()>;
20854 fn GetHeader(
20855 &self,
20856 name: &windows_core::PCWSTR,
20857 value: *mut windows_core::PWSTR,
20858 ) -> windows_core::Result<()>;
20859 fn GetHeaders(
20860 &self,
20861 name: &windows_core::PCWSTR,
20862 ) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
20863 fn GetIterator(&self) -> windows_core::Result<ICoreWebView2HttpHeadersCollectionIterator>;
20864}
20865impl ICoreWebView2HttpResponseHeaders_Vtbl {
20866 pub const fn new<Identity: ICoreWebView2HttpResponseHeaders_Impl, const OFFSET: isize>() -> Self
20867 {
20868 unsafe extern "system" fn AppendHeader<
20869 Identity: ICoreWebView2HttpResponseHeaders_Impl,
20870 const OFFSET: isize,
20871 >(
20872 this: *mut core::ffi::c_void,
20873 name: windows_core::PCWSTR,
20874 value: windows_core::PCWSTR,
20875 ) -> windows_core::HRESULT {
20876 unsafe {
20877 let this: &Identity =
20878 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20879 ICoreWebView2HttpResponseHeaders_Impl::AppendHeader(
20880 this,
20881 core::mem::transmute(&name),
20882 core::mem::transmute(&value),
20883 )
20884 .into()
20885 }
20886 }
20887 unsafe extern "system" fn Contains<
20888 Identity: ICoreWebView2HttpResponseHeaders_Impl,
20889 const OFFSET: isize,
20890 >(
20891 this: *mut core::ffi::c_void,
20892 name: windows_core::PCWSTR,
20893 value: *mut windows_core::BOOL,
20894 ) -> windows_core::HRESULT {
20895 unsafe {
20896 let this: &Identity =
20897 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20898 ICoreWebView2HttpResponseHeaders_Impl::Contains(
20899 this,
20900 core::mem::transmute(&name),
20901 core::mem::transmute_copy(&value),
20902 )
20903 .into()
20904 }
20905 }
20906 unsafe extern "system" fn GetHeader<
20907 Identity: ICoreWebView2HttpResponseHeaders_Impl,
20908 const OFFSET: isize,
20909 >(
20910 this: *mut core::ffi::c_void,
20911 name: windows_core::PCWSTR,
20912 value: *mut windows_core::PWSTR,
20913 ) -> windows_core::HRESULT {
20914 unsafe {
20915 let this: &Identity =
20916 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20917 ICoreWebView2HttpResponseHeaders_Impl::GetHeader(
20918 this,
20919 core::mem::transmute(&name),
20920 core::mem::transmute_copy(&value),
20921 )
20922 .into()
20923 }
20924 }
20925 unsafe extern "system" fn GetHeaders<
20926 Identity: ICoreWebView2HttpResponseHeaders_Impl,
20927 const OFFSET: isize,
20928 >(
20929 this: *mut core::ffi::c_void,
20930 name: windows_core::PCWSTR,
20931 value: *mut *mut core::ffi::c_void,
20932 ) -> windows_core::HRESULT {
20933 unsafe {
20934 let this: &Identity =
20935 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20936 match ICoreWebView2HttpResponseHeaders_Impl::GetHeaders(
20937 this,
20938 core::mem::transmute(&name),
20939 ) {
20940 Ok(ok__) => {
20941 value.write(core::mem::transmute(ok__));
20942 windows_core::HRESULT(0)
20943 }
20944 Err(err) => err.into(),
20945 }
20946 }
20947 }
20948 unsafe extern "system" fn GetIterator<
20949 Identity: ICoreWebView2HttpResponseHeaders_Impl,
20950 const OFFSET: isize,
20951 >(
20952 this: *mut core::ffi::c_void,
20953 value: *mut *mut core::ffi::c_void,
20954 ) -> windows_core::HRESULT {
20955 unsafe {
20956 let this: &Identity =
20957 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
20958 match ICoreWebView2HttpResponseHeaders_Impl::GetIterator(this) {
20959 Ok(ok__) => {
20960 value.write(core::mem::transmute(ok__));
20961 windows_core::HRESULT(0)
20962 }
20963 Err(err) => err.into(),
20964 }
20965 }
20966 }
20967 Self {
20968 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
20969 AppendHeader: AppendHeader::<Identity, OFFSET>,
20970 Contains: Contains::<Identity, OFFSET>,
20971 GetHeader: GetHeader::<Identity, OFFSET>,
20972 GetHeaders: GetHeaders::<Identity, OFFSET>,
20973 GetIterator: GetIterator::<Identity, OFFSET>,
20974 }
20975 }
20976 pub fn matches(iid: &windows_core::GUID) -> bool {
20977 iid == &<ICoreWebView2HttpResponseHeaders as windows_core::Interface>::IID
20978 }
20979}
20980impl windows_core::RuntimeName for ICoreWebView2HttpResponseHeaders {}
20981windows_core::imp::define_interface!(
20982 ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler,
20983 ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl,
20984 0x3117da26_ae13_438d_bd46_edbeb2c4ce81
20985);
20986windows_core::imp::interface_hierarchy!(
20987 ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler,
20988 windows_core::IUnknown
20989);
20990impl ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {
20991 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
20992 where
20993 P0: windows_core::Param<ICoreWebView2>,
20994 P1: windows_core::Param<windows_core::IUnknown>,
20995 {
20996 unsafe {
20997 (windows_core::Interface::vtable(self).Invoke)(
20998 windows_core::Interface::as_raw(self),
20999 sender.param().abi(),
21000 args.param().abi(),
21001 )
21002 .ok()
21003 }
21004 }
21005}
21006#[repr(C)]
21007pub struct ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
21008 pub base__: windows_core::IUnknown_Vtbl,
21009 pub Invoke: unsafe extern "system" fn(
21010 *mut core::ffi::c_void,
21011 *mut core::ffi::c_void,
21012 *mut core::ffi::c_void,
21013 ) -> windows_core::HRESULT,
21014}
21015pub trait ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl:
21016 windows_core::IUnknownImpl
21017{
21018 fn Invoke(
21019 &self,
21020 sender: windows_core::Ref<'_, ICoreWebView2>,
21021 args: windows_core::Ref<'_, windows_core::IUnknown>,
21022 ) -> windows_core::Result<()>;
21023}
21024impl ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Vtbl {
21025 pub const fn new<
21026 Identity: ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl,
21027 const OFFSET: isize,
21028 >() -> Self {
21029 unsafe extern "system" fn Invoke<
21030 Identity: ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl,
21031 const OFFSET: isize,
21032 >(
21033 this: *mut core::ffi::c_void,
21034 sender: *mut core::ffi::c_void,
21035 args: *mut core::ffi::c_void,
21036 ) -> windows_core::HRESULT {
21037 unsafe {
21038 let this: &Identity =
21039 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21040 ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler_Impl::Invoke(
21041 this,
21042 core::mem::transmute_copy(&sender),
21043 core::mem::transmute_copy(&args),
21044 )
21045 .into()
21046 }
21047 }
21048 Self {
21049 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21050 Invoke: Invoke::<Identity, OFFSET>,
21051 }
21052 }
21053 pub fn matches(iid: &windows_core::GUID) -> bool {
21054 iid == & < ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler as windows_core::Interface >::IID
21055 }
21056}
21057impl windows_core::RuntimeName for ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler {}
21058windows_core::imp::define_interface!(
21059 ICoreWebView2IsDocumentPlayingAudioChangedEventHandler,
21060 ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl,
21061 0x5def109a_2f4b_49fa_b7f6_11c39e513328
21062);
21063windows_core::imp::interface_hierarchy!(
21064 ICoreWebView2IsDocumentPlayingAudioChangedEventHandler,
21065 windows_core::IUnknown
21066);
21067impl ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {
21068 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
21069 where
21070 P0: windows_core::Param<ICoreWebView2>,
21071 P1: windows_core::Param<windows_core::IUnknown>,
21072 {
21073 unsafe {
21074 (windows_core::Interface::vtable(self).Invoke)(
21075 windows_core::Interface::as_raw(self),
21076 sender.param().abi(),
21077 args.param().abi(),
21078 )
21079 .ok()
21080 }
21081 }
21082}
21083#[repr(C)]
21084pub struct ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
21085 pub base__: windows_core::IUnknown_Vtbl,
21086 pub Invoke: unsafe extern "system" fn(
21087 *mut core::ffi::c_void,
21088 *mut core::ffi::c_void,
21089 *mut core::ffi::c_void,
21090 ) -> windows_core::HRESULT,
21091}
21092pub trait ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl:
21093 windows_core::IUnknownImpl
21094{
21095 fn Invoke(
21096 &self,
21097 sender: windows_core::Ref<'_, ICoreWebView2>,
21098 args: windows_core::Ref<'_, windows_core::IUnknown>,
21099 ) -> windows_core::Result<()>;
21100}
21101impl ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Vtbl {
21102 pub const fn new<
21103 Identity: ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl,
21104 const OFFSET: isize,
21105 >() -> Self {
21106 unsafe extern "system" fn Invoke<
21107 Identity: ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl,
21108 const OFFSET: isize,
21109 >(
21110 this: *mut core::ffi::c_void,
21111 sender: *mut core::ffi::c_void,
21112 args: *mut core::ffi::c_void,
21113 ) -> windows_core::HRESULT {
21114 unsafe {
21115 let this: &Identity =
21116 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21117 ICoreWebView2IsDocumentPlayingAudioChangedEventHandler_Impl::Invoke(
21118 this,
21119 core::mem::transmute_copy(&sender),
21120 core::mem::transmute_copy(&args),
21121 )
21122 .into()
21123 }
21124 }
21125 Self {
21126 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21127 Invoke: Invoke::<Identity, OFFSET>,
21128 }
21129 }
21130 pub fn matches(iid: &windows_core::GUID) -> bool {
21131 iid == & < ICoreWebView2IsDocumentPlayingAudioChangedEventHandler as windows_core::Interface >::IID
21132 }
21133}
21134impl windows_core::RuntimeName for ICoreWebView2IsDocumentPlayingAudioChangedEventHandler {}
21135windows_core::imp::define_interface!(
21136 ICoreWebView2IsMutedChangedEventHandler,
21137 ICoreWebView2IsMutedChangedEventHandler_Vtbl,
21138 0x57d90347_cd0e_4952_a4a2_7483a2756f08
21139);
21140windows_core::imp::interface_hierarchy!(
21141 ICoreWebView2IsMutedChangedEventHandler,
21142 windows_core::IUnknown
21143);
21144impl ICoreWebView2IsMutedChangedEventHandler {
21145 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
21146 where
21147 P0: windows_core::Param<ICoreWebView2>,
21148 P1: windows_core::Param<windows_core::IUnknown>,
21149 {
21150 unsafe {
21151 (windows_core::Interface::vtable(self).Invoke)(
21152 windows_core::Interface::as_raw(self),
21153 sender.param().abi(),
21154 args.param().abi(),
21155 )
21156 .ok()
21157 }
21158 }
21159}
21160#[repr(C)]
21161pub struct ICoreWebView2IsMutedChangedEventHandler_Vtbl {
21162 pub base__: windows_core::IUnknown_Vtbl,
21163 pub Invoke: unsafe extern "system" fn(
21164 *mut core::ffi::c_void,
21165 *mut core::ffi::c_void,
21166 *mut core::ffi::c_void,
21167 ) -> windows_core::HRESULT,
21168}
21169pub trait ICoreWebView2IsMutedChangedEventHandler_Impl: windows_core::IUnknownImpl {
21170 fn Invoke(
21171 &self,
21172 sender: windows_core::Ref<'_, ICoreWebView2>,
21173 args: windows_core::Ref<'_, windows_core::IUnknown>,
21174 ) -> windows_core::Result<()>;
21175}
21176impl ICoreWebView2IsMutedChangedEventHandler_Vtbl {
21177 pub const fn new<
21178 Identity: ICoreWebView2IsMutedChangedEventHandler_Impl,
21179 const OFFSET: isize,
21180 >() -> Self {
21181 unsafe extern "system" fn Invoke<
21182 Identity: ICoreWebView2IsMutedChangedEventHandler_Impl,
21183 const OFFSET: isize,
21184 >(
21185 this: *mut core::ffi::c_void,
21186 sender: *mut core::ffi::c_void,
21187 args: *mut core::ffi::c_void,
21188 ) -> windows_core::HRESULT {
21189 unsafe {
21190 let this: &Identity =
21191 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21192 ICoreWebView2IsMutedChangedEventHandler_Impl::Invoke(
21193 this,
21194 core::mem::transmute_copy(&sender),
21195 core::mem::transmute_copy(&args),
21196 )
21197 .into()
21198 }
21199 }
21200 Self {
21201 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21202 Invoke: Invoke::<Identity, OFFSET>,
21203 }
21204 }
21205 pub fn matches(iid: &windows_core::GUID) -> bool {
21206 iid == &<ICoreWebView2IsMutedChangedEventHandler as windows_core::Interface>::IID
21207 }
21208}
21209impl windows_core::RuntimeName for ICoreWebView2IsMutedChangedEventHandler {}
21210windows_core::imp::define_interface!(
21211 ICoreWebView2LaunchingExternalUriSchemeEventArgs,
21212 ICoreWebView2LaunchingExternalUriSchemeEventArgs_Vtbl,
21213 0x07d1a6c3_7175_4ba1_9306_e593ca07e46c
21214);
21215windows_core::imp::interface_hierarchy!(
21216 ICoreWebView2LaunchingExternalUriSchemeEventArgs,
21217 windows_core::IUnknown
21218);
21219impl ICoreWebView2LaunchingExternalUriSchemeEventArgs {
21220 pub unsafe fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
21221 unsafe {
21222 (windows_core::Interface::vtable(self).Uri)(
21223 windows_core::Interface::as_raw(self),
21224 value as _,
21225 )
21226 .ok()
21227 }
21228 }
21229 pub unsafe fn InitiatingOrigin(
21230 &self,
21231 value: *mut windows_core::PWSTR,
21232 ) -> windows_core::Result<()> {
21233 unsafe {
21234 (windows_core::Interface::vtable(self).InitiatingOrigin)(
21235 windows_core::Interface::as_raw(self),
21236 value as _,
21237 )
21238 .ok()
21239 }
21240 }
21241 pub unsafe fn IsUserInitiated(
21242 &self,
21243 value: *mut windows_core::BOOL,
21244 ) -> windows_core::Result<()> {
21245 unsafe {
21246 (windows_core::Interface::vtable(self).IsUserInitiated)(
21247 windows_core::Interface::as_raw(self),
21248 value as _,
21249 )
21250 .ok()
21251 }
21252 }
21253 pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
21254 unsafe {
21255 (windows_core::Interface::vtable(self).Cancel)(
21256 windows_core::Interface::as_raw(self),
21257 value as _,
21258 )
21259 .ok()
21260 }
21261 }
21262 pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
21263 unsafe {
21264 (windows_core::Interface::vtable(self).SetCancel)(
21265 windows_core::Interface::as_raw(self),
21266 value.into(),
21267 )
21268 .ok()
21269 }
21270 }
21271 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
21272 unsafe {
21273 let mut result__ = core::mem::zeroed();
21274 (windows_core::Interface::vtable(self).GetDeferral)(
21275 windows_core::Interface::as_raw(self),
21276 &mut result__,
21277 )
21278 .and_then(|| windows_core::Type::from_abi(result__))
21279 }
21280 }
21281}
21282#[repr(C)]
21283pub struct ICoreWebView2LaunchingExternalUriSchemeEventArgs_Vtbl {
21284 pub base__: windows_core::IUnknown_Vtbl,
21285 pub Uri: unsafe extern "system" fn(
21286 *mut core::ffi::c_void,
21287 *mut windows_core::PWSTR,
21288 ) -> windows_core::HRESULT,
21289 pub InitiatingOrigin: unsafe extern "system" fn(
21290 *mut core::ffi::c_void,
21291 *mut windows_core::PWSTR,
21292 ) -> windows_core::HRESULT,
21293 pub IsUserInitiated: unsafe extern "system" fn(
21294 *mut core::ffi::c_void,
21295 *mut windows_core::BOOL,
21296 ) -> windows_core::HRESULT,
21297 pub Cancel: unsafe extern "system" fn(
21298 *mut core::ffi::c_void,
21299 *mut windows_core::BOOL,
21300 ) -> windows_core::HRESULT,
21301 pub SetCancel: unsafe extern "system" fn(
21302 *mut core::ffi::c_void,
21303 windows_core::BOOL,
21304 ) -> windows_core::HRESULT,
21305 pub GetDeferral: unsafe extern "system" fn(
21306 *mut core::ffi::c_void,
21307 *mut *mut core::ffi::c_void,
21308 ) -> windows_core::HRESULT,
21309}
21310pub trait ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl:
21311 windows_core::IUnknownImpl
21312{
21313 fn Uri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
21314 fn InitiatingOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
21315 fn IsUserInitiated(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
21316 fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
21317 fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
21318 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
21319}
21320impl ICoreWebView2LaunchingExternalUriSchemeEventArgs_Vtbl {
21321 pub const fn new<
21322 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21323 const OFFSET: isize,
21324 >() -> Self {
21325 unsafe extern "system" fn Uri<
21326 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21327 const OFFSET: isize,
21328 >(
21329 this: *mut core::ffi::c_void,
21330 value: *mut windows_core::PWSTR,
21331 ) -> windows_core::HRESULT {
21332 unsafe {
21333 let this: &Identity =
21334 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21335 ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::Uri(
21336 this,
21337 core::mem::transmute_copy(&value),
21338 )
21339 .into()
21340 }
21341 }
21342 unsafe extern "system" fn InitiatingOrigin<
21343 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21344 const OFFSET: isize,
21345 >(
21346 this: *mut core::ffi::c_void,
21347 value: *mut windows_core::PWSTR,
21348 ) -> windows_core::HRESULT {
21349 unsafe {
21350 let this: &Identity =
21351 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21352 ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::InitiatingOrigin(
21353 this,
21354 core::mem::transmute_copy(&value),
21355 )
21356 .into()
21357 }
21358 }
21359 unsafe extern "system" fn IsUserInitiated<
21360 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21361 const OFFSET: isize,
21362 >(
21363 this: *mut core::ffi::c_void,
21364 value: *mut windows_core::BOOL,
21365 ) -> windows_core::HRESULT {
21366 unsafe {
21367 let this: &Identity =
21368 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21369 ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::IsUserInitiated(
21370 this,
21371 core::mem::transmute_copy(&value),
21372 )
21373 .into()
21374 }
21375 }
21376 unsafe extern "system" fn Cancel<
21377 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21378 const OFFSET: isize,
21379 >(
21380 this: *mut core::ffi::c_void,
21381 value: *mut windows_core::BOOL,
21382 ) -> windows_core::HRESULT {
21383 unsafe {
21384 let this: &Identity =
21385 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21386 ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::Cancel(
21387 this,
21388 core::mem::transmute_copy(&value),
21389 )
21390 .into()
21391 }
21392 }
21393 unsafe extern "system" fn SetCancel<
21394 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21395 const OFFSET: isize,
21396 >(
21397 this: *mut core::ffi::c_void,
21398 value: windows_core::BOOL,
21399 ) -> windows_core::HRESULT {
21400 unsafe {
21401 let this: &Identity =
21402 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21403 ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::SetCancel(
21404 this,
21405 core::mem::transmute_copy(&value),
21406 )
21407 .into()
21408 }
21409 }
21410 unsafe extern "system" fn GetDeferral<
21411 Identity: ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl,
21412 const OFFSET: isize,
21413 >(
21414 this: *mut core::ffi::c_void,
21415 value: *mut *mut core::ffi::c_void,
21416 ) -> windows_core::HRESULT {
21417 unsafe {
21418 let this: &Identity =
21419 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21420 match ICoreWebView2LaunchingExternalUriSchemeEventArgs_Impl::GetDeferral(this) {
21421 Ok(ok__) => {
21422 value.write(core::mem::transmute(ok__));
21423 windows_core::HRESULT(0)
21424 }
21425 Err(err) => err.into(),
21426 }
21427 }
21428 }
21429 Self {
21430 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21431 Uri: Uri::<Identity, OFFSET>,
21432 InitiatingOrigin: InitiatingOrigin::<Identity, OFFSET>,
21433 IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
21434 Cancel: Cancel::<Identity, OFFSET>,
21435 SetCancel: SetCancel::<Identity, OFFSET>,
21436 GetDeferral: GetDeferral::<Identity, OFFSET>,
21437 }
21438 }
21439 pub fn matches(iid: &windows_core::GUID) -> bool {
21440 iid == &<ICoreWebView2LaunchingExternalUriSchemeEventArgs as windows_core::Interface>::IID
21441 }
21442}
21443impl windows_core::RuntimeName for ICoreWebView2LaunchingExternalUriSchemeEventArgs {}
21444windows_core::imp::define_interface!(
21445 ICoreWebView2LaunchingExternalUriSchemeEventHandler,
21446 ICoreWebView2LaunchingExternalUriSchemeEventHandler_Vtbl,
21447 0x74f712e0_8165_43a9_a13f_0cce597e75df
21448);
21449windows_core::imp::interface_hierarchy!(
21450 ICoreWebView2LaunchingExternalUriSchemeEventHandler,
21451 windows_core::IUnknown
21452);
21453impl ICoreWebView2LaunchingExternalUriSchemeEventHandler {
21454 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
21455 where
21456 P0: windows_core::Param<ICoreWebView2>,
21457 P1: windows_core::Param<ICoreWebView2LaunchingExternalUriSchemeEventArgs>,
21458 {
21459 unsafe {
21460 (windows_core::Interface::vtable(self).Invoke)(
21461 windows_core::Interface::as_raw(self),
21462 sender.param().abi(),
21463 args.param().abi(),
21464 )
21465 .ok()
21466 }
21467 }
21468}
21469#[repr(C)]
21470pub struct ICoreWebView2LaunchingExternalUriSchemeEventHandler_Vtbl {
21471 pub base__: windows_core::IUnknown_Vtbl,
21472 pub Invoke: unsafe extern "system" fn(
21473 *mut core::ffi::c_void,
21474 *mut core::ffi::c_void,
21475 *mut core::ffi::c_void,
21476 ) -> windows_core::HRESULT,
21477}
21478pub trait ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl:
21479 windows_core::IUnknownImpl
21480{
21481 fn Invoke(
21482 &self,
21483 sender: windows_core::Ref<'_, ICoreWebView2>,
21484 args: windows_core::Ref<'_, ICoreWebView2LaunchingExternalUriSchemeEventArgs>,
21485 ) -> windows_core::Result<()>;
21486}
21487impl ICoreWebView2LaunchingExternalUriSchemeEventHandler_Vtbl {
21488 pub const fn new<
21489 Identity: ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl,
21490 const OFFSET: isize,
21491 >() -> Self {
21492 unsafe extern "system" fn Invoke<
21493 Identity: ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl,
21494 const OFFSET: isize,
21495 >(
21496 this: *mut core::ffi::c_void,
21497 sender: *mut core::ffi::c_void,
21498 args: *mut core::ffi::c_void,
21499 ) -> windows_core::HRESULT {
21500 unsafe {
21501 let this: &Identity =
21502 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21503 ICoreWebView2LaunchingExternalUriSchemeEventHandler_Impl::Invoke(
21504 this,
21505 core::mem::transmute_copy(&sender),
21506 core::mem::transmute_copy(&args),
21507 )
21508 .into()
21509 }
21510 }
21511 Self {
21512 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21513 Invoke: Invoke::<Identity, OFFSET>,
21514 }
21515 }
21516 pub fn matches(iid: &windows_core::GUID) -> bool {
21517 iid == & < ICoreWebView2LaunchingExternalUriSchemeEventHandler as windows_core::Interface >::IID
21518 }
21519}
21520impl windows_core::RuntimeName for ICoreWebView2LaunchingExternalUriSchemeEventHandler {}
21521windows_core::imp::define_interface!(
21522 ICoreWebView2MoveFocusRequestedEventArgs,
21523 ICoreWebView2MoveFocusRequestedEventArgs_Vtbl,
21524 0x2d6aa13b_3839_4a15_92fc_d88b3c0d9c9d
21525);
21526windows_core::imp::interface_hierarchy!(
21527 ICoreWebView2MoveFocusRequestedEventArgs,
21528 windows_core::IUnknown
21529);
21530impl ICoreWebView2MoveFocusRequestedEventArgs {
21531 pub unsafe fn Reason(
21532 &self,
21533 reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
21534 ) -> windows_core::Result<()> {
21535 unsafe {
21536 (windows_core::Interface::vtable(self).Reason)(
21537 windows_core::Interface::as_raw(self),
21538 reason as _,
21539 )
21540 .ok()
21541 }
21542 }
21543 pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
21544 unsafe {
21545 (windows_core::Interface::vtable(self).Handled)(
21546 windows_core::Interface::as_raw(self),
21547 value as _,
21548 )
21549 .ok()
21550 }
21551 }
21552 pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
21553 unsafe {
21554 (windows_core::Interface::vtable(self).SetHandled)(
21555 windows_core::Interface::as_raw(self),
21556 value.into(),
21557 )
21558 .ok()
21559 }
21560 }
21561}
21562#[repr(C)]
21563pub struct ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
21564 pub base__: windows_core::IUnknown_Vtbl,
21565 pub Reason: unsafe extern "system" fn(
21566 *mut core::ffi::c_void,
21567 *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
21568 ) -> windows_core::HRESULT,
21569 pub Handled: unsafe extern "system" fn(
21570 *mut core::ffi::c_void,
21571 *mut windows_core::BOOL,
21572 ) -> windows_core::HRESULT,
21573 pub SetHandled: unsafe extern "system" fn(
21574 *mut core::ffi::c_void,
21575 windows_core::BOOL,
21576 ) -> windows_core::HRESULT,
21577}
21578pub trait ICoreWebView2MoveFocusRequestedEventArgs_Impl: windows_core::IUnknownImpl {
21579 fn Reason(&self, reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON) -> windows_core::Result<()>;
21580 fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
21581 fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
21582}
21583impl ICoreWebView2MoveFocusRequestedEventArgs_Vtbl {
21584 pub const fn new<
21585 Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
21586 const OFFSET: isize,
21587 >() -> Self {
21588 unsafe extern "system" fn Reason<
21589 Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
21590 const OFFSET: isize,
21591 >(
21592 this: *mut core::ffi::c_void,
21593 reason: *mut COREWEBVIEW2_MOVE_FOCUS_REASON,
21594 ) -> windows_core::HRESULT {
21595 unsafe {
21596 let this: &Identity =
21597 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21598 ICoreWebView2MoveFocusRequestedEventArgs_Impl::Reason(
21599 this,
21600 core::mem::transmute_copy(&reason),
21601 )
21602 .into()
21603 }
21604 }
21605 unsafe extern "system" fn Handled<
21606 Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
21607 const OFFSET: isize,
21608 >(
21609 this: *mut core::ffi::c_void,
21610 value: *mut windows_core::BOOL,
21611 ) -> windows_core::HRESULT {
21612 unsafe {
21613 let this: &Identity =
21614 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21615 ICoreWebView2MoveFocusRequestedEventArgs_Impl::Handled(
21616 this,
21617 core::mem::transmute_copy(&value),
21618 )
21619 .into()
21620 }
21621 }
21622 unsafe extern "system" fn SetHandled<
21623 Identity: ICoreWebView2MoveFocusRequestedEventArgs_Impl,
21624 const OFFSET: isize,
21625 >(
21626 this: *mut core::ffi::c_void,
21627 value: windows_core::BOOL,
21628 ) -> windows_core::HRESULT {
21629 unsafe {
21630 let this: &Identity =
21631 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21632 ICoreWebView2MoveFocusRequestedEventArgs_Impl::SetHandled(
21633 this,
21634 core::mem::transmute_copy(&value),
21635 )
21636 .into()
21637 }
21638 }
21639 Self {
21640 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21641 Reason: Reason::<Identity, OFFSET>,
21642 Handled: Handled::<Identity, OFFSET>,
21643 SetHandled: SetHandled::<Identity, OFFSET>,
21644 }
21645 }
21646 pub fn matches(iid: &windows_core::GUID) -> bool {
21647 iid == &<ICoreWebView2MoveFocusRequestedEventArgs as windows_core::Interface>::IID
21648 }
21649}
21650impl windows_core::RuntimeName for ICoreWebView2MoveFocusRequestedEventArgs {}
21651windows_core::imp::define_interface!(
21652 ICoreWebView2MoveFocusRequestedEventHandler,
21653 ICoreWebView2MoveFocusRequestedEventHandler_Vtbl,
21654 0x69035451_6dc7_4cb8_9bce_b2bd70ad289f
21655);
21656windows_core::imp::interface_hierarchy!(
21657 ICoreWebView2MoveFocusRequestedEventHandler,
21658 windows_core::IUnknown
21659);
21660impl ICoreWebView2MoveFocusRequestedEventHandler {
21661 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
21662 where
21663 P0: windows_core::Param<ICoreWebView2Controller>,
21664 P1: windows_core::Param<ICoreWebView2MoveFocusRequestedEventArgs>,
21665 {
21666 unsafe {
21667 (windows_core::Interface::vtable(self).Invoke)(
21668 windows_core::Interface::as_raw(self),
21669 sender.param().abi(),
21670 args.param().abi(),
21671 )
21672 .ok()
21673 }
21674 }
21675}
21676#[repr(C)]
21677pub struct ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
21678 pub base__: windows_core::IUnknown_Vtbl,
21679 pub Invoke: unsafe extern "system" fn(
21680 *mut core::ffi::c_void,
21681 *mut core::ffi::c_void,
21682 *mut core::ffi::c_void,
21683 ) -> windows_core::HRESULT,
21684}
21685pub trait ICoreWebView2MoveFocusRequestedEventHandler_Impl: windows_core::IUnknownImpl {
21686 fn Invoke(
21687 &self,
21688 sender: windows_core::Ref<'_, ICoreWebView2Controller>,
21689 args: windows_core::Ref<'_, ICoreWebView2MoveFocusRequestedEventArgs>,
21690 ) -> windows_core::Result<()>;
21691}
21692impl ICoreWebView2MoveFocusRequestedEventHandler_Vtbl {
21693 pub const fn new<
21694 Identity: ICoreWebView2MoveFocusRequestedEventHandler_Impl,
21695 const OFFSET: isize,
21696 >() -> Self {
21697 unsafe extern "system" fn Invoke<
21698 Identity: ICoreWebView2MoveFocusRequestedEventHandler_Impl,
21699 const OFFSET: isize,
21700 >(
21701 this: *mut core::ffi::c_void,
21702 sender: *mut core::ffi::c_void,
21703 args: *mut core::ffi::c_void,
21704 ) -> windows_core::HRESULT {
21705 unsafe {
21706 let this: &Identity =
21707 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21708 ICoreWebView2MoveFocusRequestedEventHandler_Impl::Invoke(
21709 this,
21710 core::mem::transmute_copy(&sender),
21711 core::mem::transmute_copy(&args),
21712 )
21713 .into()
21714 }
21715 }
21716 Self {
21717 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21718 Invoke: Invoke::<Identity, OFFSET>,
21719 }
21720 }
21721 pub fn matches(iid: &windows_core::GUID) -> bool {
21722 iid == &<ICoreWebView2MoveFocusRequestedEventHandler as windows_core::Interface>::IID
21723 }
21724}
21725impl windows_core::RuntimeName for ICoreWebView2MoveFocusRequestedEventHandler {}
21726windows_core::imp::define_interface!(
21727 ICoreWebView2NavigationCompletedEventArgs,
21728 ICoreWebView2NavigationCompletedEventArgs_Vtbl,
21729 0x30d68b7d_20d9_4752_a9ca_ec8448fbb5c1
21730);
21731windows_core::imp::interface_hierarchy!(
21732 ICoreWebView2NavigationCompletedEventArgs,
21733 windows_core::IUnknown
21734);
21735impl ICoreWebView2NavigationCompletedEventArgs {
21736 pub unsafe fn IsSuccess(&self, issuccess: *mut windows_core::BOOL) -> windows_core::Result<()> {
21737 unsafe {
21738 (windows_core::Interface::vtable(self).IsSuccess)(
21739 windows_core::Interface::as_raw(self),
21740 issuccess as _,
21741 )
21742 .ok()
21743 }
21744 }
21745 pub unsafe fn WebErrorStatus(
21746 &self,
21747 weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
21748 ) -> windows_core::Result<()> {
21749 unsafe {
21750 (windows_core::Interface::vtable(self).WebErrorStatus)(
21751 windows_core::Interface::as_raw(self),
21752 weberrorstatus as _,
21753 )
21754 .ok()
21755 }
21756 }
21757 pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()> {
21758 unsafe {
21759 (windows_core::Interface::vtable(self).NavigationId)(
21760 windows_core::Interface::as_raw(self),
21761 navigationid as _,
21762 )
21763 .ok()
21764 }
21765 }
21766}
21767#[repr(C)]
21768pub struct ICoreWebView2NavigationCompletedEventArgs_Vtbl {
21769 pub base__: windows_core::IUnknown_Vtbl,
21770 pub IsSuccess: unsafe extern "system" fn(
21771 *mut core::ffi::c_void,
21772 *mut windows_core::BOOL,
21773 ) -> windows_core::HRESULT,
21774 pub WebErrorStatus: unsafe extern "system" fn(
21775 *mut core::ffi::c_void,
21776 *mut COREWEBVIEW2_WEB_ERROR_STATUS,
21777 ) -> windows_core::HRESULT,
21778 pub NavigationId:
21779 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
21780}
21781pub trait ICoreWebView2NavigationCompletedEventArgs_Impl: windows_core::IUnknownImpl {
21782 fn IsSuccess(&self, issuccess: *mut windows_core::BOOL) -> windows_core::Result<()>;
21783 fn WebErrorStatus(
21784 &self,
21785 weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
21786 ) -> windows_core::Result<()>;
21787 fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()>;
21788}
21789impl ICoreWebView2NavigationCompletedEventArgs_Vtbl {
21790 pub const fn new<
21791 Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
21792 const OFFSET: isize,
21793 >() -> Self {
21794 unsafe extern "system" fn IsSuccess<
21795 Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
21796 const OFFSET: isize,
21797 >(
21798 this: *mut core::ffi::c_void,
21799 issuccess: *mut windows_core::BOOL,
21800 ) -> windows_core::HRESULT {
21801 unsafe {
21802 let this: &Identity =
21803 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21804 ICoreWebView2NavigationCompletedEventArgs_Impl::IsSuccess(
21805 this,
21806 core::mem::transmute_copy(&issuccess),
21807 )
21808 .into()
21809 }
21810 }
21811 unsafe extern "system" fn WebErrorStatus<
21812 Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
21813 const OFFSET: isize,
21814 >(
21815 this: *mut core::ffi::c_void,
21816 weberrorstatus: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
21817 ) -> windows_core::HRESULT {
21818 unsafe {
21819 let this: &Identity =
21820 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21821 ICoreWebView2NavigationCompletedEventArgs_Impl::WebErrorStatus(
21822 this,
21823 core::mem::transmute_copy(&weberrorstatus),
21824 )
21825 .into()
21826 }
21827 }
21828 unsafe extern "system" fn NavigationId<
21829 Identity: ICoreWebView2NavigationCompletedEventArgs_Impl,
21830 const OFFSET: isize,
21831 >(
21832 this: *mut core::ffi::c_void,
21833 navigationid: *mut u64,
21834 ) -> windows_core::HRESULT {
21835 unsafe {
21836 let this: &Identity =
21837 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21838 ICoreWebView2NavigationCompletedEventArgs_Impl::NavigationId(
21839 this,
21840 core::mem::transmute_copy(&navigationid),
21841 )
21842 .into()
21843 }
21844 }
21845 Self {
21846 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21847 IsSuccess: IsSuccess::<Identity, OFFSET>,
21848 WebErrorStatus: WebErrorStatus::<Identity, OFFSET>,
21849 NavigationId: NavigationId::<Identity, OFFSET>,
21850 }
21851 }
21852 pub fn matches(iid: &windows_core::GUID) -> bool {
21853 iid == &<ICoreWebView2NavigationCompletedEventArgs as windows_core::Interface>::IID
21854 }
21855}
21856impl windows_core::RuntimeName for ICoreWebView2NavigationCompletedEventArgs {}
21857windows_core::imp::define_interface!(
21858 ICoreWebView2NavigationCompletedEventArgs2,
21859 ICoreWebView2NavigationCompletedEventArgs2_Vtbl,
21860 0xfdf8b738_ee1e_4db2_a329_8d7d7b74d792
21861);
21862impl core::ops::Deref for ICoreWebView2NavigationCompletedEventArgs2 {
21863 type Target = ICoreWebView2NavigationCompletedEventArgs;
21864 fn deref(&self) -> &Self::Target {
21865 unsafe { core::mem::transmute(self) }
21866 }
21867}
21868windows_core::imp::interface_hierarchy!(
21869 ICoreWebView2NavigationCompletedEventArgs2,
21870 windows_core::IUnknown,
21871 ICoreWebView2NavigationCompletedEventArgs
21872);
21873impl ICoreWebView2NavigationCompletedEventArgs2 {
21874 pub unsafe fn HttpStatusCode(&self, value: *mut i32) -> windows_core::Result<()> {
21875 unsafe {
21876 (windows_core::Interface::vtable(self).HttpStatusCode)(
21877 windows_core::Interface::as_raw(self),
21878 value as _,
21879 )
21880 .ok()
21881 }
21882 }
21883}
21884#[repr(C)]
21885pub struct ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
21886 pub base__: ICoreWebView2NavigationCompletedEventArgs_Vtbl,
21887 pub HttpStatusCode:
21888 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
21889}
21890pub trait ICoreWebView2NavigationCompletedEventArgs2_Impl:
21891 ICoreWebView2NavigationCompletedEventArgs_Impl
21892{
21893 fn HttpStatusCode(&self, value: *mut i32) -> windows_core::Result<()>;
21894}
21895impl ICoreWebView2NavigationCompletedEventArgs2_Vtbl {
21896 pub const fn new<
21897 Identity: ICoreWebView2NavigationCompletedEventArgs2_Impl,
21898 const OFFSET: isize,
21899 >() -> Self {
21900 unsafe extern "system" fn HttpStatusCode<
21901 Identity: ICoreWebView2NavigationCompletedEventArgs2_Impl,
21902 const OFFSET: isize,
21903 >(
21904 this: *mut core::ffi::c_void,
21905 value: *mut i32,
21906 ) -> windows_core::HRESULT {
21907 unsafe {
21908 let this: &Identity =
21909 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21910 ICoreWebView2NavigationCompletedEventArgs2_Impl::HttpStatusCode(
21911 this,
21912 core::mem::transmute_copy(&value),
21913 )
21914 .into()
21915 }
21916 }
21917 Self {
21918 base__: ICoreWebView2NavigationCompletedEventArgs_Vtbl::new::<Identity, OFFSET>(),
21919 HttpStatusCode: HttpStatusCode::<Identity, OFFSET>,
21920 }
21921 }
21922 pub fn matches(iid: &windows_core::GUID) -> bool {
21923 iid == &<ICoreWebView2NavigationCompletedEventArgs2 as windows_core::Interface>::IID
21924 || iid == &<ICoreWebView2NavigationCompletedEventArgs as windows_core::Interface>::IID
21925 }
21926}
21927impl windows_core::RuntimeName for ICoreWebView2NavigationCompletedEventArgs2 {}
21928windows_core::imp::define_interface!(
21929 ICoreWebView2NavigationCompletedEventHandler,
21930 ICoreWebView2NavigationCompletedEventHandler_Vtbl,
21931 0xd33a35bf_1c49_4f98_93ab_006e0533fe1c
21932);
21933windows_core::imp::interface_hierarchy!(
21934 ICoreWebView2NavigationCompletedEventHandler,
21935 windows_core::IUnknown
21936);
21937impl ICoreWebView2NavigationCompletedEventHandler {
21938 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
21939 where
21940 P0: windows_core::Param<ICoreWebView2>,
21941 P1: windows_core::Param<ICoreWebView2NavigationCompletedEventArgs>,
21942 {
21943 unsafe {
21944 (windows_core::Interface::vtable(self).Invoke)(
21945 windows_core::Interface::as_raw(self),
21946 sender.param().abi(),
21947 args.param().abi(),
21948 )
21949 .ok()
21950 }
21951 }
21952}
21953#[repr(C)]
21954pub struct ICoreWebView2NavigationCompletedEventHandler_Vtbl {
21955 pub base__: windows_core::IUnknown_Vtbl,
21956 pub Invoke: unsafe extern "system" fn(
21957 *mut core::ffi::c_void,
21958 *mut core::ffi::c_void,
21959 *mut core::ffi::c_void,
21960 ) -> windows_core::HRESULT,
21961}
21962pub trait ICoreWebView2NavigationCompletedEventHandler_Impl: windows_core::IUnknownImpl {
21963 fn Invoke(
21964 &self,
21965 sender: windows_core::Ref<'_, ICoreWebView2>,
21966 args: windows_core::Ref<'_, ICoreWebView2NavigationCompletedEventArgs>,
21967 ) -> windows_core::Result<()>;
21968}
21969impl ICoreWebView2NavigationCompletedEventHandler_Vtbl {
21970 pub const fn new<
21971 Identity: ICoreWebView2NavigationCompletedEventHandler_Impl,
21972 const OFFSET: isize,
21973 >() -> Self {
21974 unsafe extern "system" fn Invoke<
21975 Identity: ICoreWebView2NavigationCompletedEventHandler_Impl,
21976 const OFFSET: isize,
21977 >(
21978 this: *mut core::ffi::c_void,
21979 sender: *mut core::ffi::c_void,
21980 args: *mut core::ffi::c_void,
21981 ) -> windows_core::HRESULT {
21982 unsafe {
21983 let this: &Identity =
21984 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
21985 ICoreWebView2NavigationCompletedEventHandler_Impl::Invoke(
21986 this,
21987 core::mem::transmute_copy(&sender),
21988 core::mem::transmute_copy(&args),
21989 )
21990 .into()
21991 }
21992 }
21993 Self {
21994 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
21995 Invoke: Invoke::<Identity, OFFSET>,
21996 }
21997 }
21998 pub fn matches(iid: &windows_core::GUID) -> bool {
21999 iid == &<ICoreWebView2NavigationCompletedEventHandler as windows_core::Interface>::IID
22000 }
22001}
22002impl windows_core::RuntimeName for ICoreWebView2NavigationCompletedEventHandler {}
22003windows_core::imp::define_interface!(
22004 ICoreWebView2NavigationStartingEventArgs,
22005 ICoreWebView2NavigationStartingEventArgs_Vtbl,
22006 0x5b495469_e119_438a_9b18_7604f25f2e49
22007);
22008windows_core::imp::interface_hierarchy!(
22009 ICoreWebView2NavigationStartingEventArgs,
22010 windows_core::IUnknown
22011);
22012impl ICoreWebView2NavigationStartingEventArgs {
22013 pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
22014 unsafe {
22015 (windows_core::Interface::vtable(self).Uri)(
22016 windows_core::Interface::as_raw(self),
22017 uri as _,
22018 )
22019 .ok()
22020 }
22021 }
22022 pub unsafe fn IsUserInitiated(
22023 &self,
22024 isuserinitiated: *mut windows_core::BOOL,
22025 ) -> windows_core::Result<()> {
22026 unsafe {
22027 (windows_core::Interface::vtable(self).IsUserInitiated)(
22028 windows_core::Interface::as_raw(self),
22029 isuserinitiated as _,
22030 )
22031 .ok()
22032 }
22033 }
22034 pub unsafe fn IsRedirected(
22035 &self,
22036 isredirected: *mut windows_core::BOOL,
22037 ) -> windows_core::Result<()> {
22038 unsafe {
22039 (windows_core::Interface::vtable(self).IsRedirected)(
22040 windows_core::Interface::as_raw(self),
22041 isredirected as _,
22042 )
22043 .ok()
22044 }
22045 }
22046 pub unsafe fn RequestHeaders(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders> {
22047 unsafe {
22048 let mut result__ = core::mem::zeroed();
22049 (windows_core::Interface::vtable(self).RequestHeaders)(
22050 windows_core::Interface::as_raw(self),
22051 &mut result__,
22052 )
22053 .and_then(|| windows_core::Type::from_abi(result__))
22054 }
22055 }
22056 pub unsafe fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()> {
22057 unsafe {
22058 (windows_core::Interface::vtable(self).Cancel)(
22059 windows_core::Interface::as_raw(self),
22060 cancel as _,
22061 )
22062 .ok()
22063 }
22064 }
22065 pub unsafe fn SetCancel(&self, cancel: bool) -> windows_core::Result<()> {
22066 unsafe {
22067 (windows_core::Interface::vtable(self).SetCancel)(
22068 windows_core::Interface::as_raw(self),
22069 cancel.into(),
22070 )
22071 .ok()
22072 }
22073 }
22074 pub unsafe fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()> {
22075 unsafe {
22076 (windows_core::Interface::vtable(self).NavigationId)(
22077 windows_core::Interface::as_raw(self),
22078 navigationid as _,
22079 )
22080 .ok()
22081 }
22082 }
22083}
22084#[repr(C)]
22085pub struct ICoreWebView2NavigationStartingEventArgs_Vtbl {
22086 pub base__: windows_core::IUnknown_Vtbl,
22087 pub Uri: unsafe extern "system" fn(
22088 *mut core::ffi::c_void,
22089 *mut windows_core::PWSTR,
22090 ) -> windows_core::HRESULT,
22091 pub IsUserInitiated: unsafe extern "system" fn(
22092 *mut core::ffi::c_void,
22093 *mut windows_core::BOOL,
22094 ) -> windows_core::HRESULT,
22095 pub IsRedirected: unsafe extern "system" fn(
22096 *mut core::ffi::c_void,
22097 *mut windows_core::BOOL,
22098 ) -> windows_core::HRESULT,
22099 pub RequestHeaders: unsafe extern "system" fn(
22100 *mut core::ffi::c_void,
22101 *mut *mut core::ffi::c_void,
22102 ) -> windows_core::HRESULT,
22103 pub Cancel: unsafe extern "system" fn(
22104 *mut core::ffi::c_void,
22105 *mut windows_core::BOOL,
22106 ) -> windows_core::HRESULT,
22107 pub SetCancel: unsafe extern "system" fn(
22108 *mut core::ffi::c_void,
22109 windows_core::BOOL,
22110 ) -> windows_core::HRESULT,
22111 pub NavigationId:
22112 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
22113}
22114pub trait ICoreWebView2NavigationStartingEventArgs_Impl: windows_core::IUnknownImpl {
22115 fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
22116 fn IsUserInitiated(&self, isuserinitiated: *mut windows_core::BOOL)
22117 -> windows_core::Result<()>;
22118 fn IsRedirected(&self, isredirected: *mut windows_core::BOOL) -> windows_core::Result<()>;
22119 fn RequestHeaders(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders>;
22120 fn Cancel(&self, cancel: *mut windows_core::BOOL) -> windows_core::Result<()>;
22121 fn SetCancel(&self, cancel: windows_core::BOOL) -> windows_core::Result<()>;
22122 fn NavigationId(&self, navigationid: *mut u64) -> windows_core::Result<()>;
22123}
22124impl ICoreWebView2NavigationStartingEventArgs_Vtbl {
22125 pub const fn new<
22126 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22127 const OFFSET: isize,
22128 >() -> Self {
22129 unsafe extern "system" fn Uri<
22130 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22131 const OFFSET: isize,
22132 >(
22133 this: *mut core::ffi::c_void,
22134 uri: *mut windows_core::PWSTR,
22135 ) -> windows_core::HRESULT {
22136 unsafe {
22137 let this: &Identity =
22138 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22139 ICoreWebView2NavigationStartingEventArgs_Impl::Uri(
22140 this,
22141 core::mem::transmute_copy(&uri),
22142 )
22143 .into()
22144 }
22145 }
22146 unsafe extern "system" fn IsUserInitiated<
22147 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22148 const OFFSET: isize,
22149 >(
22150 this: *mut core::ffi::c_void,
22151 isuserinitiated: *mut windows_core::BOOL,
22152 ) -> windows_core::HRESULT {
22153 unsafe {
22154 let this: &Identity =
22155 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22156 ICoreWebView2NavigationStartingEventArgs_Impl::IsUserInitiated(
22157 this,
22158 core::mem::transmute_copy(&isuserinitiated),
22159 )
22160 .into()
22161 }
22162 }
22163 unsafe extern "system" fn IsRedirected<
22164 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22165 const OFFSET: isize,
22166 >(
22167 this: *mut core::ffi::c_void,
22168 isredirected: *mut windows_core::BOOL,
22169 ) -> windows_core::HRESULT {
22170 unsafe {
22171 let this: &Identity =
22172 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22173 ICoreWebView2NavigationStartingEventArgs_Impl::IsRedirected(
22174 this,
22175 core::mem::transmute_copy(&isredirected),
22176 )
22177 .into()
22178 }
22179 }
22180 unsafe extern "system" fn RequestHeaders<
22181 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22182 const OFFSET: isize,
22183 >(
22184 this: *mut core::ffi::c_void,
22185 requestheaders: *mut *mut core::ffi::c_void,
22186 ) -> windows_core::HRESULT {
22187 unsafe {
22188 let this: &Identity =
22189 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22190 match ICoreWebView2NavigationStartingEventArgs_Impl::RequestHeaders(this) {
22191 Ok(ok__) => {
22192 requestheaders.write(core::mem::transmute(ok__));
22193 windows_core::HRESULT(0)
22194 }
22195 Err(err) => err.into(),
22196 }
22197 }
22198 }
22199 unsafe extern "system" fn Cancel<
22200 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22201 const OFFSET: isize,
22202 >(
22203 this: *mut core::ffi::c_void,
22204 cancel: *mut windows_core::BOOL,
22205 ) -> windows_core::HRESULT {
22206 unsafe {
22207 let this: &Identity =
22208 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22209 ICoreWebView2NavigationStartingEventArgs_Impl::Cancel(
22210 this,
22211 core::mem::transmute_copy(&cancel),
22212 )
22213 .into()
22214 }
22215 }
22216 unsafe extern "system" fn SetCancel<
22217 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22218 const OFFSET: isize,
22219 >(
22220 this: *mut core::ffi::c_void,
22221 cancel: windows_core::BOOL,
22222 ) -> windows_core::HRESULT {
22223 unsafe {
22224 let this: &Identity =
22225 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22226 ICoreWebView2NavigationStartingEventArgs_Impl::SetCancel(
22227 this,
22228 core::mem::transmute_copy(&cancel),
22229 )
22230 .into()
22231 }
22232 }
22233 unsafe extern "system" fn NavigationId<
22234 Identity: ICoreWebView2NavigationStartingEventArgs_Impl,
22235 const OFFSET: isize,
22236 >(
22237 this: *mut core::ffi::c_void,
22238 navigationid: *mut u64,
22239 ) -> windows_core::HRESULT {
22240 unsafe {
22241 let this: &Identity =
22242 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22243 ICoreWebView2NavigationStartingEventArgs_Impl::NavigationId(
22244 this,
22245 core::mem::transmute_copy(&navigationid),
22246 )
22247 .into()
22248 }
22249 }
22250 Self {
22251 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
22252 Uri: Uri::<Identity, OFFSET>,
22253 IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
22254 IsRedirected: IsRedirected::<Identity, OFFSET>,
22255 RequestHeaders: RequestHeaders::<Identity, OFFSET>,
22256 Cancel: Cancel::<Identity, OFFSET>,
22257 SetCancel: SetCancel::<Identity, OFFSET>,
22258 NavigationId: NavigationId::<Identity, OFFSET>,
22259 }
22260 }
22261 pub fn matches(iid: &windows_core::GUID) -> bool {
22262 iid == &<ICoreWebView2NavigationStartingEventArgs as windows_core::Interface>::IID
22263 }
22264}
22265impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventArgs {}
22266windows_core::imp::define_interface!(
22267 ICoreWebView2NavigationStartingEventArgs2,
22268 ICoreWebView2NavigationStartingEventArgs2_Vtbl,
22269 0x9086be93_91aa_472d_a7e0_579f2ba006ad
22270);
22271impl core::ops::Deref for ICoreWebView2NavigationStartingEventArgs2 {
22272 type Target = ICoreWebView2NavigationStartingEventArgs;
22273 fn deref(&self) -> &Self::Target {
22274 unsafe { core::mem::transmute(self) }
22275 }
22276}
22277windows_core::imp::interface_hierarchy!(
22278 ICoreWebView2NavigationStartingEventArgs2,
22279 windows_core::IUnknown,
22280 ICoreWebView2NavigationStartingEventArgs
22281);
22282impl ICoreWebView2NavigationStartingEventArgs2 {
22283 pub unsafe fn AdditionalAllowedFrameAncestors(
22284 &self,
22285 value: *mut windows_core::PWSTR,
22286 ) -> windows_core::Result<()> {
22287 unsafe {
22288 (windows_core::Interface::vtable(self).AdditionalAllowedFrameAncestors)(
22289 windows_core::Interface::as_raw(self),
22290 value as _,
22291 )
22292 .ok()
22293 }
22294 }
22295 pub unsafe fn SetAdditionalAllowedFrameAncestors<P0>(
22296 &self,
22297 value: P0,
22298 ) -> windows_core::Result<()>
22299 where
22300 P0: windows_core::Param<windows_core::PCWSTR>,
22301 {
22302 unsafe {
22303 (windows_core::Interface::vtable(self).SetAdditionalAllowedFrameAncestors)(
22304 windows_core::Interface::as_raw(self),
22305 value.param().abi(),
22306 )
22307 .ok()
22308 }
22309 }
22310}
22311#[repr(C)]
22312pub struct ICoreWebView2NavigationStartingEventArgs2_Vtbl {
22313 pub base__: ICoreWebView2NavigationStartingEventArgs_Vtbl,
22314 pub AdditionalAllowedFrameAncestors: unsafe extern "system" fn(
22315 *mut core::ffi::c_void,
22316 *mut windows_core::PWSTR,
22317 ) -> windows_core::HRESULT,
22318 pub SetAdditionalAllowedFrameAncestors: unsafe extern "system" fn(
22319 *mut core::ffi::c_void,
22320 windows_core::PCWSTR,
22321 ) -> windows_core::HRESULT,
22322}
22323pub trait ICoreWebView2NavigationStartingEventArgs2_Impl:
22324 ICoreWebView2NavigationStartingEventArgs_Impl
22325{
22326 fn AdditionalAllowedFrameAncestors(
22327 &self,
22328 value: *mut windows_core::PWSTR,
22329 ) -> windows_core::Result<()>;
22330 fn SetAdditionalAllowedFrameAncestors(
22331 &self,
22332 value: &windows_core::PCWSTR,
22333 ) -> windows_core::Result<()>;
22334}
22335impl ICoreWebView2NavigationStartingEventArgs2_Vtbl {
22336 pub const fn new<
22337 Identity: ICoreWebView2NavigationStartingEventArgs2_Impl,
22338 const OFFSET: isize,
22339 >() -> Self {
22340 unsafe extern "system" fn AdditionalAllowedFrameAncestors<
22341 Identity: ICoreWebView2NavigationStartingEventArgs2_Impl,
22342 const OFFSET: isize,
22343 >(
22344 this: *mut core::ffi::c_void,
22345 value: *mut windows_core::PWSTR,
22346 ) -> windows_core::HRESULT {
22347 unsafe {
22348 let this: &Identity =
22349 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22350 ICoreWebView2NavigationStartingEventArgs2_Impl::AdditionalAllowedFrameAncestors(
22351 this,
22352 core::mem::transmute_copy(&value),
22353 )
22354 .into()
22355 }
22356 }
22357 unsafe extern "system" fn SetAdditionalAllowedFrameAncestors<
22358 Identity: ICoreWebView2NavigationStartingEventArgs2_Impl,
22359 const OFFSET: isize,
22360 >(
22361 this: *mut core::ffi::c_void,
22362 value: windows_core::PCWSTR,
22363 ) -> windows_core::HRESULT {
22364 unsafe {
22365 let this: &Identity =
22366 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22367 ICoreWebView2NavigationStartingEventArgs2_Impl::SetAdditionalAllowedFrameAncestors(
22368 this,
22369 core::mem::transmute(&value),
22370 )
22371 .into()
22372 }
22373 }
22374 Self {
22375 base__: ICoreWebView2NavigationStartingEventArgs_Vtbl::new::<Identity, OFFSET>(),
22376 AdditionalAllowedFrameAncestors: AdditionalAllowedFrameAncestors::<Identity, OFFSET>,
22377 SetAdditionalAllowedFrameAncestors: SetAdditionalAllowedFrameAncestors::<
22378 Identity,
22379 OFFSET,
22380 >,
22381 }
22382 }
22383 pub fn matches(iid: &windows_core::GUID) -> bool {
22384 iid == &<ICoreWebView2NavigationStartingEventArgs2 as windows_core::Interface>::IID
22385 || iid == &<ICoreWebView2NavigationStartingEventArgs as windows_core::Interface>::IID
22386 }
22387}
22388impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventArgs2 {}
22389windows_core::imp::define_interface!(
22390 ICoreWebView2NavigationStartingEventArgs3,
22391 ICoreWebView2NavigationStartingEventArgs3_Vtbl,
22392 0xddffe494_4942_4bd2_ab73_35b8ff40e19f
22393);
22394impl core::ops::Deref for ICoreWebView2NavigationStartingEventArgs3 {
22395 type Target = ICoreWebView2NavigationStartingEventArgs2;
22396 fn deref(&self) -> &Self::Target {
22397 unsafe { core::mem::transmute(self) }
22398 }
22399}
22400windows_core::imp::interface_hierarchy!(
22401 ICoreWebView2NavigationStartingEventArgs3,
22402 windows_core::IUnknown,
22403 ICoreWebView2NavigationStartingEventArgs,
22404 ICoreWebView2NavigationStartingEventArgs2
22405);
22406impl ICoreWebView2NavigationStartingEventArgs3 {
22407 pub unsafe fn NavigationKind(
22408 &self,
22409 value: *mut COREWEBVIEW2_NAVIGATION_KIND,
22410 ) -> windows_core::Result<()> {
22411 unsafe {
22412 (windows_core::Interface::vtable(self).NavigationKind)(
22413 windows_core::Interface::as_raw(self),
22414 value as _,
22415 )
22416 .ok()
22417 }
22418 }
22419}
22420#[repr(C)]
22421pub struct ICoreWebView2NavigationStartingEventArgs3_Vtbl {
22422 pub base__: ICoreWebView2NavigationStartingEventArgs2_Vtbl,
22423 pub NavigationKind: unsafe extern "system" fn(
22424 *mut core::ffi::c_void,
22425 *mut COREWEBVIEW2_NAVIGATION_KIND,
22426 ) -> windows_core::HRESULT,
22427}
22428pub trait ICoreWebView2NavigationStartingEventArgs3_Impl:
22429 ICoreWebView2NavigationStartingEventArgs2_Impl
22430{
22431 fn NavigationKind(&self, value: *mut COREWEBVIEW2_NAVIGATION_KIND) -> windows_core::Result<()>;
22432}
22433impl ICoreWebView2NavigationStartingEventArgs3_Vtbl {
22434 pub const fn new<
22435 Identity: ICoreWebView2NavigationStartingEventArgs3_Impl,
22436 const OFFSET: isize,
22437 >() -> Self {
22438 unsafe extern "system" fn NavigationKind<
22439 Identity: ICoreWebView2NavigationStartingEventArgs3_Impl,
22440 const OFFSET: isize,
22441 >(
22442 this: *mut core::ffi::c_void,
22443 value: *mut COREWEBVIEW2_NAVIGATION_KIND,
22444 ) -> windows_core::HRESULT {
22445 unsafe {
22446 let this: &Identity =
22447 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22448 ICoreWebView2NavigationStartingEventArgs3_Impl::NavigationKind(
22449 this,
22450 core::mem::transmute_copy(&value),
22451 )
22452 .into()
22453 }
22454 }
22455 Self {
22456 base__: ICoreWebView2NavigationStartingEventArgs2_Vtbl::new::<Identity, OFFSET>(),
22457 NavigationKind: NavigationKind::<Identity, OFFSET>,
22458 }
22459 }
22460 pub fn matches(iid: &windows_core::GUID) -> bool {
22461 iid == &<ICoreWebView2NavigationStartingEventArgs3 as windows_core::Interface>::IID
22462 || iid == &<ICoreWebView2NavigationStartingEventArgs as windows_core::Interface>::IID
22463 || iid == &<ICoreWebView2NavigationStartingEventArgs2 as windows_core::Interface>::IID
22464 }
22465}
22466impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventArgs3 {}
22467windows_core::imp::define_interface!(
22468 ICoreWebView2NavigationStartingEventHandler,
22469 ICoreWebView2NavigationStartingEventHandler_Vtbl,
22470 0x9adbe429_f36d_432b_9ddc_f8881fbd76e3
22471);
22472windows_core::imp::interface_hierarchy!(
22473 ICoreWebView2NavigationStartingEventHandler,
22474 windows_core::IUnknown
22475);
22476impl ICoreWebView2NavigationStartingEventHandler {
22477 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
22478 where
22479 P0: windows_core::Param<ICoreWebView2>,
22480 P1: windows_core::Param<ICoreWebView2NavigationStartingEventArgs>,
22481 {
22482 unsafe {
22483 (windows_core::Interface::vtable(self).Invoke)(
22484 windows_core::Interface::as_raw(self),
22485 sender.param().abi(),
22486 args.param().abi(),
22487 )
22488 .ok()
22489 }
22490 }
22491}
22492#[repr(C)]
22493pub struct ICoreWebView2NavigationStartingEventHandler_Vtbl {
22494 pub base__: windows_core::IUnknown_Vtbl,
22495 pub Invoke: unsafe extern "system" fn(
22496 *mut core::ffi::c_void,
22497 *mut core::ffi::c_void,
22498 *mut core::ffi::c_void,
22499 ) -> windows_core::HRESULT,
22500}
22501pub trait ICoreWebView2NavigationStartingEventHandler_Impl: windows_core::IUnknownImpl {
22502 fn Invoke(
22503 &self,
22504 sender: windows_core::Ref<'_, ICoreWebView2>,
22505 args: windows_core::Ref<'_, ICoreWebView2NavigationStartingEventArgs>,
22506 ) -> windows_core::Result<()>;
22507}
22508impl ICoreWebView2NavigationStartingEventHandler_Vtbl {
22509 pub const fn new<
22510 Identity: ICoreWebView2NavigationStartingEventHandler_Impl,
22511 const OFFSET: isize,
22512 >() -> Self {
22513 unsafe extern "system" fn Invoke<
22514 Identity: ICoreWebView2NavigationStartingEventHandler_Impl,
22515 const OFFSET: isize,
22516 >(
22517 this: *mut core::ffi::c_void,
22518 sender: *mut core::ffi::c_void,
22519 args: *mut core::ffi::c_void,
22520 ) -> windows_core::HRESULT {
22521 unsafe {
22522 let this: &Identity =
22523 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22524 ICoreWebView2NavigationStartingEventHandler_Impl::Invoke(
22525 this,
22526 core::mem::transmute_copy(&sender),
22527 core::mem::transmute_copy(&args),
22528 )
22529 .into()
22530 }
22531 }
22532 Self {
22533 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
22534 Invoke: Invoke::<Identity, OFFSET>,
22535 }
22536 }
22537 pub fn matches(iid: &windows_core::GUID) -> bool {
22538 iid == &<ICoreWebView2NavigationStartingEventHandler as windows_core::Interface>::IID
22539 }
22540}
22541impl windows_core::RuntimeName for ICoreWebView2NavigationStartingEventHandler {}
22542windows_core::imp::define_interface!(
22543 ICoreWebView2NewBrowserVersionAvailableEventHandler,
22544 ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl,
22545 0xf9a2976e_d34e_44fc_adee_81b6b57ca914
22546);
22547windows_core::imp::interface_hierarchy!(
22548 ICoreWebView2NewBrowserVersionAvailableEventHandler,
22549 windows_core::IUnknown
22550);
22551impl ICoreWebView2NewBrowserVersionAvailableEventHandler {
22552 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
22553 where
22554 P0: windows_core::Param<ICoreWebView2Environment>,
22555 P1: windows_core::Param<windows_core::IUnknown>,
22556 {
22557 unsafe {
22558 (windows_core::Interface::vtable(self).Invoke)(
22559 windows_core::Interface::as_raw(self),
22560 sender.param().abi(),
22561 args.param().abi(),
22562 )
22563 .ok()
22564 }
22565 }
22566}
22567#[repr(C)]
22568pub struct ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
22569 pub base__: windows_core::IUnknown_Vtbl,
22570 pub Invoke: unsafe extern "system" fn(
22571 *mut core::ffi::c_void,
22572 *mut core::ffi::c_void,
22573 *mut core::ffi::c_void,
22574 ) -> windows_core::HRESULT,
22575}
22576pub trait ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl:
22577 windows_core::IUnknownImpl
22578{
22579 fn Invoke(
22580 &self,
22581 sender: windows_core::Ref<'_, ICoreWebView2Environment>,
22582 args: windows_core::Ref<'_, windows_core::IUnknown>,
22583 ) -> windows_core::Result<()>;
22584}
22585impl ICoreWebView2NewBrowserVersionAvailableEventHandler_Vtbl {
22586 pub const fn new<
22587 Identity: ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl,
22588 const OFFSET: isize,
22589 >() -> Self {
22590 unsafe extern "system" fn Invoke<
22591 Identity: ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl,
22592 const OFFSET: isize,
22593 >(
22594 this: *mut core::ffi::c_void,
22595 sender: *mut core::ffi::c_void,
22596 args: *mut core::ffi::c_void,
22597 ) -> windows_core::HRESULT {
22598 unsafe {
22599 let this: &Identity =
22600 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22601 ICoreWebView2NewBrowserVersionAvailableEventHandler_Impl::Invoke(
22602 this,
22603 core::mem::transmute_copy(&sender),
22604 core::mem::transmute_copy(&args),
22605 )
22606 .into()
22607 }
22608 }
22609 Self {
22610 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
22611 Invoke: Invoke::<Identity, OFFSET>,
22612 }
22613 }
22614 pub fn matches(iid: &windows_core::GUID) -> bool {
22615 iid == & < ICoreWebView2NewBrowserVersionAvailableEventHandler as windows_core::Interface >::IID
22616 }
22617}
22618impl windows_core::RuntimeName for ICoreWebView2NewBrowserVersionAvailableEventHandler {}
22619windows_core::imp::define_interface!(
22620 ICoreWebView2NewWindowRequestedEventArgs,
22621 ICoreWebView2NewWindowRequestedEventArgs_Vtbl,
22622 0x34acb11c_fc37_4418_9132_f9c21d1eafb9
22623);
22624windows_core::imp::interface_hierarchy!(
22625 ICoreWebView2NewWindowRequestedEventArgs,
22626 windows_core::IUnknown
22627);
22628impl ICoreWebView2NewWindowRequestedEventArgs {
22629 pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
22630 unsafe {
22631 (windows_core::Interface::vtable(self).Uri)(
22632 windows_core::Interface::as_raw(self),
22633 uri as _,
22634 )
22635 .ok()
22636 }
22637 }
22638 pub unsafe fn SetNewWindow<P0>(&self, newwindow: P0) -> windows_core::Result<()>
22639 where
22640 P0: windows_core::Param<ICoreWebView2>,
22641 {
22642 unsafe {
22643 (windows_core::Interface::vtable(self).SetNewWindow)(
22644 windows_core::Interface::as_raw(self),
22645 newwindow.param().abi(),
22646 )
22647 .ok()
22648 }
22649 }
22650 pub unsafe fn NewWindow(&self) -> windows_core::Result<ICoreWebView2> {
22651 unsafe {
22652 let mut result__ = core::mem::zeroed();
22653 (windows_core::Interface::vtable(self).NewWindow)(
22654 windows_core::Interface::as_raw(self),
22655 &mut result__,
22656 )
22657 .and_then(|| windows_core::Type::from_abi(result__))
22658 }
22659 }
22660 pub unsafe fn SetHandled(&self, handled: bool) -> windows_core::Result<()> {
22661 unsafe {
22662 (windows_core::Interface::vtable(self).SetHandled)(
22663 windows_core::Interface::as_raw(self),
22664 handled.into(),
22665 )
22666 .ok()
22667 }
22668 }
22669 pub unsafe fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()> {
22670 unsafe {
22671 (windows_core::Interface::vtable(self).Handled)(
22672 windows_core::Interface::as_raw(self),
22673 handled as _,
22674 )
22675 .ok()
22676 }
22677 }
22678 pub unsafe fn IsUserInitiated(
22679 &self,
22680 isuserinitiated: *mut windows_core::BOOL,
22681 ) -> windows_core::Result<()> {
22682 unsafe {
22683 (windows_core::Interface::vtable(self).IsUserInitiated)(
22684 windows_core::Interface::as_raw(self),
22685 isuserinitiated as _,
22686 )
22687 .ok()
22688 }
22689 }
22690 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
22691 unsafe {
22692 let mut result__ = core::mem::zeroed();
22693 (windows_core::Interface::vtable(self).GetDeferral)(
22694 windows_core::Interface::as_raw(self),
22695 &mut result__,
22696 )
22697 .and_then(|| windows_core::Type::from_abi(result__))
22698 }
22699 }
22700 pub unsafe fn WindowFeatures(&self) -> windows_core::Result<ICoreWebView2WindowFeatures> {
22701 unsafe {
22702 let mut result__ = core::mem::zeroed();
22703 (windows_core::Interface::vtable(self).WindowFeatures)(
22704 windows_core::Interface::as_raw(self),
22705 &mut result__,
22706 )
22707 .and_then(|| windows_core::Type::from_abi(result__))
22708 }
22709 }
22710}
22711#[repr(C)]
22712pub struct ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
22713 pub base__: windows_core::IUnknown_Vtbl,
22714 pub Uri: unsafe extern "system" fn(
22715 *mut core::ffi::c_void,
22716 *mut windows_core::PWSTR,
22717 ) -> windows_core::HRESULT,
22718 pub SetNewWindow: unsafe extern "system" fn(
22719 *mut core::ffi::c_void,
22720 *mut core::ffi::c_void,
22721 ) -> windows_core::HRESULT,
22722 pub NewWindow: unsafe extern "system" fn(
22723 *mut core::ffi::c_void,
22724 *mut *mut core::ffi::c_void,
22725 ) -> windows_core::HRESULT,
22726 pub SetHandled: unsafe extern "system" fn(
22727 *mut core::ffi::c_void,
22728 windows_core::BOOL,
22729 ) -> windows_core::HRESULT,
22730 pub Handled: unsafe extern "system" fn(
22731 *mut core::ffi::c_void,
22732 *mut windows_core::BOOL,
22733 ) -> windows_core::HRESULT,
22734 pub IsUserInitiated: unsafe extern "system" fn(
22735 *mut core::ffi::c_void,
22736 *mut windows_core::BOOL,
22737 ) -> windows_core::HRESULT,
22738 pub GetDeferral: unsafe extern "system" fn(
22739 *mut core::ffi::c_void,
22740 *mut *mut core::ffi::c_void,
22741 ) -> windows_core::HRESULT,
22742 pub WindowFeatures: unsafe extern "system" fn(
22743 *mut core::ffi::c_void,
22744 *mut *mut core::ffi::c_void,
22745 ) -> windows_core::HRESULT,
22746}
22747pub trait ICoreWebView2NewWindowRequestedEventArgs_Impl: windows_core::IUnknownImpl {
22748 fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
22749 fn SetNewWindow(
22750 &self,
22751 newwindow: windows_core::Ref<'_, ICoreWebView2>,
22752 ) -> windows_core::Result<()>;
22753 fn NewWindow(&self) -> windows_core::Result<ICoreWebView2>;
22754 fn SetHandled(&self, handled: windows_core::BOOL) -> windows_core::Result<()>;
22755 fn Handled(&self, handled: *mut windows_core::BOOL) -> windows_core::Result<()>;
22756 fn IsUserInitiated(&self, isuserinitiated: *mut windows_core::BOOL)
22757 -> windows_core::Result<()>;
22758 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
22759 fn WindowFeatures(&self) -> windows_core::Result<ICoreWebView2WindowFeatures>;
22760}
22761impl ICoreWebView2NewWindowRequestedEventArgs_Vtbl {
22762 pub const fn new<
22763 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22764 const OFFSET: isize,
22765 >() -> Self {
22766 unsafe extern "system" fn Uri<
22767 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22768 const OFFSET: isize,
22769 >(
22770 this: *mut core::ffi::c_void,
22771 uri: *mut windows_core::PWSTR,
22772 ) -> windows_core::HRESULT {
22773 unsafe {
22774 let this: &Identity =
22775 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22776 ICoreWebView2NewWindowRequestedEventArgs_Impl::Uri(
22777 this,
22778 core::mem::transmute_copy(&uri),
22779 )
22780 .into()
22781 }
22782 }
22783 unsafe extern "system" fn SetNewWindow<
22784 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22785 const OFFSET: isize,
22786 >(
22787 this: *mut core::ffi::c_void,
22788 newwindow: *mut core::ffi::c_void,
22789 ) -> windows_core::HRESULT {
22790 unsafe {
22791 let this: &Identity =
22792 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22793 ICoreWebView2NewWindowRequestedEventArgs_Impl::SetNewWindow(
22794 this,
22795 core::mem::transmute_copy(&newwindow),
22796 )
22797 .into()
22798 }
22799 }
22800 unsafe extern "system" fn NewWindow<
22801 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22802 const OFFSET: isize,
22803 >(
22804 this: *mut core::ffi::c_void,
22805 newwindow: *mut *mut core::ffi::c_void,
22806 ) -> windows_core::HRESULT {
22807 unsafe {
22808 let this: &Identity =
22809 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22810 match ICoreWebView2NewWindowRequestedEventArgs_Impl::NewWindow(this) {
22811 Ok(ok__) => {
22812 newwindow.write(core::mem::transmute(ok__));
22813 windows_core::HRESULT(0)
22814 }
22815 Err(err) => err.into(),
22816 }
22817 }
22818 }
22819 unsafe extern "system" fn SetHandled<
22820 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22821 const OFFSET: isize,
22822 >(
22823 this: *mut core::ffi::c_void,
22824 handled: windows_core::BOOL,
22825 ) -> windows_core::HRESULT {
22826 unsafe {
22827 let this: &Identity =
22828 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22829 ICoreWebView2NewWindowRequestedEventArgs_Impl::SetHandled(
22830 this,
22831 core::mem::transmute_copy(&handled),
22832 )
22833 .into()
22834 }
22835 }
22836 unsafe extern "system" fn Handled<
22837 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22838 const OFFSET: isize,
22839 >(
22840 this: *mut core::ffi::c_void,
22841 handled: *mut windows_core::BOOL,
22842 ) -> windows_core::HRESULT {
22843 unsafe {
22844 let this: &Identity =
22845 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22846 ICoreWebView2NewWindowRequestedEventArgs_Impl::Handled(
22847 this,
22848 core::mem::transmute_copy(&handled),
22849 )
22850 .into()
22851 }
22852 }
22853 unsafe extern "system" fn IsUserInitiated<
22854 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22855 const OFFSET: isize,
22856 >(
22857 this: *mut core::ffi::c_void,
22858 isuserinitiated: *mut windows_core::BOOL,
22859 ) -> windows_core::HRESULT {
22860 unsafe {
22861 let this: &Identity =
22862 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22863 ICoreWebView2NewWindowRequestedEventArgs_Impl::IsUserInitiated(
22864 this,
22865 core::mem::transmute_copy(&isuserinitiated),
22866 )
22867 .into()
22868 }
22869 }
22870 unsafe extern "system" fn GetDeferral<
22871 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22872 const OFFSET: isize,
22873 >(
22874 this: *mut core::ffi::c_void,
22875 deferral: *mut *mut core::ffi::c_void,
22876 ) -> windows_core::HRESULT {
22877 unsafe {
22878 let this: &Identity =
22879 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22880 match ICoreWebView2NewWindowRequestedEventArgs_Impl::GetDeferral(this) {
22881 Ok(ok__) => {
22882 deferral.write(core::mem::transmute(ok__));
22883 windows_core::HRESULT(0)
22884 }
22885 Err(err) => err.into(),
22886 }
22887 }
22888 }
22889 unsafe extern "system" fn WindowFeatures<
22890 Identity: ICoreWebView2NewWindowRequestedEventArgs_Impl,
22891 const OFFSET: isize,
22892 >(
22893 this: *mut core::ffi::c_void,
22894 value: *mut *mut core::ffi::c_void,
22895 ) -> windows_core::HRESULT {
22896 unsafe {
22897 let this: &Identity =
22898 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22899 match ICoreWebView2NewWindowRequestedEventArgs_Impl::WindowFeatures(this) {
22900 Ok(ok__) => {
22901 value.write(core::mem::transmute(ok__));
22902 windows_core::HRESULT(0)
22903 }
22904 Err(err) => err.into(),
22905 }
22906 }
22907 }
22908 Self {
22909 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
22910 Uri: Uri::<Identity, OFFSET>,
22911 SetNewWindow: SetNewWindow::<Identity, OFFSET>,
22912 NewWindow: NewWindow::<Identity, OFFSET>,
22913 SetHandled: SetHandled::<Identity, OFFSET>,
22914 Handled: Handled::<Identity, OFFSET>,
22915 IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
22916 GetDeferral: GetDeferral::<Identity, OFFSET>,
22917 WindowFeatures: WindowFeatures::<Identity, OFFSET>,
22918 }
22919 }
22920 pub fn matches(iid: &windows_core::GUID) -> bool {
22921 iid == &<ICoreWebView2NewWindowRequestedEventArgs as windows_core::Interface>::IID
22922 }
22923}
22924impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs {}
22925windows_core::imp::define_interface!(
22926 ICoreWebView2NewWindowRequestedEventArgs2,
22927 ICoreWebView2NewWindowRequestedEventArgs2_Vtbl,
22928 0xbbc7baed_74c6_4c92_b63a_7f5aeae03de3
22929);
22930impl core::ops::Deref for ICoreWebView2NewWindowRequestedEventArgs2 {
22931 type Target = ICoreWebView2NewWindowRequestedEventArgs;
22932 fn deref(&self) -> &Self::Target {
22933 unsafe { core::mem::transmute(self) }
22934 }
22935}
22936windows_core::imp::interface_hierarchy!(
22937 ICoreWebView2NewWindowRequestedEventArgs2,
22938 windows_core::IUnknown,
22939 ICoreWebView2NewWindowRequestedEventArgs
22940);
22941impl ICoreWebView2NewWindowRequestedEventArgs2 {
22942 pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
22943 unsafe {
22944 (windows_core::Interface::vtable(self).Name)(
22945 windows_core::Interface::as_raw(self),
22946 value as _,
22947 )
22948 .ok()
22949 }
22950 }
22951}
22952#[repr(C)]
22953pub struct ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
22954 pub base__: ICoreWebView2NewWindowRequestedEventArgs_Vtbl,
22955 pub Name: unsafe extern "system" fn(
22956 *mut core::ffi::c_void,
22957 *mut windows_core::PWSTR,
22958 ) -> windows_core::HRESULT,
22959}
22960pub trait ICoreWebView2NewWindowRequestedEventArgs2_Impl:
22961 ICoreWebView2NewWindowRequestedEventArgs_Impl
22962{
22963 fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
22964}
22965impl ICoreWebView2NewWindowRequestedEventArgs2_Vtbl {
22966 pub const fn new<
22967 Identity: ICoreWebView2NewWindowRequestedEventArgs2_Impl,
22968 const OFFSET: isize,
22969 >() -> Self {
22970 unsafe extern "system" fn Name<
22971 Identity: ICoreWebView2NewWindowRequestedEventArgs2_Impl,
22972 const OFFSET: isize,
22973 >(
22974 this: *mut core::ffi::c_void,
22975 value: *mut windows_core::PWSTR,
22976 ) -> windows_core::HRESULT {
22977 unsafe {
22978 let this: &Identity =
22979 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
22980 ICoreWebView2NewWindowRequestedEventArgs2_Impl::Name(
22981 this,
22982 core::mem::transmute_copy(&value),
22983 )
22984 .into()
22985 }
22986 }
22987 Self {
22988 base__: ICoreWebView2NewWindowRequestedEventArgs_Vtbl::new::<Identity, OFFSET>(),
22989 Name: Name::<Identity, OFFSET>,
22990 }
22991 }
22992 pub fn matches(iid: &windows_core::GUID) -> bool {
22993 iid == &<ICoreWebView2NewWindowRequestedEventArgs2 as windows_core::Interface>::IID
22994 || iid == &<ICoreWebView2NewWindowRequestedEventArgs as windows_core::Interface>::IID
22995 }
22996}
22997impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs2 {}
22998windows_core::imp::define_interface!(
22999 ICoreWebView2NewWindowRequestedEventArgs3,
23000 ICoreWebView2NewWindowRequestedEventArgs3_Vtbl,
23001 0x842bed3c_6ad6_4dd9_b938_28c96667ad66
23002);
23003impl core::ops::Deref for ICoreWebView2NewWindowRequestedEventArgs3 {
23004 type Target = ICoreWebView2NewWindowRequestedEventArgs2;
23005 fn deref(&self) -> &Self::Target {
23006 unsafe { core::mem::transmute(self) }
23007 }
23008}
23009windows_core::imp::interface_hierarchy!(
23010 ICoreWebView2NewWindowRequestedEventArgs3,
23011 windows_core::IUnknown,
23012 ICoreWebView2NewWindowRequestedEventArgs,
23013 ICoreWebView2NewWindowRequestedEventArgs2
23014);
23015impl ICoreWebView2NewWindowRequestedEventArgs3 {
23016 pub unsafe fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
23017 unsafe {
23018 let mut result__ = core::mem::zeroed();
23019 (windows_core::Interface::vtable(self).OriginalSourceFrameInfo)(
23020 windows_core::Interface::as_raw(self),
23021 &mut result__,
23022 )
23023 .and_then(|| windows_core::Type::from_abi(result__))
23024 }
23025 }
23026}
23027#[repr(C)]
23028pub struct ICoreWebView2NewWindowRequestedEventArgs3_Vtbl {
23029 pub base__: ICoreWebView2NewWindowRequestedEventArgs2_Vtbl,
23030 pub OriginalSourceFrameInfo: unsafe extern "system" fn(
23031 *mut core::ffi::c_void,
23032 *mut *mut core::ffi::c_void,
23033 ) -> windows_core::HRESULT,
23034}
23035pub trait ICoreWebView2NewWindowRequestedEventArgs3_Impl:
23036 ICoreWebView2NewWindowRequestedEventArgs2_Impl
23037{
23038 fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
23039}
23040impl ICoreWebView2NewWindowRequestedEventArgs3_Vtbl {
23041 pub const fn new<
23042 Identity: ICoreWebView2NewWindowRequestedEventArgs3_Impl,
23043 const OFFSET: isize,
23044 >() -> Self {
23045 unsafe extern "system" fn OriginalSourceFrameInfo<
23046 Identity: ICoreWebView2NewWindowRequestedEventArgs3_Impl,
23047 const OFFSET: isize,
23048 >(
23049 this: *mut core::ffi::c_void,
23050 value: *mut *mut core::ffi::c_void,
23051 ) -> windows_core::HRESULT {
23052 unsafe {
23053 let this: &Identity =
23054 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23055 match ICoreWebView2NewWindowRequestedEventArgs3_Impl::OriginalSourceFrameInfo(this)
23056 {
23057 Ok(ok__) => {
23058 value.write(core::mem::transmute(ok__));
23059 windows_core::HRESULT(0)
23060 }
23061 Err(err) => err.into(),
23062 }
23063 }
23064 }
23065 Self {
23066 base__: ICoreWebView2NewWindowRequestedEventArgs2_Vtbl::new::<Identity, OFFSET>(),
23067 OriginalSourceFrameInfo: OriginalSourceFrameInfo::<Identity, OFFSET>,
23068 }
23069 }
23070 pub fn matches(iid: &windows_core::GUID) -> bool {
23071 iid == &<ICoreWebView2NewWindowRequestedEventArgs3 as windows_core::Interface>::IID
23072 || iid == &<ICoreWebView2NewWindowRequestedEventArgs as windows_core::Interface>::IID
23073 || iid == &<ICoreWebView2NewWindowRequestedEventArgs2 as windows_core::Interface>::IID
23074 }
23075}
23076impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventArgs3 {}
23077windows_core::imp::define_interface!(
23078 ICoreWebView2NewWindowRequestedEventHandler,
23079 ICoreWebView2NewWindowRequestedEventHandler_Vtbl,
23080 0xd4c185fe_c81c_4989_97af_2d3fa7ab5651
23081);
23082windows_core::imp::interface_hierarchy!(
23083 ICoreWebView2NewWindowRequestedEventHandler,
23084 windows_core::IUnknown
23085);
23086impl ICoreWebView2NewWindowRequestedEventHandler {
23087 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
23088 where
23089 P0: windows_core::Param<ICoreWebView2>,
23090 P1: windows_core::Param<ICoreWebView2NewWindowRequestedEventArgs>,
23091 {
23092 unsafe {
23093 (windows_core::Interface::vtable(self).Invoke)(
23094 windows_core::Interface::as_raw(self),
23095 sender.param().abi(),
23096 args.param().abi(),
23097 )
23098 .ok()
23099 }
23100 }
23101}
23102#[repr(C)]
23103pub struct ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
23104 pub base__: windows_core::IUnknown_Vtbl,
23105 pub Invoke: unsafe extern "system" fn(
23106 *mut core::ffi::c_void,
23107 *mut core::ffi::c_void,
23108 *mut core::ffi::c_void,
23109 ) -> windows_core::HRESULT,
23110}
23111pub trait ICoreWebView2NewWindowRequestedEventHandler_Impl: windows_core::IUnknownImpl {
23112 fn Invoke(
23113 &self,
23114 sender: windows_core::Ref<'_, ICoreWebView2>,
23115 args: windows_core::Ref<'_, ICoreWebView2NewWindowRequestedEventArgs>,
23116 ) -> windows_core::Result<()>;
23117}
23118impl ICoreWebView2NewWindowRequestedEventHandler_Vtbl {
23119 pub const fn new<
23120 Identity: ICoreWebView2NewWindowRequestedEventHandler_Impl,
23121 const OFFSET: isize,
23122 >() -> Self {
23123 unsafe extern "system" fn Invoke<
23124 Identity: ICoreWebView2NewWindowRequestedEventHandler_Impl,
23125 const OFFSET: isize,
23126 >(
23127 this: *mut core::ffi::c_void,
23128 sender: *mut core::ffi::c_void,
23129 args: *mut core::ffi::c_void,
23130 ) -> windows_core::HRESULT {
23131 unsafe {
23132 let this: &Identity =
23133 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23134 ICoreWebView2NewWindowRequestedEventHandler_Impl::Invoke(
23135 this,
23136 core::mem::transmute_copy(&sender),
23137 core::mem::transmute_copy(&args),
23138 )
23139 .into()
23140 }
23141 }
23142 Self {
23143 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
23144 Invoke: Invoke::<Identity, OFFSET>,
23145 }
23146 }
23147 pub fn matches(iid: &windows_core::GUID) -> bool {
23148 iid == &<ICoreWebView2NewWindowRequestedEventHandler as windows_core::Interface>::IID
23149 }
23150}
23151impl windows_core::RuntimeName for ICoreWebView2NewWindowRequestedEventHandler {}
23152windows_core::imp::define_interface!(
23153 ICoreWebView2NonClientRegionChangedEventArgs,
23154 ICoreWebView2NonClientRegionChangedEventArgs_Vtbl,
23155 0xab71d500_0820_4a52_809c_48db04ff93bf
23156);
23157windows_core::imp::interface_hierarchy!(
23158 ICoreWebView2NonClientRegionChangedEventArgs,
23159 windows_core::IUnknown
23160);
23161impl ICoreWebView2NonClientRegionChangedEventArgs {
23162 pub unsafe fn RegionKind(
23163 &self,
23164 value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
23165 ) -> windows_core::Result<()> {
23166 unsafe {
23167 (windows_core::Interface::vtable(self).RegionKind)(
23168 windows_core::Interface::as_raw(self),
23169 value as _,
23170 )
23171 .ok()
23172 }
23173 }
23174}
23175#[repr(C)]
23176pub struct ICoreWebView2NonClientRegionChangedEventArgs_Vtbl {
23177 pub base__: windows_core::IUnknown_Vtbl,
23178 pub RegionKind: unsafe extern "system" fn(
23179 *mut core::ffi::c_void,
23180 *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
23181 ) -> windows_core::HRESULT,
23182}
23183pub trait ICoreWebView2NonClientRegionChangedEventArgs_Impl: windows_core::IUnknownImpl {
23184 fn RegionKind(
23185 &self,
23186 value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
23187 ) -> windows_core::Result<()>;
23188}
23189impl ICoreWebView2NonClientRegionChangedEventArgs_Vtbl {
23190 pub const fn new<
23191 Identity: ICoreWebView2NonClientRegionChangedEventArgs_Impl,
23192 const OFFSET: isize,
23193 >() -> Self {
23194 unsafe extern "system" fn RegionKind<
23195 Identity: ICoreWebView2NonClientRegionChangedEventArgs_Impl,
23196 const OFFSET: isize,
23197 >(
23198 this: *mut core::ffi::c_void,
23199 value: *mut COREWEBVIEW2_NON_CLIENT_REGION_KIND,
23200 ) -> windows_core::HRESULT {
23201 unsafe {
23202 let this: &Identity =
23203 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23204 ICoreWebView2NonClientRegionChangedEventArgs_Impl::RegionKind(
23205 this,
23206 core::mem::transmute_copy(&value),
23207 )
23208 .into()
23209 }
23210 }
23211 Self {
23212 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
23213 RegionKind: RegionKind::<Identity, OFFSET>,
23214 }
23215 }
23216 pub fn matches(iid: &windows_core::GUID) -> bool {
23217 iid == &<ICoreWebView2NonClientRegionChangedEventArgs as windows_core::Interface>::IID
23218 }
23219}
23220impl windows_core::RuntimeName for ICoreWebView2NonClientRegionChangedEventArgs {}
23221windows_core::imp::define_interface!(
23222 ICoreWebView2NonClientRegionChangedEventHandler,
23223 ICoreWebView2NonClientRegionChangedEventHandler_Vtbl,
23224 0x4a794e66_aa6c_46bd_93a3_382196837680
23225);
23226windows_core::imp::interface_hierarchy!(
23227 ICoreWebView2NonClientRegionChangedEventHandler,
23228 windows_core::IUnknown
23229);
23230impl ICoreWebView2NonClientRegionChangedEventHandler {
23231 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
23232 where
23233 P0: windows_core::Param<ICoreWebView2CompositionController>,
23234 P1: windows_core::Param<ICoreWebView2NonClientRegionChangedEventArgs>,
23235 {
23236 unsafe {
23237 (windows_core::Interface::vtable(self).Invoke)(
23238 windows_core::Interface::as_raw(self),
23239 sender.param().abi(),
23240 args.param().abi(),
23241 )
23242 .ok()
23243 }
23244 }
23245}
23246#[repr(C)]
23247pub struct ICoreWebView2NonClientRegionChangedEventHandler_Vtbl {
23248 pub base__: windows_core::IUnknown_Vtbl,
23249 pub Invoke: unsafe extern "system" fn(
23250 *mut core::ffi::c_void,
23251 *mut core::ffi::c_void,
23252 *mut core::ffi::c_void,
23253 ) -> windows_core::HRESULT,
23254}
23255pub trait ICoreWebView2NonClientRegionChangedEventHandler_Impl: windows_core::IUnknownImpl {
23256 fn Invoke(
23257 &self,
23258 sender: windows_core::Ref<'_, ICoreWebView2CompositionController>,
23259 args: windows_core::Ref<'_, ICoreWebView2NonClientRegionChangedEventArgs>,
23260 ) -> windows_core::Result<()>;
23261}
23262impl ICoreWebView2NonClientRegionChangedEventHandler_Vtbl {
23263 pub const fn new<
23264 Identity: ICoreWebView2NonClientRegionChangedEventHandler_Impl,
23265 const OFFSET: isize,
23266 >() -> Self {
23267 unsafe extern "system" fn Invoke<
23268 Identity: ICoreWebView2NonClientRegionChangedEventHandler_Impl,
23269 const OFFSET: isize,
23270 >(
23271 this: *mut core::ffi::c_void,
23272 sender: *mut core::ffi::c_void,
23273 args: *mut core::ffi::c_void,
23274 ) -> windows_core::HRESULT {
23275 unsafe {
23276 let this: &Identity =
23277 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23278 ICoreWebView2NonClientRegionChangedEventHandler_Impl::Invoke(
23279 this,
23280 core::mem::transmute_copy(&sender),
23281 core::mem::transmute_copy(&args),
23282 )
23283 .into()
23284 }
23285 }
23286 Self {
23287 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
23288 Invoke: Invoke::<Identity, OFFSET>,
23289 }
23290 }
23291 pub fn matches(iid: &windows_core::GUID) -> bool {
23292 iid == &<ICoreWebView2NonClientRegionChangedEventHandler as windows_core::Interface>::IID
23293 }
23294}
23295impl windows_core::RuntimeName for ICoreWebView2NonClientRegionChangedEventHandler {}
23296windows_core::imp::define_interface!(
23297 ICoreWebView2Notification,
23298 ICoreWebView2Notification_Vtbl,
23299 0xb7434d98_6bc8_419d_9da5_fb5a96d4dacd
23300);
23301windows_core::imp::interface_hierarchy!(ICoreWebView2Notification, windows_core::IUnknown);
23302impl ICoreWebView2Notification {
23303 pub unsafe fn add_CloseRequested<P0>(
23304 &self,
23305 eventhandler: P0,
23306 token: *mut i64,
23307 ) -> windows_core::Result<()>
23308 where
23309 P0: windows_core::Param<ICoreWebView2NotificationCloseRequestedEventHandler>,
23310 {
23311 unsafe {
23312 (windows_core::Interface::vtable(self).add_CloseRequested)(
23313 windows_core::Interface::as_raw(self),
23314 eventhandler.param().abi(),
23315 token as _,
23316 )
23317 .ok()
23318 }
23319 }
23320 pub unsafe fn remove_CloseRequested(&self, token: i64) -> windows_core::Result<()> {
23321 unsafe {
23322 (windows_core::Interface::vtable(self).remove_CloseRequested)(
23323 windows_core::Interface::as_raw(self),
23324 token,
23325 )
23326 .ok()
23327 }
23328 }
23329 pub unsafe fn ReportShown(&self) -> windows_core::Result<()> {
23330 unsafe {
23331 (windows_core::Interface::vtable(self).ReportShown)(windows_core::Interface::as_raw(
23332 self,
23333 ))
23334 .ok()
23335 }
23336 }
23337 pub unsafe fn ReportClicked(&self) -> windows_core::Result<()> {
23338 unsafe {
23339 (windows_core::Interface::vtable(self).ReportClicked)(windows_core::Interface::as_raw(
23340 self,
23341 ))
23342 .ok()
23343 }
23344 }
23345 pub unsafe fn ReportClosed(&self) -> windows_core::Result<()> {
23346 unsafe {
23347 (windows_core::Interface::vtable(self).ReportClosed)(windows_core::Interface::as_raw(
23348 self,
23349 ))
23350 .ok()
23351 }
23352 }
23353 pub unsafe fn Body(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23354 unsafe {
23355 (windows_core::Interface::vtable(self).Body)(
23356 windows_core::Interface::as_raw(self),
23357 value as _,
23358 )
23359 .ok()
23360 }
23361 }
23362 pub unsafe fn Direction(
23363 &self,
23364 value: *mut COREWEBVIEW2_TEXT_DIRECTION_KIND,
23365 ) -> windows_core::Result<()> {
23366 unsafe {
23367 (windows_core::Interface::vtable(self).Direction)(
23368 windows_core::Interface::as_raw(self),
23369 value as _,
23370 )
23371 .ok()
23372 }
23373 }
23374 pub unsafe fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23375 unsafe {
23376 (windows_core::Interface::vtable(self).Language)(
23377 windows_core::Interface::as_raw(self),
23378 value as _,
23379 )
23380 .ok()
23381 }
23382 }
23383 pub unsafe fn Tag(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23384 unsafe {
23385 (windows_core::Interface::vtable(self).Tag)(
23386 windows_core::Interface::as_raw(self),
23387 value as _,
23388 )
23389 .ok()
23390 }
23391 }
23392 pub unsafe fn IconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23393 unsafe {
23394 (windows_core::Interface::vtable(self).IconUri)(
23395 windows_core::Interface::as_raw(self),
23396 value as _,
23397 )
23398 .ok()
23399 }
23400 }
23401 pub unsafe fn Title(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23402 unsafe {
23403 (windows_core::Interface::vtable(self).Title)(
23404 windows_core::Interface::as_raw(self),
23405 value as _,
23406 )
23407 .ok()
23408 }
23409 }
23410 pub unsafe fn BadgeUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23411 unsafe {
23412 (windows_core::Interface::vtable(self).BadgeUri)(
23413 windows_core::Interface::as_raw(self),
23414 value as _,
23415 )
23416 .ok()
23417 }
23418 }
23419 pub unsafe fn BodyImageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23420 unsafe {
23421 (windows_core::Interface::vtable(self).BodyImageUri)(
23422 windows_core::Interface::as_raw(self),
23423 value as _,
23424 )
23425 .ok()
23426 }
23427 }
23428 pub unsafe fn ShouldRenotify(
23429 &self,
23430 value: *mut windows_core::BOOL,
23431 ) -> windows_core::Result<()> {
23432 unsafe {
23433 (windows_core::Interface::vtable(self).ShouldRenotify)(
23434 windows_core::Interface::as_raw(self),
23435 value as _,
23436 )
23437 .ok()
23438 }
23439 }
23440 pub unsafe fn RequiresInteraction(
23441 &self,
23442 value: *mut windows_core::BOOL,
23443 ) -> windows_core::Result<()> {
23444 unsafe {
23445 (windows_core::Interface::vtable(self).RequiresInteraction)(
23446 windows_core::Interface::as_raw(self),
23447 value as _,
23448 )
23449 .ok()
23450 }
23451 }
23452 pub unsafe fn IsSilent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
23453 unsafe {
23454 (windows_core::Interface::vtable(self).IsSilent)(
23455 windows_core::Interface::as_raw(self),
23456 value as _,
23457 )
23458 .ok()
23459 }
23460 }
23461 pub unsafe fn Timestamp(&self, value: *mut f64) -> windows_core::Result<()> {
23462 unsafe {
23463 (windows_core::Interface::vtable(self).Timestamp)(
23464 windows_core::Interface::as_raw(self),
23465 value as _,
23466 )
23467 .ok()
23468 }
23469 }
23470 pub unsafe fn GetVibrationPattern(
23471 &self,
23472 count: *mut u32,
23473 vibrationpattern: *mut *mut u64,
23474 ) -> windows_core::Result<()> {
23475 unsafe {
23476 (windows_core::Interface::vtable(self).GetVibrationPattern)(
23477 windows_core::Interface::as_raw(self),
23478 count as _,
23479 vibrationpattern as _,
23480 )
23481 .ok()
23482 }
23483 }
23484}
23485#[repr(C)]
23486pub struct ICoreWebView2Notification_Vtbl {
23487 pub base__: windows_core::IUnknown_Vtbl,
23488 pub add_CloseRequested: unsafe extern "system" fn(
23489 *mut core::ffi::c_void,
23490 *mut core::ffi::c_void,
23491 *mut i64,
23492 ) -> windows_core::HRESULT,
23493 pub remove_CloseRequested:
23494 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
23495 pub ReportShown: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
23496 pub ReportClicked: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
23497 pub ReportClosed: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
23498 pub Body: unsafe extern "system" fn(
23499 *mut core::ffi::c_void,
23500 *mut windows_core::PWSTR,
23501 ) -> windows_core::HRESULT,
23502 pub Direction: unsafe extern "system" fn(
23503 *mut core::ffi::c_void,
23504 *mut COREWEBVIEW2_TEXT_DIRECTION_KIND,
23505 ) -> windows_core::HRESULT,
23506 pub Language: unsafe extern "system" fn(
23507 *mut core::ffi::c_void,
23508 *mut windows_core::PWSTR,
23509 ) -> windows_core::HRESULT,
23510 pub Tag: unsafe extern "system" fn(
23511 *mut core::ffi::c_void,
23512 *mut windows_core::PWSTR,
23513 ) -> windows_core::HRESULT,
23514 pub IconUri: unsafe extern "system" fn(
23515 *mut core::ffi::c_void,
23516 *mut windows_core::PWSTR,
23517 ) -> windows_core::HRESULT,
23518 pub Title: unsafe extern "system" fn(
23519 *mut core::ffi::c_void,
23520 *mut windows_core::PWSTR,
23521 ) -> windows_core::HRESULT,
23522 pub BadgeUri: unsafe extern "system" fn(
23523 *mut core::ffi::c_void,
23524 *mut windows_core::PWSTR,
23525 ) -> windows_core::HRESULT,
23526 pub BodyImageUri: unsafe extern "system" fn(
23527 *mut core::ffi::c_void,
23528 *mut windows_core::PWSTR,
23529 ) -> windows_core::HRESULT,
23530 pub ShouldRenotify: unsafe extern "system" fn(
23531 *mut core::ffi::c_void,
23532 *mut windows_core::BOOL,
23533 ) -> windows_core::HRESULT,
23534 pub RequiresInteraction: unsafe extern "system" fn(
23535 *mut core::ffi::c_void,
23536 *mut windows_core::BOOL,
23537 ) -> windows_core::HRESULT,
23538 pub IsSilent: unsafe extern "system" fn(
23539 *mut core::ffi::c_void,
23540 *mut windows_core::BOOL,
23541 ) -> windows_core::HRESULT,
23542 pub Timestamp:
23543 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
23544 pub GetVibrationPattern: unsafe extern "system" fn(
23545 *mut core::ffi::c_void,
23546 *mut u32,
23547 *mut *mut u64,
23548 ) -> windows_core::HRESULT,
23549}
23550pub trait ICoreWebView2Notification_Impl: windows_core::IUnknownImpl {
23551 fn add_CloseRequested(
23552 &self,
23553 eventhandler: windows_core::Ref<'_, ICoreWebView2NotificationCloseRequestedEventHandler>,
23554 token: *mut i64,
23555 ) -> windows_core::Result<()>;
23556 fn remove_CloseRequested(&self, token: i64) -> windows_core::Result<()>;
23557 fn ReportShown(&self) -> windows_core::Result<()>;
23558 fn ReportClicked(&self) -> windows_core::Result<()>;
23559 fn ReportClosed(&self) -> windows_core::Result<()>;
23560 fn Body(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23561 fn Direction(&self, value: *mut COREWEBVIEW2_TEXT_DIRECTION_KIND) -> windows_core::Result<()>;
23562 fn Language(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23563 fn Tag(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23564 fn IconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23565 fn Title(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23566 fn BadgeUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23567 fn BodyImageUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
23568 fn ShouldRenotify(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
23569 fn RequiresInteraction(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
23570 fn IsSilent(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
23571 fn Timestamp(&self, value: *mut f64) -> windows_core::Result<()>;
23572 fn GetVibrationPattern(
23573 &self,
23574 count: *mut u32,
23575 vibrationpattern: *mut *mut u64,
23576 ) -> windows_core::Result<()>;
23577}
23578impl ICoreWebView2Notification_Vtbl {
23579 pub const fn new<Identity: ICoreWebView2Notification_Impl, const OFFSET: isize>() -> Self {
23580 unsafe extern "system" fn add_CloseRequested<
23581 Identity: ICoreWebView2Notification_Impl,
23582 const OFFSET: isize,
23583 >(
23584 this: *mut core::ffi::c_void,
23585 eventhandler: *mut core::ffi::c_void,
23586 token: *mut i64,
23587 ) -> windows_core::HRESULT {
23588 unsafe {
23589 let this: &Identity =
23590 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23591 ICoreWebView2Notification_Impl::add_CloseRequested(
23592 this,
23593 core::mem::transmute_copy(&eventhandler),
23594 core::mem::transmute_copy(&token),
23595 )
23596 .into()
23597 }
23598 }
23599 unsafe extern "system" fn remove_CloseRequested<
23600 Identity: ICoreWebView2Notification_Impl,
23601 const OFFSET: isize,
23602 >(
23603 this: *mut core::ffi::c_void,
23604 token: i64,
23605 ) -> windows_core::HRESULT {
23606 unsafe {
23607 let this: &Identity =
23608 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23609 ICoreWebView2Notification_Impl::remove_CloseRequested(
23610 this,
23611 core::mem::transmute_copy(&token),
23612 )
23613 .into()
23614 }
23615 }
23616 unsafe extern "system" fn ReportShown<
23617 Identity: ICoreWebView2Notification_Impl,
23618 const OFFSET: isize,
23619 >(
23620 this: *mut core::ffi::c_void,
23621 ) -> windows_core::HRESULT {
23622 unsafe {
23623 let this: &Identity =
23624 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23625 ICoreWebView2Notification_Impl::ReportShown(this).into()
23626 }
23627 }
23628 unsafe extern "system" fn ReportClicked<
23629 Identity: ICoreWebView2Notification_Impl,
23630 const OFFSET: isize,
23631 >(
23632 this: *mut core::ffi::c_void,
23633 ) -> windows_core::HRESULT {
23634 unsafe {
23635 let this: &Identity =
23636 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23637 ICoreWebView2Notification_Impl::ReportClicked(this).into()
23638 }
23639 }
23640 unsafe extern "system" fn ReportClosed<
23641 Identity: ICoreWebView2Notification_Impl,
23642 const OFFSET: isize,
23643 >(
23644 this: *mut core::ffi::c_void,
23645 ) -> windows_core::HRESULT {
23646 unsafe {
23647 let this: &Identity =
23648 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23649 ICoreWebView2Notification_Impl::ReportClosed(this).into()
23650 }
23651 }
23652 unsafe extern "system" fn Body<
23653 Identity: ICoreWebView2Notification_Impl,
23654 const OFFSET: isize,
23655 >(
23656 this: *mut core::ffi::c_void,
23657 value: *mut windows_core::PWSTR,
23658 ) -> windows_core::HRESULT {
23659 unsafe {
23660 let this: &Identity =
23661 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23662 ICoreWebView2Notification_Impl::Body(this, core::mem::transmute_copy(&value)).into()
23663 }
23664 }
23665 unsafe extern "system" fn Direction<
23666 Identity: ICoreWebView2Notification_Impl,
23667 const OFFSET: isize,
23668 >(
23669 this: *mut core::ffi::c_void,
23670 value: *mut COREWEBVIEW2_TEXT_DIRECTION_KIND,
23671 ) -> windows_core::HRESULT {
23672 unsafe {
23673 let this: &Identity =
23674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23675 ICoreWebView2Notification_Impl::Direction(this, core::mem::transmute_copy(&value))
23676 .into()
23677 }
23678 }
23679 unsafe extern "system" fn Language<
23680 Identity: ICoreWebView2Notification_Impl,
23681 const OFFSET: isize,
23682 >(
23683 this: *mut core::ffi::c_void,
23684 value: *mut windows_core::PWSTR,
23685 ) -> windows_core::HRESULT {
23686 unsafe {
23687 let this: &Identity =
23688 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23689 ICoreWebView2Notification_Impl::Language(this, core::mem::transmute_copy(&value))
23690 .into()
23691 }
23692 }
23693 unsafe extern "system" fn Tag<
23694 Identity: ICoreWebView2Notification_Impl,
23695 const OFFSET: isize,
23696 >(
23697 this: *mut core::ffi::c_void,
23698 value: *mut windows_core::PWSTR,
23699 ) -> windows_core::HRESULT {
23700 unsafe {
23701 let this: &Identity =
23702 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23703 ICoreWebView2Notification_Impl::Tag(this, core::mem::transmute_copy(&value)).into()
23704 }
23705 }
23706 unsafe extern "system" fn IconUri<
23707 Identity: ICoreWebView2Notification_Impl,
23708 const OFFSET: isize,
23709 >(
23710 this: *mut core::ffi::c_void,
23711 value: *mut windows_core::PWSTR,
23712 ) -> windows_core::HRESULT {
23713 unsafe {
23714 let this: &Identity =
23715 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23716 ICoreWebView2Notification_Impl::IconUri(this, core::mem::transmute_copy(&value))
23717 .into()
23718 }
23719 }
23720 unsafe extern "system" fn Title<
23721 Identity: ICoreWebView2Notification_Impl,
23722 const OFFSET: isize,
23723 >(
23724 this: *mut core::ffi::c_void,
23725 value: *mut windows_core::PWSTR,
23726 ) -> windows_core::HRESULT {
23727 unsafe {
23728 let this: &Identity =
23729 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23730 ICoreWebView2Notification_Impl::Title(this, core::mem::transmute_copy(&value))
23731 .into()
23732 }
23733 }
23734 unsafe extern "system" fn BadgeUri<
23735 Identity: ICoreWebView2Notification_Impl,
23736 const OFFSET: isize,
23737 >(
23738 this: *mut core::ffi::c_void,
23739 value: *mut windows_core::PWSTR,
23740 ) -> windows_core::HRESULT {
23741 unsafe {
23742 let this: &Identity =
23743 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23744 ICoreWebView2Notification_Impl::BadgeUri(this, core::mem::transmute_copy(&value))
23745 .into()
23746 }
23747 }
23748 unsafe extern "system" fn BodyImageUri<
23749 Identity: ICoreWebView2Notification_Impl,
23750 const OFFSET: isize,
23751 >(
23752 this: *mut core::ffi::c_void,
23753 value: *mut windows_core::PWSTR,
23754 ) -> windows_core::HRESULT {
23755 unsafe {
23756 let this: &Identity =
23757 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23758 ICoreWebView2Notification_Impl::BodyImageUri(
23759 this,
23760 core::mem::transmute_copy(&value),
23761 )
23762 .into()
23763 }
23764 }
23765 unsafe extern "system" fn ShouldRenotify<
23766 Identity: ICoreWebView2Notification_Impl,
23767 const OFFSET: isize,
23768 >(
23769 this: *mut core::ffi::c_void,
23770 value: *mut windows_core::BOOL,
23771 ) -> windows_core::HRESULT {
23772 unsafe {
23773 let this: &Identity =
23774 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23775 ICoreWebView2Notification_Impl::ShouldRenotify(
23776 this,
23777 core::mem::transmute_copy(&value),
23778 )
23779 .into()
23780 }
23781 }
23782 unsafe extern "system" fn RequiresInteraction<
23783 Identity: ICoreWebView2Notification_Impl,
23784 const OFFSET: isize,
23785 >(
23786 this: *mut core::ffi::c_void,
23787 value: *mut windows_core::BOOL,
23788 ) -> windows_core::HRESULT {
23789 unsafe {
23790 let this: &Identity =
23791 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23792 ICoreWebView2Notification_Impl::RequiresInteraction(
23793 this,
23794 core::mem::transmute_copy(&value),
23795 )
23796 .into()
23797 }
23798 }
23799 unsafe extern "system" fn IsSilent<
23800 Identity: ICoreWebView2Notification_Impl,
23801 const OFFSET: isize,
23802 >(
23803 this: *mut core::ffi::c_void,
23804 value: *mut windows_core::BOOL,
23805 ) -> windows_core::HRESULT {
23806 unsafe {
23807 let this: &Identity =
23808 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23809 ICoreWebView2Notification_Impl::IsSilent(this, core::mem::transmute_copy(&value))
23810 .into()
23811 }
23812 }
23813 unsafe extern "system" fn Timestamp<
23814 Identity: ICoreWebView2Notification_Impl,
23815 const OFFSET: isize,
23816 >(
23817 this: *mut core::ffi::c_void,
23818 value: *mut f64,
23819 ) -> windows_core::HRESULT {
23820 unsafe {
23821 let this: &Identity =
23822 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23823 ICoreWebView2Notification_Impl::Timestamp(this, core::mem::transmute_copy(&value))
23824 .into()
23825 }
23826 }
23827 unsafe extern "system" fn GetVibrationPattern<
23828 Identity: ICoreWebView2Notification_Impl,
23829 const OFFSET: isize,
23830 >(
23831 this: *mut core::ffi::c_void,
23832 count: *mut u32,
23833 vibrationpattern: *mut *mut u64,
23834 ) -> windows_core::HRESULT {
23835 unsafe {
23836 let this: &Identity =
23837 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23838 ICoreWebView2Notification_Impl::GetVibrationPattern(
23839 this,
23840 core::mem::transmute_copy(&count),
23841 core::mem::transmute_copy(&vibrationpattern),
23842 )
23843 .into()
23844 }
23845 }
23846 Self {
23847 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
23848 add_CloseRequested: add_CloseRequested::<Identity, OFFSET>,
23849 remove_CloseRequested: remove_CloseRequested::<Identity, OFFSET>,
23850 ReportShown: ReportShown::<Identity, OFFSET>,
23851 ReportClicked: ReportClicked::<Identity, OFFSET>,
23852 ReportClosed: ReportClosed::<Identity, OFFSET>,
23853 Body: Body::<Identity, OFFSET>,
23854 Direction: Direction::<Identity, OFFSET>,
23855 Language: Language::<Identity, OFFSET>,
23856 Tag: Tag::<Identity, OFFSET>,
23857 IconUri: IconUri::<Identity, OFFSET>,
23858 Title: Title::<Identity, OFFSET>,
23859 BadgeUri: BadgeUri::<Identity, OFFSET>,
23860 BodyImageUri: BodyImageUri::<Identity, OFFSET>,
23861 ShouldRenotify: ShouldRenotify::<Identity, OFFSET>,
23862 RequiresInteraction: RequiresInteraction::<Identity, OFFSET>,
23863 IsSilent: IsSilent::<Identity, OFFSET>,
23864 Timestamp: Timestamp::<Identity, OFFSET>,
23865 GetVibrationPattern: GetVibrationPattern::<Identity, OFFSET>,
23866 }
23867 }
23868 pub fn matches(iid: &windows_core::GUID) -> bool {
23869 iid == &<ICoreWebView2Notification as windows_core::Interface>::IID
23870 }
23871}
23872impl windows_core::RuntimeName for ICoreWebView2Notification {}
23873windows_core::imp::define_interface!(
23874 ICoreWebView2NotificationCloseRequestedEventHandler,
23875 ICoreWebView2NotificationCloseRequestedEventHandler_Vtbl,
23876 0x47c32d23_1e94_4733_85f1_d9bf4acd0974
23877);
23878windows_core::imp::interface_hierarchy!(
23879 ICoreWebView2NotificationCloseRequestedEventHandler,
23880 windows_core::IUnknown
23881);
23882impl ICoreWebView2NotificationCloseRequestedEventHandler {
23883 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
23884 where
23885 P0: windows_core::Param<ICoreWebView2Notification>,
23886 P1: windows_core::Param<windows_core::IUnknown>,
23887 {
23888 unsafe {
23889 (windows_core::Interface::vtable(self).Invoke)(
23890 windows_core::Interface::as_raw(self),
23891 sender.param().abi(),
23892 args.param().abi(),
23893 )
23894 .ok()
23895 }
23896 }
23897}
23898#[repr(C)]
23899pub struct ICoreWebView2NotificationCloseRequestedEventHandler_Vtbl {
23900 pub base__: windows_core::IUnknown_Vtbl,
23901 pub Invoke: unsafe extern "system" fn(
23902 *mut core::ffi::c_void,
23903 *mut core::ffi::c_void,
23904 *mut core::ffi::c_void,
23905 ) -> windows_core::HRESULT,
23906}
23907pub trait ICoreWebView2NotificationCloseRequestedEventHandler_Impl:
23908 windows_core::IUnknownImpl
23909{
23910 fn Invoke(
23911 &self,
23912 sender: windows_core::Ref<'_, ICoreWebView2Notification>,
23913 args: windows_core::Ref<'_, windows_core::IUnknown>,
23914 ) -> windows_core::Result<()>;
23915}
23916impl ICoreWebView2NotificationCloseRequestedEventHandler_Vtbl {
23917 pub const fn new<
23918 Identity: ICoreWebView2NotificationCloseRequestedEventHandler_Impl,
23919 const OFFSET: isize,
23920 >() -> Self {
23921 unsafe extern "system" fn Invoke<
23922 Identity: ICoreWebView2NotificationCloseRequestedEventHandler_Impl,
23923 const OFFSET: isize,
23924 >(
23925 this: *mut core::ffi::c_void,
23926 sender: *mut core::ffi::c_void,
23927 args: *mut core::ffi::c_void,
23928 ) -> windows_core::HRESULT {
23929 unsafe {
23930 let this: &Identity =
23931 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
23932 ICoreWebView2NotificationCloseRequestedEventHandler_Impl::Invoke(
23933 this,
23934 core::mem::transmute_copy(&sender),
23935 core::mem::transmute_copy(&args),
23936 )
23937 .into()
23938 }
23939 }
23940 Self {
23941 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
23942 Invoke: Invoke::<Identity, OFFSET>,
23943 }
23944 }
23945 pub fn matches(iid: &windows_core::GUID) -> bool {
23946 iid == & < ICoreWebView2NotificationCloseRequestedEventHandler as windows_core::Interface >::IID
23947 }
23948}
23949impl windows_core::RuntimeName for ICoreWebView2NotificationCloseRequestedEventHandler {}
23950windows_core::imp::define_interface!(
23951 ICoreWebView2NotificationReceivedEventArgs,
23952 ICoreWebView2NotificationReceivedEventArgs_Vtbl,
23953 0x1512dd5b_5514_4f85_886e_21c3a4c9cfe6
23954);
23955windows_core::imp::interface_hierarchy!(
23956 ICoreWebView2NotificationReceivedEventArgs,
23957 windows_core::IUnknown
23958);
23959impl ICoreWebView2NotificationReceivedEventArgs {
23960 pub unsafe fn SenderOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
23961 unsafe {
23962 (windows_core::Interface::vtable(self).SenderOrigin)(
23963 windows_core::Interface::as_raw(self),
23964 value as _,
23965 )
23966 .ok()
23967 }
23968 }
23969 pub unsafe fn Notification(&self) -> windows_core::Result<ICoreWebView2Notification> {
23970 unsafe {
23971 let mut result__ = core::mem::zeroed();
23972 (windows_core::Interface::vtable(self).Notification)(
23973 windows_core::Interface::as_raw(self),
23974 &mut result__,
23975 )
23976 .and_then(|| windows_core::Type::from_abi(result__))
23977 }
23978 }
23979 pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
23980 unsafe {
23981 (windows_core::Interface::vtable(self).SetHandled)(
23982 windows_core::Interface::as_raw(self),
23983 value.into(),
23984 )
23985 .ok()
23986 }
23987 }
23988 pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
23989 unsafe {
23990 (windows_core::Interface::vtable(self).Handled)(
23991 windows_core::Interface::as_raw(self),
23992 value as _,
23993 )
23994 .ok()
23995 }
23996 }
23997 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
23998 unsafe {
23999 let mut result__ = core::mem::zeroed();
24000 (windows_core::Interface::vtable(self).GetDeferral)(
24001 windows_core::Interface::as_raw(self),
24002 &mut result__,
24003 )
24004 .and_then(|| windows_core::Type::from_abi(result__))
24005 }
24006 }
24007}
24008#[repr(C)]
24009pub struct ICoreWebView2NotificationReceivedEventArgs_Vtbl {
24010 pub base__: windows_core::IUnknown_Vtbl,
24011 pub SenderOrigin: unsafe extern "system" fn(
24012 *mut core::ffi::c_void,
24013 *mut windows_core::PWSTR,
24014 ) -> windows_core::HRESULT,
24015 pub Notification: unsafe extern "system" fn(
24016 *mut core::ffi::c_void,
24017 *mut *mut core::ffi::c_void,
24018 ) -> windows_core::HRESULT,
24019 pub SetHandled: unsafe extern "system" fn(
24020 *mut core::ffi::c_void,
24021 windows_core::BOOL,
24022 ) -> windows_core::HRESULT,
24023 pub Handled: unsafe extern "system" fn(
24024 *mut core::ffi::c_void,
24025 *mut windows_core::BOOL,
24026 ) -> windows_core::HRESULT,
24027 pub GetDeferral: unsafe extern "system" fn(
24028 *mut core::ffi::c_void,
24029 *mut *mut core::ffi::c_void,
24030 ) -> windows_core::HRESULT,
24031}
24032pub trait ICoreWebView2NotificationReceivedEventArgs_Impl: windows_core::IUnknownImpl {
24033 fn SenderOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
24034 fn Notification(&self) -> windows_core::Result<ICoreWebView2Notification>;
24035 fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
24036 fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
24037 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
24038}
24039impl ICoreWebView2NotificationReceivedEventArgs_Vtbl {
24040 pub const fn new<
24041 Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
24042 const OFFSET: isize,
24043 >() -> Self {
24044 unsafe extern "system" fn SenderOrigin<
24045 Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
24046 const OFFSET: isize,
24047 >(
24048 this: *mut core::ffi::c_void,
24049 value: *mut windows_core::PWSTR,
24050 ) -> windows_core::HRESULT {
24051 unsafe {
24052 let this: &Identity =
24053 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24054 ICoreWebView2NotificationReceivedEventArgs_Impl::SenderOrigin(
24055 this,
24056 core::mem::transmute_copy(&value),
24057 )
24058 .into()
24059 }
24060 }
24061 unsafe extern "system" fn Notification<
24062 Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
24063 const OFFSET: isize,
24064 >(
24065 this: *mut core::ffi::c_void,
24066 value: *mut *mut core::ffi::c_void,
24067 ) -> windows_core::HRESULT {
24068 unsafe {
24069 let this: &Identity =
24070 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24071 match ICoreWebView2NotificationReceivedEventArgs_Impl::Notification(this) {
24072 Ok(ok__) => {
24073 value.write(core::mem::transmute(ok__));
24074 windows_core::HRESULT(0)
24075 }
24076 Err(err) => err.into(),
24077 }
24078 }
24079 }
24080 unsafe extern "system" fn SetHandled<
24081 Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
24082 const OFFSET: isize,
24083 >(
24084 this: *mut core::ffi::c_void,
24085 value: windows_core::BOOL,
24086 ) -> windows_core::HRESULT {
24087 unsafe {
24088 let this: &Identity =
24089 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24090 ICoreWebView2NotificationReceivedEventArgs_Impl::SetHandled(
24091 this,
24092 core::mem::transmute_copy(&value),
24093 )
24094 .into()
24095 }
24096 }
24097 unsafe extern "system" fn Handled<
24098 Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
24099 const OFFSET: isize,
24100 >(
24101 this: *mut core::ffi::c_void,
24102 value: *mut windows_core::BOOL,
24103 ) -> windows_core::HRESULT {
24104 unsafe {
24105 let this: &Identity =
24106 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24107 ICoreWebView2NotificationReceivedEventArgs_Impl::Handled(
24108 this,
24109 core::mem::transmute_copy(&value),
24110 )
24111 .into()
24112 }
24113 }
24114 unsafe extern "system" fn GetDeferral<
24115 Identity: ICoreWebView2NotificationReceivedEventArgs_Impl,
24116 const OFFSET: isize,
24117 >(
24118 this: *mut core::ffi::c_void,
24119 deferral: *mut *mut core::ffi::c_void,
24120 ) -> windows_core::HRESULT {
24121 unsafe {
24122 let this: &Identity =
24123 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24124 match ICoreWebView2NotificationReceivedEventArgs_Impl::GetDeferral(this) {
24125 Ok(ok__) => {
24126 deferral.write(core::mem::transmute(ok__));
24127 windows_core::HRESULT(0)
24128 }
24129 Err(err) => err.into(),
24130 }
24131 }
24132 }
24133 Self {
24134 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
24135 SenderOrigin: SenderOrigin::<Identity, OFFSET>,
24136 Notification: Notification::<Identity, OFFSET>,
24137 SetHandled: SetHandled::<Identity, OFFSET>,
24138 Handled: Handled::<Identity, OFFSET>,
24139 GetDeferral: GetDeferral::<Identity, OFFSET>,
24140 }
24141 }
24142 pub fn matches(iid: &windows_core::GUID) -> bool {
24143 iid == &<ICoreWebView2NotificationReceivedEventArgs as windows_core::Interface>::IID
24144 }
24145}
24146impl windows_core::RuntimeName for ICoreWebView2NotificationReceivedEventArgs {}
24147windows_core::imp::define_interface!(
24148 ICoreWebView2NotificationReceivedEventHandler,
24149 ICoreWebView2NotificationReceivedEventHandler_Vtbl,
24150 0x89c5d598_8788_423b_be97_e6e01c0f9ee3
24151);
24152windows_core::imp::interface_hierarchy!(
24153 ICoreWebView2NotificationReceivedEventHandler,
24154 windows_core::IUnknown
24155);
24156impl ICoreWebView2NotificationReceivedEventHandler {
24157 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
24158 where
24159 P0: windows_core::Param<ICoreWebView2>,
24160 P1: windows_core::Param<ICoreWebView2NotificationReceivedEventArgs>,
24161 {
24162 unsafe {
24163 (windows_core::Interface::vtable(self).Invoke)(
24164 windows_core::Interface::as_raw(self),
24165 sender.param().abi(),
24166 args.param().abi(),
24167 )
24168 .ok()
24169 }
24170 }
24171}
24172#[repr(C)]
24173pub struct ICoreWebView2NotificationReceivedEventHandler_Vtbl {
24174 pub base__: windows_core::IUnknown_Vtbl,
24175 pub Invoke: unsafe extern "system" fn(
24176 *mut core::ffi::c_void,
24177 *mut core::ffi::c_void,
24178 *mut core::ffi::c_void,
24179 ) -> windows_core::HRESULT,
24180}
24181pub trait ICoreWebView2NotificationReceivedEventHandler_Impl: windows_core::IUnknownImpl {
24182 fn Invoke(
24183 &self,
24184 sender: windows_core::Ref<'_, ICoreWebView2>,
24185 args: windows_core::Ref<'_, ICoreWebView2NotificationReceivedEventArgs>,
24186 ) -> windows_core::Result<()>;
24187}
24188impl ICoreWebView2NotificationReceivedEventHandler_Vtbl {
24189 pub const fn new<
24190 Identity: ICoreWebView2NotificationReceivedEventHandler_Impl,
24191 const OFFSET: isize,
24192 >() -> Self {
24193 unsafe extern "system" fn Invoke<
24194 Identity: ICoreWebView2NotificationReceivedEventHandler_Impl,
24195 const OFFSET: isize,
24196 >(
24197 this: *mut core::ffi::c_void,
24198 sender: *mut core::ffi::c_void,
24199 args: *mut core::ffi::c_void,
24200 ) -> windows_core::HRESULT {
24201 unsafe {
24202 let this: &Identity =
24203 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24204 ICoreWebView2NotificationReceivedEventHandler_Impl::Invoke(
24205 this,
24206 core::mem::transmute_copy(&sender),
24207 core::mem::transmute_copy(&args),
24208 )
24209 .into()
24210 }
24211 }
24212 Self {
24213 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
24214 Invoke: Invoke::<Identity, OFFSET>,
24215 }
24216 }
24217 pub fn matches(iid: &windows_core::GUID) -> bool {
24218 iid == &<ICoreWebView2NotificationReceivedEventHandler as windows_core::Interface>::IID
24219 }
24220}
24221impl windows_core::RuntimeName for ICoreWebView2NotificationReceivedEventHandler {}
24222windows_core::imp::define_interface!(
24223 ICoreWebView2ObjectCollection,
24224 ICoreWebView2ObjectCollection_Vtbl,
24225 0x5cfec11c_25bd_4e8d_9e1a_7acdaeeec047
24226);
24227impl core::ops::Deref for ICoreWebView2ObjectCollection {
24228 type Target = ICoreWebView2ObjectCollectionView;
24229 fn deref(&self) -> &Self::Target {
24230 unsafe { core::mem::transmute(self) }
24231 }
24232}
24233windows_core::imp::interface_hierarchy!(
24234 ICoreWebView2ObjectCollection,
24235 windows_core::IUnknown,
24236 ICoreWebView2ObjectCollectionView
24237);
24238impl ICoreWebView2ObjectCollection {
24239 pub unsafe fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()> {
24240 unsafe {
24241 (windows_core::Interface::vtable(self).RemoveValueAtIndex)(
24242 windows_core::Interface::as_raw(self),
24243 index,
24244 )
24245 .ok()
24246 }
24247 }
24248 pub unsafe fn InsertValueAtIndex<P1>(&self, index: u32, value: P1) -> windows_core::Result<()>
24249 where
24250 P1: windows_core::Param<windows_core::IUnknown>,
24251 {
24252 unsafe {
24253 (windows_core::Interface::vtable(self).InsertValueAtIndex)(
24254 windows_core::Interface::as_raw(self),
24255 index,
24256 value.param().abi(),
24257 )
24258 .ok()
24259 }
24260 }
24261}
24262#[repr(C)]
24263pub struct ICoreWebView2ObjectCollection_Vtbl {
24264 pub base__: ICoreWebView2ObjectCollectionView_Vtbl,
24265 pub RemoveValueAtIndex:
24266 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
24267 pub InsertValueAtIndex: unsafe extern "system" fn(
24268 *mut core::ffi::c_void,
24269 u32,
24270 *mut core::ffi::c_void,
24271 ) -> windows_core::HRESULT,
24272}
24273pub trait ICoreWebView2ObjectCollection_Impl: ICoreWebView2ObjectCollectionView_Impl {
24274 fn RemoveValueAtIndex(&self, index: u32) -> windows_core::Result<()>;
24275 fn InsertValueAtIndex(
24276 &self,
24277 index: u32,
24278 value: windows_core::Ref<'_, windows_core::IUnknown>,
24279 ) -> windows_core::Result<()>;
24280}
24281impl ICoreWebView2ObjectCollection_Vtbl {
24282 pub const fn new<Identity: ICoreWebView2ObjectCollection_Impl, const OFFSET: isize>() -> Self {
24283 unsafe extern "system" fn RemoveValueAtIndex<
24284 Identity: ICoreWebView2ObjectCollection_Impl,
24285 const OFFSET: isize,
24286 >(
24287 this: *mut core::ffi::c_void,
24288 index: u32,
24289 ) -> windows_core::HRESULT {
24290 unsafe {
24291 let this: &Identity =
24292 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24293 ICoreWebView2ObjectCollection_Impl::RemoveValueAtIndex(
24294 this,
24295 core::mem::transmute_copy(&index),
24296 )
24297 .into()
24298 }
24299 }
24300 unsafe extern "system" fn InsertValueAtIndex<
24301 Identity: ICoreWebView2ObjectCollection_Impl,
24302 const OFFSET: isize,
24303 >(
24304 this: *mut core::ffi::c_void,
24305 index: u32,
24306 value: *mut core::ffi::c_void,
24307 ) -> windows_core::HRESULT {
24308 unsafe {
24309 let this: &Identity =
24310 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24311 ICoreWebView2ObjectCollection_Impl::InsertValueAtIndex(
24312 this,
24313 core::mem::transmute_copy(&index),
24314 core::mem::transmute_copy(&value),
24315 )
24316 .into()
24317 }
24318 }
24319 Self {
24320 base__: ICoreWebView2ObjectCollectionView_Vtbl::new::<Identity, OFFSET>(),
24321 RemoveValueAtIndex: RemoveValueAtIndex::<Identity, OFFSET>,
24322 InsertValueAtIndex: InsertValueAtIndex::<Identity, OFFSET>,
24323 }
24324 }
24325 pub fn matches(iid: &windows_core::GUID) -> bool {
24326 iid == &<ICoreWebView2ObjectCollection as windows_core::Interface>::IID
24327 || iid == &<ICoreWebView2ObjectCollectionView as windows_core::Interface>::IID
24328 }
24329}
24330impl windows_core::RuntimeName for ICoreWebView2ObjectCollection {}
24331windows_core::imp::define_interface!(
24332 ICoreWebView2ObjectCollectionView,
24333 ICoreWebView2ObjectCollectionView_Vtbl,
24334 0x0f36fd87_4f69_4415_98da_888f89fb9a33
24335);
24336windows_core::imp::interface_hierarchy!(ICoreWebView2ObjectCollectionView, windows_core::IUnknown);
24337impl ICoreWebView2ObjectCollectionView {
24338 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
24339 unsafe {
24340 (windows_core::Interface::vtable(self).Count)(
24341 windows_core::Interface::as_raw(self),
24342 value as _,
24343 )
24344 .ok()
24345 }
24346 }
24347 pub unsafe fn GetValueAtIndex(
24348 &self,
24349 index: u32,
24350 ) -> windows_core::Result<windows_core::IUnknown> {
24351 unsafe {
24352 let mut result__ = core::mem::zeroed();
24353 (windows_core::Interface::vtable(self).GetValueAtIndex)(
24354 windows_core::Interface::as_raw(self),
24355 index,
24356 &mut result__,
24357 )
24358 .and_then(|| windows_core::Type::from_abi(result__))
24359 }
24360 }
24361}
24362#[repr(C)]
24363pub struct ICoreWebView2ObjectCollectionView_Vtbl {
24364 pub base__: windows_core::IUnknown_Vtbl,
24365 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
24366 pub GetValueAtIndex: unsafe extern "system" fn(
24367 *mut core::ffi::c_void,
24368 u32,
24369 *mut *mut core::ffi::c_void,
24370 ) -> windows_core::HRESULT,
24371}
24372pub trait ICoreWebView2ObjectCollectionView_Impl: windows_core::IUnknownImpl {
24373 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
24374 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<windows_core::IUnknown>;
24375}
24376impl ICoreWebView2ObjectCollectionView_Vtbl {
24377 pub const fn new<Identity: ICoreWebView2ObjectCollectionView_Impl, const OFFSET: isize>() -> Self
24378 {
24379 unsafe extern "system" fn Count<
24380 Identity: ICoreWebView2ObjectCollectionView_Impl,
24381 const OFFSET: isize,
24382 >(
24383 this: *mut core::ffi::c_void,
24384 value: *mut u32,
24385 ) -> windows_core::HRESULT {
24386 unsafe {
24387 let this: &Identity =
24388 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24389 ICoreWebView2ObjectCollectionView_Impl::Count(
24390 this,
24391 core::mem::transmute_copy(&value),
24392 )
24393 .into()
24394 }
24395 }
24396 unsafe extern "system" fn GetValueAtIndex<
24397 Identity: ICoreWebView2ObjectCollectionView_Impl,
24398 const OFFSET: isize,
24399 >(
24400 this: *mut core::ffi::c_void,
24401 index: u32,
24402 value: *mut *mut core::ffi::c_void,
24403 ) -> windows_core::HRESULT {
24404 unsafe {
24405 let this: &Identity =
24406 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24407 match ICoreWebView2ObjectCollectionView_Impl::GetValueAtIndex(
24408 this,
24409 core::mem::transmute_copy(&index),
24410 ) {
24411 Ok(ok__) => {
24412 value.write(core::mem::transmute(ok__));
24413 windows_core::HRESULT(0)
24414 }
24415 Err(err) => err.into(),
24416 }
24417 }
24418 }
24419 Self {
24420 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
24421 Count: Count::<Identity, OFFSET>,
24422 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
24423 }
24424 }
24425 pub fn matches(iid: &windows_core::GUID) -> bool {
24426 iid == &<ICoreWebView2ObjectCollectionView as windows_core::Interface>::IID
24427 }
24428}
24429impl windows_core::RuntimeName for ICoreWebView2ObjectCollectionView {}
24430windows_core::imp::define_interface!(
24431 ICoreWebView2PermissionRequestedEventArgs,
24432 ICoreWebView2PermissionRequestedEventArgs_Vtbl,
24433 0x973ae2ef_ff18_4894_8fb2_3c758f046810
24434);
24435windows_core::imp::interface_hierarchy!(
24436 ICoreWebView2PermissionRequestedEventArgs,
24437 windows_core::IUnknown
24438);
24439impl ICoreWebView2PermissionRequestedEventArgs {
24440 pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
24441 unsafe {
24442 (windows_core::Interface::vtable(self).Uri)(
24443 windows_core::Interface::as_raw(self),
24444 uri as _,
24445 )
24446 .ok()
24447 }
24448 }
24449 pub unsafe fn PermissionKind(
24450 &self,
24451 permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
24452 ) -> windows_core::Result<()> {
24453 unsafe {
24454 (windows_core::Interface::vtable(self).PermissionKind)(
24455 windows_core::Interface::as_raw(self),
24456 permissionkind as _,
24457 )
24458 .ok()
24459 }
24460 }
24461 pub unsafe fn IsUserInitiated(
24462 &self,
24463 isuserinitiated: *mut windows_core::BOOL,
24464 ) -> windows_core::Result<()> {
24465 unsafe {
24466 (windows_core::Interface::vtable(self).IsUserInitiated)(
24467 windows_core::Interface::as_raw(self),
24468 isuserinitiated as _,
24469 )
24470 .ok()
24471 }
24472 }
24473 pub unsafe fn State(
24474 &self,
24475 state: *mut COREWEBVIEW2_PERMISSION_STATE,
24476 ) -> windows_core::Result<()> {
24477 unsafe {
24478 (windows_core::Interface::vtable(self).State)(
24479 windows_core::Interface::as_raw(self),
24480 state as _,
24481 )
24482 .ok()
24483 }
24484 }
24485 pub unsafe fn SetState(
24486 &self,
24487 state: COREWEBVIEW2_PERMISSION_STATE,
24488 ) -> windows_core::Result<()> {
24489 unsafe {
24490 (windows_core::Interface::vtable(self).SetState)(
24491 windows_core::Interface::as_raw(self),
24492 state,
24493 )
24494 .ok()
24495 }
24496 }
24497 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
24498 unsafe {
24499 let mut result__ = core::mem::zeroed();
24500 (windows_core::Interface::vtable(self).GetDeferral)(
24501 windows_core::Interface::as_raw(self),
24502 &mut result__,
24503 )
24504 .and_then(|| windows_core::Type::from_abi(result__))
24505 }
24506 }
24507}
24508#[repr(C)]
24509pub struct ICoreWebView2PermissionRequestedEventArgs_Vtbl {
24510 pub base__: windows_core::IUnknown_Vtbl,
24511 pub Uri: unsafe extern "system" fn(
24512 *mut core::ffi::c_void,
24513 *mut windows_core::PWSTR,
24514 ) -> windows_core::HRESULT,
24515 pub PermissionKind: unsafe extern "system" fn(
24516 *mut core::ffi::c_void,
24517 *mut COREWEBVIEW2_PERMISSION_KIND,
24518 ) -> windows_core::HRESULT,
24519 pub IsUserInitiated: unsafe extern "system" fn(
24520 *mut core::ffi::c_void,
24521 *mut windows_core::BOOL,
24522 ) -> windows_core::HRESULT,
24523 pub State: unsafe extern "system" fn(
24524 *mut core::ffi::c_void,
24525 *mut COREWEBVIEW2_PERMISSION_STATE,
24526 ) -> windows_core::HRESULT,
24527 pub SetState: unsafe extern "system" fn(
24528 *mut core::ffi::c_void,
24529 COREWEBVIEW2_PERMISSION_STATE,
24530 ) -> windows_core::HRESULT,
24531 pub GetDeferral: unsafe extern "system" fn(
24532 *mut core::ffi::c_void,
24533 *mut *mut core::ffi::c_void,
24534 ) -> windows_core::HRESULT,
24535}
24536pub trait ICoreWebView2PermissionRequestedEventArgs_Impl: windows_core::IUnknownImpl {
24537 fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
24538 fn PermissionKind(
24539 &self,
24540 permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
24541 ) -> windows_core::Result<()>;
24542 fn IsUserInitiated(&self, isuserinitiated: *mut windows_core::BOOL)
24543 -> windows_core::Result<()>;
24544 fn State(&self, state: *mut COREWEBVIEW2_PERMISSION_STATE) -> windows_core::Result<()>;
24545 fn SetState(&self, state: COREWEBVIEW2_PERMISSION_STATE) -> windows_core::Result<()>;
24546 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
24547}
24548impl ICoreWebView2PermissionRequestedEventArgs_Vtbl {
24549 pub const fn new<
24550 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24551 const OFFSET: isize,
24552 >() -> Self {
24553 unsafe extern "system" fn Uri<
24554 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24555 const OFFSET: isize,
24556 >(
24557 this: *mut core::ffi::c_void,
24558 uri: *mut windows_core::PWSTR,
24559 ) -> windows_core::HRESULT {
24560 unsafe {
24561 let this: &Identity =
24562 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24563 ICoreWebView2PermissionRequestedEventArgs_Impl::Uri(
24564 this,
24565 core::mem::transmute_copy(&uri),
24566 )
24567 .into()
24568 }
24569 }
24570 unsafe extern "system" fn PermissionKind<
24571 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24572 const OFFSET: isize,
24573 >(
24574 this: *mut core::ffi::c_void,
24575 permissionkind: *mut COREWEBVIEW2_PERMISSION_KIND,
24576 ) -> windows_core::HRESULT {
24577 unsafe {
24578 let this: &Identity =
24579 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24580 ICoreWebView2PermissionRequestedEventArgs_Impl::PermissionKind(
24581 this,
24582 core::mem::transmute_copy(&permissionkind),
24583 )
24584 .into()
24585 }
24586 }
24587 unsafe extern "system" fn IsUserInitiated<
24588 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24589 const OFFSET: isize,
24590 >(
24591 this: *mut core::ffi::c_void,
24592 isuserinitiated: *mut windows_core::BOOL,
24593 ) -> windows_core::HRESULT {
24594 unsafe {
24595 let this: &Identity =
24596 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24597 ICoreWebView2PermissionRequestedEventArgs_Impl::IsUserInitiated(
24598 this,
24599 core::mem::transmute_copy(&isuserinitiated),
24600 )
24601 .into()
24602 }
24603 }
24604 unsafe extern "system" fn State<
24605 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24606 const OFFSET: isize,
24607 >(
24608 this: *mut core::ffi::c_void,
24609 state: *mut COREWEBVIEW2_PERMISSION_STATE,
24610 ) -> windows_core::HRESULT {
24611 unsafe {
24612 let this: &Identity =
24613 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24614 ICoreWebView2PermissionRequestedEventArgs_Impl::State(
24615 this,
24616 core::mem::transmute_copy(&state),
24617 )
24618 .into()
24619 }
24620 }
24621 unsafe extern "system" fn SetState<
24622 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24623 const OFFSET: isize,
24624 >(
24625 this: *mut core::ffi::c_void,
24626 state: COREWEBVIEW2_PERMISSION_STATE,
24627 ) -> windows_core::HRESULT {
24628 unsafe {
24629 let this: &Identity =
24630 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24631 ICoreWebView2PermissionRequestedEventArgs_Impl::SetState(
24632 this,
24633 core::mem::transmute_copy(&state),
24634 )
24635 .into()
24636 }
24637 }
24638 unsafe extern "system" fn GetDeferral<
24639 Identity: ICoreWebView2PermissionRequestedEventArgs_Impl,
24640 const OFFSET: isize,
24641 >(
24642 this: *mut core::ffi::c_void,
24643 deferral: *mut *mut core::ffi::c_void,
24644 ) -> windows_core::HRESULT {
24645 unsafe {
24646 let this: &Identity =
24647 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24648 match ICoreWebView2PermissionRequestedEventArgs_Impl::GetDeferral(this) {
24649 Ok(ok__) => {
24650 deferral.write(core::mem::transmute(ok__));
24651 windows_core::HRESULT(0)
24652 }
24653 Err(err) => err.into(),
24654 }
24655 }
24656 }
24657 Self {
24658 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
24659 Uri: Uri::<Identity, OFFSET>,
24660 PermissionKind: PermissionKind::<Identity, OFFSET>,
24661 IsUserInitiated: IsUserInitiated::<Identity, OFFSET>,
24662 State: State::<Identity, OFFSET>,
24663 SetState: SetState::<Identity, OFFSET>,
24664 GetDeferral: GetDeferral::<Identity, OFFSET>,
24665 }
24666 }
24667 pub fn matches(iid: &windows_core::GUID) -> bool {
24668 iid == &<ICoreWebView2PermissionRequestedEventArgs as windows_core::Interface>::IID
24669 }
24670}
24671impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs {}
24672windows_core::imp::define_interface!(
24673 ICoreWebView2PermissionRequestedEventArgs2,
24674 ICoreWebView2PermissionRequestedEventArgs2_Vtbl,
24675 0x74d7127f_9de6_4200_8734_42d6fb4ff741
24676);
24677impl core::ops::Deref for ICoreWebView2PermissionRequestedEventArgs2 {
24678 type Target = ICoreWebView2PermissionRequestedEventArgs;
24679 fn deref(&self) -> &Self::Target {
24680 unsafe { core::mem::transmute(self) }
24681 }
24682}
24683windows_core::imp::interface_hierarchy!(
24684 ICoreWebView2PermissionRequestedEventArgs2,
24685 windows_core::IUnknown,
24686 ICoreWebView2PermissionRequestedEventArgs
24687);
24688impl ICoreWebView2PermissionRequestedEventArgs2 {
24689 pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
24690 unsafe {
24691 (windows_core::Interface::vtable(self).Handled)(
24692 windows_core::Interface::as_raw(self),
24693 value as _,
24694 )
24695 .ok()
24696 }
24697 }
24698 pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
24699 unsafe {
24700 (windows_core::Interface::vtable(self).SetHandled)(
24701 windows_core::Interface::as_raw(self),
24702 value.into(),
24703 )
24704 .ok()
24705 }
24706 }
24707}
24708#[repr(C)]
24709pub struct ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
24710 pub base__: ICoreWebView2PermissionRequestedEventArgs_Vtbl,
24711 pub Handled: unsafe extern "system" fn(
24712 *mut core::ffi::c_void,
24713 *mut windows_core::BOOL,
24714 ) -> windows_core::HRESULT,
24715 pub SetHandled: unsafe extern "system" fn(
24716 *mut core::ffi::c_void,
24717 windows_core::BOOL,
24718 ) -> windows_core::HRESULT,
24719}
24720pub trait ICoreWebView2PermissionRequestedEventArgs2_Impl:
24721 ICoreWebView2PermissionRequestedEventArgs_Impl
24722{
24723 fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
24724 fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
24725}
24726impl ICoreWebView2PermissionRequestedEventArgs2_Vtbl {
24727 pub const fn new<
24728 Identity: ICoreWebView2PermissionRequestedEventArgs2_Impl,
24729 const OFFSET: isize,
24730 >() -> Self {
24731 unsafe extern "system" fn Handled<
24732 Identity: ICoreWebView2PermissionRequestedEventArgs2_Impl,
24733 const OFFSET: isize,
24734 >(
24735 this: *mut core::ffi::c_void,
24736 value: *mut windows_core::BOOL,
24737 ) -> windows_core::HRESULT {
24738 unsafe {
24739 let this: &Identity =
24740 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24741 ICoreWebView2PermissionRequestedEventArgs2_Impl::Handled(
24742 this,
24743 core::mem::transmute_copy(&value),
24744 )
24745 .into()
24746 }
24747 }
24748 unsafe extern "system" fn SetHandled<
24749 Identity: ICoreWebView2PermissionRequestedEventArgs2_Impl,
24750 const OFFSET: isize,
24751 >(
24752 this: *mut core::ffi::c_void,
24753 value: windows_core::BOOL,
24754 ) -> windows_core::HRESULT {
24755 unsafe {
24756 let this: &Identity =
24757 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24758 ICoreWebView2PermissionRequestedEventArgs2_Impl::SetHandled(
24759 this,
24760 core::mem::transmute_copy(&value),
24761 )
24762 .into()
24763 }
24764 }
24765 Self {
24766 base__: ICoreWebView2PermissionRequestedEventArgs_Vtbl::new::<Identity, OFFSET>(),
24767 Handled: Handled::<Identity, OFFSET>,
24768 SetHandled: SetHandled::<Identity, OFFSET>,
24769 }
24770 }
24771 pub fn matches(iid: &windows_core::GUID) -> bool {
24772 iid == &<ICoreWebView2PermissionRequestedEventArgs2 as windows_core::Interface>::IID
24773 || iid == &<ICoreWebView2PermissionRequestedEventArgs as windows_core::Interface>::IID
24774 }
24775}
24776impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs2 {}
24777windows_core::imp::define_interface!(
24778 ICoreWebView2PermissionRequestedEventArgs3,
24779 ICoreWebView2PermissionRequestedEventArgs3_Vtbl,
24780 0xe61670bc_3dce_4177_86d2_c629ae3cb6ac
24781);
24782impl core::ops::Deref for ICoreWebView2PermissionRequestedEventArgs3 {
24783 type Target = ICoreWebView2PermissionRequestedEventArgs2;
24784 fn deref(&self) -> &Self::Target {
24785 unsafe { core::mem::transmute(self) }
24786 }
24787}
24788windows_core::imp::interface_hierarchy!(
24789 ICoreWebView2PermissionRequestedEventArgs3,
24790 windows_core::IUnknown,
24791 ICoreWebView2PermissionRequestedEventArgs,
24792 ICoreWebView2PermissionRequestedEventArgs2
24793);
24794impl ICoreWebView2PermissionRequestedEventArgs3 {
24795 pub unsafe fn SavesInProfile(
24796 &self,
24797 value: *mut windows_core::BOOL,
24798 ) -> windows_core::Result<()> {
24799 unsafe {
24800 (windows_core::Interface::vtable(self).SavesInProfile)(
24801 windows_core::Interface::as_raw(self),
24802 value as _,
24803 )
24804 .ok()
24805 }
24806 }
24807 pub unsafe fn SetSavesInProfile(&self, value: bool) -> windows_core::Result<()> {
24808 unsafe {
24809 (windows_core::Interface::vtable(self).SetSavesInProfile)(
24810 windows_core::Interface::as_raw(self),
24811 value.into(),
24812 )
24813 .ok()
24814 }
24815 }
24816}
24817#[repr(C)]
24818pub struct ICoreWebView2PermissionRequestedEventArgs3_Vtbl {
24819 pub base__: ICoreWebView2PermissionRequestedEventArgs2_Vtbl,
24820 pub SavesInProfile: unsafe extern "system" fn(
24821 *mut core::ffi::c_void,
24822 *mut windows_core::BOOL,
24823 ) -> windows_core::HRESULT,
24824 pub SetSavesInProfile: unsafe extern "system" fn(
24825 *mut core::ffi::c_void,
24826 windows_core::BOOL,
24827 ) -> windows_core::HRESULT,
24828}
24829pub trait ICoreWebView2PermissionRequestedEventArgs3_Impl:
24830 ICoreWebView2PermissionRequestedEventArgs2_Impl
24831{
24832 fn SavesInProfile(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
24833 fn SetSavesInProfile(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
24834}
24835impl ICoreWebView2PermissionRequestedEventArgs3_Vtbl {
24836 pub const fn new<
24837 Identity: ICoreWebView2PermissionRequestedEventArgs3_Impl,
24838 const OFFSET: isize,
24839 >() -> Self {
24840 unsafe extern "system" fn SavesInProfile<
24841 Identity: ICoreWebView2PermissionRequestedEventArgs3_Impl,
24842 const OFFSET: isize,
24843 >(
24844 this: *mut core::ffi::c_void,
24845 value: *mut windows_core::BOOL,
24846 ) -> windows_core::HRESULT {
24847 unsafe {
24848 let this: &Identity =
24849 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24850 ICoreWebView2PermissionRequestedEventArgs3_Impl::SavesInProfile(
24851 this,
24852 core::mem::transmute_copy(&value),
24853 )
24854 .into()
24855 }
24856 }
24857 unsafe extern "system" fn SetSavesInProfile<
24858 Identity: ICoreWebView2PermissionRequestedEventArgs3_Impl,
24859 const OFFSET: isize,
24860 >(
24861 this: *mut core::ffi::c_void,
24862 value: windows_core::BOOL,
24863 ) -> windows_core::HRESULT {
24864 unsafe {
24865 let this: &Identity =
24866 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24867 ICoreWebView2PermissionRequestedEventArgs3_Impl::SetSavesInProfile(
24868 this,
24869 core::mem::transmute_copy(&value),
24870 )
24871 .into()
24872 }
24873 }
24874 Self {
24875 base__: ICoreWebView2PermissionRequestedEventArgs2_Vtbl::new::<Identity, OFFSET>(),
24876 SavesInProfile: SavesInProfile::<Identity, OFFSET>,
24877 SetSavesInProfile: SetSavesInProfile::<Identity, OFFSET>,
24878 }
24879 }
24880 pub fn matches(iid: &windows_core::GUID) -> bool {
24881 iid == &<ICoreWebView2PermissionRequestedEventArgs3 as windows_core::Interface>::IID
24882 || iid == &<ICoreWebView2PermissionRequestedEventArgs as windows_core::Interface>::IID
24883 || iid == &<ICoreWebView2PermissionRequestedEventArgs2 as windows_core::Interface>::IID
24884 }
24885}
24886impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventArgs3 {}
24887windows_core::imp::define_interface!(
24888 ICoreWebView2PermissionRequestedEventHandler,
24889 ICoreWebView2PermissionRequestedEventHandler_Vtbl,
24890 0x15e1c6a3_c72a_4df3_91d7_d097fbec6bfd
24891);
24892windows_core::imp::interface_hierarchy!(
24893 ICoreWebView2PermissionRequestedEventHandler,
24894 windows_core::IUnknown
24895);
24896impl ICoreWebView2PermissionRequestedEventHandler {
24897 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
24898 where
24899 P0: windows_core::Param<ICoreWebView2>,
24900 P1: windows_core::Param<ICoreWebView2PermissionRequestedEventArgs>,
24901 {
24902 unsafe {
24903 (windows_core::Interface::vtable(self).Invoke)(
24904 windows_core::Interface::as_raw(self),
24905 sender.param().abi(),
24906 args.param().abi(),
24907 )
24908 .ok()
24909 }
24910 }
24911}
24912#[repr(C)]
24913pub struct ICoreWebView2PermissionRequestedEventHandler_Vtbl {
24914 pub base__: windows_core::IUnknown_Vtbl,
24915 pub Invoke: unsafe extern "system" fn(
24916 *mut core::ffi::c_void,
24917 *mut core::ffi::c_void,
24918 *mut core::ffi::c_void,
24919 ) -> windows_core::HRESULT,
24920}
24921pub trait ICoreWebView2PermissionRequestedEventHandler_Impl: windows_core::IUnknownImpl {
24922 fn Invoke(
24923 &self,
24924 sender: windows_core::Ref<'_, ICoreWebView2>,
24925 args: windows_core::Ref<'_, ICoreWebView2PermissionRequestedEventArgs>,
24926 ) -> windows_core::Result<()>;
24927}
24928impl ICoreWebView2PermissionRequestedEventHandler_Vtbl {
24929 pub const fn new<
24930 Identity: ICoreWebView2PermissionRequestedEventHandler_Impl,
24931 const OFFSET: isize,
24932 >() -> Self {
24933 unsafe extern "system" fn Invoke<
24934 Identity: ICoreWebView2PermissionRequestedEventHandler_Impl,
24935 const OFFSET: isize,
24936 >(
24937 this: *mut core::ffi::c_void,
24938 sender: *mut core::ffi::c_void,
24939 args: *mut core::ffi::c_void,
24940 ) -> windows_core::HRESULT {
24941 unsafe {
24942 let this: &Identity =
24943 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
24944 ICoreWebView2PermissionRequestedEventHandler_Impl::Invoke(
24945 this,
24946 core::mem::transmute_copy(&sender),
24947 core::mem::transmute_copy(&args),
24948 )
24949 .into()
24950 }
24951 }
24952 Self {
24953 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
24954 Invoke: Invoke::<Identity, OFFSET>,
24955 }
24956 }
24957 pub fn matches(iid: &windows_core::GUID) -> bool {
24958 iid == &<ICoreWebView2PermissionRequestedEventHandler as windows_core::Interface>::IID
24959 }
24960}
24961impl windows_core::RuntimeName for ICoreWebView2PermissionRequestedEventHandler {}
24962windows_core::imp::define_interface!(
24963 ICoreWebView2PermissionSetting,
24964 ICoreWebView2PermissionSetting_Vtbl,
24965 0x792b6eca_5576_421c_9119_74ebb3a4ffb3
24966);
24967windows_core::imp::interface_hierarchy!(ICoreWebView2PermissionSetting, windows_core::IUnknown);
24968impl ICoreWebView2PermissionSetting {
24969 pub unsafe fn PermissionKind(
24970 &self,
24971 value: *mut COREWEBVIEW2_PERMISSION_KIND,
24972 ) -> windows_core::Result<()> {
24973 unsafe {
24974 (windows_core::Interface::vtable(self).PermissionKind)(
24975 windows_core::Interface::as_raw(self),
24976 value as _,
24977 )
24978 .ok()
24979 }
24980 }
24981 pub unsafe fn PermissionOrigin(
24982 &self,
24983 value: *mut windows_core::PWSTR,
24984 ) -> windows_core::Result<()> {
24985 unsafe {
24986 (windows_core::Interface::vtable(self).PermissionOrigin)(
24987 windows_core::Interface::as_raw(self),
24988 value as _,
24989 )
24990 .ok()
24991 }
24992 }
24993 pub unsafe fn PermissionState(
24994 &self,
24995 value: *mut COREWEBVIEW2_PERMISSION_STATE,
24996 ) -> windows_core::Result<()> {
24997 unsafe {
24998 (windows_core::Interface::vtable(self).PermissionState)(
24999 windows_core::Interface::as_raw(self),
25000 value as _,
25001 )
25002 .ok()
25003 }
25004 }
25005}
25006#[repr(C)]
25007pub struct ICoreWebView2PermissionSetting_Vtbl {
25008 pub base__: windows_core::IUnknown_Vtbl,
25009 pub PermissionKind: unsafe extern "system" fn(
25010 *mut core::ffi::c_void,
25011 *mut COREWEBVIEW2_PERMISSION_KIND,
25012 ) -> windows_core::HRESULT,
25013 pub PermissionOrigin: unsafe extern "system" fn(
25014 *mut core::ffi::c_void,
25015 *mut windows_core::PWSTR,
25016 ) -> windows_core::HRESULT,
25017 pub PermissionState: unsafe extern "system" fn(
25018 *mut core::ffi::c_void,
25019 *mut COREWEBVIEW2_PERMISSION_STATE,
25020 ) -> windows_core::HRESULT,
25021}
25022pub trait ICoreWebView2PermissionSetting_Impl: windows_core::IUnknownImpl {
25023 fn PermissionKind(&self, value: *mut COREWEBVIEW2_PERMISSION_KIND) -> windows_core::Result<()>;
25024 fn PermissionOrigin(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
25025 fn PermissionState(
25026 &self,
25027 value: *mut COREWEBVIEW2_PERMISSION_STATE,
25028 ) -> windows_core::Result<()>;
25029}
25030impl ICoreWebView2PermissionSetting_Vtbl {
25031 pub const fn new<Identity: ICoreWebView2PermissionSetting_Impl, const OFFSET: isize>() -> Self {
25032 unsafe extern "system" fn PermissionKind<
25033 Identity: ICoreWebView2PermissionSetting_Impl,
25034 const OFFSET: isize,
25035 >(
25036 this: *mut core::ffi::c_void,
25037 value: *mut COREWEBVIEW2_PERMISSION_KIND,
25038 ) -> windows_core::HRESULT {
25039 unsafe {
25040 let this: &Identity =
25041 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
25042 ICoreWebView2PermissionSetting_Impl::PermissionKind(
25043 this,
25044 core::mem::transmute_copy(&value),
25045 )
25046 .into()
25047 }
25048 }
25049 unsafe extern "system" fn PermissionOrigin<
25050 Identity: ICoreWebView2PermissionSetting_Impl,
25051 const OFFSET: isize,
25052 >(
25053 this: *mut core::ffi::c_void,
25054 value: *mut windows_core::PWSTR,
25055 ) -> windows_core::HRESULT {
25056 unsafe {
25057 let this: &Identity =
25058 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
25059 ICoreWebView2PermissionSetting_Impl::PermissionOrigin(
25060 this,
25061 core::mem::transmute_copy(&value),
25062 )
25063 .into()
25064 }
25065 }
25066 unsafe extern "system" fn PermissionState<
25067 Identity: ICoreWebView2PermissionSetting_Impl,
25068 const OFFSET: isize,
25069 >(
25070 this: *mut core::ffi::c_void,
25071 value: *mut COREWEBVIEW2_PERMISSION_STATE,
25072 ) -> windows_core::HRESULT {
25073 unsafe {
25074 let this: &Identity =
25075 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
25076 ICoreWebView2PermissionSetting_Impl::PermissionState(
25077 this,
25078 core::mem::transmute_copy(&value),
25079 )
25080 .into()
25081 }
25082 }
25083 Self {
25084 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
25085 PermissionKind: PermissionKind::<Identity, OFFSET>,
25086 PermissionOrigin: PermissionOrigin::<Identity, OFFSET>,
25087 PermissionState: PermissionState::<Identity, OFFSET>,
25088 }
25089 }
25090 pub fn matches(iid: &windows_core::GUID) -> bool {
25091 iid == &<ICoreWebView2PermissionSetting as windows_core::Interface>::IID
25092 }
25093}
25094impl windows_core::RuntimeName for ICoreWebView2PermissionSetting {}
25095windows_core::imp::define_interface!(
25096 ICoreWebView2PermissionSettingCollectionView,
25097 ICoreWebView2PermissionSettingCollectionView_Vtbl,
25098 0xf5596f62_3de5_47b1_91e8_a4104b596b96
25099);
25100windows_core::imp::interface_hierarchy!(
25101 ICoreWebView2PermissionSettingCollectionView,
25102 windows_core::IUnknown
25103);
25104impl ICoreWebView2PermissionSettingCollectionView {
25105 pub unsafe fn GetValueAtIndex(
25106 &self,
25107 index: u32,
25108 ) -> windows_core::Result<ICoreWebView2PermissionSetting> {
25109 unsafe {
25110 let mut result__ = core::mem::zeroed();
25111 (windows_core::Interface::vtable(self).GetValueAtIndex)(
25112 windows_core::Interface::as_raw(self),
25113 index,
25114 &mut result__,
25115 )
25116 .and_then(|| windows_core::Type::from_abi(result__))
25117 }
25118 }
25119 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
25120 unsafe {
25121 (windows_core::Interface::vtable(self).Count)(
25122 windows_core::Interface::as_raw(self),
25123 value as _,
25124 )
25125 .ok()
25126 }
25127 }
25128}
25129#[repr(C)]
25130pub struct ICoreWebView2PermissionSettingCollectionView_Vtbl {
25131 pub base__: windows_core::IUnknown_Vtbl,
25132 pub GetValueAtIndex: unsafe extern "system" fn(
25133 *mut core::ffi::c_void,
25134 u32,
25135 *mut *mut core::ffi::c_void,
25136 ) -> windows_core::HRESULT,
25137 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25138}
25139pub trait ICoreWebView2PermissionSettingCollectionView_Impl: windows_core::IUnknownImpl {
25140 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2PermissionSetting>;
25141 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
25142}
25143impl ICoreWebView2PermissionSettingCollectionView_Vtbl {
25144 pub const fn new<
25145 Identity: ICoreWebView2PermissionSettingCollectionView_Impl,
25146 const OFFSET: isize,
25147 >() -> Self {
25148 unsafe extern "system" fn GetValueAtIndex<
25149 Identity: ICoreWebView2PermissionSettingCollectionView_Impl,
25150 const OFFSET: isize,
25151 >(
25152 this: *mut core::ffi::c_void,
25153 index: u32,
25154 permissionsetting: *mut *mut core::ffi::c_void,
25155 ) -> windows_core::HRESULT {
25156 unsafe {
25157 let this: &Identity =
25158 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
25159 match ICoreWebView2PermissionSettingCollectionView_Impl::GetValueAtIndex(
25160 this,
25161 core::mem::transmute_copy(&index),
25162 ) {
25163 Ok(ok__) => {
25164 permissionsetting.write(core::mem::transmute(ok__));
25165 windows_core::HRESULT(0)
25166 }
25167 Err(err) => err.into(),
25168 }
25169 }
25170 }
25171 unsafe extern "system" fn Count<
25172 Identity: ICoreWebView2PermissionSettingCollectionView_Impl,
25173 const OFFSET: isize,
25174 >(
25175 this: *mut core::ffi::c_void,
25176 value: *mut u32,
25177 ) -> windows_core::HRESULT {
25178 unsafe {
25179 let this: &Identity =
25180 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
25181 ICoreWebView2PermissionSettingCollectionView_Impl::Count(
25182 this,
25183 core::mem::transmute_copy(&value),
25184 )
25185 .into()
25186 }
25187 }
25188 Self {
25189 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
25190 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
25191 Count: Count::<Identity, OFFSET>,
25192 }
25193 }
25194 pub fn matches(iid: &windows_core::GUID) -> bool {
25195 iid == &<ICoreWebView2PermissionSettingCollectionView as windows_core::Interface>::IID
25196 }
25197}
25198impl windows_core::RuntimeName for ICoreWebView2PermissionSettingCollectionView {}
25199windows_core::imp::define_interface!(
25200 ICoreWebView2PointerInfo,
25201 ICoreWebView2PointerInfo_Vtbl,
25202 0xe6995887_d10d_4f5d_9359_4ce46e4f96b9
25203);
25204windows_core::imp::interface_hierarchy!(ICoreWebView2PointerInfo, windows_core::IUnknown);
25205impl ICoreWebView2PointerInfo {
25206 pub unsafe fn PointerKind(&self, pointerkind: *mut u32) -> windows_core::Result<()> {
25207 unsafe {
25208 (windows_core::Interface::vtable(self).PointerKind)(
25209 windows_core::Interface::as_raw(self),
25210 pointerkind as _,
25211 )
25212 .ok()
25213 }
25214 }
25215 pub unsafe fn SetPointerKind(&self, pointerkind: u32) -> windows_core::Result<()> {
25216 unsafe {
25217 (windows_core::Interface::vtable(self).SetPointerKind)(
25218 windows_core::Interface::as_raw(self),
25219 pointerkind,
25220 )
25221 .ok()
25222 }
25223 }
25224 pub unsafe fn PointerId(&self, pointerid: *mut u32) -> windows_core::Result<()> {
25225 unsafe {
25226 (windows_core::Interface::vtable(self).PointerId)(
25227 windows_core::Interface::as_raw(self),
25228 pointerid as _,
25229 )
25230 .ok()
25231 }
25232 }
25233 pub unsafe fn SetPointerId(&self, pointerid: u32) -> windows_core::Result<()> {
25234 unsafe {
25235 (windows_core::Interface::vtable(self).SetPointerId)(
25236 windows_core::Interface::as_raw(self),
25237 pointerid,
25238 )
25239 .ok()
25240 }
25241 }
25242 pub unsafe fn FrameId(&self, frameid: *mut u32) -> windows_core::Result<()> {
25243 unsafe {
25244 (windows_core::Interface::vtable(self).FrameId)(
25245 windows_core::Interface::as_raw(self),
25246 frameid as _,
25247 )
25248 .ok()
25249 }
25250 }
25251 pub unsafe fn SetFrameId(&self, frameid: u32) -> windows_core::Result<()> {
25252 unsafe {
25253 (windows_core::Interface::vtable(self).SetFrameId)(
25254 windows_core::Interface::as_raw(self),
25255 frameid,
25256 )
25257 .ok()
25258 }
25259 }
25260 pub unsafe fn PointerFlags(&self, pointerflags: *mut u32) -> windows_core::Result<()> {
25261 unsafe {
25262 (windows_core::Interface::vtable(self).PointerFlags)(
25263 windows_core::Interface::as_raw(self),
25264 pointerflags as _,
25265 )
25266 .ok()
25267 }
25268 }
25269 pub unsafe fn SetPointerFlags(&self, pointerflags: u32) -> windows_core::Result<()> {
25270 unsafe {
25271 (windows_core::Interface::vtable(self).SetPointerFlags)(
25272 windows_core::Interface::as_raw(self),
25273 pointerflags,
25274 )
25275 .ok()
25276 }
25277 }
25278 pub unsafe fn PointerDeviceRect(
25279 &self,
25280 pointerdevicerect: *mut windows::Win32::Foundation::RECT,
25281 ) -> windows_core::Result<()> {
25282 unsafe {
25283 (windows_core::Interface::vtable(self).PointerDeviceRect)(
25284 windows_core::Interface::as_raw(self),
25285 pointerdevicerect as _,
25286 )
25287 .ok()
25288 }
25289 }
25290 pub unsafe fn SetPointerDeviceRect(
25291 &self,
25292 pointerdevicerect: windows::Win32::Foundation::RECT,
25293 ) -> windows_core::Result<()> {
25294 unsafe {
25295 (windows_core::Interface::vtable(self).SetPointerDeviceRect)(
25296 windows_core::Interface::as_raw(self),
25297 core::mem::transmute(pointerdevicerect),
25298 )
25299 .ok()
25300 }
25301 }
25302 pub unsafe fn DisplayRect(
25303 &self,
25304 displayrect: *mut windows::Win32::Foundation::RECT,
25305 ) -> windows_core::Result<()> {
25306 unsafe {
25307 (windows_core::Interface::vtable(self).DisplayRect)(
25308 windows_core::Interface::as_raw(self),
25309 displayrect as _,
25310 )
25311 .ok()
25312 }
25313 }
25314 pub unsafe fn SetDisplayRect(
25315 &self,
25316 displayrect: windows::Win32::Foundation::RECT,
25317 ) -> windows_core::Result<()> {
25318 unsafe {
25319 (windows_core::Interface::vtable(self).SetDisplayRect)(
25320 windows_core::Interface::as_raw(self),
25321 core::mem::transmute(displayrect),
25322 )
25323 .ok()
25324 }
25325 }
25326 pub unsafe fn PixelLocation(
25327 &self,
25328 pixellocation: *mut windows::Win32::Foundation::POINT,
25329 ) -> windows_core::Result<()> {
25330 unsafe {
25331 (windows_core::Interface::vtable(self).PixelLocation)(
25332 windows_core::Interface::as_raw(self),
25333 pixellocation as _,
25334 )
25335 .ok()
25336 }
25337 }
25338 pub unsafe fn SetPixelLocation(
25339 &self,
25340 pixellocation: windows::Win32::Foundation::POINT,
25341 ) -> windows_core::Result<()> {
25342 unsafe {
25343 (windows_core::Interface::vtable(self).SetPixelLocation)(
25344 windows_core::Interface::as_raw(self),
25345 core::mem::transmute(pixellocation),
25346 )
25347 .ok()
25348 }
25349 }
25350 pub unsafe fn HimetricLocation(
25351 &self,
25352 himetriclocation: *mut windows::Win32::Foundation::POINT,
25353 ) -> windows_core::Result<()> {
25354 unsafe {
25355 (windows_core::Interface::vtable(self).HimetricLocation)(
25356 windows_core::Interface::as_raw(self),
25357 himetriclocation as _,
25358 )
25359 .ok()
25360 }
25361 }
25362 pub unsafe fn SetHimetricLocation(
25363 &self,
25364 himetriclocation: windows::Win32::Foundation::POINT,
25365 ) -> windows_core::Result<()> {
25366 unsafe {
25367 (windows_core::Interface::vtable(self).SetHimetricLocation)(
25368 windows_core::Interface::as_raw(self),
25369 core::mem::transmute(himetriclocation),
25370 )
25371 .ok()
25372 }
25373 }
25374 pub unsafe fn PixelLocationRaw(
25375 &self,
25376 pixellocationraw: *mut windows::Win32::Foundation::POINT,
25377 ) -> windows_core::Result<()> {
25378 unsafe {
25379 (windows_core::Interface::vtable(self).PixelLocationRaw)(
25380 windows_core::Interface::as_raw(self),
25381 pixellocationraw as _,
25382 )
25383 .ok()
25384 }
25385 }
25386 pub unsafe fn SetPixelLocationRaw(
25387 &self,
25388 pixellocationraw: windows::Win32::Foundation::POINT,
25389 ) -> windows_core::Result<()> {
25390 unsafe {
25391 (windows_core::Interface::vtable(self).SetPixelLocationRaw)(
25392 windows_core::Interface::as_raw(self),
25393 core::mem::transmute(pixellocationraw),
25394 )
25395 .ok()
25396 }
25397 }
25398 pub unsafe fn HimetricLocationRaw(
25399 &self,
25400 himetriclocationraw: *mut windows::Win32::Foundation::POINT,
25401 ) -> windows_core::Result<()> {
25402 unsafe {
25403 (windows_core::Interface::vtable(self).HimetricLocationRaw)(
25404 windows_core::Interface::as_raw(self),
25405 himetriclocationraw as _,
25406 )
25407 .ok()
25408 }
25409 }
25410 pub unsafe fn SetHimetricLocationRaw(
25411 &self,
25412 himetriclocationraw: windows::Win32::Foundation::POINT,
25413 ) -> windows_core::Result<()> {
25414 unsafe {
25415 (windows_core::Interface::vtable(self).SetHimetricLocationRaw)(
25416 windows_core::Interface::as_raw(self),
25417 core::mem::transmute(himetriclocationraw),
25418 )
25419 .ok()
25420 }
25421 }
25422 pub unsafe fn Time(&self, time: *mut u32) -> windows_core::Result<()> {
25423 unsafe {
25424 (windows_core::Interface::vtable(self).Time)(
25425 windows_core::Interface::as_raw(self),
25426 time as _,
25427 )
25428 .ok()
25429 }
25430 }
25431 pub unsafe fn SetTime(&self, time: u32) -> windows_core::Result<()> {
25432 unsafe {
25433 (windows_core::Interface::vtable(self).SetTime)(
25434 windows_core::Interface::as_raw(self),
25435 time,
25436 )
25437 .ok()
25438 }
25439 }
25440 pub unsafe fn HistoryCount(&self, historycount: *mut u32) -> windows_core::Result<()> {
25441 unsafe {
25442 (windows_core::Interface::vtable(self).HistoryCount)(
25443 windows_core::Interface::as_raw(self),
25444 historycount as _,
25445 )
25446 .ok()
25447 }
25448 }
25449 pub unsafe fn SetHistoryCount(&self, historycount: u32) -> windows_core::Result<()> {
25450 unsafe {
25451 (windows_core::Interface::vtable(self).SetHistoryCount)(
25452 windows_core::Interface::as_raw(self),
25453 historycount,
25454 )
25455 .ok()
25456 }
25457 }
25458 pub unsafe fn InputData(&self, inputdata: *mut i32) -> windows_core::Result<()> {
25459 unsafe {
25460 (windows_core::Interface::vtable(self).InputData)(
25461 windows_core::Interface::as_raw(self),
25462 inputdata as _,
25463 )
25464 .ok()
25465 }
25466 }
25467 pub unsafe fn SetInputData(&self, inputdata: i32) -> windows_core::Result<()> {
25468 unsafe {
25469 (windows_core::Interface::vtable(self).SetInputData)(
25470 windows_core::Interface::as_raw(self),
25471 inputdata,
25472 )
25473 .ok()
25474 }
25475 }
25476 pub unsafe fn KeyStates(&self, keystates: *mut u32) -> windows_core::Result<()> {
25477 unsafe {
25478 (windows_core::Interface::vtable(self).KeyStates)(
25479 windows_core::Interface::as_raw(self),
25480 keystates as _,
25481 )
25482 .ok()
25483 }
25484 }
25485 pub unsafe fn SetKeyStates(&self, keystates: u32) -> windows_core::Result<()> {
25486 unsafe {
25487 (windows_core::Interface::vtable(self).SetKeyStates)(
25488 windows_core::Interface::as_raw(self),
25489 keystates,
25490 )
25491 .ok()
25492 }
25493 }
25494 pub unsafe fn PerformanceCount(&self, performancecount: *mut u64) -> windows_core::Result<()> {
25495 unsafe {
25496 (windows_core::Interface::vtable(self).PerformanceCount)(
25497 windows_core::Interface::as_raw(self),
25498 performancecount as _,
25499 )
25500 .ok()
25501 }
25502 }
25503 pub unsafe fn SetPerformanceCount(&self, performancecount: u64) -> windows_core::Result<()> {
25504 unsafe {
25505 (windows_core::Interface::vtable(self).SetPerformanceCount)(
25506 windows_core::Interface::as_raw(self),
25507 performancecount,
25508 )
25509 .ok()
25510 }
25511 }
25512 pub unsafe fn ButtonChangeKind(&self, buttonchangekind: *mut i32) -> windows_core::Result<()> {
25513 unsafe {
25514 (windows_core::Interface::vtable(self).ButtonChangeKind)(
25515 windows_core::Interface::as_raw(self),
25516 buttonchangekind as _,
25517 )
25518 .ok()
25519 }
25520 }
25521 pub unsafe fn SetButtonChangeKind(&self, buttonchangekind: i32) -> windows_core::Result<()> {
25522 unsafe {
25523 (windows_core::Interface::vtable(self).SetButtonChangeKind)(
25524 windows_core::Interface::as_raw(self),
25525 buttonchangekind,
25526 )
25527 .ok()
25528 }
25529 }
25530 pub unsafe fn PenFlags(&self, penflags: *mut u32) -> windows_core::Result<()> {
25531 unsafe {
25532 (windows_core::Interface::vtable(self).PenFlags)(
25533 windows_core::Interface::as_raw(self),
25534 penflags as _,
25535 )
25536 .ok()
25537 }
25538 }
25539 pub unsafe fn SetPenFlags(&self, penflags: u32) -> windows_core::Result<()> {
25540 unsafe {
25541 (windows_core::Interface::vtable(self).SetPenFlags)(
25542 windows_core::Interface::as_raw(self),
25543 penflags,
25544 )
25545 .ok()
25546 }
25547 }
25548 pub unsafe fn PenMask(&self, penmask: *mut u32) -> windows_core::Result<()> {
25549 unsafe {
25550 (windows_core::Interface::vtable(self).PenMask)(
25551 windows_core::Interface::as_raw(self),
25552 penmask as _,
25553 )
25554 .ok()
25555 }
25556 }
25557 pub unsafe fn SetPenMask(&self, penmask: u32) -> windows_core::Result<()> {
25558 unsafe {
25559 (windows_core::Interface::vtable(self).SetPenMask)(
25560 windows_core::Interface::as_raw(self),
25561 penmask,
25562 )
25563 .ok()
25564 }
25565 }
25566 pub unsafe fn PenPressure(&self, penpressure: *mut u32) -> windows_core::Result<()> {
25567 unsafe {
25568 (windows_core::Interface::vtable(self).PenPressure)(
25569 windows_core::Interface::as_raw(self),
25570 penpressure as _,
25571 )
25572 .ok()
25573 }
25574 }
25575 pub unsafe fn SetPenPressure(&self, penpressure: u32) -> windows_core::Result<()> {
25576 unsafe {
25577 (windows_core::Interface::vtable(self).SetPenPressure)(
25578 windows_core::Interface::as_raw(self),
25579 penpressure,
25580 )
25581 .ok()
25582 }
25583 }
25584 pub unsafe fn PenRotation(&self, penrotation: *mut u32) -> windows_core::Result<()> {
25585 unsafe {
25586 (windows_core::Interface::vtable(self).PenRotation)(
25587 windows_core::Interface::as_raw(self),
25588 penrotation as _,
25589 )
25590 .ok()
25591 }
25592 }
25593 pub unsafe fn SetPenRotation(&self, penrotation: u32) -> windows_core::Result<()> {
25594 unsafe {
25595 (windows_core::Interface::vtable(self).SetPenRotation)(
25596 windows_core::Interface::as_raw(self),
25597 penrotation,
25598 )
25599 .ok()
25600 }
25601 }
25602 pub unsafe fn PenTiltX(&self, pentiltx: *mut i32) -> windows_core::Result<()> {
25603 unsafe {
25604 (windows_core::Interface::vtable(self).PenTiltX)(
25605 windows_core::Interface::as_raw(self),
25606 pentiltx as _,
25607 )
25608 .ok()
25609 }
25610 }
25611 pub unsafe fn SetPenTiltX(&self, pentiltx: i32) -> windows_core::Result<()> {
25612 unsafe {
25613 (windows_core::Interface::vtable(self).SetPenTiltX)(
25614 windows_core::Interface::as_raw(self),
25615 pentiltx,
25616 )
25617 .ok()
25618 }
25619 }
25620 pub unsafe fn PenTiltY(&self, pentilty: *mut i32) -> windows_core::Result<()> {
25621 unsafe {
25622 (windows_core::Interface::vtable(self).PenTiltY)(
25623 windows_core::Interface::as_raw(self),
25624 pentilty as _,
25625 )
25626 .ok()
25627 }
25628 }
25629 pub unsafe fn SetPenTiltY(&self, pentilty: i32) -> windows_core::Result<()> {
25630 unsafe {
25631 (windows_core::Interface::vtable(self).SetPenTiltY)(
25632 windows_core::Interface::as_raw(self),
25633 pentilty,
25634 )
25635 .ok()
25636 }
25637 }
25638 pub unsafe fn TouchFlags(&self, touchflags: *mut u32) -> windows_core::Result<()> {
25639 unsafe {
25640 (windows_core::Interface::vtable(self).TouchFlags)(
25641 windows_core::Interface::as_raw(self),
25642 touchflags as _,
25643 )
25644 .ok()
25645 }
25646 }
25647 pub unsafe fn SetTouchFlags(&self, touchflags: u32) -> windows_core::Result<()> {
25648 unsafe {
25649 (windows_core::Interface::vtable(self).SetTouchFlags)(
25650 windows_core::Interface::as_raw(self),
25651 touchflags,
25652 )
25653 .ok()
25654 }
25655 }
25656 pub unsafe fn TouchMask(&self, touchmask: *mut u32) -> windows_core::Result<()> {
25657 unsafe {
25658 (windows_core::Interface::vtable(self).TouchMask)(
25659 windows_core::Interface::as_raw(self),
25660 touchmask as _,
25661 )
25662 .ok()
25663 }
25664 }
25665 pub unsafe fn SetTouchMask(&self, touchmask: u32) -> windows_core::Result<()> {
25666 unsafe {
25667 (windows_core::Interface::vtable(self).SetTouchMask)(
25668 windows_core::Interface::as_raw(self),
25669 touchmask,
25670 )
25671 .ok()
25672 }
25673 }
25674 pub unsafe fn TouchContact(
25675 &self,
25676 touchcontact: *mut windows::Win32::Foundation::RECT,
25677 ) -> windows_core::Result<()> {
25678 unsafe {
25679 (windows_core::Interface::vtable(self).TouchContact)(
25680 windows_core::Interface::as_raw(self),
25681 touchcontact as _,
25682 )
25683 .ok()
25684 }
25685 }
25686 pub unsafe fn SetTouchContact(
25687 &self,
25688 touchcontact: windows::Win32::Foundation::RECT,
25689 ) -> windows_core::Result<()> {
25690 unsafe {
25691 (windows_core::Interface::vtable(self).SetTouchContact)(
25692 windows_core::Interface::as_raw(self),
25693 core::mem::transmute(touchcontact),
25694 )
25695 .ok()
25696 }
25697 }
25698 pub unsafe fn TouchContactRaw(
25699 &self,
25700 touchcontactraw: *mut windows::Win32::Foundation::RECT,
25701 ) -> windows_core::Result<()> {
25702 unsafe {
25703 (windows_core::Interface::vtable(self).TouchContactRaw)(
25704 windows_core::Interface::as_raw(self),
25705 touchcontactraw as _,
25706 )
25707 .ok()
25708 }
25709 }
25710 pub unsafe fn SetTouchContactRaw(
25711 &self,
25712 touchcontactraw: windows::Win32::Foundation::RECT,
25713 ) -> windows_core::Result<()> {
25714 unsafe {
25715 (windows_core::Interface::vtable(self).SetTouchContactRaw)(
25716 windows_core::Interface::as_raw(self),
25717 core::mem::transmute(touchcontactraw),
25718 )
25719 .ok()
25720 }
25721 }
25722 pub unsafe fn TouchOrientation(&self, touchorientation: *mut u32) -> windows_core::Result<()> {
25723 unsafe {
25724 (windows_core::Interface::vtable(self).TouchOrientation)(
25725 windows_core::Interface::as_raw(self),
25726 touchorientation as _,
25727 )
25728 .ok()
25729 }
25730 }
25731 pub unsafe fn SetTouchOrientation(&self, touchorientation: u32) -> windows_core::Result<()> {
25732 unsafe {
25733 (windows_core::Interface::vtable(self).SetTouchOrientation)(
25734 windows_core::Interface::as_raw(self),
25735 touchorientation,
25736 )
25737 .ok()
25738 }
25739 }
25740 pub unsafe fn TouchPressure(&self, touchpressure: *mut u32) -> windows_core::Result<()> {
25741 unsafe {
25742 (windows_core::Interface::vtable(self).TouchPressure)(
25743 windows_core::Interface::as_raw(self),
25744 touchpressure as _,
25745 )
25746 .ok()
25747 }
25748 }
25749 pub unsafe fn SetTouchPressure(&self, touchpressure: u32) -> windows_core::Result<()> {
25750 unsafe {
25751 (windows_core::Interface::vtable(self).SetTouchPressure)(
25752 windows_core::Interface::as_raw(self),
25753 touchpressure,
25754 )
25755 .ok()
25756 }
25757 }
25758}
25759#[repr(C)]
25760pub struct ICoreWebView2PointerInfo_Vtbl {
25761 pub base__: windows_core::IUnknown_Vtbl,
25762 pub PointerKind:
25763 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25764 pub SetPointerKind:
25765 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25766 pub PointerId:
25767 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25768 pub SetPointerId:
25769 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25770 pub FrameId:
25771 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25772 pub SetFrameId: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25773 pub PointerFlags:
25774 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25775 pub SetPointerFlags:
25776 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25777 pub PointerDeviceRect: unsafe extern "system" fn(
25778 *mut core::ffi::c_void,
25779 *mut windows::Win32::Foundation::RECT,
25780 ) -> windows_core::HRESULT,
25781 pub SetPointerDeviceRect: unsafe extern "system" fn(
25782 *mut core::ffi::c_void,
25783 windows::Win32::Foundation::RECT,
25784 ) -> windows_core::HRESULT,
25785 pub DisplayRect: unsafe extern "system" fn(
25786 *mut core::ffi::c_void,
25787 *mut windows::Win32::Foundation::RECT,
25788 ) -> windows_core::HRESULT,
25789 pub SetDisplayRect: unsafe extern "system" fn(
25790 *mut core::ffi::c_void,
25791 windows::Win32::Foundation::RECT,
25792 ) -> windows_core::HRESULT,
25793 pub PixelLocation: unsafe extern "system" fn(
25794 *mut core::ffi::c_void,
25795 *mut windows::Win32::Foundation::POINT,
25796 ) -> windows_core::HRESULT,
25797 pub SetPixelLocation: unsafe extern "system" fn(
25798 *mut core::ffi::c_void,
25799 windows::Win32::Foundation::POINT,
25800 ) -> windows_core::HRESULT,
25801 pub HimetricLocation: unsafe extern "system" fn(
25802 *mut core::ffi::c_void,
25803 *mut windows::Win32::Foundation::POINT,
25804 ) -> windows_core::HRESULT,
25805 pub SetHimetricLocation: unsafe extern "system" fn(
25806 *mut core::ffi::c_void,
25807 windows::Win32::Foundation::POINT,
25808 ) -> windows_core::HRESULT,
25809 pub PixelLocationRaw: unsafe extern "system" fn(
25810 *mut core::ffi::c_void,
25811 *mut windows::Win32::Foundation::POINT,
25812 ) -> windows_core::HRESULT,
25813 pub SetPixelLocationRaw: unsafe extern "system" fn(
25814 *mut core::ffi::c_void,
25815 windows::Win32::Foundation::POINT,
25816 ) -> windows_core::HRESULT,
25817 pub HimetricLocationRaw: unsafe extern "system" fn(
25818 *mut core::ffi::c_void,
25819 *mut windows::Win32::Foundation::POINT,
25820 ) -> windows_core::HRESULT,
25821 pub SetHimetricLocationRaw: unsafe extern "system" fn(
25822 *mut core::ffi::c_void,
25823 windows::Win32::Foundation::POINT,
25824 ) -> windows_core::HRESULT,
25825 pub Time: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25826 pub SetTime: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25827 pub HistoryCount:
25828 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25829 pub SetHistoryCount:
25830 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25831 pub InputData:
25832 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
25833 pub SetInputData:
25834 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
25835 pub KeyStates:
25836 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25837 pub SetKeyStates:
25838 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25839 pub PerformanceCount:
25840 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
25841 pub SetPerformanceCount:
25842 unsafe extern "system" fn(*mut core::ffi::c_void, u64) -> windows_core::HRESULT,
25843 pub ButtonChangeKind:
25844 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
25845 pub SetButtonChangeKind:
25846 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
25847 pub PenFlags:
25848 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25849 pub SetPenFlags:
25850 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25851 pub PenMask:
25852 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25853 pub SetPenMask: unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25854 pub PenPressure:
25855 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25856 pub SetPenPressure:
25857 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25858 pub PenRotation:
25859 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25860 pub SetPenRotation:
25861 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25862 pub PenTiltX:
25863 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
25864 pub SetPenTiltX:
25865 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
25866 pub PenTiltY:
25867 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
25868 pub SetPenTiltY:
25869 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
25870 pub TouchFlags:
25871 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25872 pub SetTouchFlags:
25873 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25874 pub TouchMask:
25875 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25876 pub SetTouchMask:
25877 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25878 pub TouchContact: unsafe extern "system" fn(
25879 *mut core::ffi::c_void,
25880 *mut windows::Win32::Foundation::RECT,
25881 ) -> windows_core::HRESULT,
25882 pub SetTouchContact: unsafe extern "system" fn(
25883 *mut core::ffi::c_void,
25884 windows::Win32::Foundation::RECT,
25885 ) -> windows_core::HRESULT,
25886 pub TouchContactRaw: unsafe extern "system" fn(
25887 *mut core::ffi::c_void,
25888 *mut windows::Win32::Foundation::RECT,
25889 ) -> windows_core::HRESULT,
25890 pub SetTouchContactRaw: unsafe extern "system" fn(
25891 *mut core::ffi::c_void,
25892 windows::Win32::Foundation::RECT,
25893 ) -> windows_core::HRESULT,
25894 pub TouchOrientation:
25895 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25896 pub SetTouchOrientation:
25897 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25898 pub TouchPressure:
25899 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
25900 pub SetTouchPressure:
25901 unsafe extern "system" fn(*mut core::ffi::c_void, u32) -> windows_core::HRESULT,
25902}
25903pub trait ICoreWebView2PointerInfo_Impl: windows_core::IUnknownImpl {
25904 fn PointerKind(&self, pointerkind: *mut u32) -> windows_core::Result<()>;
25905 fn SetPointerKind(&self, pointerkind: u32) -> windows_core::Result<()>;
25906 fn PointerId(&self, pointerid: *mut u32) -> windows_core::Result<()>;
25907 fn SetPointerId(&self, pointerid: u32) -> windows_core::Result<()>;
25908 fn FrameId(&self, frameid: *mut u32) -> windows_core::Result<()>;
25909 fn SetFrameId(&self, frameid: u32) -> windows_core::Result<()>;
25910 fn PointerFlags(&self, pointerflags: *mut u32) -> windows_core::Result<()>;
25911 fn SetPointerFlags(&self, pointerflags: u32) -> windows_core::Result<()>;
25912 fn PointerDeviceRect(
25913 &self,
25914 pointerdevicerect: *mut windows::Win32::Foundation::RECT,
25915 ) -> windows_core::Result<()>;
25916 fn SetPointerDeviceRect(
25917 &self,
25918 pointerdevicerect: &windows::Win32::Foundation::RECT,
25919 ) -> windows_core::Result<()>;
25920 fn DisplayRect(
25921 &self,
25922 displayrect: *mut windows::Win32::Foundation::RECT,
25923 ) -> windows_core::Result<()>;
25924 fn SetDisplayRect(
25925 &self,
25926 displayrect: &windows::Win32::Foundation::RECT,
25927 ) -> windows_core::Result<()>;
25928 fn PixelLocation(
25929 &self,
25930 pixellocation: *mut windows::Win32::Foundation::POINT,
25931 ) -> windows_core::Result<()>;
25932 fn SetPixelLocation(
25933 &self,
25934 pixellocation: &windows::Win32::Foundation::POINT,
25935 ) -> windows_core::Result<()>;
25936 fn HimetricLocation(
25937 &self,
25938 himetriclocation: *mut windows::Win32::Foundation::POINT,
25939 ) -> windows_core::Result<()>;
25940 fn SetHimetricLocation(
25941 &self,
25942 himetriclocation: &windows::Win32::Foundation::POINT,
25943 ) -> windows_core::Result<()>;
25944 fn PixelLocationRaw(
25945 &self,
25946 pixellocationraw: *mut windows::Win32::Foundation::POINT,
25947 ) -> windows_core::Result<()>;
25948 fn SetPixelLocationRaw(
25949 &self,
25950 pixellocationraw: &windows::Win32::Foundation::POINT,
25951 ) -> windows_core::Result<()>;
25952 fn HimetricLocationRaw(
25953 &self,
25954 himetriclocationraw: *mut windows::Win32::Foundation::POINT,
25955 ) -> windows_core::Result<()>;
25956 fn SetHimetricLocationRaw(
25957 &self,
25958 himetriclocationraw: &windows::Win32::Foundation::POINT,
25959 ) -> windows_core::Result<()>;
25960 fn Time(&self, time: *mut u32) -> windows_core::Result<()>;
25961 fn SetTime(&self, time: u32) -> windows_core::Result<()>;
25962 fn HistoryCount(&self, historycount: *mut u32) -> windows_core::Result<()>;
25963 fn SetHistoryCount(&self, historycount: u32) -> windows_core::Result<()>;
25964 fn InputData(&self, inputdata: *mut i32) -> windows_core::Result<()>;
25965 fn SetInputData(&self, inputdata: i32) -> windows_core::Result<()>;
25966 fn KeyStates(&self, keystates: *mut u32) -> windows_core::Result<()>;
25967 fn SetKeyStates(&self, keystates: u32) -> windows_core::Result<()>;
25968 fn PerformanceCount(&self, performancecount: *mut u64) -> windows_core::Result<()>;
25969 fn SetPerformanceCount(&self, performancecount: u64) -> windows_core::Result<()>;
25970 fn ButtonChangeKind(&self, buttonchangekind: *mut i32) -> windows_core::Result<()>;
25971 fn SetButtonChangeKind(&self, buttonchangekind: i32) -> windows_core::Result<()>;
25972 fn PenFlags(&self, penflags: *mut u32) -> windows_core::Result<()>;
25973 fn SetPenFlags(&self, penflags: u32) -> windows_core::Result<()>;
25974 fn PenMask(&self, penmask: *mut u32) -> windows_core::Result<()>;
25975 fn SetPenMask(&self, penmask: u32) -> windows_core::Result<()>;
25976 fn PenPressure(&self, penpressure: *mut u32) -> windows_core::Result<()>;
25977 fn SetPenPressure(&self, penpressure: u32) -> windows_core::Result<()>;
25978 fn PenRotation(&self, penrotation: *mut u32) -> windows_core::Result<()>;
25979 fn SetPenRotation(&self, penrotation: u32) -> windows_core::Result<()>;
25980 fn PenTiltX(&self, pentiltx: *mut i32) -> windows_core::Result<()>;
25981 fn SetPenTiltX(&self, pentiltx: i32) -> windows_core::Result<()>;
25982 fn PenTiltY(&self, pentilty: *mut i32) -> windows_core::Result<()>;
25983 fn SetPenTiltY(&self, pentilty: i32) -> windows_core::Result<()>;
25984 fn TouchFlags(&self, touchflags: *mut u32) -> windows_core::Result<()>;
25985 fn SetTouchFlags(&self, touchflags: u32) -> windows_core::Result<()>;
25986 fn TouchMask(&self, touchmask: *mut u32) -> windows_core::Result<()>;
25987 fn SetTouchMask(&self, touchmask: u32) -> windows_core::Result<()>;
25988 fn TouchContact(
25989 &self,
25990 touchcontact: *mut windows::Win32::Foundation::RECT,
25991 ) -> windows_core::Result<()>;
25992 fn SetTouchContact(
25993 &self,
25994 touchcontact: &windows::Win32::Foundation::RECT,
25995 ) -> windows_core::Result<()>;
25996 fn TouchContactRaw(
25997 &self,
25998 touchcontactraw: *mut windows::Win32::Foundation::RECT,
25999 ) -> windows_core::Result<()>;
26000 fn SetTouchContactRaw(
26001 &self,
26002 touchcontactraw: &windows::Win32::Foundation::RECT,
26003 ) -> windows_core::Result<()>;
26004 fn TouchOrientation(&self, touchorientation: *mut u32) -> windows_core::Result<()>;
26005 fn SetTouchOrientation(&self, touchorientation: u32) -> windows_core::Result<()>;
26006 fn TouchPressure(&self, touchpressure: *mut u32) -> windows_core::Result<()>;
26007 fn SetTouchPressure(&self, touchpressure: u32) -> windows_core::Result<()>;
26008}
26009impl ICoreWebView2PointerInfo_Vtbl {
26010 pub const fn new<Identity: ICoreWebView2PointerInfo_Impl, const OFFSET: isize>() -> Self {
26011 unsafe extern "system" fn PointerKind<
26012 Identity: ICoreWebView2PointerInfo_Impl,
26013 const OFFSET: isize,
26014 >(
26015 this: *mut core::ffi::c_void,
26016 pointerkind: *mut u32,
26017 ) -> windows_core::HRESULT {
26018 unsafe {
26019 let this: &Identity =
26020 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26021 ICoreWebView2PointerInfo_Impl::PointerKind(
26022 this,
26023 core::mem::transmute_copy(&pointerkind),
26024 )
26025 .into()
26026 }
26027 }
26028 unsafe extern "system" fn SetPointerKind<
26029 Identity: ICoreWebView2PointerInfo_Impl,
26030 const OFFSET: isize,
26031 >(
26032 this: *mut core::ffi::c_void,
26033 pointerkind: u32,
26034 ) -> windows_core::HRESULT {
26035 unsafe {
26036 let this: &Identity =
26037 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26038 ICoreWebView2PointerInfo_Impl::SetPointerKind(
26039 this,
26040 core::mem::transmute_copy(&pointerkind),
26041 )
26042 .into()
26043 }
26044 }
26045 unsafe extern "system" fn PointerId<
26046 Identity: ICoreWebView2PointerInfo_Impl,
26047 const OFFSET: isize,
26048 >(
26049 this: *mut core::ffi::c_void,
26050 pointerid: *mut u32,
26051 ) -> windows_core::HRESULT {
26052 unsafe {
26053 let this: &Identity =
26054 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26055 ICoreWebView2PointerInfo_Impl::PointerId(
26056 this,
26057 core::mem::transmute_copy(&pointerid),
26058 )
26059 .into()
26060 }
26061 }
26062 unsafe extern "system" fn SetPointerId<
26063 Identity: ICoreWebView2PointerInfo_Impl,
26064 const OFFSET: isize,
26065 >(
26066 this: *mut core::ffi::c_void,
26067 pointerid: u32,
26068 ) -> windows_core::HRESULT {
26069 unsafe {
26070 let this: &Identity =
26071 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26072 ICoreWebView2PointerInfo_Impl::SetPointerId(
26073 this,
26074 core::mem::transmute_copy(&pointerid),
26075 )
26076 .into()
26077 }
26078 }
26079 unsafe extern "system" fn FrameId<
26080 Identity: ICoreWebView2PointerInfo_Impl,
26081 const OFFSET: isize,
26082 >(
26083 this: *mut core::ffi::c_void,
26084 frameid: *mut u32,
26085 ) -> windows_core::HRESULT {
26086 unsafe {
26087 let this: &Identity =
26088 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26089 ICoreWebView2PointerInfo_Impl::FrameId(this, core::mem::transmute_copy(&frameid))
26090 .into()
26091 }
26092 }
26093 unsafe extern "system" fn SetFrameId<
26094 Identity: ICoreWebView2PointerInfo_Impl,
26095 const OFFSET: isize,
26096 >(
26097 this: *mut core::ffi::c_void,
26098 frameid: u32,
26099 ) -> windows_core::HRESULT {
26100 unsafe {
26101 let this: &Identity =
26102 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26103 ICoreWebView2PointerInfo_Impl::SetFrameId(this, core::mem::transmute_copy(&frameid))
26104 .into()
26105 }
26106 }
26107 unsafe extern "system" fn PointerFlags<
26108 Identity: ICoreWebView2PointerInfo_Impl,
26109 const OFFSET: isize,
26110 >(
26111 this: *mut core::ffi::c_void,
26112 pointerflags: *mut u32,
26113 ) -> windows_core::HRESULT {
26114 unsafe {
26115 let this: &Identity =
26116 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26117 ICoreWebView2PointerInfo_Impl::PointerFlags(
26118 this,
26119 core::mem::transmute_copy(&pointerflags),
26120 )
26121 .into()
26122 }
26123 }
26124 unsafe extern "system" fn SetPointerFlags<
26125 Identity: ICoreWebView2PointerInfo_Impl,
26126 const OFFSET: isize,
26127 >(
26128 this: *mut core::ffi::c_void,
26129 pointerflags: u32,
26130 ) -> windows_core::HRESULT {
26131 unsafe {
26132 let this: &Identity =
26133 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26134 ICoreWebView2PointerInfo_Impl::SetPointerFlags(
26135 this,
26136 core::mem::transmute_copy(&pointerflags),
26137 )
26138 .into()
26139 }
26140 }
26141 unsafe extern "system" fn PointerDeviceRect<
26142 Identity: ICoreWebView2PointerInfo_Impl,
26143 const OFFSET: isize,
26144 >(
26145 this: *mut core::ffi::c_void,
26146 pointerdevicerect: *mut windows::Win32::Foundation::RECT,
26147 ) -> windows_core::HRESULT {
26148 unsafe {
26149 let this: &Identity =
26150 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26151 ICoreWebView2PointerInfo_Impl::PointerDeviceRect(
26152 this,
26153 core::mem::transmute_copy(&pointerdevicerect),
26154 )
26155 .into()
26156 }
26157 }
26158 unsafe extern "system" fn SetPointerDeviceRect<
26159 Identity: ICoreWebView2PointerInfo_Impl,
26160 const OFFSET: isize,
26161 >(
26162 this: *mut core::ffi::c_void,
26163 pointerdevicerect: windows::Win32::Foundation::RECT,
26164 ) -> windows_core::HRESULT {
26165 unsafe {
26166 let this: &Identity =
26167 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26168 ICoreWebView2PointerInfo_Impl::SetPointerDeviceRect(
26169 this,
26170 core::mem::transmute(&pointerdevicerect),
26171 )
26172 .into()
26173 }
26174 }
26175 unsafe extern "system" fn DisplayRect<
26176 Identity: ICoreWebView2PointerInfo_Impl,
26177 const OFFSET: isize,
26178 >(
26179 this: *mut core::ffi::c_void,
26180 displayrect: *mut windows::Win32::Foundation::RECT,
26181 ) -> windows_core::HRESULT {
26182 unsafe {
26183 let this: &Identity =
26184 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26185 ICoreWebView2PointerInfo_Impl::DisplayRect(
26186 this,
26187 core::mem::transmute_copy(&displayrect),
26188 )
26189 .into()
26190 }
26191 }
26192 unsafe extern "system" fn SetDisplayRect<
26193 Identity: ICoreWebView2PointerInfo_Impl,
26194 const OFFSET: isize,
26195 >(
26196 this: *mut core::ffi::c_void,
26197 displayrect: windows::Win32::Foundation::RECT,
26198 ) -> windows_core::HRESULT {
26199 unsafe {
26200 let this: &Identity =
26201 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26202 ICoreWebView2PointerInfo_Impl::SetDisplayRect(
26203 this,
26204 core::mem::transmute(&displayrect),
26205 )
26206 .into()
26207 }
26208 }
26209 unsafe extern "system" fn PixelLocation<
26210 Identity: ICoreWebView2PointerInfo_Impl,
26211 const OFFSET: isize,
26212 >(
26213 this: *mut core::ffi::c_void,
26214 pixellocation: *mut windows::Win32::Foundation::POINT,
26215 ) -> windows_core::HRESULT {
26216 unsafe {
26217 let this: &Identity =
26218 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26219 ICoreWebView2PointerInfo_Impl::PixelLocation(
26220 this,
26221 core::mem::transmute_copy(&pixellocation),
26222 )
26223 .into()
26224 }
26225 }
26226 unsafe extern "system" fn SetPixelLocation<
26227 Identity: ICoreWebView2PointerInfo_Impl,
26228 const OFFSET: isize,
26229 >(
26230 this: *mut core::ffi::c_void,
26231 pixellocation: windows::Win32::Foundation::POINT,
26232 ) -> windows_core::HRESULT {
26233 unsafe {
26234 let this: &Identity =
26235 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26236 ICoreWebView2PointerInfo_Impl::SetPixelLocation(
26237 this,
26238 core::mem::transmute(&pixellocation),
26239 )
26240 .into()
26241 }
26242 }
26243 unsafe extern "system" fn HimetricLocation<
26244 Identity: ICoreWebView2PointerInfo_Impl,
26245 const OFFSET: isize,
26246 >(
26247 this: *mut core::ffi::c_void,
26248 himetriclocation: *mut windows::Win32::Foundation::POINT,
26249 ) -> windows_core::HRESULT {
26250 unsafe {
26251 let this: &Identity =
26252 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26253 ICoreWebView2PointerInfo_Impl::HimetricLocation(
26254 this,
26255 core::mem::transmute_copy(&himetriclocation),
26256 )
26257 .into()
26258 }
26259 }
26260 unsafe extern "system" fn SetHimetricLocation<
26261 Identity: ICoreWebView2PointerInfo_Impl,
26262 const OFFSET: isize,
26263 >(
26264 this: *mut core::ffi::c_void,
26265 himetriclocation: windows::Win32::Foundation::POINT,
26266 ) -> windows_core::HRESULT {
26267 unsafe {
26268 let this: &Identity =
26269 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26270 ICoreWebView2PointerInfo_Impl::SetHimetricLocation(
26271 this,
26272 core::mem::transmute(&himetriclocation),
26273 )
26274 .into()
26275 }
26276 }
26277 unsafe extern "system" fn PixelLocationRaw<
26278 Identity: ICoreWebView2PointerInfo_Impl,
26279 const OFFSET: isize,
26280 >(
26281 this: *mut core::ffi::c_void,
26282 pixellocationraw: *mut windows::Win32::Foundation::POINT,
26283 ) -> windows_core::HRESULT {
26284 unsafe {
26285 let this: &Identity =
26286 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26287 ICoreWebView2PointerInfo_Impl::PixelLocationRaw(
26288 this,
26289 core::mem::transmute_copy(&pixellocationraw),
26290 )
26291 .into()
26292 }
26293 }
26294 unsafe extern "system" fn SetPixelLocationRaw<
26295 Identity: ICoreWebView2PointerInfo_Impl,
26296 const OFFSET: isize,
26297 >(
26298 this: *mut core::ffi::c_void,
26299 pixellocationraw: windows::Win32::Foundation::POINT,
26300 ) -> windows_core::HRESULT {
26301 unsafe {
26302 let this: &Identity =
26303 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26304 ICoreWebView2PointerInfo_Impl::SetPixelLocationRaw(
26305 this,
26306 core::mem::transmute(&pixellocationraw),
26307 )
26308 .into()
26309 }
26310 }
26311 unsafe extern "system" fn HimetricLocationRaw<
26312 Identity: ICoreWebView2PointerInfo_Impl,
26313 const OFFSET: isize,
26314 >(
26315 this: *mut core::ffi::c_void,
26316 himetriclocationraw: *mut windows::Win32::Foundation::POINT,
26317 ) -> windows_core::HRESULT {
26318 unsafe {
26319 let this: &Identity =
26320 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26321 ICoreWebView2PointerInfo_Impl::HimetricLocationRaw(
26322 this,
26323 core::mem::transmute_copy(&himetriclocationraw),
26324 )
26325 .into()
26326 }
26327 }
26328 unsafe extern "system" fn SetHimetricLocationRaw<
26329 Identity: ICoreWebView2PointerInfo_Impl,
26330 const OFFSET: isize,
26331 >(
26332 this: *mut core::ffi::c_void,
26333 himetriclocationraw: windows::Win32::Foundation::POINT,
26334 ) -> windows_core::HRESULT {
26335 unsafe {
26336 let this: &Identity =
26337 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26338 ICoreWebView2PointerInfo_Impl::SetHimetricLocationRaw(
26339 this,
26340 core::mem::transmute(&himetriclocationraw),
26341 )
26342 .into()
26343 }
26344 }
26345 unsafe extern "system" fn Time<
26346 Identity: ICoreWebView2PointerInfo_Impl,
26347 const OFFSET: isize,
26348 >(
26349 this: *mut core::ffi::c_void,
26350 time: *mut u32,
26351 ) -> windows_core::HRESULT {
26352 unsafe {
26353 let this: &Identity =
26354 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26355 ICoreWebView2PointerInfo_Impl::Time(this, core::mem::transmute_copy(&time)).into()
26356 }
26357 }
26358 unsafe extern "system" fn SetTime<
26359 Identity: ICoreWebView2PointerInfo_Impl,
26360 const OFFSET: isize,
26361 >(
26362 this: *mut core::ffi::c_void,
26363 time: u32,
26364 ) -> windows_core::HRESULT {
26365 unsafe {
26366 let this: &Identity =
26367 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26368 ICoreWebView2PointerInfo_Impl::SetTime(this, core::mem::transmute_copy(&time))
26369 .into()
26370 }
26371 }
26372 unsafe extern "system" fn HistoryCount<
26373 Identity: ICoreWebView2PointerInfo_Impl,
26374 const OFFSET: isize,
26375 >(
26376 this: *mut core::ffi::c_void,
26377 historycount: *mut u32,
26378 ) -> windows_core::HRESULT {
26379 unsafe {
26380 let this: &Identity =
26381 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26382 ICoreWebView2PointerInfo_Impl::HistoryCount(
26383 this,
26384 core::mem::transmute_copy(&historycount),
26385 )
26386 .into()
26387 }
26388 }
26389 unsafe extern "system" fn SetHistoryCount<
26390 Identity: ICoreWebView2PointerInfo_Impl,
26391 const OFFSET: isize,
26392 >(
26393 this: *mut core::ffi::c_void,
26394 historycount: u32,
26395 ) -> windows_core::HRESULT {
26396 unsafe {
26397 let this: &Identity =
26398 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26399 ICoreWebView2PointerInfo_Impl::SetHistoryCount(
26400 this,
26401 core::mem::transmute_copy(&historycount),
26402 )
26403 .into()
26404 }
26405 }
26406 unsafe extern "system" fn InputData<
26407 Identity: ICoreWebView2PointerInfo_Impl,
26408 const OFFSET: isize,
26409 >(
26410 this: *mut core::ffi::c_void,
26411 inputdata: *mut i32,
26412 ) -> windows_core::HRESULT {
26413 unsafe {
26414 let this: &Identity =
26415 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26416 ICoreWebView2PointerInfo_Impl::InputData(
26417 this,
26418 core::mem::transmute_copy(&inputdata),
26419 )
26420 .into()
26421 }
26422 }
26423 unsafe extern "system" fn SetInputData<
26424 Identity: ICoreWebView2PointerInfo_Impl,
26425 const OFFSET: isize,
26426 >(
26427 this: *mut core::ffi::c_void,
26428 inputdata: i32,
26429 ) -> windows_core::HRESULT {
26430 unsafe {
26431 let this: &Identity =
26432 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26433 ICoreWebView2PointerInfo_Impl::SetInputData(
26434 this,
26435 core::mem::transmute_copy(&inputdata),
26436 )
26437 .into()
26438 }
26439 }
26440 unsafe extern "system" fn KeyStates<
26441 Identity: ICoreWebView2PointerInfo_Impl,
26442 const OFFSET: isize,
26443 >(
26444 this: *mut core::ffi::c_void,
26445 keystates: *mut u32,
26446 ) -> windows_core::HRESULT {
26447 unsafe {
26448 let this: &Identity =
26449 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26450 ICoreWebView2PointerInfo_Impl::KeyStates(
26451 this,
26452 core::mem::transmute_copy(&keystates),
26453 )
26454 .into()
26455 }
26456 }
26457 unsafe extern "system" fn SetKeyStates<
26458 Identity: ICoreWebView2PointerInfo_Impl,
26459 const OFFSET: isize,
26460 >(
26461 this: *mut core::ffi::c_void,
26462 keystates: u32,
26463 ) -> windows_core::HRESULT {
26464 unsafe {
26465 let this: &Identity =
26466 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26467 ICoreWebView2PointerInfo_Impl::SetKeyStates(
26468 this,
26469 core::mem::transmute_copy(&keystates),
26470 )
26471 .into()
26472 }
26473 }
26474 unsafe extern "system" fn PerformanceCount<
26475 Identity: ICoreWebView2PointerInfo_Impl,
26476 const OFFSET: isize,
26477 >(
26478 this: *mut core::ffi::c_void,
26479 performancecount: *mut u64,
26480 ) -> windows_core::HRESULT {
26481 unsafe {
26482 let this: &Identity =
26483 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26484 ICoreWebView2PointerInfo_Impl::PerformanceCount(
26485 this,
26486 core::mem::transmute_copy(&performancecount),
26487 )
26488 .into()
26489 }
26490 }
26491 unsafe extern "system" fn SetPerformanceCount<
26492 Identity: ICoreWebView2PointerInfo_Impl,
26493 const OFFSET: isize,
26494 >(
26495 this: *mut core::ffi::c_void,
26496 performancecount: u64,
26497 ) -> windows_core::HRESULT {
26498 unsafe {
26499 let this: &Identity =
26500 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26501 ICoreWebView2PointerInfo_Impl::SetPerformanceCount(
26502 this,
26503 core::mem::transmute_copy(&performancecount),
26504 )
26505 .into()
26506 }
26507 }
26508 unsafe extern "system" fn ButtonChangeKind<
26509 Identity: ICoreWebView2PointerInfo_Impl,
26510 const OFFSET: isize,
26511 >(
26512 this: *mut core::ffi::c_void,
26513 buttonchangekind: *mut i32,
26514 ) -> windows_core::HRESULT {
26515 unsafe {
26516 let this: &Identity =
26517 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26518 ICoreWebView2PointerInfo_Impl::ButtonChangeKind(
26519 this,
26520 core::mem::transmute_copy(&buttonchangekind),
26521 )
26522 .into()
26523 }
26524 }
26525 unsafe extern "system" fn SetButtonChangeKind<
26526 Identity: ICoreWebView2PointerInfo_Impl,
26527 const OFFSET: isize,
26528 >(
26529 this: *mut core::ffi::c_void,
26530 buttonchangekind: i32,
26531 ) -> windows_core::HRESULT {
26532 unsafe {
26533 let this: &Identity =
26534 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26535 ICoreWebView2PointerInfo_Impl::SetButtonChangeKind(
26536 this,
26537 core::mem::transmute_copy(&buttonchangekind),
26538 )
26539 .into()
26540 }
26541 }
26542 unsafe extern "system" fn PenFlags<
26543 Identity: ICoreWebView2PointerInfo_Impl,
26544 const OFFSET: isize,
26545 >(
26546 this: *mut core::ffi::c_void,
26547 penflags: *mut u32,
26548 ) -> windows_core::HRESULT {
26549 unsafe {
26550 let this: &Identity =
26551 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26552 ICoreWebView2PointerInfo_Impl::PenFlags(this, core::mem::transmute_copy(&penflags))
26553 .into()
26554 }
26555 }
26556 unsafe extern "system" fn SetPenFlags<
26557 Identity: ICoreWebView2PointerInfo_Impl,
26558 const OFFSET: isize,
26559 >(
26560 this: *mut core::ffi::c_void,
26561 penflags: u32,
26562 ) -> windows_core::HRESULT {
26563 unsafe {
26564 let this: &Identity =
26565 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26566 ICoreWebView2PointerInfo_Impl::SetPenFlags(
26567 this,
26568 core::mem::transmute_copy(&penflags),
26569 )
26570 .into()
26571 }
26572 }
26573 unsafe extern "system" fn PenMask<
26574 Identity: ICoreWebView2PointerInfo_Impl,
26575 const OFFSET: isize,
26576 >(
26577 this: *mut core::ffi::c_void,
26578 penmask: *mut u32,
26579 ) -> windows_core::HRESULT {
26580 unsafe {
26581 let this: &Identity =
26582 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26583 ICoreWebView2PointerInfo_Impl::PenMask(this, core::mem::transmute_copy(&penmask))
26584 .into()
26585 }
26586 }
26587 unsafe extern "system" fn SetPenMask<
26588 Identity: ICoreWebView2PointerInfo_Impl,
26589 const OFFSET: isize,
26590 >(
26591 this: *mut core::ffi::c_void,
26592 penmask: u32,
26593 ) -> windows_core::HRESULT {
26594 unsafe {
26595 let this: &Identity =
26596 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26597 ICoreWebView2PointerInfo_Impl::SetPenMask(this, core::mem::transmute_copy(&penmask))
26598 .into()
26599 }
26600 }
26601 unsafe extern "system" fn PenPressure<
26602 Identity: ICoreWebView2PointerInfo_Impl,
26603 const OFFSET: isize,
26604 >(
26605 this: *mut core::ffi::c_void,
26606 penpressure: *mut u32,
26607 ) -> windows_core::HRESULT {
26608 unsafe {
26609 let this: &Identity =
26610 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26611 ICoreWebView2PointerInfo_Impl::PenPressure(
26612 this,
26613 core::mem::transmute_copy(&penpressure),
26614 )
26615 .into()
26616 }
26617 }
26618 unsafe extern "system" fn SetPenPressure<
26619 Identity: ICoreWebView2PointerInfo_Impl,
26620 const OFFSET: isize,
26621 >(
26622 this: *mut core::ffi::c_void,
26623 penpressure: u32,
26624 ) -> windows_core::HRESULT {
26625 unsafe {
26626 let this: &Identity =
26627 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26628 ICoreWebView2PointerInfo_Impl::SetPenPressure(
26629 this,
26630 core::mem::transmute_copy(&penpressure),
26631 )
26632 .into()
26633 }
26634 }
26635 unsafe extern "system" fn PenRotation<
26636 Identity: ICoreWebView2PointerInfo_Impl,
26637 const OFFSET: isize,
26638 >(
26639 this: *mut core::ffi::c_void,
26640 penrotation: *mut u32,
26641 ) -> windows_core::HRESULT {
26642 unsafe {
26643 let this: &Identity =
26644 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26645 ICoreWebView2PointerInfo_Impl::PenRotation(
26646 this,
26647 core::mem::transmute_copy(&penrotation),
26648 )
26649 .into()
26650 }
26651 }
26652 unsafe extern "system" fn SetPenRotation<
26653 Identity: ICoreWebView2PointerInfo_Impl,
26654 const OFFSET: isize,
26655 >(
26656 this: *mut core::ffi::c_void,
26657 penrotation: u32,
26658 ) -> windows_core::HRESULT {
26659 unsafe {
26660 let this: &Identity =
26661 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26662 ICoreWebView2PointerInfo_Impl::SetPenRotation(
26663 this,
26664 core::mem::transmute_copy(&penrotation),
26665 )
26666 .into()
26667 }
26668 }
26669 unsafe extern "system" fn PenTiltX<
26670 Identity: ICoreWebView2PointerInfo_Impl,
26671 const OFFSET: isize,
26672 >(
26673 this: *mut core::ffi::c_void,
26674 pentiltx: *mut i32,
26675 ) -> windows_core::HRESULT {
26676 unsafe {
26677 let this: &Identity =
26678 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26679 ICoreWebView2PointerInfo_Impl::PenTiltX(this, core::mem::transmute_copy(&pentiltx))
26680 .into()
26681 }
26682 }
26683 unsafe extern "system" fn SetPenTiltX<
26684 Identity: ICoreWebView2PointerInfo_Impl,
26685 const OFFSET: isize,
26686 >(
26687 this: *mut core::ffi::c_void,
26688 pentiltx: i32,
26689 ) -> windows_core::HRESULT {
26690 unsafe {
26691 let this: &Identity =
26692 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26693 ICoreWebView2PointerInfo_Impl::SetPenTiltX(
26694 this,
26695 core::mem::transmute_copy(&pentiltx),
26696 )
26697 .into()
26698 }
26699 }
26700 unsafe extern "system" fn PenTiltY<
26701 Identity: ICoreWebView2PointerInfo_Impl,
26702 const OFFSET: isize,
26703 >(
26704 this: *mut core::ffi::c_void,
26705 pentilty: *mut i32,
26706 ) -> windows_core::HRESULT {
26707 unsafe {
26708 let this: &Identity =
26709 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26710 ICoreWebView2PointerInfo_Impl::PenTiltY(this, core::mem::transmute_copy(&pentilty))
26711 .into()
26712 }
26713 }
26714 unsafe extern "system" fn SetPenTiltY<
26715 Identity: ICoreWebView2PointerInfo_Impl,
26716 const OFFSET: isize,
26717 >(
26718 this: *mut core::ffi::c_void,
26719 pentilty: i32,
26720 ) -> windows_core::HRESULT {
26721 unsafe {
26722 let this: &Identity =
26723 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26724 ICoreWebView2PointerInfo_Impl::SetPenTiltY(
26725 this,
26726 core::mem::transmute_copy(&pentilty),
26727 )
26728 .into()
26729 }
26730 }
26731 unsafe extern "system" fn TouchFlags<
26732 Identity: ICoreWebView2PointerInfo_Impl,
26733 const OFFSET: isize,
26734 >(
26735 this: *mut core::ffi::c_void,
26736 touchflags: *mut u32,
26737 ) -> windows_core::HRESULT {
26738 unsafe {
26739 let this: &Identity =
26740 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26741 ICoreWebView2PointerInfo_Impl::TouchFlags(
26742 this,
26743 core::mem::transmute_copy(&touchflags),
26744 )
26745 .into()
26746 }
26747 }
26748 unsafe extern "system" fn SetTouchFlags<
26749 Identity: ICoreWebView2PointerInfo_Impl,
26750 const OFFSET: isize,
26751 >(
26752 this: *mut core::ffi::c_void,
26753 touchflags: u32,
26754 ) -> windows_core::HRESULT {
26755 unsafe {
26756 let this: &Identity =
26757 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26758 ICoreWebView2PointerInfo_Impl::SetTouchFlags(
26759 this,
26760 core::mem::transmute_copy(&touchflags),
26761 )
26762 .into()
26763 }
26764 }
26765 unsafe extern "system" fn TouchMask<
26766 Identity: ICoreWebView2PointerInfo_Impl,
26767 const OFFSET: isize,
26768 >(
26769 this: *mut core::ffi::c_void,
26770 touchmask: *mut u32,
26771 ) -> windows_core::HRESULT {
26772 unsafe {
26773 let this: &Identity =
26774 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26775 ICoreWebView2PointerInfo_Impl::TouchMask(
26776 this,
26777 core::mem::transmute_copy(&touchmask),
26778 )
26779 .into()
26780 }
26781 }
26782 unsafe extern "system" fn SetTouchMask<
26783 Identity: ICoreWebView2PointerInfo_Impl,
26784 const OFFSET: isize,
26785 >(
26786 this: *mut core::ffi::c_void,
26787 touchmask: u32,
26788 ) -> windows_core::HRESULT {
26789 unsafe {
26790 let this: &Identity =
26791 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26792 ICoreWebView2PointerInfo_Impl::SetTouchMask(
26793 this,
26794 core::mem::transmute_copy(&touchmask),
26795 )
26796 .into()
26797 }
26798 }
26799 unsafe extern "system" fn TouchContact<
26800 Identity: ICoreWebView2PointerInfo_Impl,
26801 const OFFSET: isize,
26802 >(
26803 this: *mut core::ffi::c_void,
26804 touchcontact: *mut windows::Win32::Foundation::RECT,
26805 ) -> windows_core::HRESULT {
26806 unsafe {
26807 let this: &Identity =
26808 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26809 ICoreWebView2PointerInfo_Impl::TouchContact(
26810 this,
26811 core::mem::transmute_copy(&touchcontact),
26812 )
26813 .into()
26814 }
26815 }
26816 unsafe extern "system" fn SetTouchContact<
26817 Identity: ICoreWebView2PointerInfo_Impl,
26818 const OFFSET: isize,
26819 >(
26820 this: *mut core::ffi::c_void,
26821 touchcontact: windows::Win32::Foundation::RECT,
26822 ) -> windows_core::HRESULT {
26823 unsafe {
26824 let this: &Identity =
26825 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26826 ICoreWebView2PointerInfo_Impl::SetTouchContact(
26827 this,
26828 core::mem::transmute(&touchcontact),
26829 )
26830 .into()
26831 }
26832 }
26833 unsafe extern "system" fn TouchContactRaw<
26834 Identity: ICoreWebView2PointerInfo_Impl,
26835 const OFFSET: isize,
26836 >(
26837 this: *mut core::ffi::c_void,
26838 touchcontactraw: *mut windows::Win32::Foundation::RECT,
26839 ) -> windows_core::HRESULT {
26840 unsafe {
26841 let this: &Identity =
26842 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26843 ICoreWebView2PointerInfo_Impl::TouchContactRaw(
26844 this,
26845 core::mem::transmute_copy(&touchcontactraw),
26846 )
26847 .into()
26848 }
26849 }
26850 unsafe extern "system" fn SetTouchContactRaw<
26851 Identity: ICoreWebView2PointerInfo_Impl,
26852 const OFFSET: isize,
26853 >(
26854 this: *mut core::ffi::c_void,
26855 touchcontactraw: windows::Win32::Foundation::RECT,
26856 ) -> windows_core::HRESULT {
26857 unsafe {
26858 let this: &Identity =
26859 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26860 ICoreWebView2PointerInfo_Impl::SetTouchContactRaw(
26861 this,
26862 core::mem::transmute(&touchcontactraw),
26863 )
26864 .into()
26865 }
26866 }
26867 unsafe extern "system" fn TouchOrientation<
26868 Identity: ICoreWebView2PointerInfo_Impl,
26869 const OFFSET: isize,
26870 >(
26871 this: *mut core::ffi::c_void,
26872 touchorientation: *mut u32,
26873 ) -> windows_core::HRESULT {
26874 unsafe {
26875 let this: &Identity =
26876 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26877 ICoreWebView2PointerInfo_Impl::TouchOrientation(
26878 this,
26879 core::mem::transmute_copy(&touchorientation),
26880 )
26881 .into()
26882 }
26883 }
26884 unsafe extern "system" fn SetTouchOrientation<
26885 Identity: ICoreWebView2PointerInfo_Impl,
26886 const OFFSET: isize,
26887 >(
26888 this: *mut core::ffi::c_void,
26889 touchorientation: u32,
26890 ) -> windows_core::HRESULT {
26891 unsafe {
26892 let this: &Identity =
26893 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26894 ICoreWebView2PointerInfo_Impl::SetTouchOrientation(
26895 this,
26896 core::mem::transmute_copy(&touchorientation),
26897 )
26898 .into()
26899 }
26900 }
26901 unsafe extern "system" fn TouchPressure<
26902 Identity: ICoreWebView2PointerInfo_Impl,
26903 const OFFSET: isize,
26904 >(
26905 this: *mut core::ffi::c_void,
26906 touchpressure: *mut u32,
26907 ) -> windows_core::HRESULT {
26908 unsafe {
26909 let this: &Identity =
26910 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26911 ICoreWebView2PointerInfo_Impl::TouchPressure(
26912 this,
26913 core::mem::transmute_copy(&touchpressure),
26914 )
26915 .into()
26916 }
26917 }
26918 unsafe extern "system" fn SetTouchPressure<
26919 Identity: ICoreWebView2PointerInfo_Impl,
26920 const OFFSET: isize,
26921 >(
26922 this: *mut core::ffi::c_void,
26923 touchpressure: u32,
26924 ) -> windows_core::HRESULT {
26925 unsafe {
26926 let this: &Identity =
26927 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
26928 ICoreWebView2PointerInfo_Impl::SetTouchPressure(
26929 this,
26930 core::mem::transmute_copy(&touchpressure),
26931 )
26932 .into()
26933 }
26934 }
26935 Self {
26936 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
26937 PointerKind: PointerKind::<Identity, OFFSET>,
26938 SetPointerKind: SetPointerKind::<Identity, OFFSET>,
26939 PointerId: PointerId::<Identity, OFFSET>,
26940 SetPointerId: SetPointerId::<Identity, OFFSET>,
26941 FrameId: FrameId::<Identity, OFFSET>,
26942 SetFrameId: SetFrameId::<Identity, OFFSET>,
26943 PointerFlags: PointerFlags::<Identity, OFFSET>,
26944 SetPointerFlags: SetPointerFlags::<Identity, OFFSET>,
26945 PointerDeviceRect: PointerDeviceRect::<Identity, OFFSET>,
26946 SetPointerDeviceRect: SetPointerDeviceRect::<Identity, OFFSET>,
26947 DisplayRect: DisplayRect::<Identity, OFFSET>,
26948 SetDisplayRect: SetDisplayRect::<Identity, OFFSET>,
26949 PixelLocation: PixelLocation::<Identity, OFFSET>,
26950 SetPixelLocation: SetPixelLocation::<Identity, OFFSET>,
26951 HimetricLocation: HimetricLocation::<Identity, OFFSET>,
26952 SetHimetricLocation: SetHimetricLocation::<Identity, OFFSET>,
26953 PixelLocationRaw: PixelLocationRaw::<Identity, OFFSET>,
26954 SetPixelLocationRaw: SetPixelLocationRaw::<Identity, OFFSET>,
26955 HimetricLocationRaw: HimetricLocationRaw::<Identity, OFFSET>,
26956 SetHimetricLocationRaw: SetHimetricLocationRaw::<Identity, OFFSET>,
26957 Time: Time::<Identity, OFFSET>,
26958 SetTime: SetTime::<Identity, OFFSET>,
26959 HistoryCount: HistoryCount::<Identity, OFFSET>,
26960 SetHistoryCount: SetHistoryCount::<Identity, OFFSET>,
26961 InputData: InputData::<Identity, OFFSET>,
26962 SetInputData: SetInputData::<Identity, OFFSET>,
26963 KeyStates: KeyStates::<Identity, OFFSET>,
26964 SetKeyStates: SetKeyStates::<Identity, OFFSET>,
26965 PerformanceCount: PerformanceCount::<Identity, OFFSET>,
26966 SetPerformanceCount: SetPerformanceCount::<Identity, OFFSET>,
26967 ButtonChangeKind: ButtonChangeKind::<Identity, OFFSET>,
26968 SetButtonChangeKind: SetButtonChangeKind::<Identity, OFFSET>,
26969 PenFlags: PenFlags::<Identity, OFFSET>,
26970 SetPenFlags: SetPenFlags::<Identity, OFFSET>,
26971 PenMask: PenMask::<Identity, OFFSET>,
26972 SetPenMask: SetPenMask::<Identity, OFFSET>,
26973 PenPressure: PenPressure::<Identity, OFFSET>,
26974 SetPenPressure: SetPenPressure::<Identity, OFFSET>,
26975 PenRotation: PenRotation::<Identity, OFFSET>,
26976 SetPenRotation: SetPenRotation::<Identity, OFFSET>,
26977 PenTiltX: PenTiltX::<Identity, OFFSET>,
26978 SetPenTiltX: SetPenTiltX::<Identity, OFFSET>,
26979 PenTiltY: PenTiltY::<Identity, OFFSET>,
26980 SetPenTiltY: SetPenTiltY::<Identity, OFFSET>,
26981 TouchFlags: TouchFlags::<Identity, OFFSET>,
26982 SetTouchFlags: SetTouchFlags::<Identity, OFFSET>,
26983 TouchMask: TouchMask::<Identity, OFFSET>,
26984 SetTouchMask: SetTouchMask::<Identity, OFFSET>,
26985 TouchContact: TouchContact::<Identity, OFFSET>,
26986 SetTouchContact: SetTouchContact::<Identity, OFFSET>,
26987 TouchContactRaw: TouchContactRaw::<Identity, OFFSET>,
26988 SetTouchContactRaw: SetTouchContactRaw::<Identity, OFFSET>,
26989 TouchOrientation: TouchOrientation::<Identity, OFFSET>,
26990 SetTouchOrientation: SetTouchOrientation::<Identity, OFFSET>,
26991 TouchPressure: TouchPressure::<Identity, OFFSET>,
26992 SetTouchPressure: SetTouchPressure::<Identity, OFFSET>,
26993 }
26994 }
26995 pub fn matches(iid: &windows_core::GUID) -> bool {
26996 iid == &<ICoreWebView2PointerInfo as windows_core::Interface>::IID
26997 }
26998}
26999impl windows_core::RuntimeName for ICoreWebView2PointerInfo {}
27000windows_core::imp::define_interface!(
27001 ICoreWebView2PrintCompletedHandler,
27002 ICoreWebView2PrintCompletedHandler_Vtbl,
27003 0x8fd80075_ed08_42db_8570_f5d14977461e
27004);
27005windows_core::imp::interface_hierarchy!(ICoreWebView2PrintCompletedHandler, windows_core::IUnknown);
27006impl ICoreWebView2PrintCompletedHandler {
27007 pub unsafe fn Invoke(
27008 &self,
27009 errorcode: windows_core::HRESULT,
27010 result: COREWEBVIEW2_PRINT_STATUS,
27011 ) -> windows_core::Result<()> {
27012 unsafe {
27013 (windows_core::Interface::vtable(self).Invoke)(
27014 windows_core::Interface::as_raw(self),
27015 errorcode,
27016 result,
27017 )
27018 .ok()
27019 }
27020 }
27021}
27022#[repr(C)]
27023pub struct ICoreWebView2PrintCompletedHandler_Vtbl {
27024 pub base__: windows_core::IUnknown_Vtbl,
27025 pub Invoke: unsafe extern "system" fn(
27026 *mut core::ffi::c_void,
27027 windows_core::HRESULT,
27028 COREWEBVIEW2_PRINT_STATUS,
27029 ) -> windows_core::HRESULT,
27030}
27031pub trait ICoreWebView2PrintCompletedHandler_Impl: windows_core::IUnknownImpl {
27032 fn Invoke(
27033 &self,
27034 errorcode: windows_core::HRESULT,
27035 result: COREWEBVIEW2_PRINT_STATUS,
27036 ) -> windows_core::Result<()>;
27037}
27038impl ICoreWebView2PrintCompletedHandler_Vtbl {
27039 pub const fn new<Identity: ICoreWebView2PrintCompletedHandler_Impl, const OFFSET: isize>(
27040 ) -> Self {
27041 unsafe extern "system" fn Invoke<
27042 Identity: ICoreWebView2PrintCompletedHandler_Impl,
27043 const OFFSET: isize,
27044 >(
27045 this: *mut core::ffi::c_void,
27046 errorcode: windows_core::HRESULT,
27047 result: COREWEBVIEW2_PRINT_STATUS,
27048 ) -> windows_core::HRESULT {
27049 unsafe {
27050 let this: &Identity =
27051 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27052 ICoreWebView2PrintCompletedHandler_Impl::Invoke(
27053 this,
27054 core::mem::transmute_copy(&errorcode),
27055 core::mem::transmute_copy(&result),
27056 )
27057 .into()
27058 }
27059 }
27060 Self {
27061 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
27062 Invoke: Invoke::<Identity, OFFSET>,
27063 }
27064 }
27065 pub fn matches(iid: &windows_core::GUID) -> bool {
27066 iid == &<ICoreWebView2PrintCompletedHandler as windows_core::Interface>::IID
27067 }
27068}
27069impl windows_core::RuntimeName for ICoreWebView2PrintCompletedHandler {}
27070windows_core::imp::define_interface!(
27071 ICoreWebView2PrintSettings,
27072 ICoreWebView2PrintSettings_Vtbl,
27073 0x377f3721_c74e_48ca_8db1_df68e51d60e2
27074);
27075windows_core::imp::interface_hierarchy!(ICoreWebView2PrintSettings, windows_core::IUnknown);
27076impl ICoreWebView2PrintSettings {
27077 pub unsafe fn Orientation(
27078 &self,
27079 orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
27080 ) -> windows_core::Result<()> {
27081 unsafe {
27082 (windows_core::Interface::vtable(self).Orientation)(
27083 windows_core::Interface::as_raw(self),
27084 orientation as _,
27085 )
27086 .ok()
27087 }
27088 }
27089 pub unsafe fn SetOrientation(
27090 &self,
27091 orientation: COREWEBVIEW2_PRINT_ORIENTATION,
27092 ) -> windows_core::Result<()> {
27093 unsafe {
27094 (windows_core::Interface::vtable(self).SetOrientation)(
27095 windows_core::Interface::as_raw(self),
27096 orientation,
27097 )
27098 .ok()
27099 }
27100 }
27101 pub unsafe fn ScaleFactor(&self, scalefactor: *mut f64) -> windows_core::Result<()> {
27102 unsafe {
27103 (windows_core::Interface::vtable(self).ScaleFactor)(
27104 windows_core::Interface::as_raw(self),
27105 scalefactor as _,
27106 )
27107 .ok()
27108 }
27109 }
27110 pub unsafe fn SetScaleFactor(&self, scalefactor: f64) -> windows_core::Result<()> {
27111 unsafe {
27112 (windows_core::Interface::vtable(self).SetScaleFactor)(
27113 windows_core::Interface::as_raw(self),
27114 scalefactor,
27115 )
27116 .ok()
27117 }
27118 }
27119 pub unsafe fn PageWidth(&self, pagewidth: *mut f64) -> windows_core::Result<()> {
27120 unsafe {
27121 (windows_core::Interface::vtable(self).PageWidth)(
27122 windows_core::Interface::as_raw(self),
27123 pagewidth as _,
27124 )
27125 .ok()
27126 }
27127 }
27128 pub unsafe fn SetPageWidth(&self, pagewidth: f64) -> windows_core::Result<()> {
27129 unsafe {
27130 (windows_core::Interface::vtable(self).SetPageWidth)(
27131 windows_core::Interface::as_raw(self),
27132 pagewidth,
27133 )
27134 .ok()
27135 }
27136 }
27137 pub unsafe fn PageHeight(&self, pageheight: *mut f64) -> windows_core::Result<()> {
27138 unsafe {
27139 (windows_core::Interface::vtable(self).PageHeight)(
27140 windows_core::Interface::as_raw(self),
27141 pageheight as _,
27142 )
27143 .ok()
27144 }
27145 }
27146 pub unsafe fn SetPageHeight(&self, pageheight: f64) -> windows_core::Result<()> {
27147 unsafe {
27148 (windows_core::Interface::vtable(self).SetPageHeight)(
27149 windows_core::Interface::as_raw(self),
27150 pageheight,
27151 )
27152 .ok()
27153 }
27154 }
27155 pub unsafe fn MarginTop(&self, margintop: *mut f64) -> windows_core::Result<()> {
27156 unsafe {
27157 (windows_core::Interface::vtable(self).MarginTop)(
27158 windows_core::Interface::as_raw(self),
27159 margintop as _,
27160 )
27161 .ok()
27162 }
27163 }
27164 pub unsafe fn SetMarginTop(&self, margintop: f64) -> windows_core::Result<()> {
27165 unsafe {
27166 (windows_core::Interface::vtable(self).SetMarginTop)(
27167 windows_core::Interface::as_raw(self),
27168 margintop,
27169 )
27170 .ok()
27171 }
27172 }
27173 pub unsafe fn MarginBottom(&self, marginbottom: *mut f64) -> windows_core::Result<()> {
27174 unsafe {
27175 (windows_core::Interface::vtable(self).MarginBottom)(
27176 windows_core::Interface::as_raw(self),
27177 marginbottom as _,
27178 )
27179 .ok()
27180 }
27181 }
27182 pub unsafe fn SetMarginBottom(&self, marginbottom: f64) -> windows_core::Result<()> {
27183 unsafe {
27184 (windows_core::Interface::vtable(self).SetMarginBottom)(
27185 windows_core::Interface::as_raw(self),
27186 marginbottom,
27187 )
27188 .ok()
27189 }
27190 }
27191 pub unsafe fn MarginLeft(&self, marginleft: *mut f64) -> windows_core::Result<()> {
27192 unsafe {
27193 (windows_core::Interface::vtable(self).MarginLeft)(
27194 windows_core::Interface::as_raw(self),
27195 marginleft as _,
27196 )
27197 .ok()
27198 }
27199 }
27200 pub unsafe fn SetMarginLeft(&self, marginleft: f64) -> windows_core::Result<()> {
27201 unsafe {
27202 (windows_core::Interface::vtable(self).SetMarginLeft)(
27203 windows_core::Interface::as_raw(self),
27204 marginleft,
27205 )
27206 .ok()
27207 }
27208 }
27209 pub unsafe fn MarginRight(&self, marginright: *mut f64) -> windows_core::Result<()> {
27210 unsafe {
27211 (windows_core::Interface::vtable(self).MarginRight)(
27212 windows_core::Interface::as_raw(self),
27213 marginright as _,
27214 )
27215 .ok()
27216 }
27217 }
27218 pub unsafe fn SetMarginRight(&self, marginright: f64) -> windows_core::Result<()> {
27219 unsafe {
27220 (windows_core::Interface::vtable(self).SetMarginRight)(
27221 windows_core::Interface::as_raw(self),
27222 marginright,
27223 )
27224 .ok()
27225 }
27226 }
27227 pub unsafe fn ShouldPrintBackgrounds(
27228 &self,
27229 shouldprintbackgrounds: *mut windows_core::BOOL,
27230 ) -> windows_core::Result<()> {
27231 unsafe {
27232 (windows_core::Interface::vtable(self).ShouldPrintBackgrounds)(
27233 windows_core::Interface::as_raw(self),
27234 shouldprintbackgrounds as _,
27235 )
27236 .ok()
27237 }
27238 }
27239 pub unsafe fn SetShouldPrintBackgrounds(
27240 &self,
27241 shouldprintbackgrounds: bool,
27242 ) -> windows_core::Result<()> {
27243 unsafe {
27244 (windows_core::Interface::vtable(self).SetShouldPrintBackgrounds)(
27245 windows_core::Interface::as_raw(self),
27246 shouldprintbackgrounds.into(),
27247 )
27248 .ok()
27249 }
27250 }
27251 pub unsafe fn ShouldPrintSelectionOnly(
27252 &self,
27253 shouldprintselectiononly: *mut windows_core::BOOL,
27254 ) -> windows_core::Result<()> {
27255 unsafe {
27256 (windows_core::Interface::vtable(self).ShouldPrintSelectionOnly)(
27257 windows_core::Interface::as_raw(self),
27258 shouldprintselectiononly as _,
27259 )
27260 .ok()
27261 }
27262 }
27263 pub unsafe fn SetShouldPrintSelectionOnly(
27264 &self,
27265 shouldprintselectiononly: bool,
27266 ) -> windows_core::Result<()> {
27267 unsafe {
27268 (windows_core::Interface::vtable(self).SetShouldPrintSelectionOnly)(
27269 windows_core::Interface::as_raw(self),
27270 shouldprintselectiononly.into(),
27271 )
27272 .ok()
27273 }
27274 }
27275 pub unsafe fn ShouldPrintHeaderAndFooter(
27276 &self,
27277 shouldprintheaderandfooter: *mut windows_core::BOOL,
27278 ) -> windows_core::Result<()> {
27279 unsafe {
27280 (windows_core::Interface::vtable(self).ShouldPrintHeaderAndFooter)(
27281 windows_core::Interface::as_raw(self),
27282 shouldprintheaderandfooter as _,
27283 )
27284 .ok()
27285 }
27286 }
27287 pub unsafe fn SetShouldPrintHeaderAndFooter(
27288 &self,
27289 shouldprintheaderandfooter: bool,
27290 ) -> windows_core::Result<()> {
27291 unsafe {
27292 (windows_core::Interface::vtable(self).SetShouldPrintHeaderAndFooter)(
27293 windows_core::Interface::as_raw(self),
27294 shouldprintheaderandfooter.into(),
27295 )
27296 .ok()
27297 }
27298 }
27299 pub unsafe fn HeaderTitle(
27300 &self,
27301 headertitle: *mut windows_core::PWSTR,
27302 ) -> windows_core::Result<()> {
27303 unsafe {
27304 (windows_core::Interface::vtable(self).HeaderTitle)(
27305 windows_core::Interface::as_raw(self),
27306 headertitle as _,
27307 )
27308 .ok()
27309 }
27310 }
27311 pub unsafe fn SetHeaderTitle<P0>(&self, headertitle: P0) -> windows_core::Result<()>
27312 where
27313 P0: windows_core::Param<windows_core::PCWSTR>,
27314 {
27315 unsafe {
27316 (windows_core::Interface::vtable(self).SetHeaderTitle)(
27317 windows_core::Interface::as_raw(self),
27318 headertitle.param().abi(),
27319 )
27320 .ok()
27321 }
27322 }
27323 pub unsafe fn FooterUri(
27324 &self,
27325 footeruri: *mut windows_core::PWSTR,
27326 ) -> windows_core::Result<()> {
27327 unsafe {
27328 (windows_core::Interface::vtable(self).FooterUri)(
27329 windows_core::Interface::as_raw(self),
27330 footeruri as _,
27331 )
27332 .ok()
27333 }
27334 }
27335 pub unsafe fn SetFooterUri<P0>(&self, footeruri: P0) -> windows_core::Result<()>
27336 where
27337 P0: windows_core::Param<windows_core::PCWSTR>,
27338 {
27339 unsafe {
27340 (windows_core::Interface::vtable(self).SetFooterUri)(
27341 windows_core::Interface::as_raw(self),
27342 footeruri.param().abi(),
27343 )
27344 .ok()
27345 }
27346 }
27347}
27348#[repr(C)]
27349pub struct ICoreWebView2PrintSettings_Vtbl {
27350 pub base__: windows_core::IUnknown_Vtbl,
27351 pub Orientation: unsafe extern "system" fn(
27352 *mut core::ffi::c_void,
27353 *mut COREWEBVIEW2_PRINT_ORIENTATION,
27354 ) -> windows_core::HRESULT,
27355 pub SetOrientation: unsafe extern "system" fn(
27356 *mut core::ffi::c_void,
27357 COREWEBVIEW2_PRINT_ORIENTATION,
27358 ) -> windows_core::HRESULT,
27359 pub ScaleFactor:
27360 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27361 pub SetScaleFactor:
27362 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27363 pub PageWidth:
27364 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27365 pub SetPageWidth:
27366 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27367 pub PageHeight:
27368 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27369 pub SetPageHeight:
27370 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27371 pub MarginTop:
27372 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27373 pub SetMarginTop:
27374 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27375 pub MarginBottom:
27376 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27377 pub SetMarginBottom:
27378 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27379 pub MarginLeft:
27380 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27381 pub SetMarginLeft:
27382 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27383 pub MarginRight:
27384 unsafe extern "system" fn(*mut core::ffi::c_void, *mut f64) -> windows_core::HRESULT,
27385 pub SetMarginRight:
27386 unsafe extern "system" fn(*mut core::ffi::c_void, f64) -> windows_core::HRESULT,
27387 pub ShouldPrintBackgrounds: unsafe extern "system" fn(
27388 *mut core::ffi::c_void,
27389 *mut windows_core::BOOL,
27390 ) -> windows_core::HRESULT,
27391 pub SetShouldPrintBackgrounds: unsafe extern "system" fn(
27392 *mut core::ffi::c_void,
27393 windows_core::BOOL,
27394 ) -> windows_core::HRESULT,
27395 pub ShouldPrintSelectionOnly: unsafe extern "system" fn(
27396 *mut core::ffi::c_void,
27397 *mut windows_core::BOOL,
27398 ) -> windows_core::HRESULT,
27399 pub SetShouldPrintSelectionOnly: unsafe extern "system" fn(
27400 *mut core::ffi::c_void,
27401 windows_core::BOOL,
27402 ) -> windows_core::HRESULT,
27403 pub ShouldPrintHeaderAndFooter: unsafe extern "system" fn(
27404 *mut core::ffi::c_void,
27405 *mut windows_core::BOOL,
27406 ) -> windows_core::HRESULT,
27407 pub SetShouldPrintHeaderAndFooter: unsafe extern "system" fn(
27408 *mut core::ffi::c_void,
27409 windows_core::BOOL,
27410 ) -> windows_core::HRESULT,
27411 pub HeaderTitle: unsafe extern "system" fn(
27412 *mut core::ffi::c_void,
27413 *mut windows_core::PWSTR,
27414 ) -> windows_core::HRESULT,
27415 pub SetHeaderTitle: unsafe extern "system" fn(
27416 *mut core::ffi::c_void,
27417 windows_core::PCWSTR,
27418 ) -> windows_core::HRESULT,
27419 pub FooterUri: unsafe extern "system" fn(
27420 *mut core::ffi::c_void,
27421 *mut windows_core::PWSTR,
27422 ) -> windows_core::HRESULT,
27423 pub SetFooterUri: unsafe extern "system" fn(
27424 *mut core::ffi::c_void,
27425 windows_core::PCWSTR,
27426 ) -> windows_core::HRESULT,
27427}
27428pub trait ICoreWebView2PrintSettings_Impl: windows_core::IUnknownImpl {
27429 fn Orientation(
27430 &self,
27431 orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
27432 ) -> windows_core::Result<()>;
27433 fn SetOrientation(
27434 &self,
27435 orientation: COREWEBVIEW2_PRINT_ORIENTATION,
27436 ) -> windows_core::Result<()>;
27437 fn ScaleFactor(&self, scalefactor: *mut f64) -> windows_core::Result<()>;
27438 fn SetScaleFactor(&self, scalefactor: f64) -> windows_core::Result<()>;
27439 fn PageWidth(&self, pagewidth: *mut f64) -> windows_core::Result<()>;
27440 fn SetPageWidth(&self, pagewidth: f64) -> windows_core::Result<()>;
27441 fn PageHeight(&self, pageheight: *mut f64) -> windows_core::Result<()>;
27442 fn SetPageHeight(&self, pageheight: f64) -> windows_core::Result<()>;
27443 fn MarginTop(&self, margintop: *mut f64) -> windows_core::Result<()>;
27444 fn SetMarginTop(&self, margintop: f64) -> windows_core::Result<()>;
27445 fn MarginBottom(&self, marginbottom: *mut f64) -> windows_core::Result<()>;
27446 fn SetMarginBottom(&self, marginbottom: f64) -> windows_core::Result<()>;
27447 fn MarginLeft(&self, marginleft: *mut f64) -> windows_core::Result<()>;
27448 fn SetMarginLeft(&self, marginleft: f64) -> windows_core::Result<()>;
27449 fn MarginRight(&self, marginright: *mut f64) -> windows_core::Result<()>;
27450 fn SetMarginRight(&self, marginright: f64) -> windows_core::Result<()>;
27451 fn ShouldPrintBackgrounds(
27452 &self,
27453 shouldprintbackgrounds: *mut windows_core::BOOL,
27454 ) -> windows_core::Result<()>;
27455 fn SetShouldPrintBackgrounds(
27456 &self,
27457 shouldprintbackgrounds: windows_core::BOOL,
27458 ) -> windows_core::Result<()>;
27459 fn ShouldPrintSelectionOnly(
27460 &self,
27461 shouldprintselectiononly: *mut windows_core::BOOL,
27462 ) -> windows_core::Result<()>;
27463 fn SetShouldPrintSelectionOnly(
27464 &self,
27465 shouldprintselectiononly: windows_core::BOOL,
27466 ) -> windows_core::Result<()>;
27467 fn ShouldPrintHeaderAndFooter(
27468 &self,
27469 shouldprintheaderandfooter: *mut windows_core::BOOL,
27470 ) -> windows_core::Result<()>;
27471 fn SetShouldPrintHeaderAndFooter(
27472 &self,
27473 shouldprintheaderandfooter: windows_core::BOOL,
27474 ) -> windows_core::Result<()>;
27475 fn HeaderTitle(&self, headertitle: *mut windows_core::PWSTR) -> windows_core::Result<()>;
27476 fn SetHeaderTitle(&self, headertitle: &windows_core::PCWSTR) -> windows_core::Result<()>;
27477 fn FooterUri(&self, footeruri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
27478 fn SetFooterUri(&self, footeruri: &windows_core::PCWSTR) -> windows_core::Result<()>;
27479}
27480impl ICoreWebView2PrintSettings_Vtbl {
27481 pub const fn new<Identity: ICoreWebView2PrintSettings_Impl, const OFFSET: isize>() -> Self {
27482 unsafe extern "system" fn Orientation<
27483 Identity: ICoreWebView2PrintSettings_Impl,
27484 const OFFSET: isize,
27485 >(
27486 this: *mut core::ffi::c_void,
27487 orientation: *mut COREWEBVIEW2_PRINT_ORIENTATION,
27488 ) -> windows_core::HRESULT {
27489 unsafe {
27490 let this: &Identity =
27491 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27492 ICoreWebView2PrintSettings_Impl::Orientation(
27493 this,
27494 core::mem::transmute_copy(&orientation),
27495 )
27496 .into()
27497 }
27498 }
27499 unsafe extern "system" fn SetOrientation<
27500 Identity: ICoreWebView2PrintSettings_Impl,
27501 const OFFSET: isize,
27502 >(
27503 this: *mut core::ffi::c_void,
27504 orientation: COREWEBVIEW2_PRINT_ORIENTATION,
27505 ) -> windows_core::HRESULT {
27506 unsafe {
27507 let this: &Identity =
27508 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27509 ICoreWebView2PrintSettings_Impl::SetOrientation(
27510 this,
27511 core::mem::transmute_copy(&orientation),
27512 )
27513 .into()
27514 }
27515 }
27516 unsafe extern "system" fn ScaleFactor<
27517 Identity: ICoreWebView2PrintSettings_Impl,
27518 const OFFSET: isize,
27519 >(
27520 this: *mut core::ffi::c_void,
27521 scalefactor: *mut f64,
27522 ) -> windows_core::HRESULT {
27523 unsafe {
27524 let this: &Identity =
27525 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27526 ICoreWebView2PrintSettings_Impl::ScaleFactor(
27527 this,
27528 core::mem::transmute_copy(&scalefactor),
27529 )
27530 .into()
27531 }
27532 }
27533 unsafe extern "system" fn SetScaleFactor<
27534 Identity: ICoreWebView2PrintSettings_Impl,
27535 const OFFSET: isize,
27536 >(
27537 this: *mut core::ffi::c_void,
27538 scalefactor: f64,
27539 ) -> windows_core::HRESULT {
27540 unsafe {
27541 let this: &Identity =
27542 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27543 ICoreWebView2PrintSettings_Impl::SetScaleFactor(
27544 this,
27545 core::mem::transmute_copy(&scalefactor),
27546 )
27547 .into()
27548 }
27549 }
27550 unsafe extern "system" fn PageWidth<
27551 Identity: ICoreWebView2PrintSettings_Impl,
27552 const OFFSET: isize,
27553 >(
27554 this: *mut core::ffi::c_void,
27555 pagewidth: *mut f64,
27556 ) -> windows_core::HRESULT {
27557 unsafe {
27558 let this: &Identity =
27559 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27560 ICoreWebView2PrintSettings_Impl::PageWidth(
27561 this,
27562 core::mem::transmute_copy(&pagewidth),
27563 )
27564 .into()
27565 }
27566 }
27567 unsafe extern "system" fn SetPageWidth<
27568 Identity: ICoreWebView2PrintSettings_Impl,
27569 const OFFSET: isize,
27570 >(
27571 this: *mut core::ffi::c_void,
27572 pagewidth: f64,
27573 ) -> windows_core::HRESULT {
27574 unsafe {
27575 let this: &Identity =
27576 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27577 ICoreWebView2PrintSettings_Impl::SetPageWidth(
27578 this,
27579 core::mem::transmute_copy(&pagewidth),
27580 )
27581 .into()
27582 }
27583 }
27584 unsafe extern "system" fn PageHeight<
27585 Identity: ICoreWebView2PrintSettings_Impl,
27586 const OFFSET: isize,
27587 >(
27588 this: *mut core::ffi::c_void,
27589 pageheight: *mut f64,
27590 ) -> windows_core::HRESULT {
27591 unsafe {
27592 let this: &Identity =
27593 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27594 ICoreWebView2PrintSettings_Impl::PageHeight(
27595 this,
27596 core::mem::transmute_copy(&pageheight),
27597 )
27598 .into()
27599 }
27600 }
27601 unsafe extern "system" fn SetPageHeight<
27602 Identity: ICoreWebView2PrintSettings_Impl,
27603 const OFFSET: isize,
27604 >(
27605 this: *mut core::ffi::c_void,
27606 pageheight: f64,
27607 ) -> windows_core::HRESULT {
27608 unsafe {
27609 let this: &Identity =
27610 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27611 ICoreWebView2PrintSettings_Impl::SetPageHeight(
27612 this,
27613 core::mem::transmute_copy(&pageheight),
27614 )
27615 .into()
27616 }
27617 }
27618 unsafe extern "system" fn MarginTop<
27619 Identity: ICoreWebView2PrintSettings_Impl,
27620 const OFFSET: isize,
27621 >(
27622 this: *mut core::ffi::c_void,
27623 margintop: *mut f64,
27624 ) -> windows_core::HRESULT {
27625 unsafe {
27626 let this: &Identity =
27627 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27628 ICoreWebView2PrintSettings_Impl::MarginTop(
27629 this,
27630 core::mem::transmute_copy(&margintop),
27631 )
27632 .into()
27633 }
27634 }
27635 unsafe extern "system" fn SetMarginTop<
27636 Identity: ICoreWebView2PrintSettings_Impl,
27637 const OFFSET: isize,
27638 >(
27639 this: *mut core::ffi::c_void,
27640 margintop: f64,
27641 ) -> windows_core::HRESULT {
27642 unsafe {
27643 let this: &Identity =
27644 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27645 ICoreWebView2PrintSettings_Impl::SetMarginTop(
27646 this,
27647 core::mem::transmute_copy(&margintop),
27648 )
27649 .into()
27650 }
27651 }
27652 unsafe extern "system" fn MarginBottom<
27653 Identity: ICoreWebView2PrintSettings_Impl,
27654 const OFFSET: isize,
27655 >(
27656 this: *mut core::ffi::c_void,
27657 marginbottom: *mut f64,
27658 ) -> windows_core::HRESULT {
27659 unsafe {
27660 let this: &Identity =
27661 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27662 ICoreWebView2PrintSettings_Impl::MarginBottom(
27663 this,
27664 core::mem::transmute_copy(&marginbottom),
27665 )
27666 .into()
27667 }
27668 }
27669 unsafe extern "system" fn SetMarginBottom<
27670 Identity: ICoreWebView2PrintSettings_Impl,
27671 const OFFSET: isize,
27672 >(
27673 this: *mut core::ffi::c_void,
27674 marginbottom: f64,
27675 ) -> windows_core::HRESULT {
27676 unsafe {
27677 let this: &Identity =
27678 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27679 ICoreWebView2PrintSettings_Impl::SetMarginBottom(
27680 this,
27681 core::mem::transmute_copy(&marginbottom),
27682 )
27683 .into()
27684 }
27685 }
27686 unsafe extern "system" fn MarginLeft<
27687 Identity: ICoreWebView2PrintSettings_Impl,
27688 const OFFSET: isize,
27689 >(
27690 this: *mut core::ffi::c_void,
27691 marginleft: *mut f64,
27692 ) -> windows_core::HRESULT {
27693 unsafe {
27694 let this: &Identity =
27695 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27696 ICoreWebView2PrintSettings_Impl::MarginLeft(
27697 this,
27698 core::mem::transmute_copy(&marginleft),
27699 )
27700 .into()
27701 }
27702 }
27703 unsafe extern "system" fn SetMarginLeft<
27704 Identity: ICoreWebView2PrintSettings_Impl,
27705 const OFFSET: isize,
27706 >(
27707 this: *mut core::ffi::c_void,
27708 marginleft: f64,
27709 ) -> windows_core::HRESULT {
27710 unsafe {
27711 let this: &Identity =
27712 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27713 ICoreWebView2PrintSettings_Impl::SetMarginLeft(
27714 this,
27715 core::mem::transmute_copy(&marginleft),
27716 )
27717 .into()
27718 }
27719 }
27720 unsafe extern "system" fn MarginRight<
27721 Identity: ICoreWebView2PrintSettings_Impl,
27722 const OFFSET: isize,
27723 >(
27724 this: *mut core::ffi::c_void,
27725 marginright: *mut f64,
27726 ) -> windows_core::HRESULT {
27727 unsafe {
27728 let this: &Identity =
27729 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27730 ICoreWebView2PrintSettings_Impl::MarginRight(
27731 this,
27732 core::mem::transmute_copy(&marginright),
27733 )
27734 .into()
27735 }
27736 }
27737 unsafe extern "system" fn SetMarginRight<
27738 Identity: ICoreWebView2PrintSettings_Impl,
27739 const OFFSET: isize,
27740 >(
27741 this: *mut core::ffi::c_void,
27742 marginright: f64,
27743 ) -> windows_core::HRESULT {
27744 unsafe {
27745 let this: &Identity =
27746 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27747 ICoreWebView2PrintSettings_Impl::SetMarginRight(
27748 this,
27749 core::mem::transmute_copy(&marginright),
27750 )
27751 .into()
27752 }
27753 }
27754 unsafe extern "system" fn ShouldPrintBackgrounds<
27755 Identity: ICoreWebView2PrintSettings_Impl,
27756 const OFFSET: isize,
27757 >(
27758 this: *mut core::ffi::c_void,
27759 shouldprintbackgrounds: *mut windows_core::BOOL,
27760 ) -> windows_core::HRESULT {
27761 unsafe {
27762 let this: &Identity =
27763 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27764 ICoreWebView2PrintSettings_Impl::ShouldPrintBackgrounds(
27765 this,
27766 core::mem::transmute_copy(&shouldprintbackgrounds),
27767 )
27768 .into()
27769 }
27770 }
27771 unsafe extern "system" fn SetShouldPrintBackgrounds<
27772 Identity: ICoreWebView2PrintSettings_Impl,
27773 const OFFSET: isize,
27774 >(
27775 this: *mut core::ffi::c_void,
27776 shouldprintbackgrounds: windows_core::BOOL,
27777 ) -> windows_core::HRESULT {
27778 unsafe {
27779 let this: &Identity =
27780 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27781 ICoreWebView2PrintSettings_Impl::SetShouldPrintBackgrounds(
27782 this,
27783 core::mem::transmute_copy(&shouldprintbackgrounds),
27784 )
27785 .into()
27786 }
27787 }
27788 unsafe extern "system" fn ShouldPrintSelectionOnly<
27789 Identity: ICoreWebView2PrintSettings_Impl,
27790 const OFFSET: isize,
27791 >(
27792 this: *mut core::ffi::c_void,
27793 shouldprintselectiononly: *mut windows_core::BOOL,
27794 ) -> windows_core::HRESULT {
27795 unsafe {
27796 let this: &Identity =
27797 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27798 ICoreWebView2PrintSettings_Impl::ShouldPrintSelectionOnly(
27799 this,
27800 core::mem::transmute_copy(&shouldprintselectiononly),
27801 )
27802 .into()
27803 }
27804 }
27805 unsafe extern "system" fn SetShouldPrintSelectionOnly<
27806 Identity: ICoreWebView2PrintSettings_Impl,
27807 const OFFSET: isize,
27808 >(
27809 this: *mut core::ffi::c_void,
27810 shouldprintselectiononly: windows_core::BOOL,
27811 ) -> windows_core::HRESULT {
27812 unsafe {
27813 let this: &Identity =
27814 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27815 ICoreWebView2PrintSettings_Impl::SetShouldPrintSelectionOnly(
27816 this,
27817 core::mem::transmute_copy(&shouldprintselectiononly),
27818 )
27819 .into()
27820 }
27821 }
27822 unsafe extern "system" fn ShouldPrintHeaderAndFooter<
27823 Identity: ICoreWebView2PrintSettings_Impl,
27824 const OFFSET: isize,
27825 >(
27826 this: *mut core::ffi::c_void,
27827 shouldprintheaderandfooter: *mut windows_core::BOOL,
27828 ) -> windows_core::HRESULT {
27829 unsafe {
27830 let this: &Identity =
27831 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27832 ICoreWebView2PrintSettings_Impl::ShouldPrintHeaderAndFooter(
27833 this,
27834 core::mem::transmute_copy(&shouldprintheaderandfooter),
27835 )
27836 .into()
27837 }
27838 }
27839 unsafe extern "system" fn SetShouldPrintHeaderAndFooter<
27840 Identity: ICoreWebView2PrintSettings_Impl,
27841 const OFFSET: isize,
27842 >(
27843 this: *mut core::ffi::c_void,
27844 shouldprintheaderandfooter: windows_core::BOOL,
27845 ) -> windows_core::HRESULT {
27846 unsafe {
27847 let this: &Identity =
27848 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27849 ICoreWebView2PrintSettings_Impl::SetShouldPrintHeaderAndFooter(
27850 this,
27851 core::mem::transmute_copy(&shouldprintheaderandfooter),
27852 )
27853 .into()
27854 }
27855 }
27856 unsafe extern "system" fn HeaderTitle<
27857 Identity: ICoreWebView2PrintSettings_Impl,
27858 const OFFSET: isize,
27859 >(
27860 this: *mut core::ffi::c_void,
27861 headertitle: *mut windows_core::PWSTR,
27862 ) -> windows_core::HRESULT {
27863 unsafe {
27864 let this: &Identity =
27865 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27866 ICoreWebView2PrintSettings_Impl::HeaderTitle(
27867 this,
27868 core::mem::transmute_copy(&headertitle),
27869 )
27870 .into()
27871 }
27872 }
27873 unsafe extern "system" fn SetHeaderTitle<
27874 Identity: ICoreWebView2PrintSettings_Impl,
27875 const OFFSET: isize,
27876 >(
27877 this: *mut core::ffi::c_void,
27878 headertitle: windows_core::PCWSTR,
27879 ) -> windows_core::HRESULT {
27880 unsafe {
27881 let this: &Identity =
27882 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27883 ICoreWebView2PrintSettings_Impl::SetHeaderTitle(
27884 this,
27885 core::mem::transmute(&headertitle),
27886 )
27887 .into()
27888 }
27889 }
27890 unsafe extern "system" fn FooterUri<
27891 Identity: ICoreWebView2PrintSettings_Impl,
27892 const OFFSET: isize,
27893 >(
27894 this: *mut core::ffi::c_void,
27895 footeruri: *mut windows_core::PWSTR,
27896 ) -> windows_core::HRESULT {
27897 unsafe {
27898 let this: &Identity =
27899 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27900 ICoreWebView2PrintSettings_Impl::FooterUri(
27901 this,
27902 core::mem::transmute_copy(&footeruri),
27903 )
27904 .into()
27905 }
27906 }
27907 unsafe extern "system" fn SetFooterUri<
27908 Identity: ICoreWebView2PrintSettings_Impl,
27909 const OFFSET: isize,
27910 >(
27911 this: *mut core::ffi::c_void,
27912 footeruri: windows_core::PCWSTR,
27913 ) -> windows_core::HRESULT {
27914 unsafe {
27915 let this: &Identity =
27916 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
27917 ICoreWebView2PrintSettings_Impl::SetFooterUri(
27918 this,
27919 core::mem::transmute(&footeruri),
27920 )
27921 .into()
27922 }
27923 }
27924 Self {
27925 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
27926 Orientation: Orientation::<Identity, OFFSET>,
27927 SetOrientation: SetOrientation::<Identity, OFFSET>,
27928 ScaleFactor: ScaleFactor::<Identity, OFFSET>,
27929 SetScaleFactor: SetScaleFactor::<Identity, OFFSET>,
27930 PageWidth: PageWidth::<Identity, OFFSET>,
27931 SetPageWidth: SetPageWidth::<Identity, OFFSET>,
27932 PageHeight: PageHeight::<Identity, OFFSET>,
27933 SetPageHeight: SetPageHeight::<Identity, OFFSET>,
27934 MarginTop: MarginTop::<Identity, OFFSET>,
27935 SetMarginTop: SetMarginTop::<Identity, OFFSET>,
27936 MarginBottom: MarginBottom::<Identity, OFFSET>,
27937 SetMarginBottom: SetMarginBottom::<Identity, OFFSET>,
27938 MarginLeft: MarginLeft::<Identity, OFFSET>,
27939 SetMarginLeft: SetMarginLeft::<Identity, OFFSET>,
27940 MarginRight: MarginRight::<Identity, OFFSET>,
27941 SetMarginRight: SetMarginRight::<Identity, OFFSET>,
27942 ShouldPrintBackgrounds: ShouldPrintBackgrounds::<Identity, OFFSET>,
27943 SetShouldPrintBackgrounds: SetShouldPrintBackgrounds::<Identity, OFFSET>,
27944 ShouldPrintSelectionOnly: ShouldPrintSelectionOnly::<Identity, OFFSET>,
27945 SetShouldPrintSelectionOnly: SetShouldPrintSelectionOnly::<Identity, OFFSET>,
27946 ShouldPrintHeaderAndFooter: ShouldPrintHeaderAndFooter::<Identity, OFFSET>,
27947 SetShouldPrintHeaderAndFooter: SetShouldPrintHeaderAndFooter::<Identity, OFFSET>,
27948 HeaderTitle: HeaderTitle::<Identity, OFFSET>,
27949 SetHeaderTitle: SetHeaderTitle::<Identity, OFFSET>,
27950 FooterUri: FooterUri::<Identity, OFFSET>,
27951 SetFooterUri: SetFooterUri::<Identity, OFFSET>,
27952 }
27953 }
27954 pub fn matches(iid: &windows_core::GUID) -> bool {
27955 iid == &<ICoreWebView2PrintSettings as windows_core::Interface>::IID
27956 }
27957}
27958impl windows_core::RuntimeName for ICoreWebView2PrintSettings {}
27959windows_core::imp::define_interface!(
27960 ICoreWebView2PrintSettings2,
27961 ICoreWebView2PrintSettings2_Vtbl,
27962 0xca7f0e1f_3484_41d1_8c1a_65cd44a63f8d
27963);
27964impl core::ops::Deref for ICoreWebView2PrintSettings2 {
27965 type Target = ICoreWebView2PrintSettings;
27966 fn deref(&self) -> &Self::Target {
27967 unsafe { core::mem::transmute(self) }
27968 }
27969}
27970windows_core::imp::interface_hierarchy!(
27971 ICoreWebView2PrintSettings2,
27972 windows_core::IUnknown,
27973 ICoreWebView2PrintSettings
27974);
27975impl ICoreWebView2PrintSettings2 {
27976 pub unsafe fn PageRanges(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
27977 unsafe {
27978 (windows_core::Interface::vtable(self).PageRanges)(
27979 windows_core::Interface::as_raw(self),
27980 value as _,
27981 )
27982 .ok()
27983 }
27984 }
27985 pub unsafe fn SetPageRanges<P0>(&self, value: P0) -> windows_core::Result<()>
27986 where
27987 P0: windows_core::Param<windows_core::PCWSTR>,
27988 {
27989 unsafe {
27990 (windows_core::Interface::vtable(self).SetPageRanges)(
27991 windows_core::Interface::as_raw(self),
27992 value.param().abi(),
27993 )
27994 .ok()
27995 }
27996 }
27997 pub unsafe fn PagesPerSide(&self, value: *mut i32) -> windows_core::Result<()> {
27998 unsafe {
27999 (windows_core::Interface::vtable(self).PagesPerSide)(
28000 windows_core::Interface::as_raw(self),
28001 value as _,
28002 )
28003 .ok()
28004 }
28005 }
28006 pub unsafe fn SetPagesPerSide(&self, value: i32) -> windows_core::Result<()> {
28007 unsafe {
28008 (windows_core::Interface::vtable(self).SetPagesPerSide)(
28009 windows_core::Interface::as_raw(self),
28010 value,
28011 )
28012 .ok()
28013 }
28014 }
28015 pub unsafe fn Copies(&self, value: *mut i32) -> windows_core::Result<()> {
28016 unsafe {
28017 (windows_core::Interface::vtable(self).Copies)(
28018 windows_core::Interface::as_raw(self),
28019 value as _,
28020 )
28021 .ok()
28022 }
28023 }
28024 pub unsafe fn SetCopies(&self, value: i32) -> windows_core::Result<()> {
28025 unsafe {
28026 (windows_core::Interface::vtable(self).SetCopies)(
28027 windows_core::Interface::as_raw(self),
28028 value,
28029 )
28030 .ok()
28031 }
28032 }
28033 pub unsafe fn Collation(
28034 &self,
28035 value: *mut COREWEBVIEW2_PRINT_COLLATION,
28036 ) -> windows_core::Result<()> {
28037 unsafe {
28038 (windows_core::Interface::vtable(self).Collation)(
28039 windows_core::Interface::as_raw(self),
28040 value as _,
28041 )
28042 .ok()
28043 }
28044 }
28045 pub unsafe fn SetCollation(
28046 &self,
28047 value: COREWEBVIEW2_PRINT_COLLATION,
28048 ) -> windows_core::Result<()> {
28049 unsafe {
28050 (windows_core::Interface::vtable(self).SetCollation)(
28051 windows_core::Interface::as_raw(self),
28052 value,
28053 )
28054 .ok()
28055 }
28056 }
28057 pub unsafe fn ColorMode(
28058 &self,
28059 value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
28060 ) -> windows_core::Result<()> {
28061 unsafe {
28062 (windows_core::Interface::vtable(self).ColorMode)(
28063 windows_core::Interface::as_raw(self),
28064 value as _,
28065 )
28066 .ok()
28067 }
28068 }
28069 pub unsafe fn SetColorMode(
28070 &self,
28071 value: COREWEBVIEW2_PRINT_COLOR_MODE,
28072 ) -> windows_core::Result<()> {
28073 unsafe {
28074 (windows_core::Interface::vtable(self).SetColorMode)(
28075 windows_core::Interface::as_raw(self),
28076 value,
28077 )
28078 .ok()
28079 }
28080 }
28081 pub unsafe fn Duplex(&self, value: *mut COREWEBVIEW2_PRINT_DUPLEX) -> windows_core::Result<()> {
28082 unsafe {
28083 (windows_core::Interface::vtable(self).Duplex)(
28084 windows_core::Interface::as_raw(self),
28085 value as _,
28086 )
28087 .ok()
28088 }
28089 }
28090 pub unsafe fn SetDuplex(&self, value: COREWEBVIEW2_PRINT_DUPLEX) -> windows_core::Result<()> {
28091 unsafe {
28092 (windows_core::Interface::vtable(self).SetDuplex)(
28093 windows_core::Interface::as_raw(self),
28094 value,
28095 )
28096 .ok()
28097 }
28098 }
28099 pub unsafe fn MediaSize(
28100 &self,
28101 value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
28102 ) -> windows_core::Result<()> {
28103 unsafe {
28104 (windows_core::Interface::vtable(self).MediaSize)(
28105 windows_core::Interface::as_raw(self),
28106 value as _,
28107 )
28108 .ok()
28109 }
28110 }
28111 pub unsafe fn SetMediaSize(
28112 &self,
28113 value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
28114 ) -> windows_core::Result<()> {
28115 unsafe {
28116 (windows_core::Interface::vtable(self).SetMediaSize)(
28117 windows_core::Interface::as_raw(self),
28118 value,
28119 )
28120 .ok()
28121 }
28122 }
28123 pub unsafe fn PrinterName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
28124 unsafe {
28125 (windows_core::Interface::vtable(self).PrinterName)(
28126 windows_core::Interface::as_raw(self),
28127 value as _,
28128 )
28129 .ok()
28130 }
28131 }
28132 pub unsafe fn SetPrinterName<P0>(&self, value: P0) -> windows_core::Result<()>
28133 where
28134 P0: windows_core::Param<windows_core::PCWSTR>,
28135 {
28136 unsafe {
28137 (windows_core::Interface::vtable(self).SetPrinterName)(
28138 windows_core::Interface::as_raw(self),
28139 value.param().abi(),
28140 )
28141 .ok()
28142 }
28143 }
28144}
28145#[repr(C)]
28146pub struct ICoreWebView2PrintSettings2_Vtbl {
28147 pub base__: ICoreWebView2PrintSettings_Vtbl,
28148 pub PageRanges: unsafe extern "system" fn(
28149 *mut core::ffi::c_void,
28150 *mut windows_core::PWSTR,
28151 ) -> windows_core::HRESULT,
28152 pub SetPageRanges: unsafe extern "system" fn(
28153 *mut core::ffi::c_void,
28154 windows_core::PCWSTR,
28155 ) -> windows_core::HRESULT,
28156 pub PagesPerSide:
28157 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
28158 pub SetPagesPerSide:
28159 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
28160 pub Copies:
28161 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
28162 pub SetCopies: unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
28163 pub Collation: unsafe extern "system" fn(
28164 *mut core::ffi::c_void,
28165 *mut COREWEBVIEW2_PRINT_COLLATION,
28166 ) -> windows_core::HRESULT,
28167 pub SetCollation: unsafe extern "system" fn(
28168 *mut core::ffi::c_void,
28169 COREWEBVIEW2_PRINT_COLLATION,
28170 ) -> windows_core::HRESULT,
28171 pub ColorMode: unsafe extern "system" fn(
28172 *mut core::ffi::c_void,
28173 *mut COREWEBVIEW2_PRINT_COLOR_MODE,
28174 ) -> windows_core::HRESULT,
28175 pub SetColorMode: unsafe extern "system" fn(
28176 *mut core::ffi::c_void,
28177 COREWEBVIEW2_PRINT_COLOR_MODE,
28178 ) -> windows_core::HRESULT,
28179 pub Duplex: unsafe extern "system" fn(
28180 *mut core::ffi::c_void,
28181 *mut COREWEBVIEW2_PRINT_DUPLEX,
28182 ) -> windows_core::HRESULT,
28183 pub SetDuplex: unsafe extern "system" fn(
28184 *mut core::ffi::c_void,
28185 COREWEBVIEW2_PRINT_DUPLEX,
28186 ) -> windows_core::HRESULT,
28187 pub MediaSize: unsafe extern "system" fn(
28188 *mut core::ffi::c_void,
28189 *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
28190 ) -> windows_core::HRESULT,
28191 pub SetMediaSize: unsafe extern "system" fn(
28192 *mut core::ffi::c_void,
28193 COREWEBVIEW2_PRINT_MEDIA_SIZE,
28194 ) -> windows_core::HRESULT,
28195 pub PrinterName: unsafe extern "system" fn(
28196 *mut core::ffi::c_void,
28197 *mut windows_core::PWSTR,
28198 ) -> windows_core::HRESULT,
28199 pub SetPrinterName: unsafe extern "system" fn(
28200 *mut core::ffi::c_void,
28201 windows_core::PCWSTR,
28202 ) -> windows_core::HRESULT,
28203}
28204pub trait ICoreWebView2PrintSettings2_Impl: ICoreWebView2PrintSettings_Impl {
28205 fn PageRanges(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
28206 fn SetPageRanges(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
28207 fn PagesPerSide(&self, value: *mut i32) -> windows_core::Result<()>;
28208 fn SetPagesPerSide(&self, value: i32) -> windows_core::Result<()>;
28209 fn Copies(&self, value: *mut i32) -> windows_core::Result<()>;
28210 fn SetCopies(&self, value: i32) -> windows_core::Result<()>;
28211 fn Collation(&self, value: *mut COREWEBVIEW2_PRINT_COLLATION) -> windows_core::Result<()>;
28212 fn SetCollation(&self, value: COREWEBVIEW2_PRINT_COLLATION) -> windows_core::Result<()>;
28213 fn ColorMode(&self, value: *mut COREWEBVIEW2_PRINT_COLOR_MODE) -> windows_core::Result<()>;
28214 fn SetColorMode(&self, value: COREWEBVIEW2_PRINT_COLOR_MODE) -> windows_core::Result<()>;
28215 fn Duplex(&self, value: *mut COREWEBVIEW2_PRINT_DUPLEX) -> windows_core::Result<()>;
28216 fn SetDuplex(&self, value: COREWEBVIEW2_PRINT_DUPLEX) -> windows_core::Result<()>;
28217 fn MediaSize(&self, value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE) -> windows_core::Result<()>;
28218 fn SetMediaSize(&self, value: COREWEBVIEW2_PRINT_MEDIA_SIZE) -> windows_core::Result<()>;
28219 fn PrinterName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
28220 fn SetPrinterName(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
28221}
28222impl ICoreWebView2PrintSettings2_Vtbl {
28223 pub const fn new<Identity: ICoreWebView2PrintSettings2_Impl, const OFFSET: isize>() -> Self {
28224 unsafe extern "system" fn PageRanges<
28225 Identity: ICoreWebView2PrintSettings2_Impl,
28226 const OFFSET: isize,
28227 >(
28228 this: *mut core::ffi::c_void,
28229 value: *mut windows_core::PWSTR,
28230 ) -> windows_core::HRESULT {
28231 unsafe {
28232 let this: &Identity =
28233 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28234 ICoreWebView2PrintSettings2_Impl::PageRanges(
28235 this,
28236 core::mem::transmute_copy(&value),
28237 )
28238 .into()
28239 }
28240 }
28241 unsafe extern "system" fn SetPageRanges<
28242 Identity: ICoreWebView2PrintSettings2_Impl,
28243 const OFFSET: isize,
28244 >(
28245 this: *mut core::ffi::c_void,
28246 value: windows_core::PCWSTR,
28247 ) -> windows_core::HRESULT {
28248 unsafe {
28249 let this: &Identity =
28250 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28251 ICoreWebView2PrintSettings2_Impl::SetPageRanges(this, core::mem::transmute(&value))
28252 .into()
28253 }
28254 }
28255 unsafe extern "system" fn PagesPerSide<
28256 Identity: ICoreWebView2PrintSettings2_Impl,
28257 const OFFSET: isize,
28258 >(
28259 this: *mut core::ffi::c_void,
28260 value: *mut i32,
28261 ) -> windows_core::HRESULT {
28262 unsafe {
28263 let this: &Identity =
28264 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28265 ICoreWebView2PrintSettings2_Impl::PagesPerSide(
28266 this,
28267 core::mem::transmute_copy(&value),
28268 )
28269 .into()
28270 }
28271 }
28272 unsafe extern "system" fn SetPagesPerSide<
28273 Identity: ICoreWebView2PrintSettings2_Impl,
28274 const OFFSET: isize,
28275 >(
28276 this: *mut core::ffi::c_void,
28277 value: i32,
28278 ) -> windows_core::HRESULT {
28279 unsafe {
28280 let this: &Identity =
28281 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28282 ICoreWebView2PrintSettings2_Impl::SetPagesPerSide(
28283 this,
28284 core::mem::transmute_copy(&value),
28285 )
28286 .into()
28287 }
28288 }
28289 unsafe extern "system" fn Copies<
28290 Identity: ICoreWebView2PrintSettings2_Impl,
28291 const OFFSET: isize,
28292 >(
28293 this: *mut core::ffi::c_void,
28294 value: *mut i32,
28295 ) -> windows_core::HRESULT {
28296 unsafe {
28297 let this: &Identity =
28298 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28299 ICoreWebView2PrintSettings2_Impl::Copies(this, core::mem::transmute_copy(&value))
28300 .into()
28301 }
28302 }
28303 unsafe extern "system" fn SetCopies<
28304 Identity: ICoreWebView2PrintSettings2_Impl,
28305 const OFFSET: isize,
28306 >(
28307 this: *mut core::ffi::c_void,
28308 value: i32,
28309 ) -> windows_core::HRESULT {
28310 unsafe {
28311 let this: &Identity =
28312 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28313 ICoreWebView2PrintSettings2_Impl::SetCopies(this, core::mem::transmute_copy(&value))
28314 .into()
28315 }
28316 }
28317 unsafe extern "system" fn Collation<
28318 Identity: ICoreWebView2PrintSettings2_Impl,
28319 const OFFSET: isize,
28320 >(
28321 this: *mut core::ffi::c_void,
28322 value: *mut COREWEBVIEW2_PRINT_COLLATION,
28323 ) -> windows_core::HRESULT {
28324 unsafe {
28325 let this: &Identity =
28326 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28327 ICoreWebView2PrintSettings2_Impl::Collation(this, core::mem::transmute_copy(&value))
28328 .into()
28329 }
28330 }
28331 unsafe extern "system" fn SetCollation<
28332 Identity: ICoreWebView2PrintSettings2_Impl,
28333 const OFFSET: isize,
28334 >(
28335 this: *mut core::ffi::c_void,
28336 value: COREWEBVIEW2_PRINT_COLLATION,
28337 ) -> windows_core::HRESULT {
28338 unsafe {
28339 let this: &Identity =
28340 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28341 ICoreWebView2PrintSettings2_Impl::SetCollation(
28342 this,
28343 core::mem::transmute_copy(&value),
28344 )
28345 .into()
28346 }
28347 }
28348 unsafe extern "system" fn ColorMode<
28349 Identity: ICoreWebView2PrintSettings2_Impl,
28350 const OFFSET: isize,
28351 >(
28352 this: *mut core::ffi::c_void,
28353 value: *mut COREWEBVIEW2_PRINT_COLOR_MODE,
28354 ) -> windows_core::HRESULT {
28355 unsafe {
28356 let this: &Identity =
28357 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28358 ICoreWebView2PrintSettings2_Impl::ColorMode(this, core::mem::transmute_copy(&value))
28359 .into()
28360 }
28361 }
28362 unsafe extern "system" fn SetColorMode<
28363 Identity: ICoreWebView2PrintSettings2_Impl,
28364 const OFFSET: isize,
28365 >(
28366 this: *mut core::ffi::c_void,
28367 value: COREWEBVIEW2_PRINT_COLOR_MODE,
28368 ) -> windows_core::HRESULT {
28369 unsafe {
28370 let this: &Identity =
28371 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28372 ICoreWebView2PrintSettings2_Impl::SetColorMode(
28373 this,
28374 core::mem::transmute_copy(&value),
28375 )
28376 .into()
28377 }
28378 }
28379 unsafe extern "system" fn Duplex<
28380 Identity: ICoreWebView2PrintSettings2_Impl,
28381 const OFFSET: isize,
28382 >(
28383 this: *mut core::ffi::c_void,
28384 value: *mut COREWEBVIEW2_PRINT_DUPLEX,
28385 ) -> windows_core::HRESULT {
28386 unsafe {
28387 let this: &Identity =
28388 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28389 ICoreWebView2PrintSettings2_Impl::Duplex(this, core::mem::transmute_copy(&value))
28390 .into()
28391 }
28392 }
28393 unsafe extern "system" fn SetDuplex<
28394 Identity: ICoreWebView2PrintSettings2_Impl,
28395 const OFFSET: isize,
28396 >(
28397 this: *mut core::ffi::c_void,
28398 value: COREWEBVIEW2_PRINT_DUPLEX,
28399 ) -> windows_core::HRESULT {
28400 unsafe {
28401 let this: &Identity =
28402 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28403 ICoreWebView2PrintSettings2_Impl::SetDuplex(this, core::mem::transmute_copy(&value))
28404 .into()
28405 }
28406 }
28407 unsafe extern "system" fn MediaSize<
28408 Identity: ICoreWebView2PrintSettings2_Impl,
28409 const OFFSET: isize,
28410 >(
28411 this: *mut core::ffi::c_void,
28412 value: *mut COREWEBVIEW2_PRINT_MEDIA_SIZE,
28413 ) -> windows_core::HRESULT {
28414 unsafe {
28415 let this: &Identity =
28416 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28417 ICoreWebView2PrintSettings2_Impl::MediaSize(this, core::mem::transmute_copy(&value))
28418 .into()
28419 }
28420 }
28421 unsafe extern "system" fn SetMediaSize<
28422 Identity: ICoreWebView2PrintSettings2_Impl,
28423 const OFFSET: isize,
28424 >(
28425 this: *mut core::ffi::c_void,
28426 value: COREWEBVIEW2_PRINT_MEDIA_SIZE,
28427 ) -> windows_core::HRESULT {
28428 unsafe {
28429 let this: &Identity =
28430 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28431 ICoreWebView2PrintSettings2_Impl::SetMediaSize(
28432 this,
28433 core::mem::transmute_copy(&value),
28434 )
28435 .into()
28436 }
28437 }
28438 unsafe extern "system" fn PrinterName<
28439 Identity: ICoreWebView2PrintSettings2_Impl,
28440 const OFFSET: isize,
28441 >(
28442 this: *mut core::ffi::c_void,
28443 value: *mut windows_core::PWSTR,
28444 ) -> windows_core::HRESULT {
28445 unsafe {
28446 let this: &Identity =
28447 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28448 ICoreWebView2PrintSettings2_Impl::PrinterName(
28449 this,
28450 core::mem::transmute_copy(&value),
28451 )
28452 .into()
28453 }
28454 }
28455 unsafe extern "system" fn SetPrinterName<
28456 Identity: ICoreWebView2PrintSettings2_Impl,
28457 const OFFSET: isize,
28458 >(
28459 this: *mut core::ffi::c_void,
28460 value: windows_core::PCWSTR,
28461 ) -> windows_core::HRESULT {
28462 unsafe {
28463 let this: &Identity =
28464 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28465 ICoreWebView2PrintSettings2_Impl::SetPrinterName(this, core::mem::transmute(&value))
28466 .into()
28467 }
28468 }
28469 Self {
28470 base__: ICoreWebView2PrintSettings_Vtbl::new::<Identity, OFFSET>(),
28471 PageRanges: PageRanges::<Identity, OFFSET>,
28472 SetPageRanges: SetPageRanges::<Identity, OFFSET>,
28473 PagesPerSide: PagesPerSide::<Identity, OFFSET>,
28474 SetPagesPerSide: SetPagesPerSide::<Identity, OFFSET>,
28475 Copies: Copies::<Identity, OFFSET>,
28476 SetCopies: SetCopies::<Identity, OFFSET>,
28477 Collation: Collation::<Identity, OFFSET>,
28478 SetCollation: SetCollation::<Identity, OFFSET>,
28479 ColorMode: ColorMode::<Identity, OFFSET>,
28480 SetColorMode: SetColorMode::<Identity, OFFSET>,
28481 Duplex: Duplex::<Identity, OFFSET>,
28482 SetDuplex: SetDuplex::<Identity, OFFSET>,
28483 MediaSize: MediaSize::<Identity, OFFSET>,
28484 SetMediaSize: SetMediaSize::<Identity, OFFSET>,
28485 PrinterName: PrinterName::<Identity, OFFSET>,
28486 SetPrinterName: SetPrinterName::<Identity, OFFSET>,
28487 }
28488 }
28489 pub fn matches(iid: &windows_core::GUID) -> bool {
28490 iid == &<ICoreWebView2PrintSettings2 as windows_core::Interface>::IID
28491 || iid == &<ICoreWebView2PrintSettings as windows_core::Interface>::IID
28492 }
28493}
28494impl windows_core::RuntimeName for ICoreWebView2PrintSettings2 {}
28495windows_core::imp::define_interface!(
28496 ICoreWebView2PrintToPdfCompletedHandler,
28497 ICoreWebView2PrintToPdfCompletedHandler_Vtbl,
28498 0xccf1ef04_fd8e_4d5f_b2de_0983e41b8c36
28499);
28500windows_core::imp::interface_hierarchy!(
28501 ICoreWebView2PrintToPdfCompletedHandler,
28502 windows_core::IUnknown
28503);
28504impl ICoreWebView2PrintToPdfCompletedHandler {
28505 pub unsafe fn Invoke(
28506 &self,
28507 errorcode: windows_core::HRESULT,
28508 result: bool,
28509 ) -> windows_core::Result<()> {
28510 unsafe {
28511 (windows_core::Interface::vtable(self).Invoke)(
28512 windows_core::Interface::as_raw(self),
28513 errorcode,
28514 result.into(),
28515 )
28516 .ok()
28517 }
28518 }
28519}
28520#[repr(C)]
28521pub struct ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
28522 pub base__: windows_core::IUnknown_Vtbl,
28523 pub Invoke: unsafe extern "system" fn(
28524 *mut core::ffi::c_void,
28525 windows_core::HRESULT,
28526 windows_core::BOOL,
28527 ) -> windows_core::HRESULT,
28528}
28529pub trait ICoreWebView2PrintToPdfCompletedHandler_Impl: windows_core::IUnknownImpl {
28530 fn Invoke(
28531 &self,
28532 errorcode: windows_core::HRESULT,
28533 result: windows_core::BOOL,
28534 ) -> windows_core::Result<()>;
28535}
28536impl ICoreWebView2PrintToPdfCompletedHandler_Vtbl {
28537 pub const fn new<
28538 Identity: ICoreWebView2PrintToPdfCompletedHandler_Impl,
28539 const OFFSET: isize,
28540 >() -> Self {
28541 unsafe extern "system" fn Invoke<
28542 Identity: ICoreWebView2PrintToPdfCompletedHandler_Impl,
28543 const OFFSET: isize,
28544 >(
28545 this: *mut core::ffi::c_void,
28546 errorcode: windows_core::HRESULT,
28547 result: windows_core::BOOL,
28548 ) -> windows_core::HRESULT {
28549 unsafe {
28550 let this: &Identity =
28551 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28552 ICoreWebView2PrintToPdfCompletedHandler_Impl::Invoke(
28553 this,
28554 core::mem::transmute_copy(&errorcode),
28555 core::mem::transmute_copy(&result),
28556 )
28557 .into()
28558 }
28559 }
28560 Self {
28561 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
28562 Invoke: Invoke::<Identity, OFFSET>,
28563 }
28564 }
28565 pub fn matches(iid: &windows_core::GUID) -> bool {
28566 iid == &<ICoreWebView2PrintToPdfCompletedHandler as windows_core::Interface>::IID
28567 }
28568}
28569impl windows_core::RuntimeName for ICoreWebView2PrintToPdfCompletedHandler {}
28570windows_core::imp::define_interface!(
28571 ICoreWebView2PrintToPdfStreamCompletedHandler,
28572 ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl,
28573 0x4c9f8229_8f93_444f_a711_2c0dfd6359d5
28574);
28575windows_core::imp::interface_hierarchy!(
28576 ICoreWebView2PrintToPdfStreamCompletedHandler,
28577 windows_core::IUnknown
28578);
28579impl ICoreWebView2PrintToPdfStreamCompletedHandler {
28580 pub unsafe fn Invoke<P1>(
28581 &self,
28582 errorcode: windows_core::HRESULT,
28583 result: P1,
28584 ) -> windows_core::Result<()>
28585 where
28586 P1: windows_core::Param<windows::Win32::System::Com::IStream>,
28587 {
28588 unsafe {
28589 (windows_core::Interface::vtable(self).Invoke)(
28590 windows_core::Interface::as_raw(self),
28591 errorcode,
28592 result.param().abi(),
28593 )
28594 .ok()
28595 }
28596 }
28597}
28598#[repr(C)]
28599pub struct ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
28600 pub base__: windows_core::IUnknown_Vtbl,
28601 pub Invoke: unsafe extern "system" fn(
28602 *mut core::ffi::c_void,
28603 windows_core::HRESULT,
28604 *mut core::ffi::c_void,
28605 ) -> windows_core::HRESULT,
28606}
28607pub trait ICoreWebView2PrintToPdfStreamCompletedHandler_Impl: windows_core::IUnknownImpl {
28608 fn Invoke(
28609 &self,
28610 errorcode: windows_core::HRESULT,
28611 result: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
28612 ) -> windows_core::Result<()>;
28613}
28614impl ICoreWebView2PrintToPdfStreamCompletedHandler_Vtbl {
28615 pub const fn new<
28616 Identity: ICoreWebView2PrintToPdfStreamCompletedHandler_Impl,
28617 const OFFSET: isize,
28618 >() -> Self {
28619 unsafe extern "system" fn Invoke<
28620 Identity: ICoreWebView2PrintToPdfStreamCompletedHandler_Impl,
28621 const OFFSET: isize,
28622 >(
28623 this: *mut core::ffi::c_void,
28624 errorcode: windows_core::HRESULT,
28625 result: *mut core::ffi::c_void,
28626 ) -> windows_core::HRESULT {
28627 unsafe {
28628 let this: &Identity =
28629 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28630 ICoreWebView2PrintToPdfStreamCompletedHandler_Impl::Invoke(
28631 this,
28632 core::mem::transmute_copy(&errorcode),
28633 core::mem::transmute_copy(&result),
28634 )
28635 .into()
28636 }
28637 }
28638 Self {
28639 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
28640 Invoke: Invoke::<Identity, OFFSET>,
28641 }
28642 }
28643 pub fn matches(iid: &windows_core::GUID) -> bool {
28644 iid == &<ICoreWebView2PrintToPdfStreamCompletedHandler as windows_core::Interface>::IID
28645 }
28646}
28647impl windows_core::RuntimeName for ICoreWebView2PrintToPdfStreamCompletedHandler {}
28648windows_core::imp::define_interface!(
28649 ICoreWebView2ProcessExtendedInfo,
28650 ICoreWebView2ProcessExtendedInfo_Vtbl,
28651 0xaf4c4c2e_45db_11ee_be56_0242ac120002
28652);
28653windows_core::imp::interface_hierarchy!(ICoreWebView2ProcessExtendedInfo, windows_core::IUnknown);
28654impl ICoreWebView2ProcessExtendedInfo {
28655 pub unsafe fn ProcessInfo(&self) -> windows_core::Result<ICoreWebView2ProcessInfo> {
28656 unsafe {
28657 let mut result__ = core::mem::zeroed();
28658 (windows_core::Interface::vtable(self).ProcessInfo)(
28659 windows_core::Interface::as_raw(self),
28660 &mut result__,
28661 )
28662 .and_then(|| windows_core::Type::from_abi(result__))
28663 }
28664 }
28665 pub unsafe fn AssociatedFrameInfos(
28666 &self,
28667 ) -> windows_core::Result<ICoreWebView2FrameInfoCollection> {
28668 unsafe {
28669 let mut result__ = core::mem::zeroed();
28670 (windows_core::Interface::vtable(self).AssociatedFrameInfos)(
28671 windows_core::Interface::as_raw(self),
28672 &mut result__,
28673 )
28674 .and_then(|| windows_core::Type::from_abi(result__))
28675 }
28676 }
28677}
28678#[repr(C)]
28679pub struct ICoreWebView2ProcessExtendedInfo_Vtbl {
28680 pub base__: windows_core::IUnknown_Vtbl,
28681 pub ProcessInfo: unsafe extern "system" fn(
28682 *mut core::ffi::c_void,
28683 *mut *mut core::ffi::c_void,
28684 ) -> windows_core::HRESULT,
28685 pub AssociatedFrameInfos: unsafe extern "system" fn(
28686 *mut core::ffi::c_void,
28687 *mut *mut core::ffi::c_void,
28688 ) -> windows_core::HRESULT,
28689}
28690pub trait ICoreWebView2ProcessExtendedInfo_Impl: windows_core::IUnknownImpl {
28691 fn ProcessInfo(&self) -> windows_core::Result<ICoreWebView2ProcessInfo>;
28692 fn AssociatedFrameInfos(&self) -> windows_core::Result<ICoreWebView2FrameInfoCollection>;
28693}
28694impl ICoreWebView2ProcessExtendedInfo_Vtbl {
28695 pub const fn new<Identity: ICoreWebView2ProcessExtendedInfo_Impl, const OFFSET: isize>() -> Self
28696 {
28697 unsafe extern "system" fn ProcessInfo<
28698 Identity: ICoreWebView2ProcessExtendedInfo_Impl,
28699 const OFFSET: isize,
28700 >(
28701 this: *mut core::ffi::c_void,
28702 processinfo: *mut *mut core::ffi::c_void,
28703 ) -> windows_core::HRESULT {
28704 unsafe {
28705 let this: &Identity =
28706 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28707 match ICoreWebView2ProcessExtendedInfo_Impl::ProcessInfo(this) {
28708 Ok(ok__) => {
28709 processinfo.write(core::mem::transmute(ok__));
28710 windows_core::HRESULT(0)
28711 }
28712 Err(err) => err.into(),
28713 }
28714 }
28715 }
28716 unsafe extern "system" fn AssociatedFrameInfos<
28717 Identity: ICoreWebView2ProcessExtendedInfo_Impl,
28718 const OFFSET: isize,
28719 >(
28720 this: *mut core::ffi::c_void,
28721 frames: *mut *mut core::ffi::c_void,
28722 ) -> windows_core::HRESULT {
28723 unsafe {
28724 let this: &Identity =
28725 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28726 match ICoreWebView2ProcessExtendedInfo_Impl::AssociatedFrameInfos(this) {
28727 Ok(ok__) => {
28728 frames.write(core::mem::transmute(ok__));
28729 windows_core::HRESULT(0)
28730 }
28731 Err(err) => err.into(),
28732 }
28733 }
28734 }
28735 Self {
28736 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
28737 ProcessInfo: ProcessInfo::<Identity, OFFSET>,
28738 AssociatedFrameInfos: AssociatedFrameInfos::<Identity, OFFSET>,
28739 }
28740 }
28741 pub fn matches(iid: &windows_core::GUID) -> bool {
28742 iid == &<ICoreWebView2ProcessExtendedInfo as windows_core::Interface>::IID
28743 }
28744}
28745impl windows_core::RuntimeName for ICoreWebView2ProcessExtendedInfo {}
28746windows_core::imp::define_interface!(
28747 ICoreWebView2ProcessExtendedInfoCollection,
28748 ICoreWebView2ProcessExtendedInfoCollection_Vtbl,
28749 0x32efa696_407a_11ee_be56_0242ac120002
28750);
28751windows_core::imp::interface_hierarchy!(
28752 ICoreWebView2ProcessExtendedInfoCollection,
28753 windows_core::IUnknown
28754);
28755impl ICoreWebView2ProcessExtendedInfoCollection {
28756 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
28757 unsafe {
28758 (windows_core::Interface::vtable(self).Count)(
28759 windows_core::Interface::as_raw(self),
28760 value as _,
28761 )
28762 .ok()
28763 }
28764 }
28765 pub unsafe fn GetValueAtIndex(
28766 &self,
28767 index: u32,
28768 ) -> windows_core::Result<ICoreWebView2ProcessExtendedInfo> {
28769 unsafe {
28770 let mut result__ = core::mem::zeroed();
28771 (windows_core::Interface::vtable(self).GetValueAtIndex)(
28772 windows_core::Interface::as_raw(self),
28773 index,
28774 &mut result__,
28775 )
28776 .and_then(|| windows_core::Type::from_abi(result__))
28777 }
28778 }
28779}
28780#[repr(C)]
28781pub struct ICoreWebView2ProcessExtendedInfoCollection_Vtbl {
28782 pub base__: windows_core::IUnknown_Vtbl,
28783 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
28784 pub GetValueAtIndex: unsafe extern "system" fn(
28785 *mut core::ffi::c_void,
28786 u32,
28787 *mut *mut core::ffi::c_void,
28788 ) -> windows_core::HRESULT,
28789}
28790pub trait ICoreWebView2ProcessExtendedInfoCollection_Impl: windows_core::IUnknownImpl {
28791 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
28792 fn GetValueAtIndex(&self, index: u32)
28793 -> windows_core::Result<ICoreWebView2ProcessExtendedInfo>;
28794}
28795impl ICoreWebView2ProcessExtendedInfoCollection_Vtbl {
28796 pub const fn new<
28797 Identity: ICoreWebView2ProcessExtendedInfoCollection_Impl,
28798 const OFFSET: isize,
28799 >() -> Self {
28800 unsafe extern "system" fn Count<
28801 Identity: ICoreWebView2ProcessExtendedInfoCollection_Impl,
28802 const OFFSET: isize,
28803 >(
28804 this: *mut core::ffi::c_void,
28805 value: *mut u32,
28806 ) -> windows_core::HRESULT {
28807 unsafe {
28808 let this: &Identity =
28809 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28810 ICoreWebView2ProcessExtendedInfoCollection_Impl::Count(
28811 this,
28812 core::mem::transmute_copy(&value),
28813 )
28814 .into()
28815 }
28816 }
28817 unsafe extern "system" fn GetValueAtIndex<
28818 Identity: ICoreWebView2ProcessExtendedInfoCollection_Impl,
28819 const OFFSET: isize,
28820 >(
28821 this: *mut core::ffi::c_void,
28822 index: u32,
28823 value: *mut *mut core::ffi::c_void,
28824 ) -> windows_core::HRESULT {
28825 unsafe {
28826 let this: &Identity =
28827 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28828 match ICoreWebView2ProcessExtendedInfoCollection_Impl::GetValueAtIndex(
28829 this,
28830 core::mem::transmute_copy(&index),
28831 ) {
28832 Ok(ok__) => {
28833 value.write(core::mem::transmute(ok__));
28834 windows_core::HRESULT(0)
28835 }
28836 Err(err) => err.into(),
28837 }
28838 }
28839 }
28840 Self {
28841 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
28842 Count: Count::<Identity, OFFSET>,
28843 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
28844 }
28845 }
28846 pub fn matches(iid: &windows_core::GUID) -> bool {
28847 iid == &<ICoreWebView2ProcessExtendedInfoCollection as windows_core::Interface>::IID
28848 }
28849}
28850impl windows_core::RuntimeName for ICoreWebView2ProcessExtendedInfoCollection {}
28851windows_core::imp::define_interface!(
28852 ICoreWebView2ProcessFailedEventArgs,
28853 ICoreWebView2ProcessFailedEventArgs_Vtbl,
28854 0x8155a9a4_1474_4a86_8cae_151b0fa6b8ca
28855);
28856windows_core::imp::interface_hierarchy!(
28857 ICoreWebView2ProcessFailedEventArgs,
28858 windows_core::IUnknown
28859);
28860impl ICoreWebView2ProcessFailedEventArgs {
28861 pub unsafe fn ProcessFailedKind(
28862 &self,
28863 value: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
28864 ) -> windows_core::Result<()> {
28865 unsafe {
28866 (windows_core::Interface::vtable(self).ProcessFailedKind)(
28867 windows_core::Interface::as_raw(self),
28868 value as _,
28869 )
28870 .ok()
28871 }
28872 }
28873}
28874#[repr(C)]
28875pub struct ICoreWebView2ProcessFailedEventArgs_Vtbl {
28876 pub base__: windows_core::IUnknown_Vtbl,
28877 pub ProcessFailedKind: unsafe extern "system" fn(
28878 *mut core::ffi::c_void,
28879 *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
28880 ) -> windows_core::HRESULT,
28881}
28882pub trait ICoreWebView2ProcessFailedEventArgs_Impl: windows_core::IUnknownImpl {
28883 fn ProcessFailedKind(
28884 &self,
28885 value: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
28886 ) -> windows_core::Result<()>;
28887}
28888impl ICoreWebView2ProcessFailedEventArgs_Vtbl {
28889 pub const fn new<Identity: ICoreWebView2ProcessFailedEventArgs_Impl, const OFFSET: isize>(
28890 ) -> Self {
28891 unsafe extern "system" fn ProcessFailedKind<
28892 Identity: ICoreWebView2ProcessFailedEventArgs_Impl,
28893 const OFFSET: isize,
28894 >(
28895 this: *mut core::ffi::c_void,
28896 value: *mut COREWEBVIEW2_PROCESS_FAILED_KIND,
28897 ) -> windows_core::HRESULT {
28898 unsafe {
28899 let this: &Identity =
28900 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
28901 ICoreWebView2ProcessFailedEventArgs_Impl::ProcessFailedKind(
28902 this,
28903 core::mem::transmute_copy(&value),
28904 )
28905 .into()
28906 }
28907 }
28908 Self {
28909 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
28910 ProcessFailedKind: ProcessFailedKind::<Identity, OFFSET>,
28911 }
28912 }
28913 pub fn matches(iid: &windows_core::GUID) -> bool {
28914 iid == &<ICoreWebView2ProcessFailedEventArgs as windows_core::Interface>::IID
28915 }
28916}
28917impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventArgs {}
28918windows_core::imp::define_interface!(
28919 ICoreWebView2ProcessFailedEventArgs2,
28920 ICoreWebView2ProcessFailedEventArgs2_Vtbl,
28921 0x4dab9422_46fa_4c3e_a5d2_41d2071d3680
28922);
28923impl core::ops::Deref for ICoreWebView2ProcessFailedEventArgs2 {
28924 type Target = ICoreWebView2ProcessFailedEventArgs;
28925 fn deref(&self) -> &Self::Target {
28926 unsafe { core::mem::transmute(self) }
28927 }
28928}
28929windows_core::imp::interface_hierarchy!(
28930 ICoreWebView2ProcessFailedEventArgs2,
28931 windows_core::IUnknown,
28932 ICoreWebView2ProcessFailedEventArgs
28933);
28934impl ICoreWebView2ProcessFailedEventArgs2 {
28935 pub unsafe fn Reason(
28936 &self,
28937 reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
28938 ) -> windows_core::Result<()> {
28939 unsafe {
28940 (windows_core::Interface::vtable(self).Reason)(
28941 windows_core::Interface::as_raw(self),
28942 reason as _,
28943 )
28944 .ok()
28945 }
28946 }
28947 pub unsafe fn ExitCode(&self, exitcode: *mut i32) -> windows_core::Result<()> {
28948 unsafe {
28949 (windows_core::Interface::vtable(self).ExitCode)(
28950 windows_core::Interface::as_raw(self),
28951 exitcode as _,
28952 )
28953 .ok()
28954 }
28955 }
28956 pub unsafe fn ProcessDescription(
28957 &self,
28958 processdescription: *mut windows_core::PWSTR,
28959 ) -> windows_core::Result<()> {
28960 unsafe {
28961 (windows_core::Interface::vtable(self).ProcessDescription)(
28962 windows_core::Interface::as_raw(self),
28963 processdescription as _,
28964 )
28965 .ok()
28966 }
28967 }
28968 pub unsafe fn FrameInfosForFailedProcess(
28969 &self,
28970 ) -> windows_core::Result<ICoreWebView2FrameInfoCollection> {
28971 unsafe {
28972 let mut result__ = core::mem::zeroed();
28973 (windows_core::Interface::vtable(self).FrameInfosForFailedProcess)(
28974 windows_core::Interface::as_raw(self),
28975 &mut result__,
28976 )
28977 .and_then(|| windows_core::Type::from_abi(result__))
28978 }
28979 }
28980}
28981#[repr(C)]
28982pub struct ICoreWebView2ProcessFailedEventArgs2_Vtbl {
28983 pub base__: ICoreWebView2ProcessFailedEventArgs_Vtbl,
28984 pub Reason: unsafe extern "system" fn(
28985 *mut core::ffi::c_void,
28986 *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
28987 ) -> windows_core::HRESULT,
28988 pub ExitCode:
28989 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
28990 pub ProcessDescription: unsafe extern "system" fn(
28991 *mut core::ffi::c_void,
28992 *mut windows_core::PWSTR,
28993 ) -> windows_core::HRESULT,
28994 pub FrameInfosForFailedProcess: unsafe extern "system" fn(
28995 *mut core::ffi::c_void,
28996 *mut *mut core::ffi::c_void,
28997 ) -> windows_core::HRESULT,
28998}
28999pub trait ICoreWebView2ProcessFailedEventArgs2_Impl:
29000 ICoreWebView2ProcessFailedEventArgs_Impl
29001{
29002 fn Reason(&self, reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON) -> windows_core::Result<()>;
29003 fn ExitCode(&self, exitcode: *mut i32) -> windows_core::Result<()>;
29004 fn ProcessDescription(
29005 &self,
29006 processdescription: *mut windows_core::PWSTR,
29007 ) -> windows_core::Result<()>;
29008 fn FrameInfosForFailedProcess(&self) -> windows_core::Result<ICoreWebView2FrameInfoCollection>;
29009}
29010impl ICoreWebView2ProcessFailedEventArgs2_Vtbl {
29011 pub const fn new<Identity: ICoreWebView2ProcessFailedEventArgs2_Impl, const OFFSET: isize>(
29012 ) -> Self {
29013 unsafe extern "system" fn Reason<
29014 Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
29015 const OFFSET: isize,
29016 >(
29017 this: *mut core::ffi::c_void,
29018 reason: *mut COREWEBVIEW2_PROCESS_FAILED_REASON,
29019 ) -> windows_core::HRESULT {
29020 unsafe {
29021 let this: &Identity =
29022 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29023 ICoreWebView2ProcessFailedEventArgs2_Impl::Reason(
29024 this,
29025 core::mem::transmute_copy(&reason),
29026 )
29027 .into()
29028 }
29029 }
29030 unsafe extern "system" fn ExitCode<
29031 Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
29032 const OFFSET: isize,
29033 >(
29034 this: *mut core::ffi::c_void,
29035 exitcode: *mut i32,
29036 ) -> windows_core::HRESULT {
29037 unsafe {
29038 let this: &Identity =
29039 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29040 ICoreWebView2ProcessFailedEventArgs2_Impl::ExitCode(
29041 this,
29042 core::mem::transmute_copy(&exitcode),
29043 )
29044 .into()
29045 }
29046 }
29047 unsafe extern "system" fn ProcessDescription<
29048 Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
29049 const OFFSET: isize,
29050 >(
29051 this: *mut core::ffi::c_void,
29052 processdescription: *mut windows_core::PWSTR,
29053 ) -> windows_core::HRESULT {
29054 unsafe {
29055 let this: &Identity =
29056 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29057 ICoreWebView2ProcessFailedEventArgs2_Impl::ProcessDescription(
29058 this,
29059 core::mem::transmute_copy(&processdescription),
29060 )
29061 .into()
29062 }
29063 }
29064 unsafe extern "system" fn FrameInfosForFailedProcess<
29065 Identity: ICoreWebView2ProcessFailedEventArgs2_Impl,
29066 const OFFSET: isize,
29067 >(
29068 this: *mut core::ffi::c_void,
29069 frames: *mut *mut core::ffi::c_void,
29070 ) -> windows_core::HRESULT {
29071 unsafe {
29072 let this: &Identity =
29073 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29074 match ICoreWebView2ProcessFailedEventArgs2_Impl::FrameInfosForFailedProcess(this) {
29075 Ok(ok__) => {
29076 frames.write(core::mem::transmute(ok__));
29077 windows_core::HRESULT(0)
29078 }
29079 Err(err) => err.into(),
29080 }
29081 }
29082 }
29083 Self {
29084 base__: ICoreWebView2ProcessFailedEventArgs_Vtbl::new::<Identity, OFFSET>(),
29085 Reason: Reason::<Identity, OFFSET>,
29086 ExitCode: ExitCode::<Identity, OFFSET>,
29087 ProcessDescription: ProcessDescription::<Identity, OFFSET>,
29088 FrameInfosForFailedProcess: FrameInfosForFailedProcess::<Identity, OFFSET>,
29089 }
29090 }
29091 pub fn matches(iid: &windows_core::GUID) -> bool {
29092 iid == &<ICoreWebView2ProcessFailedEventArgs2 as windows_core::Interface>::IID
29093 || iid == &<ICoreWebView2ProcessFailedEventArgs as windows_core::Interface>::IID
29094 }
29095}
29096impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventArgs2 {}
29097windows_core::imp::define_interface!(
29098 ICoreWebView2ProcessFailedEventArgs3,
29099 ICoreWebView2ProcessFailedEventArgs3_Vtbl,
29100 0xab667428_094d_5fd1_b480_8b4c0fdbdf2f
29101);
29102impl core::ops::Deref for ICoreWebView2ProcessFailedEventArgs3 {
29103 type Target = ICoreWebView2ProcessFailedEventArgs2;
29104 fn deref(&self) -> &Self::Target {
29105 unsafe { core::mem::transmute(self) }
29106 }
29107}
29108windows_core::imp::interface_hierarchy!(
29109 ICoreWebView2ProcessFailedEventArgs3,
29110 windows_core::IUnknown,
29111 ICoreWebView2ProcessFailedEventArgs,
29112 ICoreWebView2ProcessFailedEventArgs2
29113);
29114impl ICoreWebView2ProcessFailedEventArgs3 {
29115 pub unsafe fn FailureSourceModulePath(
29116 &self,
29117 value: *mut windows_core::PWSTR,
29118 ) -> windows_core::Result<()> {
29119 unsafe {
29120 (windows_core::Interface::vtable(self).FailureSourceModulePath)(
29121 windows_core::Interface::as_raw(self),
29122 value as _,
29123 )
29124 .ok()
29125 }
29126 }
29127}
29128#[repr(C)]
29129pub struct ICoreWebView2ProcessFailedEventArgs3_Vtbl {
29130 pub base__: ICoreWebView2ProcessFailedEventArgs2_Vtbl,
29131 pub FailureSourceModulePath: unsafe extern "system" fn(
29132 *mut core::ffi::c_void,
29133 *mut windows_core::PWSTR,
29134 ) -> windows_core::HRESULT,
29135}
29136pub trait ICoreWebView2ProcessFailedEventArgs3_Impl:
29137 ICoreWebView2ProcessFailedEventArgs2_Impl
29138{
29139 fn FailureSourceModulePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
29140}
29141impl ICoreWebView2ProcessFailedEventArgs3_Vtbl {
29142 pub const fn new<Identity: ICoreWebView2ProcessFailedEventArgs3_Impl, const OFFSET: isize>(
29143 ) -> Self {
29144 unsafe extern "system" fn FailureSourceModulePath<
29145 Identity: ICoreWebView2ProcessFailedEventArgs3_Impl,
29146 const OFFSET: isize,
29147 >(
29148 this: *mut core::ffi::c_void,
29149 value: *mut windows_core::PWSTR,
29150 ) -> windows_core::HRESULT {
29151 unsafe {
29152 let this: &Identity =
29153 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29154 ICoreWebView2ProcessFailedEventArgs3_Impl::FailureSourceModulePath(
29155 this,
29156 core::mem::transmute_copy(&value),
29157 )
29158 .into()
29159 }
29160 }
29161 Self {
29162 base__: ICoreWebView2ProcessFailedEventArgs2_Vtbl::new::<Identity, OFFSET>(),
29163 FailureSourceModulePath: FailureSourceModulePath::<Identity, OFFSET>,
29164 }
29165 }
29166 pub fn matches(iid: &windows_core::GUID) -> bool {
29167 iid == &<ICoreWebView2ProcessFailedEventArgs3 as windows_core::Interface>::IID
29168 || iid == &<ICoreWebView2ProcessFailedEventArgs as windows_core::Interface>::IID
29169 || iid == &<ICoreWebView2ProcessFailedEventArgs2 as windows_core::Interface>::IID
29170 }
29171}
29172impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventArgs3 {}
29173windows_core::imp::define_interface!(
29174 ICoreWebView2ProcessFailedEventHandler,
29175 ICoreWebView2ProcessFailedEventHandler_Vtbl,
29176 0x79e0aea4_990b_42d9_aa1d_0fcc2e5bc7f1
29177);
29178windows_core::imp::interface_hierarchy!(
29179 ICoreWebView2ProcessFailedEventHandler,
29180 windows_core::IUnknown
29181);
29182impl ICoreWebView2ProcessFailedEventHandler {
29183 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
29184 where
29185 P0: windows_core::Param<ICoreWebView2>,
29186 P1: windows_core::Param<ICoreWebView2ProcessFailedEventArgs>,
29187 {
29188 unsafe {
29189 (windows_core::Interface::vtable(self).Invoke)(
29190 windows_core::Interface::as_raw(self),
29191 sender.param().abi(),
29192 args.param().abi(),
29193 )
29194 .ok()
29195 }
29196 }
29197}
29198#[repr(C)]
29199pub struct ICoreWebView2ProcessFailedEventHandler_Vtbl {
29200 pub base__: windows_core::IUnknown_Vtbl,
29201 pub Invoke: unsafe extern "system" fn(
29202 *mut core::ffi::c_void,
29203 *mut core::ffi::c_void,
29204 *mut core::ffi::c_void,
29205 ) -> windows_core::HRESULT,
29206}
29207pub trait ICoreWebView2ProcessFailedEventHandler_Impl: windows_core::IUnknownImpl {
29208 fn Invoke(
29209 &self,
29210 sender: windows_core::Ref<'_, ICoreWebView2>,
29211 args: windows_core::Ref<'_, ICoreWebView2ProcessFailedEventArgs>,
29212 ) -> windows_core::Result<()>;
29213}
29214impl ICoreWebView2ProcessFailedEventHandler_Vtbl {
29215 pub const fn new<Identity: ICoreWebView2ProcessFailedEventHandler_Impl, const OFFSET: isize>(
29216 ) -> Self {
29217 unsafe extern "system" fn Invoke<
29218 Identity: ICoreWebView2ProcessFailedEventHandler_Impl,
29219 const OFFSET: isize,
29220 >(
29221 this: *mut core::ffi::c_void,
29222 sender: *mut core::ffi::c_void,
29223 args: *mut core::ffi::c_void,
29224 ) -> windows_core::HRESULT {
29225 unsafe {
29226 let this: &Identity =
29227 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29228 ICoreWebView2ProcessFailedEventHandler_Impl::Invoke(
29229 this,
29230 core::mem::transmute_copy(&sender),
29231 core::mem::transmute_copy(&args),
29232 )
29233 .into()
29234 }
29235 }
29236 Self {
29237 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
29238 Invoke: Invoke::<Identity, OFFSET>,
29239 }
29240 }
29241 pub fn matches(iid: &windows_core::GUID) -> bool {
29242 iid == &<ICoreWebView2ProcessFailedEventHandler as windows_core::Interface>::IID
29243 }
29244}
29245impl windows_core::RuntimeName for ICoreWebView2ProcessFailedEventHandler {}
29246windows_core::imp::define_interface!(
29247 ICoreWebView2ProcessInfo,
29248 ICoreWebView2ProcessInfo_Vtbl,
29249 0x84fa7612_3f3d_4fbf_889d_fad000492d72
29250);
29251windows_core::imp::interface_hierarchy!(ICoreWebView2ProcessInfo, windows_core::IUnknown);
29252impl ICoreWebView2ProcessInfo {
29253 pub unsafe fn ProcessId(&self, value: *mut i32) -> windows_core::Result<()> {
29254 unsafe {
29255 (windows_core::Interface::vtable(self).ProcessId)(
29256 windows_core::Interface::as_raw(self),
29257 value as _,
29258 )
29259 .ok()
29260 }
29261 }
29262 pub unsafe fn Kind(&self, kind: *mut COREWEBVIEW2_PROCESS_KIND) -> windows_core::Result<()> {
29263 unsafe {
29264 (windows_core::Interface::vtable(self).Kind)(
29265 windows_core::Interface::as_raw(self),
29266 kind as _,
29267 )
29268 .ok()
29269 }
29270 }
29271}
29272#[repr(C)]
29273pub struct ICoreWebView2ProcessInfo_Vtbl {
29274 pub base__: windows_core::IUnknown_Vtbl,
29275 pub ProcessId:
29276 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
29277 pub Kind: unsafe extern "system" fn(
29278 *mut core::ffi::c_void,
29279 *mut COREWEBVIEW2_PROCESS_KIND,
29280 ) -> windows_core::HRESULT,
29281}
29282pub trait ICoreWebView2ProcessInfo_Impl: windows_core::IUnknownImpl {
29283 fn ProcessId(&self, value: *mut i32) -> windows_core::Result<()>;
29284 fn Kind(&self, kind: *mut COREWEBVIEW2_PROCESS_KIND) -> windows_core::Result<()>;
29285}
29286impl ICoreWebView2ProcessInfo_Vtbl {
29287 pub const fn new<Identity: ICoreWebView2ProcessInfo_Impl, const OFFSET: isize>() -> Self {
29288 unsafe extern "system" fn ProcessId<
29289 Identity: ICoreWebView2ProcessInfo_Impl,
29290 const OFFSET: isize,
29291 >(
29292 this: *mut core::ffi::c_void,
29293 value: *mut i32,
29294 ) -> windows_core::HRESULT {
29295 unsafe {
29296 let this: &Identity =
29297 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29298 ICoreWebView2ProcessInfo_Impl::ProcessId(this, core::mem::transmute_copy(&value))
29299 .into()
29300 }
29301 }
29302 unsafe extern "system" fn Kind<
29303 Identity: ICoreWebView2ProcessInfo_Impl,
29304 const OFFSET: isize,
29305 >(
29306 this: *mut core::ffi::c_void,
29307 kind: *mut COREWEBVIEW2_PROCESS_KIND,
29308 ) -> windows_core::HRESULT {
29309 unsafe {
29310 let this: &Identity =
29311 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29312 ICoreWebView2ProcessInfo_Impl::Kind(this, core::mem::transmute_copy(&kind)).into()
29313 }
29314 }
29315 Self {
29316 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
29317 ProcessId: ProcessId::<Identity, OFFSET>,
29318 Kind: Kind::<Identity, OFFSET>,
29319 }
29320 }
29321 pub fn matches(iid: &windows_core::GUID) -> bool {
29322 iid == &<ICoreWebView2ProcessInfo as windows_core::Interface>::IID
29323 }
29324}
29325impl windows_core::RuntimeName for ICoreWebView2ProcessInfo {}
29326windows_core::imp::define_interface!(
29327 ICoreWebView2ProcessInfoCollection,
29328 ICoreWebView2ProcessInfoCollection_Vtbl,
29329 0x402b99cd_a0cc_4fa5_b7a5_51d86a1d2339
29330);
29331windows_core::imp::interface_hierarchy!(ICoreWebView2ProcessInfoCollection, windows_core::IUnknown);
29332impl ICoreWebView2ProcessInfoCollection {
29333 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
29334 unsafe {
29335 (windows_core::Interface::vtable(self).Count)(
29336 windows_core::Interface::as_raw(self),
29337 value as _,
29338 )
29339 .ok()
29340 }
29341 }
29342 pub unsafe fn GetValueAtIndex(
29343 &self,
29344 index: u32,
29345 ) -> windows_core::Result<ICoreWebView2ProcessInfo> {
29346 unsafe {
29347 let mut result__ = core::mem::zeroed();
29348 (windows_core::Interface::vtable(self).GetValueAtIndex)(
29349 windows_core::Interface::as_raw(self),
29350 index,
29351 &mut result__,
29352 )
29353 .and_then(|| windows_core::Type::from_abi(result__))
29354 }
29355 }
29356}
29357#[repr(C)]
29358pub struct ICoreWebView2ProcessInfoCollection_Vtbl {
29359 pub base__: windows_core::IUnknown_Vtbl,
29360 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
29361 pub GetValueAtIndex: unsafe extern "system" fn(
29362 *mut core::ffi::c_void,
29363 u32,
29364 *mut *mut core::ffi::c_void,
29365 ) -> windows_core::HRESULT,
29366}
29367pub trait ICoreWebView2ProcessInfoCollection_Impl: windows_core::IUnknownImpl {
29368 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
29369 fn GetValueAtIndex(&self, index: u32) -> windows_core::Result<ICoreWebView2ProcessInfo>;
29370}
29371impl ICoreWebView2ProcessInfoCollection_Vtbl {
29372 pub const fn new<Identity: ICoreWebView2ProcessInfoCollection_Impl, const OFFSET: isize>(
29373 ) -> Self {
29374 unsafe extern "system" fn Count<
29375 Identity: ICoreWebView2ProcessInfoCollection_Impl,
29376 const OFFSET: isize,
29377 >(
29378 this: *mut core::ffi::c_void,
29379 value: *mut u32,
29380 ) -> windows_core::HRESULT {
29381 unsafe {
29382 let this: &Identity =
29383 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29384 ICoreWebView2ProcessInfoCollection_Impl::Count(
29385 this,
29386 core::mem::transmute_copy(&value),
29387 )
29388 .into()
29389 }
29390 }
29391 unsafe extern "system" fn GetValueAtIndex<
29392 Identity: ICoreWebView2ProcessInfoCollection_Impl,
29393 const OFFSET: isize,
29394 >(
29395 this: *mut core::ffi::c_void,
29396 index: u32,
29397 value: *mut *mut core::ffi::c_void,
29398 ) -> windows_core::HRESULT {
29399 unsafe {
29400 let this: &Identity =
29401 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29402 match ICoreWebView2ProcessInfoCollection_Impl::GetValueAtIndex(
29403 this,
29404 core::mem::transmute_copy(&index),
29405 ) {
29406 Ok(ok__) => {
29407 value.write(core::mem::transmute(ok__));
29408 windows_core::HRESULT(0)
29409 }
29410 Err(err) => err.into(),
29411 }
29412 }
29413 }
29414 Self {
29415 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
29416 Count: Count::<Identity, OFFSET>,
29417 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
29418 }
29419 }
29420 pub fn matches(iid: &windows_core::GUID) -> bool {
29421 iid == &<ICoreWebView2ProcessInfoCollection as windows_core::Interface>::IID
29422 }
29423}
29424impl windows_core::RuntimeName for ICoreWebView2ProcessInfoCollection {}
29425windows_core::imp::define_interface!(
29426 ICoreWebView2ProcessInfosChangedEventHandler,
29427 ICoreWebView2ProcessInfosChangedEventHandler_Vtbl,
29428 0xf4af0c39_44b9_40e9_8b11_0484cfb9e0a1
29429);
29430windows_core::imp::interface_hierarchy!(
29431 ICoreWebView2ProcessInfosChangedEventHandler,
29432 windows_core::IUnknown
29433);
29434impl ICoreWebView2ProcessInfosChangedEventHandler {
29435 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
29436 where
29437 P0: windows_core::Param<ICoreWebView2Environment>,
29438 P1: windows_core::Param<windows_core::IUnknown>,
29439 {
29440 unsafe {
29441 (windows_core::Interface::vtable(self).Invoke)(
29442 windows_core::Interface::as_raw(self),
29443 sender.param().abi(),
29444 args.param().abi(),
29445 )
29446 .ok()
29447 }
29448 }
29449}
29450#[repr(C)]
29451pub struct ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
29452 pub base__: windows_core::IUnknown_Vtbl,
29453 pub Invoke: unsafe extern "system" fn(
29454 *mut core::ffi::c_void,
29455 *mut core::ffi::c_void,
29456 *mut core::ffi::c_void,
29457 ) -> windows_core::HRESULT,
29458}
29459pub trait ICoreWebView2ProcessInfosChangedEventHandler_Impl: windows_core::IUnknownImpl {
29460 fn Invoke(
29461 &self,
29462 sender: windows_core::Ref<'_, ICoreWebView2Environment>,
29463 args: windows_core::Ref<'_, windows_core::IUnknown>,
29464 ) -> windows_core::Result<()>;
29465}
29466impl ICoreWebView2ProcessInfosChangedEventHandler_Vtbl {
29467 pub const fn new<
29468 Identity: ICoreWebView2ProcessInfosChangedEventHandler_Impl,
29469 const OFFSET: isize,
29470 >() -> Self {
29471 unsafe extern "system" fn Invoke<
29472 Identity: ICoreWebView2ProcessInfosChangedEventHandler_Impl,
29473 const OFFSET: isize,
29474 >(
29475 this: *mut core::ffi::c_void,
29476 sender: *mut core::ffi::c_void,
29477 args: *mut core::ffi::c_void,
29478 ) -> windows_core::HRESULT {
29479 unsafe {
29480 let this: &Identity =
29481 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29482 ICoreWebView2ProcessInfosChangedEventHandler_Impl::Invoke(
29483 this,
29484 core::mem::transmute_copy(&sender),
29485 core::mem::transmute_copy(&args),
29486 )
29487 .into()
29488 }
29489 }
29490 Self {
29491 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
29492 Invoke: Invoke::<Identity, OFFSET>,
29493 }
29494 }
29495 pub fn matches(iid: &windows_core::GUID) -> bool {
29496 iid == &<ICoreWebView2ProcessInfosChangedEventHandler as windows_core::Interface>::IID
29497 }
29498}
29499impl windows_core::RuntimeName for ICoreWebView2ProcessInfosChangedEventHandler {}
29500windows_core::imp::define_interface!(
29501 ICoreWebView2Profile,
29502 ICoreWebView2Profile_Vtbl,
29503 0x79110ad3_cd5d_4373_8bc3_c60658f17a5f
29504);
29505windows_core::imp::interface_hierarchy!(ICoreWebView2Profile, windows_core::IUnknown);
29506impl ICoreWebView2Profile {
29507 pub unsafe fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
29508 unsafe {
29509 (windows_core::Interface::vtable(self).ProfileName)(
29510 windows_core::Interface::as_raw(self),
29511 value as _,
29512 )
29513 .ok()
29514 }
29515 }
29516 pub unsafe fn IsInPrivateModeEnabled(
29517 &self,
29518 value: *mut windows_core::BOOL,
29519 ) -> windows_core::Result<()> {
29520 unsafe {
29521 (windows_core::Interface::vtable(self).IsInPrivateModeEnabled)(
29522 windows_core::Interface::as_raw(self),
29523 value as _,
29524 )
29525 .ok()
29526 }
29527 }
29528 pub unsafe fn ProfilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
29529 unsafe {
29530 (windows_core::Interface::vtable(self).ProfilePath)(
29531 windows_core::Interface::as_raw(self),
29532 value as _,
29533 )
29534 .ok()
29535 }
29536 }
29537 pub unsafe fn DefaultDownloadFolderPath(
29538 &self,
29539 value: *mut windows_core::PWSTR,
29540 ) -> windows_core::Result<()> {
29541 unsafe {
29542 (windows_core::Interface::vtable(self).DefaultDownloadFolderPath)(
29543 windows_core::Interface::as_raw(self),
29544 value as _,
29545 )
29546 .ok()
29547 }
29548 }
29549 pub unsafe fn SetDefaultDownloadFolderPath<P0>(&self, value: P0) -> windows_core::Result<()>
29550 where
29551 P0: windows_core::Param<windows_core::PCWSTR>,
29552 {
29553 unsafe {
29554 (windows_core::Interface::vtable(self).SetDefaultDownloadFolderPath)(
29555 windows_core::Interface::as_raw(self),
29556 value.param().abi(),
29557 )
29558 .ok()
29559 }
29560 }
29561 pub unsafe fn PreferredColorScheme(
29562 &self,
29563 value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29564 ) -> windows_core::Result<()> {
29565 unsafe {
29566 (windows_core::Interface::vtable(self).PreferredColorScheme)(
29567 windows_core::Interface::as_raw(self),
29568 value as _,
29569 )
29570 .ok()
29571 }
29572 }
29573 pub unsafe fn SetPreferredColorScheme(
29574 &self,
29575 value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29576 ) -> windows_core::Result<()> {
29577 unsafe {
29578 (windows_core::Interface::vtable(self).SetPreferredColorScheme)(
29579 windows_core::Interface::as_raw(self),
29580 value,
29581 )
29582 .ok()
29583 }
29584 }
29585}
29586#[repr(C)]
29587pub struct ICoreWebView2Profile_Vtbl {
29588 pub base__: windows_core::IUnknown_Vtbl,
29589 pub ProfileName: unsafe extern "system" fn(
29590 *mut core::ffi::c_void,
29591 *mut windows_core::PWSTR,
29592 ) -> windows_core::HRESULT,
29593 pub IsInPrivateModeEnabled: unsafe extern "system" fn(
29594 *mut core::ffi::c_void,
29595 *mut windows_core::BOOL,
29596 ) -> windows_core::HRESULT,
29597 pub ProfilePath: unsafe extern "system" fn(
29598 *mut core::ffi::c_void,
29599 *mut windows_core::PWSTR,
29600 ) -> windows_core::HRESULT,
29601 pub DefaultDownloadFolderPath: unsafe extern "system" fn(
29602 *mut core::ffi::c_void,
29603 *mut windows_core::PWSTR,
29604 ) -> windows_core::HRESULT,
29605 pub SetDefaultDownloadFolderPath: unsafe extern "system" fn(
29606 *mut core::ffi::c_void,
29607 windows_core::PCWSTR,
29608 ) -> windows_core::HRESULT,
29609 pub PreferredColorScheme: unsafe extern "system" fn(
29610 *mut core::ffi::c_void,
29611 *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29612 ) -> windows_core::HRESULT,
29613 pub SetPreferredColorScheme: unsafe extern "system" fn(
29614 *mut core::ffi::c_void,
29615 COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29616 ) -> windows_core::HRESULT,
29617}
29618pub trait ICoreWebView2Profile_Impl: windows_core::IUnknownImpl {
29619 fn ProfileName(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
29620 fn IsInPrivateModeEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
29621 fn ProfilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
29622 fn DefaultDownloadFolderPath(
29623 &self,
29624 value: *mut windows_core::PWSTR,
29625 ) -> windows_core::Result<()>;
29626 fn SetDefaultDownloadFolderPath(
29627 &self,
29628 value: &windows_core::PCWSTR,
29629 ) -> windows_core::Result<()>;
29630 fn PreferredColorScheme(
29631 &self,
29632 value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29633 ) -> windows_core::Result<()>;
29634 fn SetPreferredColorScheme(
29635 &self,
29636 value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29637 ) -> windows_core::Result<()>;
29638}
29639impl ICoreWebView2Profile_Vtbl {
29640 pub const fn new<Identity: ICoreWebView2Profile_Impl, const OFFSET: isize>() -> Self {
29641 unsafe extern "system" fn ProfileName<
29642 Identity: ICoreWebView2Profile_Impl,
29643 const OFFSET: isize,
29644 >(
29645 this: *mut core::ffi::c_void,
29646 value: *mut windows_core::PWSTR,
29647 ) -> windows_core::HRESULT {
29648 unsafe {
29649 let this: &Identity =
29650 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29651 ICoreWebView2Profile_Impl::ProfileName(this, core::mem::transmute_copy(&value))
29652 .into()
29653 }
29654 }
29655 unsafe extern "system" fn IsInPrivateModeEnabled<
29656 Identity: ICoreWebView2Profile_Impl,
29657 const OFFSET: isize,
29658 >(
29659 this: *mut core::ffi::c_void,
29660 value: *mut windows_core::BOOL,
29661 ) -> windows_core::HRESULT {
29662 unsafe {
29663 let this: &Identity =
29664 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29665 ICoreWebView2Profile_Impl::IsInPrivateModeEnabled(
29666 this,
29667 core::mem::transmute_copy(&value),
29668 )
29669 .into()
29670 }
29671 }
29672 unsafe extern "system" fn ProfilePath<
29673 Identity: ICoreWebView2Profile_Impl,
29674 const OFFSET: isize,
29675 >(
29676 this: *mut core::ffi::c_void,
29677 value: *mut windows_core::PWSTR,
29678 ) -> windows_core::HRESULT {
29679 unsafe {
29680 let this: &Identity =
29681 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29682 ICoreWebView2Profile_Impl::ProfilePath(this, core::mem::transmute_copy(&value))
29683 .into()
29684 }
29685 }
29686 unsafe extern "system" fn DefaultDownloadFolderPath<
29687 Identity: ICoreWebView2Profile_Impl,
29688 const OFFSET: isize,
29689 >(
29690 this: *mut core::ffi::c_void,
29691 value: *mut windows_core::PWSTR,
29692 ) -> windows_core::HRESULT {
29693 unsafe {
29694 let this: &Identity =
29695 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29696 ICoreWebView2Profile_Impl::DefaultDownloadFolderPath(
29697 this,
29698 core::mem::transmute_copy(&value),
29699 )
29700 .into()
29701 }
29702 }
29703 unsafe extern "system" fn SetDefaultDownloadFolderPath<
29704 Identity: ICoreWebView2Profile_Impl,
29705 const OFFSET: isize,
29706 >(
29707 this: *mut core::ffi::c_void,
29708 value: windows_core::PCWSTR,
29709 ) -> windows_core::HRESULT {
29710 unsafe {
29711 let this: &Identity =
29712 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29713 ICoreWebView2Profile_Impl::SetDefaultDownloadFolderPath(
29714 this,
29715 core::mem::transmute(&value),
29716 )
29717 .into()
29718 }
29719 }
29720 unsafe extern "system" fn PreferredColorScheme<
29721 Identity: ICoreWebView2Profile_Impl,
29722 const OFFSET: isize,
29723 >(
29724 this: *mut core::ffi::c_void,
29725 value: *mut COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29726 ) -> windows_core::HRESULT {
29727 unsafe {
29728 let this: &Identity =
29729 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29730 ICoreWebView2Profile_Impl::PreferredColorScheme(
29731 this,
29732 core::mem::transmute_copy(&value),
29733 )
29734 .into()
29735 }
29736 }
29737 unsafe extern "system" fn SetPreferredColorScheme<
29738 Identity: ICoreWebView2Profile_Impl,
29739 const OFFSET: isize,
29740 >(
29741 this: *mut core::ffi::c_void,
29742 value: COREWEBVIEW2_PREFERRED_COLOR_SCHEME,
29743 ) -> windows_core::HRESULT {
29744 unsafe {
29745 let this: &Identity =
29746 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29747 ICoreWebView2Profile_Impl::SetPreferredColorScheme(
29748 this,
29749 core::mem::transmute_copy(&value),
29750 )
29751 .into()
29752 }
29753 }
29754 Self {
29755 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
29756 ProfileName: ProfileName::<Identity, OFFSET>,
29757 IsInPrivateModeEnabled: IsInPrivateModeEnabled::<Identity, OFFSET>,
29758 ProfilePath: ProfilePath::<Identity, OFFSET>,
29759 DefaultDownloadFolderPath: DefaultDownloadFolderPath::<Identity, OFFSET>,
29760 SetDefaultDownloadFolderPath: SetDefaultDownloadFolderPath::<Identity, OFFSET>,
29761 PreferredColorScheme: PreferredColorScheme::<Identity, OFFSET>,
29762 SetPreferredColorScheme: SetPreferredColorScheme::<Identity, OFFSET>,
29763 }
29764 }
29765 pub fn matches(iid: &windows_core::GUID) -> bool {
29766 iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
29767 }
29768}
29769impl windows_core::RuntimeName for ICoreWebView2Profile {}
29770windows_core::imp::define_interface!(
29771 ICoreWebView2Profile2,
29772 ICoreWebView2Profile2_Vtbl,
29773 0xfa740d4b_5eae_4344_a8ad_74be31925397
29774);
29775impl core::ops::Deref for ICoreWebView2Profile2 {
29776 type Target = ICoreWebView2Profile;
29777 fn deref(&self) -> &Self::Target {
29778 unsafe { core::mem::transmute(self) }
29779 }
29780}
29781windows_core::imp::interface_hierarchy!(
29782 ICoreWebView2Profile2,
29783 windows_core::IUnknown,
29784 ICoreWebView2Profile
29785);
29786impl ICoreWebView2Profile2 {
29787 pub unsafe fn ClearBrowsingData<P1>(
29788 &self,
29789 datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
29790 handler: P1,
29791 ) -> windows_core::Result<()>
29792 where
29793 P1: windows_core::Param<ICoreWebView2ClearBrowsingDataCompletedHandler>,
29794 {
29795 unsafe {
29796 (windows_core::Interface::vtable(self).ClearBrowsingData)(
29797 windows_core::Interface::as_raw(self),
29798 datakinds,
29799 handler.param().abi(),
29800 )
29801 .ok()
29802 }
29803 }
29804 pub unsafe fn ClearBrowsingDataInTimeRange<P3>(
29805 &self,
29806 datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
29807 starttime: f64,
29808 endtime: f64,
29809 handler: P3,
29810 ) -> windows_core::Result<()>
29811 where
29812 P3: windows_core::Param<ICoreWebView2ClearBrowsingDataCompletedHandler>,
29813 {
29814 unsafe {
29815 (windows_core::Interface::vtable(self).ClearBrowsingDataInTimeRange)(
29816 windows_core::Interface::as_raw(self),
29817 datakinds,
29818 starttime,
29819 endtime,
29820 handler.param().abi(),
29821 )
29822 .ok()
29823 }
29824 }
29825 pub unsafe fn ClearBrowsingDataAll<P0>(&self, handler: P0) -> windows_core::Result<()>
29826 where
29827 P0: windows_core::Param<ICoreWebView2ClearBrowsingDataCompletedHandler>,
29828 {
29829 unsafe {
29830 (windows_core::Interface::vtable(self).ClearBrowsingDataAll)(
29831 windows_core::Interface::as_raw(self),
29832 handler.param().abi(),
29833 )
29834 .ok()
29835 }
29836 }
29837}
29838#[repr(C)]
29839pub struct ICoreWebView2Profile2_Vtbl {
29840 pub base__: ICoreWebView2Profile_Vtbl,
29841 pub ClearBrowsingData: unsafe extern "system" fn(
29842 *mut core::ffi::c_void,
29843 COREWEBVIEW2_BROWSING_DATA_KINDS,
29844 *mut core::ffi::c_void,
29845 ) -> windows_core::HRESULT,
29846 pub ClearBrowsingDataInTimeRange: unsafe extern "system" fn(
29847 *mut core::ffi::c_void,
29848 COREWEBVIEW2_BROWSING_DATA_KINDS,
29849 f64,
29850 f64,
29851 *mut core::ffi::c_void,
29852 ) -> windows_core::HRESULT,
29853 pub ClearBrowsingDataAll: unsafe extern "system" fn(
29854 *mut core::ffi::c_void,
29855 *mut core::ffi::c_void,
29856 ) -> windows_core::HRESULT,
29857}
29858pub trait ICoreWebView2Profile2_Impl: ICoreWebView2Profile_Impl {
29859 fn ClearBrowsingData(
29860 &self,
29861 datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
29862 handler: windows_core::Ref<'_, ICoreWebView2ClearBrowsingDataCompletedHandler>,
29863 ) -> windows_core::Result<()>;
29864 fn ClearBrowsingDataInTimeRange(
29865 &self,
29866 datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
29867 starttime: f64,
29868 endtime: f64,
29869 handler: windows_core::Ref<'_, ICoreWebView2ClearBrowsingDataCompletedHandler>,
29870 ) -> windows_core::Result<()>;
29871 fn ClearBrowsingDataAll(
29872 &self,
29873 handler: windows_core::Ref<'_, ICoreWebView2ClearBrowsingDataCompletedHandler>,
29874 ) -> windows_core::Result<()>;
29875}
29876impl ICoreWebView2Profile2_Vtbl {
29877 pub const fn new<Identity: ICoreWebView2Profile2_Impl, const OFFSET: isize>() -> Self {
29878 unsafe extern "system" fn ClearBrowsingData<
29879 Identity: ICoreWebView2Profile2_Impl,
29880 const OFFSET: isize,
29881 >(
29882 this: *mut core::ffi::c_void,
29883 datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
29884 handler: *mut core::ffi::c_void,
29885 ) -> windows_core::HRESULT {
29886 unsafe {
29887 let this: &Identity =
29888 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29889 ICoreWebView2Profile2_Impl::ClearBrowsingData(
29890 this,
29891 core::mem::transmute_copy(&datakinds),
29892 core::mem::transmute_copy(&handler),
29893 )
29894 .into()
29895 }
29896 }
29897 unsafe extern "system" fn ClearBrowsingDataInTimeRange<
29898 Identity: ICoreWebView2Profile2_Impl,
29899 const OFFSET: isize,
29900 >(
29901 this: *mut core::ffi::c_void,
29902 datakinds: COREWEBVIEW2_BROWSING_DATA_KINDS,
29903 starttime: f64,
29904 endtime: f64,
29905 handler: *mut core::ffi::c_void,
29906 ) -> windows_core::HRESULT {
29907 unsafe {
29908 let this: &Identity =
29909 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29910 ICoreWebView2Profile2_Impl::ClearBrowsingDataInTimeRange(
29911 this,
29912 core::mem::transmute_copy(&datakinds),
29913 core::mem::transmute_copy(&starttime),
29914 core::mem::transmute_copy(&endtime),
29915 core::mem::transmute_copy(&handler),
29916 )
29917 .into()
29918 }
29919 }
29920 unsafe extern "system" fn ClearBrowsingDataAll<
29921 Identity: ICoreWebView2Profile2_Impl,
29922 const OFFSET: isize,
29923 >(
29924 this: *mut core::ffi::c_void,
29925 handler: *mut core::ffi::c_void,
29926 ) -> windows_core::HRESULT {
29927 unsafe {
29928 let this: &Identity =
29929 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
29930 ICoreWebView2Profile2_Impl::ClearBrowsingDataAll(
29931 this,
29932 core::mem::transmute_copy(&handler),
29933 )
29934 .into()
29935 }
29936 }
29937 Self {
29938 base__: ICoreWebView2Profile_Vtbl::new::<Identity, OFFSET>(),
29939 ClearBrowsingData: ClearBrowsingData::<Identity, OFFSET>,
29940 ClearBrowsingDataInTimeRange: ClearBrowsingDataInTimeRange::<Identity, OFFSET>,
29941 ClearBrowsingDataAll: ClearBrowsingDataAll::<Identity, OFFSET>,
29942 }
29943 }
29944 pub fn matches(iid: &windows_core::GUID) -> bool {
29945 iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
29946 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
29947 }
29948}
29949impl windows_core::RuntimeName for ICoreWebView2Profile2 {}
29950windows_core::imp::define_interface!(
29951 ICoreWebView2Profile3,
29952 ICoreWebView2Profile3_Vtbl,
29953 0xb188e659_5685_4e05_bdba_fc640e0f1992
29954);
29955impl core::ops::Deref for ICoreWebView2Profile3 {
29956 type Target = ICoreWebView2Profile2;
29957 fn deref(&self) -> &Self::Target {
29958 unsafe { core::mem::transmute(self) }
29959 }
29960}
29961windows_core::imp::interface_hierarchy!(
29962 ICoreWebView2Profile3,
29963 windows_core::IUnknown,
29964 ICoreWebView2Profile,
29965 ICoreWebView2Profile2
29966);
29967impl ICoreWebView2Profile3 {
29968 pub unsafe fn PreferredTrackingPreventionLevel(
29969 &self,
29970 value: *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
29971 ) -> windows_core::Result<()> {
29972 unsafe {
29973 (windows_core::Interface::vtable(self).PreferredTrackingPreventionLevel)(
29974 windows_core::Interface::as_raw(self),
29975 value as _,
29976 )
29977 .ok()
29978 }
29979 }
29980 pub unsafe fn SetPreferredTrackingPreventionLevel(
29981 &self,
29982 value: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
29983 ) -> windows_core::Result<()> {
29984 unsafe {
29985 (windows_core::Interface::vtable(self).SetPreferredTrackingPreventionLevel)(
29986 windows_core::Interface::as_raw(self),
29987 value,
29988 )
29989 .ok()
29990 }
29991 }
29992}
29993#[repr(C)]
29994pub struct ICoreWebView2Profile3_Vtbl {
29995 pub base__: ICoreWebView2Profile2_Vtbl,
29996 pub PreferredTrackingPreventionLevel: unsafe extern "system" fn(
29997 *mut core::ffi::c_void,
29998 *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
29999 ) -> windows_core::HRESULT,
30000 pub SetPreferredTrackingPreventionLevel: unsafe extern "system" fn(
30001 *mut core::ffi::c_void,
30002 COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
30003 )
30004 -> windows_core::HRESULT,
30005}
30006pub trait ICoreWebView2Profile3_Impl: ICoreWebView2Profile2_Impl {
30007 fn PreferredTrackingPreventionLevel(
30008 &self,
30009 value: *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
30010 ) -> windows_core::Result<()>;
30011 fn SetPreferredTrackingPreventionLevel(
30012 &self,
30013 value: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
30014 ) -> windows_core::Result<()>;
30015}
30016impl ICoreWebView2Profile3_Vtbl {
30017 pub const fn new<Identity: ICoreWebView2Profile3_Impl, const OFFSET: isize>() -> Self {
30018 unsafe extern "system" fn PreferredTrackingPreventionLevel<
30019 Identity: ICoreWebView2Profile3_Impl,
30020 const OFFSET: isize,
30021 >(
30022 this: *mut core::ffi::c_void,
30023 value: *mut COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
30024 ) -> windows_core::HRESULT {
30025 unsafe {
30026 let this: &Identity =
30027 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30028 ICoreWebView2Profile3_Impl::PreferredTrackingPreventionLevel(
30029 this,
30030 core::mem::transmute_copy(&value),
30031 )
30032 .into()
30033 }
30034 }
30035 unsafe extern "system" fn SetPreferredTrackingPreventionLevel<
30036 Identity: ICoreWebView2Profile3_Impl,
30037 const OFFSET: isize,
30038 >(
30039 this: *mut core::ffi::c_void,
30040 value: COREWEBVIEW2_TRACKING_PREVENTION_LEVEL,
30041 ) -> windows_core::HRESULT {
30042 unsafe {
30043 let this: &Identity =
30044 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30045 ICoreWebView2Profile3_Impl::SetPreferredTrackingPreventionLevel(
30046 this,
30047 core::mem::transmute_copy(&value),
30048 )
30049 .into()
30050 }
30051 }
30052 Self {
30053 base__: ICoreWebView2Profile2_Vtbl::new::<Identity, OFFSET>(),
30054 PreferredTrackingPreventionLevel: PreferredTrackingPreventionLevel::<Identity, OFFSET>,
30055 SetPreferredTrackingPreventionLevel: SetPreferredTrackingPreventionLevel::<
30056 Identity,
30057 OFFSET,
30058 >,
30059 }
30060 }
30061 pub fn matches(iid: &windows_core::GUID) -> bool {
30062 iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
30063 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
30064 || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
30065 }
30066}
30067impl windows_core::RuntimeName for ICoreWebView2Profile3 {}
30068windows_core::imp::define_interface!(
30069 ICoreWebView2Profile4,
30070 ICoreWebView2Profile4_Vtbl,
30071 0x8f4ae680_192e_4ec8_833a_21cfadaef628
30072);
30073impl core::ops::Deref for ICoreWebView2Profile4 {
30074 type Target = ICoreWebView2Profile3;
30075 fn deref(&self) -> &Self::Target {
30076 unsafe { core::mem::transmute(self) }
30077 }
30078}
30079windows_core::imp::interface_hierarchy!(
30080 ICoreWebView2Profile4,
30081 windows_core::IUnknown,
30082 ICoreWebView2Profile,
30083 ICoreWebView2Profile2,
30084 ICoreWebView2Profile3
30085);
30086impl ICoreWebView2Profile4 {
30087 pub unsafe fn SetPermissionState<P1, P3>(
30088 &self,
30089 permissionkind: COREWEBVIEW2_PERMISSION_KIND,
30090 origin: P1,
30091 state: COREWEBVIEW2_PERMISSION_STATE,
30092 handler: P3,
30093 ) -> windows_core::Result<()>
30094 where
30095 P1: windows_core::Param<windows_core::PCWSTR>,
30096 P3: windows_core::Param<ICoreWebView2SetPermissionStateCompletedHandler>,
30097 {
30098 unsafe {
30099 (windows_core::Interface::vtable(self).SetPermissionState)(
30100 windows_core::Interface::as_raw(self),
30101 permissionkind,
30102 origin.param().abi(),
30103 state,
30104 handler.param().abi(),
30105 )
30106 .ok()
30107 }
30108 }
30109 pub unsafe fn GetNonDefaultPermissionSettings<P0>(
30110 &self,
30111 handler: P0,
30112 ) -> windows_core::Result<()>
30113 where
30114 P0: windows_core::Param<ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler>,
30115 {
30116 unsafe {
30117 (windows_core::Interface::vtable(self).GetNonDefaultPermissionSettings)(
30118 windows_core::Interface::as_raw(self),
30119 handler.param().abi(),
30120 )
30121 .ok()
30122 }
30123 }
30124}
30125#[repr(C)]
30126pub struct ICoreWebView2Profile4_Vtbl {
30127 pub base__: ICoreWebView2Profile3_Vtbl,
30128 pub SetPermissionState: unsafe extern "system" fn(
30129 *mut core::ffi::c_void,
30130 COREWEBVIEW2_PERMISSION_KIND,
30131 windows_core::PCWSTR,
30132 COREWEBVIEW2_PERMISSION_STATE,
30133 *mut core::ffi::c_void,
30134 ) -> windows_core::HRESULT,
30135 pub GetNonDefaultPermissionSettings: unsafe extern "system" fn(
30136 *mut core::ffi::c_void,
30137 *mut core::ffi::c_void,
30138 ) -> windows_core::HRESULT,
30139}
30140pub trait ICoreWebView2Profile4_Impl: ICoreWebView2Profile3_Impl {
30141 fn SetPermissionState(
30142 &self,
30143 permissionkind: COREWEBVIEW2_PERMISSION_KIND,
30144 origin: &windows_core::PCWSTR,
30145 state: COREWEBVIEW2_PERMISSION_STATE,
30146 handler: windows_core::Ref<'_, ICoreWebView2SetPermissionStateCompletedHandler>,
30147 ) -> windows_core::Result<()>;
30148 fn GetNonDefaultPermissionSettings(
30149 &self,
30150 handler: windows_core::Ref<
30151 '_,
30152 ICoreWebView2GetNonDefaultPermissionSettingsCompletedHandler,
30153 >,
30154 ) -> windows_core::Result<()>;
30155}
30156impl ICoreWebView2Profile4_Vtbl {
30157 pub const fn new<Identity: ICoreWebView2Profile4_Impl, const OFFSET: isize>() -> Self {
30158 unsafe extern "system" fn SetPermissionState<
30159 Identity: ICoreWebView2Profile4_Impl,
30160 const OFFSET: isize,
30161 >(
30162 this: *mut core::ffi::c_void,
30163 permissionkind: COREWEBVIEW2_PERMISSION_KIND,
30164 origin: windows_core::PCWSTR,
30165 state: COREWEBVIEW2_PERMISSION_STATE,
30166 handler: *mut core::ffi::c_void,
30167 ) -> windows_core::HRESULT {
30168 unsafe {
30169 let this: &Identity =
30170 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30171 ICoreWebView2Profile4_Impl::SetPermissionState(
30172 this,
30173 core::mem::transmute_copy(&permissionkind),
30174 core::mem::transmute(&origin),
30175 core::mem::transmute_copy(&state),
30176 core::mem::transmute_copy(&handler),
30177 )
30178 .into()
30179 }
30180 }
30181 unsafe extern "system" fn GetNonDefaultPermissionSettings<
30182 Identity: ICoreWebView2Profile4_Impl,
30183 const OFFSET: isize,
30184 >(
30185 this: *mut core::ffi::c_void,
30186 handler: *mut core::ffi::c_void,
30187 ) -> windows_core::HRESULT {
30188 unsafe {
30189 let this: &Identity =
30190 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30191 ICoreWebView2Profile4_Impl::GetNonDefaultPermissionSettings(
30192 this,
30193 core::mem::transmute_copy(&handler),
30194 )
30195 .into()
30196 }
30197 }
30198 Self {
30199 base__: ICoreWebView2Profile3_Vtbl::new::<Identity, OFFSET>(),
30200 SetPermissionState: SetPermissionState::<Identity, OFFSET>,
30201 GetNonDefaultPermissionSettings: GetNonDefaultPermissionSettings::<Identity, OFFSET>,
30202 }
30203 }
30204 pub fn matches(iid: &windows_core::GUID) -> bool {
30205 iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
30206 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
30207 || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
30208 || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
30209 }
30210}
30211impl windows_core::RuntimeName for ICoreWebView2Profile4 {}
30212windows_core::imp::define_interface!(
30213 ICoreWebView2Profile5,
30214 ICoreWebView2Profile5_Vtbl,
30215 0x2ee5b76e_6e80_4df2_bcd3_d4ec3340a01b
30216);
30217impl core::ops::Deref for ICoreWebView2Profile5 {
30218 type Target = ICoreWebView2Profile4;
30219 fn deref(&self) -> &Self::Target {
30220 unsafe { core::mem::transmute(self) }
30221 }
30222}
30223windows_core::imp::interface_hierarchy!(
30224 ICoreWebView2Profile5,
30225 windows_core::IUnknown,
30226 ICoreWebView2Profile,
30227 ICoreWebView2Profile2,
30228 ICoreWebView2Profile3,
30229 ICoreWebView2Profile4
30230);
30231impl ICoreWebView2Profile5 {
30232 pub unsafe fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager> {
30233 unsafe {
30234 let mut result__ = core::mem::zeroed();
30235 (windows_core::Interface::vtable(self).CookieManager)(
30236 windows_core::Interface::as_raw(self),
30237 &mut result__,
30238 )
30239 .and_then(|| windows_core::Type::from_abi(result__))
30240 }
30241 }
30242}
30243#[repr(C)]
30244pub struct ICoreWebView2Profile5_Vtbl {
30245 pub base__: ICoreWebView2Profile4_Vtbl,
30246 pub CookieManager: unsafe extern "system" fn(
30247 *mut core::ffi::c_void,
30248 *mut *mut core::ffi::c_void,
30249 ) -> windows_core::HRESULT,
30250}
30251pub trait ICoreWebView2Profile5_Impl: ICoreWebView2Profile4_Impl {
30252 fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager>;
30253}
30254impl ICoreWebView2Profile5_Vtbl {
30255 pub const fn new<Identity: ICoreWebView2Profile5_Impl, const OFFSET: isize>() -> Self {
30256 unsafe extern "system" fn CookieManager<
30257 Identity: ICoreWebView2Profile5_Impl,
30258 const OFFSET: isize,
30259 >(
30260 this: *mut core::ffi::c_void,
30261 value: *mut *mut core::ffi::c_void,
30262 ) -> windows_core::HRESULT {
30263 unsafe {
30264 let this: &Identity =
30265 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30266 match ICoreWebView2Profile5_Impl::CookieManager(this) {
30267 Ok(ok__) => {
30268 value.write(core::mem::transmute(ok__));
30269 windows_core::HRESULT(0)
30270 }
30271 Err(err) => err.into(),
30272 }
30273 }
30274 }
30275 Self {
30276 base__: ICoreWebView2Profile4_Vtbl::new::<Identity, OFFSET>(),
30277 CookieManager: CookieManager::<Identity, OFFSET>,
30278 }
30279 }
30280 pub fn matches(iid: &windows_core::GUID) -> bool {
30281 iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
30282 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
30283 || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
30284 || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
30285 || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
30286 }
30287}
30288impl windows_core::RuntimeName for ICoreWebView2Profile5 {}
30289windows_core::imp::define_interface!(
30290 ICoreWebView2Profile6,
30291 ICoreWebView2Profile6_Vtbl,
30292 0xbd82fa6a_1d65_4c33_b2b4_0393020cc61b
30293);
30294impl core::ops::Deref for ICoreWebView2Profile6 {
30295 type Target = ICoreWebView2Profile5;
30296 fn deref(&self) -> &Self::Target {
30297 unsafe { core::mem::transmute(self) }
30298 }
30299}
30300windows_core::imp::interface_hierarchy!(
30301 ICoreWebView2Profile6,
30302 windows_core::IUnknown,
30303 ICoreWebView2Profile,
30304 ICoreWebView2Profile2,
30305 ICoreWebView2Profile3,
30306 ICoreWebView2Profile4,
30307 ICoreWebView2Profile5
30308);
30309impl ICoreWebView2Profile6 {
30310 pub unsafe fn IsPasswordAutosaveEnabled(
30311 &self,
30312 value: *mut windows_core::BOOL,
30313 ) -> windows_core::Result<()> {
30314 unsafe {
30315 (windows_core::Interface::vtable(self).IsPasswordAutosaveEnabled)(
30316 windows_core::Interface::as_raw(self),
30317 value as _,
30318 )
30319 .ok()
30320 }
30321 }
30322 pub unsafe fn SetIsPasswordAutosaveEnabled(&self, value: bool) -> windows_core::Result<()> {
30323 unsafe {
30324 (windows_core::Interface::vtable(self).SetIsPasswordAutosaveEnabled)(
30325 windows_core::Interface::as_raw(self),
30326 value.into(),
30327 )
30328 .ok()
30329 }
30330 }
30331 pub unsafe fn IsGeneralAutofillEnabled(
30332 &self,
30333 value: *mut windows_core::BOOL,
30334 ) -> windows_core::Result<()> {
30335 unsafe {
30336 (windows_core::Interface::vtable(self).IsGeneralAutofillEnabled)(
30337 windows_core::Interface::as_raw(self),
30338 value as _,
30339 )
30340 .ok()
30341 }
30342 }
30343 pub unsafe fn SetIsGeneralAutofillEnabled(&self, value: bool) -> windows_core::Result<()> {
30344 unsafe {
30345 (windows_core::Interface::vtable(self).SetIsGeneralAutofillEnabled)(
30346 windows_core::Interface::as_raw(self),
30347 value.into(),
30348 )
30349 .ok()
30350 }
30351 }
30352}
30353#[repr(C)]
30354pub struct ICoreWebView2Profile6_Vtbl {
30355 pub base__: ICoreWebView2Profile5_Vtbl,
30356 pub IsPasswordAutosaveEnabled: unsafe extern "system" fn(
30357 *mut core::ffi::c_void,
30358 *mut windows_core::BOOL,
30359 ) -> windows_core::HRESULT,
30360 pub SetIsPasswordAutosaveEnabled: unsafe extern "system" fn(
30361 *mut core::ffi::c_void,
30362 windows_core::BOOL,
30363 ) -> windows_core::HRESULT,
30364 pub IsGeneralAutofillEnabled: unsafe extern "system" fn(
30365 *mut core::ffi::c_void,
30366 *mut windows_core::BOOL,
30367 ) -> windows_core::HRESULT,
30368 pub SetIsGeneralAutofillEnabled: unsafe extern "system" fn(
30369 *mut core::ffi::c_void,
30370 windows_core::BOOL,
30371 ) -> windows_core::HRESULT,
30372}
30373pub trait ICoreWebView2Profile6_Impl: ICoreWebView2Profile5_Impl {
30374 fn IsPasswordAutosaveEnabled(&self, value: *mut windows_core::BOOL)
30375 -> windows_core::Result<()>;
30376 fn SetIsPasswordAutosaveEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
30377 fn IsGeneralAutofillEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
30378 fn SetIsGeneralAutofillEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
30379}
30380impl ICoreWebView2Profile6_Vtbl {
30381 pub const fn new<Identity: ICoreWebView2Profile6_Impl, const OFFSET: isize>() -> Self {
30382 unsafe extern "system" fn IsPasswordAutosaveEnabled<
30383 Identity: ICoreWebView2Profile6_Impl,
30384 const OFFSET: isize,
30385 >(
30386 this: *mut core::ffi::c_void,
30387 value: *mut windows_core::BOOL,
30388 ) -> windows_core::HRESULT {
30389 unsafe {
30390 let this: &Identity =
30391 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30392 ICoreWebView2Profile6_Impl::IsPasswordAutosaveEnabled(
30393 this,
30394 core::mem::transmute_copy(&value),
30395 )
30396 .into()
30397 }
30398 }
30399 unsafe extern "system" fn SetIsPasswordAutosaveEnabled<
30400 Identity: ICoreWebView2Profile6_Impl,
30401 const OFFSET: isize,
30402 >(
30403 this: *mut core::ffi::c_void,
30404 value: windows_core::BOOL,
30405 ) -> windows_core::HRESULT {
30406 unsafe {
30407 let this: &Identity =
30408 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30409 ICoreWebView2Profile6_Impl::SetIsPasswordAutosaveEnabled(
30410 this,
30411 core::mem::transmute_copy(&value),
30412 )
30413 .into()
30414 }
30415 }
30416 unsafe extern "system" fn IsGeneralAutofillEnabled<
30417 Identity: ICoreWebView2Profile6_Impl,
30418 const OFFSET: isize,
30419 >(
30420 this: *mut core::ffi::c_void,
30421 value: *mut windows_core::BOOL,
30422 ) -> windows_core::HRESULT {
30423 unsafe {
30424 let this: &Identity =
30425 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30426 ICoreWebView2Profile6_Impl::IsGeneralAutofillEnabled(
30427 this,
30428 core::mem::transmute_copy(&value),
30429 )
30430 .into()
30431 }
30432 }
30433 unsafe extern "system" fn SetIsGeneralAutofillEnabled<
30434 Identity: ICoreWebView2Profile6_Impl,
30435 const OFFSET: isize,
30436 >(
30437 this: *mut core::ffi::c_void,
30438 value: windows_core::BOOL,
30439 ) -> windows_core::HRESULT {
30440 unsafe {
30441 let this: &Identity =
30442 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30443 ICoreWebView2Profile6_Impl::SetIsGeneralAutofillEnabled(
30444 this,
30445 core::mem::transmute_copy(&value),
30446 )
30447 .into()
30448 }
30449 }
30450 Self {
30451 base__: ICoreWebView2Profile5_Vtbl::new::<Identity, OFFSET>(),
30452 IsPasswordAutosaveEnabled: IsPasswordAutosaveEnabled::<Identity, OFFSET>,
30453 SetIsPasswordAutosaveEnabled: SetIsPasswordAutosaveEnabled::<Identity, OFFSET>,
30454 IsGeneralAutofillEnabled: IsGeneralAutofillEnabled::<Identity, OFFSET>,
30455 SetIsGeneralAutofillEnabled: SetIsGeneralAutofillEnabled::<Identity, OFFSET>,
30456 }
30457 }
30458 pub fn matches(iid: &windows_core::GUID) -> bool {
30459 iid == &<ICoreWebView2Profile6 as windows_core::Interface>::IID
30460 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
30461 || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
30462 || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
30463 || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
30464 || iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
30465 }
30466}
30467impl windows_core::RuntimeName for ICoreWebView2Profile6 {}
30468windows_core::imp::define_interface!(
30469 ICoreWebView2Profile7,
30470 ICoreWebView2Profile7_Vtbl,
30471 0x7b4c7906_a1aa_4cb4_b723_db09f813d541
30472);
30473impl core::ops::Deref for ICoreWebView2Profile7 {
30474 type Target = ICoreWebView2Profile6;
30475 fn deref(&self) -> &Self::Target {
30476 unsafe { core::mem::transmute(self) }
30477 }
30478}
30479windows_core::imp::interface_hierarchy!(
30480 ICoreWebView2Profile7,
30481 windows_core::IUnknown,
30482 ICoreWebView2Profile,
30483 ICoreWebView2Profile2,
30484 ICoreWebView2Profile3,
30485 ICoreWebView2Profile4,
30486 ICoreWebView2Profile5,
30487 ICoreWebView2Profile6
30488);
30489impl ICoreWebView2Profile7 {
30490 pub unsafe fn AddBrowserExtension<P0, P1>(
30491 &self,
30492 extensionfolderpath: P0,
30493 handler: P1,
30494 ) -> windows_core::Result<()>
30495 where
30496 P0: windows_core::Param<windows_core::PCWSTR>,
30497 P1: windows_core::Param<ICoreWebView2ProfileAddBrowserExtensionCompletedHandler>,
30498 {
30499 unsafe {
30500 (windows_core::Interface::vtable(self).AddBrowserExtension)(
30501 windows_core::Interface::as_raw(self),
30502 extensionfolderpath.param().abi(),
30503 handler.param().abi(),
30504 )
30505 .ok()
30506 }
30507 }
30508 pub unsafe fn GetBrowserExtensions<P0>(&self, handler: P0) -> windows_core::Result<()>
30509 where
30510 P0: windows_core::Param<ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler>,
30511 {
30512 unsafe {
30513 (windows_core::Interface::vtable(self).GetBrowserExtensions)(
30514 windows_core::Interface::as_raw(self),
30515 handler.param().abi(),
30516 )
30517 .ok()
30518 }
30519 }
30520}
30521#[repr(C)]
30522pub struct ICoreWebView2Profile7_Vtbl {
30523 pub base__: ICoreWebView2Profile6_Vtbl,
30524 pub AddBrowserExtension: unsafe extern "system" fn(
30525 *mut core::ffi::c_void,
30526 windows_core::PCWSTR,
30527 *mut core::ffi::c_void,
30528 ) -> windows_core::HRESULT,
30529 pub GetBrowserExtensions: unsafe extern "system" fn(
30530 *mut core::ffi::c_void,
30531 *mut core::ffi::c_void,
30532 ) -> windows_core::HRESULT,
30533}
30534pub trait ICoreWebView2Profile7_Impl: ICoreWebView2Profile6_Impl {
30535 fn AddBrowserExtension(
30536 &self,
30537 extensionfolderpath: &windows_core::PCWSTR,
30538 handler: windows_core::Ref<'_, ICoreWebView2ProfileAddBrowserExtensionCompletedHandler>,
30539 ) -> windows_core::Result<()>;
30540 fn GetBrowserExtensions(
30541 &self,
30542 handler: windows_core::Ref<'_, ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler>,
30543 ) -> windows_core::Result<()>;
30544}
30545impl ICoreWebView2Profile7_Vtbl {
30546 pub const fn new<Identity: ICoreWebView2Profile7_Impl, const OFFSET: isize>() -> Self {
30547 unsafe extern "system" fn AddBrowserExtension<
30548 Identity: ICoreWebView2Profile7_Impl,
30549 const OFFSET: isize,
30550 >(
30551 this: *mut core::ffi::c_void,
30552 extensionfolderpath: windows_core::PCWSTR,
30553 handler: *mut core::ffi::c_void,
30554 ) -> windows_core::HRESULT {
30555 unsafe {
30556 let this: &Identity =
30557 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30558 ICoreWebView2Profile7_Impl::AddBrowserExtension(
30559 this,
30560 core::mem::transmute(&extensionfolderpath),
30561 core::mem::transmute_copy(&handler),
30562 )
30563 .into()
30564 }
30565 }
30566 unsafe extern "system" fn GetBrowserExtensions<
30567 Identity: ICoreWebView2Profile7_Impl,
30568 const OFFSET: isize,
30569 >(
30570 this: *mut core::ffi::c_void,
30571 handler: *mut core::ffi::c_void,
30572 ) -> windows_core::HRESULT {
30573 unsafe {
30574 let this: &Identity =
30575 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30576 ICoreWebView2Profile7_Impl::GetBrowserExtensions(
30577 this,
30578 core::mem::transmute_copy(&handler),
30579 )
30580 .into()
30581 }
30582 }
30583 Self {
30584 base__: ICoreWebView2Profile6_Vtbl::new::<Identity, OFFSET>(),
30585 AddBrowserExtension: AddBrowserExtension::<Identity, OFFSET>,
30586 GetBrowserExtensions: GetBrowserExtensions::<Identity, OFFSET>,
30587 }
30588 }
30589 pub fn matches(iid: &windows_core::GUID) -> bool {
30590 iid == &<ICoreWebView2Profile7 as windows_core::Interface>::IID
30591 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
30592 || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
30593 || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
30594 || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
30595 || iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
30596 || iid == &<ICoreWebView2Profile6 as windows_core::Interface>::IID
30597 }
30598}
30599impl windows_core::RuntimeName for ICoreWebView2Profile7 {}
30600windows_core::imp::define_interface!(
30601 ICoreWebView2Profile8,
30602 ICoreWebView2Profile8_Vtbl,
30603 0xfbf70c2f_eb1f_4383_85a0_163e92044011
30604);
30605impl core::ops::Deref for ICoreWebView2Profile8 {
30606 type Target = ICoreWebView2Profile7;
30607 fn deref(&self) -> &Self::Target {
30608 unsafe { core::mem::transmute(self) }
30609 }
30610}
30611windows_core::imp::interface_hierarchy!(
30612 ICoreWebView2Profile8,
30613 windows_core::IUnknown,
30614 ICoreWebView2Profile,
30615 ICoreWebView2Profile2,
30616 ICoreWebView2Profile3,
30617 ICoreWebView2Profile4,
30618 ICoreWebView2Profile5,
30619 ICoreWebView2Profile6,
30620 ICoreWebView2Profile7
30621);
30622impl ICoreWebView2Profile8 {
30623 pub unsafe fn Delete(&self) -> windows_core::Result<()> {
30624 unsafe {
30625 (windows_core::Interface::vtable(self).Delete)(windows_core::Interface::as_raw(self))
30626 .ok()
30627 }
30628 }
30629 pub unsafe fn add_Deleted<P0>(
30630 &self,
30631 eventhandler: P0,
30632 token: *mut i64,
30633 ) -> windows_core::Result<()>
30634 where
30635 P0: windows_core::Param<ICoreWebView2ProfileDeletedEventHandler>,
30636 {
30637 unsafe {
30638 (windows_core::Interface::vtable(self).add_Deleted)(
30639 windows_core::Interface::as_raw(self),
30640 eventhandler.param().abi(),
30641 token as _,
30642 )
30643 .ok()
30644 }
30645 }
30646 pub unsafe fn remove_Deleted(&self, token: i64) -> windows_core::Result<()> {
30647 unsafe {
30648 (windows_core::Interface::vtable(self).remove_Deleted)(
30649 windows_core::Interface::as_raw(self),
30650 token,
30651 )
30652 .ok()
30653 }
30654 }
30655}
30656#[repr(C)]
30657pub struct ICoreWebView2Profile8_Vtbl {
30658 pub base__: ICoreWebView2Profile7_Vtbl,
30659 pub Delete: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
30660 pub add_Deleted: unsafe extern "system" fn(
30661 *mut core::ffi::c_void,
30662 *mut core::ffi::c_void,
30663 *mut i64,
30664 ) -> windows_core::HRESULT,
30665 pub remove_Deleted:
30666 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
30667}
30668pub trait ICoreWebView2Profile8_Impl: ICoreWebView2Profile7_Impl {
30669 fn Delete(&self) -> windows_core::Result<()>;
30670 fn add_Deleted(
30671 &self,
30672 eventhandler: windows_core::Ref<'_, ICoreWebView2ProfileDeletedEventHandler>,
30673 token: *mut i64,
30674 ) -> windows_core::Result<()>;
30675 fn remove_Deleted(&self, token: i64) -> windows_core::Result<()>;
30676}
30677impl ICoreWebView2Profile8_Vtbl {
30678 pub const fn new<Identity: ICoreWebView2Profile8_Impl, const OFFSET: isize>() -> Self {
30679 unsafe extern "system" fn Delete<
30680 Identity: ICoreWebView2Profile8_Impl,
30681 const OFFSET: isize,
30682 >(
30683 this: *mut core::ffi::c_void,
30684 ) -> windows_core::HRESULT {
30685 unsafe {
30686 let this: &Identity =
30687 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30688 ICoreWebView2Profile8_Impl::Delete(this).into()
30689 }
30690 }
30691 unsafe extern "system" fn add_Deleted<
30692 Identity: ICoreWebView2Profile8_Impl,
30693 const OFFSET: isize,
30694 >(
30695 this: *mut core::ffi::c_void,
30696 eventhandler: *mut core::ffi::c_void,
30697 token: *mut i64,
30698 ) -> windows_core::HRESULT {
30699 unsafe {
30700 let this: &Identity =
30701 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30702 ICoreWebView2Profile8_Impl::add_Deleted(
30703 this,
30704 core::mem::transmute_copy(&eventhandler),
30705 core::mem::transmute_copy(&token),
30706 )
30707 .into()
30708 }
30709 }
30710 unsafe extern "system" fn remove_Deleted<
30711 Identity: ICoreWebView2Profile8_Impl,
30712 const OFFSET: isize,
30713 >(
30714 this: *mut core::ffi::c_void,
30715 token: i64,
30716 ) -> windows_core::HRESULT {
30717 unsafe {
30718 let this: &Identity =
30719 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30720 ICoreWebView2Profile8_Impl::remove_Deleted(this, core::mem::transmute_copy(&token))
30721 .into()
30722 }
30723 }
30724 Self {
30725 base__: ICoreWebView2Profile7_Vtbl::new::<Identity, OFFSET>(),
30726 Delete: Delete::<Identity, OFFSET>,
30727 add_Deleted: add_Deleted::<Identity, OFFSET>,
30728 remove_Deleted: remove_Deleted::<Identity, OFFSET>,
30729 }
30730 }
30731 pub fn matches(iid: &windows_core::GUID) -> bool {
30732 iid == &<ICoreWebView2Profile8 as windows_core::Interface>::IID
30733 || iid == &<ICoreWebView2Profile as windows_core::Interface>::IID
30734 || iid == &<ICoreWebView2Profile2 as windows_core::Interface>::IID
30735 || iid == &<ICoreWebView2Profile3 as windows_core::Interface>::IID
30736 || iid == &<ICoreWebView2Profile4 as windows_core::Interface>::IID
30737 || iid == &<ICoreWebView2Profile5 as windows_core::Interface>::IID
30738 || iid == &<ICoreWebView2Profile6 as windows_core::Interface>::IID
30739 || iid == &<ICoreWebView2Profile7 as windows_core::Interface>::IID
30740 }
30741}
30742impl windows_core::RuntimeName for ICoreWebView2Profile8 {}
30743windows_core::imp::define_interface!(
30744 ICoreWebView2ProfileAddBrowserExtensionCompletedHandler,
30745 ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Vtbl,
30746 0xdf1aab27_82b9_4ab6_aae8_017a49398c14
30747);
30748windows_core::imp::interface_hierarchy!(
30749 ICoreWebView2ProfileAddBrowserExtensionCompletedHandler,
30750 windows_core::IUnknown
30751);
30752impl ICoreWebView2ProfileAddBrowserExtensionCompletedHandler {
30753 pub unsafe fn Invoke<P1>(
30754 &self,
30755 errorcode: windows_core::HRESULT,
30756 result: P1,
30757 ) -> windows_core::Result<()>
30758 where
30759 P1: windows_core::Param<ICoreWebView2BrowserExtension>,
30760 {
30761 unsafe {
30762 (windows_core::Interface::vtable(self).Invoke)(
30763 windows_core::Interface::as_raw(self),
30764 errorcode,
30765 result.param().abi(),
30766 )
30767 .ok()
30768 }
30769 }
30770}
30771#[repr(C)]
30772pub struct ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Vtbl {
30773 pub base__: windows_core::IUnknown_Vtbl,
30774 pub Invoke: unsafe extern "system" fn(
30775 *mut core::ffi::c_void,
30776 windows_core::HRESULT,
30777 *mut core::ffi::c_void,
30778 ) -> windows_core::HRESULT,
30779}
30780pub trait ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl:
30781 windows_core::IUnknownImpl
30782{
30783 fn Invoke(
30784 &self,
30785 errorcode: windows_core::HRESULT,
30786 result: windows_core::Ref<'_, ICoreWebView2BrowserExtension>,
30787 ) -> windows_core::Result<()>;
30788}
30789impl ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Vtbl {
30790 pub const fn new<
30791 Identity: ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl,
30792 const OFFSET: isize,
30793 >() -> Self {
30794 unsafe extern "system" fn Invoke<
30795 Identity: ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl,
30796 const OFFSET: isize,
30797 >(
30798 this: *mut core::ffi::c_void,
30799 errorcode: windows_core::HRESULT,
30800 result: *mut core::ffi::c_void,
30801 ) -> windows_core::HRESULT {
30802 unsafe {
30803 let this: &Identity =
30804 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30805 ICoreWebView2ProfileAddBrowserExtensionCompletedHandler_Impl::Invoke(
30806 this,
30807 core::mem::transmute_copy(&errorcode),
30808 core::mem::transmute_copy(&result),
30809 )
30810 .into()
30811 }
30812 }
30813 Self {
30814 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
30815 Invoke: Invoke::<Identity, OFFSET>,
30816 }
30817 }
30818 pub fn matches(iid: &windows_core::GUID) -> bool {
30819 iid == & < ICoreWebView2ProfileAddBrowserExtensionCompletedHandler as windows_core::Interface >::IID
30820 }
30821}
30822impl windows_core::RuntimeName for ICoreWebView2ProfileAddBrowserExtensionCompletedHandler {}
30823windows_core::imp::define_interface!(
30824 ICoreWebView2ProfileDeletedEventHandler,
30825 ICoreWebView2ProfileDeletedEventHandler_Vtbl,
30826 0xdf35055d_772e_4dbe_b743_5fbf74a2b258
30827);
30828windows_core::imp::interface_hierarchy!(
30829 ICoreWebView2ProfileDeletedEventHandler,
30830 windows_core::IUnknown
30831);
30832impl ICoreWebView2ProfileDeletedEventHandler {
30833 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
30834 where
30835 P0: windows_core::Param<ICoreWebView2Profile>,
30836 P1: windows_core::Param<windows_core::IUnknown>,
30837 {
30838 unsafe {
30839 (windows_core::Interface::vtable(self).Invoke)(
30840 windows_core::Interface::as_raw(self),
30841 sender.param().abi(),
30842 args.param().abi(),
30843 )
30844 .ok()
30845 }
30846 }
30847}
30848#[repr(C)]
30849pub struct ICoreWebView2ProfileDeletedEventHandler_Vtbl {
30850 pub base__: windows_core::IUnknown_Vtbl,
30851 pub Invoke: unsafe extern "system" fn(
30852 *mut core::ffi::c_void,
30853 *mut core::ffi::c_void,
30854 *mut core::ffi::c_void,
30855 ) -> windows_core::HRESULT,
30856}
30857pub trait ICoreWebView2ProfileDeletedEventHandler_Impl: windows_core::IUnknownImpl {
30858 fn Invoke(
30859 &self,
30860 sender: windows_core::Ref<'_, ICoreWebView2Profile>,
30861 args: windows_core::Ref<'_, windows_core::IUnknown>,
30862 ) -> windows_core::Result<()>;
30863}
30864impl ICoreWebView2ProfileDeletedEventHandler_Vtbl {
30865 pub const fn new<
30866 Identity: ICoreWebView2ProfileDeletedEventHandler_Impl,
30867 const OFFSET: isize,
30868 >() -> Self {
30869 unsafe extern "system" fn Invoke<
30870 Identity: ICoreWebView2ProfileDeletedEventHandler_Impl,
30871 const OFFSET: isize,
30872 >(
30873 this: *mut core::ffi::c_void,
30874 sender: *mut core::ffi::c_void,
30875 args: *mut core::ffi::c_void,
30876 ) -> windows_core::HRESULT {
30877 unsafe {
30878 let this: &Identity =
30879 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30880 ICoreWebView2ProfileDeletedEventHandler_Impl::Invoke(
30881 this,
30882 core::mem::transmute_copy(&sender),
30883 core::mem::transmute_copy(&args),
30884 )
30885 .into()
30886 }
30887 }
30888 Self {
30889 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
30890 Invoke: Invoke::<Identity, OFFSET>,
30891 }
30892 }
30893 pub fn matches(iid: &windows_core::GUID) -> bool {
30894 iid == &<ICoreWebView2ProfileDeletedEventHandler as windows_core::Interface>::IID
30895 }
30896}
30897impl windows_core::RuntimeName for ICoreWebView2ProfileDeletedEventHandler {}
30898windows_core::imp::define_interface!(
30899 ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler,
30900 ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Vtbl,
30901 0xfce16a1c_f107_4601_8b75_fc4940ae25d0
30902);
30903windows_core::imp::interface_hierarchy!(
30904 ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler,
30905 windows_core::IUnknown
30906);
30907impl ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler {
30908 pub unsafe fn Invoke<P1>(
30909 &self,
30910 errorcode: windows_core::HRESULT,
30911 result: P1,
30912 ) -> windows_core::Result<()>
30913 where
30914 P1: windows_core::Param<ICoreWebView2BrowserExtensionList>,
30915 {
30916 unsafe {
30917 (windows_core::Interface::vtable(self).Invoke)(
30918 windows_core::Interface::as_raw(self),
30919 errorcode,
30920 result.param().abi(),
30921 )
30922 .ok()
30923 }
30924 }
30925}
30926#[repr(C)]
30927pub struct ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Vtbl {
30928 pub base__: windows_core::IUnknown_Vtbl,
30929 pub Invoke: unsafe extern "system" fn(
30930 *mut core::ffi::c_void,
30931 windows_core::HRESULT,
30932 *mut core::ffi::c_void,
30933 ) -> windows_core::HRESULT,
30934}
30935pub trait ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl:
30936 windows_core::IUnknownImpl
30937{
30938 fn Invoke(
30939 &self,
30940 errorcode: windows_core::HRESULT,
30941 result: windows_core::Ref<'_, ICoreWebView2BrowserExtensionList>,
30942 ) -> windows_core::Result<()>;
30943}
30944impl ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Vtbl {
30945 pub const fn new<
30946 Identity: ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl,
30947 const OFFSET: isize,
30948 >() -> Self {
30949 unsafe extern "system" fn Invoke<
30950 Identity: ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl,
30951 const OFFSET: isize,
30952 >(
30953 this: *mut core::ffi::c_void,
30954 errorcode: windows_core::HRESULT,
30955 result: *mut core::ffi::c_void,
30956 ) -> windows_core::HRESULT {
30957 unsafe {
30958 let this: &Identity =
30959 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
30960 ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler_Impl::Invoke(
30961 this,
30962 core::mem::transmute_copy(&errorcode),
30963 core::mem::transmute_copy(&result),
30964 )
30965 .into()
30966 }
30967 }
30968 Self {
30969 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
30970 Invoke: Invoke::<Identity, OFFSET>,
30971 }
30972 }
30973 pub fn matches(iid: &windows_core::GUID) -> bool {
30974 iid == & < ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler as windows_core::Interface >::IID
30975 }
30976}
30977impl windows_core::RuntimeName for ICoreWebView2ProfileGetBrowserExtensionsCompletedHandler {}
30978windows_core::imp::define_interface!(
30979 ICoreWebView2RasterizationScaleChangedEventHandler,
30980 ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl,
30981 0x9c98c8b1_ac53_427e_a345_3049b5524bbe
30982);
30983windows_core::imp::interface_hierarchy!(
30984 ICoreWebView2RasterizationScaleChangedEventHandler,
30985 windows_core::IUnknown
30986);
30987impl ICoreWebView2RasterizationScaleChangedEventHandler {
30988 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
30989 where
30990 P0: windows_core::Param<ICoreWebView2Controller>,
30991 P1: windows_core::Param<windows_core::IUnknown>,
30992 {
30993 unsafe {
30994 (windows_core::Interface::vtable(self).Invoke)(
30995 windows_core::Interface::as_raw(self),
30996 sender.param().abi(),
30997 args.param().abi(),
30998 )
30999 .ok()
31000 }
31001 }
31002}
31003#[repr(C)]
31004pub struct ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
31005 pub base__: windows_core::IUnknown_Vtbl,
31006 pub Invoke: unsafe extern "system" fn(
31007 *mut core::ffi::c_void,
31008 *mut core::ffi::c_void,
31009 *mut core::ffi::c_void,
31010 ) -> windows_core::HRESULT,
31011}
31012pub trait ICoreWebView2RasterizationScaleChangedEventHandler_Impl:
31013 windows_core::IUnknownImpl
31014{
31015 fn Invoke(
31016 &self,
31017 sender: windows_core::Ref<'_, ICoreWebView2Controller>,
31018 args: windows_core::Ref<'_, windows_core::IUnknown>,
31019 ) -> windows_core::Result<()>;
31020}
31021impl ICoreWebView2RasterizationScaleChangedEventHandler_Vtbl {
31022 pub const fn new<
31023 Identity: ICoreWebView2RasterizationScaleChangedEventHandler_Impl,
31024 const OFFSET: isize,
31025 >() -> Self {
31026 unsafe extern "system" fn Invoke<
31027 Identity: ICoreWebView2RasterizationScaleChangedEventHandler_Impl,
31028 const OFFSET: isize,
31029 >(
31030 this: *mut core::ffi::c_void,
31031 sender: *mut core::ffi::c_void,
31032 args: *mut core::ffi::c_void,
31033 ) -> windows_core::HRESULT {
31034 unsafe {
31035 let this: &Identity =
31036 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31037 ICoreWebView2RasterizationScaleChangedEventHandler_Impl::Invoke(
31038 this,
31039 core::mem::transmute_copy(&sender),
31040 core::mem::transmute_copy(&args),
31041 )
31042 .into()
31043 }
31044 }
31045 Self {
31046 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
31047 Invoke: Invoke::<Identity, OFFSET>,
31048 }
31049 }
31050 pub fn matches(iid: &windows_core::GUID) -> bool {
31051 iid == &<ICoreWebView2RasterizationScaleChangedEventHandler as windows_core::Interface>::IID
31052 }
31053}
31054impl windows_core::RuntimeName for ICoreWebView2RasterizationScaleChangedEventHandler {}
31055windows_core::imp::define_interface!(
31056 ICoreWebView2RegionRectCollectionView,
31057 ICoreWebView2RegionRectCollectionView_Vtbl,
31058 0x333353b8_48bf_4449_8fcc_22697faf5753
31059);
31060windows_core::imp::interface_hierarchy!(
31061 ICoreWebView2RegionRectCollectionView,
31062 windows_core::IUnknown
31063);
31064impl ICoreWebView2RegionRectCollectionView {
31065 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
31066 unsafe {
31067 (windows_core::Interface::vtable(self).Count)(
31068 windows_core::Interface::as_raw(self),
31069 value as _,
31070 )
31071 .ok()
31072 }
31073 }
31074 pub unsafe fn GetValueAtIndex(
31075 &self,
31076 index: u32,
31077 value: *mut windows::Win32::Foundation::RECT,
31078 ) -> windows_core::Result<()> {
31079 unsafe {
31080 (windows_core::Interface::vtable(self).GetValueAtIndex)(
31081 windows_core::Interface::as_raw(self),
31082 index,
31083 value as _,
31084 )
31085 .ok()
31086 }
31087 }
31088}
31089#[repr(C)]
31090pub struct ICoreWebView2RegionRectCollectionView_Vtbl {
31091 pub base__: windows_core::IUnknown_Vtbl,
31092 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
31093 pub GetValueAtIndex: unsafe extern "system" fn(
31094 *mut core::ffi::c_void,
31095 u32,
31096 *mut windows::Win32::Foundation::RECT,
31097 ) -> windows_core::HRESULT,
31098}
31099pub trait ICoreWebView2RegionRectCollectionView_Impl: windows_core::IUnknownImpl {
31100 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
31101 fn GetValueAtIndex(
31102 &self,
31103 index: u32,
31104 value: *mut windows::Win32::Foundation::RECT,
31105 ) -> windows_core::Result<()>;
31106}
31107impl ICoreWebView2RegionRectCollectionView_Vtbl {
31108 pub const fn new<Identity: ICoreWebView2RegionRectCollectionView_Impl, const OFFSET: isize>(
31109 ) -> Self {
31110 unsafe extern "system" fn Count<
31111 Identity: ICoreWebView2RegionRectCollectionView_Impl,
31112 const OFFSET: isize,
31113 >(
31114 this: *mut core::ffi::c_void,
31115 value: *mut u32,
31116 ) -> windows_core::HRESULT {
31117 unsafe {
31118 let this: &Identity =
31119 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31120 ICoreWebView2RegionRectCollectionView_Impl::Count(
31121 this,
31122 core::mem::transmute_copy(&value),
31123 )
31124 .into()
31125 }
31126 }
31127 unsafe extern "system" fn GetValueAtIndex<
31128 Identity: ICoreWebView2RegionRectCollectionView_Impl,
31129 const OFFSET: isize,
31130 >(
31131 this: *mut core::ffi::c_void,
31132 index: u32,
31133 value: *mut windows::Win32::Foundation::RECT,
31134 ) -> windows_core::HRESULT {
31135 unsafe {
31136 let this: &Identity =
31137 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31138 ICoreWebView2RegionRectCollectionView_Impl::GetValueAtIndex(
31139 this,
31140 core::mem::transmute_copy(&index),
31141 core::mem::transmute_copy(&value),
31142 )
31143 .into()
31144 }
31145 }
31146 Self {
31147 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
31148 Count: Count::<Identity, OFFSET>,
31149 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
31150 }
31151 }
31152 pub fn matches(iid: &windows_core::GUID) -> bool {
31153 iid == &<ICoreWebView2RegionRectCollectionView as windows_core::Interface>::IID
31154 }
31155}
31156impl windows_core::RuntimeName for ICoreWebView2RegionRectCollectionView {}
31157windows_core::imp::define_interface!(
31158 ICoreWebView2SaveAsUIShowingEventArgs,
31159 ICoreWebView2SaveAsUIShowingEventArgs_Vtbl,
31160 0x55902952_0e0d_5aaa_a7d0_e833cdb34f62
31161);
31162windows_core::imp::interface_hierarchy!(
31163 ICoreWebView2SaveAsUIShowingEventArgs,
31164 windows_core::IUnknown
31165);
31166impl ICoreWebView2SaveAsUIShowingEventArgs {
31167 pub unsafe fn ContentMimeType(
31168 &self,
31169 value: *mut windows_core::PWSTR,
31170 ) -> windows_core::Result<()> {
31171 unsafe {
31172 (windows_core::Interface::vtable(self).ContentMimeType)(
31173 windows_core::Interface::as_raw(self),
31174 value as _,
31175 )
31176 .ok()
31177 }
31178 }
31179 pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
31180 unsafe {
31181 (windows_core::Interface::vtable(self).SetCancel)(
31182 windows_core::Interface::as_raw(self),
31183 value.into(),
31184 )
31185 .ok()
31186 }
31187 }
31188 pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
31189 unsafe {
31190 (windows_core::Interface::vtable(self).Cancel)(
31191 windows_core::Interface::as_raw(self),
31192 value as _,
31193 )
31194 .ok()
31195 }
31196 }
31197 pub unsafe fn SetSuppressDefaultDialog(&self, value: bool) -> windows_core::Result<()> {
31198 unsafe {
31199 (windows_core::Interface::vtable(self).SetSuppressDefaultDialog)(
31200 windows_core::Interface::as_raw(self),
31201 value.into(),
31202 )
31203 .ok()
31204 }
31205 }
31206 pub unsafe fn SuppressDefaultDialog(
31207 &self,
31208 value: *mut windows_core::BOOL,
31209 ) -> windows_core::Result<()> {
31210 unsafe {
31211 (windows_core::Interface::vtable(self).SuppressDefaultDialog)(
31212 windows_core::Interface::as_raw(self),
31213 value as _,
31214 )
31215 .ok()
31216 }
31217 }
31218 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
31219 unsafe {
31220 let mut result__ = core::mem::zeroed();
31221 (windows_core::Interface::vtable(self).GetDeferral)(
31222 windows_core::Interface::as_raw(self),
31223 &mut result__,
31224 )
31225 .and_then(|| windows_core::Type::from_abi(result__))
31226 }
31227 }
31228 pub unsafe fn SetSaveAsFilePath<P0>(&self, value: P0) -> windows_core::Result<()>
31229 where
31230 P0: windows_core::Param<windows_core::PCWSTR>,
31231 {
31232 unsafe {
31233 (windows_core::Interface::vtable(self).SetSaveAsFilePath)(
31234 windows_core::Interface::as_raw(self),
31235 value.param().abi(),
31236 )
31237 .ok()
31238 }
31239 }
31240 pub unsafe fn SaveAsFilePath(
31241 &self,
31242 value: *mut windows_core::PWSTR,
31243 ) -> windows_core::Result<()> {
31244 unsafe {
31245 (windows_core::Interface::vtable(self).SaveAsFilePath)(
31246 windows_core::Interface::as_raw(self),
31247 value as _,
31248 )
31249 .ok()
31250 }
31251 }
31252 pub unsafe fn SetAllowReplace(&self, value: bool) -> windows_core::Result<()> {
31253 unsafe {
31254 (windows_core::Interface::vtable(self).SetAllowReplace)(
31255 windows_core::Interface::as_raw(self),
31256 value.into(),
31257 )
31258 .ok()
31259 }
31260 }
31261 pub unsafe fn AllowReplace(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
31262 unsafe {
31263 (windows_core::Interface::vtable(self).AllowReplace)(
31264 windows_core::Interface::as_raw(self),
31265 value as _,
31266 )
31267 .ok()
31268 }
31269 }
31270 pub unsafe fn SetKind(&self, value: COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()> {
31271 unsafe {
31272 (windows_core::Interface::vtable(self).SetKind)(
31273 windows_core::Interface::as_raw(self),
31274 value,
31275 )
31276 .ok()
31277 }
31278 }
31279 pub unsafe fn Kind(&self, value: *mut COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()> {
31280 unsafe {
31281 (windows_core::Interface::vtable(self).Kind)(
31282 windows_core::Interface::as_raw(self),
31283 value as _,
31284 )
31285 .ok()
31286 }
31287 }
31288}
31289#[repr(C)]
31290pub struct ICoreWebView2SaveAsUIShowingEventArgs_Vtbl {
31291 pub base__: windows_core::IUnknown_Vtbl,
31292 pub ContentMimeType: unsafe extern "system" fn(
31293 *mut core::ffi::c_void,
31294 *mut windows_core::PWSTR,
31295 ) -> windows_core::HRESULT,
31296 pub SetCancel: unsafe extern "system" fn(
31297 *mut core::ffi::c_void,
31298 windows_core::BOOL,
31299 ) -> windows_core::HRESULT,
31300 pub Cancel: unsafe extern "system" fn(
31301 *mut core::ffi::c_void,
31302 *mut windows_core::BOOL,
31303 ) -> windows_core::HRESULT,
31304 pub SetSuppressDefaultDialog: unsafe extern "system" fn(
31305 *mut core::ffi::c_void,
31306 windows_core::BOOL,
31307 ) -> windows_core::HRESULT,
31308 pub SuppressDefaultDialog: unsafe extern "system" fn(
31309 *mut core::ffi::c_void,
31310 *mut windows_core::BOOL,
31311 ) -> windows_core::HRESULT,
31312 pub GetDeferral: unsafe extern "system" fn(
31313 *mut core::ffi::c_void,
31314 *mut *mut core::ffi::c_void,
31315 ) -> windows_core::HRESULT,
31316 pub SetSaveAsFilePath: unsafe extern "system" fn(
31317 *mut core::ffi::c_void,
31318 windows_core::PCWSTR,
31319 ) -> windows_core::HRESULT,
31320 pub SaveAsFilePath: unsafe extern "system" fn(
31321 *mut core::ffi::c_void,
31322 *mut windows_core::PWSTR,
31323 ) -> windows_core::HRESULT,
31324 pub SetAllowReplace: unsafe extern "system" fn(
31325 *mut core::ffi::c_void,
31326 windows_core::BOOL,
31327 ) -> windows_core::HRESULT,
31328 pub AllowReplace: unsafe extern "system" fn(
31329 *mut core::ffi::c_void,
31330 *mut windows_core::BOOL,
31331 ) -> windows_core::HRESULT,
31332 pub SetKind: unsafe extern "system" fn(
31333 *mut core::ffi::c_void,
31334 COREWEBVIEW2_SAVE_AS_KIND,
31335 ) -> windows_core::HRESULT,
31336 pub Kind: unsafe extern "system" fn(
31337 *mut core::ffi::c_void,
31338 *mut COREWEBVIEW2_SAVE_AS_KIND,
31339 ) -> windows_core::HRESULT,
31340}
31341pub trait ICoreWebView2SaveAsUIShowingEventArgs_Impl: windows_core::IUnknownImpl {
31342 fn ContentMimeType(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
31343 fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
31344 fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
31345 fn SetSuppressDefaultDialog(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
31346 fn SuppressDefaultDialog(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
31347 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
31348 fn SetSaveAsFilePath(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
31349 fn SaveAsFilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
31350 fn SetAllowReplace(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
31351 fn AllowReplace(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
31352 fn SetKind(&self, value: COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()>;
31353 fn Kind(&self, value: *mut COREWEBVIEW2_SAVE_AS_KIND) -> windows_core::Result<()>;
31354}
31355impl ICoreWebView2SaveAsUIShowingEventArgs_Vtbl {
31356 pub const fn new<Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl, const OFFSET: isize>(
31357 ) -> Self {
31358 unsafe extern "system" fn ContentMimeType<
31359 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31360 const OFFSET: isize,
31361 >(
31362 this: *mut core::ffi::c_void,
31363 value: *mut windows_core::PWSTR,
31364 ) -> windows_core::HRESULT {
31365 unsafe {
31366 let this: &Identity =
31367 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31368 ICoreWebView2SaveAsUIShowingEventArgs_Impl::ContentMimeType(
31369 this,
31370 core::mem::transmute_copy(&value),
31371 )
31372 .into()
31373 }
31374 }
31375 unsafe extern "system" fn SetCancel<
31376 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31377 const OFFSET: isize,
31378 >(
31379 this: *mut core::ffi::c_void,
31380 value: windows_core::BOOL,
31381 ) -> windows_core::HRESULT {
31382 unsafe {
31383 let this: &Identity =
31384 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31385 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetCancel(
31386 this,
31387 core::mem::transmute_copy(&value),
31388 )
31389 .into()
31390 }
31391 }
31392 unsafe extern "system" fn Cancel<
31393 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31394 const OFFSET: isize,
31395 >(
31396 this: *mut core::ffi::c_void,
31397 value: *mut windows_core::BOOL,
31398 ) -> windows_core::HRESULT {
31399 unsafe {
31400 let this: &Identity =
31401 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31402 ICoreWebView2SaveAsUIShowingEventArgs_Impl::Cancel(
31403 this,
31404 core::mem::transmute_copy(&value),
31405 )
31406 .into()
31407 }
31408 }
31409 unsafe extern "system" fn SetSuppressDefaultDialog<
31410 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31411 const OFFSET: isize,
31412 >(
31413 this: *mut core::ffi::c_void,
31414 value: windows_core::BOOL,
31415 ) -> windows_core::HRESULT {
31416 unsafe {
31417 let this: &Identity =
31418 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31419 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetSuppressDefaultDialog(
31420 this,
31421 core::mem::transmute_copy(&value),
31422 )
31423 .into()
31424 }
31425 }
31426 unsafe extern "system" fn SuppressDefaultDialog<
31427 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31428 const OFFSET: isize,
31429 >(
31430 this: *mut core::ffi::c_void,
31431 value: *mut windows_core::BOOL,
31432 ) -> windows_core::HRESULT {
31433 unsafe {
31434 let this: &Identity =
31435 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31436 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SuppressDefaultDialog(
31437 this,
31438 core::mem::transmute_copy(&value),
31439 )
31440 .into()
31441 }
31442 }
31443 unsafe extern "system" fn GetDeferral<
31444 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31445 const OFFSET: isize,
31446 >(
31447 this: *mut core::ffi::c_void,
31448 value: *mut *mut core::ffi::c_void,
31449 ) -> windows_core::HRESULT {
31450 unsafe {
31451 let this: &Identity =
31452 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31453 match ICoreWebView2SaveAsUIShowingEventArgs_Impl::GetDeferral(this) {
31454 Ok(ok__) => {
31455 value.write(core::mem::transmute(ok__));
31456 windows_core::HRESULT(0)
31457 }
31458 Err(err) => err.into(),
31459 }
31460 }
31461 }
31462 unsafe extern "system" fn SetSaveAsFilePath<
31463 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31464 const OFFSET: isize,
31465 >(
31466 this: *mut core::ffi::c_void,
31467 value: windows_core::PCWSTR,
31468 ) -> windows_core::HRESULT {
31469 unsafe {
31470 let this: &Identity =
31471 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31472 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetSaveAsFilePath(
31473 this,
31474 core::mem::transmute(&value),
31475 )
31476 .into()
31477 }
31478 }
31479 unsafe extern "system" fn SaveAsFilePath<
31480 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31481 const OFFSET: isize,
31482 >(
31483 this: *mut core::ffi::c_void,
31484 value: *mut windows_core::PWSTR,
31485 ) -> windows_core::HRESULT {
31486 unsafe {
31487 let this: &Identity =
31488 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31489 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SaveAsFilePath(
31490 this,
31491 core::mem::transmute_copy(&value),
31492 )
31493 .into()
31494 }
31495 }
31496 unsafe extern "system" fn SetAllowReplace<
31497 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31498 const OFFSET: isize,
31499 >(
31500 this: *mut core::ffi::c_void,
31501 value: windows_core::BOOL,
31502 ) -> windows_core::HRESULT {
31503 unsafe {
31504 let this: &Identity =
31505 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31506 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetAllowReplace(
31507 this,
31508 core::mem::transmute_copy(&value),
31509 )
31510 .into()
31511 }
31512 }
31513 unsafe extern "system" fn AllowReplace<
31514 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31515 const OFFSET: isize,
31516 >(
31517 this: *mut core::ffi::c_void,
31518 value: *mut windows_core::BOOL,
31519 ) -> windows_core::HRESULT {
31520 unsafe {
31521 let this: &Identity =
31522 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31523 ICoreWebView2SaveAsUIShowingEventArgs_Impl::AllowReplace(
31524 this,
31525 core::mem::transmute_copy(&value),
31526 )
31527 .into()
31528 }
31529 }
31530 unsafe extern "system" fn SetKind<
31531 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31532 const OFFSET: isize,
31533 >(
31534 this: *mut core::ffi::c_void,
31535 value: COREWEBVIEW2_SAVE_AS_KIND,
31536 ) -> windows_core::HRESULT {
31537 unsafe {
31538 let this: &Identity =
31539 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31540 ICoreWebView2SaveAsUIShowingEventArgs_Impl::SetKind(
31541 this,
31542 core::mem::transmute_copy(&value),
31543 )
31544 .into()
31545 }
31546 }
31547 unsafe extern "system" fn Kind<
31548 Identity: ICoreWebView2SaveAsUIShowingEventArgs_Impl,
31549 const OFFSET: isize,
31550 >(
31551 this: *mut core::ffi::c_void,
31552 value: *mut COREWEBVIEW2_SAVE_AS_KIND,
31553 ) -> windows_core::HRESULT {
31554 unsafe {
31555 let this: &Identity =
31556 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31557 ICoreWebView2SaveAsUIShowingEventArgs_Impl::Kind(
31558 this,
31559 core::mem::transmute_copy(&value),
31560 )
31561 .into()
31562 }
31563 }
31564 Self {
31565 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
31566 ContentMimeType: ContentMimeType::<Identity, OFFSET>,
31567 SetCancel: SetCancel::<Identity, OFFSET>,
31568 Cancel: Cancel::<Identity, OFFSET>,
31569 SetSuppressDefaultDialog: SetSuppressDefaultDialog::<Identity, OFFSET>,
31570 SuppressDefaultDialog: SuppressDefaultDialog::<Identity, OFFSET>,
31571 GetDeferral: GetDeferral::<Identity, OFFSET>,
31572 SetSaveAsFilePath: SetSaveAsFilePath::<Identity, OFFSET>,
31573 SaveAsFilePath: SaveAsFilePath::<Identity, OFFSET>,
31574 SetAllowReplace: SetAllowReplace::<Identity, OFFSET>,
31575 AllowReplace: AllowReplace::<Identity, OFFSET>,
31576 SetKind: SetKind::<Identity, OFFSET>,
31577 Kind: Kind::<Identity, OFFSET>,
31578 }
31579 }
31580 pub fn matches(iid: &windows_core::GUID) -> bool {
31581 iid == &<ICoreWebView2SaveAsUIShowingEventArgs as windows_core::Interface>::IID
31582 }
31583}
31584impl windows_core::RuntimeName for ICoreWebView2SaveAsUIShowingEventArgs {}
31585windows_core::imp::define_interface!(
31586 ICoreWebView2SaveAsUIShowingEventHandler,
31587 ICoreWebView2SaveAsUIShowingEventHandler_Vtbl,
31588 0x6baa177e_3a2e_5ccf_9a13_fad676cd0522
31589);
31590windows_core::imp::interface_hierarchy!(
31591 ICoreWebView2SaveAsUIShowingEventHandler,
31592 windows_core::IUnknown
31593);
31594impl ICoreWebView2SaveAsUIShowingEventHandler {
31595 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
31596 where
31597 P0: windows_core::Param<ICoreWebView2>,
31598 P1: windows_core::Param<ICoreWebView2SaveAsUIShowingEventArgs>,
31599 {
31600 unsafe {
31601 (windows_core::Interface::vtable(self).Invoke)(
31602 windows_core::Interface::as_raw(self),
31603 sender.param().abi(),
31604 args.param().abi(),
31605 )
31606 .ok()
31607 }
31608 }
31609}
31610#[repr(C)]
31611pub struct ICoreWebView2SaveAsUIShowingEventHandler_Vtbl {
31612 pub base__: windows_core::IUnknown_Vtbl,
31613 pub Invoke: unsafe extern "system" fn(
31614 *mut core::ffi::c_void,
31615 *mut core::ffi::c_void,
31616 *mut core::ffi::c_void,
31617 ) -> windows_core::HRESULT,
31618}
31619pub trait ICoreWebView2SaveAsUIShowingEventHandler_Impl: windows_core::IUnknownImpl {
31620 fn Invoke(
31621 &self,
31622 sender: windows_core::Ref<'_, ICoreWebView2>,
31623 args: windows_core::Ref<'_, ICoreWebView2SaveAsUIShowingEventArgs>,
31624 ) -> windows_core::Result<()>;
31625}
31626impl ICoreWebView2SaveAsUIShowingEventHandler_Vtbl {
31627 pub const fn new<
31628 Identity: ICoreWebView2SaveAsUIShowingEventHandler_Impl,
31629 const OFFSET: isize,
31630 >() -> Self {
31631 unsafe extern "system" fn Invoke<
31632 Identity: ICoreWebView2SaveAsUIShowingEventHandler_Impl,
31633 const OFFSET: isize,
31634 >(
31635 this: *mut core::ffi::c_void,
31636 sender: *mut core::ffi::c_void,
31637 args: *mut core::ffi::c_void,
31638 ) -> windows_core::HRESULT {
31639 unsafe {
31640 let this: &Identity =
31641 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31642 ICoreWebView2SaveAsUIShowingEventHandler_Impl::Invoke(
31643 this,
31644 core::mem::transmute_copy(&sender),
31645 core::mem::transmute_copy(&args),
31646 )
31647 .into()
31648 }
31649 }
31650 Self {
31651 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
31652 Invoke: Invoke::<Identity, OFFSET>,
31653 }
31654 }
31655 pub fn matches(iid: &windows_core::GUID) -> bool {
31656 iid == &<ICoreWebView2SaveAsUIShowingEventHandler as windows_core::Interface>::IID
31657 }
31658}
31659impl windows_core::RuntimeName for ICoreWebView2SaveAsUIShowingEventHandler {}
31660windows_core::imp::define_interface!(
31661 ICoreWebView2SaveFileSecurityCheckStartingEventArgs,
31662 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Vtbl,
31663 0xcf4ff1d1_5a67_5660_8d63_ef699881ea65
31664);
31665windows_core::imp::interface_hierarchy!(
31666 ICoreWebView2SaveFileSecurityCheckStartingEventArgs,
31667 windows_core::IUnknown
31668);
31669impl ICoreWebView2SaveFileSecurityCheckStartingEventArgs {
31670 pub unsafe fn CancelSave(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
31671 unsafe {
31672 (windows_core::Interface::vtable(self).CancelSave)(
31673 windows_core::Interface::as_raw(self),
31674 value as _,
31675 )
31676 .ok()
31677 }
31678 }
31679 pub unsafe fn SetCancelSave(&self, value: bool) -> windows_core::Result<()> {
31680 unsafe {
31681 (windows_core::Interface::vtable(self).SetCancelSave)(
31682 windows_core::Interface::as_raw(self),
31683 value.into(),
31684 )
31685 .ok()
31686 }
31687 }
31688 pub unsafe fn DocumentOriginUri(
31689 &self,
31690 value: *mut windows_core::PWSTR,
31691 ) -> windows_core::Result<()> {
31692 unsafe {
31693 (windows_core::Interface::vtable(self).DocumentOriginUri)(
31694 windows_core::Interface::as_raw(self),
31695 value as _,
31696 )
31697 .ok()
31698 }
31699 }
31700 pub unsafe fn FileExtension(
31701 &self,
31702 value: *mut windows_core::PWSTR,
31703 ) -> windows_core::Result<()> {
31704 unsafe {
31705 (windows_core::Interface::vtable(self).FileExtension)(
31706 windows_core::Interface::as_raw(self),
31707 value as _,
31708 )
31709 .ok()
31710 }
31711 }
31712 pub unsafe fn FilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
31713 unsafe {
31714 (windows_core::Interface::vtable(self).FilePath)(
31715 windows_core::Interface::as_raw(self),
31716 value as _,
31717 )
31718 .ok()
31719 }
31720 }
31721 pub unsafe fn SuppressDefaultPolicy(
31722 &self,
31723 value: *mut windows_core::BOOL,
31724 ) -> windows_core::Result<()> {
31725 unsafe {
31726 (windows_core::Interface::vtable(self).SuppressDefaultPolicy)(
31727 windows_core::Interface::as_raw(self),
31728 value as _,
31729 )
31730 .ok()
31731 }
31732 }
31733 pub unsafe fn SetSuppressDefaultPolicy(&self, value: bool) -> windows_core::Result<()> {
31734 unsafe {
31735 (windows_core::Interface::vtable(self).SetSuppressDefaultPolicy)(
31736 windows_core::Interface::as_raw(self),
31737 value.into(),
31738 )
31739 .ok()
31740 }
31741 }
31742 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
31743 unsafe {
31744 let mut result__ = core::mem::zeroed();
31745 (windows_core::Interface::vtable(self).GetDeferral)(
31746 windows_core::Interface::as_raw(self),
31747 &mut result__,
31748 )
31749 .and_then(|| windows_core::Type::from_abi(result__))
31750 }
31751 }
31752}
31753#[repr(C)]
31754pub struct ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Vtbl {
31755 pub base__: windows_core::IUnknown_Vtbl,
31756 pub CancelSave: unsafe extern "system" fn(
31757 *mut core::ffi::c_void,
31758 *mut windows_core::BOOL,
31759 ) -> windows_core::HRESULT,
31760 pub SetCancelSave: unsafe extern "system" fn(
31761 *mut core::ffi::c_void,
31762 windows_core::BOOL,
31763 ) -> windows_core::HRESULT,
31764 pub DocumentOriginUri: unsafe extern "system" fn(
31765 *mut core::ffi::c_void,
31766 *mut windows_core::PWSTR,
31767 ) -> windows_core::HRESULT,
31768 pub FileExtension: unsafe extern "system" fn(
31769 *mut core::ffi::c_void,
31770 *mut windows_core::PWSTR,
31771 ) -> windows_core::HRESULT,
31772 pub FilePath: unsafe extern "system" fn(
31773 *mut core::ffi::c_void,
31774 *mut windows_core::PWSTR,
31775 ) -> windows_core::HRESULT,
31776 pub SuppressDefaultPolicy: unsafe extern "system" fn(
31777 *mut core::ffi::c_void,
31778 *mut windows_core::BOOL,
31779 ) -> windows_core::HRESULT,
31780 pub SetSuppressDefaultPolicy: unsafe extern "system" fn(
31781 *mut core::ffi::c_void,
31782 windows_core::BOOL,
31783 ) -> windows_core::HRESULT,
31784 pub GetDeferral: unsafe extern "system" fn(
31785 *mut core::ffi::c_void,
31786 *mut *mut core::ffi::c_void,
31787 ) -> windows_core::HRESULT,
31788}
31789pub trait ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl:
31790 windows_core::IUnknownImpl
31791{
31792 fn CancelSave(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
31793 fn SetCancelSave(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
31794 fn DocumentOriginUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
31795 fn FileExtension(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
31796 fn FilePath(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
31797 fn SuppressDefaultPolicy(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
31798 fn SetSuppressDefaultPolicy(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
31799 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
31800}
31801impl ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Vtbl {
31802 pub const fn new<
31803 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31804 const OFFSET: isize,
31805 >() -> Self {
31806 unsafe extern "system" fn CancelSave<
31807 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31808 const OFFSET: isize,
31809 >(
31810 this: *mut core::ffi::c_void,
31811 value: *mut windows_core::BOOL,
31812 ) -> windows_core::HRESULT {
31813 unsafe {
31814 let this: &Identity =
31815 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31816 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::CancelSave(
31817 this,
31818 core::mem::transmute_copy(&value),
31819 )
31820 .into()
31821 }
31822 }
31823 unsafe extern "system" fn SetCancelSave<
31824 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31825 const OFFSET: isize,
31826 >(
31827 this: *mut core::ffi::c_void,
31828 value: windows_core::BOOL,
31829 ) -> windows_core::HRESULT {
31830 unsafe {
31831 let this: &Identity =
31832 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31833 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::SetCancelSave(
31834 this,
31835 core::mem::transmute_copy(&value),
31836 )
31837 .into()
31838 }
31839 }
31840 unsafe extern "system" fn DocumentOriginUri<
31841 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31842 const OFFSET: isize,
31843 >(
31844 this: *mut core::ffi::c_void,
31845 value: *mut windows_core::PWSTR,
31846 ) -> windows_core::HRESULT {
31847 unsafe {
31848 let this: &Identity =
31849 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31850 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::DocumentOriginUri(
31851 this,
31852 core::mem::transmute_copy(&value),
31853 )
31854 .into()
31855 }
31856 }
31857 unsafe extern "system" fn FileExtension<
31858 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31859 const OFFSET: isize,
31860 >(
31861 this: *mut core::ffi::c_void,
31862 value: *mut windows_core::PWSTR,
31863 ) -> windows_core::HRESULT {
31864 unsafe {
31865 let this: &Identity =
31866 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31867 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::FileExtension(
31868 this,
31869 core::mem::transmute_copy(&value),
31870 )
31871 .into()
31872 }
31873 }
31874 unsafe extern "system" fn FilePath<
31875 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31876 const OFFSET: isize,
31877 >(
31878 this: *mut core::ffi::c_void,
31879 value: *mut windows_core::PWSTR,
31880 ) -> windows_core::HRESULT {
31881 unsafe {
31882 let this: &Identity =
31883 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31884 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::FilePath(
31885 this,
31886 core::mem::transmute_copy(&value),
31887 )
31888 .into()
31889 }
31890 }
31891 unsafe extern "system" fn SuppressDefaultPolicy<
31892 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31893 const OFFSET: isize,
31894 >(
31895 this: *mut core::ffi::c_void,
31896 value: *mut windows_core::BOOL,
31897 ) -> windows_core::HRESULT {
31898 unsafe {
31899 let this: &Identity =
31900 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31901 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::SuppressDefaultPolicy(
31902 this,
31903 core::mem::transmute_copy(&value),
31904 )
31905 .into()
31906 }
31907 }
31908 unsafe extern "system" fn SetSuppressDefaultPolicy<
31909 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31910 const OFFSET: isize,
31911 >(
31912 this: *mut core::ffi::c_void,
31913 value: windows_core::BOOL,
31914 ) -> windows_core::HRESULT {
31915 unsafe {
31916 let this: &Identity =
31917 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31918 ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::SetSuppressDefaultPolicy(
31919 this,
31920 core::mem::transmute_copy(&value),
31921 )
31922 .into()
31923 }
31924 }
31925 unsafe extern "system" fn GetDeferral<
31926 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl,
31927 const OFFSET: isize,
31928 >(
31929 this: *mut core::ffi::c_void,
31930 value: *mut *mut core::ffi::c_void,
31931 ) -> windows_core::HRESULT {
31932 unsafe {
31933 let this: &Identity =
31934 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
31935 match ICoreWebView2SaveFileSecurityCheckStartingEventArgs_Impl::GetDeferral(this) {
31936 Ok(ok__) => {
31937 value.write(core::mem::transmute(ok__));
31938 windows_core::HRESULT(0)
31939 }
31940 Err(err) => err.into(),
31941 }
31942 }
31943 }
31944 Self {
31945 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
31946 CancelSave: CancelSave::<Identity, OFFSET>,
31947 SetCancelSave: SetCancelSave::<Identity, OFFSET>,
31948 DocumentOriginUri: DocumentOriginUri::<Identity, OFFSET>,
31949 FileExtension: FileExtension::<Identity, OFFSET>,
31950 FilePath: FilePath::<Identity, OFFSET>,
31951 SuppressDefaultPolicy: SuppressDefaultPolicy::<Identity, OFFSET>,
31952 SetSuppressDefaultPolicy: SetSuppressDefaultPolicy::<Identity, OFFSET>,
31953 GetDeferral: GetDeferral::<Identity, OFFSET>,
31954 }
31955 }
31956 pub fn matches(iid: &windows_core::GUID) -> bool {
31957 iid == & < ICoreWebView2SaveFileSecurityCheckStartingEventArgs as windows_core::Interface >::IID
31958 }
31959}
31960impl windows_core::RuntimeName for ICoreWebView2SaveFileSecurityCheckStartingEventArgs {}
31961windows_core::imp::define_interface!(
31962 ICoreWebView2SaveFileSecurityCheckStartingEventHandler,
31963 ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Vtbl,
31964 0x7899576c_19e3_57c8_b7d1_55808292de57
31965);
31966windows_core::imp::interface_hierarchy!(
31967 ICoreWebView2SaveFileSecurityCheckStartingEventHandler,
31968 windows_core::IUnknown
31969);
31970impl ICoreWebView2SaveFileSecurityCheckStartingEventHandler {
31971 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
31972 where
31973 P0: windows_core::Param<ICoreWebView2>,
31974 P1: windows_core::Param<ICoreWebView2SaveFileSecurityCheckStartingEventArgs>,
31975 {
31976 unsafe {
31977 (windows_core::Interface::vtable(self).Invoke)(
31978 windows_core::Interface::as_raw(self),
31979 sender.param().abi(),
31980 args.param().abi(),
31981 )
31982 .ok()
31983 }
31984 }
31985}
31986#[repr(C)]
31987pub struct ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Vtbl {
31988 pub base__: windows_core::IUnknown_Vtbl,
31989 pub Invoke: unsafe extern "system" fn(
31990 *mut core::ffi::c_void,
31991 *mut core::ffi::c_void,
31992 *mut core::ffi::c_void,
31993 ) -> windows_core::HRESULT,
31994}
31995pub trait ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl:
31996 windows_core::IUnknownImpl
31997{
31998 fn Invoke(
31999 &self,
32000 sender: windows_core::Ref<'_, ICoreWebView2>,
32001 args: windows_core::Ref<'_, ICoreWebView2SaveFileSecurityCheckStartingEventArgs>,
32002 ) -> windows_core::Result<()>;
32003}
32004impl ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Vtbl {
32005 pub const fn new<
32006 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl,
32007 const OFFSET: isize,
32008 >() -> Self {
32009 unsafe extern "system" fn Invoke<
32010 Identity: ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl,
32011 const OFFSET: isize,
32012 >(
32013 this: *mut core::ffi::c_void,
32014 sender: *mut core::ffi::c_void,
32015 args: *mut core::ffi::c_void,
32016 ) -> windows_core::HRESULT {
32017 unsafe {
32018 let this: &Identity =
32019 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32020 ICoreWebView2SaveFileSecurityCheckStartingEventHandler_Impl::Invoke(
32021 this,
32022 core::mem::transmute_copy(&sender),
32023 core::mem::transmute_copy(&args),
32024 )
32025 .into()
32026 }
32027 }
32028 Self {
32029 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
32030 Invoke: Invoke::<Identity, OFFSET>,
32031 }
32032 }
32033 pub fn matches(iid: &windows_core::GUID) -> bool {
32034 iid == & < ICoreWebView2SaveFileSecurityCheckStartingEventHandler as windows_core::Interface >::IID
32035 }
32036}
32037impl windows_core::RuntimeName for ICoreWebView2SaveFileSecurityCheckStartingEventHandler {}
32038windows_core::imp::define_interface!(
32039 ICoreWebView2ScreenCaptureStartingEventArgs,
32040 ICoreWebView2ScreenCaptureStartingEventArgs_Vtbl,
32041 0x892c03fd_aee3_5eba_a1fa_6fd2f6484b2b
32042);
32043windows_core::imp::interface_hierarchy!(
32044 ICoreWebView2ScreenCaptureStartingEventArgs,
32045 windows_core::IUnknown
32046);
32047impl ICoreWebView2ScreenCaptureStartingEventArgs {
32048 pub unsafe fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
32049 unsafe {
32050 (windows_core::Interface::vtable(self).Cancel)(
32051 windows_core::Interface::as_raw(self),
32052 value as _,
32053 )
32054 .ok()
32055 }
32056 }
32057 pub unsafe fn SetCancel(&self, value: bool) -> windows_core::Result<()> {
32058 unsafe {
32059 (windows_core::Interface::vtable(self).SetCancel)(
32060 windows_core::Interface::as_raw(self),
32061 value.into(),
32062 )
32063 .ok()
32064 }
32065 }
32066 pub unsafe fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
32067 unsafe {
32068 (windows_core::Interface::vtable(self).Handled)(
32069 windows_core::Interface::as_raw(self),
32070 value as _,
32071 )
32072 .ok()
32073 }
32074 }
32075 pub unsafe fn SetHandled(&self, value: bool) -> windows_core::Result<()> {
32076 unsafe {
32077 (windows_core::Interface::vtable(self).SetHandled)(
32078 windows_core::Interface::as_raw(self),
32079 value.into(),
32080 )
32081 .ok()
32082 }
32083 }
32084 pub unsafe fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo> {
32085 unsafe {
32086 let mut result__ = core::mem::zeroed();
32087 (windows_core::Interface::vtable(self).OriginalSourceFrameInfo)(
32088 windows_core::Interface::as_raw(self),
32089 &mut result__,
32090 )
32091 .and_then(|| windows_core::Type::from_abi(result__))
32092 }
32093 }
32094 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
32095 unsafe {
32096 let mut result__ = core::mem::zeroed();
32097 (windows_core::Interface::vtable(self).GetDeferral)(
32098 windows_core::Interface::as_raw(self),
32099 &mut result__,
32100 )
32101 .and_then(|| windows_core::Type::from_abi(result__))
32102 }
32103 }
32104}
32105#[repr(C)]
32106pub struct ICoreWebView2ScreenCaptureStartingEventArgs_Vtbl {
32107 pub base__: windows_core::IUnknown_Vtbl,
32108 pub Cancel: unsafe extern "system" fn(
32109 *mut core::ffi::c_void,
32110 *mut windows_core::BOOL,
32111 ) -> windows_core::HRESULT,
32112 pub SetCancel: unsafe extern "system" fn(
32113 *mut core::ffi::c_void,
32114 windows_core::BOOL,
32115 ) -> windows_core::HRESULT,
32116 pub Handled: unsafe extern "system" fn(
32117 *mut core::ffi::c_void,
32118 *mut windows_core::BOOL,
32119 ) -> windows_core::HRESULT,
32120 pub SetHandled: unsafe extern "system" fn(
32121 *mut core::ffi::c_void,
32122 windows_core::BOOL,
32123 ) -> windows_core::HRESULT,
32124 pub OriginalSourceFrameInfo: unsafe extern "system" fn(
32125 *mut core::ffi::c_void,
32126 *mut *mut core::ffi::c_void,
32127 ) -> windows_core::HRESULT,
32128 pub GetDeferral: unsafe extern "system" fn(
32129 *mut core::ffi::c_void,
32130 *mut *mut core::ffi::c_void,
32131 ) -> windows_core::HRESULT,
32132}
32133pub trait ICoreWebView2ScreenCaptureStartingEventArgs_Impl: windows_core::IUnknownImpl {
32134 fn Cancel(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
32135 fn SetCancel(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
32136 fn Handled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
32137 fn SetHandled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
32138 fn OriginalSourceFrameInfo(&self) -> windows_core::Result<ICoreWebView2FrameInfo>;
32139 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
32140}
32141impl ICoreWebView2ScreenCaptureStartingEventArgs_Vtbl {
32142 pub const fn new<
32143 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32144 const OFFSET: isize,
32145 >() -> Self {
32146 unsafe extern "system" fn Cancel<
32147 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32148 const OFFSET: isize,
32149 >(
32150 this: *mut core::ffi::c_void,
32151 value: *mut windows_core::BOOL,
32152 ) -> windows_core::HRESULT {
32153 unsafe {
32154 let this: &Identity =
32155 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32156 ICoreWebView2ScreenCaptureStartingEventArgs_Impl::Cancel(
32157 this,
32158 core::mem::transmute_copy(&value),
32159 )
32160 .into()
32161 }
32162 }
32163 unsafe extern "system" fn SetCancel<
32164 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32165 const OFFSET: isize,
32166 >(
32167 this: *mut core::ffi::c_void,
32168 value: windows_core::BOOL,
32169 ) -> windows_core::HRESULT {
32170 unsafe {
32171 let this: &Identity =
32172 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32173 ICoreWebView2ScreenCaptureStartingEventArgs_Impl::SetCancel(
32174 this,
32175 core::mem::transmute_copy(&value),
32176 )
32177 .into()
32178 }
32179 }
32180 unsafe extern "system" fn Handled<
32181 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32182 const OFFSET: isize,
32183 >(
32184 this: *mut core::ffi::c_void,
32185 value: *mut windows_core::BOOL,
32186 ) -> windows_core::HRESULT {
32187 unsafe {
32188 let this: &Identity =
32189 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32190 ICoreWebView2ScreenCaptureStartingEventArgs_Impl::Handled(
32191 this,
32192 core::mem::transmute_copy(&value),
32193 )
32194 .into()
32195 }
32196 }
32197 unsafe extern "system" fn SetHandled<
32198 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32199 const OFFSET: isize,
32200 >(
32201 this: *mut core::ffi::c_void,
32202 value: windows_core::BOOL,
32203 ) -> windows_core::HRESULT {
32204 unsafe {
32205 let this: &Identity =
32206 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32207 ICoreWebView2ScreenCaptureStartingEventArgs_Impl::SetHandled(
32208 this,
32209 core::mem::transmute_copy(&value),
32210 )
32211 .into()
32212 }
32213 }
32214 unsafe extern "system" fn OriginalSourceFrameInfo<
32215 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32216 const OFFSET: isize,
32217 >(
32218 this: *mut core::ffi::c_void,
32219 value: *mut *mut core::ffi::c_void,
32220 ) -> windows_core::HRESULT {
32221 unsafe {
32222 let this: &Identity =
32223 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32224 match ICoreWebView2ScreenCaptureStartingEventArgs_Impl::OriginalSourceFrameInfo(
32225 this,
32226 ) {
32227 Ok(ok__) => {
32228 value.write(core::mem::transmute(ok__));
32229 windows_core::HRESULT(0)
32230 }
32231 Err(err) => err.into(),
32232 }
32233 }
32234 }
32235 unsafe extern "system" fn GetDeferral<
32236 Identity: ICoreWebView2ScreenCaptureStartingEventArgs_Impl,
32237 const OFFSET: isize,
32238 >(
32239 this: *mut core::ffi::c_void,
32240 value: *mut *mut core::ffi::c_void,
32241 ) -> windows_core::HRESULT {
32242 unsafe {
32243 let this: &Identity =
32244 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32245 match ICoreWebView2ScreenCaptureStartingEventArgs_Impl::GetDeferral(this) {
32246 Ok(ok__) => {
32247 value.write(core::mem::transmute(ok__));
32248 windows_core::HRESULT(0)
32249 }
32250 Err(err) => err.into(),
32251 }
32252 }
32253 }
32254 Self {
32255 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
32256 Cancel: Cancel::<Identity, OFFSET>,
32257 SetCancel: SetCancel::<Identity, OFFSET>,
32258 Handled: Handled::<Identity, OFFSET>,
32259 SetHandled: SetHandled::<Identity, OFFSET>,
32260 OriginalSourceFrameInfo: OriginalSourceFrameInfo::<Identity, OFFSET>,
32261 GetDeferral: GetDeferral::<Identity, OFFSET>,
32262 }
32263 }
32264 pub fn matches(iid: &windows_core::GUID) -> bool {
32265 iid == &<ICoreWebView2ScreenCaptureStartingEventArgs as windows_core::Interface>::IID
32266 }
32267}
32268impl windows_core::RuntimeName for ICoreWebView2ScreenCaptureStartingEventArgs {}
32269windows_core::imp::define_interface!(
32270 ICoreWebView2ScreenCaptureStartingEventHandler,
32271 ICoreWebView2ScreenCaptureStartingEventHandler_Vtbl,
32272 0xe24ff05a_1db5_59d9_89f3_3c864268db4a
32273);
32274windows_core::imp::interface_hierarchy!(
32275 ICoreWebView2ScreenCaptureStartingEventHandler,
32276 windows_core::IUnknown
32277);
32278impl ICoreWebView2ScreenCaptureStartingEventHandler {
32279 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
32280 where
32281 P0: windows_core::Param<ICoreWebView2>,
32282 P1: windows_core::Param<ICoreWebView2ScreenCaptureStartingEventArgs>,
32283 {
32284 unsafe {
32285 (windows_core::Interface::vtable(self).Invoke)(
32286 windows_core::Interface::as_raw(self),
32287 sender.param().abi(),
32288 args.param().abi(),
32289 )
32290 .ok()
32291 }
32292 }
32293}
32294#[repr(C)]
32295pub struct ICoreWebView2ScreenCaptureStartingEventHandler_Vtbl {
32296 pub base__: windows_core::IUnknown_Vtbl,
32297 pub Invoke: unsafe extern "system" fn(
32298 *mut core::ffi::c_void,
32299 *mut core::ffi::c_void,
32300 *mut core::ffi::c_void,
32301 ) -> windows_core::HRESULT,
32302}
32303pub trait ICoreWebView2ScreenCaptureStartingEventHandler_Impl: windows_core::IUnknownImpl {
32304 fn Invoke(
32305 &self,
32306 sender: windows_core::Ref<'_, ICoreWebView2>,
32307 args: windows_core::Ref<'_, ICoreWebView2ScreenCaptureStartingEventArgs>,
32308 ) -> windows_core::Result<()>;
32309}
32310impl ICoreWebView2ScreenCaptureStartingEventHandler_Vtbl {
32311 pub const fn new<
32312 Identity: ICoreWebView2ScreenCaptureStartingEventHandler_Impl,
32313 const OFFSET: isize,
32314 >() -> Self {
32315 unsafe extern "system" fn Invoke<
32316 Identity: ICoreWebView2ScreenCaptureStartingEventHandler_Impl,
32317 const OFFSET: isize,
32318 >(
32319 this: *mut core::ffi::c_void,
32320 sender: *mut core::ffi::c_void,
32321 args: *mut core::ffi::c_void,
32322 ) -> windows_core::HRESULT {
32323 unsafe {
32324 let this: &Identity =
32325 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32326 ICoreWebView2ScreenCaptureStartingEventHandler_Impl::Invoke(
32327 this,
32328 core::mem::transmute_copy(&sender),
32329 core::mem::transmute_copy(&args),
32330 )
32331 .into()
32332 }
32333 }
32334 Self {
32335 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
32336 Invoke: Invoke::<Identity, OFFSET>,
32337 }
32338 }
32339 pub fn matches(iid: &windows_core::GUID) -> bool {
32340 iid == &<ICoreWebView2ScreenCaptureStartingEventHandler as windows_core::Interface>::IID
32341 }
32342}
32343impl windows_core::RuntimeName for ICoreWebView2ScreenCaptureStartingEventHandler {}
32344windows_core::imp::define_interface!(
32345 ICoreWebView2ScriptDialogOpeningEventArgs,
32346 ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl,
32347 0x7390bb70_abe0_4843_9529_f143b31b03d6
32348);
32349windows_core::imp::interface_hierarchy!(
32350 ICoreWebView2ScriptDialogOpeningEventArgs,
32351 windows_core::IUnknown
32352);
32353impl ICoreWebView2ScriptDialogOpeningEventArgs {
32354 pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
32355 unsafe {
32356 (windows_core::Interface::vtable(self).Uri)(
32357 windows_core::Interface::as_raw(self),
32358 uri as _,
32359 )
32360 .ok()
32361 }
32362 }
32363 pub unsafe fn Kind(
32364 &self,
32365 kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
32366 ) -> windows_core::Result<()> {
32367 unsafe {
32368 (windows_core::Interface::vtable(self).Kind)(
32369 windows_core::Interface::as_raw(self),
32370 kind as _,
32371 )
32372 .ok()
32373 }
32374 }
32375 pub unsafe fn Message(&self, message: *mut windows_core::PWSTR) -> windows_core::Result<()> {
32376 unsafe {
32377 (windows_core::Interface::vtable(self).Message)(
32378 windows_core::Interface::as_raw(self),
32379 message as _,
32380 )
32381 .ok()
32382 }
32383 }
32384 pub unsafe fn Accept(&self) -> windows_core::Result<()> {
32385 unsafe {
32386 (windows_core::Interface::vtable(self).Accept)(windows_core::Interface::as_raw(self))
32387 .ok()
32388 }
32389 }
32390 pub unsafe fn DefaultText(
32391 &self,
32392 defaulttext: *mut windows_core::PWSTR,
32393 ) -> windows_core::Result<()> {
32394 unsafe {
32395 (windows_core::Interface::vtable(self).DefaultText)(
32396 windows_core::Interface::as_raw(self),
32397 defaulttext as _,
32398 )
32399 .ok()
32400 }
32401 }
32402 pub unsafe fn ResultText(
32403 &self,
32404 resulttext: *mut windows_core::PWSTR,
32405 ) -> windows_core::Result<()> {
32406 unsafe {
32407 (windows_core::Interface::vtable(self).ResultText)(
32408 windows_core::Interface::as_raw(self),
32409 resulttext as _,
32410 )
32411 .ok()
32412 }
32413 }
32414 pub unsafe fn SetResultText<P0>(&self, resulttext: P0) -> windows_core::Result<()>
32415 where
32416 P0: windows_core::Param<windows_core::PCWSTR>,
32417 {
32418 unsafe {
32419 (windows_core::Interface::vtable(self).SetResultText)(
32420 windows_core::Interface::as_raw(self),
32421 resulttext.param().abi(),
32422 )
32423 .ok()
32424 }
32425 }
32426 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
32427 unsafe {
32428 let mut result__ = core::mem::zeroed();
32429 (windows_core::Interface::vtable(self).GetDeferral)(
32430 windows_core::Interface::as_raw(self),
32431 &mut result__,
32432 )
32433 .and_then(|| windows_core::Type::from_abi(result__))
32434 }
32435 }
32436}
32437#[repr(C)]
32438pub struct ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
32439 pub base__: windows_core::IUnknown_Vtbl,
32440 pub Uri: unsafe extern "system" fn(
32441 *mut core::ffi::c_void,
32442 *mut windows_core::PWSTR,
32443 ) -> windows_core::HRESULT,
32444 pub Kind: unsafe extern "system" fn(
32445 *mut core::ffi::c_void,
32446 *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
32447 ) -> windows_core::HRESULT,
32448 pub Message: unsafe extern "system" fn(
32449 *mut core::ffi::c_void,
32450 *mut windows_core::PWSTR,
32451 ) -> windows_core::HRESULT,
32452 pub Accept: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
32453 pub DefaultText: unsafe extern "system" fn(
32454 *mut core::ffi::c_void,
32455 *mut windows_core::PWSTR,
32456 ) -> windows_core::HRESULT,
32457 pub ResultText: unsafe extern "system" fn(
32458 *mut core::ffi::c_void,
32459 *mut windows_core::PWSTR,
32460 ) -> windows_core::HRESULT,
32461 pub SetResultText: unsafe extern "system" fn(
32462 *mut core::ffi::c_void,
32463 windows_core::PCWSTR,
32464 ) -> windows_core::HRESULT,
32465 pub GetDeferral: unsafe extern "system" fn(
32466 *mut core::ffi::c_void,
32467 *mut *mut core::ffi::c_void,
32468 ) -> windows_core::HRESULT,
32469}
32470pub trait ICoreWebView2ScriptDialogOpeningEventArgs_Impl: windows_core::IUnknownImpl {
32471 fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32472 fn Kind(&self, kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND) -> windows_core::Result<()>;
32473 fn Message(&self, message: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32474 fn Accept(&self) -> windows_core::Result<()>;
32475 fn DefaultText(&self, defaulttext: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32476 fn ResultText(&self, resulttext: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32477 fn SetResultText(&self, resulttext: &windows_core::PCWSTR) -> windows_core::Result<()>;
32478 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
32479}
32480impl ICoreWebView2ScriptDialogOpeningEventArgs_Vtbl {
32481 pub const fn new<
32482 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32483 const OFFSET: isize,
32484 >() -> Self {
32485 unsafe extern "system" fn Uri<
32486 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32487 const OFFSET: isize,
32488 >(
32489 this: *mut core::ffi::c_void,
32490 uri: *mut windows_core::PWSTR,
32491 ) -> windows_core::HRESULT {
32492 unsafe {
32493 let this: &Identity =
32494 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32495 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Uri(
32496 this,
32497 core::mem::transmute_copy(&uri),
32498 )
32499 .into()
32500 }
32501 }
32502 unsafe extern "system" fn Kind<
32503 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32504 const OFFSET: isize,
32505 >(
32506 this: *mut core::ffi::c_void,
32507 kind: *mut COREWEBVIEW2_SCRIPT_DIALOG_KIND,
32508 ) -> windows_core::HRESULT {
32509 unsafe {
32510 let this: &Identity =
32511 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32512 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Kind(
32513 this,
32514 core::mem::transmute_copy(&kind),
32515 )
32516 .into()
32517 }
32518 }
32519 unsafe extern "system" fn Message<
32520 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32521 const OFFSET: isize,
32522 >(
32523 this: *mut core::ffi::c_void,
32524 message: *mut windows_core::PWSTR,
32525 ) -> windows_core::HRESULT {
32526 unsafe {
32527 let this: &Identity =
32528 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32529 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Message(
32530 this,
32531 core::mem::transmute_copy(&message),
32532 )
32533 .into()
32534 }
32535 }
32536 unsafe extern "system" fn Accept<
32537 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32538 const OFFSET: isize,
32539 >(
32540 this: *mut core::ffi::c_void,
32541 ) -> windows_core::HRESULT {
32542 unsafe {
32543 let this: &Identity =
32544 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32545 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::Accept(this).into()
32546 }
32547 }
32548 unsafe extern "system" fn DefaultText<
32549 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32550 const OFFSET: isize,
32551 >(
32552 this: *mut core::ffi::c_void,
32553 defaulttext: *mut windows_core::PWSTR,
32554 ) -> windows_core::HRESULT {
32555 unsafe {
32556 let this: &Identity =
32557 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32558 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::DefaultText(
32559 this,
32560 core::mem::transmute_copy(&defaulttext),
32561 )
32562 .into()
32563 }
32564 }
32565 unsafe extern "system" fn ResultText<
32566 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32567 const OFFSET: isize,
32568 >(
32569 this: *mut core::ffi::c_void,
32570 resulttext: *mut windows_core::PWSTR,
32571 ) -> windows_core::HRESULT {
32572 unsafe {
32573 let this: &Identity =
32574 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32575 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::ResultText(
32576 this,
32577 core::mem::transmute_copy(&resulttext),
32578 )
32579 .into()
32580 }
32581 }
32582 unsafe extern "system" fn SetResultText<
32583 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32584 const OFFSET: isize,
32585 >(
32586 this: *mut core::ffi::c_void,
32587 resulttext: windows_core::PCWSTR,
32588 ) -> windows_core::HRESULT {
32589 unsafe {
32590 let this: &Identity =
32591 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32592 ICoreWebView2ScriptDialogOpeningEventArgs_Impl::SetResultText(
32593 this,
32594 core::mem::transmute(&resulttext),
32595 )
32596 .into()
32597 }
32598 }
32599 unsafe extern "system" fn GetDeferral<
32600 Identity: ICoreWebView2ScriptDialogOpeningEventArgs_Impl,
32601 const OFFSET: isize,
32602 >(
32603 this: *mut core::ffi::c_void,
32604 deferral: *mut *mut core::ffi::c_void,
32605 ) -> windows_core::HRESULT {
32606 unsafe {
32607 let this: &Identity =
32608 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32609 match ICoreWebView2ScriptDialogOpeningEventArgs_Impl::GetDeferral(this) {
32610 Ok(ok__) => {
32611 deferral.write(core::mem::transmute(ok__));
32612 windows_core::HRESULT(0)
32613 }
32614 Err(err) => err.into(),
32615 }
32616 }
32617 }
32618 Self {
32619 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
32620 Uri: Uri::<Identity, OFFSET>,
32621 Kind: Kind::<Identity, OFFSET>,
32622 Message: Message::<Identity, OFFSET>,
32623 Accept: Accept::<Identity, OFFSET>,
32624 DefaultText: DefaultText::<Identity, OFFSET>,
32625 ResultText: ResultText::<Identity, OFFSET>,
32626 SetResultText: SetResultText::<Identity, OFFSET>,
32627 GetDeferral: GetDeferral::<Identity, OFFSET>,
32628 }
32629 }
32630 pub fn matches(iid: &windows_core::GUID) -> bool {
32631 iid == &<ICoreWebView2ScriptDialogOpeningEventArgs as windows_core::Interface>::IID
32632 }
32633}
32634impl windows_core::RuntimeName for ICoreWebView2ScriptDialogOpeningEventArgs {}
32635windows_core::imp::define_interface!(
32636 ICoreWebView2ScriptDialogOpeningEventHandler,
32637 ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl,
32638 0xef381bf9_afa8_4e37_91c4_8ac48524bdfb
32639);
32640windows_core::imp::interface_hierarchy!(
32641 ICoreWebView2ScriptDialogOpeningEventHandler,
32642 windows_core::IUnknown
32643);
32644impl ICoreWebView2ScriptDialogOpeningEventHandler {
32645 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
32646 where
32647 P0: windows_core::Param<ICoreWebView2>,
32648 P1: windows_core::Param<ICoreWebView2ScriptDialogOpeningEventArgs>,
32649 {
32650 unsafe {
32651 (windows_core::Interface::vtable(self).Invoke)(
32652 windows_core::Interface::as_raw(self),
32653 sender.param().abi(),
32654 args.param().abi(),
32655 )
32656 .ok()
32657 }
32658 }
32659}
32660#[repr(C)]
32661pub struct ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
32662 pub base__: windows_core::IUnknown_Vtbl,
32663 pub Invoke: unsafe extern "system" fn(
32664 *mut core::ffi::c_void,
32665 *mut core::ffi::c_void,
32666 *mut core::ffi::c_void,
32667 ) -> windows_core::HRESULT,
32668}
32669pub trait ICoreWebView2ScriptDialogOpeningEventHandler_Impl: windows_core::IUnknownImpl {
32670 fn Invoke(
32671 &self,
32672 sender: windows_core::Ref<'_, ICoreWebView2>,
32673 args: windows_core::Ref<'_, ICoreWebView2ScriptDialogOpeningEventArgs>,
32674 ) -> windows_core::Result<()>;
32675}
32676impl ICoreWebView2ScriptDialogOpeningEventHandler_Vtbl {
32677 pub const fn new<
32678 Identity: ICoreWebView2ScriptDialogOpeningEventHandler_Impl,
32679 const OFFSET: isize,
32680 >() -> Self {
32681 unsafe extern "system" fn Invoke<
32682 Identity: ICoreWebView2ScriptDialogOpeningEventHandler_Impl,
32683 const OFFSET: isize,
32684 >(
32685 this: *mut core::ffi::c_void,
32686 sender: *mut core::ffi::c_void,
32687 args: *mut core::ffi::c_void,
32688 ) -> windows_core::HRESULT {
32689 unsafe {
32690 let this: &Identity =
32691 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32692 ICoreWebView2ScriptDialogOpeningEventHandler_Impl::Invoke(
32693 this,
32694 core::mem::transmute_copy(&sender),
32695 core::mem::transmute_copy(&args),
32696 )
32697 .into()
32698 }
32699 }
32700 Self {
32701 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
32702 Invoke: Invoke::<Identity, OFFSET>,
32703 }
32704 }
32705 pub fn matches(iid: &windows_core::GUID) -> bool {
32706 iid == &<ICoreWebView2ScriptDialogOpeningEventHandler as windows_core::Interface>::IID
32707 }
32708}
32709impl windows_core::RuntimeName for ICoreWebView2ScriptDialogOpeningEventHandler {}
32710windows_core::imp::define_interface!(
32711 ICoreWebView2ScriptException,
32712 ICoreWebView2ScriptException_Vtbl,
32713 0x054dae00_84a3_49ff_bc17_4012a90bc9fd
32714);
32715windows_core::imp::interface_hierarchy!(ICoreWebView2ScriptException, windows_core::IUnknown);
32716impl ICoreWebView2ScriptException {
32717 pub unsafe fn LineNumber(&self, value: *mut u32) -> windows_core::Result<()> {
32718 unsafe {
32719 (windows_core::Interface::vtable(self).LineNumber)(
32720 windows_core::Interface::as_raw(self),
32721 value as _,
32722 )
32723 .ok()
32724 }
32725 }
32726 pub unsafe fn ColumnNumber(&self, value: *mut u32) -> windows_core::Result<()> {
32727 unsafe {
32728 (windows_core::Interface::vtable(self).ColumnNumber)(
32729 windows_core::Interface::as_raw(self),
32730 value as _,
32731 )
32732 .ok()
32733 }
32734 }
32735 pub unsafe fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
32736 unsafe {
32737 (windows_core::Interface::vtable(self).Name)(
32738 windows_core::Interface::as_raw(self),
32739 value as _,
32740 )
32741 .ok()
32742 }
32743 }
32744 pub unsafe fn Message(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
32745 unsafe {
32746 (windows_core::Interface::vtable(self).Message)(
32747 windows_core::Interface::as_raw(self),
32748 value as _,
32749 )
32750 .ok()
32751 }
32752 }
32753 pub unsafe fn ToJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
32754 unsafe {
32755 (windows_core::Interface::vtable(self).ToJson)(
32756 windows_core::Interface::as_raw(self),
32757 value as _,
32758 )
32759 .ok()
32760 }
32761 }
32762}
32763#[repr(C)]
32764pub struct ICoreWebView2ScriptException_Vtbl {
32765 pub base__: windows_core::IUnknown_Vtbl,
32766 pub LineNumber:
32767 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
32768 pub ColumnNumber:
32769 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
32770 pub Name: unsafe extern "system" fn(
32771 *mut core::ffi::c_void,
32772 *mut windows_core::PWSTR,
32773 ) -> windows_core::HRESULT,
32774 pub Message: unsafe extern "system" fn(
32775 *mut core::ffi::c_void,
32776 *mut windows_core::PWSTR,
32777 ) -> windows_core::HRESULT,
32778 pub ToJson: unsafe extern "system" fn(
32779 *mut core::ffi::c_void,
32780 *mut windows_core::PWSTR,
32781 ) -> windows_core::HRESULT,
32782}
32783pub trait ICoreWebView2ScriptException_Impl: windows_core::IUnknownImpl {
32784 fn LineNumber(&self, value: *mut u32) -> windows_core::Result<()>;
32785 fn ColumnNumber(&self, value: *mut u32) -> windows_core::Result<()>;
32786 fn Name(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32787 fn Message(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32788 fn ToJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32789}
32790impl ICoreWebView2ScriptException_Vtbl {
32791 pub const fn new<Identity: ICoreWebView2ScriptException_Impl, const OFFSET: isize>() -> Self {
32792 unsafe extern "system" fn LineNumber<
32793 Identity: ICoreWebView2ScriptException_Impl,
32794 const OFFSET: isize,
32795 >(
32796 this: *mut core::ffi::c_void,
32797 value: *mut u32,
32798 ) -> windows_core::HRESULT {
32799 unsafe {
32800 let this: &Identity =
32801 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32802 ICoreWebView2ScriptException_Impl::LineNumber(
32803 this,
32804 core::mem::transmute_copy(&value),
32805 )
32806 .into()
32807 }
32808 }
32809 unsafe extern "system" fn ColumnNumber<
32810 Identity: ICoreWebView2ScriptException_Impl,
32811 const OFFSET: isize,
32812 >(
32813 this: *mut core::ffi::c_void,
32814 value: *mut u32,
32815 ) -> windows_core::HRESULT {
32816 unsafe {
32817 let this: &Identity =
32818 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32819 ICoreWebView2ScriptException_Impl::ColumnNumber(
32820 this,
32821 core::mem::transmute_copy(&value),
32822 )
32823 .into()
32824 }
32825 }
32826 unsafe extern "system" fn Name<
32827 Identity: ICoreWebView2ScriptException_Impl,
32828 const OFFSET: isize,
32829 >(
32830 this: *mut core::ffi::c_void,
32831 value: *mut windows_core::PWSTR,
32832 ) -> windows_core::HRESULT {
32833 unsafe {
32834 let this: &Identity =
32835 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32836 ICoreWebView2ScriptException_Impl::Name(this, core::mem::transmute_copy(&value))
32837 .into()
32838 }
32839 }
32840 unsafe extern "system" fn Message<
32841 Identity: ICoreWebView2ScriptException_Impl,
32842 const OFFSET: isize,
32843 >(
32844 this: *mut core::ffi::c_void,
32845 value: *mut windows_core::PWSTR,
32846 ) -> windows_core::HRESULT {
32847 unsafe {
32848 let this: &Identity =
32849 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32850 ICoreWebView2ScriptException_Impl::Message(this, core::mem::transmute_copy(&value))
32851 .into()
32852 }
32853 }
32854 unsafe extern "system" fn ToJson<
32855 Identity: ICoreWebView2ScriptException_Impl,
32856 const OFFSET: isize,
32857 >(
32858 this: *mut core::ffi::c_void,
32859 value: *mut windows_core::PWSTR,
32860 ) -> windows_core::HRESULT {
32861 unsafe {
32862 let this: &Identity =
32863 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
32864 ICoreWebView2ScriptException_Impl::ToJson(this, core::mem::transmute_copy(&value))
32865 .into()
32866 }
32867 }
32868 Self {
32869 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
32870 LineNumber: LineNumber::<Identity, OFFSET>,
32871 ColumnNumber: ColumnNumber::<Identity, OFFSET>,
32872 Name: Name::<Identity, OFFSET>,
32873 Message: Message::<Identity, OFFSET>,
32874 ToJson: ToJson::<Identity, OFFSET>,
32875 }
32876 }
32877 pub fn matches(iid: &windows_core::GUID) -> bool {
32878 iid == &<ICoreWebView2ScriptException as windows_core::Interface>::IID
32879 }
32880}
32881impl windows_core::RuntimeName for ICoreWebView2ScriptException {}
32882windows_core::imp::define_interface!(
32883 ICoreWebView2ServerCertificateErrorDetectedEventArgs,
32884 ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl,
32885 0x012193ed_7c13_48ff_969d_a84c1f432a14
32886);
32887windows_core::imp::interface_hierarchy!(
32888 ICoreWebView2ServerCertificateErrorDetectedEventArgs,
32889 windows_core::IUnknown
32890);
32891impl ICoreWebView2ServerCertificateErrorDetectedEventArgs {
32892 pub unsafe fn ErrorStatus(
32893 &self,
32894 value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
32895 ) -> windows_core::Result<()> {
32896 unsafe {
32897 (windows_core::Interface::vtable(self).ErrorStatus)(
32898 windows_core::Interface::as_raw(self),
32899 value as _,
32900 )
32901 .ok()
32902 }
32903 }
32904 pub unsafe fn RequestUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
32905 unsafe {
32906 (windows_core::Interface::vtable(self).RequestUri)(
32907 windows_core::Interface::as_raw(self),
32908 value as _,
32909 )
32910 .ok()
32911 }
32912 }
32913 pub unsafe fn ServerCertificate(&self) -> windows_core::Result<ICoreWebView2Certificate> {
32914 unsafe {
32915 let mut result__ = core::mem::zeroed();
32916 (windows_core::Interface::vtable(self).ServerCertificate)(
32917 windows_core::Interface::as_raw(self),
32918 &mut result__,
32919 )
32920 .and_then(|| windows_core::Type::from_abi(result__))
32921 }
32922 }
32923 pub unsafe fn Action(
32924 &self,
32925 value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
32926 ) -> windows_core::Result<()> {
32927 unsafe {
32928 (windows_core::Interface::vtable(self).Action)(
32929 windows_core::Interface::as_raw(self),
32930 value as _,
32931 )
32932 .ok()
32933 }
32934 }
32935 pub unsafe fn SetAction(
32936 &self,
32937 value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
32938 ) -> windows_core::Result<()> {
32939 unsafe {
32940 (windows_core::Interface::vtable(self).SetAction)(
32941 windows_core::Interface::as_raw(self),
32942 value,
32943 )
32944 .ok()
32945 }
32946 }
32947 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
32948 unsafe {
32949 let mut result__ = core::mem::zeroed();
32950 (windows_core::Interface::vtable(self).GetDeferral)(
32951 windows_core::Interface::as_raw(self),
32952 &mut result__,
32953 )
32954 .and_then(|| windows_core::Type::from_abi(result__))
32955 }
32956 }
32957}
32958#[repr(C)]
32959pub struct ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
32960 pub base__: windows_core::IUnknown_Vtbl,
32961 pub ErrorStatus: unsafe extern "system" fn(
32962 *mut core::ffi::c_void,
32963 *mut COREWEBVIEW2_WEB_ERROR_STATUS,
32964 ) -> windows_core::HRESULT,
32965 pub RequestUri: unsafe extern "system" fn(
32966 *mut core::ffi::c_void,
32967 *mut windows_core::PWSTR,
32968 ) -> windows_core::HRESULT,
32969 pub ServerCertificate: unsafe extern "system" fn(
32970 *mut core::ffi::c_void,
32971 *mut *mut core::ffi::c_void,
32972 ) -> windows_core::HRESULT,
32973 pub Action: unsafe extern "system" fn(
32974 *mut core::ffi::c_void,
32975 *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
32976 ) -> windows_core::HRESULT,
32977 pub SetAction: unsafe extern "system" fn(
32978 *mut core::ffi::c_void,
32979 COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
32980 ) -> windows_core::HRESULT,
32981 pub GetDeferral: unsafe extern "system" fn(
32982 *mut core::ffi::c_void,
32983 *mut *mut core::ffi::c_void,
32984 ) -> windows_core::HRESULT,
32985}
32986pub trait ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl:
32987 windows_core::IUnknownImpl
32988{
32989 fn ErrorStatus(&self, value: *mut COREWEBVIEW2_WEB_ERROR_STATUS) -> windows_core::Result<()>;
32990 fn RequestUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
32991 fn ServerCertificate(&self) -> windows_core::Result<ICoreWebView2Certificate>;
32992 fn Action(
32993 &self,
32994 value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
32995 ) -> windows_core::Result<()>;
32996 fn SetAction(
32997 &self,
32998 value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
32999 ) -> windows_core::Result<()>;
33000 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
33001}
33002impl ICoreWebView2ServerCertificateErrorDetectedEventArgs_Vtbl {
33003 pub const fn new<
33004 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33005 const OFFSET: isize,
33006 >() -> Self {
33007 unsafe extern "system" fn ErrorStatus<
33008 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33009 const OFFSET: isize,
33010 >(
33011 this: *mut core::ffi::c_void,
33012 value: *mut COREWEBVIEW2_WEB_ERROR_STATUS,
33013 ) -> windows_core::HRESULT {
33014 unsafe {
33015 let this: &Identity =
33016 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33017 ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::ErrorStatus(
33018 this,
33019 core::mem::transmute_copy(&value),
33020 )
33021 .into()
33022 }
33023 }
33024 unsafe extern "system" fn RequestUri<
33025 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33026 const OFFSET: isize,
33027 >(
33028 this: *mut core::ffi::c_void,
33029 value: *mut windows_core::PWSTR,
33030 ) -> windows_core::HRESULT {
33031 unsafe {
33032 let this: &Identity =
33033 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33034 ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::RequestUri(
33035 this,
33036 core::mem::transmute_copy(&value),
33037 )
33038 .into()
33039 }
33040 }
33041 unsafe extern "system" fn ServerCertificate<
33042 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33043 const OFFSET: isize,
33044 >(
33045 this: *mut core::ffi::c_void,
33046 value: *mut *mut core::ffi::c_void,
33047 ) -> windows_core::HRESULT {
33048 unsafe {
33049 let this: &Identity =
33050 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33051 match ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::ServerCertificate(
33052 this,
33053 ) {
33054 Ok(ok__) => {
33055 value.write(core::mem::transmute(ok__));
33056 windows_core::HRESULT(0)
33057 }
33058 Err(err) => err.into(),
33059 }
33060 }
33061 }
33062 unsafe extern "system" fn Action<
33063 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33064 const OFFSET: isize,
33065 >(
33066 this: *mut core::ffi::c_void,
33067 value: *mut COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
33068 ) -> windows_core::HRESULT {
33069 unsafe {
33070 let this: &Identity =
33071 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33072 ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::Action(
33073 this,
33074 core::mem::transmute_copy(&value),
33075 )
33076 .into()
33077 }
33078 }
33079 unsafe extern "system" fn SetAction<
33080 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33081 const OFFSET: isize,
33082 >(
33083 this: *mut core::ffi::c_void,
33084 value: COREWEBVIEW2_SERVER_CERTIFICATE_ERROR_ACTION,
33085 ) -> windows_core::HRESULT {
33086 unsafe {
33087 let this: &Identity =
33088 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33089 ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::SetAction(
33090 this,
33091 core::mem::transmute_copy(&value),
33092 )
33093 .into()
33094 }
33095 }
33096 unsafe extern "system" fn GetDeferral<
33097 Identity: ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl,
33098 const OFFSET: isize,
33099 >(
33100 this: *mut core::ffi::c_void,
33101 deferral: *mut *mut core::ffi::c_void,
33102 ) -> windows_core::HRESULT {
33103 unsafe {
33104 let this: &Identity =
33105 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33106 match ICoreWebView2ServerCertificateErrorDetectedEventArgs_Impl::GetDeferral(this) {
33107 Ok(ok__) => {
33108 deferral.write(core::mem::transmute(ok__));
33109 windows_core::HRESULT(0)
33110 }
33111 Err(err) => err.into(),
33112 }
33113 }
33114 }
33115 Self {
33116 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
33117 ErrorStatus: ErrorStatus::<Identity, OFFSET>,
33118 RequestUri: RequestUri::<Identity, OFFSET>,
33119 ServerCertificate: ServerCertificate::<Identity, OFFSET>,
33120 Action: Action::<Identity, OFFSET>,
33121 SetAction: SetAction::<Identity, OFFSET>,
33122 GetDeferral: GetDeferral::<Identity, OFFSET>,
33123 }
33124 }
33125 pub fn matches(iid: &windows_core::GUID) -> bool {
33126 iid == & < ICoreWebView2ServerCertificateErrorDetectedEventArgs as windows_core::Interface >::IID
33127 }
33128}
33129impl windows_core::RuntimeName for ICoreWebView2ServerCertificateErrorDetectedEventArgs {}
33130windows_core::imp::define_interface!(
33131 ICoreWebView2ServerCertificateErrorDetectedEventHandler,
33132 ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl,
33133 0x969b3a26_d85e_4795_8199_fef57344da22
33134);
33135windows_core::imp::interface_hierarchy!(
33136 ICoreWebView2ServerCertificateErrorDetectedEventHandler,
33137 windows_core::IUnknown
33138);
33139impl ICoreWebView2ServerCertificateErrorDetectedEventHandler {
33140 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
33141 where
33142 P0: windows_core::Param<ICoreWebView2>,
33143 P1: windows_core::Param<ICoreWebView2ServerCertificateErrorDetectedEventArgs>,
33144 {
33145 unsafe {
33146 (windows_core::Interface::vtable(self).Invoke)(
33147 windows_core::Interface::as_raw(self),
33148 sender.param().abi(),
33149 args.param().abi(),
33150 )
33151 .ok()
33152 }
33153 }
33154}
33155#[repr(C)]
33156pub struct ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
33157 pub base__: windows_core::IUnknown_Vtbl,
33158 pub Invoke: unsafe extern "system" fn(
33159 *mut core::ffi::c_void,
33160 *mut core::ffi::c_void,
33161 *mut core::ffi::c_void,
33162 ) -> windows_core::HRESULT,
33163}
33164pub trait ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl:
33165 windows_core::IUnknownImpl
33166{
33167 fn Invoke(
33168 &self,
33169 sender: windows_core::Ref<'_, ICoreWebView2>,
33170 args: windows_core::Ref<'_, ICoreWebView2ServerCertificateErrorDetectedEventArgs>,
33171 ) -> windows_core::Result<()>;
33172}
33173impl ICoreWebView2ServerCertificateErrorDetectedEventHandler_Vtbl {
33174 pub const fn new<
33175 Identity: ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl,
33176 const OFFSET: isize,
33177 >() -> Self {
33178 unsafe extern "system" fn Invoke<
33179 Identity: ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl,
33180 const OFFSET: isize,
33181 >(
33182 this: *mut core::ffi::c_void,
33183 sender: *mut core::ffi::c_void,
33184 args: *mut core::ffi::c_void,
33185 ) -> windows_core::HRESULT {
33186 unsafe {
33187 let this: &Identity =
33188 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33189 ICoreWebView2ServerCertificateErrorDetectedEventHandler_Impl::Invoke(
33190 this,
33191 core::mem::transmute_copy(&sender),
33192 core::mem::transmute_copy(&args),
33193 )
33194 .into()
33195 }
33196 }
33197 Self {
33198 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
33199 Invoke: Invoke::<Identity, OFFSET>,
33200 }
33201 }
33202 pub fn matches(iid: &windows_core::GUID) -> bool {
33203 iid == & < ICoreWebView2ServerCertificateErrorDetectedEventHandler as windows_core::Interface >::IID
33204 }
33205}
33206impl windows_core::RuntimeName for ICoreWebView2ServerCertificateErrorDetectedEventHandler {}
33207windows_core::imp::define_interface!(
33208 ICoreWebView2SetPermissionStateCompletedHandler,
33209 ICoreWebView2SetPermissionStateCompletedHandler_Vtbl,
33210 0xfc77fb30_9c9e_4076_b8c7_7644a703ca1b
33211);
33212windows_core::imp::interface_hierarchy!(
33213 ICoreWebView2SetPermissionStateCompletedHandler,
33214 windows_core::IUnknown
33215);
33216impl ICoreWebView2SetPermissionStateCompletedHandler {
33217 pub unsafe fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()> {
33218 unsafe {
33219 (windows_core::Interface::vtable(self).Invoke)(
33220 windows_core::Interface::as_raw(self),
33221 errorcode,
33222 )
33223 .ok()
33224 }
33225 }
33226}
33227#[repr(C)]
33228pub struct ICoreWebView2SetPermissionStateCompletedHandler_Vtbl {
33229 pub base__: windows_core::IUnknown_Vtbl,
33230 pub Invoke: unsafe extern "system" fn(
33231 *mut core::ffi::c_void,
33232 windows_core::HRESULT,
33233 ) -> windows_core::HRESULT,
33234}
33235pub trait ICoreWebView2SetPermissionStateCompletedHandler_Impl: windows_core::IUnknownImpl {
33236 fn Invoke(&self, errorcode: windows_core::HRESULT) -> windows_core::Result<()>;
33237}
33238impl ICoreWebView2SetPermissionStateCompletedHandler_Vtbl {
33239 pub const fn new<
33240 Identity: ICoreWebView2SetPermissionStateCompletedHandler_Impl,
33241 const OFFSET: isize,
33242 >() -> Self {
33243 unsafe extern "system" fn Invoke<
33244 Identity: ICoreWebView2SetPermissionStateCompletedHandler_Impl,
33245 const OFFSET: isize,
33246 >(
33247 this: *mut core::ffi::c_void,
33248 errorcode: windows_core::HRESULT,
33249 ) -> windows_core::HRESULT {
33250 unsafe {
33251 let this: &Identity =
33252 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33253 ICoreWebView2SetPermissionStateCompletedHandler_Impl::Invoke(
33254 this,
33255 core::mem::transmute_copy(&errorcode),
33256 )
33257 .into()
33258 }
33259 }
33260 Self {
33261 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
33262 Invoke: Invoke::<Identity, OFFSET>,
33263 }
33264 }
33265 pub fn matches(iid: &windows_core::GUID) -> bool {
33266 iid == &<ICoreWebView2SetPermissionStateCompletedHandler as windows_core::Interface>::IID
33267 }
33268}
33269impl windows_core::RuntimeName for ICoreWebView2SetPermissionStateCompletedHandler {}
33270windows_core::imp::define_interface!(
33271 ICoreWebView2Settings,
33272 ICoreWebView2Settings_Vtbl,
33273 0xe562e4f0_d7fa_43ac_8d71_c05150499f00
33274);
33275windows_core::imp::interface_hierarchy!(ICoreWebView2Settings, windows_core::IUnknown);
33276impl ICoreWebView2Settings {
33277 pub unsafe fn IsScriptEnabled(
33278 &self,
33279 isscriptenabled: *mut windows_core::BOOL,
33280 ) -> windows_core::Result<()> {
33281 unsafe {
33282 (windows_core::Interface::vtable(self).IsScriptEnabled)(
33283 windows_core::Interface::as_raw(self),
33284 isscriptenabled as _,
33285 )
33286 .ok()
33287 }
33288 }
33289 pub unsafe fn SetIsScriptEnabled(&self, isscriptenabled: bool) -> windows_core::Result<()> {
33290 unsafe {
33291 (windows_core::Interface::vtable(self).SetIsScriptEnabled)(
33292 windows_core::Interface::as_raw(self),
33293 isscriptenabled.into(),
33294 )
33295 .ok()
33296 }
33297 }
33298 pub unsafe fn IsWebMessageEnabled(
33299 &self,
33300 iswebmessageenabled: *mut windows_core::BOOL,
33301 ) -> windows_core::Result<()> {
33302 unsafe {
33303 (windows_core::Interface::vtable(self).IsWebMessageEnabled)(
33304 windows_core::Interface::as_raw(self),
33305 iswebmessageenabled as _,
33306 )
33307 .ok()
33308 }
33309 }
33310 pub unsafe fn SetIsWebMessageEnabled(
33311 &self,
33312 iswebmessageenabled: bool,
33313 ) -> windows_core::Result<()> {
33314 unsafe {
33315 (windows_core::Interface::vtable(self).SetIsWebMessageEnabled)(
33316 windows_core::Interface::as_raw(self),
33317 iswebmessageenabled.into(),
33318 )
33319 .ok()
33320 }
33321 }
33322 pub unsafe fn AreDefaultScriptDialogsEnabled(
33323 &self,
33324 aredefaultscriptdialogsenabled: *mut windows_core::BOOL,
33325 ) -> windows_core::Result<()> {
33326 unsafe {
33327 (windows_core::Interface::vtable(self).AreDefaultScriptDialogsEnabled)(
33328 windows_core::Interface::as_raw(self),
33329 aredefaultscriptdialogsenabled as _,
33330 )
33331 .ok()
33332 }
33333 }
33334 pub unsafe fn SetAreDefaultScriptDialogsEnabled(
33335 &self,
33336 aredefaultscriptdialogsenabled: bool,
33337 ) -> windows_core::Result<()> {
33338 unsafe {
33339 (windows_core::Interface::vtable(self).SetAreDefaultScriptDialogsEnabled)(
33340 windows_core::Interface::as_raw(self),
33341 aredefaultscriptdialogsenabled.into(),
33342 )
33343 .ok()
33344 }
33345 }
33346 pub unsafe fn IsStatusBarEnabled(
33347 &self,
33348 isstatusbarenabled: *mut windows_core::BOOL,
33349 ) -> windows_core::Result<()> {
33350 unsafe {
33351 (windows_core::Interface::vtable(self).IsStatusBarEnabled)(
33352 windows_core::Interface::as_raw(self),
33353 isstatusbarenabled as _,
33354 )
33355 .ok()
33356 }
33357 }
33358 pub unsafe fn SetIsStatusBarEnabled(
33359 &self,
33360 isstatusbarenabled: bool,
33361 ) -> windows_core::Result<()> {
33362 unsafe {
33363 (windows_core::Interface::vtable(self).SetIsStatusBarEnabled)(
33364 windows_core::Interface::as_raw(self),
33365 isstatusbarenabled.into(),
33366 )
33367 .ok()
33368 }
33369 }
33370 pub unsafe fn AreDevToolsEnabled(
33371 &self,
33372 aredevtoolsenabled: *mut windows_core::BOOL,
33373 ) -> windows_core::Result<()> {
33374 unsafe {
33375 (windows_core::Interface::vtable(self).AreDevToolsEnabled)(
33376 windows_core::Interface::as_raw(self),
33377 aredevtoolsenabled as _,
33378 )
33379 .ok()
33380 }
33381 }
33382 pub unsafe fn SetAreDevToolsEnabled(
33383 &self,
33384 aredevtoolsenabled: bool,
33385 ) -> windows_core::Result<()> {
33386 unsafe {
33387 (windows_core::Interface::vtable(self).SetAreDevToolsEnabled)(
33388 windows_core::Interface::as_raw(self),
33389 aredevtoolsenabled.into(),
33390 )
33391 .ok()
33392 }
33393 }
33394 pub unsafe fn AreDefaultContextMenusEnabled(
33395 &self,
33396 enabled: *mut windows_core::BOOL,
33397 ) -> windows_core::Result<()> {
33398 unsafe {
33399 (windows_core::Interface::vtable(self).AreDefaultContextMenusEnabled)(
33400 windows_core::Interface::as_raw(self),
33401 enabled as _,
33402 )
33403 .ok()
33404 }
33405 }
33406 pub unsafe fn SetAreDefaultContextMenusEnabled(
33407 &self,
33408 enabled: bool,
33409 ) -> windows_core::Result<()> {
33410 unsafe {
33411 (windows_core::Interface::vtable(self).SetAreDefaultContextMenusEnabled)(
33412 windows_core::Interface::as_raw(self),
33413 enabled.into(),
33414 )
33415 .ok()
33416 }
33417 }
33418 pub unsafe fn AreHostObjectsAllowed(
33419 &self,
33420 allowed: *mut windows_core::BOOL,
33421 ) -> windows_core::Result<()> {
33422 unsafe {
33423 (windows_core::Interface::vtable(self).AreHostObjectsAllowed)(
33424 windows_core::Interface::as_raw(self),
33425 allowed as _,
33426 )
33427 .ok()
33428 }
33429 }
33430 pub unsafe fn SetAreHostObjectsAllowed(&self, allowed: bool) -> windows_core::Result<()> {
33431 unsafe {
33432 (windows_core::Interface::vtable(self).SetAreHostObjectsAllowed)(
33433 windows_core::Interface::as_raw(self),
33434 allowed.into(),
33435 )
33436 .ok()
33437 }
33438 }
33439 pub unsafe fn IsZoomControlEnabled(
33440 &self,
33441 enabled: *mut windows_core::BOOL,
33442 ) -> windows_core::Result<()> {
33443 unsafe {
33444 (windows_core::Interface::vtable(self).IsZoomControlEnabled)(
33445 windows_core::Interface::as_raw(self),
33446 enabled as _,
33447 )
33448 .ok()
33449 }
33450 }
33451 pub unsafe fn SetIsZoomControlEnabled(&self, enabled: bool) -> windows_core::Result<()> {
33452 unsafe {
33453 (windows_core::Interface::vtable(self).SetIsZoomControlEnabled)(
33454 windows_core::Interface::as_raw(self),
33455 enabled.into(),
33456 )
33457 .ok()
33458 }
33459 }
33460 pub unsafe fn IsBuiltInErrorPageEnabled(
33461 &self,
33462 enabled: *mut windows_core::BOOL,
33463 ) -> windows_core::Result<()> {
33464 unsafe {
33465 (windows_core::Interface::vtable(self).IsBuiltInErrorPageEnabled)(
33466 windows_core::Interface::as_raw(self),
33467 enabled as _,
33468 )
33469 .ok()
33470 }
33471 }
33472 pub unsafe fn SetIsBuiltInErrorPageEnabled(&self, enabled: bool) -> windows_core::Result<()> {
33473 unsafe {
33474 (windows_core::Interface::vtable(self).SetIsBuiltInErrorPageEnabled)(
33475 windows_core::Interface::as_raw(self),
33476 enabled.into(),
33477 )
33478 .ok()
33479 }
33480 }
33481}
33482#[repr(C)]
33483pub struct ICoreWebView2Settings_Vtbl {
33484 pub base__: windows_core::IUnknown_Vtbl,
33485 pub IsScriptEnabled: unsafe extern "system" fn(
33486 *mut core::ffi::c_void,
33487 *mut windows_core::BOOL,
33488 ) -> windows_core::HRESULT,
33489 pub SetIsScriptEnabled: unsafe extern "system" fn(
33490 *mut core::ffi::c_void,
33491 windows_core::BOOL,
33492 ) -> windows_core::HRESULT,
33493 pub IsWebMessageEnabled: unsafe extern "system" fn(
33494 *mut core::ffi::c_void,
33495 *mut windows_core::BOOL,
33496 ) -> windows_core::HRESULT,
33497 pub SetIsWebMessageEnabled: unsafe extern "system" fn(
33498 *mut core::ffi::c_void,
33499 windows_core::BOOL,
33500 ) -> windows_core::HRESULT,
33501 pub AreDefaultScriptDialogsEnabled: unsafe extern "system" fn(
33502 *mut core::ffi::c_void,
33503 *mut windows_core::BOOL,
33504 ) -> windows_core::HRESULT,
33505 pub SetAreDefaultScriptDialogsEnabled: unsafe extern "system" fn(
33506 *mut core::ffi::c_void,
33507 windows_core::BOOL,
33508 ) -> windows_core::HRESULT,
33509 pub IsStatusBarEnabled: unsafe extern "system" fn(
33510 *mut core::ffi::c_void,
33511 *mut windows_core::BOOL,
33512 ) -> windows_core::HRESULT,
33513 pub SetIsStatusBarEnabled: unsafe extern "system" fn(
33514 *mut core::ffi::c_void,
33515 windows_core::BOOL,
33516 ) -> windows_core::HRESULT,
33517 pub AreDevToolsEnabled: unsafe extern "system" fn(
33518 *mut core::ffi::c_void,
33519 *mut windows_core::BOOL,
33520 ) -> windows_core::HRESULT,
33521 pub SetAreDevToolsEnabled: unsafe extern "system" fn(
33522 *mut core::ffi::c_void,
33523 windows_core::BOOL,
33524 ) -> windows_core::HRESULT,
33525 pub AreDefaultContextMenusEnabled: unsafe extern "system" fn(
33526 *mut core::ffi::c_void,
33527 *mut windows_core::BOOL,
33528 ) -> windows_core::HRESULT,
33529 pub SetAreDefaultContextMenusEnabled: unsafe extern "system" fn(
33530 *mut core::ffi::c_void,
33531 windows_core::BOOL,
33532 ) -> windows_core::HRESULT,
33533 pub AreHostObjectsAllowed: unsafe extern "system" fn(
33534 *mut core::ffi::c_void,
33535 *mut windows_core::BOOL,
33536 ) -> windows_core::HRESULT,
33537 pub SetAreHostObjectsAllowed: unsafe extern "system" fn(
33538 *mut core::ffi::c_void,
33539 windows_core::BOOL,
33540 ) -> windows_core::HRESULT,
33541 pub IsZoomControlEnabled: unsafe extern "system" fn(
33542 *mut core::ffi::c_void,
33543 *mut windows_core::BOOL,
33544 ) -> windows_core::HRESULT,
33545 pub SetIsZoomControlEnabled: unsafe extern "system" fn(
33546 *mut core::ffi::c_void,
33547 windows_core::BOOL,
33548 ) -> windows_core::HRESULT,
33549 pub IsBuiltInErrorPageEnabled: unsafe extern "system" fn(
33550 *mut core::ffi::c_void,
33551 *mut windows_core::BOOL,
33552 ) -> windows_core::HRESULT,
33553 pub SetIsBuiltInErrorPageEnabled: unsafe extern "system" fn(
33554 *mut core::ffi::c_void,
33555 windows_core::BOOL,
33556 ) -> windows_core::HRESULT,
33557}
33558pub trait ICoreWebView2Settings_Impl: windows_core::IUnknownImpl {
33559 fn IsScriptEnabled(&self, isscriptenabled: *mut windows_core::BOOL)
33560 -> windows_core::Result<()>;
33561 fn SetIsScriptEnabled(&self, isscriptenabled: windows_core::BOOL) -> windows_core::Result<()>;
33562 fn IsWebMessageEnabled(
33563 &self,
33564 iswebmessageenabled: *mut windows_core::BOOL,
33565 ) -> windows_core::Result<()>;
33566 fn SetIsWebMessageEnabled(
33567 &self,
33568 iswebmessageenabled: windows_core::BOOL,
33569 ) -> windows_core::Result<()>;
33570 fn AreDefaultScriptDialogsEnabled(
33571 &self,
33572 aredefaultscriptdialogsenabled: *mut windows_core::BOOL,
33573 ) -> windows_core::Result<()>;
33574 fn SetAreDefaultScriptDialogsEnabled(
33575 &self,
33576 aredefaultscriptdialogsenabled: windows_core::BOOL,
33577 ) -> windows_core::Result<()>;
33578 fn IsStatusBarEnabled(
33579 &self,
33580 isstatusbarenabled: *mut windows_core::BOOL,
33581 ) -> windows_core::Result<()>;
33582 fn SetIsStatusBarEnabled(
33583 &self,
33584 isstatusbarenabled: windows_core::BOOL,
33585 ) -> windows_core::Result<()>;
33586 fn AreDevToolsEnabled(
33587 &self,
33588 aredevtoolsenabled: *mut windows_core::BOOL,
33589 ) -> windows_core::Result<()>;
33590 fn SetAreDevToolsEnabled(
33591 &self,
33592 aredevtoolsenabled: windows_core::BOOL,
33593 ) -> windows_core::Result<()>;
33594 fn AreDefaultContextMenusEnabled(
33595 &self,
33596 enabled: *mut windows_core::BOOL,
33597 ) -> windows_core::Result<()>;
33598 fn SetAreDefaultContextMenusEnabled(
33599 &self,
33600 enabled: windows_core::BOOL,
33601 ) -> windows_core::Result<()>;
33602 fn AreHostObjectsAllowed(&self, allowed: *mut windows_core::BOOL) -> windows_core::Result<()>;
33603 fn SetAreHostObjectsAllowed(&self, allowed: windows_core::BOOL) -> windows_core::Result<()>;
33604 fn IsZoomControlEnabled(&self, enabled: *mut windows_core::BOOL) -> windows_core::Result<()>;
33605 fn SetIsZoomControlEnabled(&self, enabled: windows_core::BOOL) -> windows_core::Result<()>;
33606 fn IsBuiltInErrorPageEnabled(
33607 &self,
33608 enabled: *mut windows_core::BOOL,
33609 ) -> windows_core::Result<()>;
33610 fn SetIsBuiltInErrorPageEnabled(&self, enabled: windows_core::BOOL)
33611 -> windows_core::Result<()>;
33612}
33613impl ICoreWebView2Settings_Vtbl {
33614 pub const fn new<Identity: ICoreWebView2Settings_Impl, const OFFSET: isize>() -> Self {
33615 unsafe extern "system" fn IsScriptEnabled<
33616 Identity: ICoreWebView2Settings_Impl,
33617 const OFFSET: isize,
33618 >(
33619 this: *mut core::ffi::c_void,
33620 isscriptenabled: *mut windows_core::BOOL,
33621 ) -> windows_core::HRESULT {
33622 unsafe {
33623 let this: &Identity =
33624 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33625 ICoreWebView2Settings_Impl::IsScriptEnabled(
33626 this,
33627 core::mem::transmute_copy(&isscriptenabled),
33628 )
33629 .into()
33630 }
33631 }
33632 unsafe extern "system" fn SetIsScriptEnabled<
33633 Identity: ICoreWebView2Settings_Impl,
33634 const OFFSET: isize,
33635 >(
33636 this: *mut core::ffi::c_void,
33637 isscriptenabled: windows_core::BOOL,
33638 ) -> windows_core::HRESULT {
33639 unsafe {
33640 let this: &Identity =
33641 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33642 ICoreWebView2Settings_Impl::SetIsScriptEnabled(
33643 this,
33644 core::mem::transmute_copy(&isscriptenabled),
33645 )
33646 .into()
33647 }
33648 }
33649 unsafe extern "system" fn IsWebMessageEnabled<
33650 Identity: ICoreWebView2Settings_Impl,
33651 const OFFSET: isize,
33652 >(
33653 this: *mut core::ffi::c_void,
33654 iswebmessageenabled: *mut windows_core::BOOL,
33655 ) -> windows_core::HRESULT {
33656 unsafe {
33657 let this: &Identity =
33658 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33659 ICoreWebView2Settings_Impl::IsWebMessageEnabled(
33660 this,
33661 core::mem::transmute_copy(&iswebmessageenabled),
33662 )
33663 .into()
33664 }
33665 }
33666 unsafe extern "system" fn SetIsWebMessageEnabled<
33667 Identity: ICoreWebView2Settings_Impl,
33668 const OFFSET: isize,
33669 >(
33670 this: *mut core::ffi::c_void,
33671 iswebmessageenabled: windows_core::BOOL,
33672 ) -> windows_core::HRESULT {
33673 unsafe {
33674 let this: &Identity =
33675 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33676 ICoreWebView2Settings_Impl::SetIsWebMessageEnabled(
33677 this,
33678 core::mem::transmute_copy(&iswebmessageenabled),
33679 )
33680 .into()
33681 }
33682 }
33683 unsafe extern "system" fn AreDefaultScriptDialogsEnabled<
33684 Identity: ICoreWebView2Settings_Impl,
33685 const OFFSET: isize,
33686 >(
33687 this: *mut core::ffi::c_void,
33688 aredefaultscriptdialogsenabled: *mut windows_core::BOOL,
33689 ) -> windows_core::HRESULT {
33690 unsafe {
33691 let this: &Identity =
33692 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33693 ICoreWebView2Settings_Impl::AreDefaultScriptDialogsEnabled(
33694 this,
33695 core::mem::transmute_copy(&aredefaultscriptdialogsenabled),
33696 )
33697 .into()
33698 }
33699 }
33700 unsafe extern "system" fn SetAreDefaultScriptDialogsEnabled<
33701 Identity: ICoreWebView2Settings_Impl,
33702 const OFFSET: isize,
33703 >(
33704 this: *mut core::ffi::c_void,
33705 aredefaultscriptdialogsenabled: windows_core::BOOL,
33706 ) -> windows_core::HRESULT {
33707 unsafe {
33708 let this: &Identity =
33709 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33710 ICoreWebView2Settings_Impl::SetAreDefaultScriptDialogsEnabled(
33711 this,
33712 core::mem::transmute_copy(&aredefaultscriptdialogsenabled),
33713 )
33714 .into()
33715 }
33716 }
33717 unsafe extern "system" fn IsStatusBarEnabled<
33718 Identity: ICoreWebView2Settings_Impl,
33719 const OFFSET: isize,
33720 >(
33721 this: *mut core::ffi::c_void,
33722 isstatusbarenabled: *mut windows_core::BOOL,
33723 ) -> windows_core::HRESULT {
33724 unsafe {
33725 let this: &Identity =
33726 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33727 ICoreWebView2Settings_Impl::IsStatusBarEnabled(
33728 this,
33729 core::mem::transmute_copy(&isstatusbarenabled),
33730 )
33731 .into()
33732 }
33733 }
33734 unsafe extern "system" fn SetIsStatusBarEnabled<
33735 Identity: ICoreWebView2Settings_Impl,
33736 const OFFSET: isize,
33737 >(
33738 this: *mut core::ffi::c_void,
33739 isstatusbarenabled: windows_core::BOOL,
33740 ) -> windows_core::HRESULT {
33741 unsafe {
33742 let this: &Identity =
33743 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33744 ICoreWebView2Settings_Impl::SetIsStatusBarEnabled(
33745 this,
33746 core::mem::transmute_copy(&isstatusbarenabled),
33747 )
33748 .into()
33749 }
33750 }
33751 unsafe extern "system" fn AreDevToolsEnabled<
33752 Identity: ICoreWebView2Settings_Impl,
33753 const OFFSET: isize,
33754 >(
33755 this: *mut core::ffi::c_void,
33756 aredevtoolsenabled: *mut windows_core::BOOL,
33757 ) -> windows_core::HRESULT {
33758 unsafe {
33759 let this: &Identity =
33760 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33761 ICoreWebView2Settings_Impl::AreDevToolsEnabled(
33762 this,
33763 core::mem::transmute_copy(&aredevtoolsenabled),
33764 )
33765 .into()
33766 }
33767 }
33768 unsafe extern "system" fn SetAreDevToolsEnabled<
33769 Identity: ICoreWebView2Settings_Impl,
33770 const OFFSET: isize,
33771 >(
33772 this: *mut core::ffi::c_void,
33773 aredevtoolsenabled: windows_core::BOOL,
33774 ) -> windows_core::HRESULT {
33775 unsafe {
33776 let this: &Identity =
33777 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33778 ICoreWebView2Settings_Impl::SetAreDevToolsEnabled(
33779 this,
33780 core::mem::transmute_copy(&aredevtoolsenabled),
33781 )
33782 .into()
33783 }
33784 }
33785 unsafe extern "system" fn AreDefaultContextMenusEnabled<
33786 Identity: ICoreWebView2Settings_Impl,
33787 const OFFSET: isize,
33788 >(
33789 this: *mut core::ffi::c_void,
33790 enabled: *mut windows_core::BOOL,
33791 ) -> windows_core::HRESULT {
33792 unsafe {
33793 let this: &Identity =
33794 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33795 ICoreWebView2Settings_Impl::AreDefaultContextMenusEnabled(
33796 this,
33797 core::mem::transmute_copy(&enabled),
33798 )
33799 .into()
33800 }
33801 }
33802 unsafe extern "system" fn SetAreDefaultContextMenusEnabled<
33803 Identity: ICoreWebView2Settings_Impl,
33804 const OFFSET: isize,
33805 >(
33806 this: *mut core::ffi::c_void,
33807 enabled: windows_core::BOOL,
33808 ) -> windows_core::HRESULT {
33809 unsafe {
33810 let this: &Identity =
33811 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33812 ICoreWebView2Settings_Impl::SetAreDefaultContextMenusEnabled(
33813 this,
33814 core::mem::transmute_copy(&enabled),
33815 )
33816 .into()
33817 }
33818 }
33819 unsafe extern "system" fn AreHostObjectsAllowed<
33820 Identity: ICoreWebView2Settings_Impl,
33821 const OFFSET: isize,
33822 >(
33823 this: *mut core::ffi::c_void,
33824 allowed: *mut windows_core::BOOL,
33825 ) -> windows_core::HRESULT {
33826 unsafe {
33827 let this: &Identity =
33828 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33829 ICoreWebView2Settings_Impl::AreHostObjectsAllowed(
33830 this,
33831 core::mem::transmute_copy(&allowed),
33832 )
33833 .into()
33834 }
33835 }
33836 unsafe extern "system" fn SetAreHostObjectsAllowed<
33837 Identity: ICoreWebView2Settings_Impl,
33838 const OFFSET: isize,
33839 >(
33840 this: *mut core::ffi::c_void,
33841 allowed: windows_core::BOOL,
33842 ) -> windows_core::HRESULT {
33843 unsafe {
33844 let this: &Identity =
33845 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33846 ICoreWebView2Settings_Impl::SetAreHostObjectsAllowed(
33847 this,
33848 core::mem::transmute_copy(&allowed),
33849 )
33850 .into()
33851 }
33852 }
33853 unsafe extern "system" fn IsZoomControlEnabled<
33854 Identity: ICoreWebView2Settings_Impl,
33855 const OFFSET: isize,
33856 >(
33857 this: *mut core::ffi::c_void,
33858 enabled: *mut windows_core::BOOL,
33859 ) -> windows_core::HRESULT {
33860 unsafe {
33861 let this: &Identity =
33862 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33863 ICoreWebView2Settings_Impl::IsZoomControlEnabled(
33864 this,
33865 core::mem::transmute_copy(&enabled),
33866 )
33867 .into()
33868 }
33869 }
33870 unsafe extern "system" fn SetIsZoomControlEnabled<
33871 Identity: ICoreWebView2Settings_Impl,
33872 const OFFSET: isize,
33873 >(
33874 this: *mut core::ffi::c_void,
33875 enabled: windows_core::BOOL,
33876 ) -> windows_core::HRESULT {
33877 unsafe {
33878 let this: &Identity =
33879 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33880 ICoreWebView2Settings_Impl::SetIsZoomControlEnabled(
33881 this,
33882 core::mem::transmute_copy(&enabled),
33883 )
33884 .into()
33885 }
33886 }
33887 unsafe extern "system" fn IsBuiltInErrorPageEnabled<
33888 Identity: ICoreWebView2Settings_Impl,
33889 const OFFSET: isize,
33890 >(
33891 this: *mut core::ffi::c_void,
33892 enabled: *mut windows_core::BOOL,
33893 ) -> windows_core::HRESULT {
33894 unsafe {
33895 let this: &Identity =
33896 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33897 ICoreWebView2Settings_Impl::IsBuiltInErrorPageEnabled(
33898 this,
33899 core::mem::transmute_copy(&enabled),
33900 )
33901 .into()
33902 }
33903 }
33904 unsafe extern "system" fn SetIsBuiltInErrorPageEnabled<
33905 Identity: ICoreWebView2Settings_Impl,
33906 const OFFSET: isize,
33907 >(
33908 this: *mut core::ffi::c_void,
33909 enabled: windows_core::BOOL,
33910 ) -> windows_core::HRESULT {
33911 unsafe {
33912 let this: &Identity =
33913 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
33914 ICoreWebView2Settings_Impl::SetIsBuiltInErrorPageEnabled(
33915 this,
33916 core::mem::transmute_copy(&enabled),
33917 )
33918 .into()
33919 }
33920 }
33921 Self {
33922 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
33923 IsScriptEnabled: IsScriptEnabled::<Identity, OFFSET>,
33924 SetIsScriptEnabled: SetIsScriptEnabled::<Identity, OFFSET>,
33925 IsWebMessageEnabled: IsWebMessageEnabled::<Identity, OFFSET>,
33926 SetIsWebMessageEnabled: SetIsWebMessageEnabled::<Identity, OFFSET>,
33927 AreDefaultScriptDialogsEnabled: AreDefaultScriptDialogsEnabled::<Identity, OFFSET>,
33928 SetAreDefaultScriptDialogsEnabled: SetAreDefaultScriptDialogsEnabled::<Identity, OFFSET>,
33929 IsStatusBarEnabled: IsStatusBarEnabled::<Identity, OFFSET>,
33930 SetIsStatusBarEnabled: SetIsStatusBarEnabled::<Identity, OFFSET>,
33931 AreDevToolsEnabled: AreDevToolsEnabled::<Identity, OFFSET>,
33932 SetAreDevToolsEnabled: SetAreDevToolsEnabled::<Identity, OFFSET>,
33933 AreDefaultContextMenusEnabled: AreDefaultContextMenusEnabled::<Identity, OFFSET>,
33934 SetAreDefaultContextMenusEnabled: SetAreDefaultContextMenusEnabled::<Identity, OFFSET>,
33935 AreHostObjectsAllowed: AreHostObjectsAllowed::<Identity, OFFSET>,
33936 SetAreHostObjectsAllowed: SetAreHostObjectsAllowed::<Identity, OFFSET>,
33937 IsZoomControlEnabled: IsZoomControlEnabled::<Identity, OFFSET>,
33938 SetIsZoomControlEnabled: SetIsZoomControlEnabled::<Identity, OFFSET>,
33939 IsBuiltInErrorPageEnabled: IsBuiltInErrorPageEnabled::<Identity, OFFSET>,
33940 SetIsBuiltInErrorPageEnabled: SetIsBuiltInErrorPageEnabled::<Identity, OFFSET>,
33941 }
33942 }
33943 pub fn matches(iid: &windows_core::GUID) -> bool {
33944 iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
33945 }
33946}
33947impl windows_core::RuntimeName for ICoreWebView2Settings {}
33948windows_core::imp::define_interface!(
33949 ICoreWebView2Settings2,
33950 ICoreWebView2Settings2_Vtbl,
33951 0xee9a0f68_f46c_4e32_ac23_ef8cac224d2a
33952);
33953impl core::ops::Deref for ICoreWebView2Settings2 {
33954 type Target = ICoreWebView2Settings;
33955 fn deref(&self) -> &Self::Target {
33956 unsafe { core::mem::transmute(self) }
33957 }
33958}
33959windows_core::imp::interface_hierarchy!(
33960 ICoreWebView2Settings2,
33961 windows_core::IUnknown,
33962 ICoreWebView2Settings
33963);
33964impl ICoreWebView2Settings2 {
33965 pub unsafe fn UserAgent(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
33966 unsafe {
33967 (windows_core::Interface::vtable(self).UserAgent)(
33968 windows_core::Interface::as_raw(self),
33969 value as _,
33970 )
33971 .ok()
33972 }
33973 }
33974 pub unsafe fn SetUserAgent<P0>(&self, value: P0) -> windows_core::Result<()>
33975 where
33976 P0: windows_core::Param<windows_core::PCWSTR>,
33977 {
33978 unsafe {
33979 (windows_core::Interface::vtable(self).SetUserAgent)(
33980 windows_core::Interface::as_raw(self),
33981 value.param().abi(),
33982 )
33983 .ok()
33984 }
33985 }
33986}
33987#[repr(C)]
33988pub struct ICoreWebView2Settings2_Vtbl {
33989 pub base__: ICoreWebView2Settings_Vtbl,
33990 pub UserAgent: unsafe extern "system" fn(
33991 *mut core::ffi::c_void,
33992 *mut windows_core::PWSTR,
33993 ) -> windows_core::HRESULT,
33994 pub SetUserAgent: unsafe extern "system" fn(
33995 *mut core::ffi::c_void,
33996 windows_core::PCWSTR,
33997 ) -> windows_core::HRESULT,
33998}
33999pub trait ICoreWebView2Settings2_Impl: ICoreWebView2Settings_Impl {
34000 fn UserAgent(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
34001 fn SetUserAgent(&self, value: &windows_core::PCWSTR) -> windows_core::Result<()>;
34002}
34003impl ICoreWebView2Settings2_Vtbl {
34004 pub const fn new<Identity: ICoreWebView2Settings2_Impl, const OFFSET: isize>() -> Self {
34005 unsafe extern "system" fn UserAgent<
34006 Identity: ICoreWebView2Settings2_Impl,
34007 const OFFSET: isize,
34008 >(
34009 this: *mut core::ffi::c_void,
34010 value: *mut windows_core::PWSTR,
34011 ) -> windows_core::HRESULT {
34012 unsafe {
34013 let this: &Identity =
34014 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34015 ICoreWebView2Settings2_Impl::UserAgent(this, core::mem::transmute_copy(&value))
34016 .into()
34017 }
34018 }
34019 unsafe extern "system" fn SetUserAgent<
34020 Identity: ICoreWebView2Settings2_Impl,
34021 const OFFSET: isize,
34022 >(
34023 this: *mut core::ffi::c_void,
34024 value: windows_core::PCWSTR,
34025 ) -> windows_core::HRESULT {
34026 unsafe {
34027 let this: &Identity =
34028 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34029 ICoreWebView2Settings2_Impl::SetUserAgent(this, core::mem::transmute(&value)).into()
34030 }
34031 }
34032 Self {
34033 base__: ICoreWebView2Settings_Vtbl::new::<Identity, OFFSET>(),
34034 UserAgent: UserAgent::<Identity, OFFSET>,
34035 SetUserAgent: SetUserAgent::<Identity, OFFSET>,
34036 }
34037 }
34038 pub fn matches(iid: &windows_core::GUID) -> bool {
34039 iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34040 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34041 }
34042}
34043impl windows_core::RuntimeName for ICoreWebView2Settings2 {}
34044windows_core::imp::define_interface!(
34045 ICoreWebView2Settings3,
34046 ICoreWebView2Settings3_Vtbl,
34047 0xfdb5ab74_af33_4854_84f0_0a631deb5eba
34048);
34049impl core::ops::Deref for ICoreWebView2Settings3 {
34050 type Target = ICoreWebView2Settings2;
34051 fn deref(&self) -> &Self::Target {
34052 unsafe { core::mem::transmute(self) }
34053 }
34054}
34055windows_core::imp::interface_hierarchy!(
34056 ICoreWebView2Settings3,
34057 windows_core::IUnknown,
34058 ICoreWebView2Settings,
34059 ICoreWebView2Settings2
34060);
34061impl ICoreWebView2Settings3 {
34062 pub unsafe fn AreBrowserAcceleratorKeysEnabled(
34063 &self,
34064 value: *mut windows_core::BOOL,
34065 ) -> windows_core::Result<()> {
34066 unsafe {
34067 (windows_core::Interface::vtable(self).AreBrowserAcceleratorKeysEnabled)(
34068 windows_core::Interface::as_raw(self),
34069 value as _,
34070 )
34071 .ok()
34072 }
34073 }
34074 pub unsafe fn SetAreBrowserAcceleratorKeysEnabled(
34075 &self,
34076 value: bool,
34077 ) -> windows_core::Result<()> {
34078 unsafe {
34079 (windows_core::Interface::vtable(self).SetAreBrowserAcceleratorKeysEnabled)(
34080 windows_core::Interface::as_raw(self),
34081 value.into(),
34082 )
34083 .ok()
34084 }
34085 }
34086}
34087#[repr(C)]
34088pub struct ICoreWebView2Settings3_Vtbl {
34089 pub base__: ICoreWebView2Settings2_Vtbl,
34090 pub AreBrowserAcceleratorKeysEnabled: unsafe extern "system" fn(
34091 *mut core::ffi::c_void,
34092 *mut windows_core::BOOL,
34093 ) -> windows_core::HRESULT,
34094 pub SetAreBrowserAcceleratorKeysEnabled: unsafe extern "system" fn(
34095 *mut core::ffi::c_void,
34096 windows_core::BOOL,
34097 )
34098 -> windows_core::HRESULT,
34099}
34100pub trait ICoreWebView2Settings3_Impl: ICoreWebView2Settings2_Impl {
34101 fn AreBrowserAcceleratorKeysEnabled(
34102 &self,
34103 value: *mut windows_core::BOOL,
34104 ) -> windows_core::Result<()>;
34105 fn SetAreBrowserAcceleratorKeysEnabled(
34106 &self,
34107 value: windows_core::BOOL,
34108 ) -> windows_core::Result<()>;
34109}
34110impl ICoreWebView2Settings3_Vtbl {
34111 pub const fn new<Identity: ICoreWebView2Settings3_Impl, const OFFSET: isize>() -> Self {
34112 unsafe extern "system" fn AreBrowserAcceleratorKeysEnabled<
34113 Identity: ICoreWebView2Settings3_Impl,
34114 const OFFSET: isize,
34115 >(
34116 this: *mut core::ffi::c_void,
34117 value: *mut windows_core::BOOL,
34118 ) -> windows_core::HRESULT {
34119 unsafe {
34120 let this: &Identity =
34121 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34122 ICoreWebView2Settings3_Impl::AreBrowserAcceleratorKeysEnabled(
34123 this,
34124 core::mem::transmute_copy(&value),
34125 )
34126 .into()
34127 }
34128 }
34129 unsafe extern "system" fn SetAreBrowserAcceleratorKeysEnabled<
34130 Identity: ICoreWebView2Settings3_Impl,
34131 const OFFSET: isize,
34132 >(
34133 this: *mut core::ffi::c_void,
34134 value: windows_core::BOOL,
34135 ) -> windows_core::HRESULT {
34136 unsafe {
34137 let this: &Identity =
34138 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34139 ICoreWebView2Settings3_Impl::SetAreBrowserAcceleratorKeysEnabled(
34140 this,
34141 core::mem::transmute_copy(&value),
34142 )
34143 .into()
34144 }
34145 }
34146 Self {
34147 base__: ICoreWebView2Settings2_Vtbl::new::<Identity, OFFSET>(),
34148 AreBrowserAcceleratorKeysEnabled: AreBrowserAcceleratorKeysEnabled::<Identity, OFFSET>,
34149 SetAreBrowserAcceleratorKeysEnabled: SetAreBrowserAcceleratorKeysEnabled::<
34150 Identity,
34151 OFFSET,
34152 >,
34153 }
34154 }
34155 pub fn matches(iid: &windows_core::GUID) -> bool {
34156 iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34157 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34158 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34159 }
34160}
34161impl windows_core::RuntimeName for ICoreWebView2Settings3 {}
34162windows_core::imp::define_interface!(
34163 ICoreWebView2Settings4,
34164 ICoreWebView2Settings4_Vtbl,
34165 0xcb56846c_4168_4d53_b04f_03b6d6796ff2
34166);
34167impl core::ops::Deref for ICoreWebView2Settings4 {
34168 type Target = ICoreWebView2Settings3;
34169 fn deref(&self) -> &Self::Target {
34170 unsafe { core::mem::transmute(self) }
34171 }
34172}
34173windows_core::imp::interface_hierarchy!(
34174 ICoreWebView2Settings4,
34175 windows_core::IUnknown,
34176 ICoreWebView2Settings,
34177 ICoreWebView2Settings2,
34178 ICoreWebView2Settings3
34179);
34180impl ICoreWebView2Settings4 {
34181 pub unsafe fn IsPasswordAutosaveEnabled(
34182 &self,
34183 value: *mut windows_core::BOOL,
34184 ) -> windows_core::Result<()> {
34185 unsafe {
34186 (windows_core::Interface::vtable(self).IsPasswordAutosaveEnabled)(
34187 windows_core::Interface::as_raw(self),
34188 value as _,
34189 )
34190 .ok()
34191 }
34192 }
34193 pub unsafe fn SetIsPasswordAutosaveEnabled(&self, value: bool) -> windows_core::Result<()> {
34194 unsafe {
34195 (windows_core::Interface::vtable(self).SetIsPasswordAutosaveEnabled)(
34196 windows_core::Interface::as_raw(self),
34197 value.into(),
34198 )
34199 .ok()
34200 }
34201 }
34202 pub unsafe fn IsGeneralAutofillEnabled(
34203 &self,
34204 value: *mut windows_core::BOOL,
34205 ) -> windows_core::Result<()> {
34206 unsafe {
34207 (windows_core::Interface::vtable(self).IsGeneralAutofillEnabled)(
34208 windows_core::Interface::as_raw(self),
34209 value as _,
34210 )
34211 .ok()
34212 }
34213 }
34214 pub unsafe fn SetIsGeneralAutofillEnabled(&self, value: bool) -> windows_core::Result<()> {
34215 unsafe {
34216 (windows_core::Interface::vtable(self).SetIsGeneralAutofillEnabled)(
34217 windows_core::Interface::as_raw(self),
34218 value.into(),
34219 )
34220 .ok()
34221 }
34222 }
34223}
34224#[repr(C)]
34225pub struct ICoreWebView2Settings4_Vtbl {
34226 pub base__: ICoreWebView2Settings3_Vtbl,
34227 pub IsPasswordAutosaveEnabled: unsafe extern "system" fn(
34228 *mut core::ffi::c_void,
34229 *mut windows_core::BOOL,
34230 ) -> windows_core::HRESULT,
34231 pub SetIsPasswordAutosaveEnabled: unsafe extern "system" fn(
34232 *mut core::ffi::c_void,
34233 windows_core::BOOL,
34234 ) -> windows_core::HRESULT,
34235 pub IsGeneralAutofillEnabled: unsafe extern "system" fn(
34236 *mut core::ffi::c_void,
34237 *mut windows_core::BOOL,
34238 ) -> windows_core::HRESULT,
34239 pub SetIsGeneralAutofillEnabled: unsafe extern "system" fn(
34240 *mut core::ffi::c_void,
34241 windows_core::BOOL,
34242 ) -> windows_core::HRESULT,
34243}
34244pub trait ICoreWebView2Settings4_Impl: ICoreWebView2Settings3_Impl {
34245 fn IsPasswordAutosaveEnabled(&self, value: *mut windows_core::BOOL)
34246 -> windows_core::Result<()>;
34247 fn SetIsPasswordAutosaveEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
34248 fn IsGeneralAutofillEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
34249 fn SetIsGeneralAutofillEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
34250}
34251impl ICoreWebView2Settings4_Vtbl {
34252 pub const fn new<Identity: ICoreWebView2Settings4_Impl, const OFFSET: isize>() -> Self {
34253 unsafe extern "system" fn IsPasswordAutosaveEnabled<
34254 Identity: ICoreWebView2Settings4_Impl,
34255 const OFFSET: isize,
34256 >(
34257 this: *mut core::ffi::c_void,
34258 value: *mut windows_core::BOOL,
34259 ) -> windows_core::HRESULT {
34260 unsafe {
34261 let this: &Identity =
34262 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34263 ICoreWebView2Settings4_Impl::IsPasswordAutosaveEnabled(
34264 this,
34265 core::mem::transmute_copy(&value),
34266 )
34267 .into()
34268 }
34269 }
34270 unsafe extern "system" fn SetIsPasswordAutosaveEnabled<
34271 Identity: ICoreWebView2Settings4_Impl,
34272 const OFFSET: isize,
34273 >(
34274 this: *mut core::ffi::c_void,
34275 value: windows_core::BOOL,
34276 ) -> windows_core::HRESULT {
34277 unsafe {
34278 let this: &Identity =
34279 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34280 ICoreWebView2Settings4_Impl::SetIsPasswordAutosaveEnabled(
34281 this,
34282 core::mem::transmute_copy(&value),
34283 )
34284 .into()
34285 }
34286 }
34287 unsafe extern "system" fn IsGeneralAutofillEnabled<
34288 Identity: ICoreWebView2Settings4_Impl,
34289 const OFFSET: isize,
34290 >(
34291 this: *mut core::ffi::c_void,
34292 value: *mut windows_core::BOOL,
34293 ) -> windows_core::HRESULT {
34294 unsafe {
34295 let this: &Identity =
34296 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34297 ICoreWebView2Settings4_Impl::IsGeneralAutofillEnabled(
34298 this,
34299 core::mem::transmute_copy(&value),
34300 )
34301 .into()
34302 }
34303 }
34304 unsafe extern "system" fn SetIsGeneralAutofillEnabled<
34305 Identity: ICoreWebView2Settings4_Impl,
34306 const OFFSET: isize,
34307 >(
34308 this: *mut core::ffi::c_void,
34309 value: windows_core::BOOL,
34310 ) -> windows_core::HRESULT {
34311 unsafe {
34312 let this: &Identity =
34313 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34314 ICoreWebView2Settings4_Impl::SetIsGeneralAutofillEnabled(
34315 this,
34316 core::mem::transmute_copy(&value),
34317 )
34318 .into()
34319 }
34320 }
34321 Self {
34322 base__: ICoreWebView2Settings3_Vtbl::new::<Identity, OFFSET>(),
34323 IsPasswordAutosaveEnabled: IsPasswordAutosaveEnabled::<Identity, OFFSET>,
34324 SetIsPasswordAutosaveEnabled: SetIsPasswordAutosaveEnabled::<Identity, OFFSET>,
34325 IsGeneralAutofillEnabled: IsGeneralAutofillEnabled::<Identity, OFFSET>,
34326 SetIsGeneralAutofillEnabled: SetIsGeneralAutofillEnabled::<Identity, OFFSET>,
34327 }
34328 }
34329 pub fn matches(iid: &windows_core::GUID) -> bool {
34330 iid == &<ICoreWebView2Settings4 as windows_core::Interface>::IID
34331 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34332 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34333 || iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34334 }
34335}
34336impl windows_core::RuntimeName for ICoreWebView2Settings4 {}
34337windows_core::imp::define_interface!(
34338 ICoreWebView2Settings5,
34339 ICoreWebView2Settings5_Vtbl,
34340 0x183e7052_1d03_43a0_ab99_98e043b66b39
34341);
34342impl core::ops::Deref for ICoreWebView2Settings5 {
34343 type Target = ICoreWebView2Settings4;
34344 fn deref(&self) -> &Self::Target {
34345 unsafe { core::mem::transmute(self) }
34346 }
34347}
34348windows_core::imp::interface_hierarchy!(
34349 ICoreWebView2Settings5,
34350 windows_core::IUnknown,
34351 ICoreWebView2Settings,
34352 ICoreWebView2Settings2,
34353 ICoreWebView2Settings3,
34354 ICoreWebView2Settings4
34355);
34356impl ICoreWebView2Settings5 {
34357 pub unsafe fn IsPinchZoomEnabled(
34358 &self,
34359 value: *mut windows_core::BOOL,
34360 ) -> windows_core::Result<()> {
34361 unsafe {
34362 (windows_core::Interface::vtable(self).IsPinchZoomEnabled)(
34363 windows_core::Interface::as_raw(self),
34364 value as _,
34365 )
34366 .ok()
34367 }
34368 }
34369 pub unsafe fn SetIsPinchZoomEnabled(&self, value: bool) -> windows_core::Result<()> {
34370 unsafe {
34371 (windows_core::Interface::vtable(self).SetIsPinchZoomEnabled)(
34372 windows_core::Interface::as_raw(self),
34373 value.into(),
34374 )
34375 .ok()
34376 }
34377 }
34378}
34379#[repr(C)]
34380pub struct ICoreWebView2Settings5_Vtbl {
34381 pub base__: ICoreWebView2Settings4_Vtbl,
34382 pub IsPinchZoomEnabled: unsafe extern "system" fn(
34383 *mut core::ffi::c_void,
34384 *mut windows_core::BOOL,
34385 ) -> windows_core::HRESULT,
34386 pub SetIsPinchZoomEnabled: unsafe extern "system" fn(
34387 *mut core::ffi::c_void,
34388 windows_core::BOOL,
34389 ) -> windows_core::HRESULT,
34390}
34391pub trait ICoreWebView2Settings5_Impl: ICoreWebView2Settings4_Impl {
34392 fn IsPinchZoomEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
34393 fn SetIsPinchZoomEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
34394}
34395impl ICoreWebView2Settings5_Vtbl {
34396 pub const fn new<Identity: ICoreWebView2Settings5_Impl, const OFFSET: isize>() -> Self {
34397 unsafe extern "system" fn IsPinchZoomEnabled<
34398 Identity: ICoreWebView2Settings5_Impl,
34399 const OFFSET: isize,
34400 >(
34401 this: *mut core::ffi::c_void,
34402 value: *mut windows_core::BOOL,
34403 ) -> windows_core::HRESULT {
34404 unsafe {
34405 let this: &Identity =
34406 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34407 ICoreWebView2Settings5_Impl::IsPinchZoomEnabled(
34408 this,
34409 core::mem::transmute_copy(&value),
34410 )
34411 .into()
34412 }
34413 }
34414 unsafe extern "system" fn SetIsPinchZoomEnabled<
34415 Identity: ICoreWebView2Settings5_Impl,
34416 const OFFSET: isize,
34417 >(
34418 this: *mut core::ffi::c_void,
34419 value: windows_core::BOOL,
34420 ) -> windows_core::HRESULT {
34421 unsafe {
34422 let this: &Identity =
34423 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34424 ICoreWebView2Settings5_Impl::SetIsPinchZoomEnabled(
34425 this,
34426 core::mem::transmute_copy(&value),
34427 )
34428 .into()
34429 }
34430 }
34431 Self {
34432 base__: ICoreWebView2Settings4_Vtbl::new::<Identity, OFFSET>(),
34433 IsPinchZoomEnabled: IsPinchZoomEnabled::<Identity, OFFSET>,
34434 SetIsPinchZoomEnabled: SetIsPinchZoomEnabled::<Identity, OFFSET>,
34435 }
34436 }
34437 pub fn matches(iid: &windows_core::GUID) -> bool {
34438 iid == &<ICoreWebView2Settings5 as windows_core::Interface>::IID
34439 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34440 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34441 || iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34442 || iid == &<ICoreWebView2Settings4 as windows_core::Interface>::IID
34443 }
34444}
34445impl windows_core::RuntimeName for ICoreWebView2Settings5 {}
34446windows_core::imp::define_interface!(
34447 ICoreWebView2Settings6,
34448 ICoreWebView2Settings6_Vtbl,
34449 0x11cb3acd_9bc8_43b8_83bf_f40753714f87
34450);
34451impl core::ops::Deref for ICoreWebView2Settings6 {
34452 type Target = ICoreWebView2Settings5;
34453 fn deref(&self) -> &Self::Target {
34454 unsafe { core::mem::transmute(self) }
34455 }
34456}
34457windows_core::imp::interface_hierarchy!(
34458 ICoreWebView2Settings6,
34459 windows_core::IUnknown,
34460 ICoreWebView2Settings,
34461 ICoreWebView2Settings2,
34462 ICoreWebView2Settings3,
34463 ICoreWebView2Settings4,
34464 ICoreWebView2Settings5
34465);
34466impl ICoreWebView2Settings6 {
34467 pub unsafe fn IsSwipeNavigationEnabled(
34468 &self,
34469 value: *mut windows_core::BOOL,
34470 ) -> windows_core::Result<()> {
34471 unsafe {
34472 (windows_core::Interface::vtable(self).IsSwipeNavigationEnabled)(
34473 windows_core::Interface::as_raw(self),
34474 value as _,
34475 )
34476 .ok()
34477 }
34478 }
34479 pub unsafe fn SetIsSwipeNavigationEnabled(&self, value: bool) -> windows_core::Result<()> {
34480 unsafe {
34481 (windows_core::Interface::vtable(self).SetIsSwipeNavigationEnabled)(
34482 windows_core::Interface::as_raw(self),
34483 value.into(),
34484 )
34485 .ok()
34486 }
34487 }
34488}
34489#[repr(C)]
34490pub struct ICoreWebView2Settings6_Vtbl {
34491 pub base__: ICoreWebView2Settings5_Vtbl,
34492 pub IsSwipeNavigationEnabled: unsafe extern "system" fn(
34493 *mut core::ffi::c_void,
34494 *mut windows_core::BOOL,
34495 ) -> windows_core::HRESULT,
34496 pub SetIsSwipeNavigationEnabled: unsafe extern "system" fn(
34497 *mut core::ffi::c_void,
34498 windows_core::BOOL,
34499 ) -> windows_core::HRESULT,
34500}
34501pub trait ICoreWebView2Settings6_Impl: ICoreWebView2Settings5_Impl {
34502 fn IsSwipeNavigationEnabled(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
34503 fn SetIsSwipeNavigationEnabled(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
34504}
34505impl ICoreWebView2Settings6_Vtbl {
34506 pub const fn new<Identity: ICoreWebView2Settings6_Impl, const OFFSET: isize>() -> Self {
34507 unsafe extern "system" fn IsSwipeNavigationEnabled<
34508 Identity: ICoreWebView2Settings6_Impl,
34509 const OFFSET: isize,
34510 >(
34511 this: *mut core::ffi::c_void,
34512 value: *mut windows_core::BOOL,
34513 ) -> windows_core::HRESULT {
34514 unsafe {
34515 let this: &Identity =
34516 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34517 ICoreWebView2Settings6_Impl::IsSwipeNavigationEnabled(
34518 this,
34519 core::mem::transmute_copy(&value),
34520 )
34521 .into()
34522 }
34523 }
34524 unsafe extern "system" fn SetIsSwipeNavigationEnabled<
34525 Identity: ICoreWebView2Settings6_Impl,
34526 const OFFSET: isize,
34527 >(
34528 this: *mut core::ffi::c_void,
34529 value: windows_core::BOOL,
34530 ) -> windows_core::HRESULT {
34531 unsafe {
34532 let this: &Identity =
34533 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34534 ICoreWebView2Settings6_Impl::SetIsSwipeNavigationEnabled(
34535 this,
34536 core::mem::transmute_copy(&value),
34537 )
34538 .into()
34539 }
34540 }
34541 Self {
34542 base__: ICoreWebView2Settings5_Vtbl::new::<Identity, OFFSET>(),
34543 IsSwipeNavigationEnabled: IsSwipeNavigationEnabled::<Identity, OFFSET>,
34544 SetIsSwipeNavigationEnabled: SetIsSwipeNavigationEnabled::<Identity, OFFSET>,
34545 }
34546 }
34547 pub fn matches(iid: &windows_core::GUID) -> bool {
34548 iid == &<ICoreWebView2Settings6 as windows_core::Interface>::IID
34549 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34550 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34551 || iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34552 || iid == &<ICoreWebView2Settings4 as windows_core::Interface>::IID
34553 || iid == &<ICoreWebView2Settings5 as windows_core::Interface>::IID
34554 }
34555}
34556impl windows_core::RuntimeName for ICoreWebView2Settings6 {}
34557windows_core::imp::define_interface!(
34558 ICoreWebView2Settings7,
34559 ICoreWebView2Settings7_Vtbl,
34560 0x488dc902_35ef_42d2_bc7d_94b65c4bc49c
34561);
34562impl core::ops::Deref for ICoreWebView2Settings7 {
34563 type Target = ICoreWebView2Settings6;
34564 fn deref(&self) -> &Self::Target {
34565 unsafe { core::mem::transmute(self) }
34566 }
34567}
34568windows_core::imp::interface_hierarchy!(
34569 ICoreWebView2Settings7,
34570 windows_core::IUnknown,
34571 ICoreWebView2Settings,
34572 ICoreWebView2Settings2,
34573 ICoreWebView2Settings3,
34574 ICoreWebView2Settings4,
34575 ICoreWebView2Settings5,
34576 ICoreWebView2Settings6
34577);
34578impl ICoreWebView2Settings7 {
34579 pub unsafe fn HiddenPdfToolbarItems(
34580 &self,
34581 value: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34582 ) -> windows_core::Result<()> {
34583 unsafe {
34584 (windows_core::Interface::vtable(self).HiddenPdfToolbarItems)(
34585 windows_core::Interface::as_raw(self),
34586 value as _,
34587 )
34588 .ok()
34589 }
34590 }
34591 pub unsafe fn SetHiddenPdfToolbarItems(
34592 &self,
34593 value: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34594 ) -> windows_core::Result<()> {
34595 unsafe {
34596 (windows_core::Interface::vtable(self).SetHiddenPdfToolbarItems)(
34597 windows_core::Interface::as_raw(self),
34598 value,
34599 )
34600 .ok()
34601 }
34602 }
34603}
34604#[repr(C)]
34605pub struct ICoreWebView2Settings7_Vtbl {
34606 pub base__: ICoreWebView2Settings6_Vtbl,
34607 pub HiddenPdfToolbarItems: unsafe extern "system" fn(
34608 *mut core::ffi::c_void,
34609 *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34610 ) -> windows_core::HRESULT,
34611 pub SetHiddenPdfToolbarItems: unsafe extern "system" fn(
34612 *mut core::ffi::c_void,
34613 COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34614 ) -> windows_core::HRESULT,
34615}
34616pub trait ICoreWebView2Settings7_Impl: ICoreWebView2Settings6_Impl {
34617 fn HiddenPdfToolbarItems(
34618 &self,
34619 value: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34620 ) -> windows_core::Result<()>;
34621 fn SetHiddenPdfToolbarItems(
34622 &self,
34623 value: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34624 ) -> windows_core::Result<()>;
34625}
34626impl ICoreWebView2Settings7_Vtbl {
34627 pub const fn new<Identity: ICoreWebView2Settings7_Impl, const OFFSET: isize>() -> Self {
34628 unsafe extern "system" fn HiddenPdfToolbarItems<
34629 Identity: ICoreWebView2Settings7_Impl,
34630 const OFFSET: isize,
34631 >(
34632 this: *mut core::ffi::c_void,
34633 value: *mut COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34634 ) -> windows_core::HRESULT {
34635 unsafe {
34636 let this: &Identity =
34637 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34638 ICoreWebView2Settings7_Impl::HiddenPdfToolbarItems(
34639 this,
34640 core::mem::transmute_copy(&value),
34641 )
34642 .into()
34643 }
34644 }
34645 unsafe extern "system" fn SetHiddenPdfToolbarItems<
34646 Identity: ICoreWebView2Settings7_Impl,
34647 const OFFSET: isize,
34648 >(
34649 this: *mut core::ffi::c_void,
34650 value: COREWEBVIEW2_PDF_TOOLBAR_ITEMS,
34651 ) -> windows_core::HRESULT {
34652 unsafe {
34653 let this: &Identity =
34654 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34655 ICoreWebView2Settings7_Impl::SetHiddenPdfToolbarItems(
34656 this,
34657 core::mem::transmute_copy(&value),
34658 )
34659 .into()
34660 }
34661 }
34662 Self {
34663 base__: ICoreWebView2Settings6_Vtbl::new::<Identity, OFFSET>(),
34664 HiddenPdfToolbarItems: HiddenPdfToolbarItems::<Identity, OFFSET>,
34665 SetHiddenPdfToolbarItems: SetHiddenPdfToolbarItems::<Identity, OFFSET>,
34666 }
34667 }
34668 pub fn matches(iid: &windows_core::GUID) -> bool {
34669 iid == &<ICoreWebView2Settings7 as windows_core::Interface>::IID
34670 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34671 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34672 || iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34673 || iid == &<ICoreWebView2Settings4 as windows_core::Interface>::IID
34674 || iid == &<ICoreWebView2Settings5 as windows_core::Interface>::IID
34675 || iid == &<ICoreWebView2Settings6 as windows_core::Interface>::IID
34676 }
34677}
34678impl windows_core::RuntimeName for ICoreWebView2Settings7 {}
34679windows_core::imp::define_interface!(
34680 ICoreWebView2Settings8,
34681 ICoreWebView2Settings8_Vtbl,
34682 0x9e6b0e8f_86ad_4e81_8147_a9b5edb68650
34683);
34684impl core::ops::Deref for ICoreWebView2Settings8 {
34685 type Target = ICoreWebView2Settings7;
34686 fn deref(&self) -> &Self::Target {
34687 unsafe { core::mem::transmute(self) }
34688 }
34689}
34690windows_core::imp::interface_hierarchy!(
34691 ICoreWebView2Settings8,
34692 windows_core::IUnknown,
34693 ICoreWebView2Settings,
34694 ICoreWebView2Settings2,
34695 ICoreWebView2Settings3,
34696 ICoreWebView2Settings4,
34697 ICoreWebView2Settings5,
34698 ICoreWebView2Settings6,
34699 ICoreWebView2Settings7
34700);
34701impl ICoreWebView2Settings8 {
34702 pub unsafe fn IsReputationCheckingRequired(
34703 &self,
34704 value: *mut windows_core::BOOL,
34705 ) -> windows_core::Result<()> {
34706 unsafe {
34707 (windows_core::Interface::vtable(self).IsReputationCheckingRequired)(
34708 windows_core::Interface::as_raw(self),
34709 value as _,
34710 )
34711 .ok()
34712 }
34713 }
34714 pub unsafe fn SetIsReputationCheckingRequired(&self, value: bool) -> windows_core::Result<()> {
34715 unsafe {
34716 (windows_core::Interface::vtable(self).SetIsReputationCheckingRequired)(
34717 windows_core::Interface::as_raw(self),
34718 value.into(),
34719 )
34720 .ok()
34721 }
34722 }
34723}
34724#[repr(C)]
34725pub struct ICoreWebView2Settings8_Vtbl {
34726 pub base__: ICoreWebView2Settings7_Vtbl,
34727 pub IsReputationCheckingRequired: unsafe extern "system" fn(
34728 *mut core::ffi::c_void,
34729 *mut windows_core::BOOL,
34730 ) -> windows_core::HRESULT,
34731 pub SetIsReputationCheckingRequired: unsafe extern "system" fn(
34732 *mut core::ffi::c_void,
34733 windows_core::BOOL,
34734 ) -> windows_core::HRESULT,
34735}
34736pub trait ICoreWebView2Settings8_Impl: ICoreWebView2Settings7_Impl {
34737 fn IsReputationCheckingRequired(
34738 &self,
34739 value: *mut windows_core::BOOL,
34740 ) -> windows_core::Result<()>;
34741 fn SetIsReputationCheckingRequired(
34742 &self,
34743 value: windows_core::BOOL,
34744 ) -> windows_core::Result<()>;
34745}
34746impl ICoreWebView2Settings8_Vtbl {
34747 pub const fn new<Identity: ICoreWebView2Settings8_Impl, const OFFSET: isize>() -> Self {
34748 unsafe extern "system" fn IsReputationCheckingRequired<
34749 Identity: ICoreWebView2Settings8_Impl,
34750 const OFFSET: isize,
34751 >(
34752 this: *mut core::ffi::c_void,
34753 value: *mut windows_core::BOOL,
34754 ) -> windows_core::HRESULT {
34755 unsafe {
34756 let this: &Identity =
34757 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34758 ICoreWebView2Settings8_Impl::IsReputationCheckingRequired(
34759 this,
34760 core::mem::transmute_copy(&value),
34761 )
34762 .into()
34763 }
34764 }
34765 unsafe extern "system" fn SetIsReputationCheckingRequired<
34766 Identity: ICoreWebView2Settings8_Impl,
34767 const OFFSET: isize,
34768 >(
34769 this: *mut core::ffi::c_void,
34770 value: windows_core::BOOL,
34771 ) -> windows_core::HRESULT {
34772 unsafe {
34773 let this: &Identity =
34774 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34775 ICoreWebView2Settings8_Impl::SetIsReputationCheckingRequired(
34776 this,
34777 core::mem::transmute_copy(&value),
34778 )
34779 .into()
34780 }
34781 }
34782 Self {
34783 base__: ICoreWebView2Settings7_Vtbl::new::<Identity, OFFSET>(),
34784 IsReputationCheckingRequired: IsReputationCheckingRequired::<Identity, OFFSET>,
34785 SetIsReputationCheckingRequired: SetIsReputationCheckingRequired::<Identity, OFFSET>,
34786 }
34787 }
34788 pub fn matches(iid: &windows_core::GUID) -> bool {
34789 iid == &<ICoreWebView2Settings8 as windows_core::Interface>::IID
34790 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34791 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34792 || iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34793 || iid == &<ICoreWebView2Settings4 as windows_core::Interface>::IID
34794 || iid == &<ICoreWebView2Settings5 as windows_core::Interface>::IID
34795 || iid == &<ICoreWebView2Settings6 as windows_core::Interface>::IID
34796 || iid == &<ICoreWebView2Settings7 as windows_core::Interface>::IID
34797 }
34798}
34799impl windows_core::RuntimeName for ICoreWebView2Settings8 {}
34800windows_core::imp::define_interface!(
34801 ICoreWebView2Settings9,
34802 ICoreWebView2Settings9_Vtbl,
34803 0x0528a73b_e92d_49f4_927a_e547dddaa37d
34804);
34805impl core::ops::Deref for ICoreWebView2Settings9 {
34806 type Target = ICoreWebView2Settings8;
34807 fn deref(&self) -> &Self::Target {
34808 unsafe { core::mem::transmute(self) }
34809 }
34810}
34811windows_core::imp::interface_hierarchy!(
34812 ICoreWebView2Settings9,
34813 windows_core::IUnknown,
34814 ICoreWebView2Settings,
34815 ICoreWebView2Settings2,
34816 ICoreWebView2Settings3,
34817 ICoreWebView2Settings4,
34818 ICoreWebView2Settings5,
34819 ICoreWebView2Settings6,
34820 ICoreWebView2Settings7,
34821 ICoreWebView2Settings8
34822);
34823impl ICoreWebView2Settings9 {
34824 pub unsafe fn IsNonClientRegionSupportEnabled(
34825 &self,
34826 value: *mut windows_core::BOOL,
34827 ) -> windows_core::Result<()> {
34828 unsafe {
34829 (windows_core::Interface::vtable(self).IsNonClientRegionSupportEnabled)(
34830 windows_core::Interface::as_raw(self),
34831 value as _,
34832 )
34833 .ok()
34834 }
34835 }
34836 pub unsafe fn SetIsNonClientRegionSupportEnabled(
34837 &self,
34838 value: bool,
34839 ) -> windows_core::Result<()> {
34840 unsafe {
34841 (windows_core::Interface::vtable(self).SetIsNonClientRegionSupportEnabled)(
34842 windows_core::Interface::as_raw(self),
34843 value.into(),
34844 )
34845 .ok()
34846 }
34847 }
34848}
34849#[repr(C)]
34850pub struct ICoreWebView2Settings9_Vtbl {
34851 pub base__: ICoreWebView2Settings8_Vtbl,
34852 pub IsNonClientRegionSupportEnabled: unsafe extern "system" fn(
34853 *mut core::ffi::c_void,
34854 *mut windows_core::BOOL,
34855 ) -> windows_core::HRESULT,
34856 pub SetIsNonClientRegionSupportEnabled: unsafe extern "system" fn(
34857 *mut core::ffi::c_void,
34858 windows_core::BOOL,
34859 ) -> windows_core::HRESULT,
34860}
34861pub trait ICoreWebView2Settings9_Impl: ICoreWebView2Settings8_Impl {
34862 fn IsNonClientRegionSupportEnabled(
34863 &self,
34864 value: *mut windows_core::BOOL,
34865 ) -> windows_core::Result<()>;
34866 fn SetIsNonClientRegionSupportEnabled(
34867 &self,
34868 value: windows_core::BOOL,
34869 ) -> windows_core::Result<()>;
34870}
34871impl ICoreWebView2Settings9_Vtbl {
34872 pub const fn new<Identity: ICoreWebView2Settings9_Impl, const OFFSET: isize>() -> Self {
34873 unsafe extern "system" fn IsNonClientRegionSupportEnabled<
34874 Identity: ICoreWebView2Settings9_Impl,
34875 const OFFSET: isize,
34876 >(
34877 this: *mut core::ffi::c_void,
34878 value: *mut windows_core::BOOL,
34879 ) -> windows_core::HRESULT {
34880 unsafe {
34881 let this: &Identity =
34882 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34883 ICoreWebView2Settings9_Impl::IsNonClientRegionSupportEnabled(
34884 this,
34885 core::mem::transmute_copy(&value),
34886 )
34887 .into()
34888 }
34889 }
34890 unsafe extern "system" fn SetIsNonClientRegionSupportEnabled<
34891 Identity: ICoreWebView2Settings9_Impl,
34892 const OFFSET: isize,
34893 >(
34894 this: *mut core::ffi::c_void,
34895 value: windows_core::BOOL,
34896 ) -> windows_core::HRESULT {
34897 unsafe {
34898 let this: &Identity =
34899 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
34900 ICoreWebView2Settings9_Impl::SetIsNonClientRegionSupportEnabled(
34901 this,
34902 core::mem::transmute_copy(&value),
34903 )
34904 .into()
34905 }
34906 }
34907 Self {
34908 base__: ICoreWebView2Settings8_Vtbl::new::<Identity, OFFSET>(),
34909 IsNonClientRegionSupportEnabled: IsNonClientRegionSupportEnabled::<Identity, OFFSET>,
34910 SetIsNonClientRegionSupportEnabled: SetIsNonClientRegionSupportEnabled::<
34911 Identity,
34912 OFFSET,
34913 >,
34914 }
34915 }
34916 pub fn matches(iid: &windows_core::GUID) -> bool {
34917 iid == &<ICoreWebView2Settings9 as windows_core::Interface>::IID
34918 || iid == &<ICoreWebView2Settings as windows_core::Interface>::IID
34919 || iid == &<ICoreWebView2Settings2 as windows_core::Interface>::IID
34920 || iid == &<ICoreWebView2Settings3 as windows_core::Interface>::IID
34921 || iid == &<ICoreWebView2Settings4 as windows_core::Interface>::IID
34922 || iid == &<ICoreWebView2Settings5 as windows_core::Interface>::IID
34923 || iid == &<ICoreWebView2Settings6 as windows_core::Interface>::IID
34924 || iid == &<ICoreWebView2Settings7 as windows_core::Interface>::IID
34925 || iid == &<ICoreWebView2Settings8 as windows_core::Interface>::IID
34926 }
34927}
34928impl windows_core::RuntimeName for ICoreWebView2Settings9 {}
34929windows_core::imp::define_interface!(
34930 ICoreWebView2SharedBuffer,
34931 ICoreWebView2SharedBuffer_Vtbl,
34932 0xb747a495_0c6f_449e_97b8_2f81e9d6ab43
34933);
34934windows_core::imp::interface_hierarchy!(ICoreWebView2SharedBuffer, windows_core::IUnknown);
34935impl ICoreWebView2SharedBuffer {
34936 pub unsafe fn Size(&self, value: *mut u64) -> windows_core::Result<()> {
34937 unsafe {
34938 (windows_core::Interface::vtable(self).Size)(
34939 windows_core::Interface::as_raw(self),
34940 value as _,
34941 )
34942 .ok()
34943 }
34944 }
34945 pub unsafe fn Buffer(&self, value: *mut *mut u8) -> windows_core::Result<()> {
34946 unsafe {
34947 (windows_core::Interface::vtable(self).Buffer)(
34948 windows_core::Interface::as_raw(self),
34949 value as _,
34950 )
34951 .ok()
34952 }
34953 }
34954 pub unsafe fn OpenStream(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
34955 unsafe {
34956 let mut result__ = core::mem::zeroed();
34957 (windows_core::Interface::vtable(self).OpenStream)(
34958 windows_core::Interface::as_raw(self),
34959 &mut result__,
34960 )
34961 .and_then(|| windows_core::Type::from_abi(result__))
34962 }
34963 }
34964 pub unsafe fn FileMappingHandle(
34965 &self,
34966 value: *mut windows::Win32::Foundation::HANDLE,
34967 ) -> windows_core::Result<()> {
34968 unsafe {
34969 (windows_core::Interface::vtable(self).FileMappingHandle)(
34970 windows_core::Interface::as_raw(self),
34971 value as _,
34972 )
34973 .ok()
34974 }
34975 }
34976 pub unsafe fn Close(&self) -> windows_core::Result<()> {
34977 unsafe {
34978 (windows_core::Interface::vtable(self).Close)(windows_core::Interface::as_raw(self))
34979 .ok()
34980 }
34981 }
34982}
34983#[repr(C)]
34984pub struct ICoreWebView2SharedBuffer_Vtbl {
34985 pub base__: windows_core::IUnknown_Vtbl,
34986 pub Size: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u64) -> windows_core::HRESULT,
34987 pub Buffer:
34988 unsafe extern "system" fn(*mut core::ffi::c_void, *mut *mut u8) -> windows_core::HRESULT,
34989 pub OpenStream: unsafe extern "system" fn(
34990 *mut core::ffi::c_void,
34991 *mut *mut core::ffi::c_void,
34992 ) -> windows_core::HRESULT,
34993 pub FileMappingHandle: unsafe extern "system" fn(
34994 *mut core::ffi::c_void,
34995 *mut windows::Win32::Foundation::HANDLE,
34996 ) -> windows_core::HRESULT,
34997 pub Close: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
34998}
34999pub trait ICoreWebView2SharedBuffer_Impl: windows_core::IUnknownImpl {
35000 fn Size(&self, value: *mut u64) -> windows_core::Result<()>;
35001 fn Buffer(&self, value: *mut *mut u8) -> windows_core::Result<()>;
35002 fn OpenStream(&self) -> windows_core::Result<windows::Win32::System::Com::IStream>;
35003 fn FileMappingHandle(
35004 &self,
35005 value: *mut windows::Win32::Foundation::HANDLE,
35006 ) -> windows_core::Result<()>;
35007 fn Close(&self) -> windows_core::Result<()>;
35008}
35009impl ICoreWebView2SharedBuffer_Vtbl {
35010 pub const fn new<Identity: ICoreWebView2SharedBuffer_Impl, const OFFSET: isize>() -> Self {
35011 unsafe extern "system" fn Size<
35012 Identity: ICoreWebView2SharedBuffer_Impl,
35013 const OFFSET: isize,
35014 >(
35015 this: *mut core::ffi::c_void,
35016 value: *mut u64,
35017 ) -> windows_core::HRESULT {
35018 unsafe {
35019 let this: &Identity =
35020 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35021 ICoreWebView2SharedBuffer_Impl::Size(this, core::mem::transmute_copy(&value)).into()
35022 }
35023 }
35024 unsafe extern "system" fn Buffer<
35025 Identity: ICoreWebView2SharedBuffer_Impl,
35026 const OFFSET: isize,
35027 >(
35028 this: *mut core::ffi::c_void,
35029 value: *mut *mut u8,
35030 ) -> windows_core::HRESULT {
35031 unsafe {
35032 let this: &Identity =
35033 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35034 ICoreWebView2SharedBuffer_Impl::Buffer(this, core::mem::transmute_copy(&value))
35035 .into()
35036 }
35037 }
35038 unsafe extern "system" fn OpenStream<
35039 Identity: ICoreWebView2SharedBuffer_Impl,
35040 const OFFSET: isize,
35041 >(
35042 this: *mut core::ffi::c_void,
35043 value: *mut *mut core::ffi::c_void,
35044 ) -> windows_core::HRESULT {
35045 unsafe {
35046 let this: &Identity =
35047 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35048 match ICoreWebView2SharedBuffer_Impl::OpenStream(this) {
35049 Ok(ok__) => {
35050 value.write(core::mem::transmute(ok__));
35051 windows_core::HRESULT(0)
35052 }
35053 Err(err) => err.into(),
35054 }
35055 }
35056 }
35057 unsafe extern "system" fn FileMappingHandle<
35058 Identity: ICoreWebView2SharedBuffer_Impl,
35059 const OFFSET: isize,
35060 >(
35061 this: *mut core::ffi::c_void,
35062 value: *mut windows::Win32::Foundation::HANDLE,
35063 ) -> windows_core::HRESULT {
35064 unsafe {
35065 let this: &Identity =
35066 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35067 ICoreWebView2SharedBuffer_Impl::FileMappingHandle(
35068 this,
35069 core::mem::transmute_copy(&value),
35070 )
35071 .into()
35072 }
35073 }
35074 unsafe extern "system" fn Close<
35075 Identity: ICoreWebView2SharedBuffer_Impl,
35076 const OFFSET: isize,
35077 >(
35078 this: *mut core::ffi::c_void,
35079 ) -> windows_core::HRESULT {
35080 unsafe {
35081 let this: &Identity =
35082 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35083 ICoreWebView2SharedBuffer_Impl::Close(this).into()
35084 }
35085 }
35086 Self {
35087 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35088 Size: Size::<Identity, OFFSET>,
35089 Buffer: Buffer::<Identity, OFFSET>,
35090 OpenStream: OpenStream::<Identity, OFFSET>,
35091 FileMappingHandle: FileMappingHandle::<Identity, OFFSET>,
35092 Close: Close::<Identity, OFFSET>,
35093 }
35094 }
35095 pub fn matches(iid: &windows_core::GUID) -> bool {
35096 iid == &<ICoreWebView2SharedBuffer as windows_core::Interface>::IID
35097 }
35098}
35099impl windows_core::RuntimeName for ICoreWebView2SharedBuffer {}
35100windows_core::imp::define_interface!(
35101 ICoreWebView2ShowSaveAsUICompletedHandler,
35102 ICoreWebView2ShowSaveAsUICompletedHandler_Vtbl,
35103 0xe24b07e3_8169_5c34_994a_7f6478946a3c
35104);
35105windows_core::imp::interface_hierarchy!(
35106 ICoreWebView2ShowSaveAsUICompletedHandler,
35107 windows_core::IUnknown
35108);
35109impl ICoreWebView2ShowSaveAsUICompletedHandler {
35110 pub unsafe fn Invoke(
35111 &self,
35112 errorcode: windows_core::HRESULT,
35113 result: COREWEBVIEW2_SAVE_AS_UI_RESULT,
35114 ) -> windows_core::Result<()> {
35115 unsafe {
35116 (windows_core::Interface::vtable(self).Invoke)(
35117 windows_core::Interface::as_raw(self),
35118 errorcode,
35119 result,
35120 )
35121 .ok()
35122 }
35123 }
35124}
35125#[repr(C)]
35126pub struct ICoreWebView2ShowSaveAsUICompletedHandler_Vtbl {
35127 pub base__: windows_core::IUnknown_Vtbl,
35128 pub Invoke: unsafe extern "system" fn(
35129 *mut core::ffi::c_void,
35130 windows_core::HRESULT,
35131 COREWEBVIEW2_SAVE_AS_UI_RESULT,
35132 ) -> windows_core::HRESULT,
35133}
35134pub trait ICoreWebView2ShowSaveAsUICompletedHandler_Impl: windows_core::IUnknownImpl {
35135 fn Invoke(
35136 &self,
35137 errorcode: windows_core::HRESULT,
35138 result: COREWEBVIEW2_SAVE_AS_UI_RESULT,
35139 ) -> windows_core::Result<()>;
35140}
35141impl ICoreWebView2ShowSaveAsUICompletedHandler_Vtbl {
35142 pub const fn new<
35143 Identity: ICoreWebView2ShowSaveAsUICompletedHandler_Impl,
35144 const OFFSET: isize,
35145 >() -> Self {
35146 unsafe extern "system" fn Invoke<
35147 Identity: ICoreWebView2ShowSaveAsUICompletedHandler_Impl,
35148 const OFFSET: isize,
35149 >(
35150 this: *mut core::ffi::c_void,
35151 errorcode: windows_core::HRESULT,
35152 result: COREWEBVIEW2_SAVE_AS_UI_RESULT,
35153 ) -> windows_core::HRESULT {
35154 unsafe {
35155 let this: &Identity =
35156 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35157 ICoreWebView2ShowSaveAsUICompletedHandler_Impl::Invoke(
35158 this,
35159 core::mem::transmute_copy(&errorcode),
35160 core::mem::transmute_copy(&result),
35161 )
35162 .into()
35163 }
35164 }
35165 Self {
35166 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35167 Invoke: Invoke::<Identity, OFFSET>,
35168 }
35169 }
35170 pub fn matches(iid: &windows_core::GUID) -> bool {
35171 iid == &<ICoreWebView2ShowSaveAsUICompletedHandler as windows_core::Interface>::IID
35172 }
35173}
35174impl windows_core::RuntimeName for ICoreWebView2ShowSaveAsUICompletedHandler {}
35175windows_core::imp::define_interface!(
35176 ICoreWebView2SourceChangedEventArgs,
35177 ICoreWebView2SourceChangedEventArgs_Vtbl,
35178 0x31e0e545_1dba_4266_8914_f63848a1f7d7
35179);
35180windows_core::imp::interface_hierarchy!(
35181 ICoreWebView2SourceChangedEventArgs,
35182 windows_core::IUnknown
35183);
35184impl ICoreWebView2SourceChangedEventArgs {
35185 pub unsafe fn IsNewDocument(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
35186 unsafe {
35187 (windows_core::Interface::vtable(self).IsNewDocument)(
35188 windows_core::Interface::as_raw(self),
35189 value as _,
35190 )
35191 .ok()
35192 }
35193 }
35194}
35195#[repr(C)]
35196pub struct ICoreWebView2SourceChangedEventArgs_Vtbl {
35197 pub base__: windows_core::IUnknown_Vtbl,
35198 pub IsNewDocument: unsafe extern "system" fn(
35199 *mut core::ffi::c_void,
35200 *mut windows_core::BOOL,
35201 ) -> windows_core::HRESULT,
35202}
35203pub trait ICoreWebView2SourceChangedEventArgs_Impl: windows_core::IUnknownImpl {
35204 fn IsNewDocument(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
35205}
35206impl ICoreWebView2SourceChangedEventArgs_Vtbl {
35207 pub const fn new<Identity: ICoreWebView2SourceChangedEventArgs_Impl, const OFFSET: isize>(
35208 ) -> Self {
35209 unsafe extern "system" fn IsNewDocument<
35210 Identity: ICoreWebView2SourceChangedEventArgs_Impl,
35211 const OFFSET: isize,
35212 >(
35213 this: *mut core::ffi::c_void,
35214 value: *mut windows_core::BOOL,
35215 ) -> windows_core::HRESULT {
35216 unsafe {
35217 let this: &Identity =
35218 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35219 ICoreWebView2SourceChangedEventArgs_Impl::IsNewDocument(
35220 this,
35221 core::mem::transmute_copy(&value),
35222 )
35223 .into()
35224 }
35225 }
35226 Self {
35227 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35228 IsNewDocument: IsNewDocument::<Identity, OFFSET>,
35229 }
35230 }
35231 pub fn matches(iid: &windows_core::GUID) -> bool {
35232 iid == &<ICoreWebView2SourceChangedEventArgs as windows_core::Interface>::IID
35233 }
35234}
35235impl windows_core::RuntimeName for ICoreWebView2SourceChangedEventArgs {}
35236windows_core::imp::define_interface!(
35237 ICoreWebView2SourceChangedEventHandler,
35238 ICoreWebView2SourceChangedEventHandler_Vtbl,
35239 0x3c067f9f_5388_4772_8b48_79f7ef1ab37c
35240);
35241windows_core::imp::interface_hierarchy!(
35242 ICoreWebView2SourceChangedEventHandler,
35243 windows_core::IUnknown
35244);
35245impl ICoreWebView2SourceChangedEventHandler {
35246 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
35247 where
35248 P0: windows_core::Param<ICoreWebView2>,
35249 P1: windows_core::Param<ICoreWebView2SourceChangedEventArgs>,
35250 {
35251 unsafe {
35252 (windows_core::Interface::vtable(self).Invoke)(
35253 windows_core::Interface::as_raw(self),
35254 sender.param().abi(),
35255 args.param().abi(),
35256 )
35257 .ok()
35258 }
35259 }
35260}
35261#[repr(C)]
35262pub struct ICoreWebView2SourceChangedEventHandler_Vtbl {
35263 pub base__: windows_core::IUnknown_Vtbl,
35264 pub Invoke: unsafe extern "system" fn(
35265 *mut core::ffi::c_void,
35266 *mut core::ffi::c_void,
35267 *mut core::ffi::c_void,
35268 ) -> windows_core::HRESULT,
35269}
35270pub trait ICoreWebView2SourceChangedEventHandler_Impl: windows_core::IUnknownImpl {
35271 fn Invoke(
35272 &self,
35273 sender: windows_core::Ref<'_, ICoreWebView2>,
35274 args: windows_core::Ref<'_, ICoreWebView2SourceChangedEventArgs>,
35275 ) -> windows_core::Result<()>;
35276}
35277impl ICoreWebView2SourceChangedEventHandler_Vtbl {
35278 pub const fn new<Identity: ICoreWebView2SourceChangedEventHandler_Impl, const OFFSET: isize>(
35279 ) -> Self {
35280 unsafe extern "system" fn Invoke<
35281 Identity: ICoreWebView2SourceChangedEventHandler_Impl,
35282 const OFFSET: isize,
35283 >(
35284 this: *mut core::ffi::c_void,
35285 sender: *mut core::ffi::c_void,
35286 args: *mut core::ffi::c_void,
35287 ) -> windows_core::HRESULT {
35288 unsafe {
35289 let this: &Identity =
35290 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35291 ICoreWebView2SourceChangedEventHandler_Impl::Invoke(
35292 this,
35293 core::mem::transmute_copy(&sender),
35294 core::mem::transmute_copy(&args),
35295 )
35296 .into()
35297 }
35298 }
35299 Self {
35300 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35301 Invoke: Invoke::<Identity, OFFSET>,
35302 }
35303 }
35304 pub fn matches(iid: &windows_core::GUID) -> bool {
35305 iid == &<ICoreWebView2SourceChangedEventHandler as windows_core::Interface>::IID
35306 }
35307}
35308impl windows_core::RuntimeName for ICoreWebView2SourceChangedEventHandler {}
35309windows_core::imp::define_interface!(
35310 ICoreWebView2StateChangedEventHandler,
35311 ICoreWebView2StateChangedEventHandler_Vtbl,
35312 0x81336594_7ede_4ba9_bf71_acf0a95b58dd
35313);
35314windows_core::imp::interface_hierarchy!(
35315 ICoreWebView2StateChangedEventHandler,
35316 windows_core::IUnknown
35317);
35318impl ICoreWebView2StateChangedEventHandler {
35319 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
35320 where
35321 P0: windows_core::Param<ICoreWebView2DownloadOperation>,
35322 P1: windows_core::Param<windows_core::IUnknown>,
35323 {
35324 unsafe {
35325 (windows_core::Interface::vtable(self).Invoke)(
35326 windows_core::Interface::as_raw(self),
35327 sender.param().abi(),
35328 args.param().abi(),
35329 )
35330 .ok()
35331 }
35332 }
35333}
35334#[repr(C)]
35335pub struct ICoreWebView2StateChangedEventHandler_Vtbl {
35336 pub base__: windows_core::IUnknown_Vtbl,
35337 pub Invoke: unsafe extern "system" fn(
35338 *mut core::ffi::c_void,
35339 *mut core::ffi::c_void,
35340 *mut core::ffi::c_void,
35341 ) -> windows_core::HRESULT,
35342}
35343pub trait ICoreWebView2StateChangedEventHandler_Impl: windows_core::IUnknownImpl {
35344 fn Invoke(
35345 &self,
35346 sender: windows_core::Ref<'_, ICoreWebView2DownloadOperation>,
35347 args: windows_core::Ref<'_, windows_core::IUnknown>,
35348 ) -> windows_core::Result<()>;
35349}
35350impl ICoreWebView2StateChangedEventHandler_Vtbl {
35351 pub const fn new<Identity: ICoreWebView2StateChangedEventHandler_Impl, const OFFSET: isize>(
35352 ) -> Self {
35353 unsafe extern "system" fn Invoke<
35354 Identity: ICoreWebView2StateChangedEventHandler_Impl,
35355 const OFFSET: isize,
35356 >(
35357 this: *mut core::ffi::c_void,
35358 sender: *mut core::ffi::c_void,
35359 args: *mut core::ffi::c_void,
35360 ) -> windows_core::HRESULT {
35361 unsafe {
35362 let this: &Identity =
35363 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35364 ICoreWebView2StateChangedEventHandler_Impl::Invoke(
35365 this,
35366 core::mem::transmute_copy(&sender),
35367 core::mem::transmute_copy(&args),
35368 )
35369 .into()
35370 }
35371 }
35372 Self {
35373 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35374 Invoke: Invoke::<Identity, OFFSET>,
35375 }
35376 }
35377 pub fn matches(iid: &windows_core::GUID) -> bool {
35378 iid == &<ICoreWebView2StateChangedEventHandler as windows_core::Interface>::IID
35379 }
35380}
35381impl windows_core::RuntimeName for ICoreWebView2StateChangedEventHandler {}
35382windows_core::imp::define_interface!(
35383 ICoreWebView2StatusBarTextChangedEventHandler,
35384 ICoreWebView2StatusBarTextChangedEventHandler_Vtbl,
35385 0xa5e3b0d0_10df_4156_bfad_3b43867acac6
35386);
35387windows_core::imp::interface_hierarchy!(
35388 ICoreWebView2StatusBarTextChangedEventHandler,
35389 windows_core::IUnknown
35390);
35391impl ICoreWebView2StatusBarTextChangedEventHandler {
35392 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
35393 where
35394 P0: windows_core::Param<ICoreWebView2>,
35395 P1: windows_core::Param<windows_core::IUnknown>,
35396 {
35397 unsafe {
35398 (windows_core::Interface::vtable(self).Invoke)(
35399 windows_core::Interface::as_raw(self),
35400 sender.param().abi(),
35401 args.param().abi(),
35402 )
35403 .ok()
35404 }
35405 }
35406}
35407#[repr(C)]
35408pub struct ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
35409 pub base__: windows_core::IUnknown_Vtbl,
35410 pub Invoke: unsafe extern "system" fn(
35411 *mut core::ffi::c_void,
35412 *mut core::ffi::c_void,
35413 *mut core::ffi::c_void,
35414 ) -> windows_core::HRESULT,
35415}
35416pub trait ICoreWebView2StatusBarTextChangedEventHandler_Impl: windows_core::IUnknownImpl {
35417 fn Invoke(
35418 &self,
35419 sender: windows_core::Ref<'_, ICoreWebView2>,
35420 args: windows_core::Ref<'_, windows_core::IUnknown>,
35421 ) -> windows_core::Result<()>;
35422}
35423impl ICoreWebView2StatusBarTextChangedEventHandler_Vtbl {
35424 pub const fn new<
35425 Identity: ICoreWebView2StatusBarTextChangedEventHandler_Impl,
35426 const OFFSET: isize,
35427 >() -> Self {
35428 unsafe extern "system" fn Invoke<
35429 Identity: ICoreWebView2StatusBarTextChangedEventHandler_Impl,
35430 const OFFSET: isize,
35431 >(
35432 this: *mut core::ffi::c_void,
35433 sender: *mut core::ffi::c_void,
35434 args: *mut core::ffi::c_void,
35435 ) -> windows_core::HRESULT {
35436 unsafe {
35437 let this: &Identity =
35438 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35439 ICoreWebView2StatusBarTextChangedEventHandler_Impl::Invoke(
35440 this,
35441 core::mem::transmute_copy(&sender),
35442 core::mem::transmute_copy(&args),
35443 )
35444 .into()
35445 }
35446 }
35447 Self {
35448 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35449 Invoke: Invoke::<Identity, OFFSET>,
35450 }
35451 }
35452 pub fn matches(iid: &windows_core::GUID) -> bool {
35453 iid == &<ICoreWebView2StatusBarTextChangedEventHandler as windows_core::Interface>::IID
35454 }
35455}
35456impl windows_core::RuntimeName for ICoreWebView2StatusBarTextChangedEventHandler {}
35457windows_core::imp::define_interface!(
35458 ICoreWebView2StringCollection,
35459 ICoreWebView2StringCollection_Vtbl,
35460 0xf41f3f8a_bcc3_11eb_8529_0242ac130003
35461);
35462windows_core::imp::interface_hierarchy!(ICoreWebView2StringCollection, windows_core::IUnknown);
35463impl ICoreWebView2StringCollection {
35464 pub unsafe fn Count(&self, value: *mut u32) -> windows_core::Result<()> {
35465 unsafe {
35466 (windows_core::Interface::vtable(self).Count)(
35467 windows_core::Interface::as_raw(self),
35468 value as _,
35469 )
35470 .ok()
35471 }
35472 }
35473 pub unsafe fn GetValueAtIndex(
35474 &self,
35475 index: u32,
35476 value: *mut windows_core::PWSTR,
35477 ) -> windows_core::Result<()> {
35478 unsafe {
35479 (windows_core::Interface::vtable(self).GetValueAtIndex)(
35480 windows_core::Interface::as_raw(self),
35481 index,
35482 value as _,
35483 )
35484 .ok()
35485 }
35486 }
35487}
35488#[repr(C)]
35489pub struct ICoreWebView2StringCollection_Vtbl {
35490 pub base__: windows_core::IUnknown_Vtbl,
35491 pub Count: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
35492 pub GetValueAtIndex: unsafe extern "system" fn(
35493 *mut core::ffi::c_void,
35494 u32,
35495 *mut windows_core::PWSTR,
35496 ) -> windows_core::HRESULT,
35497}
35498pub trait ICoreWebView2StringCollection_Impl: windows_core::IUnknownImpl {
35499 fn Count(&self, value: *mut u32) -> windows_core::Result<()>;
35500 fn GetValueAtIndex(
35501 &self,
35502 index: u32,
35503 value: *mut windows_core::PWSTR,
35504 ) -> windows_core::Result<()>;
35505}
35506impl ICoreWebView2StringCollection_Vtbl {
35507 pub const fn new<Identity: ICoreWebView2StringCollection_Impl, const OFFSET: isize>() -> Self {
35508 unsafe extern "system" fn Count<
35509 Identity: ICoreWebView2StringCollection_Impl,
35510 const OFFSET: isize,
35511 >(
35512 this: *mut core::ffi::c_void,
35513 value: *mut u32,
35514 ) -> windows_core::HRESULT {
35515 unsafe {
35516 let this: &Identity =
35517 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35518 ICoreWebView2StringCollection_Impl::Count(this, core::mem::transmute_copy(&value))
35519 .into()
35520 }
35521 }
35522 unsafe extern "system" fn GetValueAtIndex<
35523 Identity: ICoreWebView2StringCollection_Impl,
35524 const OFFSET: isize,
35525 >(
35526 this: *mut core::ffi::c_void,
35527 index: u32,
35528 value: *mut windows_core::PWSTR,
35529 ) -> windows_core::HRESULT {
35530 unsafe {
35531 let this: &Identity =
35532 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35533 ICoreWebView2StringCollection_Impl::GetValueAtIndex(
35534 this,
35535 core::mem::transmute_copy(&index),
35536 core::mem::transmute_copy(&value),
35537 )
35538 .into()
35539 }
35540 }
35541 Self {
35542 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35543 Count: Count::<Identity, OFFSET>,
35544 GetValueAtIndex: GetValueAtIndex::<Identity, OFFSET>,
35545 }
35546 }
35547 pub fn matches(iid: &windows_core::GUID) -> bool {
35548 iid == &<ICoreWebView2StringCollection as windows_core::Interface>::IID
35549 }
35550}
35551impl windows_core::RuntimeName for ICoreWebView2StringCollection {}
35552windows_core::imp::define_interface!(
35553 ICoreWebView2TrySuspendCompletedHandler,
35554 ICoreWebView2TrySuspendCompletedHandler_Vtbl,
35555 0x00f206a7_9d17_4605_91f6_4e8e4de192e3
35556);
35557windows_core::imp::interface_hierarchy!(
35558 ICoreWebView2TrySuspendCompletedHandler,
35559 windows_core::IUnknown
35560);
35561impl ICoreWebView2TrySuspendCompletedHandler {
35562 pub unsafe fn Invoke(
35563 &self,
35564 errorcode: windows_core::HRESULT,
35565 result: bool,
35566 ) -> windows_core::Result<()> {
35567 unsafe {
35568 (windows_core::Interface::vtable(self).Invoke)(
35569 windows_core::Interface::as_raw(self),
35570 errorcode,
35571 result.into(),
35572 )
35573 .ok()
35574 }
35575 }
35576}
35577#[repr(C)]
35578pub struct ICoreWebView2TrySuspendCompletedHandler_Vtbl {
35579 pub base__: windows_core::IUnknown_Vtbl,
35580 pub Invoke: unsafe extern "system" fn(
35581 *mut core::ffi::c_void,
35582 windows_core::HRESULT,
35583 windows_core::BOOL,
35584 ) -> windows_core::HRESULT,
35585}
35586pub trait ICoreWebView2TrySuspendCompletedHandler_Impl: windows_core::IUnknownImpl {
35587 fn Invoke(
35588 &self,
35589 errorcode: windows_core::HRESULT,
35590 result: windows_core::BOOL,
35591 ) -> windows_core::Result<()>;
35592}
35593impl ICoreWebView2TrySuspendCompletedHandler_Vtbl {
35594 pub const fn new<
35595 Identity: ICoreWebView2TrySuspendCompletedHandler_Impl,
35596 const OFFSET: isize,
35597 >() -> Self {
35598 unsafe extern "system" fn Invoke<
35599 Identity: ICoreWebView2TrySuspendCompletedHandler_Impl,
35600 const OFFSET: isize,
35601 >(
35602 this: *mut core::ffi::c_void,
35603 errorcode: windows_core::HRESULT,
35604 result: windows_core::BOOL,
35605 ) -> windows_core::HRESULT {
35606 unsafe {
35607 let this: &Identity =
35608 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35609 ICoreWebView2TrySuspendCompletedHandler_Impl::Invoke(
35610 this,
35611 core::mem::transmute_copy(&errorcode),
35612 core::mem::transmute_copy(&result),
35613 )
35614 .into()
35615 }
35616 }
35617 Self {
35618 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35619 Invoke: Invoke::<Identity, OFFSET>,
35620 }
35621 }
35622 pub fn matches(iid: &windows_core::GUID) -> bool {
35623 iid == &<ICoreWebView2TrySuspendCompletedHandler as windows_core::Interface>::IID
35624 }
35625}
35626impl windows_core::RuntimeName for ICoreWebView2TrySuspendCompletedHandler {}
35627windows_core::imp::define_interface!(
35628 ICoreWebView2WebMessageReceivedEventArgs,
35629 ICoreWebView2WebMessageReceivedEventArgs_Vtbl,
35630 0x0f99a40c_e962_4207_9e92_e3d542eff849
35631);
35632windows_core::imp::interface_hierarchy!(
35633 ICoreWebView2WebMessageReceivedEventArgs,
35634 windows_core::IUnknown
35635);
35636impl ICoreWebView2WebMessageReceivedEventArgs {
35637 pub unsafe fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
35638 unsafe {
35639 (windows_core::Interface::vtable(self).Source)(
35640 windows_core::Interface::as_raw(self),
35641 value as _,
35642 )
35643 .ok()
35644 }
35645 }
35646 pub unsafe fn WebMessageAsJson(
35647 &self,
35648 value: *mut windows_core::PWSTR,
35649 ) -> windows_core::Result<()> {
35650 unsafe {
35651 (windows_core::Interface::vtable(self).WebMessageAsJson)(
35652 windows_core::Interface::as_raw(self),
35653 value as _,
35654 )
35655 .ok()
35656 }
35657 }
35658 pub unsafe fn TryGetWebMessageAsString(
35659 &self,
35660 value: *mut windows_core::PWSTR,
35661 ) -> windows_core::Result<()> {
35662 unsafe {
35663 (windows_core::Interface::vtable(self).TryGetWebMessageAsString)(
35664 windows_core::Interface::as_raw(self),
35665 value as _,
35666 )
35667 .ok()
35668 }
35669 }
35670}
35671#[repr(C)]
35672pub struct ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
35673 pub base__: windows_core::IUnknown_Vtbl,
35674 pub Source: unsafe extern "system" fn(
35675 *mut core::ffi::c_void,
35676 *mut windows_core::PWSTR,
35677 ) -> windows_core::HRESULT,
35678 pub WebMessageAsJson: unsafe extern "system" fn(
35679 *mut core::ffi::c_void,
35680 *mut windows_core::PWSTR,
35681 ) -> windows_core::HRESULT,
35682 pub TryGetWebMessageAsString: unsafe extern "system" fn(
35683 *mut core::ffi::c_void,
35684 *mut windows_core::PWSTR,
35685 ) -> windows_core::HRESULT,
35686}
35687pub trait ICoreWebView2WebMessageReceivedEventArgs_Impl: windows_core::IUnknownImpl {
35688 fn Source(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
35689 fn WebMessageAsJson(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
35690 fn TryGetWebMessageAsString(&self, value: *mut windows_core::PWSTR)
35691 -> windows_core::Result<()>;
35692}
35693impl ICoreWebView2WebMessageReceivedEventArgs_Vtbl {
35694 pub const fn new<
35695 Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
35696 const OFFSET: isize,
35697 >() -> Self {
35698 unsafe extern "system" fn Source<
35699 Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
35700 const OFFSET: isize,
35701 >(
35702 this: *mut core::ffi::c_void,
35703 value: *mut windows_core::PWSTR,
35704 ) -> windows_core::HRESULT {
35705 unsafe {
35706 let this: &Identity =
35707 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35708 ICoreWebView2WebMessageReceivedEventArgs_Impl::Source(
35709 this,
35710 core::mem::transmute_copy(&value),
35711 )
35712 .into()
35713 }
35714 }
35715 unsafe extern "system" fn WebMessageAsJson<
35716 Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
35717 const OFFSET: isize,
35718 >(
35719 this: *mut core::ffi::c_void,
35720 value: *mut windows_core::PWSTR,
35721 ) -> windows_core::HRESULT {
35722 unsafe {
35723 let this: &Identity =
35724 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35725 ICoreWebView2WebMessageReceivedEventArgs_Impl::WebMessageAsJson(
35726 this,
35727 core::mem::transmute_copy(&value),
35728 )
35729 .into()
35730 }
35731 }
35732 unsafe extern "system" fn TryGetWebMessageAsString<
35733 Identity: ICoreWebView2WebMessageReceivedEventArgs_Impl,
35734 const OFFSET: isize,
35735 >(
35736 this: *mut core::ffi::c_void,
35737 value: *mut windows_core::PWSTR,
35738 ) -> windows_core::HRESULT {
35739 unsafe {
35740 let this: &Identity =
35741 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35742 ICoreWebView2WebMessageReceivedEventArgs_Impl::TryGetWebMessageAsString(
35743 this,
35744 core::mem::transmute_copy(&value),
35745 )
35746 .into()
35747 }
35748 }
35749 Self {
35750 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35751 Source: Source::<Identity, OFFSET>,
35752 WebMessageAsJson: WebMessageAsJson::<Identity, OFFSET>,
35753 TryGetWebMessageAsString: TryGetWebMessageAsString::<Identity, OFFSET>,
35754 }
35755 }
35756 pub fn matches(iid: &windows_core::GUID) -> bool {
35757 iid == &<ICoreWebView2WebMessageReceivedEventArgs as windows_core::Interface>::IID
35758 }
35759}
35760impl windows_core::RuntimeName for ICoreWebView2WebMessageReceivedEventArgs {}
35761windows_core::imp::define_interface!(
35762 ICoreWebView2WebMessageReceivedEventArgs2,
35763 ICoreWebView2WebMessageReceivedEventArgs2_Vtbl,
35764 0x06fc7ab7_c90c_4297_9389_33ca01cf6d5e
35765);
35766impl core::ops::Deref for ICoreWebView2WebMessageReceivedEventArgs2 {
35767 type Target = ICoreWebView2WebMessageReceivedEventArgs;
35768 fn deref(&self) -> &Self::Target {
35769 unsafe { core::mem::transmute(self) }
35770 }
35771}
35772windows_core::imp::interface_hierarchy!(
35773 ICoreWebView2WebMessageReceivedEventArgs2,
35774 windows_core::IUnknown,
35775 ICoreWebView2WebMessageReceivedEventArgs
35776);
35777impl ICoreWebView2WebMessageReceivedEventArgs2 {
35778 pub unsafe fn AdditionalObjects(
35779 &self,
35780 ) -> windows_core::Result<ICoreWebView2ObjectCollectionView> {
35781 unsafe {
35782 let mut result__ = core::mem::zeroed();
35783 (windows_core::Interface::vtable(self).AdditionalObjects)(
35784 windows_core::Interface::as_raw(self),
35785 &mut result__,
35786 )
35787 .and_then(|| windows_core::Type::from_abi(result__))
35788 }
35789 }
35790}
35791#[repr(C)]
35792pub struct ICoreWebView2WebMessageReceivedEventArgs2_Vtbl {
35793 pub base__: ICoreWebView2WebMessageReceivedEventArgs_Vtbl,
35794 pub AdditionalObjects: unsafe extern "system" fn(
35795 *mut core::ffi::c_void,
35796 *mut *mut core::ffi::c_void,
35797 ) -> windows_core::HRESULT,
35798}
35799pub trait ICoreWebView2WebMessageReceivedEventArgs2_Impl:
35800 ICoreWebView2WebMessageReceivedEventArgs_Impl
35801{
35802 fn AdditionalObjects(&self) -> windows_core::Result<ICoreWebView2ObjectCollectionView>;
35803}
35804impl ICoreWebView2WebMessageReceivedEventArgs2_Vtbl {
35805 pub const fn new<
35806 Identity: ICoreWebView2WebMessageReceivedEventArgs2_Impl,
35807 const OFFSET: isize,
35808 >() -> Self {
35809 unsafe extern "system" fn AdditionalObjects<
35810 Identity: ICoreWebView2WebMessageReceivedEventArgs2_Impl,
35811 const OFFSET: isize,
35812 >(
35813 this: *mut core::ffi::c_void,
35814 value: *mut *mut core::ffi::c_void,
35815 ) -> windows_core::HRESULT {
35816 unsafe {
35817 let this: &Identity =
35818 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35819 match ICoreWebView2WebMessageReceivedEventArgs2_Impl::AdditionalObjects(this) {
35820 Ok(ok__) => {
35821 value.write(core::mem::transmute(ok__));
35822 windows_core::HRESULT(0)
35823 }
35824 Err(err) => err.into(),
35825 }
35826 }
35827 }
35828 Self {
35829 base__: ICoreWebView2WebMessageReceivedEventArgs_Vtbl::new::<Identity, OFFSET>(),
35830 AdditionalObjects: AdditionalObjects::<Identity, OFFSET>,
35831 }
35832 }
35833 pub fn matches(iid: &windows_core::GUID) -> bool {
35834 iid == &<ICoreWebView2WebMessageReceivedEventArgs2 as windows_core::Interface>::IID
35835 || iid == &<ICoreWebView2WebMessageReceivedEventArgs as windows_core::Interface>::IID
35836 }
35837}
35838impl windows_core::RuntimeName for ICoreWebView2WebMessageReceivedEventArgs2 {}
35839windows_core::imp::define_interface!(
35840 ICoreWebView2WebMessageReceivedEventHandler,
35841 ICoreWebView2WebMessageReceivedEventHandler_Vtbl,
35842 0x57213f19_00e6_49fa_8e07_898ea01ecbd2
35843);
35844windows_core::imp::interface_hierarchy!(
35845 ICoreWebView2WebMessageReceivedEventHandler,
35846 windows_core::IUnknown
35847);
35848impl ICoreWebView2WebMessageReceivedEventHandler {
35849 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
35850 where
35851 P0: windows_core::Param<ICoreWebView2>,
35852 P1: windows_core::Param<ICoreWebView2WebMessageReceivedEventArgs>,
35853 {
35854 unsafe {
35855 (windows_core::Interface::vtable(self).Invoke)(
35856 windows_core::Interface::as_raw(self),
35857 sender.param().abi(),
35858 args.param().abi(),
35859 )
35860 .ok()
35861 }
35862 }
35863}
35864#[repr(C)]
35865pub struct ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
35866 pub base__: windows_core::IUnknown_Vtbl,
35867 pub Invoke: unsafe extern "system" fn(
35868 *mut core::ffi::c_void,
35869 *mut core::ffi::c_void,
35870 *mut core::ffi::c_void,
35871 ) -> windows_core::HRESULT,
35872}
35873pub trait ICoreWebView2WebMessageReceivedEventHandler_Impl: windows_core::IUnknownImpl {
35874 fn Invoke(
35875 &self,
35876 sender: windows_core::Ref<'_, ICoreWebView2>,
35877 args: windows_core::Ref<'_, ICoreWebView2WebMessageReceivedEventArgs>,
35878 ) -> windows_core::Result<()>;
35879}
35880impl ICoreWebView2WebMessageReceivedEventHandler_Vtbl {
35881 pub const fn new<
35882 Identity: ICoreWebView2WebMessageReceivedEventHandler_Impl,
35883 const OFFSET: isize,
35884 >() -> Self {
35885 unsafe extern "system" fn Invoke<
35886 Identity: ICoreWebView2WebMessageReceivedEventHandler_Impl,
35887 const OFFSET: isize,
35888 >(
35889 this: *mut core::ffi::c_void,
35890 sender: *mut core::ffi::c_void,
35891 args: *mut core::ffi::c_void,
35892 ) -> windows_core::HRESULT {
35893 unsafe {
35894 let this: &Identity =
35895 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
35896 ICoreWebView2WebMessageReceivedEventHandler_Impl::Invoke(
35897 this,
35898 core::mem::transmute_copy(&sender),
35899 core::mem::transmute_copy(&args),
35900 )
35901 .into()
35902 }
35903 }
35904 Self {
35905 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
35906 Invoke: Invoke::<Identity, OFFSET>,
35907 }
35908 }
35909 pub fn matches(iid: &windows_core::GUID) -> bool {
35910 iid == &<ICoreWebView2WebMessageReceivedEventHandler as windows_core::Interface>::IID
35911 }
35912}
35913impl windows_core::RuntimeName for ICoreWebView2WebMessageReceivedEventHandler {}
35914windows_core::imp::define_interface!(
35915 ICoreWebView2WebResourceRequest,
35916 ICoreWebView2WebResourceRequest_Vtbl,
35917 0x97055cd4_512c_4264_8b5f_e3f446cea6a5
35918);
35919windows_core::imp::interface_hierarchy!(ICoreWebView2WebResourceRequest, windows_core::IUnknown);
35920impl ICoreWebView2WebResourceRequest {
35921 pub unsafe fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()> {
35922 unsafe {
35923 (windows_core::Interface::vtable(self).Uri)(
35924 windows_core::Interface::as_raw(self),
35925 uri as _,
35926 )
35927 .ok()
35928 }
35929 }
35930 pub unsafe fn SetUri<P0>(&self, uri: P0) -> windows_core::Result<()>
35931 where
35932 P0: windows_core::Param<windows_core::PCWSTR>,
35933 {
35934 unsafe {
35935 (windows_core::Interface::vtable(self).SetUri)(
35936 windows_core::Interface::as_raw(self),
35937 uri.param().abi(),
35938 )
35939 .ok()
35940 }
35941 }
35942 pub unsafe fn Method(&self, method: *mut windows_core::PWSTR) -> windows_core::Result<()> {
35943 unsafe {
35944 (windows_core::Interface::vtable(self).Method)(
35945 windows_core::Interface::as_raw(self),
35946 method as _,
35947 )
35948 .ok()
35949 }
35950 }
35951 pub unsafe fn SetMethod<P0>(&self, method: P0) -> windows_core::Result<()>
35952 where
35953 P0: windows_core::Param<windows_core::PCWSTR>,
35954 {
35955 unsafe {
35956 (windows_core::Interface::vtable(self).SetMethod)(
35957 windows_core::Interface::as_raw(self),
35958 method.param().abi(),
35959 )
35960 .ok()
35961 }
35962 }
35963 pub unsafe fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
35964 unsafe {
35965 let mut result__ = core::mem::zeroed();
35966 (windows_core::Interface::vtable(self).Content)(
35967 windows_core::Interface::as_raw(self),
35968 &mut result__,
35969 )
35970 .and_then(|| windows_core::Type::from_abi(result__))
35971 }
35972 }
35973 pub unsafe fn SetContent<P0>(&self, content: P0) -> windows_core::Result<()>
35974 where
35975 P0: windows_core::Param<windows::Win32::System::Com::IStream>,
35976 {
35977 unsafe {
35978 (windows_core::Interface::vtable(self).SetContent)(
35979 windows_core::Interface::as_raw(self),
35980 content.param().abi(),
35981 )
35982 .ok()
35983 }
35984 }
35985 pub unsafe fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders> {
35986 unsafe {
35987 let mut result__ = core::mem::zeroed();
35988 (windows_core::Interface::vtable(self).Headers)(
35989 windows_core::Interface::as_raw(self),
35990 &mut result__,
35991 )
35992 .and_then(|| windows_core::Type::from_abi(result__))
35993 }
35994 }
35995}
35996#[repr(C)]
35997pub struct ICoreWebView2WebResourceRequest_Vtbl {
35998 pub base__: windows_core::IUnknown_Vtbl,
35999 pub Uri: unsafe extern "system" fn(
36000 *mut core::ffi::c_void,
36001 *mut windows_core::PWSTR,
36002 ) -> windows_core::HRESULT,
36003 pub SetUri: unsafe extern "system" fn(
36004 *mut core::ffi::c_void,
36005 windows_core::PCWSTR,
36006 ) -> windows_core::HRESULT,
36007 pub Method: unsafe extern "system" fn(
36008 *mut core::ffi::c_void,
36009 *mut windows_core::PWSTR,
36010 ) -> windows_core::HRESULT,
36011 pub SetMethod: unsafe extern "system" fn(
36012 *mut core::ffi::c_void,
36013 windows_core::PCWSTR,
36014 ) -> windows_core::HRESULT,
36015 pub Content: unsafe extern "system" fn(
36016 *mut core::ffi::c_void,
36017 *mut *mut core::ffi::c_void,
36018 ) -> windows_core::HRESULT,
36019 pub SetContent: unsafe extern "system" fn(
36020 *mut core::ffi::c_void,
36021 *mut core::ffi::c_void,
36022 ) -> windows_core::HRESULT,
36023 pub Headers: unsafe extern "system" fn(
36024 *mut core::ffi::c_void,
36025 *mut *mut core::ffi::c_void,
36026 ) -> windows_core::HRESULT,
36027}
36028pub trait ICoreWebView2WebResourceRequest_Impl: windows_core::IUnknownImpl {
36029 fn Uri(&self, uri: *mut windows_core::PWSTR) -> windows_core::Result<()>;
36030 fn SetUri(&self, uri: &windows_core::PCWSTR) -> windows_core::Result<()>;
36031 fn Method(&self, method: *mut windows_core::PWSTR) -> windows_core::Result<()>;
36032 fn SetMethod(&self, method: &windows_core::PCWSTR) -> windows_core::Result<()>;
36033 fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream>;
36034 fn SetContent(
36035 &self,
36036 content: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
36037 ) -> windows_core::Result<()>;
36038 fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpRequestHeaders>;
36039}
36040impl ICoreWebView2WebResourceRequest_Vtbl {
36041 pub const fn new<Identity: ICoreWebView2WebResourceRequest_Impl, const OFFSET: isize>() -> Self
36042 {
36043 unsafe extern "system" fn Uri<
36044 Identity: ICoreWebView2WebResourceRequest_Impl,
36045 const OFFSET: isize,
36046 >(
36047 this: *mut core::ffi::c_void,
36048 uri: *mut windows_core::PWSTR,
36049 ) -> windows_core::HRESULT {
36050 unsafe {
36051 let this: &Identity =
36052 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36053 ICoreWebView2WebResourceRequest_Impl::Uri(this, core::mem::transmute_copy(&uri))
36054 .into()
36055 }
36056 }
36057 unsafe extern "system" fn SetUri<
36058 Identity: ICoreWebView2WebResourceRequest_Impl,
36059 const OFFSET: isize,
36060 >(
36061 this: *mut core::ffi::c_void,
36062 uri: windows_core::PCWSTR,
36063 ) -> windows_core::HRESULT {
36064 unsafe {
36065 let this: &Identity =
36066 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36067 ICoreWebView2WebResourceRequest_Impl::SetUri(this, core::mem::transmute(&uri))
36068 .into()
36069 }
36070 }
36071 unsafe extern "system" fn Method<
36072 Identity: ICoreWebView2WebResourceRequest_Impl,
36073 const OFFSET: isize,
36074 >(
36075 this: *mut core::ffi::c_void,
36076 method: *mut windows_core::PWSTR,
36077 ) -> windows_core::HRESULT {
36078 unsafe {
36079 let this: &Identity =
36080 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36081 ICoreWebView2WebResourceRequest_Impl::Method(
36082 this,
36083 core::mem::transmute_copy(&method),
36084 )
36085 .into()
36086 }
36087 }
36088 unsafe extern "system" fn SetMethod<
36089 Identity: ICoreWebView2WebResourceRequest_Impl,
36090 const OFFSET: isize,
36091 >(
36092 this: *mut core::ffi::c_void,
36093 method: windows_core::PCWSTR,
36094 ) -> windows_core::HRESULT {
36095 unsafe {
36096 let this: &Identity =
36097 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36098 ICoreWebView2WebResourceRequest_Impl::SetMethod(this, core::mem::transmute(&method))
36099 .into()
36100 }
36101 }
36102 unsafe extern "system" fn Content<
36103 Identity: ICoreWebView2WebResourceRequest_Impl,
36104 const OFFSET: isize,
36105 >(
36106 this: *mut core::ffi::c_void,
36107 content: *mut *mut core::ffi::c_void,
36108 ) -> windows_core::HRESULT {
36109 unsafe {
36110 let this: &Identity =
36111 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36112 match ICoreWebView2WebResourceRequest_Impl::Content(this) {
36113 Ok(ok__) => {
36114 content.write(core::mem::transmute(ok__));
36115 windows_core::HRESULT(0)
36116 }
36117 Err(err) => err.into(),
36118 }
36119 }
36120 }
36121 unsafe extern "system" fn SetContent<
36122 Identity: ICoreWebView2WebResourceRequest_Impl,
36123 const OFFSET: isize,
36124 >(
36125 this: *mut core::ffi::c_void,
36126 content: *mut core::ffi::c_void,
36127 ) -> windows_core::HRESULT {
36128 unsafe {
36129 let this: &Identity =
36130 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36131 ICoreWebView2WebResourceRequest_Impl::SetContent(
36132 this,
36133 core::mem::transmute_copy(&content),
36134 )
36135 .into()
36136 }
36137 }
36138 unsafe extern "system" fn Headers<
36139 Identity: ICoreWebView2WebResourceRequest_Impl,
36140 const OFFSET: isize,
36141 >(
36142 this: *mut core::ffi::c_void,
36143 headers: *mut *mut core::ffi::c_void,
36144 ) -> windows_core::HRESULT {
36145 unsafe {
36146 let this: &Identity =
36147 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36148 match ICoreWebView2WebResourceRequest_Impl::Headers(this) {
36149 Ok(ok__) => {
36150 headers.write(core::mem::transmute(ok__));
36151 windows_core::HRESULT(0)
36152 }
36153 Err(err) => err.into(),
36154 }
36155 }
36156 }
36157 Self {
36158 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
36159 Uri: Uri::<Identity, OFFSET>,
36160 SetUri: SetUri::<Identity, OFFSET>,
36161 Method: Method::<Identity, OFFSET>,
36162 SetMethod: SetMethod::<Identity, OFFSET>,
36163 Content: Content::<Identity, OFFSET>,
36164 SetContent: SetContent::<Identity, OFFSET>,
36165 Headers: Headers::<Identity, OFFSET>,
36166 }
36167 }
36168 pub fn matches(iid: &windows_core::GUID) -> bool {
36169 iid == &<ICoreWebView2WebResourceRequest as windows_core::Interface>::IID
36170 }
36171}
36172impl windows_core::RuntimeName for ICoreWebView2WebResourceRequest {}
36173windows_core::imp::define_interface!(
36174 ICoreWebView2WebResourceRequestedEventArgs,
36175 ICoreWebView2WebResourceRequestedEventArgs_Vtbl,
36176 0x453e667f_12c7_49d4_be6d_ddbe7956f57a
36177);
36178windows_core::imp::interface_hierarchy!(
36179 ICoreWebView2WebResourceRequestedEventArgs,
36180 windows_core::IUnknown
36181);
36182impl ICoreWebView2WebResourceRequestedEventArgs {
36183 pub unsafe fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest> {
36184 unsafe {
36185 let mut result__ = core::mem::zeroed();
36186 (windows_core::Interface::vtable(self).Request)(
36187 windows_core::Interface::as_raw(self),
36188 &mut result__,
36189 )
36190 .and_then(|| windows_core::Type::from_abi(result__))
36191 }
36192 }
36193 pub unsafe fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponse> {
36194 unsafe {
36195 let mut result__ = core::mem::zeroed();
36196 (windows_core::Interface::vtable(self).Response)(
36197 windows_core::Interface::as_raw(self),
36198 &mut result__,
36199 )
36200 .and_then(|| windows_core::Type::from_abi(result__))
36201 }
36202 }
36203 pub unsafe fn SetResponse<P0>(&self, response: P0) -> windows_core::Result<()>
36204 where
36205 P0: windows_core::Param<ICoreWebView2WebResourceResponse>,
36206 {
36207 unsafe {
36208 (windows_core::Interface::vtable(self).SetResponse)(
36209 windows_core::Interface::as_raw(self),
36210 response.param().abi(),
36211 )
36212 .ok()
36213 }
36214 }
36215 pub unsafe fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral> {
36216 unsafe {
36217 let mut result__ = core::mem::zeroed();
36218 (windows_core::Interface::vtable(self).GetDeferral)(
36219 windows_core::Interface::as_raw(self),
36220 &mut result__,
36221 )
36222 .and_then(|| windows_core::Type::from_abi(result__))
36223 }
36224 }
36225 pub unsafe fn ResourceContext(
36226 &self,
36227 context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
36228 ) -> windows_core::Result<()> {
36229 unsafe {
36230 (windows_core::Interface::vtable(self).ResourceContext)(
36231 windows_core::Interface::as_raw(self),
36232 context as _,
36233 )
36234 .ok()
36235 }
36236 }
36237}
36238#[repr(C)]
36239pub struct ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
36240 pub base__: windows_core::IUnknown_Vtbl,
36241 pub Request: unsafe extern "system" fn(
36242 *mut core::ffi::c_void,
36243 *mut *mut core::ffi::c_void,
36244 ) -> windows_core::HRESULT,
36245 pub Response: unsafe extern "system" fn(
36246 *mut core::ffi::c_void,
36247 *mut *mut core::ffi::c_void,
36248 ) -> windows_core::HRESULT,
36249 pub SetResponse: unsafe extern "system" fn(
36250 *mut core::ffi::c_void,
36251 *mut core::ffi::c_void,
36252 ) -> windows_core::HRESULT,
36253 pub GetDeferral: unsafe extern "system" fn(
36254 *mut core::ffi::c_void,
36255 *mut *mut core::ffi::c_void,
36256 ) -> windows_core::HRESULT,
36257 pub ResourceContext: unsafe extern "system" fn(
36258 *mut core::ffi::c_void,
36259 *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
36260 ) -> windows_core::HRESULT,
36261}
36262pub trait ICoreWebView2WebResourceRequestedEventArgs_Impl: windows_core::IUnknownImpl {
36263 fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest>;
36264 fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponse>;
36265 fn SetResponse(
36266 &self,
36267 response: windows_core::Ref<'_, ICoreWebView2WebResourceResponse>,
36268 ) -> windows_core::Result<()>;
36269 fn GetDeferral(&self) -> windows_core::Result<ICoreWebView2Deferral>;
36270 fn ResourceContext(
36271 &self,
36272 context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
36273 ) -> windows_core::Result<()>;
36274}
36275impl ICoreWebView2WebResourceRequestedEventArgs_Vtbl {
36276 pub const fn new<
36277 Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
36278 const OFFSET: isize,
36279 >() -> Self {
36280 unsafe extern "system" fn Request<
36281 Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
36282 const OFFSET: isize,
36283 >(
36284 this: *mut core::ffi::c_void,
36285 request: *mut *mut core::ffi::c_void,
36286 ) -> windows_core::HRESULT {
36287 unsafe {
36288 let this: &Identity =
36289 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36290 match ICoreWebView2WebResourceRequestedEventArgs_Impl::Request(this) {
36291 Ok(ok__) => {
36292 request.write(core::mem::transmute(ok__));
36293 windows_core::HRESULT(0)
36294 }
36295 Err(err) => err.into(),
36296 }
36297 }
36298 }
36299 unsafe extern "system" fn Response<
36300 Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
36301 const OFFSET: isize,
36302 >(
36303 this: *mut core::ffi::c_void,
36304 response: *mut *mut core::ffi::c_void,
36305 ) -> windows_core::HRESULT {
36306 unsafe {
36307 let this: &Identity =
36308 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36309 match ICoreWebView2WebResourceRequestedEventArgs_Impl::Response(this) {
36310 Ok(ok__) => {
36311 response.write(core::mem::transmute(ok__));
36312 windows_core::HRESULT(0)
36313 }
36314 Err(err) => err.into(),
36315 }
36316 }
36317 }
36318 unsafe extern "system" fn SetResponse<
36319 Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
36320 const OFFSET: isize,
36321 >(
36322 this: *mut core::ffi::c_void,
36323 response: *mut core::ffi::c_void,
36324 ) -> windows_core::HRESULT {
36325 unsafe {
36326 let this: &Identity =
36327 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36328 ICoreWebView2WebResourceRequestedEventArgs_Impl::SetResponse(
36329 this,
36330 core::mem::transmute_copy(&response),
36331 )
36332 .into()
36333 }
36334 }
36335 unsafe extern "system" fn GetDeferral<
36336 Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
36337 const OFFSET: isize,
36338 >(
36339 this: *mut core::ffi::c_void,
36340 deferral: *mut *mut core::ffi::c_void,
36341 ) -> windows_core::HRESULT {
36342 unsafe {
36343 let this: &Identity =
36344 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36345 match ICoreWebView2WebResourceRequestedEventArgs_Impl::GetDeferral(this) {
36346 Ok(ok__) => {
36347 deferral.write(core::mem::transmute(ok__));
36348 windows_core::HRESULT(0)
36349 }
36350 Err(err) => err.into(),
36351 }
36352 }
36353 }
36354 unsafe extern "system" fn ResourceContext<
36355 Identity: ICoreWebView2WebResourceRequestedEventArgs_Impl,
36356 const OFFSET: isize,
36357 >(
36358 this: *mut core::ffi::c_void,
36359 context: *mut COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
36360 ) -> windows_core::HRESULT {
36361 unsafe {
36362 let this: &Identity =
36363 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36364 ICoreWebView2WebResourceRequestedEventArgs_Impl::ResourceContext(
36365 this,
36366 core::mem::transmute_copy(&context),
36367 )
36368 .into()
36369 }
36370 }
36371 Self {
36372 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
36373 Request: Request::<Identity, OFFSET>,
36374 Response: Response::<Identity, OFFSET>,
36375 SetResponse: SetResponse::<Identity, OFFSET>,
36376 GetDeferral: GetDeferral::<Identity, OFFSET>,
36377 ResourceContext: ResourceContext::<Identity, OFFSET>,
36378 }
36379 }
36380 pub fn matches(iid: &windows_core::GUID) -> bool {
36381 iid == &<ICoreWebView2WebResourceRequestedEventArgs as windows_core::Interface>::IID
36382 }
36383}
36384impl windows_core::RuntimeName for ICoreWebView2WebResourceRequestedEventArgs {}
36385windows_core::imp::define_interface!(
36386 ICoreWebView2WebResourceRequestedEventArgs2,
36387 ICoreWebView2WebResourceRequestedEventArgs2_Vtbl,
36388 0x9c562c24_b219_4d7f_92f6_b187fbbadd56
36389);
36390impl core::ops::Deref for ICoreWebView2WebResourceRequestedEventArgs2 {
36391 type Target = ICoreWebView2WebResourceRequestedEventArgs;
36392 fn deref(&self) -> &Self::Target {
36393 unsafe { core::mem::transmute(self) }
36394 }
36395}
36396windows_core::imp::interface_hierarchy!(
36397 ICoreWebView2WebResourceRequestedEventArgs2,
36398 windows_core::IUnknown,
36399 ICoreWebView2WebResourceRequestedEventArgs
36400);
36401impl ICoreWebView2WebResourceRequestedEventArgs2 {
36402 pub unsafe fn RequestedSourceKind(
36403 &self,
36404 value: *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
36405 ) -> windows_core::Result<()> {
36406 unsafe {
36407 (windows_core::Interface::vtable(self).RequestedSourceKind)(
36408 windows_core::Interface::as_raw(self),
36409 value as _,
36410 )
36411 .ok()
36412 }
36413 }
36414}
36415#[repr(C)]
36416pub struct ICoreWebView2WebResourceRequestedEventArgs2_Vtbl {
36417 pub base__: ICoreWebView2WebResourceRequestedEventArgs_Vtbl,
36418 pub RequestedSourceKind: unsafe extern "system" fn(
36419 *mut core::ffi::c_void,
36420 *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
36421 ) -> windows_core::HRESULT,
36422}
36423pub trait ICoreWebView2WebResourceRequestedEventArgs2_Impl:
36424 ICoreWebView2WebResourceRequestedEventArgs_Impl
36425{
36426 fn RequestedSourceKind(
36427 &self,
36428 value: *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
36429 ) -> windows_core::Result<()>;
36430}
36431impl ICoreWebView2WebResourceRequestedEventArgs2_Vtbl {
36432 pub const fn new<
36433 Identity: ICoreWebView2WebResourceRequestedEventArgs2_Impl,
36434 const OFFSET: isize,
36435 >() -> Self {
36436 unsafe extern "system" fn RequestedSourceKind<
36437 Identity: ICoreWebView2WebResourceRequestedEventArgs2_Impl,
36438 const OFFSET: isize,
36439 >(
36440 this: *mut core::ffi::c_void,
36441 value: *mut COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
36442 ) -> windows_core::HRESULT {
36443 unsafe {
36444 let this: &Identity =
36445 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36446 ICoreWebView2WebResourceRequestedEventArgs2_Impl::RequestedSourceKind(
36447 this,
36448 core::mem::transmute_copy(&value),
36449 )
36450 .into()
36451 }
36452 }
36453 Self {
36454 base__: ICoreWebView2WebResourceRequestedEventArgs_Vtbl::new::<Identity, OFFSET>(),
36455 RequestedSourceKind: RequestedSourceKind::<Identity, OFFSET>,
36456 }
36457 }
36458 pub fn matches(iid: &windows_core::GUID) -> bool {
36459 iid == &<ICoreWebView2WebResourceRequestedEventArgs2 as windows_core::Interface>::IID
36460 || iid == &<ICoreWebView2WebResourceRequestedEventArgs as windows_core::Interface>::IID
36461 }
36462}
36463impl windows_core::RuntimeName for ICoreWebView2WebResourceRequestedEventArgs2 {}
36464windows_core::imp::define_interface!(
36465 ICoreWebView2WebResourceRequestedEventHandler,
36466 ICoreWebView2WebResourceRequestedEventHandler_Vtbl,
36467 0xab00b74c_15f1_4646_80e8_e76341d25d71
36468);
36469windows_core::imp::interface_hierarchy!(
36470 ICoreWebView2WebResourceRequestedEventHandler,
36471 windows_core::IUnknown
36472);
36473impl ICoreWebView2WebResourceRequestedEventHandler {
36474 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
36475 where
36476 P0: windows_core::Param<ICoreWebView2>,
36477 P1: windows_core::Param<ICoreWebView2WebResourceRequestedEventArgs>,
36478 {
36479 unsafe {
36480 (windows_core::Interface::vtable(self).Invoke)(
36481 windows_core::Interface::as_raw(self),
36482 sender.param().abi(),
36483 args.param().abi(),
36484 )
36485 .ok()
36486 }
36487 }
36488}
36489#[repr(C)]
36490pub struct ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
36491 pub base__: windows_core::IUnknown_Vtbl,
36492 pub Invoke: unsafe extern "system" fn(
36493 *mut core::ffi::c_void,
36494 *mut core::ffi::c_void,
36495 *mut core::ffi::c_void,
36496 ) -> windows_core::HRESULT,
36497}
36498pub trait ICoreWebView2WebResourceRequestedEventHandler_Impl: windows_core::IUnknownImpl {
36499 fn Invoke(
36500 &self,
36501 sender: windows_core::Ref<'_, ICoreWebView2>,
36502 args: windows_core::Ref<'_, ICoreWebView2WebResourceRequestedEventArgs>,
36503 ) -> windows_core::Result<()>;
36504}
36505impl ICoreWebView2WebResourceRequestedEventHandler_Vtbl {
36506 pub const fn new<
36507 Identity: ICoreWebView2WebResourceRequestedEventHandler_Impl,
36508 const OFFSET: isize,
36509 >() -> Self {
36510 unsafe extern "system" fn Invoke<
36511 Identity: ICoreWebView2WebResourceRequestedEventHandler_Impl,
36512 const OFFSET: isize,
36513 >(
36514 this: *mut core::ffi::c_void,
36515 sender: *mut core::ffi::c_void,
36516 args: *mut core::ffi::c_void,
36517 ) -> windows_core::HRESULT {
36518 unsafe {
36519 let this: &Identity =
36520 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36521 ICoreWebView2WebResourceRequestedEventHandler_Impl::Invoke(
36522 this,
36523 core::mem::transmute_copy(&sender),
36524 core::mem::transmute_copy(&args),
36525 )
36526 .into()
36527 }
36528 }
36529 Self {
36530 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
36531 Invoke: Invoke::<Identity, OFFSET>,
36532 }
36533 }
36534 pub fn matches(iid: &windows_core::GUID) -> bool {
36535 iid == &<ICoreWebView2WebResourceRequestedEventHandler as windows_core::Interface>::IID
36536 }
36537}
36538impl windows_core::RuntimeName for ICoreWebView2WebResourceRequestedEventHandler {}
36539windows_core::imp::define_interface!(
36540 ICoreWebView2WebResourceResponse,
36541 ICoreWebView2WebResourceResponse_Vtbl,
36542 0xaafcc94f_fa27_48fd_97df_830ef75aaec9
36543);
36544windows_core::imp::interface_hierarchy!(ICoreWebView2WebResourceResponse, windows_core::IUnknown);
36545impl ICoreWebView2WebResourceResponse {
36546 pub unsafe fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream> {
36547 unsafe {
36548 let mut result__ = core::mem::zeroed();
36549 (windows_core::Interface::vtable(self).Content)(
36550 windows_core::Interface::as_raw(self),
36551 &mut result__,
36552 )
36553 .and_then(|| windows_core::Type::from_abi(result__))
36554 }
36555 }
36556 pub unsafe fn SetContent<P0>(&self, content: P0) -> windows_core::Result<()>
36557 where
36558 P0: windows_core::Param<windows::Win32::System::Com::IStream>,
36559 {
36560 unsafe {
36561 (windows_core::Interface::vtable(self).SetContent)(
36562 windows_core::Interface::as_raw(self),
36563 content.param().abi(),
36564 )
36565 .ok()
36566 }
36567 }
36568 pub unsafe fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpResponseHeaders> {
36569 unsafe {
36570 let mut result__ = core::mem::zeroed();
36571 (windows_core::Interface::vtable(self).Headers)(
36572 windows_core::Interface::as_raw(self),
36573 &mut result__,
36574 )
36575 .and_then(|| windows_core::Type::from_abi(result__))
36576 }
36577 }
36578 pub unsafe fn StatusCode(&self, statuscode: *mut i32) -> windows_core::Result<()> {
36579 unsafe {
36580 (windows_core::Interface::vtable(self).StatusCode)(
36581 windows_core::Interface::as_raw(self),
36582 statuscode as _,
36583 )
36584 .ok()
36585 }
36586 }
36587 pub unsafe fn SetStatusCode(&self, statuscode: i32) -> windows_core::Result<()> {
36588 unsafe {
36589 (windows_core::Interface::vtable(self).SetStatusCode)(
36590 windows_core::Interface::as_raw(self),
36591 statuscode,
36592 )
36593 .ok()
36594 }
36595 }
36596 pub unsafe fn ReasonPhrase(
36597 &self,
36598 reasonphrase: *mut windows_core::PWSTR,
36599 ) -> windows_core::Result<()> {
36600 unsafe {
36601 (windows_core::Interface::vtable(self).ReasonPhrase)(
36602 windows_core::Interface::as_raw(self),
36603 reasonphrase as _,
36604 )
36605 .ok()
36606 }
36607 }
36608 pub unsafe fn SetReasonPhrase<P0>(&self, reasonphrase: P0) -> windows_core::Result<()>
36609 where
36610 P0: windows_core::Param<windows_core::PCWSTR>,
36611 {
36612 unsafe {
36613 (windows_core::Interface::vtable(self).SetReasonPhrase)(
36614 windows_core::Interface::as_raw(self),
36615 reasonphrase.param().abi(),
36616 )
36617 .ok()
36618 }
36619 }
36620}
36621#[repr(C)]
36622pub struct ICoreWebView2WebResourceResponse_Vtbl {
36623 pub base__: windows_core::IUnknown_Vtbl,
36624 pub Content: unsafe extern "system" fn(
36625 *mut core::ffi::c_void,
36626 *mut *mut core::ffi::c_void,
36627 ) -> windows_core::HRESULT,
36628 pub SetContent: unsafe extern "system" fn(
36629 *mut core::ffi::c_void,
36630 *mut core::ffi::c_void,
36631 ) -> windows_core::HRESULT,
36632 pub Headers: unsafe extern "system" fn(
36633 *mut core::ffi::c_void,
36634 *mut *mut core::ffi::c_void,
36635 ) -> windows_core::HRESULT,
36636 pub StatusCode:
36637 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
36638 pub SetStatusCode:
36639 unsafe extern "system" fn(*mut core::ffi::c_void, i32) -> windows_core::HRESULT,
36640 pub ReasonPhrase: unsafe extern "system" fn(
36641 *mut core::ffi::c_void,
36642 *mut windows_core::PWSTR,
36643 ) -> windows_core::HRESULT,
36644 pub SetReasonPhrase: unsafe extern "system" fn(
36645 *mut core::ffi::c_void,
36646 windows_core::PCWSTR,
36647 ) -> windows_core::HRESULT,
36648}
36649pub trait ICoreWebView2WebResourceResponse_Impl: windows_core::IUnknownImpl {
36650 fn Content(&self) -> windows_core::Result<windows::Win32::System::Com::IStream>;
36651 fn SetContent(
36652 &self,
36653 content: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
36654 ) -> windows_core::Result<()>;
36655 fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpResponseHeaders>;
36656 fn StatusCode(&self, statuscode: *mut i32) -> windows_core::Result<()>;
36657 fn SetStatusCode(&self, statuscode: i32) -> windows_core::Result<()>;
36658 fn ReasonPhrase(&self, reasonphrase: *mut windows_core::PWSTR) -> windows_core::Result<()>;
36659 fn SetReasonPhrase(&self, reasonphrase: &windows_core::PCWSTR) -> windows_core::Result<()>;
36660}
36661impl ICoreWebView2WebResourceResponse_Vtbl {
36662 pub const fn new<Identity: ICoreWebView2WebResourceResponse_Impl, const OFFSET: isize>() -> Self
36663 {
36664 unsafe extern "system" fn Content<
36665 Identity: ICoreWebView2WebResourceResponse_Impl,
36666 const OFFSET: isize,
36667 >(
36668 this: *mut core::ffi::c_void,
36669 content: *mut *mut core::ffi::c_void,
36670 ) -> windows_core::HRESULT {
36671 unsafe {
36672 let this: &Identity =
36673 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36674 match ICoreWebView2WebResourceResponse_Impl::Content(this) {
36675 Ok(ok__) => {
36676 content.write(core::mem::transmute(ok__));
36677 windows_core::HRESULT(0)
36678 }
36679 Err(err) => err.into(),
36680 }
36681 }
36682 }
36683 unsafe extern "system" fn SetContent<
36684 Identity: ICoreWebView2WebResourceResponse_Impl,
36685 const OFFSET: isize,
36686 >(
36687 this: *mut core::ffi::c_void,
36688 content: *mut core::ffi::c_void,
36689 ) -> windows_core::HRESULT {
36690 unsafe {
36691 let this: &Identity =
36692 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36693 ICoreWebView2WebResourceResponse_Impl::SetContent(
36694 this,
36695 core::mem::transmute_copy(&content),
36696 )
36697 .into()
36698 }
36699 }
36700 unsafe extern "system" fn Headers<
36701 Identity: ICoreWebView2WebResourceResponse_Impl,
36702 const OFFSET: isize,
36703 >(
36704 this: *mut core::ffi::c_void,
36705 headers: *mut *mut core::ffi::c_void,
36706 ) -> windows_core::HRESULT {
36707 unsafe {
36708 let this: &Identity =
36709 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36710 match ICoreWebView2WebResourceResponse_Impl::Headers(this) {
36711 Ok(ok__) => {
36712 headers.write(core::mem::transmute(ok__));
36713 windows_core::HRESULT(0)
36714 }
36715 Err(err) => err.into(),
36716 }
36717 }
36718 }
36719 unsafe extern "system" fn StatusCode<
36720 Identity: ICoreWebView2WebResourceResponse_Impl,
36721 const OFFSET: isize,
36722 >(
36723 this: *mut core::ffi::c_void,
36724 statuscode: *mut i32,
36725 ) -> windows_core::HRESULT {
36726 unsafe {
36727 let this: &Identity =
36728 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36729 ICoreWebView2WebResourceResponse_Impl::StatusCode(
36730 this,
36731 core::mem::transmute_copy(&statuscode),
36732 )
36733 .into()
36734 }
36735 }
36736 unsafe extern "system" fn SetStatusCode<
36737 Identity: ICoreWebView2WebResourceResponse_Impl,
36738 const OFFSET: isize,
36739 >(
36740 this: *mut core::ffi::c_void,
36741 statuscode: i32,
36742 ) -> windows_core::HRESULT {
36743 unsafe {
36744 let this: &Identity =
36745 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36746 ICoreWebView2WebResourceResponse_Impl::SetStatusCode(
36747 this,
36748 core::mem::transmute_copy(&statuscode),
36749 )
36750 .into()
36751 }
36752 }
36753 unsafe extern "system" fn ReasonPhrase<
36754 Identity: ICoreWebView2WebResourceResponse_Impl,
36755 const OFFSET: isize,
36756 >(
36757 this: *mut core::ffi::c_void,
36758 reasonphrase: *mut windows_core::PWSTR,
36759 ) -> windows_core::HRESULT {
36760 unsafe {
36761 let this: &Identity =
36762 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36763 ICoreWebView2WebResourceResponse_Impl::ReasonPhrase(
36764 this,
36765 core::mem::transmute_copy(&reasonphrase),
36766 )
36767 .into()
36768 }
36769 }
36770 unsafe extern "system" fn SetReasonPhrase<
36771 Identity: ICoreWebView2WebResourceResponse_Impl,
36772 const OFFSET: isize,
36773 >(
36774 this: *mut core::ffi::c_void,
36775 reasonphrase: windows_core::PCWSTR,
36776 ) -> windows_core::HRESULT {
36777 unsafe {
36778 let this: &Identity =
36779 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36780 ICoreWebView2WebResourceResponse_Impl::SetReasonPhrase(
36781 this,
36782 core::mem::transmute(&reasonphrase),
36783 )
36784 .into()
36785 }
36786 }
36787 Self {
36788 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
36789 Content: Content::<Identity, OFFSET>,
36790 SetContent: SetContent::<Identity, OFFSET>,
36791 Headers: Headers::<Identity, OFFSET>,
36792 StatusCode: StatusCode::<Identity, OFFSET>,
36793 SetStatusCode: SetStatusCode::<Identity, OFFSET>,
36794 ReasonPhrase: ReasonPhrase::<Identity, OFFSET>,
36795 SetReasonPhrase: SetReasonPhrase::<Identity, OFFSET>,
36796 }
36797 }
36798 pub fn matches(iid: &windows_core::GUID) -> bool {
36799 iid == &<ICoreWebView2WebResourceResponse as windows_core::Interface>::IID
36800 }
36801}
36802impl windows_core::RuntimeName for ICoreWebView2WebResourceResponse {}
36803windows_core::imp::define_interface!(
36804 ICoreWebView2WebResourceResponseReceivedEventArgs,
36805 ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl,
36806 0xd1db483d_6796_4b8b_80fc_13712bb716f4
36807);
36808windows_core::imp::interface_hierarchy!(
36809 ICoreWebView2WebResourceResponseReceivedEventArgs,
36810 windows_core::IUnknown
36811);
36812impl ICoreWebView2WebResourceResponseReceivedEventArgs {
36813 pub unsafe fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest> {
36814 unsafe {
36815 let mut result__ = core::mem::zeroed();
36816 (windows_core::Interface::vtable(self).Request)(
36817 windows_core::Interface::as_raw(self),
36818 &mut result__,
36819 )
36820 .and_then(|| windows_core::Type::from_abi(result__))
36821 }
36822 }
36823 pub unsafe fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponseView> {
36824 unsafe {
36825 let mut result__ = core::mem::zeroed();
36826 (windows_core::Interface::vtable(self).Response)(
36827 windows_core::Interface::as_raw(self),
36828 &mut result__,
36829 )
36830 .and_then(|| windows_core::Type::from_abi(result__))
36831 }
36832 }
36833}
36834#[repr(C)]
36835pub struct ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
36836 pub base__: windows_core::IUnknown_Vtbl,
36837 pub Request: unsafe extern "system" fn(
36838 *mut core::ffi::c_void,
36839 *mut *mut core::ffi::c_void,
36840 ) -> windows_core::HRESULT,
36841 pub Response: unsafe extern "system" fn(
36842 *mut core::ffi::c_void,
36843 *mut *mut core::ffi::c_void,
36844 ) -> windows_core::HRESULT,
36845}
36846pub trait ICoreWebView2WebResourceResponseReceivedEventArgs_Impl:
36847 windows_core::IUnknownImpl
36848{
36849 fn Request(&self) -> windows_core::Result<ICoreWebView2WebResourceRequest>;
36850 fn Response(&self) -> windows_core::Result<ICoreWebView2WebResourceResponseView>;
36851}
36852impl ICoreWebView2WebResourceResponseReceivedEventArgs_Vtbl {
36853 pub const fn new<
36854 Identity: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
36855 const OFFSET: isize,
36856 >() -> Self {
36857 unsafe extern "system" fn Request<
36858 Identity: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
36859 const OFFSET: isize,
36860 >(
36861 this: *mut core::ffi::c_void,
36862 value: *mut *mut core::ffi::c_void,
36863 ) -> windows_core::HRESULT {
36864 unsafe {
36865 let this: &Identity =
36866 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36867 match ICoreWebView2WebResourceResponseReceivedEventArgs_Impl::Request(this) {
36868 Ok(ok__) => {
36869 value.write(core::mem::transmute(ok__));
36870 windows_core::HRESULT(0)
36871 }
36872 Err(err) => err.into(),
36873 }
36874 }
36875 }
36876 unsafe extern "system" fn Response<
36877 Identity: ICoreWebView2WebResourceResponseReceivedEventArgs_Impl,
36878 const OFFSET: isize,
36879 >(
36880 this: *mut core::ffi::c_void,
36881 value: *mut *mut core::ffi::c_void,
36882 ) -> windows_core::HRESULT {
36883 unsafe {
36884 let this: &Identity =
36885 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36886 match ICoreWebView2WebResourceResponseReceivedEventArgs_Impl::Response(this) {
36887 Ok(ok__) => {
36888 value.write(core::mem::transmute(ok__));
36889 windows_core::HRESULT(0)
36890 }
36891 Err(err) => err.into(),
36892 }
36893 }
36894 }
36895 Self {
36896 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
36897 Request: Request::<Identity, OFFSET>,
36898 Response: Response::<Identity, OFFSET>,
36899 }
36900 }
36901 pub fn matches(iid: &windows_core::GUID) -> bool {
36902 iid == &<ICoreWebView2WebResourceResponseReceivedEventArgs as windows_core::Interface>::IID
36903 }
36904}
36905impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseReceivedEventArgs {}
36906windows_core::imp::define_interface!(
36907 ICoreWebView2WebResourceResponseReceivedEventHandler,
36908 ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl,
36909 0x7de9898a_24f5_40c3_a2de_d4f458e69828
36910);
36911windows_core::imp::interface_hierarchy!(
36912 ICoreWebView2WebResourceResponseReceivedEventHandler,
36913 windows_core::IUnknown
36914);
36915impl ICoreWebView2WebResourceResponseReceivedEventHandler {
36916 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
36917 where
36918 P0: windows_core::Param<ICoreWebView2>,
36919 P1: windows_core::Param<ICoreWebView2WebResourceResponseReceivedEventArgs>,
36920 {
36921 unsafe {
36922 (windows_core::Interface::vtable(self).Invoke)(
36923 windows_core::Interface::as_raw(self),
36924 sender.param().abi(),
36925 args.param().abi(),
36926 )
36927 .ok()
36928 }
36929 }
36930}
36931#[repr(C)]
36932pub struct ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
36933 pub base__: windows_core::IUnknown_Vtbl,
36934 pub Invoke: unsafe extern "system" fn(
36935 *mut core::ffi::c_void,
36936 *mut core::ffi::c_void,
36937 *mut core::ffi::c_void,
36938 ) -> windows_core::HRESULT,
36939}
36940pub trait ICoreWebView2WebResourceResponseReceivedEventHandler_Impl:
36941 windows_core::IUnknownImpl
36942{
36943 fn Invoke(
36944 &self,
36945 sender: windows_core::Ref<'_, ICoreWebView2>,
36946 args: windows_core::Ref<'_, ICoreWebView2WebResourceResponseReceivedEventArgs>,
36947 ) -> windows_core::Result<()>;
36948}
36949impl ICoreWebView2WebResourceResponseReceivedEventHandler_Vtbl {
36950 pub const fn new<
36951 Identity: ICoreWebView2WebResourceResponseReceivedEventHandler_Impl,
36952 const OFFSET: isize,
36953 >() -> Self {
36954 unsafe extern "system" fn Invoke<
36955 Identity: ICoreWebView2WebResourceResponseReceivedEventHandler_Impl,
36956 const OFFSET: isize,
36957 >(
36958 this: *mut core::ffi::c_void,
36959 sender: *mut core::ffi::c_void,
36960 args: *mut core::ffi::c_void,
36961 ) -> windows_core::HRESULT {
36962 unsafe {
36963 let this: &Identity =
36964 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
36965 ICoreWebView2WebResourceResponseReceivedEventHandler_Impl::Invoke(
36966 this,
36967 core::mem::transmute_copy(&sender),
36968 core::mem::transmute_copy(&args),
36969 )
36970 .into()
36971 }
36972 }
36973 Self {
36974 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
36975 Invoke: Invoke::<Identity, OFFSET>,
36976 }
36977 }
36978 pub fn matches(iid: &windows_core::GUID) -> bool {
36979 iid == & < ICoreWebView2WebResourceResponseReceivedEventHandler as windows_core::Interface >::IID
36980 }
36981}
36982impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseReceivedEventHandler {}
36983windows_core::imp::define_interface!(
36984 ICoreWebView2WebResourceResponseView,
36985 ICoreWebView2WebResourceResponseView_Vtbl,
36986 0x79701053_7759_4162_8f7d_f1b3f084928d
36987);
36988windows_core::imp::interface_hierarchy!(
36989 ICoreWebView2WebResourceResponseView,
36990 windows_core::IUnknown
36991);
36992impl ICoreWebView2WebResourceResponseView {
36993 pub unsafe fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpResponseHeaders> {
36994 unsafe {
36995 let mut result__ = core::mem::zeroed();
36996 (windows_core::Interface::vtable(self).Headers)(
36997 windows_core::Interface::as_raw(self),
36998 &mut result__,
36999 )
37000 .and_then(|| windows_core::Type::from_abi(result__))
37001 }
37002 }
37003 pub unsafe fn StatusCode(&self, statuscode: *mut i32) -> windows_core::Result<()> {
37004 unsafe {
37005 (windows_core::Interface::vtable(self).StatusCode)(
37006 windows_core::Interface::as_raw(self),
37007 statuscode as _,
37008 )
37009 .ok()
37010 }
37011 }
37012 pub unsafe fn ReasonPhrase(
37013 &self,
37014 reasonphrase: *mut windows_core::PWSTR,
37015 ) -> windows_core::Result<()> {
37016 unsafe {
37017 (windows_core::Interface::vtable(self).ReasonPhrase)(
37018 windows_core::Interface::as_raw(self),
37019 reasonphrase as _,
37020 )
37021 .ok()
37022 }
37023 }
37024 pub unsafe fn GetContent<P0>(&self, handler: P0) -> windows_core::Result<()>
37025 where
37026 P0: windows_core::Param<ICoreWebView2WebResourceResponseViewGetContentCompletedHandler>,
37027 {
37028 unsafe {
37029 (windows_core::Interface::vtable(self).GetContent)(
37030 windows_core::Interface::as_raw(self),
37031 handler.param().abi(),
37032 )
37033 .ok()
37034 }
37035 }
37036}
37037#[repr(C)]
37038pub struct ICoreWebView2WebResourceResponseView_Vtbl {
37039 pub base__: windows_core::IUnknown_Vtbl,
37040 pub Headers: unsafe extern "system" fn(
37041 *mut core::ffi::c_void,
37042 *mut *mut core::ffi::c_void,
37043 ) -> windows_core::HRESULT,
37044 pub StatusCode:
37045 unsafe extern "system" fn(*mut core::ffi::c_void, *mut i32) -> windows_core::HRESULT,
37046 pub ReasonPhrase: unsafe extern "system" fn(
37047 *mut core::ffi::c_void,
37048 *mut windows_core::PWSTR,
37049 ) -> windows_core::HRESULT,
37050 pub GetContent: unsafe extern "system" fn(
37051 *mut core::ffi::c_void,
37052 *mut core::ffi::c_void,
37053 ) -> windows_core::HRESULT,
37054}
37055pub trait ICoreWebView2WebResourceResponseView_Impl: windows_core::IUnknownImpl {
37056 fn Headers(&self) -> windows_core::Result<ICoreWebView2HttpResponseHeaders>;
37057 fn StatusCode(&self, statuscode: *mut i32) -> windows_core::Result<()>;
37058 fn ReasonPhrase(&self, reasonphrase: *mut windows_core::PWSTR) -> windows_core::Result<()>;
37059 fn GetContent(
37060 &self,
37061 handler: windows_core::Ref<
37062 '_,
37063 ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
37064 >,
37065 ) -> windows_core::Result<()>;
37066}
37067impl ICoreWebView2WebResourceResponseView_Vtbl {
37068 pub const fn new<Identity: ICoreWebView2WebResourceResponseView_Impl, const OFFSET: isize>(
37069 ) -> Self {
37070 unsafe extern "system" fn Headers<
37071 Identity: ICoreWebView2WebResourceResponseView_Impl,
37072 const OFFSET: isize,
37073 >(
37074 this: *mut core::ffi::c_void,
37075 headers: *mut *mut core::ffi::c_void,
37076 ) -> windows_core::HRESULT {
37077 unsafe {
37078 let this: &Identity =
37079 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37080 match ICoreWebView2WebResourceResponseView_Impl::Headers(this) {
37081 Ok(ok__) => {
37082 headers.write(core::mem::transmute(ok__));
37083 windows_core::HRESULT(0)
37084 }
37085 Err(err) => err.into(),
37086 }
37087 }
37088 }
37089 unsafe extern "system" fn StatusCode<
37090 Identity: ICoreWebView2WebResourceResponseView_Impl,
37091 const OFFSET: isize,
37092 >(
37093 this: *mut core::ffi::c_void,
37094 statuscode: *mut i32,
37095 ) -> windows_core::HRESULT {
37096 unsafe {
37097 let this: &Identity =
37098 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37099 ICoreWebView2WebResourceResponseView_Impl::StatusCode(
37100 this,
37101 core::mem::transmute_copy(&statuscode),
37102 )
37103 .into()
37104 }
37105 }
37106 unsafe extern "system" fn ReasonPhrase<
37107 Identity: ICoreWebView2WebResourceResponseView_Impl,
37108 const OFFSET: isize,
37109 >(
37110 this: *mut core::ffi::c_void,
37111 reasonphrase: *mut windows_core::PWSTR,
37112 ) -> windows_core::HRESULT {
37113 unsafe {
37114 let this: &Identity =
37115 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37116 ICoreWebView2WebResourceResponseView_Impl::ReasonPhrase(
37117 this,
37118 core::mem::transmute_copy(&reasonphrase),
37119 )
37120 .into()
37121 }
37122 }
37123 unsafe extern "system" fn GetContent<
37124 Identity: ICoreWebView2WebResourceResponseView_Impl,
37125 const OFFSET: isize,
37126 >(
37127 this: *mut core::ffi::c_void,
37128 handler: *mut core::ffi::c_void,
37129 ) -> windows_core::HRESULT {
37130 unsafe {
37131 let this: &Identity =
37132 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37133 ICoreWebView2WebResourceResponseView_Impl::GetContent(
37134 this,
37135 core::mem::transmute_copy(&handler),
37136 )
37137 .into()
37138 }
37139 }
37140 Self {
37141 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
37142 Headers: Headers::<Identity, OFFSET>,
37143 StatusCode: StatusCode::<Identity, OFFSET>,
37144 ReasonPhrase: ReasonPhrase::<Identity, OFFSET>,
37145 GetContent: GetContent::<Identity, OFFSET>,
37146 }
37147 }
37148 pub fn matches(iid: &windows_core::GUID) -> bool {
37149 iid == &<ICoreWebView2WebResourceResponseView as windows_core::Interface>::IID
37150 }
37151}
37152impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseView {}
37153windows_core::imp::define_interface!(
37154 ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
37155 ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl,
37156 0x875738e1_9fa2_40e3_8b74_2e8972dd6fe7
37157);
37158windows_core::imp::interface_hierarchy!(
37159 ICoreWebView2WebResourceResponseViewGetContentCompletedHandler,
37160 windows_core::IUnknown
37161);
37162impl ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {
37163 pub unsafe fn Invoke<P1>(
37164 &self,
37165 errorcode: windows_core::HRESULT,
37166 result: P1,
37167 ) -> windows_core::Result<()>
37168 where
37169 P1: windows_core::Param<windows::Win32::System::Com::IStream>,
37170 {
37171 unsafe {
37172 (windows_core::Interface::vtable(self).Invoke)(
37173 windows_core::Interface::as_raw(self),
37174 errorcode,
37175 result.param().abi(),
37176 )
37177 .ok()
37178 }
37179 }
37180}
37181#[repr(C)]
37182pub struct ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
37183 pub base__: windows_core::IUnknown_Vtbl,
37184 pub Invoke: unsafe extern "system" fn(
37185 *mut core::ffi::c_void,
37186 windows_core::HRESULT,
37187 *mut core::ffi::c_void,
37188 ) -> windows_core::HRESULT,
37189}
37190pub trait ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl:
37191 windows_core::IUnknownImpl
37192{
37193 fn Invoke(
37194 &self,
37195 errorcode: windows_core::HRESULT,
37196 result: windows_core::Ref<'_, windows::Win32::System::Com::IStream>,
37197 ) -> windows_core::Result<()>;
37198}
37199impl ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Vtbl {
37200 pub const fn new<
37201 Identity: ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl,
37202 const OFFSET: isize,
37203 >() -> Self {
37204 unsafe extern "system" fn Invoke<
37205 Identity: ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl,
37206 const OFFSET: isize,
37207 >(
37208 this: *mut core::ffi::c_void,
37209 errorcode: windows_core::HRESULT,
37210 result: *mut core::ffi::c_void,
37211 ) -> windows_core::HRESULT {
37212 unsafe {
37213 let this: &Identity =
37214 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37215 ICoreWebView2WebResourceResponseViewGetContentCompletedHandler_Impl::Invoke(
37216 this,
37217 core::mem::transmute_copy(&errorcode),
37218 core::mem::transmute_copy(&result),
37219 )
37220 .into()
37221 }
37222 }
37223 Self {
37224 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
37225 Invoke: Invoke::<Identity, OFFSET>,
37226 }
37227 }
37228 pub fn matches(iid: &windows_core::GUID) -> bool {
37229 iid == & < ICoreWebView2WebResourceResponseViewGetContentCompletedHandler as windows_core::Interface >::IID
37230 }
37231}
37232impl windows_core::RuntimeName for ICoreWebView2WebResourceResponseViewGetContentCompletedHandler {}
37233windows_core::imp::define_interface!(
37234 ICoreWebView2WindowCloseRequestedEventHandler,
37235 ICoreWebView2WindowCloseRequestedEventHandler_Vtbl,
37236 0x5c19e9e0_092f_486b_affa_ca8231913039
37237);
37238windows_core::imp::interface_hierarchy!(
37239 ICoreWebView2WindowCloseRequestedEventHandler,
37240 windows_core::IUnknown
37241);
37242impl ICoreWebView2WindowCloseRequestedEventHandler {
37243 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
37244 where
37245 P0: windows_core::Param<ICoreWebView2>,
37246 P1: windows_core::Param<windows_core::IUnknown>,
37247 {
37248 unsafe {
37249 (windows_core::Interface::vtable(self).Invoke)(
37250 windows_core::Interface::as_raw(self),
37251 sender.param().abi(),
37252 args.param().abi(),
37253 )
37254 .ok()
37255 }
37256 }
37257}
37258#[repr(C)]
37259pub struct ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
37260 pub base__: windows_core::IUnknown_Vtbl,
37261 pub Invoke: unsafe extern "system" fn(
37262 *mut core::ffi::c_void,
37263 *mut core::ffi::c_void,
37264 *mut core::ffi::c_void,
37265 ) -> windows_core::HRESULT,
37266}
37267pub trait ICoreWebView2WindowCloseRequestedEventHandler_Impl: windows_core::IUnknownImpl {
37268 fn Invoke(
37269 &self,
37270 sender: windows_core::Ref<'_, ICoreWebView2>,
37271 args: windows_core::Ref<'_, windows_core::IUnknown>,
37272 ) -> windows_core::Result<()>;
37273}
37274impl ICoreWebView2WindowCloseRequestedEventHandler_Vtbl {
37275 pub const fn new<
37276 Identity: ICoreWebView2WindowCloseRequestedEventHandler_Impl,
37277 const OFFSET: isize,
37278 >() -> Self {
37279 unsafe extern "system" fn Invoke<
37280 Identity: ICoreWebView2WindowCloseRequestedEventHandler_Impl,
37281 const OFFSET: isize,
37282 >(
37283 this: *mut core::ffi::c_void,
37284 sender: *mut core::ffi::c_void,
37285 args: *mut core::ffi::c_void,
37286 ) -> windows_core::HRESULT {
37287 unsafe {
37288 let this: &Identity =
37289 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37290 ICoreWebView2WindowCloseRequestedEventHandler_Impl::Invoke(
37291 this,
37292 core::mem::transmute_copy(&sender),
37293 core::mem::transmute_copy(&args),
37294 )
37295 .into()
37296 }
37297 }
37298 Self {
37299 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
37300 Invoke: Invoke::<Identity, OFFSET>,
37301 }
37302 }
37303 pub fn matches(iid: &windows_core::GUID) -> bool {
37304 iid == &<ICoreWebView2WindowCloseRequestedEventHandler as windows_core::Interface>::IID
37305 }
37306}
37307impl windows_core::RuntimeName for ICoreWebView2WindowCloseRequestedEventHandler {}
37308windows_core::imp::define_interface!(
37309 ICoreWebView2WindowFeatures,
37310 ICoreWebView2WindowFeatures_Vtbl,
37311 0x5eaf559f_b46e_4397_8860_e422f287ff1e
37312);
37313windows_core::imp::interface_hierarchy!(ICoreWebView2WindowFeatures, windows_core::IUnknown);
37314impl ICoreWebView2WindowFeatures {
37315 pub unsafe fn HasPosition(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
37316 unsafe {
37317 (windows_core::Interface::vtable(self).HasPosition)(
37318 windows_core::Interface::as_raw(self),
37319 value as _,
37320 )
37321 .ok()
37322 }
37323 }
37324 pub unsafe fn HasSize(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
37325 unsafe {
37326 (windows_core::Interface::vtable(self).HasSize)(
37327 windows_core::Interface::as_raw(self),
37328 value as _,
37329 )
37330 .ok()
37331 }
37332 }
37333 pub unsafe fn Left(&self, value: *mut u32) -> windows_core::Result<()> {
37334 unsafe {
37335 (windows_core::Interface::vtable(self).Left)(
37336 windows_core::Interface::as_raw(self),
37337 value as _,
37338 )
37339 .ok()
37340 }
37341 }
37342 pub unsafe fn Top(&self, value: *mut u32) -> windows_core::Result<()> {
37343 unsafe {
37344 (windows_core::Interface::vtable(self).Top)(
37345 windows_core::Interface::as_raw(self),
37346 value as _,
37347 )
37348 .ok()
37349 }
37350 }
37351 pub unsafe fn Height(&self, value: *mut u32) -> windows_core::Result<()> {
37352 unsafe {
37353 (windows_core::Interface::vtable(self).Height)(
37354 windows_core::Interface::as_raw(self),
37355 value as _,
37356 )
37357 .ok()
37358 }
37359 }
37360 pub unsafe fn Width(&self, value: *mut u32) -> windows_core::Result<()> {
37361 unsafe {
37362 (windows_core::Interface::vtable(self).Width)(
37363 windows_core::Interface::as_raw(self),
37364 value as _,
37365 )
37366 .ok()
37367 }
37368 }
37369 pub unsafe fn ShouldDisplayMenuBar(
37370 &self,
37371 value: *mut windows_core::BOOL,
37372 ) -> windows_core::Result<()> {
37373 unsafe {
37374 (windows_core::Interface::vtable(self).ShouldDisplayMenuBar)(
37375 windows_core::Interface::as_raw(self),
37376 value as _,
37377 )
37378 .ok()
37379 }
37380 }
37381 pub unsafe fn ShouldDisplayStatus(
37382 &self,
37383 value: *mut windows_core::BOOL,
37384 ) -> windows_core::Result<()> {
37385 unsafe {
37386 (windows_core::Interface::vtable(self).ShouldDisplayStatus)(
37387 windows_core::Interface::as_raw(self),
37388 value as _,
37389 )
37390 .ok()
37391 }
37392 }
37393 pub unsafe fn ShouldDisplayToolbar(
37394 &self,
37395 value: *mut windows_core::BOOL,
37396 ) -> windows_core::Result<()> {
37397 unsafe {
37398 (windows_core::Interface::vtable(self).ShouldDisplayToolbar)(
37399 windows_core::Interface::as_raw(self),
37400 value as _,
37401 )
37402 .ok()
37403 }
37404 }
37405 pub unsafe fn ShouldDisplayScrollBars(
37406 &self,
37407 value: *mut windows_core::BOOL,
37408 ) -> windows_core::Result<()> {
37409 unsafe {
37410 (windows_core::Interface::vtable(self).ShouldDisplayScrollBars)(
37411 windows_core::Interface::as_raw(self),
37412 value as _,
37413 )
37414 .ok()
37415 }
37416 }
37417}
37418#[repr(C)]
37419pub struct ICoreWebView2WindowFeatures_Vtbl {
37420 pub base__: windows_core::IUnknown_Vtbl,
37421 pub HasPosition: unsafe extern "system" fn(
37422 *mut core::ffi::c_void,
37423 *mut windows_core::BOOL,
37424 ) -> windows_core::HRESULT,
37425 pub HasSize: unsafe extern "system" fn(
37426 *mut core::ffi::c_void,
37427 *mut windows_core::BOOL,
37428 ) -> windows_core::HRESULT,
37429 pub Left: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
37430 pub Top: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
37431 pub Height:
37432 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
37433 pub Width: unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
37434 pub ShouldDisplayMenuBar: unsafe extern "system" fn(
37435 *mut core::ffi::c_void,
37436 *mut windows_core::BOOL,
37437 ) -> windows_core::HRESULT,
37438 pub ShouldDisplayStatus: unsafe extern "system" fn(
37439 *mut core::ffi::c_void,
37440 *mut windows_core::BOOL,
37441 ) -> windows_core::HRESULT,
37442 pub ShouldDisplayToolbar: unsafe extern "system" fn(
37443 *mut core::ffi::c_void,
37444 *mut windows_core::BOOL,
37445 ) -> windows_core::HRESULT,
37446 pub ShouldDisplayScrollBars: unsafe extern "system" fn(
37447 *mut core::ffi::c_void,
37448 *mut windows_core::BOOL,
37449 ) -> windows_core::HRESULT,
37450}
37451pub trait ICoreWebView2WindowFeatures_Impl: windows_core::IUnknownImpl {
37452 fn HasPosition(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
37453 fn HasSize(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
37454 fn Left(&self, value: *mut u32) -> windows_core::Result<()>;
37455 fn Top(&self, value: *mut u32) -> windows_core::Result<()>;
37456 fn Height(&self, value: *mut u32) -> windows_core::Result<()>;
37457 fn Width(&self, value: *mut u32) -> windows_core::Result<()>;
37458 fn ShouldDisplayMenuBar(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
37459 fn ShouldDisplayStatus(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
37460 fn ShouldDisplayToolbar(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
37461 fn ShouldDisplayScrollBars(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
37462}
37463impl ICoreWebView2WindowFeatures_Vtbl {
37464 pub const fn new<Identity: ICoreWebView2WindowFeatures_Impl, const OFFSET: isize>() -> Self {
37465 unsafe extern "system" fn HasPosition<
37466 Identity: ICoreWebView2WindowFeatures_Impl,
37467 const OFFSET: isize,
37468 >(
37469 this: *mut core::ffi::c_void,
37470 value: *mut windows_core::BOOL,
37471 ) -> windows_core::HRESULT {
37472 unsafe {
37473 let this: &Identity =
37474 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37475 ICoreWebView2WindowFeatures_Impl::HasPosition(
37476 this,
37477 core::mem::transmute_copy(&value),
37478 )
37479 .into()
37480 }
37481 }
37482 unsafe extern "system" fn HasSize<
37483 Identity: ICoreWebView2WindowFeatures_Impl,
37484 const OFFSET: isize,
37485 >(
37486 this: *mut core::ffi::c_void,
37487 value: *mut windows_core::BOOL,
37488 ) -> windows_core::HRESULT {
37489 unsafe {
37490 let this: &Identity =
37491 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37492 ICoreWebView2WindowFeatures_Impl::HasSize(this, core::mem::transmute_copy(&value))
37493 .into()
37494 }
37495 }
37496 unsafe extern "system" fn Left<
37497 Identity: ICoreWebView2WindowFeatures_Impl,
37498 const OFFSET: isize,
37499 >(
37500 this: *mut core::ffi::c_void,
37501 value: *mut u32,
37502 ) -> windows_core::HRESULT {
37503 unsafe {
37504 let this: &Identity =
37505 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37506 ICoreWebView2WindowFeatures_Impl::Left(this, core::mem::transmute_copy(&value))
37507 .into()
37508 }
37509 }
37510 unsafe extern "system" fn Top<
37511 Identity: ICoreWebView2WindowFeatures_Impl,
37512 const OFFSET: isize,
37513 >(
37514 this: *mut core::ffi::c_void,
37515 value: *mut u32,
37516 ) -> windows_core::HRESULT {
37517 unsafe {
37518 let this: &Identity =
37519 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37520 ICoreWebView2WindowFeatures_Impl::Top(this, core::mem::transmute_copy(&value))
37521 .into()
37522 }
37523 }
37524 unsafe extern "system" fn Height<
37525 Identity: ICoreWebView2WindowFeatures_Impl,
37526 const OFFSET: isize,
37527 >(
37528 this: *mut core::ffi::c_void,
37529 value: *mut u32,
37530 ) -> windows_core::HRESULT {
37531 unsafe {
37532 let this: &Identity =
37533 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37534 ICoreWebView2WindowFeatures_Impl::Height(this, core::mem::transmute_copy(&value))
37535 .into()
37536 }
37537 }
37538 unsafe extern "system" fn Width<
37539 Identity: ICoreWebView2WindowFeatures_Impl,
37540 const OFFSET: isize,
37541 >(
37542 this: *mut core::ffi::c_void,
37543 value: *mut u32,
37544 ) -> windows_core::HRESULT {
37545 unsafe {
37546 let this: &Identity =
37547 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37548 ICoreWebView2WindowFeatures_Impl::Width(this, core::mem::transmute_copy(&value))
37549 .into()
37550 }
37551 }
37552 unsafe extern "system" fn ShouldDisplayMenuBar<
37553 Identity: ICoreWebView2WindowFeatures_Impl,
37554 const OFFSET: isize,
37555 >(
37556 this: *mut core::ffi::c_void,
37557 value: *mut windows_core::BOOL,
37558 ) -> windows_core::HRESULT {
37559 unsafe {
37560 let this: &Identity =
37561 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37562 ICoreWebView2WindowFeatures_Impl::ShouldDisplayMenuBar(
37563 this,
37564 core::mem::transmute_copy(&value),
37565 )
37566 .into()
37567 }
37568 }
37569 unsafe extern "system" fn ShouldDisplayStatus<
37570 Identity: ICoreWebView2WindowFeatures_Impl,
37571 const OFFSET: isize,
37572 >(
37573 this: *mut core::ffi::c_void,
37574 value: *mut windows_core::BOOL,
37575 ) -> windows_core::HRESULT {
37576 unsafe {
37577 let this: &Identity =
37578 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37579 ICoreWebView2WindowFeatures_Impl::ShouldDisplayStatus(
37580 this,
37581 core::mem::transmute_copy(&value),
37582 )
37583 .into()
37584 }
37585 }
37586 unsafe extern "system" fn ShouldDisplayToolbar<
37587 Identity: ICoreWebView2WindowFeatures_Impl,
37588 const OFFSET: isize,
37589 >(
37590 this: *mut core::ffi::c_void,
37591 value: *mut windows_core::BOOL,
37592 ) -> windows_core::HRESULT {
37593 unsafe {
37594 let this: &Identity =
37595 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37596 ICoreWebView2WindowFeatures_Impl::ShouldDisplayToolbar(
37597 this,
37598 core::mem::transmute_copy(&value),
37599 )
37600 .into()
37601 }
37602 }
37603 unsafe extern "system" fn ShouldDisplayScrollBars<
37604 Identity: ICoreWebView2WindowFeatures_Impl,
37605 const OFFSET: isize,
37606 >(
37607 this: *mut core::ffi::c_void,
37608 value: *mut windows_core::BOOL,
37609 ) -> windows_core::HRESULT {
37610 unsafe {
37611 let this: &Identity =
37612 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37613 ICoreWebView2WindowFeatures_Impl::ShouldDisplayScrollBars(
37614 this,
37615 core::mem::transmute_copy(&value),
37616 )
37617 .into()
37618 }
37619 }
37620 Self {
37621 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
37622 HasPosition: HasPosition::<Identity, OFFSET>,
37623 HasSize: HasSize::<Identity, OFFSET>,
37624 Left: Left::<Identity, OFFSET>,
37625 Top: Top::<Identity, OFFSET>,
37626 Height: Height::<Identity, OFFSET>,
37627 Width: Width::<Identity, OFFSET>,
37628 ShouldDisplayMenuBar: ShouldDisplayMenuBar::<Identity, OFFSET>,
37629 ShouldDisplayStatus: ShouldDisplayStatus::<Identity, OFFSET>,
37630 ShouldDisplayToolbar: ShouldDisplayToolbar::<Identity, OFFSET>,
37631 ShouldDisplayScrollBars: ShouldDisplayScrollBars::<Identity, OFFSET>,
37632 }
37633 }
37634 pub fn matches(iid: &windows_core::GUID) -> bool {
37635 iid == &<ICoreWebView2WindowFeatures as windows_core::Interface>::IID
37636 }
37637}
37638impl windows_core::RuntimeName for ICoreWebView2WindowFeatures {}
37639windows_core::imp::define_interface!(
37640 ICoreWebView2ZoomFactorChangedEventHandler,
37641 ICoreWebView2ZoomFactorChangedEventHandler_Vtbl,
37642 0xb52d71d6_c4df_4543_a90c_64a3e60f38cb
37643);
37644windows_core::imp::interface_hierarchy!(
37645 ICoreWebView2ZoomFactorChangedEventHandler,
37646 windows_core::IUnknown
37647);
37648impl ICoreWebView2ZoomFactorChangedEventHandler {
37649 pub unsafe fn Invoke<P0, P1>(&self, sender: P0, args: P1) -> windows_core::Result<()>
37650 where
37651 P0: windows_core::Param<ICoreWebView2Controller>,
37652 P1: windows_core::Param<windows_core::IUnknown>,
37653 {
37654 unsafe {
37655 (windows_core::Interface::vtable(self).Invoke)(
37656 windows_core::Interface::as_raw(self),
37657 sender.param().abi(),
37658 args.param().abi(),
37659 )
37660 .ok()
37661 }
37662 }
37663}
37664#[repr(C)]
37665pub struct ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
37666 pub base__: windows_core::IUnknown_Vtbl,
37667 pub Invoke: unsafe extern "system" fn(
37668 *mut core::ffi::c_void,
37669 *mut core::ffi::c_void,
37670 *mut core::ffi::c_void,
37671 ) -> windows_core::HRESULT,
37672}
37673pub trait ICoreWebView2ZoomFactorChangedEventHandler_Impl: windows_core::IUnknownImpl {
37674 fn Invoke(
37675 &self,
37676 sender: windows_core::Ref<'_, ICoreWebView2Controller>,
37677 args: windows_core::Ref<'_, windows_core::IUnknown>,
37678 ) -> windows_core::Result<()>;
37679}
37680impl ICoreWebView2ZoomFactorChangedEventHandler_Vtbl {
37681 pub const fn new<
37682 Identity: ICoreWebView2ZoomFactorChangedEventHandler_Impl,
37683 const OFFSET: isize,
37684 >() -> Self {
37685 unsafe extern "system" fn Invoke<
37686 Identity: ICoreWebView2ZoomFactorChangedEventHandler_Impl,
37687 const OFFSET: isize,
37688 >(
37689 this: *mut core::ffi::c_void,
37690 sender: *mut core::ffi::c_void,
37691 args: *mut core::ffi::c_void,
37692 ) -> windows_core::HRESULT {
37693 unsafe {
37694 let this: &Identity =
37695 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37696 ICoreWebView2ZoomFactorChangedEventHandler_Impl::Invoke(
37697 this,
37698 core::mem::transmute_copy(&sender),
37699 core::mem::transmute_copy(&args),
37700 )
37701 .into()
37702 }
37703 }
37704 Self {
37705 base__: windows_core::IUnknown_Vtbl::new::<Identity, OFFSET>(),
37706 Invoke: Invoke::<Identity, OFFSET>,
37707 }
37708 }
37709 pub fn matches(iid: &windows_core::GUID) -> bool {
37710 iid == &<ICoreWebView2ZoomFactorChangedEventHandler as windows_core::Interface>::IID
37711 }
37712}
37713impl windows_core::RuntimeName for ICoreWebView2ZoomFactorChangedEventHandler {}
37714windows_core::imp::define_interface!(
37715 ICoreWebView2_10,
37716 ICoreWebView2_10_Vtbl,
37717 0xb1690564_6f5a_4983_8e48_31d1143fecdb
37718);
37719impl core::ops::Deref for ICoreWebView2_10 {
37720 type Target = ICoreWebView2_9;
37721 fn deref(&self) -> &Self::Target {
37722 unsafe { core::mem::transmute(self) }
37723 }
37724}
37725windows_core::imp::interface_hierarchy!(
37726 ICoreWebView2_10,
37727 windows_core::IUnknown,
37728 ICoreWebView2,
37729 ICoreWebView2_2,
37730 ICoreWebView2_3,
37731 ICoreWebView2_4,
37732 ICoreWebView2_5,
37733 ICoreWebView2_6,
37734 ICoreWebView2_7,
37735 ICoreWebView2_8,
37736 ICoreWebView2_9
37737);
37738impl ICoreWebView2_10 {
37739 pub unsafe fn add_BasicAuthenticationRequested<P0>(
37740 &self,
37741 eventhandler: P0,
37742 token: *mut i64,
37743 ) -> windows_core::Result<()>
37744 where
37745 P0: windows_core::Param<ICoreWebView2BasicAuthenticationRequestedEventHandler>,
37746 {
37747 unsafe {
37748 (windows_core::Interface::vtable(self).add_BasicAuthenticationRequested)(
37749 windows_core::Interface::as_raw(self),
37750 eventhandler.param().abi(),
37751 token as _,
37752 )
37753 .ok()
37754 }
37755 }
37756 pub unsafe fn remove_BasicAuthenticationRequested(
37757 &self,
37758 token: i64,
37759 ) -> windows_core::Result<()> {
37760 unsafe {
37761 (windows_core::Interface::vtable(self).remove_BasicAuthenticationRequested)(
37762 windows_core::Interface::as_raw(self),
37763 token,
37764 )
37765 .ok()
37766 }
37767 }
37768}
37769#[repr(C)]
37770pub struct ICoreWebView2_10_Vtbl {
37771 pub base__: ICoreWebView2_9_Vtbl,
37772 pub add_BasicAuthenticationRequested: unsafe extern "system" fn(
37773 *mut core::ffi::c_void,
37774 *mut core::ffi::c_void,
37775 *mut i64,
37776 ) -> windows_core::HRESULT,
37777 pub remove_BasicAuthenticationRequested:
37778 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
37779}
37780pub trait ICoreWebView2_10_Impl: ICoreWebView2_9_Impl {
37781 fn add_BasicAuthenticationRequested(
37782 &self,
37783 eventhandler: windows_core::Ref<'_, ICoreWebView2BasicAuthenticationRequestedEventHandler>,
37784 token: *mut i64,
37785 ) -> windows_core::Result<()>;
37786 fn remove_BasicAuthenticationRequested(&self, token: i64) -> windows_core::Result<()>;
37787}
37788impl ICoreWebView2_10_Vtbl {
37789 pub const fn new<Identity: ICoreWebView2_10_Impl, const OFFSET: isize>() -> Self {
37790 unsafe extern "system" fn add_BasicAuthenticationRequested<
37791 Identity: ICoreWebView2_10_Impl,
37792 const OFFSET: isize,
37793 >(
37794 this: *mut core::ffi::c_void,
37795 eventhandler: *mut core::ffi::c_void,
37796 token: *mut i64,
37797 ) -> windows_core::HRESULT {
37798 unsafe {
37799 let this: &Identity =
37800 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37801 ICoreWebView2_10_Impl::add_BasicAuthenticationRequested(
37802 this,
37803 core::mem::transmute_copy(&eventhandler),
37804 core::mem::transmute_copy(&token),
37805 )
37806 .into()
37807 }
37808 }
37809 unsafe extern "system" fn remove_BasicAuthenticationRequested<
37810 Identity: ICoreWebView2_10_Impl,
37811 const OFFSET: isize,
37812 >(
37813 this: *mut core::ffi::c_void,
37814 token: i64,
37815 ) -> windows_core::HRESULT {
37816 unsafe {
37817 let this: &Identity =
37818 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37819 ICoreWebView2_10_Impl::remove_BasicAuthenticationRequested(
37820 this,
37821 core::mem::transmute_copy(&token),
37822 )
37823 .into()
37824 }
37825 }
37826 Self {
37827 base__: ICoreWebView2_9_Vtbl::new::<Identity, OFFSET>(),
37828 add_BasicAuthenticationRequested: add_BasicAuthenticationRequested::<Identity, OFFSET>,
37829 remove_BasicAuthenticationRequested: remove_BasicAuthenticationRequested::<
37830 Identity,
37831 OFFSET,
37832 >,
37833 }
37834 }
37835 pub fn matches(iid: &windows_core::GUID) -> bool {
37836 iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
37837 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
37838 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
37839 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
37840 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
37841 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
37842 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
37843 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
37844 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
37845 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
37846 }
37847}
37848impl windows_core::RuntimeName for ICoreWebView2_10 {}
37849windows_core::imp::define_interface!(
37850 ICoreWebView2_11,
37851 ICoreWebView2_11_Vtbl,
37852 0x0be78e56_c193_4051_b943_23b460c08bdb
37853);
37854impl core::ops::Deref for ICoreWebView2_11 {
37855 type Target = ICoreWebView2_10;
37856 fn deref(&self) -> &Self::Target {
37857 unsafe { core::mem::transmute(self) }
37858 }
37859}
37860windows_core::imp::interface_hierarchy!(
37861 ICoreWebView2_11,
37862 windows_core::IUnknown,
37863 ICoreWebView2,
37864 ICoreWebView2_2,
37865 ICoreWebView2_3,
37866 ICoreWebView2_4,
37867 ICoreWebView2_5,
37868 ICoreWebView2_6,
37869 ICoreWebView2_7,
37870 ICoreWebView2_8,
37871 ICoreWebView2_9,
37872 ICoreWebView2_10
37873);
37874impl ICoreWebView2_11 {
37875 pub unsafe fn CallDevToolsProtocolMethodForSession<P0, P1, P2, P3>(
37876 &self,
37877 sessionid: P0,
37878 methodname: P1,
37879 parametersasjson: P2,
37880 handler: P3,
37881 ) -> windows_core::Result<()>
37882 where
37883 P0: windows_core::Param<windows_core::PCWSTR>,
37884 P1: windows_core::Param<windows_core::PCWSTR>,
37885 P2: windows_core::Param<windows_core::PCWSTR>,
37886 P3: windows_core::Param<ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
37887 {
37888 unsafe {
37889 (windows_core::Interface::vtable(self).CallDevToolsProtocolMethodForSession)(
37890 windows_core::Interface::as_raw(self),
37891 sessionid.param().abi(),
37892 methodname.param().abi(),
37893 parametersasjson.param().abi(),
37894 handler.param().abi(),
37895 )
37896 .ok()
37897 }
37898 }
37899 pub unsafe fn add_ContextMenuRequested<P0>(
37900 &self,
37901 eventhandler: P0,
37902 token: *mut i64,
37903 ) -> windows_core::Result<()>
37904 where
37905 P0: windows_core::Param<ICoreWebView2ContextMenuRequestedEventHandler>,
37906 {
37907 unsafe {
37908 (windows_core::Interface::vtable(self).add_ContextMenuRequested)(
37909 windows_core::Interface::as_raw(self),
37910 eventhandler.param().abi(),
37911 token as _,
37912 )
37913 .ok()
37914 }
37915 }
37916 pub unsafe fn remove_ContextMenuRequested(&self, token: i64) -> windows_core::Result<()> {
37917 unsafe {
37918 (windows_core::Interface::vtable(self).remove_ContextMenuRequested)(
37919 windows_core::Interface::as_raw(self),
37920 token,
37921 )
37922 .ok()
37923 }
37924 }
37925}
37926#[repr(C)]
37927pub struct ICoreWebView2_11_Vtbl {
37928 pub base__: ICoreWebView2_10_Vtbl,
37929 pub CallDevToolsProtocolMethodForSession: unsafe extern "system" fn(
37930 *mut core::ffi::c_void,
37931 windows_core::PCWSTR,
37932 windows_core::PCWSTR,
37933 windows_core::PCWSTR,
37934 *mut core::ffi::c_void,
37935 )
37936 -> windows_core::HRESULT,
37937 pub add_ContextMenuRequested: unsafe extern "system" fn(
37938 *mut core::ffi::c_void,
37939 *mut core::ffi::c_void,
37940 *mut i64,
37941 ) -> windows_core::HRESULT,
37942 pub remove_ContextMenuRequested:
37943 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
37944}
37945pub trait ICoreWebView2_11_Impl: ICoreWebView2_10_Impl {
37946 fn CallDevToolsProtocolMethodForSession(
37947 &self,
37948 sessionid: &windows_core::PCWSTR,
37949 methodname: &windows_core::PCWSTR,
37950 parametersasjson: &windows_core::PCWSTR,
37951 handler: windows_core::Ref<'_, ICoreWebView2CallDevToolsProtocolMethodCompletedHandler>,
37952 ) -> windows_core::Result<()>;
37953 fn add_ContextMenuRequested(
37954 &self,
37955 eventhandler: windows_core::Ref<'_, ICoreWebView2ContextMenuRequestedEventHandler>,
37956 token: *mut i64,
37957 ) -> windows_core::Result<()>;
37958 fn remove_ContextMenuRequested(&self, token: i64) -> windows_core::Result<()>;
37959}
37960impl ICoreWebView2_11_Vtbl {
37961 pub const fn new<Identity: ICoreWebView2_11_Impl, const OFFSET: isize>() -> Self {
37962 unsafe extern "system" fn CallDevToolsProtocolMethodForSession<
37963 Identity: ICoreWebView2_11_Impl,
37964 const OFFSET: isize,
37965 >(
37966 this: *mut core::ffi::c_void,
37967 sessionid: windows_core::PCWSTR,
37968 methodname: windows_core::PCWSTR,
37969 parametersasjson: windows_core::PCWSTR,
37970 handler: *mut core::ffi::c_void,
37971 ) -> windows_core::HRESULT {
37972 unsafe {
37973 let this: &Identity =
37974 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37975 ICoreWebView2_11_Impl::CallDevToolsProtocolMethodForSession(
37976 this,
37977 core::mem::transmute(&sessionid),
37978 core::mem::transmute(&methodname),
37979 core::mem::transmute(¶metersasjson),
37980 core::mem::transmute_copy(&handler),
37981 )
37982 .into()
37983 }
37984 }
37985 unsafe extern "system" fn add_ContextMenuRequested<
37986 Identity: ICoreWebView2_11_Impl,
37987 const OFFSET: isize,
37988 >(
37989 this: *mut core::ffi::c_void,
37990 eventhandler: *mut core::ffi::c_void,
37991 token: *mut i64,
37992 ) -> windows_core::HRESULT {
37993 unsafe {
37994 let this: &Identity =
37995 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
37996 ICoreWebView2_11_Impl::add_ContextMenuRequested(
37997 this,
37998 core::mem::transmute_copy(&eventhandler),
37999 core::mem::transmute_copy(&token),
38000 )
38001 .into()
38002 }
38003 }
38004 unsafe extern "system" fn remove_ContextMenuRequested<
38005 Identity: ICoreWebView2_11_Impl,
38006 const OFFSET: isize,
38007 >(
38008 this: *mut core::ffi::c_void,
38009 token: i64,
38010 ) -> windows_core::HRESULT {
38011 unsafe {
38012 let this: &Identity =
38013 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38014 ICoreWebView2_11_Impl::remove_ContextMenuRequested(
38015 this,
38016 core::mem::transmute_copy(&token),
38017 )
38018 .into()
38019 }
38020 }
38021 Self {
38022 base__: ICoreWebView2_10_Vtbl::new::<Identity, OFFSET>(),
38023 CallDevToolsProtocolMethodForSession: CallDevToolsProtocolMethodForSession::<
38024 Identity,
38025 OFFSET,
38026 >,
38027 add_ContextMenuRequested: add_ContextMenuRequested::<Identity, OFFSET>,
38028 remove_ContextMenuRequested: remove_ContextMenuRequested::<Identity, OFFSET>,
38029 }
38030 }
38031 pub fn matches(iid: &windows_core::GUID) -> bool {
38032 iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
38033 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
38034 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
38035 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
38036 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
38037 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
38038 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
38039 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
38040 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
38041 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
38042 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
38043 }
38044}
38045impl windows_core::RuntimeName for ICoreWebView2_11 {}
38046windows_core::imp::define_interface!(
38047 ICoreWebView2_12,
38048 ICoreWebView2_12_Vtbl,
38049 0x35d69927_bcfa_4566_9349_6b3e0d154cac
38050);
38051impl core::ops::Deref for ICoreWebView2_12 {
38052 type Target = ICoreWebView2_11;
38053 fn deref(&self) -> &Self::Target {
38054 unsafe { core::mem::transmute(self) }
38055 }
38056}
38057windows_core::imp::interface_hierarchy!(
38058 ICoreWebView2_12,
38059 windows_core::IUnknown,
38060 ICoreWebView2,
38061 ICoreWebView2_2,
38062 ICoreWebView2_3,
38063 ICoreWebView2_4,
38064 ICoreWebView2_5,
38065 ICoreWebView2_6,
38066 ICoreWebView2_7,
38067 ICoreWebView2_8,
38068 ICoreWebView2_9,
38069 ICoreWebView2_10,
38070 ICoreWebView2_11
38071);
38072impl ICoreWebView2_12 {
38073 pub unsafe fn add_StatusBarTextChanged<P0>(
38074 &self,
38075 eventhandler: P0,
38076 token: *mut i64,
38077 ) -> windows_core::Result<()>
38078 where
38079 P0: windows_core::Param<ICoreWebView2StatusBarTextChangedEventHandler>,
38080 {
38081 unsafe {
38082 (windows_core::Interface::vtable(self).add_StatusBarTextChanged)(
38083 windows_core::Interface::as_raw(self),
38084 eventhandler.param().abi(),
38085 token as _,
38086 )
38087 .ok()
38088 }
38089 }
38090 pub unsafe fn remove_StatusBarTextChanged(&self, token: i64) -> windows_core::Result<()> {
38091 unsafe {
38092 (windows_core::Interface::vtable(self).remove_StatusBarTextChanged)(
38093 windows_core::Interface::as_raw(self),
38094 token,
38095 )
38096 .ok()
38097 }
38098 }
38099 pub unsafe fn StatusBarText(
38100 &self,
38101 value: *mut windows_core::PWSTR,
38102 ) -> windows_core::Result<()> {
38103 unsafe {
38104 (windows_core::Interface::vtable(self).StatusBarText)(
38105 windows_core::Interface::as_raw(self),
38106 value as _,
38107 )
38108 .ok()
38109 }
38110 }
38111}
38112#[repr(C)]
38113pub struct ICoreWebView2_12_Vtbl {
38114 pub base__: ICoreWebView2_11_Vtbl,
38115 pub add_StatusBarTextChanged: unsafe extern "system" fn(
38116 *mut core::ffi::c_void,
38117 *mut core::ffi::c_void,
38118 *mut i64,
38119 ) -> windows_core::HRESULT,
38120 pub remove_StatusBarTextChanged:
38121 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
38122 pub StatusBarText: unsafe extern "system" fn(
38123 *mut core::ffi::c_void,
38124 *mut windows_core::PWSTR,
38125 ) -> windows_core::HRESULT,
38126}
38127pub trait ICoreWebView2_12_Impl: ICoreWebView2_11_Impl {
38128 fn add_StatusBarTextChanged(
38129 &self,
38130 eventhandler: windows_core::Ref<'_, ICoreWebView2StatusBarTextChangedEventHandler>,
38131 token: *mut i64,
38132 ) -> windows_core::Result<()>;
38133 fn remove_StatusBarTextChanged(&self, token: i64) -> windows_core::Result<()>;
38134 fn StatusBarText(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
38135}
38136impl ICoreWebView2_12_Vtbl {
38137 pub const fn new<Identity: ICoreWebView2_12_Impl, const OFFSET: isize>() -> Self {
38138 unsafe extern "system" fn add_StatusBarTextChanged<
38139 Identity: ICoreWebView2_12_Impl,
38140 const OFFSET: isize,
38141 >(
38142 this: *mut core::ffi::c_void,
38143 eventhandler: *mut core::ffi::c_void,
38144 token: *mut i64,
38145 ) -> windows_core::HRESULT {
38146 unsafe {
38147 let this: &Identity =
38148 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38149 ICoreWebView2_12_Impl::add_StatusBarTextChanged(
38150 this,
38151 core::mem::transmute_copy(&eventhandler),
38152 core::mem::transmute_copy(&token),
38153 )
38154 .into()
38155 }
38156 }
38157 unsafe extern "system" fn remove_StatusBarTextChanged<
38158 Identity: ICoreWebView2_12_Impl,
38159 const OFFSET: isize,
38160 >(
38161 this: *mut core::ffi::c_void,
38162 token: i64,
38163 ) -> windows_core::HRESULT {
38164 unsafe {
38165 let this: &Identity =
38166 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38167 ICoreWebView2_12_Impl::remove_StatusBarTextChanged(
38168 this,
38169 core::mem::transmute_copy(&token),
38170 )
38171 .into()
38172 }
38173 }
38174 unsafe extern "system" fn StatusBarText<
38175 Identity: ICoreWebView2_12_Impl,
38176 const OFFSET: isize,
38177 >(
38178 this: *mut core::ffi::c_void,
38179 value: *mut windows_core::PWSTR,
38180 ) -> windows_core::HRESULT {
38181 unsafe {
38182 let this: &Identity =
38183 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38184 ICoreWebView2_12_Impl::StatusBarText(this, core::mem::transmute_copy(&value)).into()
38185 }
38186 }
38187 Self {
38188 base__: ICoreWebView2_11_Vtbl::new::<Identity, OFFSET>(),
38189 add_StatusBarTextChanged: add_StatusBarTextChanged::<Identity, OFFSET>,
38190 remove_StatusBarTextChanged: remove_StatusBarTextChanged::<Identity, OFFSET>,
38191 StatusBarText: StatusBarText::<Identity, OFFSET>,
38192 }
38193 }
38194 pub fn matches(iid: &windows_core::GUID) -> bool {
38195 iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
38196 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
38197 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
38198 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
38199 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
38200 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
38201 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
38202 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
38203 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
38204 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
38205 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
38206 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
38207 }
38208}
38209impl windows_core::RuntimeName for ICoreWebView2_12 {}
38210windows_core::imp::define_interface!(
38211 ICoreWebView2_13,
38212 ICoreWebView2_13_Vtbl,
38213 0xf75f09a8_667e_4983_88d6_c8773f315e84
38214);
38215impl core::ops::Deref for ICoreWebView2_13 {
38216 type Target = ICoreWebView2_12;
38217 fn deref(&self) -> &Self::Target {
38218 unsafe { core::mem::transmute(self) }
38219 }
38220}
38221windows_core::imp::interface_hierarchy!(
38222 ICoreWebView2_13,
38223 windows_core::IUnknown,
38224 ICoreWebView2,
38225 ICoreWebView2_2,
38226 ICoreWebView2_3,
38227 ICoreWebView2_4,
38228 ICoreWebView2_5,
38229 ICoreWebView2_6,
38230 ICoreWebView2_7,
38231 ICoreWebView2_8,
38232 ICoreWebView2_9,
38233 ICoreWebView2_10,
38234 ICoreWebView2_11,
38235 ICoreWebView2_12
38236);
38237impl ICoreWebView2_13 {
38238 pub unsafe fn Profile(&self) -> windows_core::Result<ICoreWebView2Profile> {
38239 unsafe {
38240 let mut result__ = core::mem::zeroed();
38241 (windows_core::Interface::vtable(self).Profile)(
38242 windows_core::Interface::as_raw(self),
38243 &mut result__,
38244 )
38245 .and_then(|| windows_core::Type::from_abi(result__))
38246 }
38247 }
38248}
38249#[repr(C)]
38250pub struct ICoreWebView2_13_Vtbl {
38251 pub base__: ICoreWebView2_12_Vtbl,
38252 pub Profile: unsafe extern "system" fn(
38253 *mut core::ffi::c_void,
38254 *mut *mut core::ffi::c_void,
38255 ) -> windows_core::HRESULT,
38256}
38257pub trait ICoreWebView2_13_Impl: ICoreWebView2_12_Impl {
38258 fn Profile(&self) -> windows_core::Result<ICoreWebView2Profile>;
38259}
38260impl ICoreWebView2_13_Vtbl {
38261 pub const fn new<Identity: ICoreWebView2_13_Impl, const OFFSET: isize>() -> Self {
38262 unsafe extern "system" fn Profile<Identity: ICoreWebView2_13_Impl, const OFFSET: isize>(
38263 this: *mut core::ffi::c_void,
38264 value: *mut *mut core::ffi::c_void,
38265 ) -> windows_core::HRESULT {
38266 unsafe {
38267 let this: &Identity =
38268 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38269 match ICoreWebView2_13_Impl::Profile(this) {
38270 Ok(ok__) => {
38271 value.write(core::mem::transmute(ok__));
38272 windows_core::HRESULT(0)
38273 }
38274 Err(err) => err.into(),
38275 }
38276 }
38277 }
38278 Self {
38279 base__: ICoreWebView2_12_Vtbl::new::<Identity, OFFSET>(),
38280 Profile: Profile::<Identity, OFFSET>,
38281 }
38282 }
38283 pub fn matches(iid: &windows_core::GUID) -> bool {
38284 iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
38285 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
38286 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
38287 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
38288 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
38289 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
38290 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
38291 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
38292 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
38293 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
38294 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
38295 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
38296 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
38297 }
38298}
38299impl windows_core::RuntimeName for ICoreWebView2_13 {}
38300windows_core::imp::define_interface!(
38301 ICoreWebView2_14,
38302 ICoreWebView2_14_Vtbl,
38303 0x6daa4f10_4a90_4753_8898_77c5df534165
38304);
38305impl core::ops::Deref for ICoreWebView2_14 {
38306 type Target = ICoreWebView2_13;
38307 fn deref(&self) -> &Self::Target {
38308 unsafe { core::mem::transmute(self) }
38309 }
38310}
38311windows_core::imp::interface_hierarchy!(
38312 ICoreWebView2_14,
38313 windows_core::IUnknown,
38314 ICoreWebView2,
38315 ICoreWebView2_2,
38316 ICoreWebView2_3,
38317 ICoreWebView2_4,
38318 ICoreWebView2_5,
38319 ICoreWebView2_6,
38320 ICoreWebView2_7,
38321 ICoreWebView2_8,
38322 ICoreWebView2_9,
38323 ICoreWebView2_10,
38324 ICoreWebView2_11,
38325 ICoreWebView2_12,
38326 ICoreWebView2_13
38327);
38328impl ICoreWebView2_14 {
38329 pub unsafe fn add_ServerCertificateErrorDetected<P0>(
38330 &self,
38331 eventhandler: P0,
38332 token: *mut i64,
38333 ) -> windows_core::Result<()>
38334 where
38335 P0: windows_core::Param<ICoreWebView2ServerCertificateErrorDetectedEventHandler>,
38336 {
38337 unsafe {
38338 (windows_core::Interface::vtable(self).add_ServerCertificateErrorDetected)(
38339 windows_core::Interface::as_raw(self),
38340 eventhandler.param().abi(),
38341 token as _,
38342 )
38343 .ok()
38344 }
38345 }
38346 pub unsafe fn remove_ServerCertificateErrorDetected(
38347 &self,
38348 token: i64,
38349 ) -> windows_core::Result<()> {
38350 unsafe {
38351 (windows_core::Interface::vtable(self).remove_ServerCertificateErrorDetected)(
38352 windows_core::Interface::as_raw(self),
38353 token,
38354 )
38355 .ok()
38356 }
38357 }
38358 pub unsafe fn ClearServerCertificateErrorActions<P0>(
38359 &self,
38360 handler: P0,
38361 ) -> windows_core::Result<()>
38362 where
38363 P0: windows_core::Param<ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler>,
38364 {
38365 unsafe {
38366 (windows_core::Interface::vtable(self).ClearServerCertificateErrorActions)(
38367 windows_core::Interface::as_raw(self),
38368 handler.param().abi(),
38369 )
38370 .ok()
38371 }
38372 }
38373}
38374#[repr(C)]
38375pub struct ICoreWebView2_14_Vtbl {
38376 pub base__: ICoreWebView2_13_Vtbl,
38377 pub add_ServerCertificateErrorDetected: unsafe extern "system" fn(
38378 *mut core::ffi::c_void,
38379 *mut core::ffi::c_void,
38380 *mut i64,
38381 ) -> windows_core::HRESULT,
38382 pub remove_ServerCertificateErrorDetected:
38383 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
38384 pub ClearServerCertificateErrorActions: unsafe extern "system" fn(
38385 *mut core::ffi::c_void,
38386 *mut core::ffi::c_void,
38387 ) -> windows_core::HRESULT,
38388}
38389pub trait ICoreWebView2_14_Impl: ICoreWebView2_13_Impl {
38390 fn add_ServerCertificateErrorDetected(
38391 &self,
38392 eventhandler: windows_core::Ref<
38393 '_,
38394 ICoreWebView2ServerCertificateErrorDetectedEventHandler,
38395 >,
38396 token: *mut i64,
38397 ) -> windows_core::Result<()>;
38398 fn remove_ServerCertificateErrorDetected(&self, token: i64) -> windows_core::Result<()>;
38399 fn ClearServerCertificateErrorActions(
38400 &self,
38401 handler: windows_core::Ref<
38402 '_,
38403 ICoreWebView2ClearServerCertificateErrorActionsCompletedHandler,
38404 >,
38405 ) -> windows_core::Result<()>;
38406}
38407impl ICoreWebView2_14_Vtbl {
38408 pub const fn new<Identity: ICoreWebView2_14_Impl, const OFFSET: isize>() -> Self {
38409 unsafe extern "system" fn add_ServerCertificateErrorDetected<
38410 Identity: ICoreWebView2_14_Impl,
38411 const OFFSET: isize,
38412 >(
38413 this: *mut core::ffi::c_void,
38414 eventhandler: *mut core::ffi::c_void,
38415 token: *mut i64,
38416 ) -> windows_core::HRESULT {
38417 unsafe {
38418 let this: &Identity =
38419 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38420 ICoreWebView2_14_Impl::add_ServerCertificateErrorDetected(
38421 this,
38422 core::mem::transmute_copy(&eventhandler),
38423 core::mem::transmute_copy(&token),
38424 )
38425 .into()
38426 }
38427 }
38428 unsafe extern "system" fn remove_ServerCertificateErrorDetected<
38429 Identity: ICoreWebView2_14_Impl,
38430 const OFFSET: isize,
38431 >(
38432 this: *mut core::ffi::c_void,
38433 token: i64,
38434 ) -> windows_core::HRESULT {
38435 unsafe {
38436 let this: &Identity =
38437 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38438 ICoreWebView2_14_Impl::remove_ServerCertificateErrorDetected(
38439 this,
38440 core::mem::transmute_copy(&token),
38441 )
38442 .into()
38443 }
38444 }
38445 unsafe extern "system" fn ClearServerCertificateErrorActions<
38446 Identity: ICoreWebView2_14_Impl,
38447 const OFFSET: isize,
38448 >(
38449 this: *mut core::ffi::c_void,
38450 handler: *mut core::ffi::c_void,
38451 ) -> windows_core::HRESULT {
38452 unsafe {
38453 let this: &Identity =
38454 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38455 ICoreWebView2_14_Impl::ClearServerCertificateErrorActions(
38456 this,
38457 core::mem::transmute_copy(&handler),
38458 )
38459 .into()
38460 }
38461 }
38462 Self {
38463 base__: ICoreWebView2_13_Vtbl::new::<Identity, OFFSET>(),
38464 add_ServerCertificateErrorDetected: add_ServerCertificateErrorDetected::<
38465 Identity,
38466 OFFSET,
38467 >,
38468 remove_ServerCertificateErrorDetected: remove_ServerCertificateErrorDetected::<
38469 Identity,
38470 OFFSET,
38471 >,
38472 ClearServerCertificateErrorActions: ClearServerCertificateErrorActions::<
38473 Identity,
38474 OFFSET,
38475 >,
38476 }
38477 }
38478 pub fn matches(iid: &windows_core::GUID) -> bool {
38479 iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
38480 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
38481 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
38482 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
38483 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
38484 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
38485 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
38486 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
38487 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
38488 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
38489 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
38490 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
38491 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
38492 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
38493 }
38494}
38495impl windows_core::RuntimeName for ICoreWebView2_14 {}
38496windows_core::imp::define_interface!(
38497 ICoreWebView2_15,
38498 ICoreWebView2_15_Vtbl,
38499 0x517b2d1d_7dae_4a66_a4f4_10352ffb9518
38500);
38501impl core::ops::Deref for ICoreWebView2_15 {
38502 type Target = ICoreWebView2_14;
38503 fn deref(&self) -> &Self::Target {
38504 unsafe { core::mem::transmute(self) }
38505 }
38506}
38507windows_core::imp::interface_hierarchy!(
38508 ICoreWebView2_15,
38509 windows_core::IUnknown,
38510 ICoreWebView2,
38511 ICoreWebView2_2,
38512 ICoreWebView2_3,
38513 ICoreWebView2_4,
38514 ICoreWebView2_5,
38515 ICoreWebView2_6,
38516 ICoreWebView2_7,
38517 ICoreWebView2_8,
38518 ICoreWebView2_9,
38519 ICoreWebView2_10,
38520 ICoreWebView2_11,
38521 ICoreWebView2_12,
38522 ICoreWebView2_13,
38523 ICoreWebView2_14
38524);
38525impl ICoreWebView2_15 {
38526 pub unsafe fn add_FaviconChanged<P0>(
38527 &self,
38528 eventhandler: P0,
38529 token: *mut i64,
38530 ) -> windows_core::Result<()>
38531 where
38532 P0: windows_core::Param<ICoreWebView2FaviconChangedEventHandler>,
38533 {
38534 unsafe {
38535 (windows_core::Interface::vtable(self).add_FaviconChanged)(
38536 windows_core::Interface::as_raw(self),
38537 eventhandler.param().abi(),
38538 token as _,
38539 )
38540 .ok()
38541 }
38542 }
38543 pub unsafe fn remove_FaviconChanged(&self, token: i64) -> windows_core::Result<()> {
38544 unsafe {
38545 (windows_core::Interface::vtable(self).remove_FaviconChanged)(
38546 windows_core::Interface::as_raw(self),
38547 token,
38548 )
38549 .ok()
38550 }
38551 }
38552 pub unsafe fn FaviconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()> {
38553 unsafe {
38554 (windows_core::Interface::vtable(self).FaviconUri)(
38555 windows_core::Interface::as_raw(self),
38556 value as _,
38557 )
38558 .ok()
38559 }
38560 }
38561 pub unsafe fn GetFavicon<P1>(
38562 &self,
38563 format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
38564 completedhandler: P1,
38565 ) -> windows_core::Result<()>
38566 where
38567 P1: windows_core::Param<ICoreWebView2GetFaviconCompletedHandler>,
38568 {
38569 unsafe {
38570 (windows_core::Interface::vtable(self).GetFavicon)(
38571 windows_core::Interface::as_raw(self),
38572 format,
38573 completedhandler.param().abi(),
38574 )
38575 .ok()
38576 }
38577 }
38578}
38579#[repr(C)]
38580pub struct ICoreWebView2_15_Vtbl {
38581 pub base__: ICoreWebView2_14_Vtbl,
38582 pub add_FaviconChanged: unsafe extern "system" fn(
38583 *mut core::ffi::c_void,
38584 *mut core::ffi::c_void,
38585 *mut i64,
38586 ) -> windows_core::HRESULT,
38587 pub remove_FaviconChanged:
38588 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
38589 pub FaviconUri: unsafe extern "system" fn(
38590 *mut core::ffi::c_void,
38591 *mut windows_core::PWSTR,
38592 ) -> windows_core::HRESULT,
38593 pub GetFavicon: unsafe extern "system" fn(
38594 *mut core::ffi::c_void,
38595 COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
38596 *mut core::ffi::c_void,
38597 ) -> windows_core::HRESULT,
38598}
38599pub trait ICoreWebView2_15_Impl: ICoreWebView2_14_Impl {
38600 fn add_FaviconChanged(
38601 &self,
38602 eventhandler: windows_core::Ref<'_, ICoreWebView2FaviconChangedEventHandler>,
38603 token: *mut i64,
38604 ) -> windows_core::Result<()>;
38605 fn remove_FaviconChanged(&self, token: i64) -> windows_core::Result<()>;
38606 fn FaviconUri(&self, value: *mut windows_core::PWSTR) -> windows_core::Result<()>;
38607 fn GetFavicon(
38608 &self,
38609 format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
38610 completedhandler: windows_core::Ref<'_, ICoreWebView2GetFaviconCompletedHandler>,
38611 ) -> windows_core::Result<()>;
38612}
38613impl ICoreWebView2_15_Vtbl {
38614 pub const fn new<Identity: ICoreWebView2_15_Impl, const OFFSET: isize>() -> Self {
38615 unsafe extern "system" fn add_FaviconChanged<
38616 Identity: ICoreWebView2_15_Impl,
38617 const OFFSET: isize,
38618 >(
38619 this: *mut core::ffi::c_void,
38620 eventhandler: *mut core::ffi::c_void,
38621 token: *mut i64,
38622 ) -> windows_core::HRESULT {
38623 unsafe {
38624 let this: &Identity =
38625 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38626 ICoreWebView2_15_Impl::add_FaviconChanged(
38627 this,
38628 core::mem::transmute_copy(&eventhandler),
38629 core::mem::transmute_copy(&token),
38630 )
38631 .into()
38632 }
38633 }
38634 unsafe extern "system" fn remove_FaviconChanged<
38635 Identity: ICoreWebView2_15_Impl,
38636 const OFFSET: isize,
38637 >(
38638 this: *mut core::ffi::c_void,
38639 token: i64,
38640 ) -> windows_core::HRESULT {
38641 unsafe {
38642 let this: &Identity =
38643 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38644 ICoreWebView2_15_Impl::remove_FaviconChanged(
38645 this,
38646 core::mem::transmute_copy(&token),
38647 )
38648 .into()
38649 }
38650 }
38651 unsafe extern "system" fn FaviconUri<
38652 Identity: ICoreWebView2_15_Impl,
38653 const OFFSET: isize,
38654 >(
38655 this: *mut core::ffi::c_void,
38656 value: *mut windows_core::PWSTR,
38657 ) -> windows_core::HRESULT {
38658 unsafe {
38659 let this: &Identity =
38660 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38661 ICoreWebView2_15_Impl::FaviconUri(this, core::mem::transmute_copy(&value)).into()
38662 }
38663 }
38664 unsafe extern "system" fn GetFavicon<
38665 Identity: ICoreWebView2_15_Impl,
38666 const OFFSET: isize,
38667 >(
38668 this: *mut core::ffi::c_void,
38669 format: COREWEBVIEW2_FAVICON_IMAGE_FORMAT,
38670 completedhandler: *mut core::ffi::c_void,
38671 ) -> windows_core::HRESULT {
38672 unsafe {
38673 let this: &Identity =
38674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38675 ICoreWebView2_15_Impl::GetFavicon(
38676 this,
38677 core::mem::transmute_copy(&format),
38678 core::mem::transmute_copy(&completedhandler),
38679 )
38680 .into()
38681 }
38682 }
38683 Self {
38684 base__: ICoreWebView2_14_Vtbl::new::<Identity, OFFSET>(),
38685 add_FaviconChanged: add_FaviconChanged::<Identity, OFFSET>,
38686 remove_FaviconChanged: remove_FaviconChanged::<Identity, OFFSET>,
38687 FaviconUri: FaviconUri::<Identity, OFFSET>,
38688 GetFavicon: GetFavicon::<Identity, OFFSET>,
38689 }
38690 }
38691 pub fn matches(iid: &windows_core::GUID) -> bool {
38692 iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
38693 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
38694 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
38695 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
38696 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
38697 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
38698 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
38699 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
38700 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
38701 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
38702 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
38703 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
38704 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
38705 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
38706 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
38707 }
38708}
38709impl windows_core::RuntimeName for ICoreWebView2_15 {}
38710windows_core::imp::define_interface!(
38711 ICoreWebView2_16,
38712 ICoreWebView2_16_Vtbl,
38713 0x0eb34dc9_9f91_41e1_8639_95cd5943906b
38714);
38715impl core::ops::Deref for ICoreWebView2_16 {
38716 type Target = ICoreWebView2_15;
38717 fn deref(&self) -> &Self::Target {
38718 unsafe { core::mem::transmute(self) }
38719 }
38720}
38721windows_core::imp::interface_hierarchy!(
38722 ICoreWebView2_16,
38723 windows_core::IUnknown,
38724 ICoreWebView2,
38725 ICoreWebView2_2,
38726 ICoreWebView2_3,
38727 ICoreWebView2_4,
38728 ICoreWebView2_5,
38729 ICoreWebView2_6,
38730 ICoreWebView2_7,
38731 ICoreWebView2_8,
38732 ICoreWebView2_9,
38733 ICoreWebView2_10,
38734 ICoreWebView2_11,
38735 ICoreWebView2_12,
38736 ICoreWebView2_13,
38737 ICoreWebView2_14,
38738 ICoreWebView2_15
38739);
38740impl ICoreWebView2_16 {
38741 pub unsafe fn Print<P0, P1>(&self, printsettings: P0, handler: P1) -> windows_core::Result<()>
38742 where
38743 P0: windows_core::Param<ICoreWebView2PrintSettings>,
38744 P1: windows_core::Param<ICoreWebView2PrintCompletedHandler>,
38745 {
38746 unsafe {
38747 (windows_core::Interface::vtable(self).Print)(
38748 windows_core::Interface::as_raw(self),
38749 printsettings.param().abi(),
38750 handler.param().abi(),
38751 )
38752 .ok()
38753 }
38754 }
38755 pub unsafe fn ShowPrintUI(
38756 &self,
38757 printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
38758 ) -> windows_core::Result<()> {
38759 unsafe {
38760 (windows_core::Interface::vtable(self).ShowPrintUI)(
38761 windows_core::Interface::as_raw(self),
38762 printdialogkind,
38763 )
38764 .ok()
38765 }
38766 }
38767 pub unsafe fn PrintToPdfStream<P0, P1>(
38768 &self,
38769 printsettings: P0,
38770 handler: P1,
38771 ) -> windows_core::Result<()>
38772 where
38773 P0: windows_core::Param<ICoreWebView2PrintSettings>,
38774 P1: windows_core::Param<ICoreWebView2PrintToPdfStreamCompletedHandler>,
38775 {
38776 unsafe {
38777 (windows_core::Interface::vtable(self).PrintToPdfStream)(
38778 windows_core::Interface::as_raw(self),
38779 printsettings.param().abi(),
38780 handler.param().abi(),
38781 )
38782 .ok()
38783 }
38784 }
38785}
38786#[repr(C)]
38787pub struct ICoreWebView2_16_Vtbl {
38788 pub base__: ICoreWebView2_15_Vtbl,
38789 pub Print: unsafe extern "system" fn(
38790 *mut core::ffi::c_void,
38791 *mut core::ffi::c_void,
38792 *mut core::ffi::c_void,
38793 ) -> windows_core::HRESULT,
38794 pub ShowPrintUI: unsafe extern "system" fn(
38795 *mut core::ffi::c_void,
38796 COREWEBVIEW2_PRINT_DIALOG_KIND,
38797 ) -> windows_core::HRESULT,
38798 pub PrintToPdfStream: unsafe extern "system" fn(
38799 *mut core::ffi::c_void,
38800 *mut core::ffi::c_void,
38801 *mut core::ffi::c_void,
38802 ) -> windows_core::HRESULT,
38803}
38804pub trait ICoreWebView2_16_Impl: ICoreWebView2_15_Impl {
38805 fn Print(
38806 &self,
38807 printsettings: windows_core::Ref<'_, ICoreWebView2PrintSettings>,
38808 handler: windows_core::Ref<'_, ICoreWebView2PrintCompletedHandler>,
38809 ) -> windows_core::Result<()>;
38810 fn ShowPrintUI(
38811 &self,
38812 printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
38813 ) -> windows_core::Result<()>;
38814 fn PrintToPdfStream(
38815 &self,
38816 printsettings: windows_core::Ref<'_, ICoreWebView2PrintSettings>,
38817 handler: windows_core::Ref<'_, ICoreWebView2PrintToPdfStreamCompletedHandler>,
38818 ) -> windows_core::Result<()>;
38819}
38820impl ICoreWebView2_16_Vtbl {
38821 pub const fn new<Identity: ICoreWebView2_16_Impl, const OFFSET: isize>() -> Self {
38822 unsafe extern "system" fn Print<Identity: ICoreWebView2_16_Impl, const OFFSET: isize>(
38823 this: *mut core::ffi::c_void,
38824 printsettings: *mut core::ffi::c_void,
38825 handler: *mut core::ffi::c_void,
38826 ) -> windows_core::HRESULT {
38827 unsafe {
38828 let this: &Identity =
38829 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38830 ICoreWebView2_16_Impl::Print(
38831 this,
38832 core::mem::transmute_copy(&printsettings),
38833 core::mem::transmute_copy(&handler),
38834 )
38835 .into()
38836 }
38837 }
38838 unsafe extern "system" fn ShowPrintUI<
38839 Identity: ICoreWebView2_16_Impl,
38840 const OFFSET: isize,
38841 >(
38842 this: *mut core::ffi::c_void,
38843 printdialogkind: COREWEBVIEW2_PRINT_DIALOG_KIND,
38844 ) -> windows_core::HRESULT {
38845 unsafe {
38846 let this: &Identity =
38847 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38848 ICoreWebView2_16_Impl::ShowPrintUI(
38849 this,
38850 core::mem::transmute_copy(&printdialogkind),
38851 )
38852 .into()
38853 }
38854 }
38855 unsafe extern "system" fn PrintToPdfStream<
38856 Identity: ICoreWebView2_16_Impl,
38857 const OFFSET: isize,
38858 >(
38859 this: *mut core::ffi::c_void,
38860 printsettings: *mut core::ffi::c_void,
38861 handler: *mut core::ffi::c_void,
38862 ) -> windows_core::HRESULT {
38863 unsafe {
38864 let this: &Identity =
38865 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38866 ICoreWebView2_16_Impl::PrintToPdfStream(
38867 this,
38868 core::mem::transmute_copy(&printsettings),
38869 core::mem::transmute_copy(&handler),
38870 )
38871 .into()
38872 }
38873 }
38874 Self {
38875 base__: ICoreWebView2_15_Vtbl::new::<Identity, OFFSET>(),
38876 Print: Print::<Identity, OFFSET>,
38877 ShowPrintUI: ShowPrintUI::<Identity, OFFSET>,
38878 PrintToPdfStream: PrintToPdfStream::<Identity, OFFSET>,
38879 }
38880 }
38881 pub fn matches(iid: &windows_core::GUID) -> bool {
38882 iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
38883 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
38884 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
38885 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
38886 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
38887 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
38888 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
38889 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
38890 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
38891 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
38892 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
38893 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
38894 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
38895 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
38896 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
38897 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
38898 }
38899}
38900impl windows_core::RuntimeName for ICoreWebView2_16 {}
38901windows_core::imp::define_interface!(
38902 ICoreWebView2_17,
38903 ICoreWebView2_17_Vtbl,
38904 0x702e75d4_fd44_434d_9d70_1a68a6b1192a
38905);
38906impl core::ops::Deref for ICoreWebView2_17 {
38907 type Target = ICoreWebView2_16;
38908 fn deref(&self) -> &Self::Target {
38909 unsafe { core::mem::transmute(self) }
38910 }
38911}
38912windows_core::imp::interface_hierarchy!(
38913 ICoreWebView2_17,
38914 windows_core::IUnknown,
38915 ICoreWebView2,
38916 ICoreWebView2_2,
38917 ICoreWebView2_3,
38918 ICoreWebView2_4,
38919 ICoreWebView2_5,
38920 ICoreWebView2_6,
38921 ICoreWebView2_7,
38922 ICoreWebView2_8,
38923 ICoreWebView2_9,
38924 ICoreWebView2_10,
38925 ICoreWebView2_11,
38926 ICoreWebView2_12,
38927 ICoreWebView2_13,
38928 ICoreWebView2_14,
38929 ICoreWebView2_15,
38930 ICoreWebView2_16
38931);
38932impl ICoreWebView2_17 {
38933 pub unsafe fn PostSharedBufferToScript<P0, P2>(
38934 &self,
38935 sharedbuffer: P0,
38936 access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
38937 additionaldataasjson: P2,
38938 ) -> windows_core::Result<()>
38939 where
38940 P0: windows_core::Param<ICoreWebView2SharedBuffer>,
38941 P2: windows_core::Param<windows_core::PCWSTR>,
38942 {
38943 unsafe {
38944 (windows_core::Interface::vtable(self).PostSharedBufferToScript)(
38945 windows_core::Interface::as_raw(self),
38946 sharedbuffer.param().abi(),
38947 access,
38948 additionaldataasjson.param().abi(),
38949 )
38950 .ok()
38951 }
38952 }
38953}
38954#[repr(C)]
38955pub struct ICoreWebView2_17_Vtbl {
38956 pub base__: ICoreWebView2_16_Vtbl,
38957 pub PostSharedBufferToScript: unsafe extern "system" fn(
38958 *mut core::ffi::c_void,
38959 *mut core::ffi::c_void,
38960 COREWEBVIEW2_SHARED_BUFFER_ACCESS,
38961 windows_core::PCWSTR,
38962 ) -> windows_core::HRESULT,
38963}
38964pub trait ICoreWebView2_17_Impl: ICoreWebView2_16_Impl {
38965 fn PostSharedBufferToScript(
38966 &self,
38967 sharedbuffer: windows_core::Ref<'_, ICoreWebView2SharedBuffer>,
38968 access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
38969 additionaldataasjson: &windows_core::PCWSTR,
38970 ) -> windows_core::Result<()>;
38971}
38972impl ICoreWebView2_17_Vtbl {
38973 pub const fn new<Identity: ICoreWebView2_17_Impl, const OFFSET: isize>() -> Self {
38974 unsafe extern "system" fn PostSharedBufferToScript<
38975 Identity: ICoreWebView2_17_Impl,
38976 const OFFSET: isize,
38977 >(
38978 this: *mut core::ffi::c_void,
38979 sharedbuffer: *mut core::ffi::c_void,
38980 access: COREWEBVIEW2_SHARED_BUFFER_ACCESS,
38981 additionaldataasjson: windows_core::PCWSTR,
38982 ) -> windows_core::HRESULT {
38983 unsafe {
38984 let this: &Identity =
38985 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
38986 ICoreWebView2_17_Impl::PostSharedBufferToScript(
38987 this,
38988 core::mem::transmute_copy(&sharedbuffer),
38989 core::mem::transmute_copy(&access),
38990 core::mem::transmute(&additionaldataasjson),
38991 )
38992 .into()
38993 }
38994 }
38995 Self {
38996 base__: ICoreWebView2_16_Vtbl::new::<Identity, OFFSET>(),
38997 PostSharedBufferToScript: PostSharedBufferToScript::<Identity, OFFSET>,
38998 }
38999 }
39000 pub fn matches(iid: &windows_core::GUID) -> bool {
39001 iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
39002 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39003 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39004 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
39005 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
39006 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
39007 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
39008 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
39009 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
39010 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
39011 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
39012 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
39013 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
39014 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
39015 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
39016 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
39017 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
39018 }
39019}
39020impl windows_core::RuntimeName for ICoreWebView2_17 {}
39021windows_core::imp::define_interface!(
39022 ICoreWebView2_18,
39023 ICoreWebView2_18_Vtbl,
39024 0x7a626017_28be_49b2_b865_3ba2b3522d90
39025);
39026impl core::ops::Deref for ICoreWebView2_18 {
39027 type Target = ICoreWebView2_17;
39028 fn deref(&self) -> &Self::Target {
39029 unsafe { core::mem::transmute(self) }
39030 }
39031}
39032windows_core::imp::interface_hierarchy!(
39033 ICoreWebView2_18,
39034 windows_core::IUnknown,
39035 ICoreWebView2,
39036 ICoreWebView2_2,
39037 ICoreWebView2_3,
39038 ICoreWebView2_4,
39039 ICoreWebView2_5,
39040 ICoreWebView2_6,
39041 ICoreWebView2_7,
39042 ICoreWebView2_8,
39043 ICoreWebView2_9,
39044 ICoreWebView2_10,
39045 ICoreWebView2_11,
39046 ICoreWebView2_12,
39047 ICoreWebView2_13,
39048 ICoreWebView2_14,
39049 ICoreWebView2_15,
39050 ICoreWebView2_16,
39051 ICoreWebView2_17
39052);
39053impl ICoreWebView2_18 {
39054 pub unsafe fn add_LaunchingExternalUriScheme<P0>(
39055 &self,
39056 eventhandler: P0,
39057 token: *mut i64,
39058 ) -> windows_core::Result<()>
39059 where
39060 P0: windows_core::Param<ICoreWebView2LaunchingExternalUriSchemeEventHandler>,
39061 {
39062 unsafe {
39063 (windows_core::Interface::vtable(self).add_LaunchingExternalUriScheme)(
39064 windows_core::Interface::as_raw(self),
39065 eventhandler.param().abi(),
39066 token as _,
39067 )
39068 .ok()
39069 }
39070 }
39071 pub unsafe fn remove_LaunchingExternalUriScheme(&self, token: i64) -> windows_core::Result<()> {
39072 unsafe {
39073 (windows_core::Interface::vtable(self).remove_LaunchingExternalUriScheme)(
39074 windows_core::Interface::as_raw(self),
39075 token,
39076 )
39077 .ok()
39078 }
39079 }
39080}
39081#[repr(C)]
39082pub struct ICoreWebView2_18_Vtbl {
39083 pub base__: ICoreWebView2_17_Vtbl,
39084 pub add_LaunchingExternalUriScheme: unsafe extern "system" fn(
39085 *mut core::ffi::c_void,
39086 *mut core::ffi::c_void,
39087 *mut i64,
39088 ) -> windows_core::HRESULT,
39089 pub remove_LaunchingExternalUriScheme:
39090 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
39091}
39092pub trait ICoreWebView2_18_Impl: ICoreWebView2_17_Impl {
39093 fn add_LaunchingExternalUriScheme(
39094 &self,
39095 eventhandler: windows_core::Ref<'_, ICoreWebView2LaunchingExternalUriSchemeEventHandler>,
39096 token: *mut i64,
39097 ) -> windows_core::Result<()>;
39098 fn remove_LaunchingExternalUriScheme(&self, token: i64) -> windows_core::Result<()>;
39099}
39100impl ICoreWebView2_18_Vtbl {
39101 pub const fn new<Identity: ICoreWebView2_18_Impl, const OFFSET: isize>() -> Self {
39102 unsafe extern "system" fn add_LaunchingExternalUriScheme<
39103 Identity: ICoreWebView2_18_Impl,
39104 const OFFSET: isize,
39105 >(
39106 this: *mut core::ffi::c_void,
39107 eventhandler: *mut core::ffi::c_void,
39108 token: *mut i64,
39109 ) -> windows_core::HRESULT {
39110 unsafe {
39111 let this: &Identity =
39112 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39113 ICoreWebView2_18_Impl::add_LaunchingExternalUriScheme(
39114 this,
39115 core::mem::transmute_copy(&eventhandler),
39116 core::mem::transmute_copy(&token),
39117 )
39118 .into()
39119 }
39120 }
39121 unsafe extern "system" fn remove_LaunchingExternalUriScheme<
39122 Identity: ICoreWebView2_18_Impl,
39123 const OFFSET: isize,
39124 >(
39125 this: *mut core::ffi::c_void,
39126 token: i64,
39127 ) -> windows_core::HRESULT {
39128 unsafe {
39129 let this: &Identity =
39130 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39131 ICoreWebView2_18_Impl::remove_LaunchingExternalUriScheme(
39132 this,
39133 core::mem::transmute_copy(&token),
39134 )
39135 .into()
39136 }
39137 }
39138 Self {
39139 base__: ICoreWebView2_17_Vtbl::new::<Identity, OFFSET>(),
39140 add_LaunchingExternalUriScheme: add_LaunchingExternalUriScheme::<Identity, OFFSET>,
39141 remove_LaunchingExternalUriScheme: remove_LaunchingExternalUriScheme::<Identity, OFFSET>,
39142 }
39143 }
39144 pub fn matches(iid: &windows_core::GUID) -> bool {
39145 iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
39146 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39147 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39148 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
39149 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
39150 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
39151 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
39152 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
39153 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
39154 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
39155 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
39156 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
39157 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
39158 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
39159 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
39160 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
39161 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
39162 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
39163 }
39164}
39165impl windows_core::RuntimeName for ICoreWebView2_18 {}
39166windows_core::imp::define_interface!(
39167 ICoreWebView2_19,
39168 ICoreWebView2_19_Vtbl,
39169 0x6921f954_79b0_437f_a997_c85811897c68
39170);
39171impl core::ops::Deref for ICoreWebView2_19 {
39172 type Target = ICoreWebView2_18;
39173 fn deref(&self) -> &Self::Target {
39174 unsafe { core::mem::transmute(self) }
39175 }
39176}
39177windows_core::imp::interface_hierarchy!(
39178 ICoreWebView2_19,
39179 windows_core::IUnknown,
39180 ICoreWebView2,
39181 ICoreWebView2_2,
39182 ICoreWebView2_3,
39183 ICoreWebView2_4,
39184 ICoreWebView2_5,
39185 ICoreWebView2_6,
39186 ICoreWebView2_7,
39187 ICoreWebView2_8,
39188 ICoreWebView2_9,
39189 ICoreWebView2_10,
39190 ICoreWebView2_11,
39191 ICoreWebView2_12,
39192 ICoreWebView2_13,
39193 ICoreWebView2_14,
39194 ICoreWebView2_15,
39195 ICoreWebView2_16,
39196 ICoreWebView2_17,
39197 ICoreWebView2_18
39198);
39199impl ICoreWebView2_19 {
39200 pub unsafe fn MemoryUsageTargetLevel(
39201 &self,
39202 value: *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39203 ) -> windows_core::Result<()> {
39204 unsafe {
39205 (windows_core::Interface::vtable(self).MemoryUsageTargetLevel)(
39206 windows_core::Interface::as_raw(self),
39207 value as _,
39208 )
39209 .ok()
39210 }
39211 }
39212 pub unsafe fn SetMemoryUsageTargetLevel(
39213 &self,
39214 value: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39215 ) -> windows_core::Result<()> {
39216 unsafe {
39217 (windows_core::Interface::vtable(self).SetMemoryUsageTargetLevel)(
39218 windows_core::Interface::as_raw(self),
39219 value,
39220 )
39221 .ok()
39222 }
39223 }
39224}
39225#[repr(C)]
39226pub struct ICoreWebView2_19_Vtbl {
39227 pub base__: ICoreWebView2_18_Vtbl,
39228 pub MemoryUsageTargetLevel: unsafe extern "system" fn(
39229 *mut core::ffi::c_void,
39230 *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39231 ) -> windows_core::HRESULT,
39232 pub SetMemoryUsageTargetLevel: unsafe extern "system" fn(
39233 *mut core::ffi::c_void,
39234 COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39235 ) -> windows_core::HRESULT,
39236}
39237pub trait ICoreWebView2_19_Impl: ICoreWebView2_18_Impl {
39238 fn MemoryUsageTargetLevel(
39239 &self,
39240 value: *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39241 ) -> windows_core::Result<()>;
39242 fn SetMemoryUsageTargetLevel(
39243 &self,
39244 value: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39245 ) -> windows_core::Result<()>;
39246}
39247impl ICoreWebView2_19_Vtbl {
39248 pub const fn new<Identity: ICoreWebView2_19_Impl, const OFFSET: isize>() -> Self {
39249 unsafe extern "system" fn MemoryUsageTargetLevel<
39250 Identity: ICoreWebView2_19_Impl,
39251 const OFFSET: isize,
39252 >(
39253 this: *mut core::ffi::c_void,
39254 value: *mut COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39255 ) -> windows_core::HRESULT {
39256 unsafe {
39257 let this: &Identity =
39258 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39259 ICoreWebView2_19_Impl::MemoryUsageTargetLevel(
39260 this,
39261 core::mem::transmute_copy(&value),
39262 )
39263 .into()
39264 }
39265 }
39266 unsafe extern "system" fn SetMemoryUsageTargetLevel<
39267 Identity: ICoreWebView2_19_Impl,
39268 const OFFSET: isize,
39269 >(
39270 this: *mut core::ffi::c_void,
39271 value: COREWEBVIEW2_MEMORY_USAGE_TARGET_LEVEL,
39272 ) -> windows_core::HRESULT {
39273 unsafe {
39274 let this: &Identity =
39275 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39276 ICoreWebView2_19_Impl::SetMemoryUsageTargetLevel(
39277 this,
39278 core::mem::transmute_copy(&value),
39279 )
39280 .into()
39281 }
39282 }
39283 Self {
39284 base__: ICoreWebView2_18_Vtbl::new::<Identity, OFFSET>(),
39285 MemoryUsageTargetLevel: MemoryUsageTargetLevel::<Identity, OFFSET>,
39286 SetMemoryUsageTargetLevel: SetMemoryUsageTargetLevel::<Identity, OFFSET>,
39287 }
39288 }
39289 pub fn matches(iid: &windows_core::GUID) -> bool {
39290 iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
39291 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39292 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39293 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
39294 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
39295 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
39296 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
39297 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
39298 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
39299 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
39300 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
39301 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
39302 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
39303 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
39304 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
39305 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
39306 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
39307 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
39308 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
39309 }
39310}
39311impl windows_core::RuntimeName for ICoreWebView2_19 {}
39312windows_core::imp::define_interface!(
39313 ICoreWebView2_2,
39314 ICoreWebView2_2_Vtbl,
39315 0x9e8f0cf8_e670_4b5e_b2bc_73e061e3184c
39316);
39317impl core::ops::Deref for ICoreWebView2_2 {
39318 type Target = ICoreWebView2;
39319 fn deref(&self) -> &Self::Target {
39320 unsafe { core::mem::transmute(self) }
39321 }
39322}
39323windows_core::imp::interface_hierarchy!(ICoreWebView2_2, windows_core::IUnknown, ICoreWebView2);
39324impl ICoreWebView2_2 {
39325 pub unsafe fn add_WebResourceResponseReceived<P0>(
39326 &self,
39327 eventhandler: P0,
39328 token: *mut i64,
39329 ) -> windows_core::Result<()>
39330 where
39331 P0: windows_core::Param<ICoreWebView2WebResourceResponseReceivedEventHandler>,
39332 {
39333 unsafe {
39334 (windows_core::Interface::vtable(self).add_WebResourceResponseReceived)(
39335 windows_core::Interface::as_raw(self),
39336 eventhandler.param().abi(),
39337 token as _,
39338 )
39339 .ok()
39340 }
39341 }
39342 pub unsafe fn remove_WebResourceResponseReceived(
39343 &self,
39344 token: i64,
39345 ) -> windows_core::Result<()> {
39346 unsafe {
39347 (windows_core::Interface::vtable(self).remove_WebResourceResponseReceived)(
39348 windows_core::Interface::as_raw(self),
39349 token,
39350 )
39351 .ok()
39352 }
39353 }
39354 pub unsafe fn NavigateWithWebResourceRequest<P0>(&self, request: P0) -> windows_core::Result<()>
39355 where
39356 P0: windows_core::Param<ICoreWebView2WebResourceRequest>,
39357 {
39358 unsafe {
39359 (windows_core::Interface::vtable(self).NavigateWithWebResourceRequest)(
39360 windows_core::Interface::as_raw(self),
39361 request.param().abi(),
39362 )
39363 .ok()
39364 }
39365 }
39366 pub unsafe fn add_DOMContentLoaded<P0>(
39367 &self,
39368 eventhandler: P0,
39369 token: *mut i64,
39370 ) -> windows_core::Result<()>
39371 where
39372 P0: windows_core::Param<ICoreWebView2DOMContentLoadedEventHandler>,
39373 {
39374 unsafe {
39375 (windows_core::Interface::vtable(self).add_DOMContentLoaded)(
39376 windows_core::Interface::as_raw(self),
39377 eventhandler.param().abi(),
39378 token as _,
39379 )
39380 .ok()
39381 }
39382 }
39383 pub unsafe fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()> {
39384 unsafe {
39385 (windows_core::Interface::vtable(self).remove_DOMContentLoaded)(
39386 windows_core::Interface::as_raw(self),
39387 token,
39388 )
39389 .ok()
39390 }
39391 }
39392 pub unsafe fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager> {
39393 unsafe {
39394 let mut result__ = core::mem::zeroed();
39395 (windows_core::Interface::vtable(self).CookieManager)(
39396 windows_core::Interface::as_raw(self),
39397 &mut result__,
39398 )
39399 .and_then(|| windows_core::Type::from_abi(result__))
39400 }
39401 }
39402 pub unsafe fn Environment(&self) -> windows_core::Result<ICoreWebView2Environment> {
39403 unsafe {
39404 let mut result__ = core::mem::zeroed();
39405 (windows_core::Interface::vtable(self).Environment)(
39406 windows_core::Interface::as_raw(self),
39407 &mut result__,
39408 )
39409 .and_then(|| windows_core::Type::from_abi(result__))
39410 }
39411 }
39412}
39413#[repr(C)]
39414pub struct ICoreWebView2_2_Vtbl {
39415 pub base__: ICoreWebView2_Vtbl,
39416 pub add_WebResourceResponseReceived: unsafe extern "system" fn(
39417 *mut core::ffi::c_void,
39418 *mut core::ffi::c_void,
39419 *mut i64,
39420 ) -> windows_core::HRESULT,
39421 pub remove_WebResourceResponseReceived:
39422 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
39423 pub NavigateWithWebResourceRequest: unsafe extern "system" fn(
39424 *mut core::ffi::c_void,
39425 *mut core::ffi::c_void,
39426 ) -> windows_core::HRESULT,
39427 pub add_DOMContentLoaded: unsafe extern "system" fn(
39428 *mut core::ffi::c_void,
39429 *mut core::ffi::c_void,
39430 *mut i64,
39431 ) -> windows_core::HRESULT,
39432 pub remove_DOMContentLoaded:
39433 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
39434 pub CookieManager: unsafe extern "system" fn(
39435 *mut core::ffi::c_void,
39436 *mut *mut core::ffi::c_void,
39437 ) -> windows_core::HRESULT,
39438 pub Environment: unsafe extern "system" fn(
39439 *mut core::ffi::c_void,
39440 *mut *mut core::ffi::c_void,
39441 ) -> windows_core::HRESULT,
39442}
39443pub trait ICoreWebView2_2_Impl: ICoreWebView2_Impl {
39444 fn add_WebResourceResponseReceived(
39445 &self,
39446 eventhandler: windows_core::Ref<'_, ICoreWebView2WebResourceResponseReceivedEventHandler>,
39447 token: *mut i64,
39448 ) -> windows_core::Result<()>;
39449 fn remove_WebResourceResponseReceived(&self, token: i64) -> windows_core::Result<()>;
39450 fn NavigateWithWebResourceRequest(
39451 &self,
39452 request: windows_core::Ref<'_, ICoreWebView2WebResourceRequest>,
39453 ) -> windows_core::Result<()>;
39454 fn add_DOMContentLoaded(
39455 &self,
39456 eventhandler: windows_core::Ref<'_, ICoreWebView2DOMContentLoadedEventHandler>,
39457 token: *mut i64,
39458 ) -> windows_core::Result<()>;
39459 fn remove_DOMContentLoaded(&self, token: i64) -> windows_core::Result<()>;
39460 fn CookieManager(&self) -> windows_core::Result<ICoreWebView2CookieManager>;
39461 fn Environment(&self) -> windows_core::Result<ICoreWebView2Environment>;
39462}
39463impl ICoreWebView2_2_Vtbl {
39464 pub const fn new<Identity: ICoreWebView2_2_Impl, const OFFSET: isize>() -> Self {
39465 unsafe extern "system" fn add_WebResourceResponseReceived<
39466 Identity: ICoreWebView2_2_Impl,
39467 const OFFSET: isize,
39468 >(
39469 this: *mut core::ffi::c_void,
39470 eventhandler: *mut core::ffi::c_void,
39471 token: *mut i64,
39472 ) -> windows_core::HRESULT {
39473 unsafe {
39474 let this: &Identity =
39475 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39476 ICoreWebView2_2_Impl::add_WebResourceResponseReceived(
39477 this,
39478 core::mem::transmute_copy(&eventhandler),
39479 core::mem::transmute_copy(&token),
39480 )
39481 .into()
39482 }
39483 }
39484 unsafe extern "system" fn remove_WebResourceResponseReceived<
39485 Identity: ICoreWebView2_2_Impl,
39486 const OFFSET: isize,
39487 >(
39488 this: *mut core::ffi::c_void,
39489 token: i64,
39490 ) -> windows_core::HRESULT {
39491 unsafe {
39492 let this: &Identity =
39493 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39494 ICoreWebView2_2_Impl::remove_WebResourceResponseReceived(
39495 this,
39496 core::mem::transmute_copy(&token),
39497 )
39498 .into()
39499 }
39500 }
39501 unsafe extern "system" fn NavigateWithWebResourceRequest<
39502 Identity: ICoreWebView2_2_Impl,
39503 const OFFSET: isize,
39504 >(
39505 this: *mut core::ffi::c_void,
39506 request: *mut core::ffi::c_void,
39507 ) -> windows_core::HRESULT {
39508 unsafe {
39509 let this: &Identity =
39510 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39511 ICoreWebView2_2_Impl::NavigateWithWebResourceRequest(
39512 this,
39513 core::mem::transmute_copy(&request),
39514 )
39515 .into()
39516 }
39517 }
39518 unsafe extern "system" fn add_DOMContentLoaded<
39519 Identity: ICoreWebView2_2_Impl,
39520 const OFFSET: isize,
39521 >(
39522 this: *mut core::ffi::c_void,
39523 eventhandler: *mut core::ffi::c_void,
39524 token: *mut i64,
39525 ) -> windows_core::HRESULT {
39526 unsafe {
39527 let this: &Identity =
39528 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39529 ICoreWebView2_2_Impl::add_DOMContentLoaded(
39530 this,
39531 core::mem::transmute_copy(&eventhandler),
39532 core::mem::transmute_copy(&token),
39533 )
39534 .into()
39535 }
39536 }
39537 unsafe extern "system" fn remove_DOMContentLoaded<
39538 Identity: ICoreWebView2_2_Impl,
39539 const OFFSET: isize,
39540 >(
39541 this: *mut core::ffi::c_void,
39542 token: i64,
39543 ) -> windows_core::HRESULT {
39544 unsafe {
39545 let this: &Identity =
39546 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39547 ICoreWebView2_2_Impl::remove_DOMContentLoaded(
39548 this,
39549 core::mem::transmute_copy(&token),
39550 )
39551 .into()
39552 }
39553 }
39554 unsafe extern "system" fn CookieManager<
39555 Identity: ICoreWebView2_2_Impl,
39556 const OFFSET: isize,
39557 >(
39558 this: *mut core::ffi::c_void,
39559 cookiemanager: *mut *mut core::ffi::c_void,
39560 ) -> windows_core::HRESULT {
39561 unsafe {
39562 let this: &Identity =
39563 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39564 match ICoreWebView2_2_Impl::CookieManager(this) {
39565 Ok(ok__) => {
39566 cookiemanager.write(core::mem::transmute(ok__));
39567 windows_core::HRESULT(0)
39568 }
39569 Err(err) => err.into(),
39570 }
39571 }
39572 }
39573 unsafe extern "system" fn Environment<
39574 Identity: ICoreWebView2_2_Impl,
39575 const OFFSET: isize,
39576 >(
39577 this: *mut core::ffi::c_void,
39578 environment: *mut *mut core::ffi::c_void,
39579 ) -> windows_core::HRESULT {
39580 unsafe {
39581 let this: &Identity =
39582 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39583 match ICoreWebView2_2_Impl::Environment(this) {
39584 Ok(ok__) => {
39585 environment.write(core::mem::transmute(ok__));
39586 windows_core::HRESULT(0)
39587 }
39588 Err(err) => err.into(),
39589 }
39590 }
39591 }
39592 Self {
39593 base__: ICoreWebView2_Vtbl::new::<Identity, OFFSET>(),
39594 add_WebResourceResponseReceived: add_WebResourceResponseReceived::<Identity, OFFSET>,
39595 remove_WebResourceResponseReceived: remove_WebResourceResponseReceived::<
39596 Identity,
39597 OFFSET,
39598 >,
39599 NavigateWithWebResourceRequest: NavigateWithWebResourceRequest::<Identity, OFFSET>,
39600 add_DOMContentLoaded: add_DOMContentLoaded::<Identity, OFFSET>,
39601 remove_DOMContentLoaded: remove_DOMContentLoaded::<Identity, OFFSET>,
39602 CookieManager: CookieManager::<Identity, OFFSET>,
39603 Environment: Environment::<Identity, OFFSET>,
39604 }
39605 }
39606 pub fn matches(iid: &windows_core::GUID) -> bool {
39607 iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39608 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39609 }
39610}
39611impl windows_core::RuntimeName for ICoreWebView2_2 {}
39612windows_core::imp::define_interface!(
39613 ICoreWebView2_20,
39614 ICoreWebView2_20_Vtbl,
39615 0xb4bc1926_7305_11ee_b962_0242ac120002
39616);
39617impl core::ops::Deref for ICoreWebView2_20 {
39618 type Target = ICoreWebView2_19;
39619 fn deref(&self) -> &Self::Target {
39620 unsafe { core::mem::transmute(self) }
39621 }
39622}
39623windows_core::imp::interface_hierarchy!(
39624 ICoreWebView2_20,
39625 windows_core::IUnknown,
39626 ICoreWebView2,
39627 ICoreWebView2_2,
39628 ICoreWebView2_3,
39629 ICoreWebView2_4,
39630 ICoreWebView2_5,
39631 ICoreWebView2_6,
39632 ICoreWebView2_7,
39633 ICoreWebView2_8,
39634 ICoreWebView2_9,
39635 ICoreWebView2_10,
39636 ICoreWebView2_11,
39637 ICoreWebView2_12,
39638 ICoreWebView2_13,
39639 ICoreWebView2_14,
39640 ICoreWebView2_15,
39641 ICoreWebView2_16,
39642 ICoreWebView2_17,
39643 ICoreWebView2_18,
39644 ICoreWebView2_19
39645);
39646impl ICoreWebView2_20 {
39647 pub unsafe fn FrameId(&self, value: *mut u32) -> windows_core::Result<()> {
39648 unsafe {
39649 (windows_core::Interface::vtable(self).FrameId)(
39650 windows_core::Interface::as_raw(self),
39651 value as _,
39652 )
39653 .ok()
39654 }
39655 }
39656}
39657#[repr(C)]
39658pub struct ICoreWebView2_20_Vtbl {
39659 pub base__: ICoreWebView2_19_Vtbl,
39660 pub FrameId:
39661 unsafe extern "system" fn(*mut core::ffi::c_void, *mut u32) -> windows_core::HRESULT,
39662}
39663pub trait ICoreWebView2_20_Impl: ICoreWebView2_19_Impl {
39664 fn FrameId(&self, value: *mut u32) -> windows_core::Result<()>;
39665}
39666impl ICoreWebView2_20_Vtbl {
39667 pub const fn new<Identity: ICoreWebView2_20_Impl, const OFFSET: isize>() -> Self {
39668 unsafe extern "system" fn FrameId<Identity: ICoreWebView2_20_Impl, const OFFSET: isize>(
39669 this: *mut core::ffi::c_void,
39670 value: *mut u32,
39671 ) -> windows_core::HRESULT {
39672 unsafe {
39673 let this: &Identity =
39674 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39675 ICoreWebView2_20_Impl::FrameId(this, core::mem::transmute_copy(&value)).into()
39676 }
39677 }
39678 Self {
39679 base__: ICoreWebView2_19_Vtbl::new::<Identity, OFFSET>(),
39680 FrameId: FrameId::<Identity, OFFSET>,
39681 }
39682 }
39683 pub fn matches(iid: &windows_core::GUID) -> bool {
39684 iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
39685 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39686 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39687 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
39688 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
39689 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
39690 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
39691 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
39692 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
39693 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
39694 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
39695 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
39696 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
39697 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
39698 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
39699 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
39700 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
39701 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
39702 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
39703 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
39704 }
39705}
39706impl windows_core::RuntimeName for ICoreWebView2_20 {}
39707windows_core::imp::define_interface!(
39708 ICoreWebView2_21,
39709 ICoreWebView2_21_Vtbl,
39710 0xc4980dea_587b_43b9_8143_3ef3bf552d95
39711);
39712impl core::ops::Deref for ICoreWebView2_21 {
39713 type Target = ICoreWebView2_20;
39714 fn deref(&self) -> &Self::Target {
39715 unsafe { core::mem::transmute(self) }
39716 }
39717}
39718windows_core::imp::interface_hierarchy!(
39719 ICoreWebView2_21,
39720 windows_core::IUnknown,
39721 ICoreWebView2,
39722 ICoreWebView2_2,
39723 ICoreWebView2_3,
39724 ICoreWebView2_4,
39725 ICoreWebView2_5,
39726 ICoreWebView2_6,
39727 ICoreWebView2_7,
39728 ICoreWebView2_8,
39729 ICoreWebView2_9,
39730 ICoreWebView2_10,
39731 ICoreWebView2_11,
39732 ICoreWebView2_12,
39733 ICoreWebView2_13,
39734 ICoreWebView2_14,
39735 ICoreWebView2_15,
39736 ICoreWebView2_16,
39737 ICoreWebView2_17,
39738 ICoreWebView2_18,
39739 ICoreWebView2_19,
39740 ICoreWebView2_20
39741);
39742impl ICoreWebView2_21 {
39743 pub unsafe fn ExecuteScriptWithResult<P0, P1>(
39744 &self,
39745 javascript: P0,
39746 handler: P1,
39747 ) -> windows_core::Result<()>
39748 where
39749 P0: windows_core::Param<windows_core::PCWSTR>,
39750 P1: windows_core::Param<ICoreWebView2ExecuteScriptWithResultCompletedHandler>,
39751 {
39752 unsafe {
39753 (windows_core::Interface::vtable(self).ExecuteScriptWithResult)(
39754 windows_core::Interface::as_raw(self),
39755 javascript.param().abi(),
39756 handler.param().abi(),
39757 )
39758 .ok()
39759 }
39760 }
39761}
39762#[repr(C)]
39763pub struct ICoreWebView2_21_Vtbl {
39764 pub base__: ICoreWebView2_20_Vtbl,
39765 pub ExecuteScriptWithResult: unsafe extern "system" fn(
39766 *mut core::ffi::c_void,
39767 windows_core::PCWSTR,
39768 *mut core::ffi::c_void,
39769 ) -> windows_core::HRESULT,
39770}
39771pub trait ICoreWebView2_21_Impl: ICoreWebView2_20_Impl {
39772 fn ExecuteScriptWithResult(
39773 &self,
39774 javascript: &windows_core::PCWSTR,
39775 handler: windows_core::Ref<'_, ICoreWebView2ExecuteScriptWithResultCompletedHandler>,
39776 ) -> windows_core::Result<()>;
39777}
39778impl ICoreWebView2_21_Vtbl {
39779 pub const fn new<Identity: ICoreWebView2_21_Impl, const OFFSET: isize>() -> Self {
39780 unsafe extern "system" fn ExecuteScriptWithResult<
39781 Identity: ICoreWebView2_21_Impl,
39782 const OFFSET: isize,
39783 >(
39784 this: *mut core::ffi::c_void,
39785 javascript: windows_core::PCWSTR,
39786 handler: *mut core::ffi::c_void,
39787 ) -> windows_core::HRESULT {
39788 unsafe {
39789 let this: &Identity =
39790 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39791 ICoreWebView2_21_Impl::ExecuteScriptWithResult(
39792 this,
39793 core::mem::transmute(&javascript),
39794 core::mem::transmute_copy(&handler),
39795 )
39796 .into()
39797 }
39798 }
39799 Self {
39800 base__: ICoreWebView2_20_Vtbl::new::<Identity, OFFSET>(),
39801 ExecuteScriptWithResult: ExecuteScriptWithResult::<Identity, OFFSET>,
39802 }
39803 }
39804 pub fn matches(iid: &windows_core::GUID) -> bool {
39805 iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
39806 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39807 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39808 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
39809 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
39810 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
39811 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
39812 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
39813 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
39814 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
39815 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
39816 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
39817 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
39818 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
39819 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
39820 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
39821 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
39822 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
39823 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
39824 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
39825 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
39826 }
39827}
39828impl windows_core::RuntimeName for ICoreWebView2_21 {}
39829windows_core::imp::define_interface!(
39830 ICoreWebView2_22,
39831 ICoreWebView2_22_Vtbl,
39832 0xdb75dfc7_a857_4632_a398_6969dde26c0a
39833);
39834impl core::ops::Deref for ICoreWebView2_22 {
39835 type Target = ICoreWebView2_21;
39836 fn deref(&self) -> &Self::Target {
39837 unsafe { core::mem::transmute(self) }
39838 }
39839}
39840windows_core::imp::interface_hierarchy!(
39841 ICoreWebView2_22,
39842 windows_core::IUnknown,
39843 ICoreWebView2,
39844 ICoreWebView2_2,
39845 ICoreWebView2_3,
39846 ICoreWebView2_4,
39847 ICoreWebView2_5,
39848 ICoreWebView2_6,
39849 ICoreWebView2_7,
39850 ICoreWebView2_8,
39851 ICoreWebView2_9,
39852 ICoreWebView2_10,
39853 ICoreWebView2_11,
39854 ICoreWebView2_12,
39855 ICoreWebView2_13,
39856 ICoreWebView2_14,
39857 ICoreWebView2_15,
39858 ICoreWebView2_16,
39859 ICoreWebView2_17,
39860 ICoreWebView2_18,
39861 ICoreWebView2_19,
39862 ICoreWebView2_20,
39863 ICoreWebView2_21
39864);
39865impl ICoreWebView2_22 {
39866 pub unsafe fn AddWebResourceRequestedFilterWithRequestSourceKinds<P0>(
39867 &self,
39868 uri: P0,
39869 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39870 requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39871 ) -> windows_core::Result<()>
39872 where
39873 P0: windows_core::Param<windows_core::PCWSTR>,
39874 {
39875 unsafe {
39876 (windows_core::Interface::vtable(self)
39877 .AddWebResourceRequestedFilterWithRequestSourceKinds)(
39878 windows_core::Interface::as_raw(self),
39879 uri.param().abi(),
39880 resourcecontext,
39881 requestsourcekinds,
39882 )
39883 .ok()
39884 }
39885 }
39886 pub unsafe fn RemoveWebResourceRequestedFilterWithRequestSourceKinds<P0>(
39887 &self,
39888 uri: P0,
39889 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39890 requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39891 ) -> windows_core::Result<()>
39892 where
39893 P0: windows_core::Param<windows_core::PCWSTR>,
39894 {
39895 unsafe {
39896 (windows_core::Interface::vtable(self)
39897 .RemoveWebResourceRequestedFilterWithRequestSourceKinds)(
39898 windows_core::Interface::as_raw(self),
39899 uri.param().abi(),
39900 resourcecontext,
39901 requestsourcekinds,
39902 )
39903 .ok()
39904 }
39905 }
39906}
39907#[repr(C)]
39908pub struct ICoreWebView2_22_Vtbl {
39909 pub base__: ICoreWebView2_21_Vtbl,
39910 pub AddWebResourceRequestedFilterWithRequestSourceKinds:
39911 unsafe extern "system" fn(
39912 *mut core::ffi::c_void,
39913 windows_core::PCWSTR,
39914 COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39915 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39916 ) -> windows_core::HRESULT,
39917 pub RemoveWebResourceRequestedFilterWithRequestSourceKinds:
39918 unsafe extern "system" fn(
39919 *mut core::ffi::c_void,
39920 windows_core::PCWSTR,
39921 COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39922 COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39923 ) -> windows_core::HRESULT,
39924}
39925pub trait ICoreWebView2_22_Impl: ICoreWebView2_21_Impl {
39926 fn AddWebResourceRequestedFilterWithRequestSourceKinds(
39927 &self,
39928 uri: &windows_core::PCWSTR,
39929 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39930 requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39931 ) -> windows_core::Result<()>;
39932 fn RemoveWebResourceRequestedFilterWithRequestSourceKinds(
39933 &self,
39934 uri: &windows_core::PCWSTR,
39935 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39936 requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39937 ) -> windows_core::Result<()>;
39938}
39939impl ICoreWebView2_22_Vtbl {
39940 pub const fn new<Identity: ICoreWebView2_22_Impl, const OFFSET: isize>() -> Self {
39941 unsafe extern "system" fn AddWebResourceRequestedFilterWithRequestSourceKinds<
39942 Identity: ICoreWebView2_22_Impl,
39943 const OFFSET: isize,
39944 >(
39945 this: *mut core::ffi::c_void,
39946 uri: windows_core::PCWSTR,
39947 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39948 requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39949 ) -> windows_core::HRESULT {
39950 unsafe {
39951 let this: &Identity =
39952 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39953 ICoreWebView2_22_Impl::AddWebResourceRequestedFilterWithRequestSourceKinds(
39954 this,
39955 core::mem::transmute(&uri),
39956 core::mem::transmute_copy(&resourcecontext),
39957 core::mem::transmute_copy(&requestsourcekinds),
39958 )
39959 .into()
39960 }
39961 }
39962 unsafe extern "system" fn RemoveWebResourceRequestedFilterWithRequestSourceKinds<
39963 Identity: ICoreWebView2_22_Impl,
39964 const OFFSET: isize,
39965 >(
39966 this: *mut core::ffi::c_void,
39967 uri: windows_core::PCWSTR,
39968 resourcecontext: COREWEBVIEW2_WEB_RESOURCE_CONTEXT,
39969 requestsourcekinds: COREWEBVIEW2_WEB_RESOURCE_REQUEST_SOURCE_KINDS,
39970 ) -> windows_core::HRESULT {
39971 unsafe {
39972 let this: &Identity =
39973 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
39974 ICoreWebView2_22_Impl::RemoveWebResourceRequestedFilterWithRequestSourceKinds(
39975 this,
39976 core::mem::transmute(&uri),
39977 core::mem::transmute_copy(&resourcecontext),
39978 core::mem::transmute_copy(&requestsourcekinds),
39979 )
39980 .into()
39981 }
39982 }
39983 Self {
39984 base__: ICoreWebView2_21_Vtbl::new::<Identity, OFFSET>(),
39985 AddWebResourceRequestedFilterWithRequestSourceKinds:
39986 AddWebResourceRequestedFilterWithRequestSourceKinds::<Identity, OFFSET>,
39987 RemoveWebResourceRequestedFilterWithRequestSourceKinds:
39988 RemoveWebResourceRequestedFilterWithRequestSourceKinds::<Identity, OFFSET>,
39989 }
39990 }
39991 pub fn matches(iid: &windows_core::GUID) -> bool {
39992 iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
39993 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
39994 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
39995 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
39996 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
39997 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
39998 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
39999 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
40000 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
40001 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
40002 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
40003 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
40004 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
40005 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
40006 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
40007 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
40008 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
40009 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
40010 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
40011 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
40012 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
40013 || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
40014 }
40015}
40016impl windows_core::RuntimeName for ICoreWebView2_22 {}
40017windows_core::imp::define_interface!(
40018 ICoreWebView2_23,
40019 ICoreWebView2_23_Vtbl,
40020 0x508f0db5_90c4_5872_90a7_267a91377502
40021);
40022impl core::ops::Deref for ICoreWebView2_23 {
40023 type Target = ICoreWebView2_22;
40024 fn deref(&self) -> &Self::Target {
40025 unsafe { core::mem::transmute(self) }
40026 }
40027}
40028windows_core::imp::interface_hierarchy!(
40029 ICoreWebView2_23,
40030 windows_core::IUnknown,
40031 ICoreWebView2,
40032 ICoreWebView2_2,
40033 ICoreWebView2_3,
40034 ICoreWebView2_4,
40035 ICoreWebView2_5,
40036 ICoreWebView2_6,
40037 ICoreWebView2_7,
40038 ICoreWebView2_8,
40039 ICoreWebView2_9,
40040 ICoreWebView2_10,
40041 ICoreWebView2_11,
40042 ICoreWebView2_12,
40043 ICoreWebView2_13,
40044 ICoreWebView2_14,
40045 ICoreWebView2_15,
40046 ICoreWebView2_16,
40047 ICoreWebView2_17,
40048 ICoreWebView2_18,
40049 ICoreWebView2_19,
40050 ICoreWebView2_20,
40051 ICoreWebView2_21,
40052 ICoreWebView2_22
40053);
40054impl ICoreWebView2_23 {
40055 pub unsafe fn PostWebMessageAsJsonWithAdditionalObjects<P0, P1>(
40056 &self,
40057 webmessageasjson: P0,
40058 additionalobjects: P1,
40059 ) -> windows_core::Result<()>
40060 where
40061 P0: windows_core::Param<windows_core::PCWSTR>,
40062 P1: windows_core::Param<ICoreWebView2ObjectCollectionView>,
40063 {
40064 unsafe {
40065 (windows_core::Interface::vtable(self).PostWebMessageAsJsonWithAdditionalObjects)(
40066 windows_core::Interface::as_raw(self),
40067 webmessageasjson.param().abi(),
40068 additionalobjects.param().abi(),
40069 )
40070 .ok()
40071 }
40072 }
40073}
40074#[repr(C)]
40075pub struct ICoreWebView2_23_Vtbl {
40076 pub base__: ICoreWebView2_22_Vtbl,
40077 pub PostWebMessageAsJsonWithAdditionalObjects:
40078 unsafe extern "system" fn(
40079 *mut core::ffi::c_void,
40080 windows_core::PCWSTR,
40081 *mut core::ffi::c_void,
40082 ) -> windows_core::HRESULT,
40083}
40084pub trait ICoreWebView2_23_Impl: ICoreWebView2_22_Impl {
40085 fn PostWebMessageAsJsonWithAdditionalObjects(
40086 &self,
40087 webmessageasjson: &windows_core::PCWSTR,
40088 additionalobjects: windows_core::Ref<'_, ICoreWebView2ObjectCollectionView>,
40089 ) -> windows_core::Result<()>;
40090}
40091impl ICoreWebView2_23_Vtbl {
40092 pub const fn new<Identity: ICoreWebView2_23_Impl, const OFFSET: isize>() -> Self {
40093 unsafe extern "system" fn PostWebMessageAsJsonWithAdditionalObjects<
40094 Identity: ICoreWebView2_23_Impl,
40095 const OFFSET: isize,
40096 >(
40097 this: *mut core::ffi::c_void,
40098 webmessageasjson: windows_core::PCWSTR,
40099 additionalobjects: *mut core::ffi::c_void,
40100 ) -> windows_core::HRESULT {
40101 unsafe {
40102 let this: &Identity =
40103 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40104 ICoreWebView2_23_Impl::PostWebMessageAsJsonWithAdditionalObjects(
40105 this,
40106 core::mem::transmute(&webmessageasjson),
40107 core::mem::transmute_copy(&additionalobjects),
40108 )
40109 .into()
40110 }
40111 }
40112 Self {
40113 base__: ICoreWebView2_22_Vtbl::new::<Identity, OFFSET>(),
40114 PostWebMessageAsJsonWithAdditionalObjects: PostWebMessageAsJsonWithAdditionalObjects::<
40115 Identity,
40116 OFFSET,
40117 >,
40118 }
40119 }
40120 pub fn matches(iid: &windows_core::GUID) -> bool {
40121 iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
40122 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
40123 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
40124 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
40125 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
40126 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
40127 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
40128 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
40129 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
40130 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
40131 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
40132 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
40133 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
40134 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
40135 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
40136 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
40137 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
40138 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
40139 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
40140 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
40141 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
40142 || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
40143 || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
40144 }
40145}
40146impl windows_core::RuntimeName for ICoreWebView2_23 {}
40147windows_core::imp::define_interface!(
40148 ICoreWebView2_24,
40149 ICoreWebView2_24_Vtbl,
40150 0x39a7ad55_4287_5cc1_88a1_c6f458593824
40151);
40152impl core::ops::Deref for ICoreWebView2_24 {
40153 type Target = ICoreWebView2_23;
40154 fn deref(&self) -> &Self::Target {
40155 unsafe { core::mem::transmute(self) }
40156 }
40157}
40158windows_core::imp::interface_hierarchy!(
40159 ICoreWebView2_24,
40160 windows_core::IUnknown,
40161 ICoreWebView2,
40162 ICoreWebView2_2,
40163 ICoreWebView2_3,
40164 ICoreWebView2_4,
40165 ICoreWebView2_5,
40166 ICoreWebView2_6,
40167 ICoreWebView2_7,
40168 ICoreWebView2_8,
40169 ICoreWebView2_9,
40170 ICoreWebView2_10,
40171 ICoreWebView2_11,
40172 ICoreWebView2_12,
40173 ICoreWebView2_13,
40174 ICoreWebView2_14,
40175 ICoreWebView2_15,
40176 ICoreWebView2_16,
40177 ICoreWebView2_17,
40178 ICoreWebView2_18,
40179 ICoreWebView2_19,
40180 ICoreWebView2_20,
40181 ICoreWebView2_21,
40182 ICoreWebView2_22,
40183 ICoreWebView2_23
40184);
40185impl ICoreWebView2_24 {
40186 pub unsafe fn add_NotificationReceived<P0>(
40187 &self,
40188 eventhandler: P0,
40189 token: *mut i64,
40190 ) -> windows_core::Result<()>
40191 where
40192 P0: windows_core::Param<ICoreWebView2NotificationReceivedEventHandler>,
40193 {
40194 unsafe {
40195 (windows_core::Interface::vtable(self).add_NotificationReceived)(
40196 windows_core::Interface::as_raw(self),
40197 eventhandler.param().abi(),
40198 token as _,
40199 )
40200 .ok()
40201 }
40202 }
40203 pub unsafe fn remove_NotificationReceived(&self, token: i64) -> windows_core::Result<()> {
40204 unsafe {
40205 (windows_core::Interface::vtable(self).remove_NotificationReceived)(
40206 windows_core::Interface::as_raw(self),
40207 token,
40208 )
40209 .ok()
40210 }
40211 }
40212}
40213#[repr(C)]
40214pub struct ICoreWebView2_24_Vtbl {
40215 pub base__: ICoreWebView2_23_Vtbl,
40216 pub add_NotificationReceived: unsafe extern "system" fn(
40217 *mut core::ffi::c_void,
40218 *mut core::ffi::c_void,
40219 *mut i64,
40220 ) -> windows_core::HRESULT,
40221 pub remove_NotificationReceived:
40222 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
40223}
40224pub trait ICoreWebView2_24_Impl: ICoreWebView2_23_Impl {
40225 fn add_NotificationReceived(
40226 &self,
40227 eventhandler: windows_core::Ref<'_, ICoreWebView2NotificationReceivedEventHandler>,
40228 token: *mut i64,
40229 ) -> windows_core::Result<()>;
40230 fn remove_NotificationReceived(&self, token: i64) -> windows_core::Result<()>;
40231}
40232impl ICoreWebView2_24_Vtbl {
40233 pub const fn new<Identity: ICoreWebView2_24_Impl, const OFFSET: isize>() -> Self {
40234 unsafe extern "system" fn add_NotificationReceived<
40235 Identity: ICoreWebView2_24_Impl,
40236 const OFFSET: isize,
40237 >(
40238 this: *mut core::ffi::c_void,
40239 eventhandler: *mut core::ffi::c_void,
40240 token: *mut i64,
40241 ) -> windows_core::HRESULT {
40242 unsafe {
40243 let this: &Identity =
40244 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40245 ICoreWebView2_24_Impl::add_NotificationReceived(
40246 this,
40247 core::mem::transmute_copy(&eventhandler),
40248 core::mem::transmute_copy(&token),
40249 )
40250 .into()
40251 }
40252 }
40253 unsafe extern "system" fn remove_NotificationReceived<
40254 Identity: ICoreWebView2_24_Impl,
40255 const OFFSET: isize,
40256 >(
40257 this: *mut core::ffi::c_void,
40258 token: i64,
40259 ) -> windows_core::HRESULT {
40260 unsafe {
40261 let this: &Identity =
40262 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40263 ICoreWebView2_24_Impl::remove_NotificationReceived(
40264 this,
40265 core::mem::transmute_copy(&token),
40266 )
40267 .into()
40268 }
40269 }
40270 Self {
40271 base__: ICoreWebView2_23_Vtbl::new::<Identity, OFFSET>(),
40272 add_NotificationReceived: add_NotificationReceived::<Identity, OFFSET>,
40273 remove_NotificationReceived: remove_NotificationReceived::<Identity, OFFSET>,
40274 }
40275 }
40276 pub fn matches(iid: &windows_core::GUID) -> bool {
40277 iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
40278 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
40279 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
40280 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
40281 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
40282 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
40283 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
40284 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
40285 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
40286 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
40287 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
40288 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
40289 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
40290 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
40291 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
40292 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
40293 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
40294 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
40295 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
40296 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
40297 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
40298 || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
40299 || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
40300 || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
40301 }
40302}
40303impl windows_core::RuntimeName for ICoreWebView2_24 {}
40304windows_core::imp::define_interface!(
40305 ICoreWebView2_25,
40306 ICoreWebView2_25_Vtbl,
40307 0xb5a86092_df50_5b4f_a17b_6c8f8b40b771
40308);
40309impl core::ops::Deref for ICoreWebView2_25 {
40310 type Target = ICoreWebView2_24;
40311 fn deref(&self) -> &Self::Target {
40312 unsafe { core::mem::transmute(self) }
40313 }
40314}
40315windows_core::imp::interface_hierarchy!(
40316 ICoreWebView2_25,
40317 windows_core::IUnknown,
40318 ICoreWebView2,
40319 ICoreWebView2_2,
40320 ICoreWebView2_3,
40321 ICoreWebView2_4,
40322 ICoreWebView2_5,
40323 ICoreWebView2_6,
40324 ICoreWebView2_7,
40325 ICoreWebView2_8,
40326 ICoreWebView2_9,
40327 ICoreWebView2_10,
40328 ICoreWebView2_11,
40329 ICoreWebView2_12,
40330 ICoreWebView2_13,
40331 ICoreWebView2_14,
40332 ICoreWebView2_15,
40333 ICoreWebView2_16,
40334 ICoreWebView2_17,
40335 ICoreWebView2_18,
40336 ICoreWebView2_19,
40337 ICoreWebView2_20,
40338 ICoreWebView2_21,
40339 ICoreWebView2_22,
40340 ICoreWebView2_23,
40341 ICoreWebView2_24
40342);
40343impl ICoreWebView2_25 {
40344 pub unsafe fn add_SaveAsUIShowing<P0>(
40345 &self,
40346 eventhandler: P0,
40347 token: *mut i64,
40348 ) -> windows_core::Result<()>
40349 where
40350 P0: windows_core::Param<ICoreWebView2SaveAsUIShowingEventHandler>,
40351 {
40352 unsafe {
40353 (windows_core::Interface::vtable(self).add_SaveAsUIShowing)(
40354 windows_core::Interface::as_raw(self),
40355 eventhandler.param().abi(),
40356 token as _,
40357 )
40358 .ok()
40359 }
40360 }
40361 pub unsafe fn remove_SaveAsUIShowing(&self, token: i64) -> windows_core::Result<()> {
40362 unsafe {
40363 (windows_core::Interface::vtable(self).remove_SaveAsUIShowing)(
40364 windows_core::Interface::as_raw(self),
40365 token,
40366 )
40367 .ok()
40368 }
40369 }
40370 pub unsafe fn ShowSaveAsUI<P0>(&self, handler: P0) -> windows_core::Result<()>
40371 where
40372 P0: windows_core::Param<ICoreWebView2ShowSaveAsUICompletedHandler>,
40373 {
40374 unsafe {
40375 (windows_core::Interface::vtable(self).ShowSaveAsUI)(
40376 windows_core::Interface::as_raw(self),
40377 handler.param().abi(),
40378 )
40379 .ok()
40380 }
40381 }
40382}
40383#[repr(C)]
40384pub struct ICoreWebView2_25_Vtbl {
40385 pub base__: ICoreWebView2_24_Vtbl,
40386 pub add_SaveAsUIShowing: unsafe extern "system" fn(
40387 *mut core::ffi::c_void,
40388 *mut core::ffi::c_void,
40389 *mut i64,
40390 ) -> windows_core::HRESULT,
40391 pub remove_SaveAsUIShowing:
40392 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
40393 pub ShowSaveAsUI: unsafe extern "system" fn(
40394 *mut core::ffi::c_void,
40395 *mut core::ffi::c_void,
40396 ) -> windows_core::HRESULT,
40397}
40398pub trait ICoreWebView2_25_Impl: ICoreWebView2_24_Impl {
40399 fn add_SaveAsUIShowing(
40400 &self,
40401 eventhandler: windows_core::Ref<'_, ICoreWebView2SaveAsUIShowingEventHandler>,
40402 token: *mut i64,
40403 ) -> windows_core::Result<()>;
40404 fn remove_SaveAsUIShowing(&self, token: i64) -> windows_core::Result<()>;
40405 fn ShowSaveAsUI(
40406 &self,
40407 handler: windows_core::Ref<'_, ICoreWebView2ShowSaveAsUICompletedHandler>,
40408 ) -> windows_core::Result<()>;
40409}
40410impl ICoreWebView2_25_Vtbl {
40411 pub const fn new<Identity: ICoreWebView2_25_Impl, const OFFSET: isize>() -> Self {
40412 unsafe extern "system" fn add_SaveAsUIShowing<
40413 Identity: ICoreWebView2_25_Impl,
40414 const OFFSET: isize,
40415 >(
40416 this: *mut core::ffi::c_void,
40417 eventhandler: *mut core::ffi::c_void,
40418 token: *mut i64,
40419 ) -> windows_core::HRESULT {
40420 unsafe {
40421 let this: &Identity =
40422 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40423 ICoreWebView2_25_Impl::add_SaveAsUIShowing(
40424 this,
40425 core::mem::transmute_copy(&eventhandler),
40426 core::mem::transmute_copy(&token),
40427 )
40428 .into()
40429 }
40430 }
40431 unsafe extern "system" fn remove_SaveAsUIShowing<
40432 Identity: ICoreWebView2_25_Impl,
40433 const OFFSET: isize,
40434 >(
40435 this: *mut core::ffi::c_void,
40436 token: i64,
40437 ) -> windows_core::HRESULT {
40438 unsafe {
40439 let this: &Identity =
40440 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40441 ICoreWebView2_25_Impl::remove_SaveAsUIShowing(
40442 this,
40443 core::mem::transmute_copy(&token),
40444 )
40445 .into()
40446 }
40447 }
40448 unsafe extern "system" fn ShowSaveAsUI<
40449 Identity: ICoreWebView2_25_Impl,
40450 const OFFSET: isize,
40451 >(
40452 this: *mut core::ffi::c_void,
40453 handler: *mut core::ffi::c_void,
40454 ) -> windows_core::HRESULT {
40455 unsafe {
40456 let this: &Identity =
40457 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40458 ICoreWebView2_25_Impl::ShowSaveAsUI(this, core::mem::transmute_copy(&handler))
40459 .into()
40460 }
40461 }
40462 Self {
40463 base__: ICoreWebView2_24_Vtbl::new::<Identity, OFFSET>(),
40464 add_SaveAsUIShowing: add_SaveAsUIShowing::<Identity, OFFSET>,
40465 remove_SaveAsUIShowing: remove_SaveAsUIShowing::<Identity, OFFSET>,
40466 ShowSaveAsUI: ShowSaveAsUI::<Identity, OFFSET>,
40467 }
40468 }
40469 pub fn matches(iid: &windows_core::GUID) -> bool {
40470 iid == &<ICoreWebView2_25 as windows_core::Interface>::IID
40471 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
40472 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
40473 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
40474 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
40475 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
40476 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
40477 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
40478 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
40479 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
40480 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
40481 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
40482 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
40483 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
40484 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
40485 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
40486 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
40487 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
40488 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
40489 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
40490 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
40491 || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
40492 || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
40493 || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
40494 || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
40495 }
40496}
40497impl windows_core::RuntimeName for ICoreWebView2_25 {}
40498windows_core::imp::define_interface!(
40499 ICoreWebView2_26,
40500 ICoreWebView2_26_Vtbl,
40501 0x806268b8_f897_5685_88e5_c45fca0b1a48
40502);
40503impl core::ops::Deref for ICoreWebView2_26 {
40504 type Target = ICoreWebView2_25;
40505 fn deref(&self) -> &Self::Target {
40506 unsafe { core::mem::transmute(self) }
40507 }
40508}
40509windows_core::imp::interface_hierarchy!(
40510 ICoreWebView2_26,
40511 windows_core::IUnknown,
40512 ICoreWebView2,
40513 ICoreWebView2_2,
40514 ICoreWebView2_3,
40515 ICoreWebView2_4,
40516 ICoreWebView2_5,
40517 ICoreWebView2_6,
40518 ICoreWebView2_7,
40519 ICoreWebView2_8,
40520 ICoreWebView2_9,
40521 ICoreWebView2_10,
40522 ICoreWebView2_11,
40523 ICoreWebView2_12,
40524 ICoreWebView2_13,
40525 ICoreWebView2_14,
40526 ICoreWebView2_15,
40527 ICoreWebView2_16,
40528 ICoreWebView2_17,
40529 ICoreWebView2_18,
40530 ICoreWebView2_19,
40531 ICoreWebView2_20,
40532 ICoreWebView2_21,
40533 ICoreWebView2_22,
40534 ICoreWebView2_23,
40535 ICoreWebView2_24,
40536 ICoreWebView2_25
40537);
40538impl ICoreWebView2_26 {
40539 pub unsafe fn add_SaveFileSecurityCheckStarting<P0>(
40540 &self,
40541 eventhandler: P0,
40542 token: *mut i64,
40543 ) -> windows_core::Result<()>
40544 where
40545 P0: windows_core::Param<ICoreWebView2SaveFileSecurityCheckStartingEventHandler>,
40546 {
40547 unsafe {
40548 (windows_core::Interface::vtable(self).add_SaveFileSecurityCheckStarting)(
40549 windows_core::Interface::as_raw(self),
40550 eventhandler.param().abi(),
40551 token as _,
40552 )
40553 .ok()
40554 }
40555 }
40556 pub unsafe fn remove_SaveFileSecurityCheckStarting(
40557 &self,
40558 token: i64,
40559 ) -> windows_core::Result<()> {
40560 unsafe {
40561 (windows_core::Interface::vtable(self).remove_SaveFileSecurityCheckStarting)(
40562 windows_core::Interface::as_raw(self),
40563 token,
40564 )
40565 .ok()
40566 }
40567 }
40568}
40569#[repr(C)]
40570pub struct ICoreWebView2_26_Vtbl {
40571 pub base__: ICoreWebView2_25_Vtbl,
40572 pub add_SaveFileSecurityCheckStarting: unsafe extern "system" fn(
40573 *mut core::ffi::c_void,
40574 *mut core::ffi::c_void,
40575 *mut i64,
40576 ) -> windows_core::HRESULT,
40577 pub remove_SaveFileSecurityCheckStarting:
40578 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
40579}
40580pub trait ICoreWebView2_26_Impl: ICoreWebView2_25_Impl {
40581 fn add_SaveFileSecurityCheckStarting(
40582 &self,
40583 eventhandler: windows_core::Ref<'_, ICoreWebView2SaveFileSecurityCheckStartingEventHandler>,
40584 token: *mut i64,
40585 ) -> windows_core::Result<()>;
40586 fn remove_SaveFileSecurityCheckStarting(&self, token: i64) -> windows_core::Result<()>;
40587}
40588impl ICoreWebView2_26_Vtbl {
40589 pub const fn new<Identity: ICoreWebView2_26_Impl, const OFFSET: isize>() -> Self {
40590 unsafe extern "system" fn add_SaveFileSecurityCheckStarting<
40591 Identity: ICoreWebView2_26_Impl,
40592 const OFFSET: isize,
40593 >(
40594 this: *mut core::ffi::c_void,
40595 eventhandler: *mut core::ffi::c_void,
40596 token: *mut i64,
40597 ) -> windows_core::HRESULT {
40598 unsafe {
40599 let this: &Identity =
40600 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40601 ICoreWebView2_26_Impl::add_SaveFileSecurityCheckStarting(
40602 this,
40603 core::mem::transmute_copy(&eventhandler),
40604 core::mem::transmute_copy(&token),
40605 )
40606 .into()
40607 }
40608 }
40609 unsafe extern "system" fn remove_SaveFileSecurityCheckStarting<
40610 Identity: ICoreWebView2_26_Impl,
40611 const OFFSET: isize,
40612 >(
40613 this: *mut core::ffi::c_void,
40614 token: i64,
40615 ) -> windows_core::HRESULT {
40616 unsafe {
40617 let this: &Identity =
40618 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40619 ICoreWebView2_26_Impl::remove_SaveFileSecurityCheckStarting(
40620 this,
40621 core::mem::transmute_copy(&token),
40622 )
40623 .into()
40624 }
40625 }
40626 Self {
40627 base__: ICoreWebView2_25_Vtbl::new::<Identity, OFFSET>(),
40628 add_SaveFileSecurityCheckStarting: add_SaveFileSecurityCheckStarting::<Identity, OFFSET>,
40629 remove_SaveFileSecurityCheckStarting: remove_SaveFileSecurityCheckStarting::<
40630 Identity,
40631 OFFSET,
40632 >,
40633 }
40634 }
40635 pub fn matches(iid: &windows_core::GUID) -> bool {
40636 iid == &<ICoreWebView2_26 as windows_core::Interface>::IID
40637 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
40638 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
40639 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
40640 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
40641 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
40642 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
40643 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
40644 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
40645 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
40646 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
40647 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
40648 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
40649 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
40650 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
40651 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
40652 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
40653 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
40654 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
40655 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
40656 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
40657 || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
40658 || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
40659 || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
40660 || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
40661 || iid == &<ICoreWebView2_25 as windows_core::Interface>::IID
40662 }
40663}
40664impl windows_core::RuntimeName for ICoreWebView2_26 {}
40665windows_core::imp::define_interface!(
40666 ICoreWebView2_27,
40667 ICoreWebView2_27_Vtbl,
40668 0x00fbe33b_8c07_517c_aa23_0ddd4b5f6fa0
40669);
40670impl core::ops::Deref for ICoreWebView2_27 {
40671 type Target = ICoreWebView2_26;
40672 fn deref(&self) -> &Self::Target {
40673 unsafe { core::mem::transmute(self) }
40674 }
40675}
40676windows_core::imp::interface_hierarchy!(
40677 ICoreWebView2_27,
40678 windows_core::IUnknown,
40679 ICoreWebView2,
40680 ICoreWebView2_2,
40681 ICoreWebView2_3,
40682 ICoreWebView2_4,
40683 ICoreWebView2_5,
40684 ICoreWebView2_6,
40685 ICoreWebView2_7,
40686 ICoreWebView2_8,
40687 ICoreWebView2_9,
40688 ICoreWebView2_10,
40689 ICoreWebView2_11,
40690 ICoreWebView2_12,
40691 ICoreWebView2_13,
40692 ICoreWebView2_14,
40693 ICoreWebView2_15,
40694 ICoreWebView2_16,
40695 ICoreWebView2_17,
40696 ICoreWebView2_18,
40697 ICoreWebView2_19,
40698 ICoreWebView2_20,
40699 ICoreWebView2_21,
40700 ICoreWebView2_22,
40701 ICoreWebView2_23,
40702 ICoreWebView2_24,
40703 ICoreWebView2_25,
40704 ICoreWebView2_26
40705);
40706impl ICoreWebView2_27 {
40707 pub unsafe fn add_ScreenCaptureStarting<P0>(
40708 &self,
40709 eventhandler: P0,
40710 token: *mut i64,
40711 ) -> windows_core::Result<()>
40712 where
40713 P0: windows_core::Param<ICoreWebView2ScreenCaptureStartingEventHandler>,
40714 {
40715 unsafe {
40716 (windows_core::Interface::vtable(self).add_ScreenCaptureStarting)(
40717 windows_core::Interface::as_raw(self),
40718 eventhandler.param().abi(),
40719 token as _,
40720 )
40721 .ok()
40722 }
40723 }
40724 pub unsafe fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()> {
40725 unsafe {
40726 (windows_core::Interface::vtable(self).remove_ScreenCaptureStarting)(
40727 windows_core::Interface::as_raw(self),
40728 token,
40729 )
40730 .ok()
40731 }
40732 }
40733}
40734#[repr(C)]
40735pub struct ICoreWebView2_27_Vtbl {
40736 pub base__: ICoreWebView2_26_Vtbl,
40737 pub add_ScreenCaptureStarting: unsafe extern "system" fn(
40738 *mut core::ffi::c_void,
40739 *mut core::ffi::c_void,
40740 *mut i64,
40741 ) -> windows_core::HRESULT,
40742 pub remove_ScreenCaptureStarting:
40743 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
40744}
40745pub trait ICoreWebView2_27_Impl: ICoreWebView2_26_Impl {
40746 fn add_ScreenCaptureStarting(
40747 &self,
40748 eventhandler: windows_core::Ref<'_, ICoreWebView2ScreenCaptureStartingEventHandler>,
40749 token: *mut i64,
40750 ) -> windows_core::Result<()>;
40751 fn remove_ScreenCaptureStarting(&self, token: i64) -> windows_core::Result<()>;
40752}
40753impl ICoreWebView2_27_Vtbl {
40754 pub const fn new<Identity: ICoreWebView2_27_Impl, const OFFSET: isize>() -> Self {
40755 unsafe extern "system" fn add_ScreenCaptureStarting<
40756 Identity: ICoreWebView2_27_Impl,
40757 const OFFSET: isize,
40758 >(
40759 this: *mut core::ffi::c_void,
40760 eventhandler: *mut core::ffi::c_void,
40761 token: *mut i64,
40762 ) -> windows_core::HRESULT {
40763 unsafe {
40764 let this: &Identity =
40765 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40766 ICoreWebView2_27_Impl::add_ScreenCaptureStarting(
40767 this,
40768 core::mem::transmute_copy(&eventhandler),
40769 core::mem::transmute_copy(&token),
40770 )
40771 .into()
40772 }
40773 }
40774 unsafe extern "system" fn remove_ScreenCaptureStarting<
40775 Identity: ICoreWebView2_27_Impl,
40776 const OFFSET: isize,
40777 >(
40778 this: *mut core::ffi::c_void,
40779 token: i64,
40780 ) -> windows_core::HRESULT {
40781 unsafe {
40782 let this: &Identity =
40783 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40784 ICoreWebView2_27_Impl::remove_ScreenCaptureStarting(
40785 this,
40786 core::mem::transmute_copy(&token),
40787 )
40788 .into()
40789 }
40790 }
40791 Self {
40792 base__: ICoreWebView2_26_Vtbl::new::<Identity, OFFSET>(),
40793 add_ScreenCaptureStarting: add_ScreenCaptureStarting::<Identity, OFFSET>,
40794 remove_ScreenCaptureStarting: remove_ScreenCaptureStarting::<Identity, OFFSET>,
40795 }
40796 }
40797 pub fn matches(iid: &windows_core::GUID) -> bool {
40798 iid == &<ICoreWebView2_27 as windows_core::Interface>::IID
40799 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
40800 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
40801 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
40802 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
40803 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
40804 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
40805 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
40806 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
40807 || iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
40808 || iid == &<ICoreWebView2_10 as windows_core::Interface>::IID
40809 || iid == &<ICoreWebView2_11 as windows_core::Interface>::IID
40810 || iid == &<ICoreWebView2_12 as windows_core::Interface>::IID
40811 || iid == &<ICoreWebView2_13 as windows_core::Interface>::IID
40812 || iid == &<ICoreWebView2_14 as windows_core::Interface>::IID
40813 || iid == &<ICoreWebView2_15 as windows_core::Interface>::IID
40814 || iid == &<ICoreWebView2_16 as windows_core::Interface>::IID
40815 || iid == &<ICoreWebView2_17 as windows_core::Interface>::IID
40816 || iid == &<ICoreWebView2_18 as windows_core::Interface>::IID
40817 || iid == &<ICoreWebView2_19 as windows_core::Interface>::IID
40818 || iid == &<ICoreWebView2_20 as windows_core::Interface>::IID
40819 || iid == &<ICoreWebView2_21 as windows_core::Interface>::IID
40820 || iid == &<ICoreWebView2_22 as windows_core::Interface>::IID
40821 || iid == &<ICoreWebView2_23 as windows_core::Interface>::IID
40822 || iid == &<ICoreWebView2_24 as windows_core::Interface>::IID
40823 || iid == &<ICoreWebView2_25 as windows_core::Interface>::IID
40824 || iid == &<ICoreWebView2_26 as windows_core::Interface>::IID
40825 }
40826}
40827impl windows_core::RuntimeName for ICoreWebView2_27 {}
40828windows_core::imp::define_interface!(
40829 ICoreWebView2_3,
40830 ICoreWebView2_3_Vtbl,
40831 0xa0d6df20_3b92_416d_aa0c_437a9c727857
40832);
40833impl core::ops::Deref for ICoreWebView2_3 {
40834 type Target = ICoreWebView2_2;
40835 fn deref(&self) -> &Self::Target {
40836 unsafe { core::mem::transmute(self) }
40837 }
40838}
40839windows_core::imp::interface_hierarchy!(
40840 ICoreWebView2_3,
40841 windows_core::IUnknown,
40842 ICoreWebView2,
40843 ICoreWebView2_2
40844);
40845impl ICoreWebView2_3 {
40846 pub unsafe fn TrySuspend<P0>(&self, handler: P0) -> windows_core::Result<()>
40847 where
40848 P0: windows_core::Param<ICoreWebView2TrySuspendCompletedHandler>,
40849 {
40850 unsafe {
40851 (windows_core::Interface::vtable(self).TrySuspend)(
40852 windows_core::Interface::as_raw(self),
40853 handler.param().abi(),
40854 )
40855 .ok()
40856 }
40857 }
40858 pub unsafe fn Resume(&self) -> windows_core::Result<()> {
40859 unsafe {
40860 (windows_core::Interface::vtable(self).Resume)(windows_core::Interface::as_raw(self))
40861 .ok()
40862 }
40863 }
40864 pub unsafe fn IsSuspended(
40865 &self,
40866 issuspended: *mut windows_core::BOOL,
40867 ) -> windows_core::Result<()> {
40868 unsafe {
40869 (windows_core::Interface::vtable(self).IsSuspended)(
40870 windows_core::Interface::as_raw(self),
40871 issuspended as _,
40872 )
40873 .ok()
40874 }
40875 }
40876 pub unsafe fn SetVirtualHostNameToFolderMapping<P0, P1>(
40877 &self,
40878 hostname: P0,
40879 folderpath: P1,
40880 accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
40881 ) -> windows_core::Result<()>
40882 where
40883 P0: windows_core::Param<windows_core::PCWSTR>,
40884 P1: windows_core::Param<windows_core::PCWSTR>,
40885 {
40886 unsafe {
40887 (windows_core::Interface::vtable(self).SetVirtualHostNameToFolderMapping)(
40888 windows_core::Interface::as_raw(self),
40889 hostname.param().abi(),
40890 folderpath.param().abi(),
40891 accesskind,
40892 )
40893 .ok()
40894 }
40895 }
40896 pub unsafe fn ClearVirtualHostNameToFolderMapping<P0>(
40897 &self,
40898 hostname: P0,
40899 ) -> windows_core::Result<()>
40900 where
40901 P0: windows_core::Param<windows_core::PCWSTR>,
40902 {
40903 unsafe {
40904 (windows_core::Interface::vtable(self).ClearVirtualHostNameToFolderMapping)(
40905 windows_core::Interface::as_raw(self),
40906 hostname.param().abi(),
40907 )
40908 .ok()
40909 }
40910 }
40911}
40912#[repr(C)]
40913pub struct ICoreWebView2_3_Vtbl {
40914 pub base__: ICoreWebView2_2_Vtbl,
40915 pub TrySuspend: unsafe extern "system" fn(
40916 *mut core::ffi::c_void,
40917 *mut core::ffi::c_void,
40918 ) -> windows_core::HRESULT,
40919 pub Resume: unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
40920 pub IsSuspended: unsafe extern "system" fn(
40921 *mut core::ffi::c_void,
40922 *mut windows_core::BOOL,
40923 ) -> windows_core::HRESULT,
40924 pub SetVirtualHostNameToFolderMapping: unsafe extern "system" fn(
40925 *mut core::ffi::c_void,
40926 windows_core::PCWSTR,
40927 windows_core::PCWSTR,
40928 COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
40929 ) -> windows_core::HRESULT,
40930 pub ClearVirtualHostNameToFolderMapping: unsafe extern "system" fn(
40931 *mut core::ffi::c_void,
40932 windows_core::PCWSTR,
40933 )
40934 -> windows_core::HRESULT,
40935}
40936pub trait ICoreWebView2_3_Impl: ICoreWebView2_2_Impl {
40937 fn TrySuspend(
40938 &self,
40939 handler: windows_core::Ref<'_, ICoreWebView2TrySuspendCompletedHandler>,
40940 ) -> windows_core::Result<()>;
40941 fn Resume(&self) -> windows_core::Result<()>;
40942 fn IsSuspended(&self, issuspended: *mut windows_core::BOOL) -> windows_core::Result<()>;
40943 fn SetVirtualHostNameToFolderMapping(
40944 &self,
40945 hostname: &windows_core::PCWSTR,
40946 folderpath: &windows_core::PCWSTR,
40947 accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
40948 ) -> windows_core::Result<()>;
40949 fn ClearVirtualHostNameToFolderMapping(
40950 &self,
40951 hostname: &windows_core::PCWSTR,
40952 ) -> windows_core::Result<()>;
40953}
40954impl ICoreWebView2_3_Vtbl {
40955 pub const fn new<Identity: ICoreWebView2_3_Impl, const OFFSET: isize>() -> Self {
40956 unsafe extern "system" fn TrySuspend<
40957 Identity: ICoreWebView2_3_Impl,
40958 const OFFSET: isize,
40959 >(
40960 this: *mut core::ffi::c_void,
40961 handler: *mut core::ffi::c_void,
40962 ) -> windows_core::HRESULT {
40963 unsafe {
40964 let this: &Identity =
40965 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40966 ICoreWebView2_3_Impl::TrySuspend(this, core::mem::transmute_copy(&handler)).into()
40967 }
40968 }
40969 unsafe extern "system" fn Resume<Identity: ICoreWebView2_3_Impl, const OFFSET: isize>(
40970 this: *mut core::ffi::c_void,
40971 ) -> windows_core::HRESULT {
40972 unsafe {
40973 let this: &Identity =
40974 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40975 ICoreWebView2_3_Impl::Resume(this).into()
40976 }
40977 }
40978 unsafe extern "system" fn IsSuspended<
40979 Identity: ICoreWebView2_3_Impl,
40980 const OFFSET: isize,
40981 >(
40982 this: *mut core::ffi::c_void,
40983 issuspended: *mut windows_core::BOOL,
40984 ) -> windows_core::HRESULT {
40985 unsafe {
40986 let this: &Identity =
40987 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
40988 ICoreWebView2_3_Impl::IsSuspended(this, core::mem::transmute_copy(&issuspended))
40989 .into()
40990 }
40991 }
40992 unsafe extern "system" fn SetVirtualHostNameToFolderMapping<
40993 Identity: ICoreWebView2_3_Impl,
40994 const OFFSET: isize,
40995 >(
40996 this: *mut core::ffi::c_void,
40997 hostname: windows_core::PCWSTR,
40998 folderpath: windows_core::PCWSTR,
40999 accesskind: COREWEBVIEW2_HOST_RESOURCE_ACCESS_KIND,
41000 ) -> windows_core::HRESULT {
41001 unsafe {
41002 let this: &Identity =
41003 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41004 ICoreWebView2_3_Impl::SetVirtualHostNameToFolderMapping(
41005 this,
41006 core::mem::transmute(&hostname),
41007 core::mem::transmute(&folderpath),
41008 core::mem::transmute_copy(&accesskind),
41009 )
41010 .into()
41011 }
41012 }
41013 unsafe extern "system" fn ClearVirtualHostNameToFolderMapping<
41014 Identity: ICoreWebView2_3_Impl,
41015 const OFFSET: isize,
41016 >(
41017 this: *mut core::ffi::c_void,
41018 hostname: windows_core::PCWSTR,
41019 ) -> windows_core::HRESULT {
41020 unsafe {
41021 let this: &Identity =
41022 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41023 ICoreWebView2_3_Impl::ClearVirtualHostNameToFolderMapping(
41024 this,
41025 core::mem::transmute(&hostname),
41026 )
41027 .into()
41028 }
41029 }
41030 Self {
41031 base__: ICoreWebView2_2_Vtbl::new::<Identity, OFFSET>(),
41032 TrySuspend: TrySuspend::<Identity, OFFSET>,
41033 Resume: Resume::<Identity, OFFSET>,
41034 IsSuspended: IsSuspended::<Identity, OFFSET>,
41035 SetVirtualHostNameToFolderMapping: SetVirtualHostNameToFolderMapping::<Identity, OFFSET>,
41036 ClearVirtualHostNameToFolderMapping: ClearVirtualHostNameToFolderMapping::<
41037 Identity,
41038 OFFSET,
41039 >,
41040 }
41041 }
41042 pub fn matches(iid: &windows_core::GUID) -> bool {
41043 iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
41044 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
41045 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
41046 }
41047}
41048impl windows_core::RuntimeName for ICoreWebView2_3 {}
41049windows_core::imp::define_interface!(
41050 ICoreWebView2_4,
41051 ICoreWebView2_4_Vtbl,
41052 0x20d02d59_6df2_42dc_bd06_f98a694b1302
41053);
41054impl core::ops::Deref for ICoreWebView2_4 {
41055 type Target = ICoreWebView2_3;
41056 fn deref(&self) -> &Self::Target {
41057 unsafe { core::mem::transmute(self) }
41058 }
41059}
41060windows_core::imp::interface_hierarchy!(
41061 ICoreWebView2_4,
41062 windows_core::IUnknown,
41063 ICoreWebView2,
41064 ICoreWebView2_2,
41065 ICoreWebView2_3
41066);
41067impl ICoreWebView2_4 {
41068 pub unsafe fn add_FrameCreated<P0>(
41069 &self,
41070 eventhandler: P0,
41071 token: *mut i64,
41072 ) -> windows_core::Result<()>
41073 where
41074 P0: windows_core::Param<ICoreWebView2FrameCreatedEventHandler>,
41075 {
41076 unsafe {
41077 (windows_core::Interface::vtable(self).add_FrameCreated)(
41078 windows_core::Interface::as_raw(self),
41079 eventhandler.param().abi(),
41080 token as _,
41081 )
41082 .ok()
41083 }
41084 }
41085 pub unsafe fn remove_FrameCreated(&self, token: i64) -> windows_core::Result<()> {
41086 unsafe {
41087 (windows_core::Interface::vtable(self).remove_FrameCreated)(
41088 windows_core::Interface::as_raw(self),
41089 token,
41090 )
41091 .ok()
41092 }
41093 }
41094 pub unsafe fn add_DownloadStarting<P0>(
41095 &self,
41096 eventhandler: P0,
41097 token: *mut i64,
41098 ) -> windows_core::Result<()>
41099 where
41100 P0: windows_core::Param<ICoreWebView2DownloadStartingEventHandler>,
41101 {
41102 unsafe {
41103 (windows_core::Interface::vtable(self).add_DownloadStarting)(
41104 windows_core::Interface::as_raw(self),
41105 eventhandler.param().abi(),
41106 token as _,
41107 )
41108 .ok()
41109 }
41110 }
41111 pub unsafe fn remove_DownloadStarting(&self, token: i64) -> windows_core::Result<()> {
41112 unsafe {
41113 (windows_core::Interface::vtable(self).remove_DownloadStarting)(
41114 windows_core::Interface::as_raw(self),
41115 token,
41116 )
41117 .ok()
41118 }
41119 }
41120}
41121#[repr(C)]
41122pub struct ICoreWebView2_4_Vtbl {
41123 pub base__: ICoreWebView2_3_Vtbl,
41124 pub add_FrameCreated: unsafe extern "system" fn(
41125 *mut core::ffi::c_void,
41126 *mut core::ffi::c_void,
41127 *mut i64,
41128 ) -> windows_core::HRESULT,
41129 pub remove_FrameCreated:
41130 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
41131 pub add_DownloadStarting: unsafe extern "system" fn(
41132 *mut core::ffi::c_void,
41133 *mut core::ffi::c_void,
41134 *mut i64,
41135 ) -> windows_core::HRESULT,
41136 pub remove_DownloadStarting:
41137 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
41138}
41139pub trait ICoreWebView2_4_Impl: ICoreWebView2_3_Impl {
41140 fn add_FrameCreated(
41141 &self,
41142 eventhandler: windows_core::Ref<'_, ICoreWebView2FrameCreatedEventHandler>,
41143 token: *mut i64,
41144 ) -> windows_core::Result<()>;
41145 fn remove_FrameCreated(&self, token: i64) -> windows_core::Result<()>;
41146 fn add_DownloadStarting(
41147 &self,
41148 eventhandler: windows_core::Ref<'_, ICoreWebView2DownloadStartingEventHandler>,
41149 token: *mut i64,
41150 ) -> windows_core::Result<()>;
41151 fn remove_DownloadStarting(&self, token: i64) -> windows_core::Result<()>;
41152}
41153impl ICoreWebView2_4_Vtbl {
41154 pub const fn new<Identity: ICoreWebView2_4_Impl, const OFFSET: isize>() -> Self {
41155 unsafe extern "system" fn add_FrameCreated<
41156 Identity: ICoreWebView2_4_Impl,
41157 const OFFSET: isize,
41158 >(
41159 this: *mut core::ffi::c_void,
41160 eventhandler: *mut core::ffi::c_void,
41161 token: *mut i64,
41162 ) -> windows_core::HRESULT {
41163 unsafe {
41164 let this: &Identity =
41165 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41166 ICoreWebView2_4_Impl::add_FrameCreated(
41167 this,
41168 core::mem::transmute_copy(&eventhandler),
41169 core::mem::transmute_copy(&token),
41170 )
41171 .into()
41172 }
41173 }
41174 unsafe extern "system" fn remove_FrameCreated<
41175 Identity: ICoreWebView2_4_Impl,
41176 const OFFSET: isize,
41177 >(
41178 this: *mut core::ffi::c_void,
41179 token: i64,
41180 ) -> windows_core::HRESULT {
41181 unsafe {
41182 let this: &Identity =
41183 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41184 ICoreWebView2_4_Impl::remove_FrameCreated(this, core::mem::transmute_copy(&token))
41185 .into()
41186 }
41187 }
41188 unsafe extern "system" fn add_DownloadStarting<
41189 Identity: ICoreWebView2_4_Impl,
41190 const OFFSET: isize,
41191 >(
41192 this: *mut core::ffi::c_void,
41193 eventhandler: *mut core::ffi::c_void,
41194 token: *mut i64,
41195 ) -> windows_core::HRESULT {
41196 unsafe {
41197 let this: &Identity =
41198 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41199 ICoreWebView2_4_Impl::add_DownloadStarting(
41200 this,
41201 core::mem::transmute_copy(&eventhandler),
41202 core::mem::transmute_copy(&token),
41203 )
41204 .into()
41205 }
41206 }
41207 unsafe extern "system" fn remove_DownloadStarting<
41208 Identity: ICoreWebView2_4_Impl,
41209 const OFFSET: isize,
41210 >(
41211 this: *mut core::ffi::c_void,
41212 token: i64,
41213 ) -> windows_core::HRESULT {
41214 unsafe {
41215 let this: &Identity =
41216 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41217 ICoreWebView2_4_Impl::remove_DownloadStarting(
41218 this,
41219 core::mem::transmute_copy(&token),
41220 )
41221 .into()
41222 }
41223 }
41224 Self {
41225 base__: ICoreWebView2_3_Vtbl::new::<Identity, OFFSET>(),
41226 add_FrameCreated: add_FrameCreated::<Identity, OFFSET>,
41227 remove_FrameCreated: remove_FrameCreated::<Identity, OFFSET>,
41228 add_DownloadStarting: add_DownloadStarting::<Identity, OFFSET>,
41229 remove_DownloadStarting: remove_DownloadStarting::<Identity, OFFSET>,
41230 }
41231 }
41232 pub fn matches(iid: &windows_core::GUID) -> bool {
41233 iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
41234 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
41235 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
41236 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
41237 }
41238}
41239impl windows_core::RuntimeName for ICoreWebView2_4 {}
41240windows_core::imp::define_interface!(
41241 ICoreWebView2_5,
41242 ICoreWebView2_5_Vtbl,
41243 0xbedb11b8_d63c_11eb_b8bc_0242ac130003
41244);
41245impl core::ops::Deref for ICoreWebView2_5 {
41246 type Target = ICoreWebView2_4;
41247 fn deref(&self) -> &Self::Target {
41248 unsafe { core::mem::transmute(self) }
41249 }
41250}
41251windows_core::imp::interface_hierarchy!(
41252 ICoreWebView2_5,
41253 windows_core::IUnknown,
41254 ICoreWebView2,
41255 ICoreWebView2_2,
41256 ICoreWebView2_3,
41257 ICoreWebView2_4
41258);
41259impl ICoreWebView2_5 {
41260 pub unsafe fn add_ClientCertificateRequested<P0>(
41261 &self,
41262 eventhandler: P0,
41263 token: *mut i64,
41264 ) -> windows_core::Result<()>
41265 where
41266 P0: windows_core::Param<ICoreWebView2ClientCertificateRequestedEventHandler>,
41267 {
41268 unsafe {
41269 (windows_core::Interface::vtable(self).add_ClientCertificateRequested)(
41270 windows_core::Interface::as_raw(self),
41271 eventhandler.param().abi(),
41272 token as _,
41273 )
41274 .ok()
41275 }
41276 }
41277 pub unsafe fn remove_ClientCertificateRequested(&self, token: i64) -> windows_core::Result<()> {
41278 unsafe {
41279 (windows_core::Interface::vtable(self).remove_ClientCertificateRequested)(
41280 windows_core::Interface::as_raw(self),
41281 token,
41282 )
41283 .ok()
41284 }
41285 }
41286}
41287#[repr(C)]
41288pub struct ICoreWebView2_5_Vtbl {
41289 pub base__: ICoreWebView2_4_Vtbl,
41290 pub add_ClientCertificateRequested: unsafe extern "system" fn(
41291 *mut core::ffi::c_void,
41292 *mut core::ffi::c_void,
41293 *mut i64,
41294 ) -> windows_core::HRESULT,
41295 pub remove_ClientCertificateRequested:
41296 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
41297}
41298pub trait ICoreWebView2_5_Impl: ICoreWebView2_4_Impl {
41299 fn add_ClientCertificateRequested(
41300 &self,
41301 eventhandler: windows_core::Ref<'_, ICoreWebView2ClientCertificateRequestedEventHandler>,
41302 token: *mut i64,
41303 ) -> windows_core::Result<()>;
41304 fn remove_ClientCertificateRequested(&self, token: i64) -> windows_core::Result<()>;
41305}
41306impl ICoreWebView2_5_Vtbl {
41307 pub const fn new<Identity: ICoreWebView2_5_Impl, const OFFSET: isize>() -> Self {
41308 unsafe extern "system" fn add_ClientCertificateRequested<
41309 Identity: ICoreWebView2_5_Impl,
41310 const OFFSET: isize,
41311 >(
41312 this: *mut core::ffi::c_void,
41313 eventhandler: *mut core::ffi::c_void,
41314 token: *mut i64,
41315 ) -> windows_core::HRESULT {
41316 unsafe {
41317 let this: &Identity =
41318 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41319 ICoreWebView2_5_Impl::add_ClientCertificateRequested(
41320 this,
41321 core::mem::transmute_copy(&eventhandler),
41322 core::mem::transmute_copy(&token),
41323 )
41324 .into()
41325 }
41326 }
41327 unsafe extern "system" fn remove_ClientCertificateRequested<
41328 Identity: ICoreWebView2_5_Impl,
41329 const OFFSET: isize,
41330 >(
41331 this: *mut core::ffi::c_void,
41332 token: i64,
41333 ) -> windows_core::HRESULT {
41334 unsafe {
41335 let this: &Identity =
41336 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41337 ICoreWebView2_5_Impl::remove_ClientCertificateRequested(
41338 this,
41339 core::mem::transmute_copy(&token),
41340 )
41341 .into()
41342 }
41343 }
41344 Self {
41345 base__: ICoreWebView2_4_Vtbl::new::<Identity, OFFSET>(),
41346 add_ClientCertificateRequested: add_ClientCertificateRequested::<Identity, OFFSET>,
41347 remove_ClientCertificateRequested: remove_ClientCertificateRequested::<Identity, OFFSET>,
41348 }
41349 }
41350 pub fn matches(iid: &windows_core::GUID) -> bool {
41351 iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
41352 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
41353 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
41354 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
41355 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
41356 }
41357}
41358impl windows_core::RuntimeName for ICoreWebView2_5 {}
41359windows_core::imp::define_interface!(
41360 ICoreWebView2_6,
41361 ICoreWebView2_6_Vtbl,
41362 0x499aadac_d92c_4589_8a75_111bfc167795
41363);
41364impl core::ops::Deref for ICoreWebView2_6 {
41365 type Target = ICoreWebView2_5;
41366 fn deref(&self) -> &Self::Target {
41367 unsafe { core::mem::transmute(self) }
41368 }
41369}
41370windows_core::imp::interface_hierarchy!(
41371 ICoreWebView2_6,
41372 windows_core::IUnknown,
41373 ICoreWebView2,
41374 ICoreWebView2_2,
41375 ICoreWebView2_3,
41376 ICoreWebView2_4,
41377 ICoreWebView2_5
41378);
41379impl ICoreWebView2_6 {
41380 pub unsafe fn OpenTaskManagerWindow(&self) -> windows_core::Result<()> {
41381 unsafe {
41382 (windows_core::Interface::vtable(self).OpenTaskManagerWindow)(
41383 windows_core::Interface::as_raw(self),
41384 )
41385 .ok()
41386 }
41387 }
41388}
41389#[repr(C)]
41390pub struct ICoreWebView2_6_Vtbl {
41391 pub base__: ICoreWebView2_5_Vtbl,
41392 pub OpenTaskManagerWindow:
41393 unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
41394}
41395pub trait ICoreWebView2_6_Impl: ICoreWebView2_5_Impl {
41396 fn OpenTaskManagerWindow(&self) -> windows_core::Result<()>;
41397}
41398impl ICoreWebView2_6_Vtbl {
41399 pub const fn new<Identity: ICoreWebView2_6_Impl, const OFFSET: isize>() -> Self {
41400 unsafe extern "system" fn OpenTaskManagerWindow<
41401 Identity: ICoreWebView2_6_Impl,
41402 const OFFSET: isize,
41403 >(
41404 this: *mut core::ffi::c_void,
41405 ) -> windows_core::HRESULT {
41406 unsafe {
41407 let this: &Identity =
41408 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41409 ICoreWebView2_6_Impl::OpenTaskManagerWindow(this).into()
41410 }
41411 }
41412 Self {
41413 base__: ICoreWebView2_5_Vtbl::new::<Identity, OFFSET>(),
41414 OpenTaskManagerWindow: OpenTaskManagerWindow::<Identity, OFFSET>,
41415 }
41416 }
41417 pub fn matches(iid: &windows_core::GUID) -> bool {
41418 iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
41419 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
41420 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
41421 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
41422 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
41423 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
41424 }
41425}
41426impl windows_core::RuntimeName for ICoreWebView2_6 {}
41427windows_core::imp::define_interface!(
41428 ICoreWebView2_7,
41429 ICoreWebView2_7_Vtbl,
41430 0x79c24d83_09a3_45ae_9418_487f32a58740
41431);
41432impl core::ops::Deref for ICoreWebView2_7 {
41433 type Target = ICoreWebView2_6;
41434 fn deref(&self) -> &Self::Target {
41435 unsafe { core::mem::transmute(self) }
41436 }
41437}
41438windows_core::imp::interface_hierarchy!(
41439 ICoreWebView2_7,
41440 windows_core::IUnknown,
41441 ICoreWebView2,
41442 ICoreWebView2_2,
41443 ICoreWebView2_3,
41444 ICoreWebView2_4,
41445 ICoreWebView2_5,
41446 ICoreWebView2_6
41447);
41448impl ICoreWebView2_7 {
41449 pub unsafe fn PrintToPdf<P0, P1, P2>(
41450 &self,
41451 resultfilepath: P0,
41452 printsettings: P1,
41453 handler: P2,
41454 ) -> windows_core::Result<()>
41455 where
41456 P0: windows_core::Param<windows_core::PCWSTR>,
41457 P1: windows_core::Param<ICoreWebView2PrintSettings>,
41458 P2: windows_core::Param<ICoreWebView2PrintToPdfCompletedHandler>,
41459 {
41460 unsafe {
41461 (windows_core::Interface::vtable(self).PrintToPdf)(
41462 windows_core::Interface::as_raw(self),
41463 resultfilepath.param().abi(),
41464 printsettings.param().abi(),
41465 handler.param().abi(),
41466 )
41467 .ok()
41468 }
41469 }
41470}
41471#[repr(C)]
41472pub struct ICoreWebView2_7_Vtbl {
41473 pub base__: ICoreWebView2_6_Vtbl,
41474 pub PrintToPdf: unsafe extern "system" fn(
41475 *mut core::ffi::c_void,
41476 windows_core::PCWSTR,
41477 *mut core::ffi::c_void,
41478 *mut core::ffi::c_void,
41479 ) -> windows_core::HRESULT,
41480}
41481pub trait ICoreWebView2_7_Impl: ICoreWebView2_6_Impl {
41482 fn PrintToPdf(
41483 &self,
41484 resultfilepath: &windows_core::PCWSTR,
41485 printsettings: windows_core::Ref<'_, ICoreWebView2PrintSettings>,
41486 handler: windows_core::Ref<'_, ICoreWebView2PrintToPdfCompletedHandler>,
41487 ) -> windows_core::Result<()>;
41488}
41489impl ICoreWebView2_7_Vtbl {
41490 pub const fn new<Identity: ICoreWebView2_7_Impl, const OFFSET: isize>() -> Self {
41491 unsafe extern "system" fn PrintToPdf<
41492 Identity: ICoreWebView2_7_Impl,
41493 const OFFSET: isize,
41494 >(
41495 this: *mut core::ffi::c_void,
41496 resultfilepath: windows_core::PCWSTR,
41497 printsettings: *mut core::ffi::c_void,
41498 handler: *mut core::ffi::c_void,
41499 ) -> windows_core::HRESULT {
41500 unsafe {
41501 let this: &Identity =
41502 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41503 ICoreWebView2_7_Impl::PrintToPdf(
41504 this,
41505 core::mem::transmute(&resultfilepath),
41506 core::mem::transmute_copy(&printsettings),
41507 core::mem::transmute_copy(&handler),
41508 )
41509 .into()
41510 }
41511 }
41512 Self {
41513 base__: ICoreWebView2_6_Vtbl::new::<Identity, OFFSET>(),
41514 PrintToPdf: PrintToPdf::<Identity, OFFSET>,
41515 }
41516 }
41517 pub fn matches(iid: &windows_core::GUID) -> bool {
41518 iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
41519 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
41520 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
41521 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
41522 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
41523 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
41524 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
41525 }
41526}
41527impl windows_core::RuntimeName for ICoreWebView2_7 {}
41528windows_core::imp::define_interface!(
41529 ICoreWebView2_8,
41530 ICoreWebView2_8_Vtbl,
41531 0xe9632730_6e1e_43ab_b7b8_7b2c9e62e094
41532);
41533impl core::ops::Deref for ICoreWebView2_8 {
41534 type Target = ICoreWebView2_7;
41535 fn deref(&self) -> &Self::Target {
41536 unsafe { core::mem::transmute(self) }
41537 }
41538}
41539windows_core::imp::interface_hierarchy!(
41540 ICoreWebView2_8,
41541 windows_core::IUnknown,
41542 ICoreWebView2,
41543 ICoreWebView2_2,
41544 ICoreWebView2_3,
41545 ICoreWebView2_4,
41546 ICoreWebView2_5,
41547 ICoreWebView2_6,
41548 ICoreWebView2_7
41549);
41550impl ICoreWebView2_8 {
41551 pub unsafe fn add_IsMutedChanged<P0>(
41552 &self,
41553 eventhandler: P0,
41554 token: *mut i64,
41555 ) -> windows_core::Result<()>
41556 where
41557 P0: windows_core::Param<ICoreWebView2IsMutedChangedEventHandler>,
41558 {
41559 unsafe {
41560 (windows_core::Interface::vtable(self).add_IsMutedChanged)(
41561 windows_core::Interface::as_raw(self),
41562 eventhandler.param().abi(),
41563 token as _,
41564 )
41565 .ok()
41566 }
41567 }
41568 pub unsafe fn remove_IsMutedChanged(&self, token: i64) -> windows_core::Result<()> {
41569 unsafe {
41570 (windows_core::Interface::vtable(self).remove_IsMutedChanged)(
41571 windows_core::Interface::as_raw(self),
41572 token,
41573 )
41574 .ok()
41575 }
41576 }
41577 pub unsafe fn IsMuted(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()> {
41578 unsafe {
41579 (windows_core::Interface::vtable(self).IsMuted)(
41580 windows_core::Interface::as_raw(self),
41581 value as _,
41582 )
41583 .ok()
41584 }
41585 }
41586 pub unsafe fn SetIsMuted(&self, value: bool) -> windows_core::Result<()> {
41587 unsafe {
41588 (windows_core::Interface::vtable(self).SetIsMuted)(
41589 windows_core::Interface::as_raw(self),
41590 value.into(),
41591 )
41592 .ok()
41593 }
41594 }
41595 pub unsafe fn add_IsDocumentPlayingAudioChanged<P0>(
41596 &self,
41597 eventhandler: P0,
41598 token: *mut i64,
41599 ) -> windows_core::Result<()>
41600 where
41601 P0: windows_core::Param<ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
41602 {
41603 unsafe {
41604 (windows_core::Interface::vtable(self).add_IsDocumentPlayingAudioChanged)(
41605 windows_core::Interface::as_raw(self),
41606 eventhandler.param().abi(),
41607 token as _,
41608 )
41609 .ok()
41610 }
41611 }
41612 pub unsafe fn remove_IsDocumentPlayingAudioChanged(
41613 &self,
41614 token: i64,
41615 ) -> windows_core::Result<()> {
41616 unsafe {
41617 (windows_core::Interface::vtable(self).remove_IsDocumentPlayingAudioChanged)(
41618 windows_core::Interface::as_raw(self),
41619 token,
41620 )
41621 .ok()
41622 }
41623 }
41624 pub unsafe fn IsDocumentPlayingAudio(
41625 &self,
41626 value: *mut windows_core::BOOL,
41627 ) -> windows_core::Result<()> {
41628 unsafe {
41629 (windows_core::Interface::vtable(self).IsDocumentPlayingAudio)(
41630 windows_core::Interface::as_raw(self),
41631 value as _,
41632 )
41633 .ok()
41634 }
41635 }
41636}
41637#[repr(C)]
41638pub struct ICoreWebView2_8_Vtbl {
41639 pub base__: ICoreWebView2_7_Vtbl,
41640 pub add_IsMutedChanged: unsafe extern "system" fn(
41641 *mut core::ffi::c_void,
41642 *mut core::ffi::c_void,
41643 *mut i64,
41644 ) -> windows_core::HRESULT,
41645 pub remove_IsMutedChanged:
41646 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
41647 pub IsMuted: unsafe extern "system" fn(
41648 *mut core::ffi::c_void,
41649 *mut windows_core::BOOL,
41650 ) -> windows_core::HRESULT,
41651 pub SetIsMuted: unsafe extern "system" fn(
41652 *mut core::ffi::c_void,
41653 windows_core::BOOL,
41654 ) -> windows_core::HRESULT,
41655 pub add_IsDocumentPlayingAudioChanged: unsafe extern "system" fn(
41656 *mut core::ffi::c_void,
41657 *mut core::ffi::c_void,
41658 *mut i64,
41659 ) -> windows_core::HRESULT,
41660 pub remove_IsDocumentPlayingAudioChanged:
41661 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
41662 pub IsDocumentPlayingAudio: unsafe extern "system" fn(
41663 *mut core::ffi::c_void,
41664 *mut windows_core::BOOL,
41665 ) -> windows_core::HRESULT,
41666}
41667pub trait ICoreWebView2_8_Impl: ICoreWebView2_7_Impl {
41668 fn add_IsMutedChanged(
41669 &self,
41670 eventhandler: windows_core::Ref<'_, ICoreWebView2IsMutedChangedEventHandler>,
41671 token: *mut i64,
41672 ) -> windows_core::Result<()>;
41673 fn remove_IsMutedChanged(&self, token: i64) -> windows_core::Result<()>;
41674 fn IsMuted(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
41675 fn SetIsMuted(&self, value: windows_core::BOOL) -> windows_core::Result<()>;
41676 fn add_IsDocumentPlayingAudioChanged(
41677 &self,
41678 eventhandler: windows_core::Ref<'_, ICoreWebView2IsDocumentPlayingAudioChangedEventHandler>,
41679 token: *mut i64,
41680 ) -> windows_core::Result<()>;
41681 fn remove_IsDocumentPlayingAudioChanged(&self, token: i64) -> windows_core::Result<()>;
41682 fn IsDocumentPlayingAudio(&self, value: *mut windows_core::BOOL) -> windows_core::Result<()>;
41683}
41684impl ICoreWebView2_8_Vtbl {
41685 pub const fn new<Identity: ICoreWebView2_8_Impl, const OFFSET: isize>() -> Self {
41686 unsafe extern "system" fn add_IsMutedChanged<
41687 Identity: ICoreWebView2_8_Impl,
41688 const OFFSET: isize,
41689 >(
41690 this: *mut core::ffi::c_void,
41691 eventhandler: *mut core::ffi::c_void,
41692 token: *mut i64,
41693 ) -> windows_core::HRESULT {
41694 unsafe {
41695 let this: &Identity =
41696 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41697 ICoreWebView2_8_Impl::add_IsMutedChanged(
41698 this,
41699 core::mem::transmute_copy(&eventhandler),
41700 core::mem::transmute_copy(&token),
41701 )
41702 .into()
41703 }
41704 }
41705 unsafe extern "system" fn remove_IsMutedChanged<
41706 Identity: ICoreWebView2_8_Impl,
41707 const OFFSET: isize,
41708 >(
41709 this: *mut core::ffi::c_void,
41710 token: i64,
41711 ) -> windows_core::HRESULT {
41712 unsafe {
41713 let this: &Identity =
41714 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41715 ICoreWebView2_8_Impl::remove_IsMutedChanged(this, core::mem::transmute_copy(&token))
41716 .into()
41717 }
41718 }
41719 unsafe extern "system" fn IsMuted<Identity: ICoreWebView2_8_Impl, const OFFSET: isize>(
41720 this: *mut core::ffi::c_void,
41721 value: *mut windows_core::BOOL,
41722 ) -> windows_core::HRESULT {
41723 unsafe {
41724 let this: &Identity =
41725 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41726 ICoreWebView2_8_Impl::IsMuted(this, core::mem::transmute_copy(&value)).into()
41727 }
41728 }
41729 unsafe extern "system" fn SetIsMuted<
41730 Identity: ICoreWebView2_8_Impl,
41731 const OFFSET: isize,
41732 >(
41733 this: *mut core::ffi::c_void,
41734 value: windows_core::BOOL,
41735 ) -> windows_core::HRESULT {
41736 unsafe {
41737 let this: &Identity =
41738 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41739 ICoreWebView2_8_Impl::SetIsMuted(this, core::mem::transmute_copy(&value)).into()
41740 }
41741 }
41742 unsafe extern "system" fn add_IsDocumentPlayingAudioChanged<
41743 Identity: ICoreWebView2_8_Impl,
41744 const OFFSET: isize,
41745 >(
41746 this: *mut core::ffi::c_void,
41747 eventhandler: *mut core::ffi::c_void,
41748 token: *mut i64,
41749 ) -> windows_core::HRESULT {
41750 unsafe {
41751 let this: &Identity =
41752 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41753 ICoreWebView2_8_Impl::add_IsDocumentPlayingAudioChanged(
41754 this,
41755 core::mem::transmute_copy(&eventhandler),
41756 core::mem::transmute_copy(&token),
41757 )
41758 .into()
41759 }
41760 }
41761 unsafe extern "system" fn remove_IsDocumentPlayingAudioChanged<
41762 Identity: ICoreWebView2_8_Impl,
41763 const OFFSET: isize,
41764 >(
41765 this: *mut core::ffi::c_void,
41766 token: i64,
41767 ) -> windows_core::HRESULT {
41768 unsafe {
41769 let this: &Identity =
41770 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41771 ICoreWebView2_8_Impl::remove_IsDocumentPlayingAudioChanged(
41772 this,
41773 core::mem::transmute_copy(&token),
41774 )
41775 .into()
41776 }
41777 }
41778 unsafe extern "system" fn IsDocumentPlayingAudio<
41779 Identity: ICoreWebView2_8_Impl,
41780 const OFFSET: isize,
41781 >(
41782 this: *mut core::ffi::c_void,
41783 value: *mut windows_core::BOOL,
41784 ) -> windows_core::HRESULT {
41785 unsafe {
41786 let this: &Identity =
41787 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
41788 ICoreWebView2_8_Impl::IsDocumentPlayingAudio(
41789 this,
41790 core::mem::transmute_copy(&value),
41791 )
41792 .into()
41793 }
41794 }
41795 Self {
41796 base__: ICoreWebView2_7_Vtbl::new::<Identity, OFFSET>(),
41797 add_IsMutedChanged: add_IsMutedChanged::<Identity, OFFSET>,
41798 remove_IsMutedChanged: remove_IsMutedChanged::<Identity, OFFSET>,
41799 IsMuted: IsMuted::<Identity, OFFSET>,
41800 SetIsMuted: SetIsMuted::<Identity, OFFSET>,
41801 add_IsDocumentPlayingAudioChanged: add_IsDocumentPlayingAudioChanged::<Identity, OFFSET>,
41802 remove_IsDocumentPlayingAudioChanged: remove_IsDocumentPlayingAudioChanged::<
41803 Identity,
41804 OFFSET,
41805 >,
41806 IsDocumentPlayingAudio: IsDocumentPlayingAudio::<Identity, OFFSET>,
41807 }
41808 }
41809 pub fn matches(iid: &windows_core::GUID) -> bool {
41810 iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
41811 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
41812 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
41813 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
41814 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
41815 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
41816 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
41817 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
41818 }
41819}
41820impl windows_core::RuntimeName for ICoreWebView2_8 {}
41821windows_core::imp::define_interface!(
41822 ICoreWebView2_9,
41823 ICoreWebView2_9_Vtbl,
41824 0x4d7b2eab_9fdc_468d_b998_a9260b5ed651
41825);
41826impl core::ops::Deref for ICoreWebView2_9 {
41827 type Target = ICoreWebView2_8;
41828 fn deref(&self) -> &Self::Target {
41829 unsafe { core::mem::transmute(self) }
41830 }
41831}
41832windows_core::imp::interface_hierarchy!(
41833 ICoreWebView2_9,
41834 windows_core::IUnknown,
41835 ICoreWebView2,
41836 ICoreWebView2_2,
41837 ICoreWebView2_3,
41838 ICoreWebView2_4,
41839 ICoreWebView2_5,
41840 ICoreWebView2_6,
41841 ICoreWebView2_7,
41842 ICoreWebView2_8
41843);
41844impl ICoreWebView2_9 {
41845 pub unsafe fn add_IsDefaultDownloadDialogOpenChanged<P0>(
41846 &self,
41847 handler: P0,
41848 token: *mut i64,
41849 ) -> windows_core::Result<()>
41850 where
41851 P0: windows_core::Param<ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
41852 {
41853 unsafe {
41854 (windows_core::Interface::vtable(self).add_IsDefaultDownloadDialogOpenChanged)(
41855 windows_core::Interface::as_raw(self),
41856 handler.param().abi(),
41857 token as _,
41858 )
41859 .ok()
41860 }
41861 }
41862 pub unsafe fn remove_IsDefaultDownloadDialogOpenChanged(
41863 &self,
41864 token: i64,
41865 ) -> windows_core::Result<()> {
41866 unsafe {
41867 (windows_core::Interface::vtable(self).remove_IsDefaultDownloadDialogOpenChanged)(
41868 windows_core::Interface::as_raw(self),
41869 token,
41870 )
41871 .ok()
41872 }
41873 }
41874 pub unsafe fn IsDefaultDownloadDialogOpen(
41875 &self,
41876 value: *mut windows_core::BOOL,
41877 ) -> windows_core::Result<()> {
41878 unsafe {
41879 (windows_core::Interface::vtable(self).IsDefaultDownloadDialogOpen)(
41880 windows_core::Interface::as_raw(self),
41881 value as _,
41882 )
41883 .ok()
41884 }
41885 }
41886 pub unsafe fn OpenDefaultDownloadDialog(&self) -> windows_core::Result<()> {
41887 unsafe {
41888 (windows_core::Interface::vtable(self).OpenDefaultDownloadDialog)(
41889 windows_core::Interface::as_raw(self),
41890 )
41891 .ok()
41892 }
41893 }
41894 pub unsafe fn CloseDefaultDownloadDialog(&self) -> windows_core::Result<()> {
41895 unsafe {
41896 (windows_core::Interface::vtable(self).CloseDefaultDownloadDialog)(
41897 windows_core::Interface::as_raw(self),
41898 )
41899 .ok()
41900 }
41901 }
41902 pub unsafe fn DefaultDownloadDialogCornerAlignment(
41903 &self,
41904 value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
41905 ) -> windows_core::Result<()> {
41906 unsafe {
41907 (windows_core::Interface::vtable(self).DefaultDownloadDialogCornerAlignment)(
41908 windows_core::Interface::as_raw(self),
41909 value as _,
41910 )
41911 .ok()
41912 }
41913 }
41914 pub unsafe fn SetDefaultDownloadDialogCornerAlignment(
41915 &self,
41916 value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
41917 ) -> windows_core::Result<()> {
41918 unsafe {
41919 (windows_core::Interface::vtable(self).SetDefaultDownloadDialogCornerAlignment)(
41920 windows_core::Interface::as_raw(self),
41921 value,
41922 )
41923 .ok()
41924 }
41925 }
41926 pub unsafe fn DefaultDownloadDialogMargin(
41927 &self,
41928 value: *mut windows::Win32::Foundation::POINT,
41929 ) -> windows_core::Result<()> {
41930 unsafe {
41931 (windows_core::Interface::vtable(self).DefaultDownloadDialogMargin)(
41932 windows_core::Interface::as_raw(self),
41933 value as _,
41934 )
41935 .ok()
41936 }
41937 }
41938 pub unsafe fn SetDefaultDownloadDialogMargin(
41939 &self,
41940 value: windows::Win32::Foundation::POINT,
41941 ) -> windows_core::Result<()> {
41942 unsafe {
41943 (windows_core::Interface::vtable(self).SetDefaultDownloadDialogMargin)(
41944 windows_core::Interface::as_raw(self),
41945 core::mem::transmute(value),
41946 )
41947 .ok()
41948 }
41949 }
41950}
41951#[repr(C)]
41952pub struct ICoreWebView2_9_Vtbl {
41953 pub base__: ICoreWebView2_8_Vtbl,
41954 pub add_IsDefaultDownloadDialogOpenChanged: unsafe extern "system" fn(
41955 *mut core::ffi::c_void,
41956 *mut core::ffi::c_void,
41957 *mut i64,
41958 )
41959 -> windows_core::HRESULT,
41960 pub remove_IsDefaultDownloadDialogOpenChanged:
41961 unsafe extern "system" fn(*mut core::ffi::c_void, i64) -> windows_core::HRESULT,
41962 pub IsDefaultDownloadDialogOpen: unsafe extern "system" fn(
41963 *mut core::ffi::c_void,
41964 *mut windows_core::BOOL,
41965 ) -> windows_core::HRESULT,
41966 pub OpenDefaultDownloadDialog:
41967 unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
41968 pub CloseDefaultDownloadDialog:
41969 unsafe extern "system" fn(*mut core::ffi::c_void) -> windows_core::HRESULT,
41970 pub DefaultDownloadDialogCornerAlignment: unsafe extern "system" fn(
41971 *mut core::ffi::c_void,
41972 *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
41973 )
41974 -> windows_core::HRESULT,
41975 pub SetDefaultDownloadDialogCornerAlignment: unsafe extern "system" fn(
41976 *mut core::ffi::c_void,
41977 COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
41978 )
41979 -> windows_core::HRESULT,
41980 pub DefaultDownloadDialogMargin: unsafe extern "system" fn(
41981 *mut core::ffi::c_void,
41982 *mut windows::Win32::Foundation::POINT,
41983 ) -> windows_core::HRESULT,
41984 pub SetDefaultDownloadDialogMargin: unsafe extern "system" fn(
41985 *mut core::ffi::c_void,
41986 windows::Win32::Foundation::POINT,
41987 ) -> windows_core::HRESULT,
41988}
41989pub trait ICoreWebView2_9_Impl: ICoreWebView2_8_Impl {
41990 fn add_IsDefaultDownloadDialogOpenChanged(
41991 &self,
41992 handler: windows_core::Ref<'_, ICoreWebView2IsDefaultDownloadDialogOpenChangedEventHandler>,
41993 token: *mut i64,
41994 ) -> windows_core::Result<()>;
41995 fn remove_IsDefaultDownloadDialogOpenChanged(&self, token: i64) -> windows_core::Result<()>;
41996 fn IsDefaultDownloadDialogOpen(
41997 &self,
41998 value: *mut windows_core::BOOL,
41999 ) -> windows_core::Result<()>;
42000 fn OpenDefaultDownloadDialog(&self) -> windows_core::Result<()>;
42001 fn CloseDefaultDownloadDialog(&self) -> windows_core::Result<()>;
42002 fn DefaultDownloadDialogCornerAlignment(
42003 &self,
42004 value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
42005 ) -> windows_core::Result<()>;
42006 fn SetDefaultDownloadDialogCornerAlignment(
42007 &self,
42008 value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
42009 ) -> windows_core::Result<()>;
42010 fn DefaultDownloadDialogMargin(
42011 &self,
42012 value: *mut windows::Win32::Foundation::POINT,
42013 ) -> windows_core::Result<()>;
42014 fn SetDefaultDownloadDialogMargin(
42015 &self,
42016 value: &windows::Win32::Foundation::POINT,
42017 ) -> windows_core::Result<()>;
42018}
42019impl ICoreWebView2_9_Vtbl {
42020 pub const fn new<Identity: ICoreWebView2_9_Impl, const OFFSET: isize>() -> Self {
42021 unsafe extern "system" fn add_IsDefaultDownloadDialogOpenChanged<
42022 Identity: ICoreWebView2_9_Impl,
42023 const OFFSET: isize,
42024 >(
42025 this: *mut core::ffi::c_void,
42026 handler: *mut core::ffi::c_void,
42027 token: *mut i64,
42028 ) -> windows_core::HRESULT {
42029 unsafe {
42030 let this: &Identity =
42031 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42032 ICoreWebView2_9_Impl::add_IsDefaultDownloadDialogOpenChanged(
42033 this,
42034 core::mem::transmute_copy(&handler),
42035 core::mem::transmute_copy(&token),
42036 )
42037 .into()
42038 }
42039 }
42040 unsafe extern "system" fn remove_IsDefaultDownloadDialogOpenChanged<
42041 Identity: ICoreWebView2_9_Impl,
42042 const OFFSET: isize,
42043 >(
42044 this: *mut core::ffi::c_void,
42045 token: i64,
42046 ) -> windows_core::HRESULT {
42047 unsafe {
42048 let this: &Identity =
42049 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42050 ICoreWebView2_9_Impl::remove_IsDefaultDownloadDialogOpenChanged(
42051 this,
42052 core::mem::transmute_copy(&token),
42053 )
42054 .into()
42055 }
42056 }
42057 unsafe extern "system" fn IsDefaultDownloadDialogOpen<
42058 Identity: ICoreWebView2_9_Impl,
42059 const OFFSET: isize,
42060 >(
42061 this: *mut core::ffi::c_void,
42062 value: *mut windows_core::BOOL,
42063 ) -> windows_core::HRESULT {
42064 unsafe {
42065 let this: &Identity =
42066 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42067 ICoreWebView2_9_Impl::IsDefaultDownloadDialogOpen(
42068 this,
42069 core::mem::transmute_copy(&value),
42070 )
42071 .into()
42072 }
42073 }
42074 unsafe extern "system" fn OpenDefaultDownloadDialog<
42075 Identity: ICoreWebView2_9_Impl,
42076 const OFFSET: isize,
42077 >(
42078 this: *mut core::ffi::c_void,
42079 ) -> windows_core::HRESULT {
42080 unsafe {
42081 let this: &Identity =
42082 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42083 ICoreWebView2_9_Impl::OpenDefaultDownloadDialog(this).into()
42084 }
42085 }
42086 unsafe extern "system" fn CloseDefaultDownloadDialog<
42087 Identity: ICoreWebView2_9_Impl,
42088 const OFFSET: isize,
42089 >(
42090 this: *mut core::ffi::c_void,
42091 ) -> windows_core::HRESULT {
42092 unsafe {
42093 let this: &Identity =
42094 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42095 ICoreWebView2_9_Impl::CloseDefaultDownloadDialog(this).into()
42096 }
42097 }
42098 unsafe extern "system" fn DefaultDownloadDialogCornerAlignment<
42099 Identity: ICoreWebView2_9_Impl,
42100 const OFFSET: isize,
42101 >(
42102 this: *mut core::ffi::c_void,
42103 value: *mut COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
42104 ) -> windows_core::HRESULT {
42105 unsafe {
42106 let this: &Identity =
42107 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42108 ICoreWebView2_9_Impl::DefaultDownloadDialogCornerAlignment(
42109 this,
42110 core::mem::transmute_copy(&value),
42111 )
42112 .into()
42113 }
42114 }
42115 unsafe extern "system" fn SetDefaultDownloadDialogCornerAlignment<
42116 Identity: ICoreWebView2_9_Impl,
42117 const OFFSET: isize,
42118 >(
42119 this: *mut core::ffi::c_void,
42120 value: COREWEBVIEW2_DEFAULT_DOWNLOAD_DIALOG_CORNER_ALIGNMENT,
42121 ) -> windows_core::HRESULT {
42122 unsafe {
42123 let this: &Identity =
42124 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42125 ICoreWebView2_9_Impl::SetDefaultDownloadDialogCornerAlignment(
42126 this,
42127 core::mem::transmute_copy(&value),
42128 )
42129 .into()
42130 }
42131 }
42132 unsafe extern "system" fn DefaultDownloadDialogMargin<
42133 Identity: ICoreWebView2_9_Impl,
42134 const OFFSET: isize,
42135 >(
42136 this: *mut core::ffi::c_void,
42137 value: *mut windows::Win32::Foundation::POINT,
42138 ) -> windows_core::HRESULT {
42139 unsafe {
42140 let this: &Identity =
42141 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42142 ICoreWebView2_9_Impl::DefaultDownloadDialogMargin(
42143 this,
42144 core::mem::transmute_copy(&value),
42145 )
42146 .into()
42147 }
42148 }
42149 unsafe extern "system" fn SetDefaultDownloadDialogMargin<
42150 Identity: ICoreWebView2_9_Impl,
42151 const OFFSET: isize,
42152 >(
42153 this: *mut core::ffi::c_void,
42154 value: windows::Win32::Foundation::POINT,
42155 ) -> windows_core::HRESULT {
42156 unsafe {
42157 let this: &Identity =
42158 &*((this as *const *const ()).offset(OFFSET) as *const Identity);
42159 ICoreWebView2_9_Impl::SetDefaultDownloadDialogMargin(
42160 this,
42161 core::mem::transmute(&value),
42162 )
42163 .into()
42164 }
42165 }
42166 Self {
42167 base__: ICoreWebView2_8_Vtbl::new::<Identity, OFFSET>(),
42168 add_IsDefaultDownloadDialogOpenChanged: add_IsDefaultDownloadDialogOpenChanged::<
42169 Identity,
42170 OFFSET,
42171 >,
42172 remove_IsDefaultDownloadDialogOpenChanged: remove_IsDefaultDownloadDialogOpenChanged::<
42173 Identity,
42174 OFFSET,
42175 >,
42176 IsDefaultDownloadDialogOpen: IsDefaultDownloadDialogOpen::<Identity, OFFSET>,
42177 OpenDefaultDownloadDialog: OpenDefaultDownloadDialog::<Identity, OFFSET>,
42178 CloseDefaultDownloadDialog: CloseDefaultDownloadDialog::<Identity, OFFSET>,
42179 DefaultDownloadDialogCornerAlignment: DefaultDownloadDialogCornerAlignment::<
42180 Identity,
42181 OFFSET,
42182 >,
42183 SetDefaultDownloadDialogCornerAlignment: SetDefaultDownloadDialogCornerAlignment::<
42184 Identity,
42185 OFFSET,
42186 >,
42187 DefaultDownloadDialogMargin: DefaultDownloadDialogMargin::<Identity, OFFSET>,
42188 SetDefaultDownloadDialogMargin: SetDefaultDownloadDialogMargin::<Identity, OFFSET>,
42189 }
42190 }
42191 pub fn matches(iid: &windows_core::GUID) -> bool {
42192 iid == &<ICoreWebView2_9 as windows_core::Interface>::IID
42193 || iid == &<ICoreWebView2 as windows_core::Interface>::IID
42194 || iid == &<ICoreWebView2_2 as windows_core::Interface>::IID
42195 || iid == &<ICoreWebView2_3 as windows_core::Interface>::IID
42196 || iid == &<ICoreWebView2_4 as windows_core::Interface>::IID
42197 || iid == &<ICoreWebView2_5 as windows_core::Interface>::IID
42198 || iid == &<ICoreWebView2_6 as windows_core::Interface>::IID
42199 || iid == &<ICoreWebView2_7 as windows_core::Interface>::IID
42200 || iid == &<ICoreWebView2_8 as windows_core::Interface>::IID
42201 }
42202}
42203impl windows_core::RuntimeName for ICoreWebView2_9 {}