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/domhtmlimageelement?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 DOMHTMLImageElement;
);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        #[unsafe(method(naturalHeight))]
        #[unsafe(method_family = none)]
        pub unsafe fn naturalHeight(&self) -> c_int;

        #[unsafe(method(naturalWidth))]
        #[unsafe(method_family = none)]
        pub unsafe fn naturalWidth(&self) -> c_int;

        #[unsafe(method(x))]
        #[unsafe(method_family = none)]
        pub unsafe fn x(&self) -> c_int;

        #[unsafe(method(y))]
        #[unsafe(method_family = none)]
        pub unsafe fn y(&self) -> c_int;

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

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

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