objc2_watch_kit/generated/
WKInterfaceTextField.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::*;
6use objc2_foundation::*;
7#[cfg(feature = "objc2-ui-kit")]
8use objc2_ui_kit::*;
9
10use crate::*;
11
12/// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttype?language=objc)
13// NS_TYPED_ENUM
14pub type WKTextContentType = NSString;
15
16extern "C" {
17    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypename?language=objc)
18    pub static WKTextContentTypeName: &'static WKTextContentType;
19}
20
21extern "C" {
22    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypenameprefix?language=objc)
23    pub static WKTextContentTypeNamePrefix: &'static WKTextContentType;
24}
25
26extern "C" {
27    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypegivenname?language=objc)
28    pub static WKTextContentTypeGivenName: &'static WKTextContentType;
29}
30
31extern "C" {
32    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypemiddlename?language=objc)
33    pub static WKTextContentTypeMiddleName: &'static WKTextContentType;
34}
35
36extern "C" {
37    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypefamilyname?language=objc)
38    pub static WKTextContentTypeFamilyName: &'static WKTextContentType;
39}
40
41extern "C" {
42    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypenamesuffix?language=objc)
43    pub static WKTextContentTypeNameSuffix: &'static WKTextContentType;
44}
45
46extern "C" {
47    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypenickname?language=objc)
48    pub static WKTextContentTypeNickname: &'static WKTextContentType;
49}
50
51extern "C" {
52    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypejobtitle?language=objc)
53    pub static WKTextContentTypeJobTitle: &'static WKTextContentType;
54}
55
56extern "C" {
57    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeorganizationname?language=objc)
58    pub static WKTextContentTypeOrganizationName: &'static WKTextContentType;
59}
60
61extern "C" {
62    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypelocation?language=objc)
63    pub static WKTextContentTypeLocation: &'static WKTextContentType;
64}
65
66extern "C" {
67    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypefullstreetaddress?language=objc)
68    pub static WKTextContentTypeFullStreetAddress: &'static WKTextContentType;
69}
70
71extern "C" {
72    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypestreetaddressline1?language=objc)
73    pub static WKTextContentTypeStreetAddressLine1: &'static WKTextContentType;
74}
75
76extern "C" {
77    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypestreetaddressline2?language=objc)
78    pub static WKTextContentTypeStreetAddressLine2: &'static WKTextContentType;
79}
80
81extern "C" {
82    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeaddresscity?language=objc)
83    pub static WKTextContentTypeAddressCity: &'static WKTextContentType;
84}
85
86extern "C" {
87    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeaddressstate?language=objc)
88    pub static WKTextContentTypeAddressState: &'static WKTextContentType;
89}
90
91extern "C" {
92    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeaddresscityandstate?language=objc)
93    pub static WKTextContentTypeAddressCityAndState: &'static WKTextContentType;
94}
95
96extern "C" {
97    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypesublocality?language=objc)
98    pub static WKTextContentTypeSublocality: &'static WKTextContentType;
99}
100
101extern "C" {
102    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypecountryname?language=objc)
103    pub static WKTextContentTypeCountryName: &'static WKTextContentType;
104}
105
106extern "C" {
107    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypepostalcode?language=objc)
108    pub static WKTextContentTypePostalCode: &'static WKTextContentType;
109}
110
111extern "C" {
112    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypetelephonenumber?language=objc)
113    pub static WKTextContentTypeTelephoneNumber: &'static WKTextContentType;
114}
115
116extern "C" {
117    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeemailaddress?language=objc)
118    pub static WKTextContentTypeEmailAddress: &'static WKTextContentType;
119}
120
121extern "C" {
122    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeurl?language=objc)
123    pub static WKTextContentTypeURL: &'static WKTextContentType;
124}
125
126extern "C" {
127    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypecreditcardnumber?language=objc)
128    pub static WKTextContentTypeCreditCardNumber: &'static WKTextContentType;
129}
130
131extern "C" {
132    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeusername?language=objc)
133    pub static WKTextContentTypeUsername: &'static WKTextContentType;
134}
135
136extern "C" {
137    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypepassword?language=objc)
138    pub static WKTextContentTypePassword: &'static WKTextContentType;
139}
140
141extern "C" {
142    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypenewpassword?language=objc)
143    pub static WKTextContentTypeNewPassword: &'static WKTextContentType;
144}
145
146extern "C" {
147    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wktextcontenttypeonetimecode?language=objc)
148    pub static WKTextContentTypeOneTimeCode: &'static WKTextContentType;
149}
150
151extern_class!(
152    /// [Apple's documentation](https://developer.apple.com/documentation/watchkit/wkinterfacetextfield?language=objc)
153    #[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/// Methods declared on superclass `WKInterfaceObject`.
206#[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/// Methods declared on superclass `NSObject`.
216#[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}