@rive-app/react-native 0.1.1-beta.1 → 0.1.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/android/src/main/java/com/margelo/nitro/rive/BaseHybridViewModelProperty.kt +9 -7
- package/android/src/main/java/com/margelo/nitro/rive/BaseHybridViewModelPropertyImpl.kt +43 -24
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelBooleanProperty.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelColorProperty.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelEnumProperty.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelImageProperty.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelNumberProperty.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelStringProperty.kt +3 -2
- package/android/src/main/java/com/margelo/nitro/rive/HybridViewModelTriggerProperty.kt +3 -2
- package/ios/BaseHybridViewModelProperty.swift +13 -6
- package/ios/HybridViewModel.swift +1 -6
- package/ios/HybridViewModelBooleanProperty.swift +1 -9
- package/ios/HybridViewModelColorProperty.swift +3 -12
- package/ios/HybridViewModelEnumProperty.swift +1 -9
- package/ios/HybridViewModelImageProperty.swift +4 -4
- package/ios/HybridViewModelInstance.swift +1 -6
- package/ios/HybridViewModelNumberProperty.swift +2 -13
- package/ios/HybridViewModelStringProperty.swift +1 -9
- package/ios/HybridViewModelTriggerProperty.swift +5 -14
- package/ios/RiveReactNativeView.swift +36 -0
- package/lib/typescript/src/specs/ViewModel.nitro.d.ts +15 -15
- package/lib/typescript/src/specs/ViewModel.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelBooleanPropertySpec.cpp +14 -4
- package/nitrogen/generated/android/c++/JHybridViewModelBooleanPropertySpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelColorPropertySpec.cpp +14 -4
- package/nitrogen/generated/android/c++/JHybridViewModelColorPropertySpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelEnumPropertySpec.cpp +14 -4
- package/nitrogen/generated/android/c++/JHybridViewModelEnumPropertySpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelImagePropertySpec.cpp +15 -6
- package/nitrogen/generated/android/c++/JHybridViewModelImagePropertySpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelNumberPropertySpec.cpp +14 -4
- package/nitrogen/generated/android/c++/JHybridViewModelNumberPropertySpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelStringPropertySpec.cpp +14 -4
- package/nitrogen/generated/android/c++/JHybridViewModelStringPropertySpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JHybridViewModelTriggerPropertySpec.cpp +12 -3
- package/nitrogen/generated/android/c++/JHybridViewModelTriggerPropertySpec.hpp +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelBooleanPropertySpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelColorPropertySpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelEnumPropertySpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelImagePropertySpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelNumberPropertySpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelStringPropertySpec.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/rive/HybridViewModelTriggerPropertySpec.kt +3 -3
- package/nitrogen/generated/android/riveOnLoad.cpp +2 -74
- package/nitrogen/generated/ios/RNRive-Swift-Cxx-Bridge.hpp +9 -0
- package/nitrogen/generated/ios/RNRiveAutolinking.mm +0 -72
- package/nitrogen/generated/ios/RNRiveAutolinking.swift +0 -135
- package/nitrogen/generated/ios/c++/HybridViewModelBooleanPropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridViewModelColorPropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridViewModelEnumPropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridViewModelImagePropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridViewModelNumberPropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridViewModelStringPropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/c++/HybridViewModelTriggerPropertySpecSwift.hpp +3 -1
- package/nitrogen/generated/ios/swift/HybridViewModelBooleanPropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelBooleanPropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridViewModelColorPropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelColorPropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridViewModelEnumPropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelEnumPropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridViewModelImagePropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelImagePropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridViewModelNumberPropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelNumberPropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridViewModelStringPropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelStringPropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/ios/swift/HybridViewModelTriggerPropertySpec.swift +1 -1
- package/nitrogen/generated/ios/swift/HybridViewModelTriggerPropertySpec_cxx.swift +8 -4
- package/nitrogen/generated/shared/c++/HybridViewModelBooleanPropertySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridViewModelColorPropertySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridViewModelEnumPropertySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridViewModelImagePropertySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridViewModelNumberPropertySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridViewModelStringPropertySpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridViewModelTriggerPropertySpec.hpp +1 -1
- package/package.json +1 -1
- package/src/hooks/useRiveProperty.ts +1 -1
- package/src/specs/ViewModel.nitro.ts +15 -15
|
@@ -53,141 +53,6 @@ public final class RNRiveAutolinking {
|
|
|
53
53
|
}()
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
* Creates an instance of a Swift class that implements `HybridViewModelSpec`,
|
|
58
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelSpec_cxx`)
|
|
59
|
-
*
|
|
60
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
61
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModel`).
|
|
62
|
-
*/
|
|
63
|
-
public static func createViewModel() -> bridge.std__shared_ptr_HybridViewModelSpec_ {
|
|
64
|
-
let hybridObject = HybridViewModel()
|
|
65
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelSpec_ in
|
|
66
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
67
|
-
return __cxxWrapped.getCxxPart()
|
|
68
|
-
}()
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Creates an instance of a Swift class that implements `HybridViewModelInstanceSpec`,
|
|
73
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelInstanceSpec_cxx`)
|
|
74
|
-
*
|
|
75
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
76
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelInstance`).
|
|
77
|
-
*/
|
|
78
|
-
public static func createViewModelInstance() -> bridge.std__shared_ptr_HybridViewModelInstanceSpec_ {
|
|
79
|
-
let hybridObject = HybridViewModelInstance()
|
|
80
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelInstanceSpec_ in
|
|
81
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
82
|
-
return __cxxWrapped.getCxxPart()
|
|
83
|
-
}()
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Creates an instance of a Swift class that implements `HybridViewModelNumberPropertySpec`,
|
|
88
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelNumberPropertySpec_cxx`)
|
|
89
|
-
*
|
|
90
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
91
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelNumberProperty`).
|
|
92
|
-
*/
|
|
93
|
-
public static func createViewModelNumberProperty() -> bridge.std__shared_ptr_HybridViewModelNumberPropertySpec_ {
|
|
94
|
-
let hybridObject = HybridViewModelNumberProperty()
|
|
95
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelNumberPropertySpec_ in
|
|
96
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
97
|
-
return __cxxWrapped.getCxxPart()
|
|
98
|
-
}()
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Creates an instance of a Swift class that implements `HybridViewModelStringPropertySpec`,
|
|
103
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelStringPropertySpec_cxx`)
|
|
104
|
-
*
|
|
105
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
106
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelStringProperty`).
|
|
107
|
-
*/
|
|
108
|
-
public static func createViewModelStringProperty() -> bridge.std__shared_ptr_HybridViewModelStringPropertySpec_ {
|
|
109
|
-
let hybridObject = HybridViewModelStringProperty()
|
|
110
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelStringPropertySpec_ in
|
|
111
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
112
|
-
return __cxxWrapped.getCxxPart()
|
|
113
|
-
}()
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Creates an instance of a Swift class that implements `HybridViewModelBooleanPropertySpec`,
|
|
118
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelBooleanPropertySpec_cxx`)
|
|
119
|
-
*
|
|
120
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
121
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelBooleanProperty`).
|
|
122
|
-
*/
|
|
123
|
-
public static func createViewModelBooleanProperty() -> bridge.std__shared_ptr_HybridViewModelBooleanPropertySpec_ {
|
|
124
|
-
let hybridObject = HybridViewModelBooleanProperty()
|
|
125
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelBooleanPropertySpec_ in
|
|
126
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
127
|
-
return __cxxWrapped.getCxxPart()
|
|
128
|
-
}()
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Creates an instance of a Swift class that implements `HybridViewModelColorPropertySpec`,
|
|
133
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelColorPropertySpec_cxx`)
|
|
134
|
-
*
|
|
135
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
136
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelColorProperty`).
|
|
137
|
-
*/
|
|
138
|
-
public static func createViewModelColorProperty() -> bridge.std__shared_ptr_HybridViewModelColorPropertySpec_ {
|
|
139
|
-
let hybridObject = HybridViewModelColorProperty()
|
|
140
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelColorPropertySpec_ in
|
|
141
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
142
|
-
return __cxxWrapped.getCxxPart()
|
|
143
|
-
}()
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/**
|
|
147
|
-
* Creates an instance of a Swift class that implements `HybridViewModelEnumPropertySpec`,
|
|
148
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelEnumPropertySpec_cxx`)
|
|
149
|
-
*
|
|
150
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
151
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelEnumProperty`).
|
|
152
|
-
*/
|
|
153
|
-
public static func createViewModelEnumProperty() -> bridge.std__shared_ptr_HybridViewModelEnumPropertySpec_ {
|
|
154
|
-
let hybridObject = HybridViewModelEnumProperty()
|
|
155
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelEnumPropertySpec_ in
|
|
156
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
157
|
-
return __cxxWrapped.getCxxPart()
|
|
158
|
-
}()
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Creates an instance of a Swift class that implements `HybridViewModelTriggerPropertySpec`,
|
|
163
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelTriggerPropertySpec_cxx`)
|
|
164
|
-
*
|
|
165
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
166
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelTriggerProperty`).
|
|
167
|
-
*/
|
|
168
|
-
public static func createViewModelTriggerProperty() -> bridge.std__shared_ptr_HybridViewModelTriggerPropertySpec_ {
|
|
169
|
-
let hybridObject = HybridViewModelTriggerProperty()
|
|
170
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelTriggerPropertySpec_ in
|
|
171
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
172
|
-
return __cxxWrapped.getCxxPart()
|
|
173
|
-
}()
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
* Creates an instance of a Swift class that implements `HybridViewModelImagePropertySpec`,
|
|
178
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridViewModelImagePropertySpec_cxx`)
|
|
179
|
-
*
|
|
180
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
181
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridViewModelImageProperty`).
|
|
182
|
-
*/
|
|
183
|
-
public static func createViewModelImageProperty() -> bridge.std__shared_ptr_HybridViewModelImagePropertySpec_ {
|
|
184
|
-
let hybridObject = HybridViewModelImageProperty()
|
|
185
|
-
return { () -> bridge.std__shared_ptr_HybridViewModelImagePropertySpec_ in
|
|
186
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
187
|
-
return __cxxWrapped.getCxxPart()
|
|
188
|
-
}()
|
|
189
|
-
}
|
|
190
|
-
|
|
191
56
|
/**
|
|
192
57
|
* Creates an instance of a Swift class that implements `HybridRiveViewSpec`,
|
|
193
58
|
* and wraps it in a Swift class that can directly interop with C++ (`HybridRiveViewSpec_cxx`)
|
|
@@ -68,11 +68,13 @@ namespace margelo::nitro::rive {
|
|
|
68
68
|
|
|
69
69
|
public:
|
|
70
70
|
// Methods
|
|
71
|
-
inline void addListener(const std::function<void(bool /* value */)>& onChanged) override {
|
|
71
|
+
inline std::function<void()> addListener(const std::function<void(bool /* value */)>& onChanged) override {
|
|
72
72
|
auto __result = _swiftPart.addListener(onChanged);
|
|
73
73
|
if (__result.hasError()) [[unlikely]] {
|
|
74
74
|
std::rethrow_exception(__result.error());
|
|
75
75
|
}
|
|
76
|
+
auto __value = std::move(__result.value());
|
|
77
|
+
return __value;
|
|
76
78
|
}
|
|
77
79
|
inline void removeListeners() override {
|
|
78
80
|
auto __result = _swiftPart.removeListeners();
|
|
@@ -68,11 +68,13 @@ namespace margelo::nitro::rive {
|
|
|
68
68
|
|
|
69
69
|
public:
|
|
70
70
|
// Methods
|
|
71
|
-
inline void addListener(const std::function<void(double /* value */)>& onChanged) override {
|
|
71
|
+
inline std::function<void()> addListener(const std::function<void(double /* value */)>& onChanged) override {
|
|
72
72
|
auto __result = _swiftPart.addListener(onChanged);
|
|
73
73
|
if (__result.hasError()) [[unlikely]] {
|
|
74
74
|
std::rethrow_exception(__result.error());
|
|
75
75
|
}
|
|
76
|
+
auto __value = std::move(__result.value());
|
|
77
|
+
return __value;
|
|
76
78
|
}
|
|
77
79
|
inline void removeListeners() override {
|
|
78
80
|
auto __result = _swiftPart.removeListeners();
|
|
@@ -70,11 +70,13 @@ namespace margelo::nitro::rive {
|
|
|
70
70
|
|
|
71
71
|
public:
|
|
72
72
|
// Methods
|
|
73
|
-
inline void addListener(const std::function<void(const std::string& /* value */)>& onChanged) override {
|
|
73
|
+
inline std::function<void()> addListener(const std::function<void(const std::string& /* value */)>& onChanged) override {
|
|
74
74
|
auto __result = _swiftPart.addListener(onChanged);
|
|
75
75
|
if (__result.hasError()) [[unlikely]] {
|
|
76
76
|
std::rethrow_exception(__result.error());
|
|
77
77
|
}
|
|
78
|
+
auto __value = std::move(__result.value());
|
|
79
|
+
return __value;
|
|
78
80
|
}
|
|
79
81
|
inline void removeListeners() override {
|
|
80
82
|
auto __result = _swiftPart.removeListeners();
|
|
@@ -74,11 +74,13 @@ namespace margelo::nitro::rive {
|
|
|
74
74
|
std::rethrow_exception(__result.error());
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
inline void addListener(const std::function<void()>& onChanged) override {
|
|
77
|
+
inline std::function<void()> addListener(const std::function<void()>& onChanged) override {
|
|
78
78
|
auto __result = _swiftPart.addListener(onChanged);
|
|
79
79
|
if (__result.hasError()) [[unlikely]] {
|
|
80
80
|
std::rethrow_exception(__result.error());
|
|
81
81
|
}
|
|
82
|
+
auto __value = std::move(__result.value());
|
|
83
|
+
return __value;
|
|
82
84
|
}
|
|
83
85
|
inline void removeListeners() override {
|
|
84
86
|
auto __result = _swiftPart.removeListeners();
|
|
@@ -68,11 +68,13 @@ namespace margelo::nitro::rive {
|
|
|
68
68
|
|
|
69
69
|
public:
|
|
70
70
|
// Methods
|
|
71
|
-
inline void addListener(const std::function<void(double /* value */)>& onChanged) override {
|
|
71
|
+
inline std::function<void()> addListener(const std::function<void(double /* value */)>& onChanged) override {
|
|
72
72
|
auto __result = _swiftPart.addListener(onChanged);
|
|
73
73
|
if (__result.hasError()) [[unlikely]] {
|
|
74
74
|
std::rethrow_exception(__result.error());
|
|
75
75
|
}
|
|
76
|
+
auto __value = std::move(__result.value());
|
|
77
|
+
return __value;
|
|
76
78
|
}
|
|
77
79
|
inline void removeListeners() override {
|
|
78
80
|
auto __result = _swiftPart.removeListeners();
|
|
@@ -70,11 +70,13 @@ namespace margelo::nitro::rive {
|
|
|
70
70
|
|
|
71
71
|
public:
|
|
72
72
|
// Methods
|
|
73
|
-
inline void addListener(const std::function<void(const std::string& /* value */)>& onChanged) override {
|
|
73
|
+
inline std::function<void()> addListener(const std::function<void(const std::string& /* value */)>& onChanged) override {
|
|
74
74
|
auto __result = _swiftPart.addListener(onChanged);
|
|
75
75
|
if (__result.hasError()) [[unlikely]] {
|
|
76
76
|
std::rethrow_exception(__result.error());
|
|
77
77
|
}
|
|
78
|
+
auto __value = std::move(__result.value());
|
|
79
|
+
return __value;
|
|
78
80
|
}
|
|
79
81
|
inline void removeListeners() override {
|
|
80
82
|
auto __result = _swiftPart.removeListeners();
|
|
@@ -63,11 +63,13 @@ namespace margelo::nitro::rive {
|
|
|
63
63
|
|
|
64
64
|
public:
|
|
65
65
|
// Methods
|
|
66
|
-
inline void addListener(const std::function<void()>& onChanged) override {
|
|
66
|
+
inline std::function<void()> addListener(const std::function<void()>& onChanged) override {
|
|
67
67
|
auto __result = _swiftPart.addListener(onChanged);
|
|
68
68
|
if (__result.hasError()) [[unlikely]] {
|
|
69
69
|
std::rethrow_exception(__result.error());
|
|
70
70
|
}
|
|
71
|
+
auto __value = std::move(__result.value());
|
|
72
|
+
return __value;
|
|
71
73
|
}
|
|
72
74
|
inline void trigger() override {
|
|
73
75
|
auto __result = _swiftPart.trigger();
|
|
@@ -14,7 +14,7 @@ public protocol HybridViewModelBooleanPropertySpec_protocol: HybridObject, Hybri
|
|
|
14
14
|
var value: Bool { get set }
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func addListener(onChanged: @escaping (_ value: Bool) -> Void) throws -> Void
|
|
17
|
+
func addListener(onChanged: @escaping (_ value: Bool) -> Void) throws -> () -> Void
|
|
18
18
|
func removeListeners() throws -> Void
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -130,18 +130,22 @@ open class HybridViewModelBooleanPropertySpec_cxx : HybridViewModelPropertySpec_
|
|
|
130
130
|
|
|
131
131
|
// Methods
|
|
132
132
|
@inline(__always)
|
|
133
|
-
public final func addListener(onChanged: bridge.Func_void_bool) -> bridge.
|
|
133
|
+
public final func addListener(onChanged: bridge.Func_void_bool) -> bridge.Result_std__function_void____ {
|
|
134
134
|
do {
|
|
135
|
-
try self.__implementation.addListener(onChanged: { () -> (Bool) -> Void in
|
|
135
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> (Bool) -> Void in
|
|
136
136
|
let __wrappedFunction = bridge.wrap_Func_void_bool(onChanged)
|
|
137
137
|
return { (__value: Bool) -> Void in
|
|
138
138
|
__wrappedFunction.call(__value)
|
|
139
139
|
}
|
|
140
140
|
}())
|
|
141
|
-
|
|
141
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
142
|
+
let __closureWrapper = Func_void(__result)
|
|
143
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
144
|
+
}()
|
|
145
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
142
146
|
} catch (let __error) {
|
|
143
147
|
let __exceptionPtr = __error.toCpp()
|
|
144
|
-
return bridge.
|
|
148
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
|
|
@@ -14,7 +14,7 @@ public protocol HybridViewModelColorPropertySpec_protocol: HybridObject, HybridV
|
|
|
14
14
|
var value: Double { get set }
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func addListener(onChanged: @escaping (_ value: Double) -> Void) throws -> Void
|
|
17
|
+
func addListener(onChanged: @escaping (_ value: Double) -> Void) throws -> () -> Void
|
|
18
18
|
func removeListeners() throws -> Void
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -130,18 +130,22 @@ open class HybridViewModelColorPropertySpec_cxx : HybridViewModelPropertySpec_cx
|
|
|
130
130
|
|
|
131
131
|
// Methods
|
|
132
132
|
@inline(__always)
|
|
133
|
-
public final func addListener(onChanged: bridge.Func_void_double) -> bridge.
|
|
133
|
+
public final func addListener(onChanged: bridge.Func_void_double) -> bridge.Result_std__function_void____ {
|
|
134
134
|
do {
|
|
135
|
-
try self.__implementation.addListener(onChanged: { () -> (Double) -> Void in
|
|
135
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> (Double) -> Void in
|
|
136
136
|
let __wrappedFunction = bridge.wrap_Func_void_double(onChanged)
|
|
137
137
|
return { (__value: Double) -> Void in
|
|
138
138
|
__wrappedFunction.call(__value)
|
|
139
139
|
}
|
|
140
140
|
}())
|
|
141
|
-
|
|
141
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
142
|
+
let __closureWrapper = Func_void(__result)
|
|
143
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
144
|
+
}()
|
|
145
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
142
146
|
} catch (let __error) {
|
|
143
147
|
let __exceptionPtr = __error.toCpp()
|
|
144
|
-
return bridge.
|
|
148
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
|
|
@@ -14,7 +14,7 @@ public protocol HybridViewModelEnumPropertySpec_protocol: HybridObject, HybridVi
|
|
|
14
14
|
var value: String { get set }
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func addListener(onChanged: @escaping (_ value: String) -> Void) throws -> Void
|
|
17
|
+
func addListener(onChanged: @escaping (_ value: String) -> Void) throws -> () -> Void
|
|
18
18
|
func removeListeners() throws -> Void
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -130,18 +130,22 @@ open class HybridViewModelEnumPropertySpec_cxx : HybridViewModelPropertySpec_cxx
|
|
|
130
130
|
|
|
131
131
|
// Methods
|
|
132
132
|
@inline(__always)
|
|
133
|
-
public final func addListener(onChanged: bridge.Func_void_std__string) -> bridge.
|
|
133
|
+
public final func addListener(onChanged: bridge.Func_void_std__string) -> bridge.Result_std__function_void____ {
|
|
134
134
|
do {
|
|
135
|
-
try self.__implementation.addListener(onChanged: { () -> (String) -> Void in
|
|
135
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> (String) -> Void in
|
|
136
136
|
let __wrappedFunction = bridge.wrap_Func_void_std__string(onChanged)
|
|
137
137
|
return { (__value: String) -> Void in
|
|
138
138
|
__wrappedFunction.call(std.string(__value))
|
|
139
139
|
}
|
|
140
140
|
}())
|
|
141
|
-
|
|
141
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
142
|
+
let __closureWrapper = Func_void(__result)
|
|
143
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
144
|
+
}()
|
|
145
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
142
146
|
} catch (let __error) {
|
|
143
147
|
let __exceptionPtr = __error.toCpp()
|
|
144
|
-
return bridge.
|
|
148
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
|
|
@@ -15,7 +15,7 @@ public protocol HybridViewModelImagePropertySpec_protocol: HybridObject, HybridV
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
17
|
func set(image: (any HybridRiveImageSpec)?) throws -> Void
|
|
18
|
-
func addListener(onChanged: @escaping () -> Void) throws -> Void
|
|
18
|
+
func addListener(onChanged: @escaping () -> Void) throws -> () -> Void
|
|
19
19
|
func removeListeners() throws -> Void
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -143,18 +143,22 @@ open class HybridViewModelImagePropertySpec_cxx : HybridViewModelPropertySpec_cx
|
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
@inline(__always)
|
|
146
|
-
public final func addListener(onChanged: bridge.Func_void) -> bridge.
|
|
146
|
+
public final func addListener(onChanged: bridge.Func_void) -> bridge.Result_std__function_void____ {
|
|
147
147
|
do {
|
|
148
|
-
try self.__implementation.addListener(onChanged: { () -> () -> Void in
|
|
148
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> () -> Void in
|
|
149
149
|
let __wrappedFunction = bridge.wrap_Func_void(onChanged)
|
|
150
150
|
return { () -> Void in
|
|
151
151
|
__wrappedFunction.call()
|
|
152
152
|
}
|
|
153
153
|
}())
|
|
154
|
-
|
|
154
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
155
|
+
let __closureWrapper = Func_void(__result)
|
|
156
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
157
|
+
}()
|
|
158
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
155
159
|
} catch (let __error) {
|
|
156
160
|
let __exceptionPtr = __error.toCpp()
|
|
157
|
-
return bridge.
|
|
161
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
|
|
@@ -14,7 +14,7 @@ public protocol HybridViewModelNumberPropertySpec_protocol: HybridObject, Hybrid
|
|
|
14
14
|
var value: Double { get set }
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func addListener(onChanged: @escaping (_ value: Double) -> Void) throws -> Void
|
|
17
|
+
func addListener(onChanged: @escaping (_ value: Double) -> Void) throws -> () -> Void
|
|
18
18
|
func removeListeners() throws -> Void
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -130,18 +130,22 @@ open class HybridViewModelNumberPropertySpec_cxx : HybridViewModelPropertySpec_c
|
|
|
130
130
|
|
|
131
131
|
// Methods
|
|
132
132
|
@inline(__always)
|
|
133
|
-
public final func addListener(onChanged: bridge.Func_void_double) -> bridge.
|
|
133
|
+
public final func addListener(onChanged: bridge.Func_void_double) -> bridge.Result_std__function_void____ {
|
|
134
134
|
do {
|
|
135
|
-
try self.__implementation.addListener(onChanged: { () -> (Double) -> Void in
|
|
135
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> (Double) -> Void in
|
|
136
136
|
let __wrappedFunction = bridge.wrap_Func_void_double(onChanged)
|
|
137
137
|
return { (__value: Double) -> Void in
|
|
138
138
|
__wrappedFunction.call(__value)
|
|
139
139
|
}
|
|
140
140
|
}())
|
|
141
|
-
|
|
141
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
142
|
+
let __closureWrapper = Func_void(__result)
|
|
143
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
144
|
+
}()
|
|
145
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
142
146
|
} catch (let __error) {
|
|
143
147
|
let __exceptionPtr = __error.toCpp()
|
|
144
|
-
return bridge.
|
|
148
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
|
|
@@ -14,7 +14,7 @@ public protocol HybridViewModelStringPropertySpec_protocol: HybridObject, Hybrid
|
|
|
14
14
|
var value: String { get set }
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func addListener(onChanged: @escaping (_ value: String) -> Void) throws -> Void
|
|
17
|
+
func addListener(onChanged: @escaping (_ value: String) -> Void) throws -> () -> Void
|
|
18
18
|
func removeListeners() throws -> Void
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -130,18 +130,22 @@ open class HybridViewModelStringPropertySpec_cxx : HybridViewModelPropertySpec_c
|
|
|
130
130
|
|
|
131
131
|
// Methods
|
|
132
132
|
@inline(__always)
|
|
133
|
-
public final func addListener(onChanged: bridge.Func_void_std__string) -> bridge.
|
|
133
|
+
public final func addListener(onChanged: bridge.Func_void_std__string) -> bridge.Result_std__function_void____ {
|
|
134
134
|
do {
|
|
135
|
-
try self.__implementation.addListener(onChanged: { () -> (String) -> Void in
|
|
135
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> (String) -> Void in
|
|
136
136
|
let __wrappedFunction = bridge.wrap_Func_void_std__string(onChanged)
|
|
137
137
|
return { (__value: String) -> Void in
|
|
138
138
|
__wrappedFunction.call(std.string(__value))
|
|
139
139
|
}
|
|
140
140
|
}())
|
|
141
|
-
|
|
141
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
142
|
+
let __closureWrapper = Func_void(__result)
|
|
143
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
144
|
+
}()
|
|
145
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
142
146
|
} catch (let __error) {
|
|
143
147
|
let __exceptionPtr = __error.toCpp()
|
|
144
|
-
return bridge.
|
|
148
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
145
149
|
}
|
|
146
150
|
}
|
|
147
151
|
|
|
@@ -14,7 +14,7 @@ public protocol HybridViewModelTriggerPropertySpec_protocol: HybridObject, Hybri
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
// Methods
|
|
17
|
-
func addListener(onChanged: @escaping () -> Void) throws -> Void
|
|
17
|
+
func addListener(onChanged: @escaping () -> Void) throws -> () -> Void
|
|
18
18
|
func trigger() throws -> Void
|
|
19
19
|
func removeListeners() throws -> Void
|
|
20
20
|
}
|
|
@@ -121,18 +121,22 @@ open class HybridViewModelTriggerPropertySpec_cxx : HybridViewModelPropertySpec_
|
|
|
121
121
|
|
|
122
122
|
// Methods
|
|
123
123
|
@inline(__always)
|
|
124
|
-
public final func addListener(onChanged: bridge.Func_void) -> bridge.
|
|
124
|
+
public final func addListener(onChanged: bridge.Func_void) -> bridge.Result_std__function_void____ {
|
|
125
125
|
do {
|
|
126
|
-
try self.__implementation.addListener(onChanged: { () -> () -> Void in
|
|
126
|
+
let __result = try self.__implementation.addListener(onChanged: { () -> () -> Void in
|
|
127
127
|
let __wrappedFunction = bridge.wrap_Func_void(onChanged)
|
|
128
128
|
return { () -> Void in
|
|
129
129
|
__wrappedFunction.call()
|
|
130
130
|
}
|
|
131
131
|
}())
|
|
132
|
-
|
|
132
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
133
|
+
let __closureWrapper = Func_void(__result)
|
|
134
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
135
|
+
}()
|
|
136
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
133
137
|
} catch (let __error) {
|
|
134
138
|
let __exceptionPtr = __error.toCpp()
|
|
135
|
-
return bridge.
|
|
139
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
142
|
|
|
@@ -52,7 +52,7 @@ namespace margelo::nitro::rive {
|
|
|
52
52
|
|
|
53
53
|
public:
|
|
54
54
|
// Methods
|
|
55
|
-
virtual void addListener(const std::function<void(bool /* value */)>& onChanged) = 0;
|
|
55
|
+
virtual std::function<void()> addListener(const std::function<void(bool /* value */)>& onChanged) = 0;
|
|
56
56
|
virtual void removeListeners() = 0;
|
|
57
57
|
|
|
58
58
|
protected:
|
|
@@ -52,7 +52,7 @@ namespace margelo::nitro::rive {
|
|
|
52
52
|
|
|
53
53
|
public:
|
|
54
54
|
// Methods
|
|
55
|
-
virtual void addListener(const std::function<void(double /* value */)>& onChanged) = 0;
|
|
55
|
+
virtual std::function<void()> addListener(const std::function<void(double /* value */)>& onChanged) = 0;
|
|
56
56
|
virtual void removeListeners() = 0;
|
|
57
57
|
|
|
58
58
|
protected:
|
|
@@ -53,7 +53,7 @@ namespace margelo::nitro::rive {
|
|
|
53
53
|
|
|
54
54
|
public:
|
|
55
55
|
// Methods
|
|
56
|
-
virtual void addListener(const std::function<void(const std::string& /* value */)>& onChanged) = 0;
|
|
56
|
+
virtual std::function<void()> addListener(const std::function<void(const std::string& /* value */)>& onChanged) = 0;
|
|
57
57
|
virtual void removeListeners() = 0;
|
|
58
58
|
|
|
59
59
|
protected:
|
|
@@ -56,7 +56,7 @@ namespace margelo::nitro::rive {
|
|
|
56
56
|
public:
|
|
57
57
|
// Methods
|
|
58
58
|
virtual void set(const std::optional<std::shared_ptr<HybridRiveImageSpec>>& image) = 0;
|
|
59
|
-
virtual void addListener(const std::function<void()>& onChanged) = 0;
|
|
59
|
+
virtual std::function<void()> addListener(const std::function<void()>& onChanged) = 0;
|
|
60
60
|
virtual void removeListeners() = 0;
|
|
61
61
|
|
|
62
62
|
protected:
|
|
@@ -52,7 +52,7 @@ namespace margelo::nitro::rive {
|
|
|
52
52
|
|
|
53
53
|
public:
|
|
54
54
|
// Methods
|
|
55
|
-
virtual void addListener(const std::function<void(double /* value */)>& onChanged) = 0;
|
|
55
|
+
virtual std::function<void()> addListener(const std::function<void(double /* value */)>& onChanged) = 0;
|
|
56
56
|
virtual void removeListeners() = 0;
|
|
57
57
|
|
|
58
58
|
protected:
|
|
@@ -53,7 +53,7 @@ namespace margelo::nitro::rive {
|
|
|
53
53
|
|
|
54
54
|
public:
|
|
55
55
|
// Methods
|
|
56
|
-
virtual void addListener(const std::function<void(const std::string& /* value */)>& onChanged) = 0;
|
|
56
|
+
virtual std::function<void()> addListener(const std::function<void(const std::string& /* value */)>& onChanged) = 0;
|
|
57
57
|
virtual void removeListeners() = 0;
|
|
58
58
|
|
|
59
59
|
protected:
|
|
@@ -51,7 +51,7 @@ namespace margelo::nitro::rive {
|
|
|
51
51
|
|
|
52
52
|
public:
|
|
53
53
|
// Methods
|
|
54
|
-
virtual void addListener(const std::function<void()>& onChanged) = 0;
|
|
54
|
+
virtual std::function<void()> addListener(const std::function<void()>& onChanged) = 0;
|
|
55
55
|
virtual void trigger() = 0;
|
|
56
56
|
virtual void removeListeners() = 0;
|
|
57
57
|
|
package/package.json
CHANGED
|
@@ -105,6 +105,6 @@ export function useRiveProperty<P extends ViewModelProperty, T>(
|
|
|
105
105
|
interface ObservableViewModelProperty<T>
|
|
106
106
|
extends ViewModelProperty,
|
|
107
107
|
ObservableProperty {
|
|
108
|
-
addListener: (onChanged: (value: T) => void) => void;
|
|
108
|
+
addListener: (onChanged: (value: T) => void) => () => void;
|
|
109
109
|
value: T;
|
|
110
110
|
}
|