@abeman/react-native-nitro-blur 0.1.0
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/LICENSE +20 -0
- package/NitroBlur.podspec +29 -0
- package/README.md +200 -0
- package/android/CMakeLists.txt +24 -0
- package/android/build.gradle +120 -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/nitroblur/NitroBlur.kt +229 -0
- package/android/src/main/java/com/margelo/nitro/nitroblur/NitroBlurPackage.kt +31 -0
- package/android/src/main/java/com/margelo/nitro/nitroblur/NitroBlurTarget.kt +149 -0
- package/android/src/main/java/com/margelo/nitro/nitroblur/NitroBlurTargetViewGroupManager.kt +47 -0
- package/android/src/main/java/com/margelo/nitro/nitroblur/TintStyle.kt +85 -0
- package/ios/NitroBlur.swift +173 -0
- package/ios/NitroBlurTarget.swift +5 -0
- package/lib/module/NitroBlur.nitro.js +4 -0
- package/lib/module/NitroBlur.nitro.js.map +1 -0
- package/lib/module/NitroBlurTarget.nitro.js +4 -0
- package/lib/module/NitroBlurTarget.nitro.js.map +1 -0
- package/lib/module/index.js +114 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NitroBlur.nitro.d.ts +25 -0
- package/lib/typescript/src/NitroBlur.nitro.d.ts.map +1 -0
- package/lib/typescript/src/NitroBlurTarget.nitro.d.ts +7 -0
- package/lib/typescript/src/NitroBlurTarget.nitro.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +201 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/nitro.json +33 -0
- package/nitrogen/generated/android/c++/JBlurMethod.hpp +61 -0
- package/nitrogen/generated/android/c++/JBlurTint.hpp +115 -0
- package/nitrogen/generated/android/c++/JHybridNitroBlurSpec.cpp +99 -0
- package/nitrogen/generated/android/c++/JHybridNitroBlurSpec.hpp +72 -0
- package/nitrogen/generated/android/c++/JHybridNitroBlurTargetSpec.cpp +49 -0
- package/nitrogen/generated/android/c++/JHybridNitroBlurTargetSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroBlurStateUpdater.cpp +72 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroBlurStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroBlurTargetStateUpdater.cpp +53 -0
- package/nitrogen/generated/android/c++/views/JHybridNitroBlurTargetStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/BlurMethod.kt +24 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/BlurTint.kt +42 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/HybridNitroBlurSpec.kt +81 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/HybridNitroBlurTargetSpec.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/nitroblurOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/views/HybridNitroBlurManager.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/views/HybridNitroBlurStateUpdater.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/views/HybridNitroBlurTargetManager.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitroblur/views/HybridNitroBlurTargetStateUpdater.kt +23 -0
- package/nitrogen/generated/android/nitroblur+autolinking.cmake +87 -0
- package/nitrogen/generated/android/nitroblur+autolinking.gradle +27 -0
- package/nitrogen/generated/android/nitroblurOnLoad.cpp +74 -0
- package/nitrogen/generated/android/nitroblurOnLoad.hpp +34 -0
- package/nitrogen/generated/ios/NitroBlur+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroBlur-Swift-Cxx-Bridge.cpp +50 -0
- package/nitrogen/generated/ios/NitroBlur-Swift-Cxx-Bridge.hpp +57 -0
- package/nitrogen/generated/ios/NitroBlur-Swift-Cxx-Umbrella.hpp +52 -0
- package/nitrogen/generated/ios/NitroBlurAutolinking.mm +41 -0
- package/nitrogen/generated/ios/NitroBlurAutolinking.swift +38 -0
- package/nitrogen/generated/ios/c++/HybridNitroBlurSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroBlurSpecSwift.hpp +110 -0
- package/nitrogen/generated/ios/c++/HybridNitroBlurTargetSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNitroBlurTargetSpecSwift.hpp +75 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroBlurComponent.mm +142 -0
- package/nitrogen/generated/ios/c++/views/HybridNitroBlurTargetComponent.mm +118 -0
- package/nitrogen/generated/ios/swift/BlurMethod.swift +44 -0
- package/nitrogen/generated/ios/swift/BlurTint.swift +116 -0
- package/nitrogen/generated/ios/swift/HybridNitroBlurSpec.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridNitroBlurSpec_cxx.swift +200 -0
- package/nitrogen/generated/ios/swift/HybridNitroBlurTargetSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNitroBlurTargetSpec_cxx.swift +147 -0
- package/nitrogen/generated/shared/c++/BlurMethod.hpp +80 -0
- package/nitrogen/generated/shared/c++/BlurTint.hpp +152 -0
- package/nitrogen/generated/shared/c++/HybridNitroBlurSpec.cpp +30 -0
- package/nitrogen/generated/shared/c++/HybridNitroBlurSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridNitroBlurTargetSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNitroBlurTargetSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroBlurComponent.cpp +127 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroBlurComponent.hpp +116 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroBlurTargetComponent.cpp +72 -0
- package/nitrogen/generated/shared/c++/views/HybridNitroBlurTargetComponent.hpp +109 -0
- package/nitrogen/generated/shared/json/NitroBlurConfig.json +14 -0
- package/nitrogen/generated/shared/json/NitroBlurTargetConfig.json +9 -0
- package/package.json +174 -0
- package/src/NitroBlur.nitro.ts +56 -0
- package/src/NitroBlurTarget.nitro.ts +13 -0
- package/src/index.tsx +215 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroBlurSpec_cxx.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A class implementation that bridges HybridNitroBlurSpec over to C++.
|
|
12
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
13
|
+
*
|
|
14
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
15
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
16
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
17
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
18
|
+
*/
|
|
19
|
+
open class HybridNitroBlurSpec_cxx {
|
|
20
|
+
/**
|
|
21
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::nitroblur::bridge::swift`)
|
|
22
|
+
* from `NitroBlur-Swift-Cxx-Bridge.hpp`.
|
|
23
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
24
|
+
*/
|
|
25
|
+
public typealias bridge = margelo.nitro.nitroblur.bridge.swift
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Holds an instance of the `HybridNitroBlurSpec` Swift protocol.
|
|
29
|
+
*/
|
|
30
|
+
private var __implementation: any HybridNitroBlurSpec
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
34
|
+
*/
|
|
35
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridNitroBlurSpec_
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a new `HybridNitroBlurSpec_cxx` that wraps the given `HybridNitroBlurSpec`.
|
|
39
|
+
* All properties and methods bridge to C++ types.
|
|
40
|
+
*/
|
|
41
|
+
public init(_ implementation: any HybridNitroBlurSpec) {
|
|
42
|
+
self.__implementation = implementation
|
|
43
|
+
self.__cxxPart = .init()
|
|
44
|
+
/* no base class */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the actual `HybridNitroBlurSpec` instance this class wraps.
|
|
49
|
+
*/
|
|
50
|
+
@inline(__always)
|
|
51
|
+
public func getHybridNitroBlurSpec() -> any HybridNitroBlurSpec {
|
|
52
|
+
return __implementation
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
57
|
+
* This acquires one additional strong reference on the object!
|
|
58
|
+
*/
|
|
59
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
60
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Casts an unsafe pointer to a `HybridNitroBlurSpec_cxx`.
|
|
65
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridNitroBlurSpec_cxx>`.
|
|
66
|
+
* This removes one strong reference from the object!
|
|
67
|
+
*/
|
|
68
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridNitroBlurSpec_cxx {
|
|
69
|
+
return Unmanaged<HybridNitroBlurSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
74
|
+
* The C++ part is a `std::shared_ptr<HybridNitroBlurSpec>`.
|
|
75
|
+
*/
|
|
76
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridNitroBlurSpec_ {
|
|
77
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
78
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
79
|
+
return cachedCxxPart
|
|
80
|
+
} else {
|
|
81
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridNitroBlurSpec_(self.toUnsafe())
|
|
82
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridNitroBlurSpec_(newCxxPart)
|
|
83
|
+
return newCxxPart
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
91
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
92
|
+
*/
|
|
93
|
+
@inline(__always)
|
|
94
|
+
public var memorySize: Int {
|
|
95
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridNitroBlurSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Call dispose() on the Swift class.
|
|
108
|
+
* This _may_ be called manually from JS.
|
|
109
|
+
*/
|
|
110
|
+
@inline(__always)
|
|
111
|
+
public func dispose() {
|
|
112
|
+
self.__implementation.dispose()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Call toString() on the Swift class.
|
|
117
|
+
*/
|
|
118
|
+
@inline(__always)
|
|
119
|
+
public func toString() -> String {
|
|
120
|
+
return self.__implementation.toString()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Properties
|
|
124
|
+
public final var tint: Int32 {
|
|
125
|
+
@inline(__always)
|
|
126
|
+
get {
|
|
127
|
+
return self.__implementation.tint.rawValue
|
|
128
|
+
}
|
|
129
|
+
@inline(__always)
|
|
130
|
+
set {
|
|
131
|
+
self.__implementation.tint = margelo.nitro.nitroblur.BlurTint(rawValue: newValue)!
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
public final var intensity: Double {
|
|
136
|
+
@inline(__always)
|
|
137
|
+
get {
|
|
138
|
+
return self.__implementation.intensity
|
|
139
|
+
}
|
|
140
|
+
@inline(__always)
|
|
141
|
+
set {
|
|
142
|
+
self.__implementation.intensity = newValue
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
public final var blurReductionFactor: Double {
|
|
147
|
+
@inline(__always)
|
|
148
|
+
get {
|
|
149
|
+
return self.__implementation.blurReductionFactor
|
|
150
|
+
}
|
|
151
|
+
@inline(__always)
|
|
152
|
+
set {
|
|
153
|
+
self.__implementation.blurReductionFactor = newValue
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
public final var blurTargetId: Double {
|
|
158
|
+
@inline(__always)
|
|
159
|
+
get {
|
|
160
|
+
return self.__implementation.blurTargetId
|
|
161
|
+
}
|
|
162
|
+
@inline(__always)
|
|
163
|
+
set {
|
|
164
|
+
self.__implementation.blurTargetId = newValue
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
public final var blurMethod: Int32 {
|
|
169
|
+
@inline(__always)
|
|
170
|
+
get {
|
|
171
|
+
return self.__implementation.blurMethod.rawValue
|
|
172
|
+
}
|
|
173
|
+
@inline(__always)
|
|
174
|
+
set {
|
|
175
|
+
self.__implementation.blurMethod = margelo.nitro.nitroblur.BlurMethod(rawValue: newValue)!
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Methods
|
|
180
|
+
public final func getView() -> UnsafeMutableRawPointer {
|
|
181
|
+
return Unmanaged.passRetained(__implementation.view).toOpaque()
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
public final func beforeUpdate() {
|
|
185
|
+
__implementation.beforeUpdate()
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
public final func afterUpdate() {
|
|
189
|
+
__implementation.afterUpdate()
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
public final func maybePrepareForRecycle() {
|
|
193
|
+
guard let recyclable = __implementation as? any RecyclableView else { return }
|
|
194
|
+
recyclable.prepareForRecycle()
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
public final func onDropView() {
|
|
198
|
+
__implementation.onDropView()
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroBlurTargetSpec.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/// See ``HybridNitroBlurTargetSpec``
|
|
11
|
+
public protocol HybridNitroBlurTargetSpec_protocol: HybridObject, HybridView {
|
|
12
|
+
// Properties
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// Methods
|
|
16
|
+
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public extension HybridNitroBlurTargetSpec_protocol {
|
|
20
|
+
/// Default implementation of ``HybridObject.toString``
|
|
21
|
+
func toString() -> String {
|
|
22
|
+
return "[HybridObject NitroBlurTarget]"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// See ``HybridNitroBlurTargetSpec``
|
|
27
|
+
open class HybridNitroBlurTargetSpec_base {
|
|
28
|
+
private weak var cxxWrapper: HybridNitroBlurTargetSpec_cxx? = nil
|
|
29
|
+
public init() { }
|
|
30
|
+
public func getCxxWrapper() -> HybridNitroBlurTargetSpec_cxx {
|
|
31
|
+
#if DEBUG
|
|
32
|
+
guard self is any HybridNitroBlurTargetSpec else {
|
|
33
|
+
fatalError("`self` is not a `HybridNitroBlurTargetSpec`! Did you accidentally inherit from `HybridNitroBlurTargetSpec_base` instead of `HybridNitroBlurTargetSpec`?")
|
|
34
|
+
}
|
|
35
|
+
#endif
|
|
36
|
+
if let cxxWrapper = self.cxxWrapper {
|
|
37
|
+
return cxxWrapper
|
|
38
|
+
} else {
|
|
39
|
+
let cxxWrapper = HybridNitroBlurTargetSpec_cxx(self as! any HybridNitroBlurTargetSpec)
|
|
40
|
+
self.cxxWrapper = cxxWrapper
|
|
41
|
+
return cxxWrapper
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* A Swift base-protocol representing the NitroBlurTarget HybridObject.
|
|
48
|
+
* Implement this protocol to create Swift-based instances of NitroBlurTarget.
|
|
49
|
+
* ```swift
|
|
50
|
+
* class HybridNitroBlurTarget : HybridNitroBlurTargetSpec {
|
|
51
|
+
* // ...
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
public typealias HybridNitroBlurTargetSpec = HybridNitroBlurTargetSpec_protocol & HybridNitroBlurTargetSpec_base
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroBlurTargetSpec_cxx.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* A class implementation that bridges HybridNitroBlurTargetSpec over to C++.
|
|
12
|
+
* In C++, we cannot use Swift protocols - so we need to wrap it in a class to make it strongly defined.
|
|
13
|
+
*
|
|
14
|
+
* Also, some Swift types need to be bridged with special handling:
|
|
15
|
+
* - Enums need to be wrapped in Structs, otherwise they cannot be accessed bi-directionally (Swift bug: https://github.com/swiftlang/swift/issues/75330)
|
|
16
|
+
* - Other HybridObjects need to be wrapped/unwrapped from the Swift TCxx wrapper
|
|
17
|
+
* - Throwing methods need to be wrapped with a Result<T, Error> type, as exceptions cannot be propagated to C++
|
|
18
|
+
*/
|
|
19
|
+
open class HybridNitroBlurTargetSpec_cxx {
|
|
20
|
+
/**
|
|
21
|
+
* The Swift <> C++ bridge's namespace (`margelo::nitro::nitroblur::bridge::swift`)
|
|
22
|
+
* from `NitroBlur-Swift-Cxx-Bridge.hpp`.
|
|
23
|
+
* This contains specialized C++ templates, and C++ helper functions that can be accessed from Swift.
|
|
24
|
+
*/
|
|
25
|
+
public typealias bridge = margelo.nitro.nitroblur.bridge.swift
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Holds an instance of the `HybridNitroBlurTargetSpec` Swift protocol.
|
|
29
|
+
*/
|
|
30
|
+
private var __implementation: any HybridNitroBlurTargetSpec
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Holds a weak pointer to the C++ class that wraps the Swift class.
|
|
34
|
+
*/
|
|
35
|
+
private var __cxxPart: bridge.std__weak_ptr_HybridNitroBlurTargetSpec_
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Create a new `HybridNitroBlurTargetSpec_cxx` that wraps the given `HybridNitroBlurTargetSpec`.
|
|
39
|
+
* All properties and methods bridge to C++ types.
|
|
40
|
+
*/
|
|
41
|
+
public init(_ implementation: any HybridNitroBlurTargetSpec) {
|
|
42
|
+
self.__implementation = implementation
|
|
43
|
+
self.__cxxPart = .init()
|
|
44
|
+
/* no base class */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get the actual `HybridNitroBlurTargetSpec` instance this class wraps.
|
|
49
|
+
*/
|
|
50
|
+
@inline(__always)
|
|
51
|
+
public func getHybridNitroBlurTargetSpec() -> any HybridNitroBlurTargetSpec {
|
|
52
|
+
return __implementation
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Casts this instance to a retained unsafe raw pointer.
|
|
57
|
+
* This acquires one additional strong reference on the object!
|
|
58
|
+
*/
|
|
59
|
+
public func toUnsafe() -> UnsafeMutableRawPointer {
|
|
60
|
+
return Unmanaged.passRetained(self).toOpaque()
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Casts an unsafe pointer to a `HybridNitroBlurTargetSpec_cxx`.
|
|
65
|
+
* The pointer has to be a retained opaque `Unmanaged<HybridNitroBlurTargetSpec_cxx>`.
|
|
66
|
+
* This removes one strong reference from the object!
|
|
67
|
+
*/
|
|
68
|
+
public class func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> HybridNitroBlurTargetSpec_cxx {
|
|
69
|
+
return Unmanaged<HybridNitroBlurTargetSpec_cxx>.fromOpaque(pointer).takeRetainedValue()
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Gets (or creates) the C++ part of this Hybrid Object.
|
|
74
|
+
* The C++ part is a `std::shared_ptr<HybridNitroBlurTargetSpec>`.
|
|
75
|
+
*/
|
|
76
|
+
public func getCxxPart() -> bridge.std__shared_ptr_HybridNitroBlurTargetSpec_ {
|
|
77
|
+
let cachedCxxPart = self.__cxxPart.lock()
|
|
78
|
+
if Bool(fromCxx: cachedCxxPart) {
|
|
79
|
+
return cachedCxxPart
|
|
80
|
+
} else {
|
|
81
|
+
let newCxxPart = bridge.create_std__shared_ptr_HybridNitroBlurTargetSpec_(self.toUnsafe())
|
|
82
|
+
__cxxPart = bridge.weakify_std__shared_ptr_HybridNitroBlurTargetSpec_(newCxxPart)
|
|
83
|
+
return newCxxPart
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Get the memory size of the Swift class (plus size of any other allocations)
|
|
91
|
+
* so the JS VM can properly track it and garbage-collect the JS object if needed.
|
|
92
|
+
*/
|
|
93
|
+
@inline(__always)
|
|
94
|
+
public var memorySize: Int {
|
|
95
|
+
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridNitroBlurTargetSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Call dispose() on the Swift class.
|
|
108
|
+
* This _may_ be called manually from JS.
|
|
109
|
+
*/
|
|
110
|
+
@inline(__always)
|
|
111
|
+
public func dispose() {
|
|
112
|
+
self.__implementation.dispose()
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Call toString() on the Swift class.
|
|
117
|
+
*/
|
|
118
|
+
@inline(__always)
|
|
119
|
+
public func toString() -> String {
|
|
120
|
+
return self.__implementation.toString()
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// Properties
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
// Methods
|
|
127
|
+
public final func getView() -> UnsafeMutableRawPointer {
|
|
128
|
+
return Unmanaged.passRetained(__implementation.view).toOpaque()
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
public final func beforeUpdate() {
|
|
132
|
+
__implementation.beforeUpdate()
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
public final func afterUpdate() {
|
|
136
|
+
__implementation.afterUpdate()
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
public final func maybePrepareForRecycle() {
|
|
140
|
+
guard let recyclable = __implementation as? any RecyclableView else { return }
|
|
141
|
+
recyclable.prepareForRecycle()
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
public final func onDropView() {
|
|
145
|
+
__implementation.onDropView()
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BlurMethod.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroblur {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (BlurMethod).
|
|
30
|
+
*/
|
|
31
|
+
enum class BlurMethod {
|
|
32
|
+
NONE SWIFT_NAME(none) = 0,
|
|
33
|
+
DIMEZISBLURVIEW SWIFT_NAME(dimezisblurview) = 1,
|
|
34
|
+
DIMEZISBLURVIEWSDK31PLUS SWIFT_NAME(dimezisblurviewsdk31plus) = 2,
|
|
35
|
+
} CLOSED_ENUM;
|
|
36
|
+
|
|
37
|
+
} // namespace margelo::nitro::nitroblur
|
|
38
|
+
|
|
39
|
+
namespace margelo::nitro {
|
|
40
|
+
|
|
41
|
+
// C++ BlurMethod <> JS BlurMethod (union)
|
|
42
|
+
template <>
|
|
43
|
+
struct JSIConverter<margelo::nitro::nitroblur::BlurMethod> final {
|
|
44
|
+
static inline margelo::nitro::nitroblur::BlurMethod fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
45
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
46
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
47
|
+
case hashString("none"): return margelo::nitro::nitroblur::BlurMethod::NONE;
|
|
48
|
+
case hashString("dimezisBlurView"): return margelo::nitro::nitroblur::BlurMethod::DIMEZISBLURVIEW;
|
|
49
|
+
case hashString("dimezisBlurViewSdk31Plus"): return margelo::nitro::nitroblur::BlurMethod::DIMEZISBLURVIEWSDK31PLUS;
|
|
50
|
+
default: [[unlikely]]
|
|
51
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum BlurMethod - invalid value!");
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroblur::BlurMethod arg) {
|
|
55
|
+
switch (arg) {
|
|
56
|
+
case margelo::nitro::nitroblur::BlurMethod::NONE: return JSIConverter<std::string>::toJSI(runtime, "none");
|
|
57
|
+
case margelo::nitro::nitroblur::BlurMethod::DIMEZISBLURVIEW: return JSIConverter<std::string>::toJSI(runtime, "dimezisBlurView");
|
|
58
|
+
case margelo::nitro::nitroblur::BlurMethod::DIMEZISBLURVIEWSDK31PLUS: return JSIConverter<std::string>::toJSI(runtime, "dimezisBlurViewSdk31Plus");
|
|
59
|
+
default: [[unlikely]]
|
|
60
|
+
throw std::invalid_argument("Cannot convert BlurMethod to JS - invalid value: "
|
|
61
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
65
|
+
if (!value.isString()) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
69
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
70
|
+
case hashString("none"):
|
|
71
|
+
case hashString("dimezisBlurView"):
|
|
72
|
+
case hashString("dimezisBlurViewSdk31Plus"):
|
|
73
|
+
return true;
|
|
74
|
+
default:
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// BlurTint.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/NitroHash.hpp>)
|
|
11
|
+
#include <NitroModules/NitroHash.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
16
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
21
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
namespace margelo::nitro::nitroblur {
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* An enum which can be represented as a JavaScript union (BlurTint).
|
|
30
|
+
*/
|
|
31
|
+
enum class BlurTint {
|
|
32
|
+
LIGHT SWIFT_NAME(light) = 0,
|
|
33
|
+
DARK SWIFT_NAME(dark) = 1,
|
|
34
|
+
DEFAULT SWIFT_NAME(default) = 2,
|
|
35
|
+
EXTRALIGHT SWIFT_NAME(extralight) = 3,
|
|
36
|
+
REGULAR SWIFT_NAME(regular) = 4,
|
|
37
|
+
PROMINENT SWIFT_NAME(prominent) = 5,
|
|
38
|
+
SYSTEMULTRATHINMATERIAL SWIFT_NAME(systemultrathinmaterial) = 6,
|
|
39
|
+
SYSTEMTHINMATERIAL SWIFT_NAME(systemthinmaterial) = 7,
|
|
40
|
+
SYSTEMMATERIAL SWIFT_NAME(systemmaterial) = 8,
|
|
41
|
+
SYSTEMTHICKMATERIAL SWIFT_NAME(systemthickmaterial) = 9,
|
|
42
|
+
SYSTEMCHROMEMATERIAL SWIFT_NAME(systemchromematerial) = 10,
|
|
43
|
+
SYSTEMULTRATHINMATERIALLIGHT SWIFT_NAME(systemultrathinmateriallight) = 11,
|
|
44
|
+
SYSTEMTHINMATERIALLIGHT SWIFT_NAME(systemthinmateriallight) = 12,
|
|
45
|
+
SYSTEMMATERIALLIGHT SWIFT_NAME(systemmateriallight) = 13,
|
|
46
|
+
SYSTEMTHICKMATERIALLIGHT SWIFT_NAME(systemthickmateriallight) = 14,
|
|
47
|
+
SYSTEMCHROMEMATERIALLIGHT SWIFT_NAME(systemchromemateriallight) = 15,
|
|
48
|
+
SYSTEMULTRATHINMATERIALDARK SWIFT_NAME(systemultrathinmaterialdark) = 16,
|
|
49
|
+
SYSTEMTHINMATERIALDARK SWIFT_NAME(systemthinmaterialdark) = 17,
|
|
50
|
+
SYSTEMMATERIALDARK SWIFT_NAME(systemmaterialdark) = 18,
|
|
51
|
+
SYSTEMTHICKMATERIALDARK SWIFT_NAME(systemthickmaterialdark) = 19,
|
|
52
|
+
SYSTEMCHROMEMATERIALDARK SWIFT_NAME(systemchromematerialdark) = 20,
|
|
53
|
+
} CLOSED_ENUM;
|
|
54
|
+
|
|
55
|
+
} // namespace margelo::nitro::nitroblur
|
|
56
|
+
|
|
57
|
+
namespace margelo::nitro {
|
|
58
|
+
|
|
59
|
+
// C++ BlurTint <> JS BlurTint (union)
|
|
60
|
+
template <>
|
|
61
|
+
struct JSIConverter<margelo::nitro::nitroblur::BlurTint> final {
|
|
62
|
+
static inline margelo::nitro::nitroblur::BlurTint fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, arg);
|
|
64
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
65
|
+
case hashString("light"): return margelo::nitro::nitroblur::BlurTint::LIGHT;
|
|
66
|
+
case hashString("dark"): return margelo::nitro::nitroblur::BlurTint::DARK;
|
|
67
|
+
case hashString("default"): return margelo::nitro::nitroblur::BlurTint::DEFAULT;
|
|
68
|
+
case hashString("extraLight"): return margelo::nitro::nitroblur::BlurTint::EXTRALIGHT;
|
|
69
|
+
case hashString("regular"): return margelo::nitro::nitroblur::BlurTint::REGULAR;
|
|
70
|
+
case hashString("prominent"): return margelo::nitro::nitroblur::BlurTint::PROMINENT;
|
|
71
|
+
case hashString("systemUltraThinMaterial"): return margelo::nitro::nitroblur::BlurTint::SYSTEMULTRATHINMATERIAL;
|
|
72
|
+
case hashString("systemThinMaterial"): return margelo::nitro::nitroblur::BlurTint::SYSTEMTHINMATERIAL;
|
|
73
|
+
case hashString("systemMaterial"): return margelo::nitro::nitroblur::BlurTint::SYSTEMMATERIAL;
|
|
74
|
+
case hashString("systemThickMaterial"): return margelo::nitro::nitroblur::BlurTint::SYSTEMTHICKMATERIAL;
|
|
75
|
+
case hashString("systemChromeMaterial"): return margelo::nitro::nitroblur::BlurTint::SYSTEMCHROMEMATERIAL;
|
|
76
|
+
case hashString("systemUltraThinMaterialLight"): return margelo::nitro::nitroblur::BlurTint::SYSTEMULTRATHINMATERIALLIGHT;
|
|
77
|
+
case hashString("systemThinMaterialLight"): return margelo::nitro::nitroblur::BlurTint::SYSTEMTHINMATERIALLIGHT;
|
|
78
|
+
case hashString("systemMaterialLight"): return margelo::nitro::nitroblur::BlurTint::SYSTEMMATERIALLIGHT;
|
|
79
|
+
case hashString("systemThickMaterialLight"): return margelo::nitro::nitroblur::BlurTint::SYSTEMTHICKMATERIALLIGHT;
|
|
80
|
+
case hashString("systemChromeMaterialLight"): return margelo::nitro::nitroblur::BlurTint::SYSTEMCHROMEMATERIALLIGHT;
|
|
81
|
+
case hashString("systemUltraThinMaterialDark"): return margelo::nitro::nitroblur::BlurTint::SYSTEMULTRATHINMATERIALDARK;
|
|
82
|
+
case hashString("systemThinMaterialDark"): return margelo::nitro::nitroblur::BlurTint::SYSTEMTHINMATERIALDARK;
|
|
83
|
+
case hashString("systemMaterialDark"): return margelo::nitro::nitroblur::BlurTint::SYSTEMMATERIALDARK;
|
|
84
|
+
case hashString("systemThickMaterialDark"): return margelo::nitro::nitroblur::BlurTint::SYSTEMTHICKMATERIALDARK;
|
|
85
|
+
case hashString("systemChromeMaterialDark"): return margelo::nitro::nitroblur::BlurTint::SYSTEMCHROMEMATERIALDARK;
|
|
86
|
+
default: [[unlikely]]
|
|
87
|
+
throw std::invalid_argument("Cannot convert \"" + unionValue + "\" to enum BlurTint - invalid value!");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, margelo::nitro::nitroblur::BlurTint arg) {
|
|
91
|
+
switch (arg) {
|
|
92
|
+
case margelo::nitro::nitroblur::BlurTint::LIGHT: return JSIConverter<std::string>::toJSI(runtime, "light");
|
|
93
|
+
case margelo::nitro::nitroblur::BlurTint::DARK: return JSIConverter<std::string>::toJSI(runtime, "dark");
|
|
94
|
+
case margelo::nitro::nitroblur::BlurTint::DEFAULT: return JSIConverter<std::string>::toJSI(runtime, "default");
|
|
95
|
+
case margelo::nitro::nitroblur::BlurTint::EXTRALIGHT: return JSIConverter<std::string>::toJSI(runtime, "extraLight");
|
|
96
|
+
case margelo::nitro::nitroblur::BlurTint::REGULAR: return JSIConverter<std::string>::toJSI(runtime, "regular");
|
|
97
|
+
case margelo::nitro::nitroblur::BlurTint::PROMINENT: return JSIConverter<std::string>::toJSI(runtime, "prominent");
|
|
98
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMULTRATHINMATERIAL: return JSIConverter<std::string>::toJSI(runtime, "systemUltraThinMaterial");
|
|
99
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMTHINMATERIAL: return JSIConverter<std::string>::toJSI(runtime, "systemThinMaterial");
|
|
100
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMMATERIAL: return JSIConverter<std::string>::toJSI(runtime, "systemMaterial");
|
|
101
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMTHICKMATERIAL: return JSIConverter<std::string>::toJSI(runtime, "systemThickMaterial");
|
|
102
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMCHROMEMATERIAL: return JSIConverter<std::string>::toJSI(runtime, "systemChromeMaterial");
|
|
103
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMULTRATHINMATERIALLIGHT: return JSIConverter<std::string>::toJSI(runtime, "systemUltraThinMaterialLight");
|
|
104
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMTHINMATERIALLIGHT: return JSIConverter<std::string>::toJSI(runtime, "systemThinMaterialLight");
|
|
105
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMMATERIALLIGHT: return JSIConverter<std::string>::toJSI(runtime, "systemMaterialLight");
|
|
106
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMTHICKMATERIALLIGHT: return JSIConverter<std::string>::toJSI(runtime, "systemThickMaterialLight");
|
|
107
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMCHROMEMATERIALLIGHT: return JSIConverter<std::string>::toJSI(runtime, "systemChromeMaterialLight");
|
|
108
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMULTRATHINMATERIALDARK: return JSIConverter<std::string>::toJSI(runtime, "systemUltraThinMaterialDark");
|
|
109
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMTHINMATERIALDARK: return JSIConverter<std::string>::toJSI(runtime, "systemThinMaterialDark");
|
|
110
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMMATERIALDARK: return JSIConverter<std::string>::toJSI(runtime, "systemMaterialDark");
|
|
111
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMTHICKMATERIALDARK: return JSIConverter<std::string>::toJSI(runtime, "systemThickMaterialDark");
|
|
112
|
+
case margelo::nitro::nitroblur::BlurTint::SYSTEMCHROMEMATERIALDARK: return JSIConverter<std::string>::toJSI(runtime, "systemChromeMaterialDark");
|
|
113
|
+
default: [[unlikely]]
|
|
114
|
+
throw std::invalid_argument("Cannot convert BlurTint to JS - invalid value: "
|
|
115
|
+
+ std::to_string(static_cast<int>(arg)) + "!");
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
119
|
+
if (!value.isString()) {
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
std::string unionValue = JSIConverter<std::string>::fromJSI(runtime, value);
|
|
123
|
+
switch (hashString(unionValue.c_str(), unionValue.size())) {
|
|
124
|
+
case hashString("light"):
|
|
125
|
+
case hashString("dark"):
|
|
126
|
+
case hashString("default"):
|
|
127
|
+
case hashString("extraLight"):
|
|
128
|
+
case hashString("regular"):
|
|
129
|
+
case hashString("prominent"):
|
|
130
|
+
case hashString("systemUltraThinMaterial"):
|
|
131
|
+
case hashString("systemThinMaterial"):
|
|
132
|
+
case hashString("systemMaterial"):
|
|
133
|
+
case hashString("systemThickMaterial"):
|
|
134
|
+
case hashString("systemChromeMaterial"):
|
|
135
|
+
case hashString("systemUltraThinMaterialLight"):
|
|
136
|
+
case hashString("systemThinMaterialLight"):
|
|
137
|
+
case hashString("systemMaterialLight"):
|
|
138
|
+
case hashString("systemThickMaterialLight"):
|
|
139
|
+
case hashString("systemChromeMaterialLight"):
|
|
140
|
+
case hashString("systemUltraThinMaterialDark"):
|
|
141
|
+
case hashString("systemThinMaterialDark"):
|
|
142
|
+
case hashString("systemMaterialDark"):
|
|
143
|
+
case hashString("systemThickMaterialDark"):
|
|
144
|
+
case hashString("systemChromeMaterialDark"):
|
|
145
|
+
return true;
|
|
146
|
+
default:
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNitroBlurSpec.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "HybridNitroBlurSpec.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::nitroblur {
|
|
11
|
+
|
|
12
|
+
void HybridNitroBlurSpec::loadHybridMethods() {
|
|
13
|
+
// load base methods/properties
|
|
14
|
+
HybridObject::loadHybridMethods();
|
|
15
|
+
// load custom methods/properties
|
|
16
|
+
registerHybrids(this, [](Prototype& prototype) {
|
|
17
|
+
prototype.registerHybridGetter("tint", &HybridNitroBlurSpec::getTint);
|
|
18
|
+
prototype.registerHybridSetter("tint", &HybridNitroBlurSpec::setTint);
|
|
19
|
+
prototype.registerHybridGetter("intensity", &HybridNitroBlurSpec::getIntensity);
|
|
20
|
+
prototype.registerHybridSetter("intensity", &HybridNitroBlurSpec::setIntensity);
|
|
21
|
+
prototype.registerHybridGetter("blurReductionFactor", &HybridNitroBlurSpec::getBlurReductionFactor);
|
|
22
|
+
prototype.registerHybridSetter("blurReductionFactor", &HybridNitroBlurSpec::setBlurReductionFactor);
|
|
23
|
+
prototype.registerHybridGetter("blurTargetId", &HybridNitroBlurSpec::getBlurTargetId);
|
|
24
|
+
prototype.registerHybridSetter("blurTargetId", &HybridNitroBlurSpec::setBlurTargetId);
|
|
25
|
+
prototype.registerHybridGetter("blurMethod", &HybridNitroBlurSpec::getBlurMethod);
|
|
26
|
+
prototype.registerHybridSetter("blurMethod", &HybridNitroBlurSpec::setBlurMethod);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
} // namespace margelo::nitro::nitroblur
|