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/domhtmlformelement?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 DOMHTMLFormElement;
);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        #[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(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>);

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

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

        #[deprecated]
        #[unsafe(method(submit))]
        #[unsafe(method_family = none)]
        pub unsafe fn submit(&self);

        #[deprecated]
        #[unsafe(method(reset))]
        #[unsafe(method_family = none)]
        pub unsafe fn reset(&self);
    );
}

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