objc2_web_kit/generated/WebUIDelegate.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-app-kit")]
6#[cfg(target_os = "macos")]
7use objc2_app_kit::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagopenlinkinnewwindow?language=objc)
13#[deprecated]
14pub const WebMenuItemTagOpenLinkInNewWindow: c_uint = 1;
15/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagdownloadlinktodisk?language=objc)
16#[deprecated]
17pub const WebMenuItemTagDownloadLinkToDisk: c_uint = 2;
18/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagcopylinktoclipboard?language=objc)
19#[deprecated]
20pub const WebMenuItemTagCopyLinkToClipboard: c_uint = 3;
21/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagopenimageinnewwindow?language=objc)
22#[deprecated]
23pub const WebMenuItemTagOpenImageInNewWindow: c_uint = 4;
24/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagdownloadimagetodisk?language=objc)
25#[deprecated]
26pub const WebMenuItemTagDownloadImageToDisk: c_uint = 5;
27/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagcopyimagetoclipboard?language=objc)
28#[deprecated]
29pub const WebMenuItemTagCopyImageToClipboard: c_uint = 6;
30/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagopenframeinnewwindow?language=objc)
31#[deprecated]
32pub const WebMenuItemTagOpenFrameInNewWindow: c_uint = 7;
33/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagcopy?language=objc)
34#[deprecated]
35pub const WebMenuItemTagCopy: c_uint = 8;
36/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtaggoback?language=objc)
37#[deprecated]
38pub const WebMenuItemTagGoBack: c_uint = 9;
39/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtaggoforward?language=objc)
40#[deprecated]
41pub const WebMenuItemTagGoForward: c_uint = 10;
42/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagstop?language=objc)
43#[deprecated]
44pub const WebMenuItemTagStop: c_uint = 11;
45/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagreload?language=objc)
46#[deprecated]
47pub const WebMenuItemTagReload: c_uint = 12;
48/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagcut?language=objc)
49#[deprecated]
50pub const WebMenuItemTagCut: c_uint = 13;
51/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagpaste?language=objc)
52#[deprecated]
53pub const WebMenuItemTagPaste: c_uint = 14;
54/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagspellingguess?language=objc)
55#[deprecated]
56pub const WebMenuItemTagSpellingGuess: c_uint = 15;
57/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagnoguessesfound?language=objc)
58#[deprecated]
59pub const WebMenuItemTagNoGuessesFound: c_uint = 16;
60/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagignorespelling?language=objc)
61#[deprecated]
62pub const WebMenuItemTagIgnoreSpelling: c_uint = 17;
63/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtaglearnspelling?language=objc)
64#[deprecated]
65pub const WebMenuItemTagLearnSpelling: c_uint = 18;
66/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagother?language=objc)
67#[deprecated]
68pub const WebMenuItemTagOther: c_uint = 19;
69/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagsearchinspotlight?language=objc)
70#[deprecated]
71pub const WebMenuItemTagSearchInSpotlight: c_uint = 20;
72/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagsearchweb?language=objc)
73#[deprecated]
74pub const WebMenuItemTagSearchWeb: c_uint = 21;
75/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtaglookupindictionary?language=objc)
76#[deprecated]
77pub const WebMenuItemTagLookUpInDictionary: c_uint = 22;
78/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitemtagopenwithdefaultapplication?language=objc)
79#[deprecated]
80pub const WebMenuItemTagOpenWithDefaultApplication: c_uint = 23;
81/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfactualsize?language=objc)
82#[deprecated]
83pub const WebMenuItemPDFActualSize: c_uint = 24;
84/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfzoomin?language=objc)
85#[deprecated]
86pub const WebMenuItemPDFZoomIn: c_uint = 25;
87/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfzoomout?language=objc)
88#[deprecated]
89pub const WebMenuItemPDFZoomOut: c_uint = 26;
90/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfautosize?language=objc)
91#[deprecated]
92pub const WebMenuItemPDFAutoSize: c_uint = 27;
93/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfsinglepage?language=objc)
94#[deprecated]
95pub const WebMenuItemPDFSinglePage: c_uint = 28;
96/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdffacingpages?language=objc)
97#[deprecated]
98pub const WebMenuItemPDFFacingPages: c_uint = 29;
99/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfcontinuous?language=objc)
100#[deprecated]
101pub const WebMenuItemPDFContinuous: c_uint = 30;
102/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfnextpage?language=objc)
103#[deprecated]
104pub const WebMenuItemPDFNextPage: c_uint = 31;
105/// [Apple's documentation](https://developer.apple.com/documentation/webkit/webmenuitempdfpreviouspage?language=objc)
106#[deprecated]
107pub const WebMenuItemPDFPreviousPage: c_uint = 32;
108
109/// Actions that the destination of a drag can perform.
110///
111/// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webdragdestinationaction?language=objc)
112// NS_OPTIONS
113#[deprecated]
114#[repr(transparent)]
115#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
116pub struct WebDragDestinationAction(pub NSUInteger);
117bitflags::bitflags! {
118 impl WebDragDestinationAction: NSUInteger {
119 #[doc(alias = "WebDragDestinationActionNone")]
120#[deprecated]
121 const None = 0;
122 #[doc(alias = "WebDragDestinationActionDHTML")]
123#[deprecated]
124 const DHTML = 1;
125 #[doc(alias = "WebDragDestinationActionEdit")]
126#[deprecated]
127 const Edit = 2;
128 #[doc(alias = "WebDragDestinationActionLoad")]
129#[deprecated]
130 const Load = 4;
131 #[doc(alias = "WebDragDestinationActionAny")]
132#[deprecated]
133 const Any = c_uint::MAX as _;
134 }
135}
136
137unsafe impl Encode for WebDragDestinationAction {
138 const ENCODING: Encoding = NSUInteger::ENCODING;
139}
140
141unsafe impl RefEncode for WebDragDestinationAction {
142 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
143}
144
145/// Actions that the source of a drag can perform.
146///
147/// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webdragsourceaction?language=objc)
148// NS_OPTIONS
149#[deprecated]
150#[repr(transparent)]
151#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
152pub struct WebDragSourceAction(pub NSUInteger);
153bitflags::bitflags! {
154 impl WebDragSourceAction: NSUInteger {
155 #[doc(alias = "WebDragSourceActionNone")]
156#[deprecated]
157 const None = 0;
158 #[doc(alias = "WebDragSourceActionDHTML")]
159#[deprecated]
160 const DHTML = 1;
161 #[doc(alias = "WebDragSourceActionImage")]
162#[deprecated]
163 const Image = 2;
164 #[doc(alias = "WebDragSourceActionLink")]
165#[deprecated]
166 const Link = 4;
167 #[doc(alias = "WebDragSourceActionSelection")]
168#[deprecated]
169 const Selection = 8;
170 #[doc(alias = "WebDragSourceActionAny")]
171#[deprecated]
172 const Any = c_uint::MAX as _;
173 }
174}
175
176unsafe impl Encode for WebDragSourceAction {
177 const ENCODING: Encoding = NSUInteger::ENCODING;
178}
179
180unsafe impl RefEncode for WebDragSourceAction {
181 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
182}
183
184extern_protocol!(
185 /// This protocol is used to call back with the results of
186 /// the file open panel requested by runOpenPanelForFileButtonWithResultListener:
187 ///
188 /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webopenpanelresultlistener?language=objc)
189 #[deprecated]
190 pub unsafe trait WebOpenPanelResultListener: NSObjectProtocol {
191 /// Call this method to return a filename from the file open panel.
192 ///
193 /// Parameter `fileName`: the path of the selected file
194 ///
195 /// # Safety
196 ///
197 /// `file_name` might not allow `None`.
198 #[deprecated]
199 #[unsafe(method(chooseFilename:))]
200 #[unsafe(method_family = none)]
201 unsafe fn chooseFilename(&self, file_name: Option<&NSString>);
202
203 /// Call this method to return an array of filenames from the file open panel.
204 ///
205 /// Parameter `fileNames`: an array of paths of selected files
206 ///
207 /// # Safety
208 ///
209 /// - `file_names` generic should be of the correct type.
210 /// - `file_names` might not allow `None`.
211 #[unsafe(method(chooseFilenames:))]
212 #[unsafe(method_family = none)]
213 unsafe fn chooseFilenames(&self, file_names: Option<&NSArray>);
214
215 /// Call this method to indicate that the file open panel was cancelled.
216 #[deprecated]
217 #[unsafe(method(cancel))]
218 #[unsafe(method_family = none)]
219 unsafe fn cancel(&self);
220 }
221);
222
223extern_protocol!(
224 /// A class that implements WebUIDelegate provides
225 /// window-related methods that may be used by Javascript, plugins and
226 /// other aspects of web pages. These methods are used to open new
227 /// windows and control aspects of existing windows.
228 ///
229 /// See also [Apple's documentation](https://developer.apple.com/documentation/webkit/webuidelegate?language=objc)
230 #[deprecated]
231 pub unsafe trait WebUIDelegate: NSObjectProtocol {
232 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
233 #[cfg(target_os = "macos")]
234 /// Create a new window and begin to load the specified request.
235 ///
236 /// The newly created window is hidden, and the window operations delegate on the
237 /// new WebViews will get a webViewShow: call.
238 ///
239 /// Parameter `sender`: The WebView sending the delegate method.
240 ///
241 /// Parameter `request`: The request to load.
242 ///
243 /// Returns: The WebView for the new window.
244 ///
245 /// # Safety
246 ///
247 /// - `sender` might not allow `None`.
248 /// - `request` might not allow `None`.
249 #[deprecated]
250 #[optional]
251 #[unsafe(method(webView:createWebViewWithRequest:))]
252 #[unsafe(method_family = none)]
253 unsafe fn webView_createWebViewWithRequest(
254 &self,
255 sender: Option<&WebView>,
256 request: Option<&NSURLRequest>,
257 mtm: MainThreadMarker,
258 ) -> Option<Retained<WebView>>;
259
260 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
261 #[cfg(target_os = "macos")]
262 /// Parameter `sender`: The WebView sending the delegate method.
263 ///
264 /// Show the window that contains the top level view of the WebView,
265 /// ordering it frontmost.
266 ///
267 /// This will only be called just after createWindowWithRequest:
268 /// is used to create a new window.
269 ///
270 /// # Safety
271 ///
272 /// `sender` might not allow `None`.
273 #[deprecated]
274 #[optional]
275 #[unsafe(method(webViewShow:))]
276 #[unsafe(method_family = none)]
277 unsafe fn webViewShow(&self, sender: Option<&WebView>);
278
279 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
280 #[cfg(target_os = "macos")]
281 /// Create a new window and begin to load the specified request.
282 ///
283 /// The newly created window is hidden, and the window operations delegate on the
284 /// new WebViews will get a webViewShow: call.
285 ///
286 /// Parameter `sender`: The WebView sending the delegate method.
287 ///
288 /// Parameter `request`: The request to load.
289 ///
290 /// Returns: The WebView for the new window.
291 ///
292 /// # Safety
293 ///
294 /// - `sender` might not allow `None`.
295 /// - `request` might not allow `None`.
296 #[deprecated]
297 #[optional]
298 #[unsafe(method(webView:createWebViewModalDialogWithRequest:))]
299 #[unsafe(method_family = none)]
300 unsafe fn webView_createWebViewModalDialogWithRequest(
301 &self,
302 sender: Option<&WebView>,
303 request: Option<&NSURLRequest>,
304 mtm: MainThreadMarker,
305 ) -> Option<Retained<WebView>>;
306
307 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
308 #[cfg(target_os = "macos")]
309 /// Parameter `sender`: The WebView sending the delegate method.
310 ///
311 /// Show the window that contains the top level view of the WebView,
312 /// ordering it frontmost. The window should be run modal in the application.
313 ///
314 /// This will only be called just after createWebViewModalDialogWithRequest:
315 /// is used to create a new window.
316 ///
317 /// # Safety
318 ///
319 /// `sender` might not allow `None`.
320 #[deprecated]
321 #[optional]
322 #[unsafe(method(webViewRunModal:))]
323 #[unsafe(method_family = none)]
324 unsafe fn webViewRunModal(&self, sender: Option<&WebView>);
325
326 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
327 #[cfg(target_os = "macos")]
328 /// Close the current window.
329 ///
330 /// Parameter `sender`: The WebView sending the delegate method.
331 ///
332 /// Clients showing multiple views in one window may
333 /// choose to close only the one corresponding to this
334 /// WebView. Other clients may choose to ignore this method
335 /// entirely.
336 ///
337 /// # Safety
338 ///
339 /// `sender` might not allow `None`.
340 #[deprecated]
341 #[optional]
342 #[unsafe(method(webViewClose:))]
343 #[unsafe(method_family = none)]
344 unsafe fn webViewClose(&self, sender: Option<&WebView>);
345
346 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
347 #[cfg(target_os = "macos")]
348 /// Focus the current window (i.e. makeKeyAndOrderFront:).
349 ///
350 /// Parameter `sender`: The WebView sending the delegate method.
351 ///
352 /// Clients showing multiple views in one window may want to
353 /// also do something to focus the one corresponding to this WebView.
354 ///
355 /// # Safety
356 ///
357 /// `sender` might not allow `None`.
358 #[deprecated]
359 #[optional]
360 #[unsafe(method(webViewFocus:))]
361 #[unsafe(method_family = none)]
362 unsafe fn webViewFocus(&self, sender: Option<&WebView>);
363
364 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
365 #[cfg(target_os = "macos")]
366 /// Unfocus the current window.
367 ///
368 /// Parameter `sender`: The WebView sending the delegate method.
369 ///
370 /// Clients showing multiple views in one window may want to
371 /// also do something to unfocus the one corresponding to this WebView.
372 ///
373 /// # Safety
374 ///
375 /// `sender` might not allow `None`.
376 #[deprecated]
377 #[optional]
378 #[unsafe(method(webViewUnfocus:))]
379 #[unsafe(method_family = none)]
380 unsafe fn webViewUnfocus(&self, sender: Option<&WebView>);
381
382 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
383 #[cfg(target_os = "macos")]
384 /// Get the first responder for this window.
385 ///
386 /// Parameter `sender`: The WebView sending the delegate method.
387 ///
388 /// This method should return the focused control in the
389 /// WebView's view, if any. If the view is out of the window
390 /// hierarchy, this might return something than calling firstResponder
391 /// on the real NSWindow would. It's OK to return either nil or the
392 /// real first responder if some control not in the window has focus.
393 ///
394 /// # Safety
395 ///
396 /// `sender` might not allow `None`.
397 #[deprecated]
398 #[optional]
399 #[unsafe(method(webViewFirstResponder:))]
400 #[unsafe(method_family = none)]
401 unsafe fn webViewFirstResponder(
402 &self,
403 sender: Option<&WebView>,
404 mtm: MainThreadMarker,
405 ) -> Option<Retained<NSResponder>>;
406
407 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
408 #[cfg(target_os = "macos")]
409 /// Set the first responder for this window.
410 ///
411 /// Parameter `sender`: The WebView sending the delegate method.
412 ///
413 /// Parameter `responder`: The responder to make first (will always be a view)
414 ///
415 /// responder will always be a view that is in the view
416 /// subhierarchy of the top-level web view for this WebView. If the
417 /// WebView's top level view is currently out of the view
418 /// hierarchy, it may be desirable to save the first responder
419 /// elsewhere, or possibly ignore this call.
420 ///
421 /// # Safety
422 ///
423 /// - `sender` might not allow `None`.
424 /// - `responder` might not allow `None`.
425 #[deprecated]
426 #[optional]
427 #[unsafe(method(webView:makeFirstResponder:))]
428 #[unsafe(method_family = none)]
429 unsafe fn webView_makeFirstResponder(
430 &self,
431 sender: Option<&WebView>,
432 responder: Option<&NSResponder>,
433 );
434
435 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
436 #[cfg(target_os = "macos")]
437 /// Set the window's status display, if any, to the specified string.
438 ///
439 /// Parameter `sender`: The WebView sending the delegate method.
440 ///
441 /// Parameter `text`: The status text to set
442 ///
443 /// # Safety
444 ///
445 /// - `sender` might not allow `None`.
446 /// - `text` might not allow `None`.
447 #[deprecated]
448 #[optional]
449 #[unsafe(method(webView:setStatusText:))]
450 #[unsafe(method_family = none)]
451 unsafe fn webView_setStatusText(&self, sender: Option<&WebView>, text: Option<&NSString>);
452
453 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
454 #[cfg(target_os = "macos")]
455 /// Get the currently displayed status text.
456 ///
457 /// Parameter `sender`: The WebView sending the delegate method.
458 ///
459 /// Returns: The status text
460 ///
461 /// # Safety
462 ///
463 /// `sender` might not allow `None`.
464 #[deprecated]
465 #[optional]
466 #[unsafe(method(webViewStatusText:))]
467 #[unsafe(method_family = none)]
468 unsafe fn webViewStatusText(&self, sender: Option<&WebView>) -> Option<Retained<NSString>>;
469
470 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
471 #[cfg(target_os = "macos")]
472 /// Determine whether the window's toolbars are currently visible
473 ///
474 /// Parameter `sender`: The WebView sending the delegate method.
475 ///
476 /// This method should return YES if the window has any
477 /// toolbars that are currently on, besides the status bar. If the app
478 /// has more than one toolbar per window, for example a regular
479 /// command toolbar and a favorites bar, it should return YES from
480 /// this method if at least one is on.
481 ///
482 /// Returns: YES if at least one toolbar is visible, otherwise NO.
483 ///
484 /// # Safety
485 ///
486 /// `sender` might not allow `None`.
487 #[deprecated]
488 #[optional]
489 #[unsafe(method(webViewAreToolbarsVisible:))]
490 #[unsafe(method_family = none)]
491 unsafe fn webViewAreToolbarsVisible(&self, sender: Option<&WebView>) -> bool;
492
493 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
494 #[cfg(target_os = "macos")]
495 /// Parameter `sender`: The WebView sending the delegate method.
496 ///
497 /// Set whether the window's toolbars are currently visible.
498 ///
499 /// Parameter `visible`: New value for toolbar visibility
500 ///
501 /// Setting this to YES should turn on all toolbars
502 /// (except for a possible status bar). Setting it to NO should turn
503 /// off all toolbars (with the same exception).
504 ///
505 /// # Safety
506 ///
507 /// `sender` might not allow `None`.
508 #[deprecated]
509 #[optional]
510 #[unsafe(method(webView:setToolbarsVisible:))]
511 #[unsafe(method_family = none)]
512 unsafe fn webView_setToolbarsVisible(&self, sender: Option<&WebView>, visible: bool);
513
514 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
515 #[cfg(target_os = "macos")]
516 /// Determine whether the status bar is visible.
517 ///
518 /// Parameter `sender`: The WebView sending the delegate method.
519 ///
520 /// Returns: YES if the status bar is visible, otherwise NO.
521 ///
522 /// # Safety
523 ///
524 /// `sender` might not allow `None`.
525 #[deprecated]
526 #[optional]
527 #[unsafe(method(webViewIsStatusBarVisible:))]
528 #[unsafe(method_family = none)]
529 unsafe fn webViewIsStatusBarVisible(&self, sender: Option<&WebView>) -> bool;
530
531 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
532 #[cfg(target_os = "macos")]
533 /// Set whether the status bar is currently visible.
534 ///
535 /// Parameter `visible`: The new visibility value
536 ///
537 /// Setting this to YES should show the status bar,
538 /// setting it to NO should hide it.
539 ///
540 /// # Safety
541 ///
542 /// `sender` might not allow `None`.
543 #[deprecated]
544 #[optional]
545 #[unsafe(method(webView:setStatusBarVisible:))]
546 #[unsafe(method_family = none)]
547 unsafe fn webView_setStatusBarVisible(&self, sender: Option<&WebView>, visible: bool);
548
549 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
550 #[cfg(target_os = "macos")]
551 /// Determine whether the window is resizable or not.
552 ///
553 /// Parameter `sender`: The WebView sending the delegate method.
554 ///
555 /// Returns: YES if resizable, NO if not.
556 ///
557 /// If there are multiple views in the same window, they
558 /// have have their own separate resize controls and this may need to
559 /// be handled specially.
560 ///
561 /// # Safety
562 ///
563 /// `sender` might not allow `None`.
564 #[deprecated]
565 #[optional]
566 #[unsafe(method(webViewIsResizable:))]
567 #[unsafe(method_family = none)]
568 unsafe fn webViewIsResizable(&self, sender: Option<&WebView>) -> bool;
569
570 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
571 #[cfg(target_os = "macos")]
572 /// Set the window to resizable or not
573 ///
574 /// Parameter `sender`: The WebView sending the delegate method.
575 ///
576 /// Parameter `resizable`: YES if the window should be made resizable, NO if not.
577 ///
578 /// If there are multiple views in the same window, they
579 /// have have their own separate resize controls and this may need to
580 /// be handled specially.
581 ///
582 /// # Safety
583 ///
584 /// `sender` might not allow `None`.
585 #[deprecated]
586 #[optional]
587 #[unsafe(method(webView:setResizable:))]
588 #[unsafe(method_family = none)]
589 unsafe fn webView_setResizable(&self, sender: Option<&WebView>, resizable: bool);
590
591 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
592 #[cfg(target_os = "macos")]
593 /// Set the window's frame rect
594 ///
595 /// Parameter `sender`: The WebView sending the delegate method.
596 ///
597 /// Parameter `frame`: The new window frame size
598 ///
599 /// Even though a caller could set the frame directly using the NSWindow,
600 /// this method is provided so implementors of this protocol can do special
601 /// things on programmatic move/resize, like avoiding autosaving of the size.
602 ///
603 /// # Safety
604 ///
605 /// `sender` might not allow `None`.
606 #[deprecated]
607 #[optional]
608 #[unsafe(method(webView:setFrame:))]
609 #[unsafe(method_family = none)]
610 unsafe fn webView_setFrame(&self, sender: Option<&WebView>, frame: NSRect);
611
612 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
613 #[cfg(target_os = "macos")]
614 /// Parameter `sender`: The WebView sending the delegate method.
615 ///
616 /// Return the window's frame rect
617 ///
618 /// # Safety
619 ///
620 /// `sender` might not allow `None`.
621 #[deprecated]
622 #[optional]
623 #[unsafe(method(webViewFrame:))]
624 #[unsafe(method_family = none)]
625 unsafe fn webViewFrame(&self, sender: Option<&WebView>) -> NSRect;
626
627 #[cfg(all(feature = "WebFrame", feature = "WebView", feature = "objc2-app-kit"))]
628 #[cfg(target_os = "macos")]
629 /// Display a JavaScript alert panel.
630 ///
631 /// Parameter `sender`: The WebView sending the delegate method.
632 ///
633 /// Parameter `message`: The message to display.
634 ///
635 /// Parameter `frame`: The WebFrame whose JavaScript initiated this call.
636 ///
637 /// Clients should visually indicate that this panel comes
638 /// from JavaScript initiated by the specified frame. The panel should have
639 /// a single OK button.
640 ///
641 /// # Safety
642 ///
643 /// - `sender` might not allow `None`.
644 /// - `message` might not allow `None`.
645 /// - `frame` might not allow `None`.
646 #[deprecated]
647 #[optional]
648 #[unsafe(method(webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:))]
649 #[unsafe(method_family = none)]
650 unsafe fn webView_runJavaScriptAlertPanelWithMessage_initiatedByFrame(
651 &self,
652 sender: Option<&WebView>,
653 message: Option<&NSString>,
654 frame: Option<&WebFrame>,
655 );
656
657 #[cfg(all(feature = "WebFrame", feature = "WebView", feature = "objc2-app-kit"))]
658 #[cfg(target_os = "macos")]
659 /// Display a JavaScript confirm panel.
660 ///
661 /// Parameter `sender`: The WebView sending the delegate method.
662 ///
663 /// Parameter `message`: The message to display.
664 ///
665 /// Parameter `frame`: The WebFrame whose JavaScript initiated this call.
666 ///
667 /// Returns: YES if the user hit OK, NO if the user chose Cancel.
668 ///
669 /// Clients should visually indicate that this panel comes
670 /// from JavaScript initiated by the specified frame. The panel should have
671 /// two buttons, e.g. "OK" and "Cancel".
672 ///
673 /// # Safety
674 ///
675 /// - `sender` might not allow `None`.
676 /// - `message` might not allow `None`.
677 /// - `frame` might not allow `None`.
678 #[deprecated]
679 #[optional]
680 #[unsafe(method(webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:))]
681 #[unsafe(method_family = none)]
682 unsafe fn webView_runJavaScriptConfirmPanelWithMessage_initiatedByFrame(
683 &self,
684 sender: Option<&WebView>,
685 message: Option<&NSString>,
686 frame: Option<&WebFrame>,
687 ) -> bool;
688
689 #[cfg(all(feature = "WebFrame", feature = "WebView", feature = "objc2-app-kit"))]
690 #[cfg(target_os = "macos")]
691 /// Display a JavaScript text input panel.
692 ///
693 /// Parameter `sender`: The WebView sending the delegate method.
694 ///
695 /// Parameter `prompt`: The message to display.
696 ///
697 /// Parameter `defaultText`: The initial text for the text entry area.
698 ///
699 /// Parameter `frame`: The WebFrame whose JavaScript initiated this call.
700 ///
701 /// Returns: The typed text if the user hit OK, otherwise nil.
702 ///
703 /// Clients should visually indicate that this panel comes
704 /// from JavaScript initiated by the specified frame. The panel should have
705 /// two buttons, e.g. "OK" and "Cancel", and an area to type text.
706 ///
707 /// # Safety
708 ///
709 /// - `sender` might not allow `None`.
710 /// - `prompt` might not allow `None`.
711 /// - `default_text` might not allow `None`.
712 /// - `frame` might not allow `None`.
713 #[deprecated]
714 #[optional]
715 #[unsafe(method(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:))]
716 #[unsafe(method_family = none)]
717 unsafe fn webView_runJavaScriptTextInputPanelWithPrompt_defaultText_initiatedByFrame(
718 &self,
719 sender: Option<&WebView>,
720 prompt: Option<&NSString>,
721 default_text: Option<&NSString>,
722 frame: Option<&WebFrame>,
723 ) -> Option<Retained<NSString>>;
724
725 #[cfg(all(feature = "WebFrame", feature = "WebView", feature = "objc2-app-kit"))]
726 #[cfg(target_os = "macos")]
727 /// Display a confirm panel by an "before unload" event handler.
728 ///
729 /// Parameter `sender`: The WebView sending the delegate method.
730 ///
731 /// Parameter `message`: The message to display.
732 ///
733 /// Parameter `frame`: The WebFrame whose JavaScript initiated this call.
734 ///
735 /// Returns: YES if the user hit OK, NO if the user chose Cancel.
736 ///
737 /// Clients should include a message in addition to the one
738 /// supplied by the web page that indicates. The panel should have
739 /// two buttons, e.g. "OK" and "Cancel".
740 ///
741 /// # Safety
742 ///
743 /// - `sender` might not allow `None`.
744 /// - `message` might not allow `None`.
745 /// - `frame` might not allow `None`.
746 #[deprecated]
747 #[optional]
748 #[unsafe(method(webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:))]
749 #[unsafe(method_family = none)]
750 unsafe fn webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(
751 &self,
752 sender: Option<&WebView>,
753 message: Option<&NSString>,
754 frame: Option<&WebFrame>,
755 ) -> bool;
756
757 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
758 #[cfg(target_os = "macos")]
759 /// Display a file open panel for a file input control.
760 ///
761 /// Parameter `sender`: The WebView sending the delegate method.
762 ///
763 /// Parameter `resultListener`: The object to call back with the results.
764 ///
765 /// This method is passed a callback object instead of giving a return
766 /// value so that it can be handled with a sheet.
767 ///
768 /// # Safety
769 ///
770 /// - `sender` might not allow `None`.
771 /// - `result_listener` might not allow `None`.
772 #[deprecated]
773 #[optional]
774 #[unsafe(method(webView:runOpenPanelForFileButtonWithResultListener:))]
775 #[unsafe(method_family = none)]
776 unsafe fn webView_runOpenPanelForFileButtonWithResultListener(
777 &self,
778 sender: Option<&WebView>,
779 result_listener: Option<&ProtocolObject<dyn WebOpenPanelResultListener>>,
780 );
781
782 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
783 #[cfg(target_os = "macos")]
784 /// Display a file open panel for a file input control that may allow multiple files to be selected.
785 ///
786 /// Parameter `sender`: The WebView sending the delegate method.
787 ///
788 /// Parameter `resultListener`: The object to call back with the results.
789 ///
790 /// Parameter `allowMultipleFiles`: YES if the open panel should allow myltiple files to be selected, NO if not.
791 ///
792 /// This method is passed a callback object instead of giving a return
793 /// value so that it can be handled with a sheet.
794 ///
795 /// # Safety
796 ///
797 /// - `sender` might not allow `None`.
798 /// - `result_listener` might not allow `None`.
799 #[optional]
800 #[unsafe(method(webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:))]
801 #[unsafe(method_family = none)]
802 unsafe fn webView_runOpenPanelForFileButtonWithResultListener_allowMultipleFiles(
803 &self,
804 sender: Option<&WebView>,
805 result_listener: Option<&ProtocolObject<dyn WebOpenPanelResultListener>>,
806 allow_multiple_files: bool,
807 );
808
809 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
810 #[cfg(target_os = "macos")]
811 /// Update the window's feedback for mousing over links to reflect a new item the mouse is over
812 /// or new modifier flags.
813 ///
814 /// Parameter `sender`: The WebView sending the delegate method.
815 ///
816 /// Parameter `elementInformation`: Dictionary that describes the element that the mouse is over, or nil.
817 ///
818 /// Parameter `modifierFlags`: The modifier flags as in NSEvent.
819 ///
820 /// # Safety
821 ///
822 /// - `sender` might not allow `None`.
823 /// - `element_information` generic should be of the correct type.
824 /// - `element_information` might not allow `None`.
825 #[deprecated]
826 #[optional]
827 #[unsafe(method(webView:mouseDidMoveOverElement:modifierFlags:))]
828 #[unsafe(method_family = none)]
829 unsafe fn webView_mouseDidMoveOverElement_modifierFlags(
830 &self,
831 sender: Option<&WebView>,
832 element_information: Option<&NSDictionary>,
833 modifier_flags: NSUInteger,
834 );
835
836 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
837 #[cfg(target_os = "macos")]
838 /// Returns the menu items to display in an element's contextual menu.
839 ///
840 /// Parameter `sender`: The WebView sending the delegate method.
841 ///
842 /// Parameter `element`: A dictionary representation of the clicked element.
843 ///
844 /// Parameter `defaultMenuItems`: An array of default NSMenuItems to include in all contextual menus.
845 ///
846 /// Returns: An array of NSMenuItems to include in the contextual menu.
847 ///
848 /// # Safety
849 ///
850 /// - `sender` might not allow `None`.
851 /// - `element` generic should be of the correct type.
852 /// - `element` might not allow `None`.
853 /// - `default_menu_items` generic should be of the correct type.
854 /// - `default_menu_items` might not allow `None`.
855 #[deprecated]
856 #[optional]
857 #[unsafe(method(webView:contextMenuItemsForElement:defaultMenuItems:))]
858 #[unsafe(method_family = none)]
859 unsafe fn webView_contextMenuItemsForElement_defaultMenuItems(
860 &self,
861 sender: Option<&WebView>,
862 element: Option<&NSDictionary>,
863 default_menu_items: Option<&NSArray>,
864 ) -> Option<Retained<NSArray>>;
865
866 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
867 #[cfg(target_os = "macos")]
868 /// Controls UI validation
869 ///
870 /// Parameter `webView`: The WebView sending the delegate method
871 ///
872 /// Parameter `item`: The user interface item being validated
873 ///
874 /// Parameter `defaultValidation`: Whether or not the WebView thinks the item is valid
875 ///
876 /// This method allows the UI delegate to control WebView's validation of user interface items.
877 /// See WebView.h to see the methods to that WebView can currently validate. See NSUserInterfaceValidations and
878 /// NSValidatedUserInterfaceItem for information about UI validation.
879 ///
880 /// # Safety
881 ///
882 /// - `web_view` might not allow `None`.
883 /// - `item` might not allow `None`.
884 #[deprecated]
885 #[optional]
886 #[unsafe(method(webView:validateUserInterfaceItem:defaultValidation:))]
887 #[unsafe(method_family = none)]
888 unsafe fn webView_validateUserInterfaceItem_defaultValidation(
889 &self,
890 web_view: Option<&WebView>,
891 item: Option<&ProtocolObject<dyn NSValidatedUserInterfaceItem>>,
892 default_validation: bool,
893 ) -> bool;
894
895 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
896 #[cfg(target_os = "macos")]
897 /// Controls actions
898 ///
899 /// Parameter `webView`: The WebView sending the delegate method
900 ///
901 /// Parameter `action`: The action being sent
902 ///
903 /// Parameter `sender`: The sender of the action
904 ///
905 /// This method allows the UI delegate to control WebView's behavior when an action is being sent.
906 /// For example, if the action is copy:, the delegate can return YES to allow WebView to perform its default
907 /// copy behavior or return NO and perform copy: in some other way. See WebView.h to see the actions that
908 /// WebView can perform.
909 ///
910 /// # Safety
911 ///
912 /// - `web_view` might not allow `None`.
913 /// - `action` must be a valid selector.
914 /// - `sender` should be of the correct type.
915 /// - `sender` might not allow `None`.
916 #[deprecated]
917 #[optional]
918 #[unsafe(method(webView:shouldPerformAction:fromSender:))]
919 #[unsafe(method_family = none)]
920 unsafe fn webView_shouldPerformAction_fromSender(
921 &self,
922 web_view: Option<&WebView>,
923 action: Option<Sel>,
924 sender: Option<&AnyObject>,
925 ) -> bool;
926
927 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
928 #[cfg(target_os = "macos")]
929 /// Controls behavior when dragging to a WebView
930 ///
931 /// Parameter `webView`: The WebView sending the delegate method
932 ///
933 /// Parameter `draggingInfo`: The dragging info of the drag
934 ///
935 /// This method is called periodically as something is dragged over a WebView. The UI delegate can return a mask
936 /// indicating which drag destination actions can occur, WebDragDestinationActionAny to allow any kind of action or
937 /// WebDragDestinationActionNone to not accept the drag.
938 ///
939 /// # Safety
940 ///
941 /// - `web_view` might not allow `None`.
942 /// - `dragging_info` might not allow `None`.
943 #[deprecated]
944 #[optional]
945 #[unsafe(method(webView:dragDestinationActionMaskForDraggingInfo:))]
946 #[unsafe(method_family = none)]
947 unsafe fn webView_dragDestinationActionMaskForDraggingInfo(
948 &self,
949 web_view: Option<&WebView>,
950 dragging_info: Option<&ProtocolObject<dyn NSDraggingInfo>>,
951 ) -> NSUInteger;
952
953 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
954 #[cfg(target_os = "macos")]
955 /// Informs that WebView will perform a drag destination action
956 ///
957 /// Parameter `webView`: The WebView sending the delegate method
958 ///
959 /// Parameter `action`: The drag destination action
960 ///
961 /// Parameter `draggingInfo`: The dragging info of the drag
962 ///
963 /// This method is called after the last call to webView:dragDestinationActionMaskForDraggingInfo: after something is dropped on a WebView.
964 /// This method informs the UI delegate of the drag destination action that WebView will perform.
965 ///
966 /// # Safety
967 ///
968 /// - `web_view` might not allow `None`.
969 /// - `dragging_info` might not allow `None`.
970 #[deprecated]
971 #[optional]
972 #[unsafe(method(webView:willPerformDragDestinationAction:forDraggingInfo:))]
973 #[unsafe(method_family = none)]
974 unsafe fn webView_willPerformDragDestinationAction_forDraggingInfo(
975 &self,
976 web_view: Option<&WebView>,
977 action: WebDragDestinationAction,
978 dragging_info: Option<&ProtocolObject<dyn NSDraggingInfo>>,
979 );
980
981 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
982 #[cfg(target_os = "macos")]
983 /// Controls behavior when dragging from a WebView
984 ///
985 /// Parameter `webView`: The WebView sending the delegate method
986 ///
987 /// Parameter `point`: The point where the drag started in the coordinates of the WebView
988 ///
989 /// This method is called after the user has begun a drag from a WebView. The UI delegate can return a mask indicating
990 /// which drag source actions can occur, WebDragSourceActionAny to allow any kind of action or WebDragSourceActionNone to not begin a drag.
991 ///
992 /// # Safety
993 ///
994 /// `web_view` might not allow `None`.
995 #[deprecated]
996 #[optional]
997 #[unsafe(method(webView:dragSourceActionMaskForPoint:))]
998 #[unsafe(method_family = none)]
999 unsafe fn webView_dragSourceActionMaskForPoint(
1000 &self,
1001 web_view: Option<&WebView>,
1002 point: NSPoint,
1003 ) -> NSUInteger;
1004
1005 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1006 #[cfg(target_os = "macos")]
1007 /// Informs that a drag a has begun from a WebView
1008 ///
1009 /// Parameter `webView`: The WebView sending the delegate method
1010 ///
1011 /// Parameter `action`: The drag source action
1012 ///
1013 /// Parameter `point`: The point where the drag started in the coordinates of the WebView
1014 ///
1015 /// Parameter `pasteboard`: The drag pasteboard
1016 ///
1017 /// This method is called after webView:dragSourceActionMaskForPoint: is called after the user has begun a drag from a WebView.
1018 /// This method informs the UI delegate of the drag source action that will be performed and gives the delegate an opportunity to modify
1019 /// the contents of the dragging pasteboard.
1020 ///
1021 /// # Safety
1022 ///
1023 /// - `web_view` might not allow `None`.
1024 /// - `pasteboard` might not allow `None`.
1025 #[deprecated]
1026 #[optional]
1027 #[unsafe(method(webView:willPerformDragSourceAction:fromPoint:withPasteboard:))]
1028 #[unsafe(method_family = none)]
1029 unsafe fn webView_willPerformDragSourceAction_fromPoint_withPasteboard(
1030 &self,
1031 web_view: Option<&WebView>,
1032 action: WebDragSourceAction,
1033 point: NSPoint,
1034 pasteboard: Option<&NSPasteboard>,
1035 );
1036
1037 #[cfg(all(
1038 feature = "WebFrameView",
1039 feature = "WebView",
1040 feature = "objc2-app-kit"
1041 ))]
1042 #[cfg(target_os = "macos")]
1043 /// Informs that a WebFrameView needs to be printed
1044 ///
1045 /// Parameter `sender`: The WebView sending the delegate method
1046 ///
1047 /// Parameter `frameView`: The WebFrameView needing to be printed
1048 ///
1049 /// This method is called when a script or user requests the page to be printed.
1050 /// In this method the delegate can prepare the WebFrameView to be printed. Some content that WebKit
1051 /// displays can be printed directly by the WebFrameView, other content will need to be handled by
1052 /// the delegate. To determine if the WebFrameView can handle printing the delegate should check
1053 /// WebFrameView's documentViewShouldHandlePrint, if YES then the delegate can call printDocumentView
1054 /// on the WebFrameView. Otherwise the delegate will need to request a NSPrintOperation from
1055 /// the WebFrameView's printOperationWithPrintInfo to handle the printing.
1056 ///
1057 /// # Safety
1058 ///
1059 /// - `sender` might not allow `None`.
1060 /// - `frame_view` might not allow `None`.
1061 #[deprecated]
1062 #[optional]
1063 #[unsafe(method(webView:printFrameView:))]
1064 #[unsafe(method_family = none)]
1065 unsafe fn webView_printFrameView(
1066 &self,
1067 sender: Option<&WebView>,
1068 frame_view: Option<&WebFrameView>,
1069 );
1070
1071 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1072 #[cfg(target_os = "macos")]
1073 /// Parameter `sender`: The WebView sending the delegate method
1074 ///
1075 /// Reserve a height for the printed page header.
1076 ///
1077 /// Returns: The height to reserve for the printed page header, return 0.0 to not reserve any space for a header.
1078 ///
1079 /// The height returned will be used to calculate the rect passed to webView:drawHeaderInRect:.
1080 ///
1081 /// # Safety
1082 ///
1083 /// `sender` might not allow `None`.
1084 #[deprecated]
1085 #[optional]
1086 #[unsafe(method(webViewHeaderHeight:))]
1087 #[unsafe(method_family = none)]
1088 unsafe fn webViewHeaderHeight(&self, sender: Option<&WebView>) -> c_float;
1089
1090 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1091 #[cfg(target_os = "macos")]
1092 /// Parameter `sender`: The WebView sending the delegate method
1093 ///
1094 /// Reserve a height for the printed page footer.
1095 ///
1096 /// Returns: The height to reserve for the printed page footer, return 0.0 to not reserve any space for a footer.
1097 ///
1098 /// The height returned will be used to calculate the rect passed to webView:drawFooterInRect:.
1099 ///
1100 /// # Safety
1101 ///
1102 /// `sender` might not allow `None`.
1103 #[deprecated]
1104 #[optional]
1105 #[unsafe(method(webViewFooterHeight:))]
1106 #[unsafe(method_family = none)]
1107 unsafe fn webViewFooterHeight(&self, sender: Option<&WebView>) -> c_float;
1108
1109 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1110 #[cfg(target_os = "macos")]
1111 /// Parameter `sender`: The WebView sending the delegate method
1112 ///
1113 /// Parameter `rect`: The NSRect reserved for the header of the page
1114 ///
1115 /// The delegate should draw a header for the sender in the supplied rect.
1116 ///
1117 /// # Safety
1118 ///
1119 /// `sender` might not allow `None`.
1120 #[deprecated]
1121 #[optional]
1122 #[unsafe(method(webView:drawHeaderInRect:))]
1123 #[unsafe(method_family = none)]
1124 unsafe fn webView_drawHeaderInRect(&self, sender: Option<&WebView>, rect: NSRect);
1125
1126 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1127 #[cfg(target_os = "macos")]
1128 /// Parameter `sender`: The WebView sending the delegate method
1129 ///
1130 /// Parameter `rect`: The NSRect reserved for the footer of the page
1131 ///
1132 /// The delegate should draw a footer for the sender in the supplied rect.
1133 ///
1134 /// # Safety
1135 ///
1136 /// `sender` might not allow `None`.
1137 #[deprecated]
1138 #[optional]
1139 #[unsafe(method(webView:drawFooterInRect:))]
1140 #[unsafe(method_family = none)]
1141 unsafe fn webView_drawFooterInRect(&self, sender: Option<&WebView>, rect: NSRect);
1142
1143 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1144 #[cfg(target_os = "macos")]
1145 /// # Safety
1146 ///
1147 /// - `sender` might not allow `None`.
1148 /// - `message` might not allow `None`.
1149 #[deprecated]
1150 #[optional]
1151 #[unsafe(method(webView:runJavaScriptAlertPanelWithMessage:))]
1152 #[unsafe(method_family = none)]
1153 unsafe fn webView_runJavaScriptAlertPanelWithMessage(
1154 &self,
1155 sender: Option<&WebView>,
1156 message: Option<&NSString>,
1157 );
1158
1159 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1160 #[cfg(target_os = "macos")]
1161 /// # Safety
1162 ///
1163 /// - `sender` might not allow `None`.
1164 /// - `message` might not allow `None`.
1165 #[deprecated]
1166 #[optional]
1167 #[unsafe(method(webView:runJavaScriptConfirmPanelWithMessage:))]
1168 #[unsafe(method_family = none)]
1169 unsafe fn webView_runJavaScriptConfirmPanelWithMessage(
1170 &self,
1171 sender: Option<&WebView>,
1172 message: Option<&NSString>,
1173 ) -> bool;
1174
1175 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1176 #[cfg(target_os = "macos")]
1177 /// # Safety
1178 ///
1179 /// - `sender` might not allow `None`.
1180 /// - `prompt` might not allow `None`.
1181 /// - `default_text` might not allow `None`.
1182 #[deprecated]
1183 #[optional]
1184 #[unsafe(method(webView:runJavaScriptTextInputPanelWithPrompt:defaultText:))]
1185 #[unsafe(method_family = none)]
1186 unsafe fn webView_runJavaScriptTextInputPanelWithPrompt_defaultText(
1187 &self,
1188 sender: Option<&WebView>,
1189 prompt: Option<&NSString>,
1190 default_text: Option<&NSString>,
1191 ) -> Option<Retained<NSString>>;
1192
1193 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1194 #[cfg(target_os = "macos")]
1195 /// # Safety
1196 ///
1197 /// `sender` might not allow `None`.
1198 #[deprecated]
1199 #[optional]
1200 #[unsafe(method(webView:setContentRect:))]
1201 #[unsafe(method_family = none)]
1202 unsafe fn webView_setContentRect(&self, sender: Option<&WebView>, frame: NSRect);
1203
1204 #[cfg(all(feature = "WebView", feature = "objc2-app-kit"))]
1205 #[cfg(target_os = "macos")]
1206 /// # Safety
1207 ///
1208 /// `sender` might not allow `None`.
1209 #[deprecated]
1210 #[optional]
1211 #[unsafe(method(webViewContentRect:))]
1212 #[unsafe(method_family = none)]
1213 unsafe fn webViewContentRect(&self, sender: Option<&WebView>) -> NSRect;
1214 }
1215);