objc2_ui_kit/generated/
UIInputView.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-quartz-core")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_quartz_core::*;
12
13use crate::*;
14
15#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct UIInputViewStyle(pub NSInteger);
20impl UIInputViewStyle {
21 #[doc(alias = "UIInputViewStyleDefault")]
22 pub const Default: Self = Self(0);
23 #[doc(alias = "UIInputViewStyleKeyboard")]
24 pub const Keyboard: Self = Self(1);
25}
26
27unsafe impl Encode for UIInputViewStyle {
28 const ENCODING: Encoding = NSInteger::ENCODING;
29}
30
31unsafe impl RefEncode for UIInputViewStyle {
32 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
33}
34
35extern_class!(
36 #[unsafe(super(UIView, UIResponder, NSObject))]
38 #[thread_kind = MainThreadOnly]
39 #[derive(Debug, PartialEq, Eq, Hash)]
40 #[cfg(all(feature = "UIResponder", feature = "UIView"))]
41 pub struct UIInputView;
42);
43
44#[cfg(all(
45 feature = "UIResponder",
46 feature = "UIView",
47 feature = "objc2-quartz-core"
48))]
49#[cfg(not(target_os = "watchos"))]
50unsafe impl CALayerDelegate for UIInputView {}
51
52#[cfg(all(feature = "UIResponder", feature = "UIView"))]
53unsafe impl NSCoding for UIInputView {}
54
55#[cfg(all(feature = "UIResponder", feature = "UIView"))]
56unsafe impl NSObjectProtocol for UIInputView {}
57
58#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
59unsafe impl UIAppearance for UIInputView {}
60
61#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
62unsafe impl UIAppearanceContainer for UIInputView {}
63
64#[cfg(all(feature = "UIResponder", feature = "UIView"))]
65unsafe impl UICoordinateSpace for UIInputView {}
66
67#[cfg(all(
68 feature = "UIDynamicBehavior",
69 feature = "UIResponder",
70 feature = "UIView"
71))]
72unsafe impl UIDynamicItem for UIInputView {}
73
74#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
75unsafe impl UIFocusEnvironment for UIInputView {}
76
77#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
78unsafe impl UIFocusItem for UIInputView {}
79
80#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
81unsafe impl UIFocusItemContainer for UIInputView {}
82
83#[cfg(all(feature = "UIResponder", feature = "UIView"))]
84unsafe impl UIResponderStandardEditActions for UIInputView {}
85
86#[cfg(all(
87 feature = "UIResponder",
88 feature = "UITraitCollection",
89 feature = "UIView"
90))]
91unsafe impl UITraitEnvironment for UIInputView {}
92
93#[cfg(all(feature = "UIResponder", feature = "UIView"))]
94impl UIInputView {
95 extern_methods!(
96 #[unsafe(method(inputViewStyle))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn inputViewStyle(&self) -> UIInputViewStyle;
99
100 #[unsafe(method(allowsSelfSizing))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn allowsSelfSizing(&self) -> bool;
103
104 #[unsafe(method(setAllowsSelfSizing:))]
106 #[unsafe(method_family = none)]
107 pub unsafe fn setAllowsSelfSizing(&self, allows_self_sizing: bool);
108
109 #[cfg(feature = "objc2-core-foundation")]
110 #[unsafe(method(initWithFrame:inputViewStyle:))]
111 #[unsafe(method_family = init)]
112 pub unsafe fn initWithFrame_inputViewStyle(
113 this: Allocated<Self>,
114 frame: CGRect,
115 input_view_style: UIInputViewStyle,
116 ) -> Retained<Self>;
117
118 #[unsafe(method(initWithCoder:))]
119 #[unsafe(method_family = init)]
120 pub unsafe fn initWithCoder(
121 this: Allocated<Self>,
122 coder: &NSCoder,
123 ) -> Option<Retained<Self>>;
124 );
125}
126
127#[cfg(all(feature = "UIResponder", feature = "UIView"))]
129impl UIInputView {
130 extern_methods!(
131 #[cfg(feature = "objc2-core-foundation")]
132 #[unsafe(method(initWithFrame:))]
133 #[unsafe(method_family = init)]
134 pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
135 );
136}
137
138#[cfg(all(feature = "UIResponder", feature = "UIView"))]
140impl UIInputView {
141 extern_methods!(
142 #[unsafe(method(init))]
143 #[unsafe(method_family = init)]
144 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
145
146 #[unsafe(method(new))]
147 #[unsafe(method_family = new)]
148 pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
149 );
150}