use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
#[deprecated]
pub const DOM_KEY_LOCATION_STANDARD: c_uint = 0x00;
#[deprecated]
pub const DOM_KEY_LOCATION_LEFT: c_uint = 0x01;
#[deprecated]
pub const DOM_KEY_LOCATION_RIGHT: c_uint = 0x02;
#[deprecated]
pub const DOM_KEY_LOCATION_NUMPAD: c_uint = 0x03;
extern_class!(
#[unsafe(super(DOMUIEvent, DOMEvent, DOMObject, WebScriptObject, NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
#[deprecated]
pub struct DOMKeyboardEvent;
);
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
extern_conformance!(
unsafe impl NSCopying for DOMKeyboardEvent {}
);
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
unsafe impl CopyingHelper for DOMKeyboardEvent {
type Result = Self;
}
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
extern_conformance!(
unsafe impl NSObjectProtocol for DOMKeyboardEvent {}
);
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
impl DOMKeyboardEvent {
extern_methods!(
#[deprecated]
#[unsafe(method(keyIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn keyIdentifier(&self) -> Retained<NSString>;
#[unsafe(method(location))]
#[unsafe(method_family = none)]
pub unsafe fn location(&self) -> c_uint;
#[deprecated]
#[unsafe(method(keyLocation))]
#[unsafe(method_family = none)]
pub unsafe fn keyLocation(&self) -> c_uint;
#[deprecated]
#[unsafe(method(ctrlKey))]
#[unsafe(method_family = none)]
pub unsafe fn ctrlKey(&self) -> bool;
#[deprecated]
#[unsafe(method(shiftKey))]
#[unsafe(method_family = none)]
pub unsafe fn shiftKey(&self) -> bool;
#[deprecated]
#[unsafe(method(altKey))]
#[unsafe(method_family = none)]
pub unsafe fn altKey(&self) -> bool;
#[deprecated]
#[unsafe(method(metaKey))]
#[unsafe(method_family = none)]
pub unsafe fn metaKey(&self) -> bool;
#[unsafe(method(altGraphKey))]
#[unsafe(method_family = none)]
pub unsafe fn altGraphKey(&self) -> bool;
#[deprecated]
#[unsafe(method(keyCode))]
#[unsafe(method_family = none)]
pub unsafe fn keyCode(&self) -> c_int;
#[deprecated]
#[unsafe(method(charCode))]
#[unsafe(method_family = none)]
pub unsafe fn charCode(&self) -> c_int;
#[deprecated]
#[unsafe(method(getModifierState:))]
#[unsafe(method_family = none)]
pub unsafe fn getModifierState(&self, key_identifier_arg: Option<&NSString>) -> bool;
#[cfg(feature = "DOMAbstractView")]
#[unsafe(method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:))]
#[unsafe(method_family = none)]
pub unsafe fn initKeyboardEvent_canBubble_cancelable_view_keyIdentifier_location_ctrlKey_altKey_shiftKey_metaKey_altGraphKey(
&self,
r#type: Option<&NSString>,
can_bubble: bool,
cancelable: bool,
view: Option<&DOMAbstractView>,
key_identifier: Option<&NSString>,
location: c_uint,
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool,
alt_graph_key: bool,
);
#[cfg(feature = "DOMAbstractView")]
#[unsafe(method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:))]
#[unsafe(method_family = none)]
pub unsafe fn initKeyboardEvent_canBubble_cancelable_view_keyIdentifier_location_ctrlKey_altKey_shiftKey_metaKey(
&self,
r#type: Option<&NSString>,
can_bubble: bool,
cancelable: bool,
view: Option<&DOMAbstractView>,
key_identifier: Option<&NSString>,
location: c_uint,
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool,
);
#[cfg(feature = "DOMAbstractView")]
#[deprecated]
#[unsafe(method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:))]
#[unsafe(method_family = none)]
pub unsafe fn initKeyboardEvent_canBubble_cancelable_view_keyIdentifier_keyLocation_ctrlKey_altKey_shiftKey_metaKey_altGraphKey(
&self,
r#type: Option<&NSString>,
can_bubble: bool,
cancelable: bool,
view: Option<&DOMAbstractView>,
key_identifier: Option<&NSString>,
key_location: c_uint,
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool,
alt_graph_key: bool,
);
#[cfg(feature = "DOMAbstractView")]
#[deprecated]
#[unsafe(method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:))]
#[unsafe(method_family = none)]
pub unsafe fn initKeyboardEvent_canBubble_cancelable_view_keyIdentifier_keyLocation_ctrlKey_altKey_shiftKey_metaKey(
&self,
r#type: Option<&NSString>,
can_bubble: bool,
cancelable: bool,
view: Option<&DOMAbstractView>,
key_identifier: Option<&NSString>,
key_location: c_uint,
ctrl_key: bool,
alt_key: bool,
shift_key: bool,
meta_key: bool,
);
);
}
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
impl DOMKeyboardEvent {
extern_methods!(
#[deprecated]
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
);
}
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
impl DOMKeyboardEvent {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}