objc2_browser_engine_kit/generated/
BEKeyEntry.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6use objc2_ui_kit::*;
7
8use crate::*;
9
10#[repr(transparent)]
13#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
14pub struct BEKeyPressState(pub NSInteger);
15impl BEKeyPressState {
16 #[doc(alias = "BEKeyPressStateDown")]
17 pub const Down: Self = Self(1);
18 #[doc(alias = "BEKeyPressStateUp")]
19 pub const Up: Self = Self(2);
20}
21
22unsafe impl Encode for BEKeyPressState {
23 const ENCODING: Encoding = NSInteger::ENCODING;
24}
25
26unsafe impl RefEncode for BEKeyPressState {
27 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
28}
29
30extern_class!(
31 #[unsafe(super(NSObject))]
33 #[derive(Debug, PartialEq, Eq, Hash)]
34 pub struct BEKeyEntry;
35);
36
37extern_conformance!(
38 unsafe impl NSObjectProtocol for BEKeyEntry {}
39);
40
41impl BEKeyEntry {
42 extern_methods!(
43 #[unsafe(method(key))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn key(&self, mtm: MainThreadMarker) -> Retained<UIKey>;
47
48 #[unsafe(method(state))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn state(&self) -> BEKeyPressState;
52
53 #[unsafe(method(isKeyRepeating))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn isKeyRepeating(&self) -> bool;
59
60 #[unsafe(method(timestamp))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn timestamp(&self) -> NSTimeInterval;
64
65 #[unsafe(method(init))]
66 #[unsafe(method_family = init)]
67 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
68
69 #[unsafe(method(new))]
70 #[unsafe(method_family = new)]
71 pub unsafe fn new() -> Retained<Self>;
72 );
73}