objc2_web_kit/generated/
WKScriptMessage.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
15 #[thread_kind = MainThreadOnly]
16 #[derive(Debug, PartialEq, Eq, Hash)]
17 pub struct WKScriptMessage;
18);
19
20extern_conformance!(
21 unsafe impl NSObjectProtocol for WKScriptMessage {}
22);
23
24impl WKScriptMessage {
25 extern_methods!(
26 #[unsafe(method(body))]
31 #[unsafe(method_family = none)]
32 pub unsafe fn body(&self) -> Retained<AnyObject>;
33
34 #[cfg(all(feature = "WKWebView", feature = "objc2-app-kit"))]
35 #[cfg(target_os = "macos")]
36 #[unsafe(method(webView))]
38 #[unsafe(method_family = none)]
39 pub unsafe fn webView(&self) -> Option<Retained<WKWebView>>;
40
41 #[cfg(feature = "WKFrameInfo")]
42 #[unsafe(method(frameInfo))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn frameInfo(&self) -> Retained<WKFrameInfo>;
46
47 #[unsafe(method(name))]
49 #[unsafe(method_family = none)]
50 pub unsafe fn name(&self) -> Retained<NSString>;
51
52 #[cfg(feature = "WKContentWorld")]
53 #[unsafe(method(world))]
55 #[unsafe(method_family = none)]
56 pub unsafe fn world(&self) -> Retained<WKContentWorld>;
57 );
58}
59
60impl WKScriptMessage {
62 extern_methods!(
63 #[unsafe(method(init))]
64 #[unsafe(method_family = init)]
65 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67 #[unsafe(method(new))]
68 #[unsafe(method_family = new)]
69 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
70 );
71}