use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[deprecated]
pub const DOM_NONE: c_uint = 0;
#[deprecated]
pub const DOM_CAPTURING_PHASE: c_uint = 1;
#[deprecated]
pub const DOM_AT_TARGET: c_uint = 2;
#[deprecated]
pub const DOM_BUBBLING_PHASE: c_uint = 3;
extern_class!(
#[unsafe(super(DOMObject, WebScriptObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
#[deprecated]
pub struct DOMEvent;
);
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
extern_conformance!(
unsafe impl NSCopying for DOMEvent {}
);
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
unsafe impl CopyingHelper for DOMEvent {
type Result = Self;
}
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
extern_conformance!(
unsafe impl NSObjectProtocol for DOMEvent {}
);
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMEvent {
extern_methods!(
#[deprecated]
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub unsafe fn r#type(&self) -> Retained<NSString>;
#[cfg(feature = "DOMEventTarget")]
#[deprecated]
#[unsafe(method(target))]
#[unsafe(method_family = none)]
pub unsafe fn target(&self) -> Option<Retained<ProtocolObject<dyn DOMEventTarget>>>;
#[cfg(feature = "DOMEventTarget")]
#[deprecated]
#[unsafe(method(currentTarget))]
#[unsafe(method_family = none)]
pub unsafe fn currentTarget(&self) -> Option<Retained<ProtocolObject<dyn DOMEventTarget>>>;
#[deprecated]
#[unsafe(method(eventPhase))]
#[unsafe(method_family = none)]
pub unsafe fn eventPhase(&self) -> c_ushort;
#[deprecated]
#[unsafe(method(bubbles))]
#[unsafe(method_family = none)]
pub unsafe fn bubbles(&self) -> bool;
#[deprecated]
#[unsafe(method(cancelable))]
#[unsafe(method_family = none)]
pub unsafe fn cancelable(&self) -> bool;
#[deprecated]
#[unsafe(method(timeStamp))]
#[unsafe(method_family = none)]
pub unsafe fn timeStamp(&self) -> DOMTimeStamp;
#[cfg(feature = "DOMEventTarget")]
#[unsafe(method(srcElement))]
#[unsafe(method_family = none)]
pub unsafe fn srcElement(&self) -> Option<Retained<ProtocolObject<dyn DOMEventTarget>>>;
#[unsafe(method(returnValue))]
#[unsafe(method_family = none)]
pub unsafe fn returnValue(&self) -> bool;
#[unsafe(method(setReturnValue:))]
#[unsafe(method_family = none)]
pub unsafe fn setReturnValue(&self, return_value: bool);
#[unsafe(method(cancelBubble))]
#[unsafe(method_family = none)]
pub unsafe fn cancelBubble(&self) -> bool;
#[unsafe(method(setCancelBubble:))]
#[unsafe(method_family = none)]
pub unsafe fn setCancelBubble(&self, cancel_bubble: bool);
#[deprecated]
#[unsafe(method(stopPropagation))]
#[unsafe(method_family = none)]
pub unsafe fn stopPropagation(&self);
#[deprecated]
#[unsafe(method(preventDefault))]
#[unsafe(method_family = none)]
pub unsafe fn preventDefault(&self);
#[unsafe(method(initEvent:canBubbleArg:cancelableArg:))]
#[unsafe(method_family = none)]
pub unsafe fn initEvent_canBubbleArg_cancelableArg(
&self,
event_type_arg: Option<&NSString>,
can_bubble_arg: bool,
cancelable_arg: bool,
);
);
}
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMEvent {
extern_methods!(
#[deprecated]
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMEvent {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}
#[cfg(all(feature = "DOMObject", feature = "WebScriptObject"))]
impl DOMEvent {
extern_methods!(
#[deprecated]
#[unsafe(method(initEvent:::))]
#[unsafe(method_family = none)]
pub unsafe fn initEvent(
&self,
event_type_arg: Option<&NSString>,
can_bubble_arg: bool,
cancelable_arg: bool,
);
);
}