objc2-web-kit 0.3.1

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/domhtmllinkelement?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 DOMHTMLLinkElement;
);

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

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

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

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

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

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

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

        /// Setter for [`charset`][Self::charset].
        #[deprecated]
        #[unsafe(method(setCharset:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setCharset(&self, charset: Option<&NSString>);

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

        /// Setter for [`href`][Self::href].
        #[deprecated]
        #[unsafe(method(setHref:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHref(&self, href: Option<&NSString>);

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

        /// Setter for [`hreflang`][Self::hreflang].
        #[deprecated]
        #[unsafe(method(setHreflang:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setHreflang(&self, hreflang: Option<&NSString>);

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

        /// Setter for [`media`][Self::media].
        #[deprecated]
        #[unsafe(method(setMedia:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setMedia(&self, media: Option<&NSString>);

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

        /// Setter for [`rel`][Self::rel].
        #[deprecated]
        #[unsafe(method(setRel:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRel(&self, rel: Option<&NSString>);

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

        /// Setter for [`rev`][Self::rev].
        #[deprecated]
        #[unsafe(method(setRev:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setRev(&self, rev: Option<&NSString>);

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

        /// Setter for [`target`][Self::target].
        #[deprecated]
        #[unsafe(method(setTarget:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setTarget(&self, target: Option<&NSString>);

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

        /// Setter for [`type`][Self::type].
        #[deprecated]
        #[unsafe(method(setType:))]
        #[unsafe(method_family = none)]
        pub unsafe fn setType(&self, r#type: Option<&NSString>);

        #[cfg(feature = "DOMStyleSheet")]
        #[unsafe(method(sheet))]
        #[unsafe(method_family = none)]
        pub unsafe fn sheet(&self) -> Option<Retained<DOMStyleSheet>>;

        #[unsafe(method(absoluteLinkURL))]
        #[unsafe(method_family = none)]
        pub unsafe fn absoluteLinkURL(&self) -> Retained<NSURL>;
    );
}

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