use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
#[unsafe(super(NSObject))]
#[thread_kind = MainThreadOnly]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct WKScriptMessage;
);
extern_conformance!(
unsafe impl NSObjectProtocol for WKScriptMessage {}
);
impl WKScriptMessage {
extern_methods!(
#[unsafe(method(body))]
#[unsafe(method_family = none)]
pub unsafe fn body(&self) -> Retained<AnyObject>;
#[cfg(all(feature = "WKWebView", feature = "objc2-app-kit"))]
#[cfg(target_os = "macos")]
#[unsafe(method(webView))]
#[unsafe(method_family = none)]
pub unsafe fn webView(&self) -> Option<Retained<WKWebView>>;
#[cfg(feature = "WKFrameInfo")]
#[unsafe(method(frameInfo))]
#[unsafe(method_family = none)]
pub unsafe fn frameInfo(&self) -> Retained<WKFrameInfo>;
#[unsafe(method(name))]
#[unsafe(method_family = none)]
pub unsafe fn name(&self) -> Retained<NSString>;
#[cfg(feature = "WKContentWorld")]
#[unsafe(method(world))]
#[unsafe(method_family = none)]
pub unsafe fn world(&self) -> Retained<WKContentWorld>;
);
}
impl WKScriptMessage {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
);
}