//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_protocol!(
    /// [Apple's documentation](https://developer.apple.com/documentation/webkit/domeventtarget?language=objc)
    #[deprecated]
    pub unsafe trait DOMEventTarget: NSObjectProtocol + NSCopying {
        #[cfg(feature = "DOMEventListener")]
        /// # Safety
        ///
        /// - `type` might not allow `None`.
        /// - `listener` might not allow `None`.
        #[unsafe(method(addEventListener:listener:useCapture:))]
        #[unsafe(method_family = none)]
        unsafe fn addEventListener_listener_useCapture(
            &self,
            r#type: Option<&NSString>,
            listener: Option<&ProtocolObject<dyn DOMEventListener>>,
            use_capture: bool,
        );

        #[cfg(feature = "DOMEventListener")]
        /// # Safety
        ///
        /// - `type` might not allow `None`.
        /// - `listener` might not allow `None`.
        #[unsafe(method(removeEventListener:listener:useCapture:))]
        #[unsafe(method_family = none)]
        unsafe fn removeEventListener_listener_useCapture(
            &self,
            r#type: Option<&NSString>,
            listener: Option<&ProtocolObject<dyn DOMEventListener>>,
            use_capture: bool,
        );

        #[cfg(all(
            feature = "DOMEvent",
            feature = "DOMObject",
            feature = "WebScriptObject"
        ))]
        /// # Safety
        ///
        /// `event` might not allow `None`.
        #[deprecated]
        #[unsafe(method(dispatchEvent:))]
        #[unsafe(method_family = none)]
        unsafe fn dispatchEvent(&self, event: Option<&DOMEvent>) -> bool;

        #[cfg(feature = "DOMEventListener")]
        /// # Safety
        ///
        /// - `type` might not allow `None`.
        /// - `listener` might not allow `None`.
        #[deprecated]
        #[unsafe(method(addEventListener:::))]
        #[unsafe(method_family = none)]
        unsafe fn addEventListener(
            &self,
            r#type: Option<&NSString>,
            listener: Option<&ProtocolObject<dyn DOMEventListener>>,
            use_capture: bool,
        );

        #[cfg(feature = "DOMEventListener")]
        /// # Safety
        ///
        /// - `type` might not allow `None`.
        /// - `listener` might not allow `None`.
        #[deprecated]
        #[unsafe(method(removeEventListener:::))]
        #[unsafe(method_family = none)]
        unsafe fn removeEventListener(
            &self,
            r#type: Option<&NSString>,
            listener: Option<&ProtocolObject<dyn DOMEventListener>>,
            use_capture: bool,
        );
    }
);
