objc2-web-kit 0.3.2

Bindings to the WebKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domhtmlscriptelement?language=objc)
    #[unsafe(super(
        DOMHTMLElement,
        DOMElement,
        DOMNode,
        DOMObject,
        WebScriptObject,
        NSObject
    ))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(all(
        feature = "DOMElement",
        feature = "DOMHTMLElement",
        feature = "DOMNode",
        feature = "DOMObject",
        feature = "WebScriptObject"
    ))]
    #[deprecated]
    pub struct DOMHTMLScriptElement;
);

#[cfg(all(
    feature = "DOMElement",
    feature = "DOMEventTarget",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
extern_conformance!(
    unsafe impl DOMEventTarget for DOMHTMLScriptElement {}
);

#[cfg(all(
    feature = "DOMElement",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
extern_conformance!(
    unsafe impl NSCopying for DOMHTMLScriptElement {}
);

#[cfg(all(
    feature = "DOMElement",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
unsafe impl CopyingHelper for DOMHTMLScriptElement {
    type Result = Self;
}

#[cfg(all(
    feature = "DOMElement",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
extern_conformance!(
    unsafe impl NSObjectProtocol for DOMHTMLScriptElement {}
);

#[cfg(all(
    feature = "DOMElement",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
impl DOMHTMLScriptElement {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(text))]
        #[unsafe(method_family = none)]
        pub unsafe fn text(&self) -> Retained<NSString>;

        /// Setter for [`text`][Self::text].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated]
        #[unsafe(method(setText:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setText(&self, text: Option<&NSString>);

        #[deprecated]
        #[unsafe(method(htmlFor))]
        #[unsafe(method_family = none)]
        pub unsafe fn htmlFor(&self) -> Retained<NSString>;

        /// Setter for [`htmlFor`][Self::htmlFor].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated]
        #[unsafe(method(setHtmlFor:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHtmlFor(&self, html_for: Option<&NSString>);

        #[deprecated]
        #[unsafe(method(event))]
        #[unsafe(method_family = none)]
        pub unsafe fn event(&self) -> Retained<NSString>;

        /// Setter for [`event`][Self::event].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated]
        #[unsafe(method(setEvent:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setEvent(&self, event: Option<&NSString>);

        #[deprecated]
        #[unsafe(method(charset))]
        #[unsafe(method_family = none)]
        pub unsafe fn charset(&self) -> Retained<NSString>;

        /// Setter for [`charset`][Self::charset].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated]
        #[unsafe(method(setCharset:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCharset(&self, charset: Option<&NSString>);

        #[deprecated]
        #[unsafe(method(defer))]
        #[unsafe(method_family = none)]
        pub unsafe fn defer(&self) -> bool;

        /// Setter for [`defer`][Self::defer].
        #[deprecated]
        #[unsafe(method(setDefer:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setDefer(&self, defer: bool);

        #[deprecated]
        #[unsafe(method(src))]
        #[unsafe(method_family = none)]
        pub unsafe fn src(&self) -> Retained<NSString>;

        /// Setter for [`src`][Self::src].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated]
        #[unsafe(method(setSrc:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setSrc(&self, src: Option<&NSString>);

        #[deprecated]
        #[unsafe(method(type))]
        #[unsafe(method_family = none)]
        pub unsafe fn r#type(&self) -> Retained<NSString>;

        /// Setter for [`type`][Self::type].
        ///
        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
        #[deprecated]
        #[unsafe(method(setType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setType(&self, r#type: Option<&NSString>);
    );
}

/// Methods declared on superclass `DOMObject`.
#[cfg(all(
    feature = "DOMElement",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
impl DOMHTMLScriptElement {
    extern_methods!(
        #[deprecated]
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(all(
    feature = "DOMElement",
    feature = "DOMHTMLElement",
    feature = "DOMNode",
    feature = "DOMObject",
    feature = "WebScriptObject"
))]
impl DOMHTMLScriptElement {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;
    );
}