objc2_watch_kit/generated/
WKInterfaceTextField.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12pub type WKTextContentType = NSString;
15
16extern "C" {
17 pub static WKTextContentTypeName: &'static WKTextContentType;
19}
20
21extern "C" {
22 pub static WKTextContentTypeNamePrefix: &'static WKTextContentType;
24}
25
26extern "C" {
27 pub static WKTextContentTypeGivenName: &'static WKTextContentType;
29}
30
31extern "C" {
32 pub static WKTextContentTypeMiddleName: &'static WKTextContentType;
34}
35
36extern "C" {
37 pub static WKTextContentTypeFamilyName: &'static WKTextContentType;
39}
40
41extern "C" {
42 pub static WKTextContentTypeNameSuffix: &'static WKTextContentType;
44}
45
46extern "C" {
47 pub static WKTextContentTypeNickname: &'static WKTextContentType;
49}
50
51extern "C" {
52 pub static WKTextContentTypeJobTitle: &'static WKTextContentType;
54}
55
56extern "C" {
57 pub static WKTextContentTypeOrganizationName: &'static WKTextContentType;
59}
60
61extern "C" {
62 pub static WKTextContentTypeLocation: &'static WKTextContentType;
64}
65
66extern "C" {
67 pub static WKTextContentTypeFullStreetAddress: &'static WKTextContentType;
69}
70
71extern "C" {
72 pub static WKTextContentTypeStreetAddressLine1: &'static WKTextContentType;
74}
75
76extern "C" {
77 pub static WKTextContentTypeStreetAddressLine2: &'static WKTextContentType;
79}
80
81extern "C" {
82 pub static WKTextContentTypeAddressCity: &'static WKTextContentType;
84}
85
86extern "C" {
87 pub static WKTextContentTypeAddressState: &'static WKTextContentType;
89}
90
91extern "C" {
92 pub static WKTextContentTypeAddressCityAndState: &'static WKTextContentType;
94}
95
96extern "C" {
97 pub static WKTextContentTypeSublocality: &'static WKTextContentType;
99}
100
101extern "C" {
102 pub static WKTextContentTypeCountryName: &'static WKTextContentType;
104}
105
106extern "C" {
107 pub static WKTextContentTypePostalCode: &'static WKTextContentType;
109}
110
111extern "C" {
112 pub static WKTextContentTypeTelephoneNumber: &'static WKTextContentType;
114}
115
116extern "C" {
117 pub static WKTextContentTypeEmailAddress: &'static WKTextContentType;
119}
120
121extern "C" {
122 pub static WKTextContentTypeURL: &'static WKTextContentType;
124}
125
126extern "C" {
127 pub static WKTextContentTypeCreditCardNumber: &'static WKTextContentType;
129}
130
131extern "C" {
132 pub static WKTextContentTypeUsername: &'static WKTextContentType;
134}
135
136extern "C" {
137 pub static WKTextContentTypePassword: &'static WKTextContentType;
139}
140
141extern "C" {
142 pub static WKTextContentTypeNewPassword: &'static WKTextContentType;
144}
145
146extern "C" {
147 pub static WKTextContentTypeOneTimeCode: &'static WKTextContentType;
149}
150
151extern_class!(
152 #[unsafe(super(WKInterfaceObject, NSObject))]
154 #[derive(Debug, PartialEq, Eq, Hash)]
155 #[cfg(feature = "WKInterfaceObject")]
156 pub struct WKInterfaceTextField;
157);
158
159#[cfg(feature = "WKInterfaceObject")]
160extern_conformance!(
161 unsafe impl NSObjectProtocol for WKInterfaceTextField {}
162);
163
164#[cfg(feature = "WKInterfaceObject")]
165impl WKInterfaceTextField {
166 extern_methods!(
167 #[unsafe(method(setText:))]
168 #[unsafe(method_family = none)]
169 pub unsafe fn setText(&self, text: Option<&NSString>);
170
171 #[unsafe(method(setAttributedText:))]
172 #[unsafe(method_family = none)]
173 pub unsafe fn setAttributedText(&self, attributed_text: Option<&NSAttributedString>);
174
175 #[unsafe(method(setPlaceholder:))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn setPlaceholder(&self, placeholder: Option<&NSString>);
178
179 #[unsafe(method(setAttributedPlaceholder:))]
180 #[unsafe(method_family = none)]
181 pub unsafe fn setAttributedPlaceholder(
182 &self,
183 attributed_placeholder: Option<&NSAttributedString>,
184 );
185
186 #[cfg(feature = "objc2-ui-kit")]
187 #[unsafe(method(setTextColor:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn setTextColor(&self, color: Option<&UIColor>);
190
191 #[unsafe(method(setEnabled:))]
192 #[unsafe(method_family = none)]
193 pub unsafe fn setEnabled(&self, enabled: bool);
194
195 #[unsafe(method(setTextContentType:))]
196 #[unsafe(method_family = none)]
197 pub unsafe fn setTextContentType(&self, text_content_type: Option<&WKTextContentType>);
198
199 #[unsafe(method(setSecureTextEntry:))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn setSecureTextEntry(&self, secure_text_entry: bool);
202 );
203}
204
205#[cfg(feature = "WKInterfaceObject")]
207impl WKInterfaceTextField {
208 extern_methods!(
209 #[unsafe(method(init))]
210 #[unsafe(method_family = init)]
211 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
212 );
213}
214
215#[cfg(feature = "WKInterfaceObject")]
217impl WKInterfaceTextField {
218 extern_methods!(
219 #[unsafe(method(new))]
220 #[unsafe(method_family = new)]
221 pub unsafe fn new() -> Retained<Self>;
222 );
223}