objc2_ui_kit/generated/
UIKey.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10 #[unsafe(super(NSObject))]
12 #[thread_kind = MainThreadOnly]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct UIKey;
15);
16
17unsafe impl NSCoding for UIKey {}
18
19unsafe impl NSCopying for UIKey {}
20
21unsafe impl CopyingHelper for UIKey {
22 type Result = Self;
23}
24
25unsafe impl NSObjectProtocol for UIKey {}
26
27impl UIKey {
28 extern_methods!(
29 #[unsafe(method(characters))]
35 #[unsafe(method_family = none)]
36 pub unsafe fn characters(&self) -> Retained<NSString>;
37
38 #[unsafe(method(charactersIgnoringModifiers))]
44 #[unsafe(method_family = none)]
45 pub unsafe fn charactersIgnoringModifiers(&self) -> Retained<NSString>;
46
47 #[cfg(feature = "UICommand")]
48 #[unsafe(method(modifierFlags))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn modifierFlags(&self) -> UIKeyModifierFlags;
52
53 #[cfg(all(feature = "UIKeyConstants", feature = "objc2-core-foundation"))]
54 #[unsafe(method(keyCode))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn keyCode(&self) -> UIKeyboardHIDUsage;
58 );
59}
60
61impl UIKey {
63 extern_methods!(
64 #[unsafe(method(init))]
65 #[unsafe(method_family = init)]
66 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
67
68 #[unsafe(method(new))]
69 #[unsafe(method_family = new)]
70 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
71 );
72}