@nitro-mlkit/digital-ink 0.1.0-beta.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 +21 -0
- package/NitroMLKitDigitalInk.podspec +34 -0
- package/README.md +67 -0
- package/android/CMakeLists.txt +12 -0
- package/android/build.gradle +77 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +9 -0
- package/android/src/main/kotlin/com/margelo/nitro/nitromlkit/digitalink/HybridDigitalInkRecognizer.kt +84 -0
- package/android/src/main/kotlin/com/nitromlkit/digitalink/NitroMLKitDigitalInkPackage.kt +19 -0
- package/expo-module.config.json +9 -0
- package/ios/HybridDigitalInkRecognizer.swift +156 -0
- package/nitro.json +16 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroMLKitDigitalInk+autolinking.cmake +81 -0
- package/nitrogen/generated/android/NitroMLKitDigitalInk+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroMLKitDigitalInkOnLoad.cpp +54 -0
- package/nitrogen/generated/android/NitroMLKitDigitalInkOnLoad.hpp +34 -0
- package/nitrogen/generated/android/c++/JHybridDigitalInkRecognizerSpec.cpp +149 -0
- package/nitrogen/generated/android/c++/JHybridDigitalInkRecognizerSpec.hpp +67 -0
- package/nitrogen/generated/android/c++/JInkPoint.hpp +65 -0
- package/nitrogen/generated/android/c++/JInkStroke.hpp +78 -0
- package/nitrogen/generated/android/c++/JRecognitionCandidate.hpp +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromlkit/digitalink/HybridDigitalInkRecognizerSpec.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromlkit/digitalink/InkPoint.kt +61 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromlkit/digitalink/InkStroke.kt +51 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromlkit/digitalink/NitroMLKitDigitalInkOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromlkit/digitalink/RecognitionCandidate.kt +56 -0
- package/nitrogen/generated/ios/NitroMLKitDigitalInk+autolinking.rb +62 -0
- package/nitrogen/generated/ios/NitroMLKitDigitalInk-Swift-Cxx-Bridge.cpp +65 -0
- package/nitrogen/generated/ios/NitroMLKitDigitalInk-Swift-Cxx-Bridge.hpp +265 -0
- package/nitrogen/generated/ios/NitroMLKitDigitalInk-Swift-Cxx-Umbrella.hpp +56 -0
- package/nitrogen/generated/ios/NitroMLKitDigitalInkAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroMLKitDigitalInkAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridDigitalInkRecognizerSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridDigitalInkRecognizerSpecSwift.hpp +125 -0
- package/nitrogen/generated/ios/swift/Func_void.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +46 -0
- package/nitrogen/generated/ios/swift/Func_void_std__vector_RecognitionCandidate_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridDigitalInkRecognizerSpec.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridDigitalInkRecognizerSpec_cxx.swift +220 -0
- package/nitrogen/generated/ios/swift/InkPoint.swift +52 -0
- package/nitrogen/generated/ios/swift/InkStroke.swift +35 -0
- package/nitrogen/generated/ios/swift/RecognitionCandidate.swift +47 -0
- package/nitrogen/generated/shared/c++/HybridDigitalInkRecognizerSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridDigitalInkRecognizerSpec.hpp +73 -0
- package/nitrogen/generated/shared/c++/InkPoint.hpp +91 -0
- package/nitrogen/generated/shared/c++/InkStroke.hpp +85 -0
- package/nitrogen/generated/shared/c++/RecognitionCandidate.hpp +88 -0
- package/package.json +54 -0
- package/src/index.ts +19 -0
- package/src/specs/DigitalInkRecognizer.nitro.ts +51 -0
package/nitrogen/generated/android/kotlin/com/margelo/nitro/nitromlkit/digitalink/InkStroke.kt
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// InkStroke.kt
|
|
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
|
+
package com.margelo.nitro.nitromlkit.digitalink
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "InkStroke".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class InkStroke(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val points: Array<InkPoint>
|
|
24
|
+
) {
|
|
25
|
+
/* primary constructor */
|
|
26
|
+
|
|
27
|
+
override fun equals(other: Any?): Boolean {
|
|
28
|
+
if (this === other) return true
|
|
29
|
+
if (other !is InkStroke) return false
|
|
30
|
+
return Objects.deepEquals(this.points, other.points)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
override fun hashCode(): Int {
|
|
34
|
+
return arrayOf<Any?>(
|
|
35
|
+
points
|
|
36
|
+
).contentDeepHashCode()
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
companion object {
|
|
40
|
+
/**
|
|
41
|
+
* Constructor called from C++
|
|
42
|
+
*/
|
|
43
|
+
@DoNotStrip
|
|
44
|
+
@Keep
|
|
45
|
+
@Suppress("unused")
|
|
46
|
+
@JvmStatic
|
|
47
|
+
private fun fromCpp(points: Array<InkPoint>): InkStroke {
|
|
48
|
+
return InkStroke(points)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroMLKitDigitalInkOnLoad.kt
|
|
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
|
+
package com.margelo.nitro.nitromlkit.digitalink
|
|
9
|
+
|
|
10
|
+
import android.util.Log
|
|
11
|
+
|
|
12
|
+
internal class NitroMLKitDigitalInkOnLoad {
|
|
13
|
+
companion object {
|
|
14
|
+
private const val TAG = "NitroMLKitDigitalInkOnLoad"
|
|
15
|
+
private var didLoad = false
|
|
16
|
+
/**
|
|
17
|
+
* Initializes the native part of "NitroMLKitDigitalInk".
|
|
18
|
+
* This method is idempotent and can be called more than once.
|
|
19
|
+
*/
|
|
20
|
+
@JvmStatic
|
|
21
|
+
fun initializeNative() {
|
|
22
|
+
if (didLoad) return
|
|
23
|
+
try {
|
|
24
|
+
Log.i(TAG, "Loading NitroMLKitDigitalInk C++ library...")
|
|
25
|
+
System.loadLibrary("NitroMLKitDigitalInk")
|
|
26
|
+
Log.i(TAG, "Successfully loaded NitroMLKitDigitalInk C++ library!")
|
|
27
|
+
didLoad = true
|
|
28
|
+
} catch (e: Error) {
|
|
29
|
+
Log.e(TAG, "Failed to load NitroMLKitDigitalInk C++ library! Is it properly installed and linked? " +
|
|
30
|
+
"Is the name correct? (see `CMakeLists.txt`, at `add_library(...)`)", e)
|
|
31
|
+
throw e
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// RecognitionCandidate.kt
|
|
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
|
+
package com.margelo.nitro.nitromlkit.digitalink
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
import java.util.Objects
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Represents the JavaScript object/struct "RecognitionCandidate".
|
|
17
|
+
*/
|
|
18
|
+
@DoNotStrip
|
|
19
|
+
@Keep
|
|
20
|
+
data class RecognitionCandidate(
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
val text: String,
|
|
24
|
+
@DoNotStrip
|
|
25
|
+
@Keep
|
|
26
|
+
val score: Double?
|
|
27
|
+
) {
|
|
28
|
+
/* primary constructor */
|
|
29
|
+
|
|
30
|
+
override fun equals(other: Any?): Boolean {
|
|
31
|
+
if (this === other) return true
|
|
32
|
+
if (other !is RecognitionCandidate) return false
|
|
33
|
+
return Objects.deepEquals(this.text, other.text)
|
|
34
|
+
&& Objects.deepEquals(this.score, other.score)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override fun hashCode(): Int {
|
|
38
|
+
return arrayOf<Any?>(
|
|
39
|
+
text,
|
|
40
|
+
score
|
|
41
|
+
).contentDeepHashCode()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
companion object {
|
|
45
|
+
/**
|
|
46
|
+
* Constructor called from C++
|
|
47
|
+
*/
|
|
48
|
+
@DoNotStrip
|
|
49
|
+
@Keep
|
|
50
|
+
@Suppress("unused")
|
|
51
|
+
@JvmStatic
|
|
52
|
+
private fun fromCpp(text: String, score: Double?): RecognitionCandidate {
|
|
53
|
+
return RecognitionCandidate(text, score)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
#
|
|
2
|
+
# NitroMLKitDigitalInk+autolinking.rb
|
|
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
|
+
# This is a Ruby script that adds all files generated by Nitrogen
|
|
9
|
+
# to the given podspec.
|
|
10
|
+
#
|
|
11
|
+
# To use it, add this to your .podspec:
|
|
12
|
+
# ```ruby
|
|
13
|
+
# Pod::Spec.new do |spec|
|
|
14
|
+
# # ...
|
|
15
|
+
#
|
|
16
|
+
# # Add all files generated by Nitrogen
|
|
17
|
+
# load 'nitrogen/generated/ios/NitroMLKitDigitalInk+autolinking.rb'
|
|
18
|
+
# add_nitrogen_files(spec)
|
|
19
|
+
# end
|
|
20
|
+
# ```
|
|
21
|
+
|
|
22
|
+
def add_nitrogen_files(spec)
|
|
23
|
+
Pod::UI.puts "[NitroModules] 🔥 NitroMLKitDigitalInk is boosted by nitro!"
|
|
24
|
+
|
|
25
|
+
spec.dependency "NitroModules"
|
|
26
|
+
|
|
27
|
+
current_source_files = Array(spec.attributes_hash['source_files'])
|
|
28
|
+
spec.source_files = current_source_files + [
|
|
29
|
+
# Generated cross-platform specs
|
|
30
|
+
"nitrogen/generated/shared/**/*.{h,hpp,c,cpp,swift}",
|
|
31
|
+
# Generated bridges for the cross-platform specs
|
|
32
|
+
"nitrogen/generated/ios/**/*.{h,hpp,c,cpp,mm,swift}",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
current_public_header_files = Array(spec.attributes_hash['public_header_files'])
|
|
36
|
+
spec.public_header_files = current_public_header_files + [
|
|
37
|
+
# Generated specs
|
|
38
|
+
"nitrogen/generated/shared/**/*.{h,hpp}",
|
|
39
|
+
# Swift to C++ bridging helpers
|
|
40
|
+
"nitrogen/generated/ios/NitroMLKitDigitalInk-Swift-Cxx-Bridge.hpp"
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
current_private_header_files = Array(spec.attributes_hash['private_header_files'])
|
|
44
|
+
spec.private_header_files = current_private_header_files + [
|
|
45
|
+
# iOS specific specs
|
|
46
|
+
"nitrogen/generated/ios/c++/**/*.{h,hpp}",
|
|
47
|
+
# Views are framework-specific and should be private
|
|
48
|
+
"nitrogen/generated/shared/**/views/**/*"
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
current_pod_target_xcconfig = spec.attributes_hash['pod_target_xcconfig'] || {}
|
|
52
|
+
spec.pod_target_xcconfig = current_pod_target_xcconfig.merge({
|
|
53
|
+
# Use C++ 20
|
|
54
|
+
"CLANG_CXX_LANGUAGE_STANDARD" => "c++20",
|
|
55
|
+
# Enables C++ <-> Swift interop (by default it's only ObjC)
|
|
56
|
+
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
57
|
+
# Enables stricter modular headers
|
|
58
|
+
"DEFINES_MODULE" => "YES",
|
|
59
|
+
# Disable auto-generated ObjC header for Swift (Static linkage on Xcode 26.4 breaks here)
|
|
60
|
+
"SWIFT_INSTALL_OBJC_HEADER" => "NO",
|
|
61
|
+
})
|
|
62
|
+
end
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroMLKitDigitalInk-Swift-Cxx-Bridge.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 "NitroMLKitDigitalInk-Swift-Cxx-Bridge.hpp"
|
|
9
|
+
|
|
10
|
+
// Include C++ implementation defined types
|
|
11
|
+
#include "HybridDigitalInkRecognizerSpecSwift.hpp"
|
|
12
|
+
#include "NitroMLKitDigitalInk-Swift-Cxx-Umbrella.hpp"
|
|
13
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::mlkit::digitalink::bridge::swift {
|
|
16
|
+
|
|
17
|
+
// pragma MARK: std::function<void(const std::vector<RecognitionCandidate>& /* result */)>
|
|
18
|
+
Func_void_std__vector_RecognitionCandidate_ create_Func_void_std__vector_RecognitionCandidate_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
19
|
+
auto swiftClosure = NitroMLKitDigitalInk::Func_void_std__vector_RecognitionCandidate_::fromUnsafe(swiftClosureWrapper);
|
|
20
|
+
return [swiftClosure = std::move(swiftClosure)](const std::vector<RecognitionCandidate>& result) mutable -> void {
|
|
21
|
+
swiftClosure.call(result);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
26
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
27
|
+
auto swiftClosure = NitroMLKitDigitalInk::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
28
|
+
return [swiftClosure = std::move(swiftClosure)](const std::exception_ptr& error) mutable -> void {
|
|
29
|
+
swiftClosure.call(error);
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// pragma MARK: std::function<void()>
|
|
34
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
35
|
+
auto swiftClosure = NitroMLKitDigitalInk::Func_void::fromUnsafe(swiftClosureWrapper);
|
|
36
|
+
return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
|
|
37
|
+
swiftClosure.call();
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
42
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
43
|
+
auto swiftClosure = NitroMLKitDigitalInk::Func_void_bool::fromUnsafe(swiftClosureWrapper);
|
|
44
|
+
return [swiftClosure = std::move(swiftClosure)](bool result) mutable -> void {
|
|
45
|
+
swiftClosure.call(result);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// pragma MARK: std::shared_ptr<HybridDigitalInkRecognizerSpec>
|
|
50
|
+
std::shared_ptr<HybridDigitalInkRecognizerSpec> create_std__shared_ptr_HybridDigitalInkRecognizerSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
51
|
+
NitroMLKitDigitalInk::HybridDigitalInkRecognizerSpec_cxx swiftPart = NitroMLKitDigitalInk::HybridDigitalInkRecognizerSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
52
|
+
return std::make_shared<margelo::nitro::mlkit::digitalink::HybridDigitalInkRecognizerSpecSwift>(swiftPart);
|
|
53
|
+
}
|
|
54
|
+
void* NON_NULL get_std__shared_ptr_HybridDigitalInkRecognizerSpec_(std__shared_ptr_HybridDigitalInkRecognizerSpec_ cppType) {
|
|
55
|
+
std::shared_ptr<margelo::nitro::mlkit::digitalink::HybridDigitalInkRecognizerSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::mlkit::digitalink::HybridDigitalInkRecognizerSpecSwift>(cppType);
|
|
56
|
+
#ifdef NITRO_DEBUG
|
|
57
|
+
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
58
|
+
throw std::runtime_error("Class \"HybridDigitalInkRecognizerSpec\" is not implemented in Swift!");
|
|
59
|
+
}
|
|
60
|
+
#endif
|
|
61
|
+
NitroMLKitDigitalInk::HybridDigitalInkRecognizerSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
62
|
+
return swiftPart.toUnsafe();
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
} // namespace margelo::nitro::mlkit::digitalink::bridge::swift
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroMLKitDigitalInk-Swift-Cxx-Bridge.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
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `HybridDigitalInkRecognizerSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::mlkit::digitalink { class HybridDigitalInkRecognizerSpec; }
|
|
13
|
+
// Forward declaration of `InkPoint` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::mlkit::digitalink { struct InkPoint; }
|
|
15
|
+
// Forward declaration of `InkStroke` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::mlkit::digitalink { struct InkStroke; }
|
|
17
|
+
// Forward declaration of `RecognitionCandidate` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::mlkit::digitalink { struct RecognitionCandidate; }
|
|
19
|
+
|
|
20
|
+
// Forward declarations of Swift defined types
|
|
21
|
+
// Forward declaration of `HybridDigitalInkRecognizerSpec_cxx` to properly resolve imports.
|
|
22
|
+
namespace NitroMLKitDigitalInk { class HybridDigitalInkRecognizerSpec_cxx; }
|
|
23
|
+
|
|
24
|
+
// Include C++ defined types
|
|
25
|
+
#include "HybridDigitalInkRecognizerSpec.hpp"
|
|
26
|
+
#include "InkPoint.hpp"
|
|
27
|
+
#include "InkStroke.hpp"
|
|
28
|
+
#include "RecognitionCandidate.hpp"
|
|
29
|
+
#include <NitroModules/Promise.hpp>
|
|
30
|
+
#include <NitroModules/PromiseHolder.hpp>
|
|
31
|
+
#include <NitroModules/Result.hpp>
|
|
32
|
+
#include <exception>
|
|
33
|
+
#include <functional>
|
|
34
|
+
#include <memory>
|
|
35
|
+
#include <optional>
|
|
36
|
+
#include <string>
|
|
37
|
+
#include <vector>
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
41
|
+
* as well as helper functions to interact with those C++ types from Swift.
|
|
42
|
+
*/
|
|
43
|
+
namespace margelo::nitro::mlkit::digitalink::bridge::swift {
|
|
44
|
+
|
|
45
|
+
// pragma MARK: std::optional<double>
|
|
46
|
+
/**
|
|
47
|
+
* Specialized version of `std::optional<double>`.
|
|
48
|
+
*/
|
|
49
|
+
using std__optional_double_ = std::optional<double>;
|
|
50
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
51
|
+
return std::optional<double>(value);
|
|
52
|
+
}
|
|
53
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
54
|
+
return optional.has_value();
|
|
55
|
+
}
|
|
56
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
57
|
+
return optional.value();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// pragma MARK: std::vector<RecognitionCandidate>
|
|
61
|
+
/**
|
|
62
|
+
* Specialized version of `std::vector<RecognitionCandidate>`.
|
|
63
|
+
*/
|
|
64
|
+
using std__vector_RecognitionCandidate_ = std::vector<RecognitionCandidate>;
|
|
65
|
+
inline std::vector<RecognitionCandidate> create_std__vector_RecognitionCandidate_(size_t size) noexcept {
|
|
66
|
+
std::vector<RecognitionCandidate> vector;
|
|
67
|
+
vector.reserve(size);
|
|
68
|
+
return vector;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// pragma MARK: std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>
|
|
72
|
+
/**
|
|
73
|
+
* Specialized version of `std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>`.
|
|
74
|
+
*/
|
|
75
|
+
using std__shared_ptr_Promise_std__vector_RecognitionCandidate___ = std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>;
|
|
76
|
+
inline std::shared_ptr<Promise<std::vector<RecognitionCandidate>>> create_std__shared_ptr_Promise_std__vector_RecognitionCandidate___() noexcept {
|
|
77
|
+
return Promise<std::vector<RecognitionCandidate>>::create();
|
|
78
|
+
}
|
|
79
|
+
inline PromiseHolder<std::vector<RecognitionCandidate>> wrap_std__shared_ptr_Promise_std__vector_RecognitionCandidate___(std::shared_ptr<Promise<std::vector<RecognitionCandidate>>> promise) noexcept {
|
|
80
|
+
return PromiseHolder<std::vector<RecognitionCandidate>>(std::move(promise));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// pragma MARK: std::function<void(const std::vector<RecognitionCandidate>& /* result */)>
|
|
84
|
+
/**
|
|
85
|
+
* Specialized version of `std::function<void(const std::vector<RecognitionCandidate>&)>`.
|
|
86
|
+
*/
|
|
87
|
+
using Func_void_std__vector_RecognitionCandidate_ = std::function<void(const std::vector<RecognitionCandidate>& /* result */)>;
|
|
88
|
+
/**
|
|
89
|
+
* Wrapper class for a `std::function<void(const std::vector<RecognitionCandidate>& / * result * /)>`, this can be used from Swift.
|
|
90
|
+
*/
|
|
91
|
+
class Func_void_std__vector_RecognitionCandidate__Wrapper final {
|
|
92
|
+
public:
|
|
93
|
+
explicit Func_void_std__vector_RecognitionCandidate__Wrapper(std::function<void(const std::vector<RecognitionCandidate>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::vector<RecognitionCandidate>& /* result */)>>(std::move(func))) {}
|
|
94
|
+
inline void call(std::vector<RecognitionCandidate> result) const noexcept {
|
|
95
|
+
_function->operator()(result);
|
|
96
|
+
}
|
|
97
|
+
private:
|
|
98
|
+
std::unique_ptr<std::function<void(const std::vector<RecognitionCandidate>& /* result */)>> _function;
|
|
99
|
+
} SWIFT_NONCOPYABLE;
|
|
100
|
+
Func_void_std__vector_RecognitionCandidate_ create_Func_void_std__vector_RecognitionCandidate_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
101
|
+
inline Func_void_std__vector_RecognitionCandidate__Wrapper wrap_Func_void_std__vector_RecognitionCandidate_(Func_void_std__vector_RecognitionCandidate_ value) noexcept {
|
|
102
|
+
return Func_void_std__vector_RecognitionCandidate__Wrapper(std::move(value));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
106
|
+
/**
|
|
107
|
+
* Specialized version of `std::function<void(const std::exception_ptr&)>`.
|
|
108
|
+
*/
|
|
109
|
+
using Func_void_std__exception_ptr = std::function<void(const std::exception_ptr& /* error */)>;
|
|
110
|
+
/**
|
|
111
|
+
* Wrapper class for a `std::function<void(const std::exception_ptr& / * error * /)>`, this can be used from Swift.
|
|
112
|
+
*/
|
|
113
|
+
class Func_void_std__exception_ptr_Wrapper final {
|
|
114
|
+
public:
|
|
115
|
+
explicit Func_void_std__exception_ptr_Wrapper(std::function<void(const std::exception_ptr& /* error */)>&& func): _function(std::make_unique<std::function<void(const std::exception_ptr& /* error */)>>(std::move(func))) {}
|
|
116
|
+
inline void call(std::exception_ptr error) const noexcept {
|
|
117
|
+
_function->operator()(error);
|
|
118
|
+
}
|
|
119
|
+
private:
|
|
120
|
+
std::unique_ptr<std::function<void(const std::exception_ptr& /* error */)>> _function;
|
|
121
|
+
} SWIFT_NONCOPYABLE;
|
|
122
|
+
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
123
|
+
inline Func_void_std__exception_ptr_Wrapper wrap_Func_void_std__exception_ptr(Func_void_std__exception_ptr value) noexcept {
|
|
124
|
+
return Func_void_std__exception_ptr_Wrapper(std::move(value));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// pragma MARK: std::vector<InkPoint>
|
|
128
|
+
/**
|
|
129
|
+
* Specialized version of `std::vector<InkPoint>`.
|
|
130
|
+
*/
|
|
131
|
+
using std__vector_InkPoint_ = std::vector<InkPoint>;
|
|
132
|
+
inline std::vector<InkPoint> create_std__vector_InkPoint_(size_t size) noexcept {
|
|
133
|
+
std::vector<InkPoint> vector;
|
|
134
|
+
vector.reserve(size);
|
|
135
|
+
return vector;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// pragma MARK: std::vector<InkStroke>
|
|
139
|
+
/**
|
|
140
|
+
* Specialized version of `std::vector<InkStroke>`.
|
|
141
|
+
*/
|
|
142
|
+
using std__vector_InkStroke_ = std::vector<InkStroke>;
|
|
143
|
+
inline std::vector<InkStroke> create_std__vector_InkStroke_(size_t size) noexcept {
|
|
144
|
+
std::vector<InkStroke> vector;
|
|
145
|
+
vector.reserve(size);
|
|
146
|
+
return vector;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
150
|
+
/**
|
|
151
|
+
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
152
|
+
*/
|
|
153
|
+
using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
|
|
154
|
+
inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
|
|
155
|
+
return Promise<void>::create();
|
|
156
|
+
}
|
|
157
|
+
inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
|
|
158
|
+
return PromiseHolder<void>(std::move(promise));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// pragma MARK: std::function<void()>
|
|
162
|
+
/**
|
|
163
|
+
* Specialized version of `std::function<void()>`.
|
|
164
|
+
*/
|
|
165
|
+
using Func_void = std::function<void()>;
|
|
166
|
+
/**
|
|
167
|
+
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
168
|
+
*/
|
|
169
|
+
class Func_void_Wrapper final {
|
|
170
|
+
public:
|
|
171
|
+
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
172
|
+
inline void call() const noexcept {
|
|
173
|
+
_function->operator()();
|
|
174
|
+
}
|
|
175
|
+
private:
|
|
176
|
+
std::unique_ptr<std::function<void()>> _function;
|
|
177
|
+
} SWIFT_NONCOPYABLE;
|
|
178
|
+
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
179
|
+
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
180
|
+
return Func_void_Wrapper(std::move(value));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// pragma MARK: std::shared_ptr<Promise<bool>>
|
|
184
|
+
/**
|
|
185
|
+
* Specialized version of `std::shared_ptr<Promise<bool>>`.
|
|
186
|
+
*/
|
|
187
|
+
using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
|
|
188
|
+
inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
|
|
189
|
+
return Promise<bool>::create();
|
|
190
|
+
}
|
|
191
|
+
inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
|
|
192
|
+
return PromiseHolder<bool>(std::move(promise));
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// pragma MARK: std::function<void(bool /* result */)>
|
|
196
|
+
/**
|
|
197
|
+
* Specialized version of `std::function<void(bool)>`.
|
|
198
|
+
*/
|
|
199
|
+
using Func_void_bool = std::function<void(bool /* result */)>;
|
|
200
|
+
/**
|
|
201
|
+
* Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
|
|
202
|
+
*/
|
|
203
|
+
class Func_void_bool_Wrapper final {
|
|
204
|
+
public:
|
|
205
|
+
explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
|
|
206
|
+
inline void call(bool result) const noexcept {
|
|
207
|
+
_function->operator()(result);
|
|
208
|
+
}
|
|
209
|
+
private:
|
|
210
|
+
std::unique_ptr<std::function<void(bool /* result */)>> _function;
|
|
211
|
+
} SWIFT_NONCOPYABLE;
|
|
212
|
+
Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
213
|
+
inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
|
|
214
|
+
return Func_void_bool_Wrapper(std::move(value));
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// pragma MARK: std::shared_ptr<HybridDigitalInkRecognizerSpec>
|
|
218
|
+
/**
|
|
219
|
+
* Specialized version of `std::shared_ptr<HybridDigitalInkRecognizerSpec>`.
|
|
220
|
+
*/
|
|
221
|
+
using std__shared_ptr_HybridDigitalInkRecognizerSpec_ = std::shared_ptr<HybridDigitalInkRecognizerSpec>;
|
|
222
|
+
std::shared_ptr<HybridDigitalInkRecognizerSpec> create_std__shared_ptr_HybridDigitalInkRecognizerSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
223
|
+
void* NON_NULL get_std__shared_ptr_HybridDigitalInkRecognizerSpec_(std__shared_ptr_HybridDigitalInkRecognizerSpec_ cppType);
|
|
224
|
+
|
|
225
|
+
// pragma MARK: std::weak_ptr<HybridDigitalInkRecognizerSpec>
|
|
226
|
+
using std__weak_ptr_HybridDigitalInkRecognizerSpec_ = std::weak_ptr<HybridDigitalInkRecognizerSpec>;
|
|
227
|
+
inline std__weak_ptr_HybridDigitalInkRecognizerSpec_ weakify_std__shared_ptr_HybridDigitalInkRecognizerSpec_(const std::shared_ptr<HybridDigitalInkRecognizerSpec>& strong) noexcept { return strong; }
|
|
228
|
+
|
|
229
|
+
// pragma MARK: Result<std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>>
|
|
230
|
+
using Result_std__shared_ptr_Promise_std__vector_RecognitionCandidate____ = Result<std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>>;
|
|
231
|
+
inline Result_std__shared_ptr_Promise_std__vector_RecognitionCandidate____ create_Result_std__shared_ptr_Promise_std__vector_RecognitionCandidate____(const std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>& value) noexcept {
|
|
232
|
+
return Result<std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>>::withValue(value);
|
|
233
|
+
}
|
|
234
|
+
inline Result_std__shared_ptr_Promise_std__vector_RecognitionCandidate____ create_Result_std__shared_ptr_Promise_std__vector_RecognitionCandidate____(const std::exception_ptr& error) noexcept {
|
|
235
|
+
return Result<std::shared_ptr<Promise<std::vector<RecognitionCandidate>>>>::withError(error);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// pragma MARK: Result<std::shared_ptr<Promise<void>>>
|
|
239
|
+
using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
|
|
240
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
|
|
241
|
+
return Result<std::shared_ptr<Promise<void>>>::withValue(value);
|
|
242
|
+
}
|
|
243
|
+
inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
|
|
244
|
+
return Result<std::shared_ptr<Promise<void>>>::withError(error);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// pragma MARK: Result<std::shared_ptr<Promise<bool>>>
|
|
248
|
+
using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
|
|
249
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
|
|
250
|
+
return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
|
|
251
|
+
}
|
|
252
|
+
inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
|
|
253
|
+
return Result<std::shared_ptr<Promise<bool>>>::withError(error);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
// pragma MARK: Result<bool>
|
|
257
|
+
using Result_bool_ = Result<bool>;
|
|
258
|
+
inline Result_bool_ create_Result_bool_(bool value) noexcept {
|
|
259
|
+
return Result<bool>::withValue(std::move(value));
|
|
260
|
+
}
|
|
261
|
+
inline Result_bool_ create_Result_bool_(const std::exception_ptr& error) noexcept {
|
|
262
|
+
return Result<bool>::withError(error);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
} // namespace margelo::nitro::mlkit::digitalink::bridge::swift
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroMLKitDigitalInk-Swift-Cxx-Umbrella.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
|
+
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `HybridDigitalInkRecognizerSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::mlkit::digitalink { class HybridDigitalInkRecognizerSpec; }
|
|
13
|
+
// Forward declaration of `InkPoint` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::mlkit::digitalink { struct InkPoint; }
|
|
15
|
+
// Forward declaration of `InkStroke` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::mlkit::digitalink { struct InkStroke; }
|
|
17
|
+
// Forward declaration of `RecognitionCandidate` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::mlkit::digitalink { struct RecognitionCandidate; }
|
|
19
|
+
|
|
20
|
+
// Include C++ defined types
|
|
21
|
+
#include "HybridDigitalInkRecognizerSpec.hpp"
|
|
22
|
+
#include "InkPoint.hpp"
|
|
23
|
+
#include "InkStroke.hpp"
|
|
24
|
+
#include "RecognitionCandidate.hpp"
|
|
25
|
+
#include <NitroModules/Promise.hpp>
|
|
26
|
+
#include <NitroModules/Result.hpp>
|
|
27
|
+
#include <exception>
|
|
28
|
+
#include <memory>
|
|
29
|
+
#include <optional>
|
|
30
|
+
#include <string>
|
|
31
|
+
#include <vector>
|
|
32
|
+
|
|
33
|
+
// C++ helpers for Swift
|
|
34
|
+
#include "NitroMLKitDigitalInk-Swift-Cxx-Bridge.hpp"
|
|
35
|
+
|
|
36
|
+
// Common C++ types used in Swift
|
|
37
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
38
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
39
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
40
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
41
|
+
|
|
42
|
+
// Forward declarations of Swift defined types
|
|
43
|
+
// Forward declaration of `HybridDigitalInkRecognizerSpec_cxx` to properly resolve imports.
|
|
44
|
+
namespace NitroMLKitDigitalInk { class HybridDigitalInkRecognizerSpec_cxx; }
|
|
45
|
+
|
|
46
|
+
// Include Swift defined types
|
|
47
|
+
#if __has_include("NitroMLKitDigitalInk-Swift.h")
|
|
48
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
49
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroMLKitDigitalInk".
|
|
50
|
+
#include "NitroMLKitDigitalInk-Swift.h"
|
|
51
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
52
|
+
#elif __has_include(<NitroMLKitDigitalInk/NitroMLKitDigitalInk-Swift.h>)
|
|
53
|
+
#include <NitroMLKitDigitalInk/NitroMLKitDigitalInk-Swift.h>
|
|
54
|
+
#else
|
|
55
|
+
#error NitroMLKitDigitalInk's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroMLKitDigitalInk", and try building the app first.
|
|
56
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroMLKitDigitalInkAutolinking.mm
|
|
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 <Foundation/Foundation.h>
|
|
9
|
+
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
+
#import "NitroMLKitDigitalInk-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridDigitalInkRecognizerSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface NitroMLKitDigitalInkAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation NitroMLKitDigitalInkAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::mlkit::digitalink;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"DigitalInkRecognizer",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<HybridDigitalInkRecognizerSpec> hybridObject = NitroMLKitDigitalInk::NitroMLKitDigitalInkAutolinking::createDigitalInkRecognizer();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroMLKitDigitalInkAutolinking.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
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
12
|
+
public final class NitroMLKitDigitalInkAutolinking {
|
|
13
|
+
public typealias bridge = margelo.nitro.mlkit.digitalink.bridge.swift
|
|
14
|
+
|
|
15
|
+
public static func createDigitalInkRecognizer() -> bridge.std__shared_ptr_HybridDigitalInkRecognizerSpec_ {
|
|
16
|
+
let hybridObject = HybridDigitalInkRecognizer()
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridDigitalInkRecognizerSpec_ in
|
|
18
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
+
return __cxxWrapped.getCxxPart()
|
|
20
|
+
}()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func isDigitalInkRecognizerRecyclable() -> Bool {
|
|
24
|
+
return HybridDigitalInkRecognizer.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridDigitalInkRecognizerSpecSwift.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 "HybridDigitalInkRecognizerSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::mlkit::digitalink {
|
|
11
|
+
} // namespace margelo::nitro::mlkit::digitalink
|