objc2_ui_kit/generated/
UIInputView.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use 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/// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiinputviewstyle?language=objc)
16// NS_ENUM
17#[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    /// [Apple's documentation](https://developer.apple.com/documentation/uikit/uiinputview?language=objc)
37    #[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"))]
50extern_conformance!(
51    unsafe impl CALayerDelegate for UIInputView {}
52);
53
54#[cfg(all(feature = "UIResponder", feature = "UIView"))]
55extern_conformance!(
56    unsafe impl NSCoding for UIInputView {}
57);
58
59#[cfg(all(feature = "UIResponder", feature = "UIView"))]
60extern_conformance!(
61    unsafe impl NSObjectProtocol for UIInputView {}
62);
63
64#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
65extern_conformance!(
66    unsafe impl UIAppearance for UIInputView {}
67);
68
69#[cfg(all(feature = "UIAppearance", feature = "UIResponder", feature = "UIView"))]
70extern_conformance!(
71    unsafe impl UIAppearanceContainer for UIInputView {}
72);
73
74#[cfg(all(feature = "UIResponder", feature = "UIView"))]
75extern_conformance!(
76    unsafe impl UICoordinateSpace for UIInputView {}
77);
78
79#[cfg(all(
80    feature = "UIDynamicBehavior",
81    feature = "UIResponder",
82    feature = "UIView"
83))]
84extern_conformance!(
85    unsafe impl UIDynamicItem for UIInputView {}
86);
87
88#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
89extern_conformance!(
90    unsafe impl UIFocusEnvironment for UIInputView {}
91);
92
93#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
94extern_conformance!(
95    unsafe impl UIFocusItem for UIInputView {}
96);
97
98#[cfg(all(feature = "UIFocus", feature = "UIResponder", feature = "UIView"))]
99extern_conformance!(
100    unsafe impl UIFocusItemContainer for UIInputView {}
101);
102
103#[cfg(all(feature = "UIResponder", feature = "UIView"))]
104extern_conformance!(
105    unsafe impl UIResponderStandardEditActions for UIInputView {}
106);
107
108#[cfg(all(
109    feature = "UIResponder",
110    feature = "UITraitCollection",
111    feature = "UIView"
112))]
113extern_conformance!(
114    unsafe impl UITraitEnvironment for UIInputView {}
115);
116
117#[cfg(all(feature = "UIResponder", feature = "UIView"))]
118impl UIInputView {
119    extern_methods!(
120        #[unsafe(method(inputViewStyle))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn inputViewStyle(&self) -> UIInputViewStyle;
123
124        #[unsafe(method(allowsSelfSizing))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn allowsSelfSizing(&self) -> bool;
127
128        /// Setter for [`allowsSelfSizing`][Self::allowsSelfSizing].
129        #[unsafe(method(setAllowsSelfSizing:))]
130        #[unsafe(method_family = none)]
131        pub unsafe fn setAllowsSelfSizing(&self, allows_self_sizing: bool);
132
133        #[cfg(feature = "objc2-core-foundation")]
134        #[unsafe(method(initWithFrame:inputViewStyle:))]
135        #[unsafe(method_family = init)]
136        pub unsafe fn initWithFrame_inputViewStyle(
137            this: Allocated<Self>,
138            frame: CGRect,
139            input_view_style: UIInputViewStyle,
140        ) -> Retained<Self>;
141
142        #[unsafe(method(initWithCoder:))]
143        #[unsafe(method_family = init)]
144        pub unsafe fn initWithCoder(
145            this: Allocated<Self>,
146            coder: &NSCoder,
147        ) -> Option<Retained<Self>>;
148    );
149}
150
151/// Methods declared on superclass `UIView`.
152#[cfg(all(feature = "UIResponder", feature = "UIView"))]
153impl UIInputView {
154    extern_methods!(
155        #[cfg(feature = "objc2-core-foundation")]
156        #[unsafe(method(initWithFrame:))]
157        #[unsafe(method_family = init)]
158        pub unsafe fn initWithFrame(this: Allocated<Self>, frame: CGRect) -> Retained<Self>;
159    );
160}
161
162/// Methods declared on superclass `NSObject`.
163#[cfg(all(feature = "UIResponder", feature = "UIView"))]
164impl UIInputView {
165    extern_methods!(
166        #[unsafe(method(init))]
167        #[unsafe(method_family = init)]
168        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
169
170        #[unsafe(method(new))]
171        #[unsafe(method_family = new)]
172        pub unsafe fn new(mtm: MainThreadMarker) -> Retained<Self>;
173    );
174}