@onekeyfe/react-native-auto-size-input 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoSizeInput.podspec +29 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +128 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/cpp/cpp-adapter.cpp +6 -0
- package/android/src/main/java/com/margelo/nitro/autosizeinput/AutoSizeInput.kt +565 -0
- package/android/src/main/java/com/margelo/nitro/autosizeinput/AutoSizeInputPackage.kt +29 -0
- package/ios/AutoSizeInput.swift +620 -0
- package/lib/module/AutoSizeInput.nitro.js +4 -0
- package/lib/module/AutoSizeInput.nitro.js.map +1 -0
- package/lib/module/index.js +6 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/nitrogen/generated/android/autosizeinput+autolinking.cmake +83 -0
- package/lib/nitrogen/generated/android/autosizeinput+autolinking.gradle +27 -0
- package/lib/nitrogen/generated/android/autosizeinputOnLoad.cpp +50 -0
- package/lib/nitrogen/generated/android/autosizeinputOnLoad.hpp +25 -0
- package/lib/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/lib/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
- package/lib/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.cpp +317 -0
- package/lib/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.hpp +117 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridAutoSizeInputStateUpdater.cpp +156 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridAutoSizeInputStateUpdater.hpp +49 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/Func_void.kt +80 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/Func_void_std__string.kt +80 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/HybridAutoSizeInputSpec.kt +239 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/autosizeinputOnLoad.kt +35 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/views/HybridAutoSizeInputManager.kt +50 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/views/HybridAutoSizeInputStateUpdater.kt +23 -0
- package/lib/nitrogen/generated/ios/AutoSizeInput+autolinking.rb +60 -0
- package/lib/nitrogen/generated/ios/AutoSizeInput-Swift-Cxx-Bridge.cpp +49 -0
- package/lib/nitrogen/generated/ios/AutoSizeInput-Swift-Cxx-Bridge.hpp +173 -0
- package/lib/nitrogen/generated/ios/AutoSizeInput-Swift-Cxx-Umbrella.hpp +46 -0
- package/lib/nitrogen/generated/ios/AutoSizeInputAutolinking.mm +33 -0
- package/lib/nitrogen/generated/ios/AutoSizeInputAutolinking.swift +25 -0
- package/lib/nitrogen/generated/ios/c++/HybridAutoSizeInputSpecSwift.cpp +11 -0
- package/lib/nitrogen/generated/ios/c++/HybridAutoSizeInputSpecSwift.hpp +263 -0
- package/lib/nitrogen/generated/ios/c++/views/HybridAutoSizeInputComponent.mm +221 -0
- package/lib/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/lib/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/lib/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec.swift +82 -0
- package/lib/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec_cxx.swift +764 -0
- package/lib/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.cpp +74 -0
- package/lib/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.hpp +116 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.cpp +387 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.hpp +133 -0
- package/lib/nitrogen/generated/shared/json/AutoSizeInputConfig.json +35 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/AutoSizeInput.nitro.d.ts +35 -0
- package/lib/typescript/src/AutoSizeInput.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/nitro.json +17 -0
- package/nitrogen/generated/android/autosizeinput+autolinking.cmake +83 -0
- package/nitrogen/generated/android/autosizeinput+autolinking.gradle +27 -0
- package/nitrogen/generated/android/autosizeinputOnLoad.cpp +50 -0
- package/nitrogen/generated/android/autosizeinputOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JFunc_void.hpp +75 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__string.hpp +76 -0
- package/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.cpp +317 -0
- package/nitrogen/generated/android/c++/JHybridAutoSizeInputSpec.hpp +117 -0
- package/nitrogen/generated/android/c++/views/JHybridAutoSizeInputStateUpdater.cpp +156 -0
- package/nitrogen/generated/android/c++/views/JHybridAutoSizeInputStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/Func_void.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/Func_void_std__string.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/HybridAutoSizeInputSpec.kt +239 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/autosizeinputOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/views/HybridAutoSizeInputManager.kt +50 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/autosizeinput/views/HybridAutoSizeInputStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/AutoSizeInput+autolinking.rb +60 -0
- package/nitrogen/generated/ios/AutoSizeInput-Swift-Cxx-Bridge.cpp +49 -0
- package/nitrogen/generated/ios/AutoSizeInput-Swift-Cxx-Bridge.hpp +173 -0
- package/nitrogen/generated/ios/AutoSizeInput-Swift-Cxx-Umbrella.hpp +46 -0
- package/nitrogen/generated/ios/AutoSizeInputAutolinking.mm +33 -0
- package/nitrogen/generated/ios/AutoSizeInputAutolinking.swift +25 -0
- package/nitrogen/generated/ios/c++/HybridAutoSizeInputSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridAutoSizeInputSpecSwift.hpp +263 -0
- package/nitrogen/generated/ios/c++/views/HybridAutoSizeInputComponent.mm +221 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec.swift +82 -0
- package/nitrogen/generated/ios/swift/HybridAutoSizeInputSpec_cxx.swift +764 -0
- package/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.cpp +74 -0
- package/nitrogen/generated/shared/c++/HybridAutoSizeInputSpec.hpp +116 -0
- package/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.cpp +387 -0
- package/nitrogen/generated/shared/c++/views/HybridAutoSizeInputComponent.hpp +133 -0
- package/nitrogen/generated/shared/json/AutoSizeInputConfig.json +35 -0
- package/package.json +170 -0
- package/src/AutoSizeInput.nitro.ts +56 -0
- package/src/index.tsx +13 -0
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridAutoSizeInputSpec_cxx.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
import NitroModules
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A class implementation that bridges HybridAutoSizeInputSpec over to C++.
|
|
13
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
14
|
+
*
|
|
15
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
16
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
17
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
18
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
19
|
+
*/
|
|
20
|
+
open class HybridAutoSizeInputSpec_cxx {
|
|
21
|
+
/**
|
|
22
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::autosizeinput::bridge::swift`)
|
|
23
|
+
* from `AutoSizeInput-Swift-Cxx-Bridge.hpp`.
|
|
24
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
25
|
+
*/
|
|
26
|
+
public typealias bridge = margelo.nitro.autosizeinput.bridge.swift
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Holds an instance of the `HybridAutoSizeInputSpec` Swift protocol.
|
|
30
|
+
*/
|
|
31
|
+
private var __implementation: any HybridAutoSizeInputSpec
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
35
|
+
*/
|
|
36
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridAutoSizeInputSpec_
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Create a new `HybridAutoSizeInputSpec_cxx` that wraps the given `HybridAutoSizeInputSpec`.
|
|
40
|
+
* All properties and methods bridge to C++ types.
|
|
41
|
+
*/
|
|
42
|
+
public init(_ implementation: any HybridAutoSizeInputSpec) {
|
|
43
|
+
self.__implementation = implementation
|
|
44
|
+
self.__cxxPart = .init()
|
|
45
|
+
/* no base class */
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Get the actual `HybridAutoSizeInputSpec` instance this class wraps.
|
|
50
|
+
*/
|
|
51
|
+
@inline(__always)
|
|
52
|
+
public func getHybridAutoSizeInputSpec() -> any HybridAutoSizeInputSpec {
|
|
53
|
+
return __implementation
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
58
|
+
* This acquires one additional strong reference on the object!
|
|
59
|
+
*/
|
|
60
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
61
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Casts an unsafe pointer to a `HybridAutoSizeInputSpec_cxx`.
|
|
66
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridAutoSizeInputSpec_cxx>`.
|
|
67
|
+
* This removes one strong reference from the object!
|
|
68
|
+
*/
|
|
69
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridAutoSizeInputSpec_cxx {
|
|
70
|
+
return Unmanaged<HybridAutoSizeInputSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
75
|
+
* The C++ part is a `std::shared_ptr<HybridAutoSizeInputSpec>`.
|
|
76
|
+
*/
|
|
77
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridAutoSizeInputSpec_ {
|
|
78
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
79
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
80
|
+
return cachedCxxPart
|
|
81
|
+
} else {
|
|
82
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridAutoSizeInputSpec_(self.toUnsafe())
|
|
83
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridAutoSizeInputSpec_(newCxxPart)
|
|
84
|
+
return newCxxPart
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
92
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
93
|
+
*/
|
|
94
|
+
@inline(__always)
|
|
95
|
+
public var memorySize: Int {
|
|
96
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Call dispose() on the Swift class.
|
|
101
|
+
* This _may_ be called manually from JS.
|
|
102
|
+
*/
|
|
103
|
+
@inline(__always)
|
|
104
|
+
public func dispose() {
|
|
105
|
+
self.__implementation.dispose()
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Call toString() on the Swift class.
|
|
110
|
+
*/
|
|
111
|
+
@inline(__always)
|
|
112
|
+
public func toString() -> String {
|
|
113
|
+
return self.__implementation.toString()
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Properties
|
|
117
|
+
public final var text: bridge.std__optional_std__string_ {
|
|
118
|
+
@inline(__always)
|
|
119
|
+
get {
|
|
120
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
121
|
+
if let __unwrappedValue = self.__implementation.text {
|
|
122
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
123
|
+
} else {
|
|
124
|
+
return .init()
|
|
125
|
+
}
|
|
126
|
+
}()
|
|
127
|
+
}
|
|
128
|
+
@inline(__always)
|
|
129
|
+
set {
|
|
130
|
+
self.__implementation.text = { () -> String? in
|
|
131
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
132
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
133
|
+
return String(__unwrapped)
|
|
134
|
+
} else {
|
|
135
|
+
return nil
|
|
136
|
+
}
|
|
137
|
+
}()
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
public final var prefix: bridge.std__optional_std__string_ {
|
|
142
|
+
@inline(__always)
|
|
143
|
+
get {
|
|
144
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
145
|
+
if let __unwrappedValue = self.__implementation.prefix {
|
|
146
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
147
|
+
} else {
|
|
148
|
+
return .init()
|
|
149
|
+
}
|
|
150
|
+
}()
|
|
151
|
+
}
|
|
152
|
+
@inline(__always)
|
|
153
|
+
set {
|
|
154
|
+
self.__implementation.prefix = { () -> String? in
|
|
155
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
156
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
157
|
+
return String(__unwrapped)
|
|
158
|
+
} else {
|
|
159
|
+
return nil
|
|
160
|
+
}
|
|
161
|
+
}()
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
public final var suffix: bridge.std__optional_std__string_ {
|
|
166
|
+
@inline(__always)
|
|
167
|
+
get {
|
|
168
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
169
|
+
if let __unwrappedValue = self.__implementation.suffix {
|
|
170
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
171
|
+
} else {
|
|
172
|
+
return .init()
|
|
173
|
+
}
|
|
174
|
+
}()
|
|
175
|
+
}
|
|
176
|
+
@inline(__always)
|
|
177
|
+
set {
|
|
178
|
+
self.__implementation.suffix = { () -> String? in
|
|
179
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
180
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
181
|
+
return String(__unwrapped)
|
|
182
|
+
} else {
|
|
183
|
+
return nil
|
|
184
|
+
}
|
|
185
|
+
}()
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
public final var placeholder: bridge.std__optional_std__string_ {
|
|
190
|
+
@inline(__always)
|
|
191
|
+
get {
|
|
192
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
193
|
+
if let __unwrappedValue = self.__implementation.placeholder {
|
|
194
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
195
|
+
} else {
|
|
196
|
+
return .init()
|
|
197
|
+
}
|
|
198
|
+
}()
|
|
199
|
+
}
|
|
200
|
+
@inline(__always)
|
|
201
|
+
set {
|
|
202
|
+
self.__implementation.placeholder = { () -> String? in
|
|
203
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
204
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
205
|
+
return String(__unwrapped)
|
|
206
|
+
} else {
|
|
207
|
+
return nil
|
|
208
|
+
}
|
|
209
|
+
}()
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
public final var fontSize: bridge.std__optional_double_ {
|
|
214
|
+
@inline(__always)
|
|
215
|
+
get {
|
|
216
|
+
return { () -> bridge.std__optional_double_ in
|
|
217
|
+
if let __unwrappedValue = self.__implementation.fontSize {
|
|
218
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
219
|
+
} else {
|
|
220
|
+
return .init()
|
|
221
|
+
}
|
|
222
|
+
}()
|
|
223
|
+
}
|
|
224
|
+
@inline(__always)
|
|
225
|
+
set {
|
|
226
|
+
self.__implementation.fontSize = newValue.value
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
public final var minFontSize: bridge.std__optional_double_ {
|
|
231
|
+
@inline(__always)
|
|
232
|
+
get {
|
|
233
|
+
return { () -> bridge.std__optional_double_ in
|
|
234
|
+
if let __unwrappedValue = self.__implementation.minFontSize {
|
|
235
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
236
|
+
} else {
|
|
237
|
+
return .init()
|
|
238
|
+
}
|
|
239
|
+
}()
|
|
240
|
+
}
|
|
241
|
+
@inline(__always)
|
|
242
|
+
set {
|
|
243
|
+
self.__implementation.minFontSize = newValue.value
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
public final var multiline: bridge.std__optional_bool_ {
|
|
248
|
+
@inline(__always)
|
|
249
|
+
get {
|
|
250
|
+
return { () -> bridge.std__optional_bool_ in
|
|
251
|
+
if let __unwrappedValue = self.__implementation.multiline {
|
|
252
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
253
|
+
} else {
|
|
254
|
+
return .init()
|
|
255
|
+
}
|
|
256
|
+
}()
|
|
257
|
+
}
|
|
258
|
+
@inline(__always)
|
|
259
|
+
set {
|
|
260
|
+
self.__implementation.multiline = { () -> Bool? in
|
|
261
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
262
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
263
|
+
return __unwrapped
|
|
264
|
+
} else {
|
|
265
|
+
return nil
|
|
266
|
+
}
|
|
267
|
+
}()
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
public final var maxNumberOfLines: bridge.std__optional_double_ {
|
|
272
|
+
@inline(__always)
|
|
273
|
+
get {
|
|
274
|
+
return { () -> bridge.std__optional_double_ in
|
|
275
|
+
if let __unwrappedValue = self.__implementation.maxNumberOfLines {
|
|
276
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
277
|
+
} else {
|
|
278
|
+
return .init()
|
|
279
|
+
}
|
|
280
|
+
}()
|
|
281
|
+
}
|
|
282
|
+
@inline(__always)
|
|
283
|
+
set {
|
|
284
|
+
self.__implementation.maxNumberOfLines = newValue.value
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
public final var textColor: bridge.std__optional_std__string_ {
|
|
289
|
+
@inline(__always)
|
|
290
|
+
get {
|
|
291
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
292
|
+
if let __unwrappedValue = self.__implementation.textColor {
|
|
293
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
294
|
+
} else {
|
|
295
|
+
return .init()
|
|
296
|
+
}
|
|
297
|
+
}()
|
|
298
|
+
}
|
|
299
|
+
@inline(__always)
|
|
300
|
+
set {
|
|
301
|
+
self.__implementation.textColor = { () -> String? in
|
|
302
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
303
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
304
|
+
return String(__unwrapped)
|
|
305
|
+
} else {
|
|
306
|
+
return nil
|
|
307
|
+
}
|
|
308
|
+
}()
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
public final var prefixColor: bridge.std__optional_std__string_ {
|
|
313
|
+
@inline(__always)
|
|
314
|
+
get {
|
|
315
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
316
|
+
if let __unwrappedValue = self.__implementation.prefixColor {
|
|
317
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
318
|
+
} else {
|
|
319
|
+
return .init()
|
|
320
|
+
}
|
|
321
|
+
}()
|
|
322
|
+
}
|
|
323
|
+
@inline(__always)
|
|
324
|
+
set {
|
|
325
|
+
self.__implementation.prefixColor = { () -> String? in
|
|
326
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
327
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
328
|
+
return String(__unwrapped)
|
|
329
|
+
} else {
|
|
330
|
+
return nil
|
|
331
|
+
}
|
|
332
|
+
}()
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
public final var suffixColor: bridge.std__optional_std__string_ {
|
|
337
|
+
@inline(__always)
|
|
338
|
+
get {
|
|
339
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
340
|
+
if let __unwrappedValue = self.__implementation.suffixColor {
|
|
341
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
342
|
+
} else {
|
|
343
|
+
return .init()
|
|
344
|
+
}
|
|
345
|
+
}()
|
|
346
|
+
}
|
|
347
|
+
@inline(__always)
|
|
348
|
+
set {
|
|
349
|
+
self.__implementation.suffixColor = { () -> String? in
|
|
350
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
351
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
352
|
+
return String(__unwrapped)
|
|
353
|
+
} else {
|
|
354
|
+
return nil
|
|
355
|
+
}
|
|
356
|
+
}()
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
public final var placeholderColor: bridge.std__optional_std__string_ {
|
|
361
|
+
@inline(__always)
|
|
362
|
+
get {
|
|
363
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
364
|
+
if let __unwrappedValue = self.__implementation.placeholderColor {
|
|
365
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
366
|
+
} else {
|
|
367
|
+
return .init()
|
|
368
|
+
}
|
|
369
|
+
}()
|
|
370
|
+
}
|
|
371
|
+
@inline(__always)
|
|
372
|
+
set {
|
|
373
|
+
self.__implementation.placeholderColor = { () -> String? in
|
|
374
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
375
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
376
|
+
return String(__unwrapped)
|
|
377
|
+
} else {
|
|
378
|
+
return nil
|
|
379
|
+
}
|
|
380
|
+
}()
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
public final var textAlign: bridge.std__optional_std__string_ {
|
|
385
|
+
@inline(__always)
|
|
386
|
+
get {
|
|
387
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
388
|
+
if let __unwrappedValue = self.__implementation.textAlign {
|
|
389
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
390
|
+
} else {
|
|
391
|
+
return .init()
|
|
392
|
+
}
|
|
393
|
+
}()
|
|
394
|
+
}
|
|
395
|
+
@inline(__always)
|
|
396
|
+
set {
|
|
397
|
+
self.__implementation.textAlign = { () -> String? in
|
|
398
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
399
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
400
|
+
return String(__unwrapped)
|
|
401
|
+
} else {
|
|
402
|
+
return nil
|
|
403
|
+
}
|
|
404
|
+
}()
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
public final var fontFamily: bridge.std__optional_std__string_ {
|
|
409
|
+
@inline(__always)
|
|
410
|
+
get {
|
|
411
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
412
|
+
if let __unwrappedValue = self.__implementation.fontFamily {
|
|
413
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
414
|
+
} else {
|
|
415
|
+
return .init()
|
|
416
|
+
}
|
|
417
|
+
}()
|
|
418
|
+
}
|
|
419
|
+
@inline(__always)
|
|
420
|
+
set {
|
|
421
|
+
self.__implementation.fontFamily = { () -> String? in
|
|
422
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
423
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
424
|
+
return String(__unwrapped)
|
|
425
|
+
} else {
|
|
426
|
+
return nil
|
|
427
|
+
}
|
|
428
|
+
}()
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
public final var fontWeight: bridge.std__optional_std__string_ {
|
|
433
|
+
@inline(__always)
|
|
434
|
+
get {
|
|
435
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
436
|
+
if let __unwrappedValue = self.__implementation.fontWeight {
|
|
437
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
438
|
+
} else {
|
|
439
|
+
return .init()
|
|
440
|
+
}
|
|
441
|
+
}()
|
|
442
|
+
}
|
|
443
|
+
@inline(__always)
|
|
444
|
+
set {
|
|
445
|
+
self.__implementation.fontWeight = { () -> String? in
|
|
446
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
447
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
448
|
+
return String(__unwrapped)
|
|
449
|
+
} else {
|
|
450
|
+
return nil
|
|
451
|
+
}
|
|
452
|
+
}()
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
public final var editable: bridge.std__optional_bool_ {
|
|
457
|
+
@inline(__always)
|
|
458
|
+
get {
|
|
459
|
+
return { () -> bridge.std__optional_bool_ in
|
|
460
|
+
if let __unwrappedValue = self.__implementation.editable {
|
|
461
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
462
|
+
} else {
|
|
463
|
+
return .init()
|
|
464
|
+
}
|
|
465
|
+
}()
|
|
466
|
+
}
|
|
467
|
+
@inline(__always)
|
|
468
|
+
set {
|
|
469
|
+
self.__implementation.editable = { () -> Bool? in
|
|
470
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
471
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
472
|
+
return __unwrapped
|
|
473
|
+
} else {
|
|
474
|
+
return nil
|
|
475
|
+
}
|
|
476
|
+
}()
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
public final var keyboardType: bridge.std__optional_std__string_ {
|
|
481
|
+
@inline(__always)
|
|
482
|
+
get {
|
|
483
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
484
|
+
if let __unwrappedValue = self.__implementation.keyboardType {
|
|
485
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
486
|
+
} else {
|
|
487
|
+
return .init()
|
|
488
|
+
}
|
|
489
|
+
}()
|
|
490
|
+
}
|
|
491
|
+
@inline(__always)
|
|
492
|
+
set {
|
|
493
|
+
self.__implementation.keyboardType = { () -> String? in
|
|
494
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
495
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
496
|
+
return String(__unwrapped)
|
|
497
|
+
} else {
|
|
498
|
+
return nil
|
|
499
|
+
}
|
|
500
|
+
}()
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
public final var returnKeyType: bridge.std__optional_std__string_ {
|
|
505
|
+
@inline(__always)
|
|
506
|
+
get {
|
|
507
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
508
|
+
if let __unwrappedValue = self.__implementation.returnKeyType {
|
|
509
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
510
|
+
} else {
|
|
511
|
+
return .init()
|
|
512
|
+
}
|
|
513
|
+
}()
|
|
514
|
+
}
|
|
515
|
+
@inline(__always)
|
|
516
|
+
set {
|
|
517
|
+
self.__implementation.returnKeyType = { () -> String? in
|
|
518
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
519
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
520
|
+
return String(__unwrapped)
|
|
521
|
+
} else {
|
|
522
|
+
return nil
|
|
523
|
+
}
|
|
524
|
+
}()
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
public final var autoCorrect: bridge.std__optional_bool_ {
|
|
529
|
+
@inline(__always)
|
|
530
|
+
get {
|
|
531
|
+
return { () -> bridge.std__optional_bool_ in
|
|
532
|
+
if let __unwrappedValue = self.__implementation.autoCorrect {
|
|
533
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
534
|
+
} else {
|
|
535
|
+
return .init()
|
|
536
|
+
}
|
|
537
|
+
}()
|
|
538
|
+
}
|
|
539
|
+
@inline(__always)
|
|
540
|
+
set {
|
|
541
|
+
self.__implementation.autoCorrect = { () -> Bool? in
|
|
542
|
+
if bridge.has_value_std__optional_bool_(newValue) {
|
|
543
|
+
let __unwrapped = bridge.get_std__optional_bool_(newValue)
|
|
544
|
+
return __unwrapped
|
|
545
|
+
} else {
|
|
546
|
+
return nil
|
|
547
|
+
}
|
|
548
|
+
}()
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
public final var autoCapitalize: bridge.std__optional_std__string_ {
|
|
553
|
+
@inline(__always)
|
|
554
|
+
get {
|
|
555
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
556
|
+
if let __unwrappedValue = self.__implementation.autoCapitalize {
|
|
557
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
558
|
+
} else {
|
|
559
|
+
return .init()
|
|
560
|
+
}
|
|
561
|
+
}()
|
|
562
|
+
}
|
|
563
|
+
@inline(__always)
|
|
564
|
+
set {
|
|
565
|
+
self.__implementation.autoCapitalize = { () -> String? in
|
|
566
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
567
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
568
|
+
return String(__unwrapped)
|
|
569
|
+
} else {
|
|
570
|
+
return nil
|
|
571
|
+
}
|
|
572
|
+
}()
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
public final var selectionColor: bridge.std__optional_std__string_ {
|
|
577
|
+
@inline(__always)
|
|
578
|
+
get {
|
|
579
|
+
return { () -> bridge.std__optional_std__string_ in
|
|
580
|
+
if let __unwrappedValue = self.__implementation.selectionColor {
|
|
581
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
582
|
+
} else {
|
|
583
|
+
return .init()
|
|
584
|
+
}
|
|
585
|
+
}()
|
|
586
|
+
}
|
|
587
|
+
@inline(__always)
|
|
588
|
+
set {
|
|
589
|
+
self.__implementation.selectionColor = { () -> String? in
|
|
590
|
+
if bridge.has_value_std__optional_std__string_(newValue) {
|
|
591
|
+
let __unwrapped = bridge.get_std__optional_std__string_(newValue)
|
|
592
|
+
return String(__unwrapped)
|
|
593
|
+
} else {
|
|
594
|
+
return nil
|
|
595
|
+
}
|
|
596
|
+
}()
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
public final var prefixMarginRight: bridge.std__optional_double_ {
|
|
601
|
+
@inline(__always)
|
|
602
|
+
get {
|
|
603
|
+
return { () -> bridge.std__optional_double_ in
|
|
604
|
+
if let __unwrappedValue = self.__implementation.prefixMarginRight {
|
|
605
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
606
|
+
} else {
|
|
607
|
+
return .init()
|
|
608
|
+
}
|
|
609
|
+
}()
|
|
610
|
+
}
|
|
611
|
+
@inline(__always)
|
|
612
|
+
set {
|
|
613
|
+
self.__implementation.prefixMarginRight = newValue.value
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
public final var suffixMarginLeft: bridge.std__optional_double_ {
|
|
618
|
+
@inline(__always)
|
|
619
|
+
get {
|
|
620
|
+
return { () -> bridge.std__optional_double_ in
|
|
621
|
+
if let __unwrappedValue = self.__implementation.suffixMarginLeft {
|
|
622
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
623
|
+
} else {
|
|
624
|
+
return .init()
|
|
625
|
+
}
|
|
626
|
+
}()
|
|
627
|
+
}
|
|
628
|
+
@inline(__always)
|
|
629
|
+
set {
|
|
630
|
+
self.__implementation.suffixMarginLeft = newValue.value
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
public final var onChangeText: bridge.std__optional_std__function_void_const_std__string_____text______ {
|
|
635
|
+
@inline(__always)
|
|
636
|
+
get {
|
|
637
|
+
return { () -> bridge.std__optional_std__function_void_const_std__string_____text______ in
|
|
638
|
+
if let __unwrappedValue = self.__implementation.onChangeText {
|
|
639
|
+
return bridge.create_std__optional_std__function_void_const_std__string_____text______({ () -> bridge.Func_void_std__string in
|
|
640
|
+
let __closureWrapper = Func_void_std__string(__unwrappedValue)
|
|
641
|
+
return bridge.create_Func_void_std__string(__closureWrapper.toUnsafe())
|
|
642
|
+
}())
|
|
643
|
+
} else {
|
|
644
|
+
return .init()
|
|
645
|
+
}
|
|
646
|
+
}()
|
|
647
|
+
}
|
|
648
|
+
@inline(__always)
|
|
649
|
+
set {
|
|
650
|
+
self.__implementation.onChangeText = { () -> ((_ text: String) -> Void)? in
|
|
651
|
+
if bridge.has_value_std__optional_std__function_void_const_std__string_____text______(newValue) {
|
|
652
|
+
let __unwrapped = bridge.get_std__optional_std__function_void_const_std__string_____text______(newValue)
|
|
653
|
+
return { () -> (String) -> Void in
|
|
654
|
+
let __wrappedFunction = bridge.wrap_Func_void_std__string(__unwrapped)
|
|
655
|
+
return { (__text: String) -> Void in
|
|
656
|
+
__wrappedFunction.call(std.string(__text))
|
|
657
|
+
}
|
|
658
|
+
}()
|
|
659
|
+
} else {
|
|
660
|
+
return nil
|
|
661
|
+
}
|
|
662
|
+
}()
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
public final var onFocus: bridge.std__optional_std__function_void____ {
|
|
667
|
+
@inline(__always)
|
|
668
|
+
get {
|
|
669
|
+
return { () -> bridge.std__optional_std__function_void____ in
|
|
670
|
+
if let __unwrappedValue = self.__implementation.onFocus {
|
|
671
|
+
return bridge.create_std__optional_std__function_void____({ () -> bridge.Func_void in
|
|
672
|
+
let __closureWrapper = Func_void(__unwrappedValue)
|
|
673
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
674
|
+
}())
|
|
675
|
+
} else {
|
|
676
|
+
return .init()
|
|
677
|
+
}
|
|
678
|
+
}()
|
|
679
|
+
}
|
|
680
|
+
@inline(__always)
|
|
681
|
+
set {
|
|
682
|
+
self.__implementation.onFocus = { () -> (() -> Void)? in
|
|
683
|
+
if bridge.has_value_std__optional_std__function_void____(newValue) {
|
|
684
|
+
let __unwrapped = bridge.get_std__optional_std__function_void____(newValue)
|
|
685
|
+
return { () -> () -> Void in
|
|
686
|
+
let __wrappedFunction = bridge.wrap_Func_void(__unwrapped)
|
|
687
|
+
return { () -> Void in
|
|
688
|
+
__wrappedFunction.call()
|
|
689
|
+
}
|
|
690
|
+
}()
|
|
691
|
+
} else {
|
|
692
|
+
return nil
|
|
693
|
+
}
|
|
694
|
+
}()
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
public final var onBlur: bridge.std__optional_std__function_void____ {
|
|
699
|
+
@inline(__always)
|
|
700
|
+
get {
|
|
701
|
+
return { () -> bridge.std__optional_std__function_void____ in
|
|
702
|
+
if let __unwrappedValue = self.__implementation.onBlur {
|
|
703
|
+
return bridge.create_std__optional_std__function_void____({ () -> bridge.Func_void in
|
|
704
|
+
let __closureWrapper = Func_void(__unwrappedValue)
|
|
705
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
706
|
+
}())
|
|
707
|
+
} else {
|
|
708
|
+
return .init()
|
|
709
|
+
}
|
|
710
|
+
}()
|
|
711
|
+
}
|
|
712
|
+
@inline(__always)
|
|
713
|
+
set {
|
|
714
|
+
self.__implementation.onBlur = { () -> (() -> Void)? in
|
|
715
|
+
if bridge.has_value_std__optional_std__function_void____(newValue) {
|
|
716
|
+
let __unwrapped = bridge.get_std__optional_std__function_void____(newValue)
|
|
717
|
+
return { () -> () -> Void in
|
|
718
|
+
let __wrappedFunction = bridge.wrap_Func_void(__unwrapped)
|
|
719
|
+
return { () -> Void in
|
|
720
|
+
__wrappedFunction.call()
|
|
721
|
+
}
|
|
722
|
+
}()
|
|
723
|
+
} else {
|
|
724
|
+
return nil
|
|
725
|
+
}
|
|
726
|
+
}()
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
// Methods
|
|
731
|
+
@inline(__always)
|
|
732
|
+
public final func focus() -> bridge.Result_void_ {
|
|
733
|
+
do {
|
|
734
|
+
try self.__implementation.focus()
|
|
735
|
+
return bridge.create_Result_void_()
|
|
736
|
+
} catch (let __error) {
|
|
737
|
+
let __exceptionPtr = __error.toCpp()
|
|
738
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
@inline(__always)
|
|
743
|
+
public final func blur() -> bridge.Result_void_ {
|
|
744
|
+
do {
|
|
745
|
+
try self.__implementation.blur()
|
|
746
|
+
return bridge.create_Result_void_()
|
|
747
|
+
} catch (let __error) {
|
|
748
|
+
let __exceptionPtr = __error.toCpp()
|
|
749
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
public final func getView() -> UnsafeMutableRawPointer {
|
|
754
|
+
return Unmanaged.passRetained(__implementation.view).toOpaque()
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
public final func beforeUpdate() {
|
|
758
|
+
__implementation.beforeUpdate()
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
public final func afterUpdate() {
|
|
762
|
+
__implementation.afterUpdate()
|
|
763
|
+
}
|
|
764
|
+
}
|