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!(
#[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"
))]
unsafe impl ClassType for DOMKeyboardEvent {
#[inherits(DOMEvent, DOMObject, WebScriptObject, NSObject)]
type Super = DOMUIEvent;
type Mutability = InteriorMutable;
}
);
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
unsafe impl NSCopying for DOMKeyboardEvent {}
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
unsafe impl NSObjectProtocol for DOMKeyboardEvent {}
extern_methods!(
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
unsafe impl DOMKeyboardEvent {
#[deprecated]
#[method_id(@__retain_semantics Other keyIdentifier)]
pub unsafe fn keyIdentifier(&self) -> Retained<NSString>;
#[method(location)]
pub unsafe fn location(&self) -> c_uint;
#[deprecated]
#[method(keyLocation)]
pub unsafe fn keyLocation(&self) -> c_uint;
#[deprecated]
#[method(ctrlKey)]
pub unsafe fn ctrlKey(&self) -> bool;
#[deprecated]
#[method(shiftKey)]
pub unsafe fn shiftKey(&self) -> bool;
#[deprecated]
#[method(altKey)]
pub unsafe fn altKey(&self) -> bool;
#[deprecated]
#[method(metaKey)]
pub unsafe fn metaKey(&self) -> bool;
#[method(altGraphKey)]
pub unsafe fn altGraphKey(&self) -> bool;
#[deprecated]
#[method(keyCode)]
pub unsafe fn keyCode(&self) -> c_int;
#[deprecated]
#[method(charCode)]
pub unsafe fn charCode(&self) -> c_int;
#[deprecated]
#[method(getModifierState:)]
pub unsafe fn getModifierState(&self, key_identifier_arg: Option<&NSString>) -> bool;
#[cfg(feature = "DOMAbstractView")]
#[method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:)]
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")]
#[method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:location:ctrlKey:altKey:shiftKey:metaKey:)]
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]
#[method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:altGraphKey:)]
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]
#[method(initKeyboardEvent:canBubble:cancelable:view:keyIdentifier:keyLocation:ctrlKey:altKey:shiftKey:metaKey:)]
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,
);
}
);
extern_methods!(
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
unsafe impl DOMKeyboardEvent {
#[deprecated]
#[method_id(@__retain_semantics Init init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
}
);
extern_methods!(
#[cfg(all(
feature = "DOMEvent",
feature = "DOMObject",
feature = "DOMUIEvent",
feature = "WebScriptObject"
))]
unsafe impl DOMKeyboardEvent {
#[method_id(@__retain_semantics New new)]
pub unsafe fn new() -> Retained<Self>;
}
);