@whetware/react-native-stroke-text 0.0.2
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/CHANGELOG.md +7 -0
- package/LICENSE.md +21 -0
- package/NitroStrokeText.podspec +31 -0
- package/README.md +45 -0
- package/android/CMakeLists.txt +29 -0
- package/android/build.gradle +142 -0
- package/android/fix-prefab.gradle +51 -0
- package/android/gradle.properties +5 -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/stroketext/HybridStrokeTextView.kt +107 -0
- package/android/src/main/java/com/margelo/nitro/stroketext/NitroStrokeTextPackage.kt +39 -0
- package/android/src/main/java/com/margelo/nitro/stroketext/StrokeTextView.kt +429 -0
- package/ios/Bridge.h +8 -0
- package/ios/HybridStrokeTextView.swift +114 -0
- package/ios/StrokeTextColor.swift +120 -0
- package/ios/StrokeTextView.swift +326 -0
- package/ios/StrokedTextLabel.swift +72 -0
- package/lib/StrokeText.d.ts +3 -0
- package/lib/StrokeText.js +109 -0
- package/lib/StrokeText.web.d.ts +3 -0
- package/lib/StrokeText.web.js +106 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +1 -0
- package/lib/index.web.d.ts +2 -0
- package/lib/index.web.js +1 -0
- package/lib/specs/StrokeTextView.nitro.d.ts +37 -0
- package/lib/specs/StrokeTextView.nitro.js +1 -0
- package/lib/types.d.ts +17 -0
- package/lib/types.js +1 -0
- package/nitro.json +24 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/NitroStrokeText+autolinking.cmake +83 -0
- package/nitrogen/generated/android/NitroStrokeText+autolinking.gradle +27 -0
- package/nitrogen/generated/android/NitroStrokeTextOnLoad.cpp +46 -0
- package/nitrogen/generated/android/NitroStrokeTextOnLoad.hpp +25 -0
- package/nitrogen/generated/android/c++/JHybridStrokeTextViewSpec.cpp +308 -0
- package/nitrogen/generated/android/c++/JHybridStrokeTextViewSpec.hpp +117 -0
- package/nitrogen/generated/android/c++/JStrokeTextAlign.hpp +67 -0
- package/nitrogen/generated/android/c++/JStrokeTextDecorationLine.hpp +64 -0
- package/nitrogen/generated/android/c++/JStrokeTextEllipsizeMode.hpp +64 -0
- package/nitrogen/generated/android/c++/JStrokeTextFontStyle.hpp +58 -0
- package/nitrogen/generated/android/c++/JStrokeTextTransform.hpp +64 -0
- package/nitrogen/generated/android/c++/views/JHybridStrokeTextViewStateUpdater.cpp +156 -0
- package/nitrogen/generated/android/c++/views/JHybridStrokeTextViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/HybridStrokeTextViewSpec.kt +209 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/NitroStrokeTextOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/StrokeTextAlign.kt +26 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/StrokeTextDecorationLine.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/StrokeTextEllipsizeMode.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/StrokeTextFontStyle.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/StrokeTextTransform.kt +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/views/HybridStrokeTextViewManager.kt +70 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/stroketext/views/HybridStrokeTextViewStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/NitroStrokeText+autolinking.rb +60 -0
- package/nitrogen/generated/ios/NitroStrokeText-Swift-Cxx-Bridge.cpp +33 -0
- package/nitrogen/generated/ios/NitroStrokeText-Swift-Cxx-Bridge.hpp +177 -0
- package/nitrogen/generated/ios/NitroStrokeText-Swift-Cxx-Umbrella.hpp +58 -0
- package/nitrogen/generated/ios/NitroStrokeTextAutolinking.mm +33 -0
- package/nitrogen/generated/ios/NitroStrokeTextAutolinking.swift +26 -0
- package/nitrogen/generated/ios/c++/HybridStrokeTextViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridStrokeTextViewSpecSwift.hpp +271 -0
- package/nitrogen/generated/ios/c++/views/HybridStrokeTextViewComponent.mm +232 -0
- package/nitrogen/generated/ios/swift/HybridStrokeTextViewSpec.swift +81 -0
- package/nitrogen/generated/ios/swift/HybridStrokeTextViewSpec_cxx.swift +620 -0
- package/nitrogen/generated/ios/swift/StrokeTextAlign.swift +52 -0
- package/nitrogen/generated/ios/swift/StrokeTextDecorationLine.swift +48 -0
- package/nitrogen/generated/ios/swift/StrokeTextEllipsizeMode.swift +48 -0
- package/nitrogen/generated/ios/swift/StrokeTextFontStyle.swift +40 -0
- package/nitrogen/generated/ios/swift/StrokeTextTransform.swift +48 -0
- package/nitrogen/generated/shared/c++/HybridStrokeTextViewSpec.cpp +72 -0
- package/nitrogen/generated/shared/c++/HybridStrokeTextViewSpec.hpp +128 -0
- package/nitrogen/generated/shared/c++/StrokeTextAlign.hpp +88 -0
- package/nitrogen/generated/shared/c++/StrokeTextDecorationLine.hpp +84 -0
- package/nitrogen/generated/shared/c++/StrokeTextEllipsizeMode.hpp +84 -0
- package/nitrogen/generated/shared/c++/StrokeTextFontStyle.hpp +76 -0
- package/nitrogen/generated/shared/c++/StrokeTextTransform.hpp +84 -0
- package/nitrogen/generated/shared/c++/views/HybridStrokeTextViewComponent.cpp +388 -0
- package/nitrogen/generated/shared/c++/views/HybridStrokeTextViewComponent.hpp +138 -0
- package/nitrogen/generated/shared/json/StrokeTextViewConfig.json +35 -0
- package/package.json +124 -0
- package/react-native.config.js +16 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroStrokeText-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 `HybridStrokeTextViewSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::stroketext { class HybridStrokeTextViewSpec; }
|
|
13
|
+
// Forward declaration of `StrokeTextAlign` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextAlign; }
|
|
15
|
+
// Forward declaration of `StrokeTextDecorationLine` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextDecorationLine; }
|
|
17
|
+
// Forward declaration of `StrokeTextEllipsizeMode` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextEllipsizeMode; }
|
|
19
|
+
// Forward declaration of `StrokeTextFontStyle` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextFontStyle; }
|
|
21
|
+
// Forward declaration of `StrokeTextTransform` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextTransform; }
|
|
23
|
+
|
|
24
|
+
// Forward declarations of Swift defined types
|
|
25
|
+
// Forward declaration of `HybridStrokeTextViewSpec_cxx` to properly resolve imports.
|
|
26
|
+
namespace NitroStrokeText { class HybridStrokeTextViewSpec_cxx; }
|
|
27
|
+
|
|
28
|
+
// Include C++ defined types
|
|
29
|
+
#include "HybridStrokeTextViewSpec.hpp"
|
|
30
|
+
#include "StrokeTextAlign.hpp"
|
|
31
|
+
#include "StrokeTextDecorationLine.hpp"
|
|
32
|
+
#include "StrokeTextEllipsizeMode.hpp"
|
|
33
|
+
#include "StrokeTextFontStyle.hpp"
|
|
34
|
+
#include "StrokeTextTransform.hpp"
|
|
35
|
+
#include <memory>
|
|
36
|
+
#include <optional>
|
|
37
|
+
#include <string>
|
|
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::stroketext::bridge::swift {
|
|
44
|
+
|
|
45
|
+
// pragma MARK: std::optional<std::string>
|
|
46
|
+
/**
|
|
47
|
+
* Specialized version of `std::optional<std::string>`.
|
|
48
|
+
*/
|
|
49
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
50
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
51
|
+
return std::optional<std::string>(value);
|
|
52
|
+
}
|
|
53
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
54
|
+
return optional.has_value();
|
|
55
|
+
}
|
|
56
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
57
|
+
return *optional;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// pragma MARK: std::optional<double>
|
|
61
|
+
/**
|
|
62
|
+
* Specialized version of `std::optional<double>`.
|
|
63
|
+
*/
|
|
64
|
+
using std__optional_double_ = std::optional<double>;
|
|
65
|
+
inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
|
|
66
|
+
return std::optional<double>(value);
|
|
67
|
+
}
|
|
68
|
+
inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
69
|
+
return optional.has_value();
|
|
70
|
+
}
|
|
71
|
+
inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
|
|
72
|
+
return *optional;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// pragma MARK: std::optional<StrokeTextFontStyle>
|
|
76
|
+
/**
|
|
77
|
+
* Specialized version of `std::optional<StrokeTextFontStyle>`.
|
|
78
|
+
*/
|
|
79
|
+
using std__optional_StrokeTextFontStyle_ = std::optional<StrokeTextFontStyle>;
|
|
80
|
+
inline std::optional<StrokeTextFontStyle> create_std__optional_StrokeTextFontStyle_(const StrokeTextFontStyle& value) noexcept {
|
|
81
|
+
return std::optional<StrokeTextFontStyle>(value);
|
|
82
|
+
}
|
|
83
|
+
inline bool has_value_std__optional_StrokeTextFontStyle_(const std::optional<StrokeTextFontStyle>& optional) noexcept {
|
|
84
|
+
return optional.has_value();
|
|
85
|
+
}
|
|
86
|
+
inline StrokeTextFontStyle get_std__optional_StrokeTextFontStyle_(const std::optional<StrokeTextFontStyle>& optional) noexcept {
|
|
87
|
+
return *optional;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// pragma MARK: std::optional<StrokeTextAlign>
|
|
91
|
+
/**
|
|
92
|
+
* Specialized version of `std::optional<StrokeTextAlign>`.
|
|
93
|
+
*/
|
|
94
|
+
using std__optional_StrokeTextAlign_ = std::optional<StrokeTextAlign>;
|
|
95
|
+
inline std::optional<StrokeTextAlign> create_std__optional_StrokeTextAlign_(const StrokeTextAlign& value) noexcept {
|
|
96
|
+
return std::optional<StrokeTextAlign>(value);
|
|
97
|
+
}
|
|
98
|
+
inline bool has_value_std__optional_StrokeTextAlign_(const std::optional<StrokeTextAlign>& optional) noexcept {
|
|
99
|
+
return optional.has_value();
|
|
100
|
+
}
|
|
101
|
+
inline StrokeTextAlign get_std__optional_StrokeTextAlign_(const std::optional<StrokeTextAlign>& optional) noexcept {
|
|
102
|
+
return *optional;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// pragma MARK: std::optional<StrokeTextDecorationLine>
|
|
106
|
+
/**
|
|
107
|
+
* Specialized version of `std::optional<StrokeTextDecorationLine>`.
|
|
108
|
+
*/
|
|
109
|
+
using std__optional_StrokeTextDecorationLine_ = std::optional<StrokeTextDecorationLine>;
|
|
110
|
+
inline std::optional<StrokeTextDecorationLine> create_std__optional_StrokeTextDecorationLine_(const StrokeTextDecorationLine& value) noexcept {
|
|
111
|
+
return std::optional<StrokeTextDecorationLine>(value);
|
|
112
|
+
}
|
|
113
|
+
inline bool has_value_std__optional_StrokeTextDecorationLine_(const std::optional<StrokeTextDecorationLine>& optional) noexcept {
|
|
114
|
+
return optional.has_value();
|
|
115
|
+
}
|
|
116
|
+
inline StrokeTextDecorationLine get_std__optional_StrokeTextDecorationLine_(const std::optional<StrokeTextDecorationLine>& optional) noexcept {
|
|
117
|
+
return *optional;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// pragma MARK: std::optional<StrokeTextTransform>
|
|
121
|
+
/**
|
|
122
|
+
* Specialized version of `std::optional<StrokeTextTransform>`.
|
|
123
|
+
*/
|
|
124
|
+
using std__optional_StrokeTextTransform_ = std::optional<StrokeTextTransform>;
|
|
125
|
+
inline std::optional<StrokeTextTransform> create_std__optional_StrokeTextTransform_(const StrokeTextTransform& value) noexcept {
|
|
126
|
+
return std::optional<StrokeTextTransform>(value);
|
|
127
|
+
}
|
|
128
|
+
inline bool has_value_std__optional_StrokeTextTransform_(const std::optional<StrokeTextTransform>& optional) noexcept {
|
|
129
|
+
return optional.has_value();
|
|
130
|
+
}
|
|
131
|
+
inline StrokeTextTransform get_std__optional_StrokeTextTransform_(const std::optional<StrokeTextTransform>& optional) noexcept {
|
|
132
|
+
return *optional;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// pragma MARK: std::optional<bool>
|
|
136
|
+
/**
|
|
137
|
+
* Specialized version of `std::optional<bool>`.
|
|
138
|
+
*/
|
|
139
|
+
using std__optional_bool_ = std::optional<bool>;
|
|
140
|
+
inline std::optional<bool> create_std__optional_bool_(const bool& value) noexcept {
|
|
141
|
+
return std::optional<bool>(value);
|
|
142
|
+
}
|
|
143
|
+
inline bool has_value_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
144
|
+
return optional.has_value();
|
|
145
|
+
}
|
|
146
|
+
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
147
|
+
return *optional;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// pragma MARK: std::optional<StrokeTextEllipsizeMode>
|
|
151
|
+
/**
|
|
152
|
+
* Specialized version of `std::optional<StrokeTextEllipsizeMode>`.
|
|
153
|
+
*/
|
|
154
|
+
using std__optional_StrokeTextEllipsizeMode_ = std::optional<StrokeTextEllipsizeMode>;
|
|
155
|
+
inline std::optional<StrokeTextEllipsizeMode> create_std__optional_StrokeTextEllipsizeMode_(const StrokeTextEllipsizeMode& value) noexcept {
|
|
156
|
+
return std::optional<StrokeTextEllipsizeMode>(value);
|
|
157
|
+
}
|
|
158
|
+
inline bool has_value_std__optional_StrokeTextEllipsizeMode_(const std::optional<StrokeTextEllipsizeMode>& optional) noexcept {
|
|
159
|
+
return optional.has_value();
|
|
160
|
+
}
|
|
161
|
+
inline StrokeTextEllipsizeMode get_std__optional_StrokeTextEllipsizeMode_(const std::optional<StrokeTextEllipsizeMode>& optional) noexcept {
|
|
162
|
+
return *optional;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// pragma MARK: std::shared_ptr<HybridStrokeTextViewSpec>
|
|
166
|
+
/**
|
|
167
|
+
* Specialized version of `std::shared_ptr<HybridStrokeTextViewSpec>`.
|
|
168
|
+
*/
|
|
169
|
+
using std__shared_ptr_HybridStrokeTextViewSpec_ = std::shared_ptr<HybridStrokeTextViewSpec>;
|
|
170
|
+
std::shared_ptr<HybridStrokeTextViewSpec> create_std__shared_ptr_HybridStrokeTextViewSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
171
|
+
void* NON_NULL get_std__shared_ptr_HybridStrokeTextViewSpec_(std__shared_ptr_HybridStrokeTextViewSpec_ cppType);
|
|
172
|
+
|
|
173
|
+
// pragma MARK: std::weak_ptr<HybridStrokeTextViewSpec>
|
|
174
|
+
using std__weak_ptr_HybridStrokeTextViewSpec_ = std::weak_ptr<HybridStrokeTextViewSpec>;
|
|
175
|
+
inline std__weak_ptr_HybridStrokeTextViewSpec_ weakify_std__shared_ptr_HybridStrokeTextViewSpec_(const std::shared_ptr<HybridStrokeTextViewSpec>& strong) noexcept { return strong; }
|
|
176
|
+
|
|
177
|
+
} // namespace margelo::nitro::stroketext::bridge::swift
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroStrokeText-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 `HybridStrokeTextViewSpec` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::stroketext { class HybridStrokeTextViewSpec; }
|
|
13
|
+
// Forward declaration of `StrokeTextAlign` to properly resolve imports.
|
|
14
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextAlign; }
|
|
15
|
+
// Forward declaration of `StrokeTextDecorationLine` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextDecorationLine; }
|
|
17
|
+
// Forward declaration of `StrokeTextEllipsizeMode` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextEllipsizeMode; }
|
|
19
|
+
// Forward declaration of `StrokeTextFontStyle` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextFontStyle; }
|
|
21
|
+
// Forward declaration of `StrokeTextTransform` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextTransform; }
|
|
23
|
+
|
|
24
|
+
// Include C++ defined types
|
|
25
|
+
#include "HybridStrokeTextViewSpec.hpp"
|
|
26
|
+
#include "StrokeTextAlign.hpp"
|
|
27
|
+
#include "StrokeTextDecorationLine.hpp"
|
|
28
|
+
#include "StrokeTextEllipsizeMode.hpp"
|
|
29
|
+
#include "StrokeTextFontStyle.hpp"
|
|
30
|
+
#include "StrokeTextTransform.hpp"
|
|
31
|
+
#include <memory>
|
|
32
|
+
#include <optional>
|
|
33
|
+
#include <string>
|
|
34
|
+
|
|
35
|
+
// C++ helpers for Swift
|
|
36
|
+
#include "NitroStrokeText-Swift-Cxx-Bridge.hpp"
|
|
37
|
+
|
|
38
|
+
// Common C++ types used in Swift
|
|
39
|
+
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
40
|
+
#include <NitroModules/AnyMapUtils.hpp>
|
|
41
|
+
#include <NitroModules/RuntimeError.hpp>
|
|
42
|
+
#include <NitroModules/DateToChronoDate.hpp>
|
|
43
|
+
|
|
44
|
+
// Forward declarations of Swift defined types
|
|
45
|
+
// Forward declaration of `HybridStrokeTextViewSpec_cxx` to properly resolve imports.
|
|
46
|
+
namespace NitroStrokeText { class HybridStrokeTextViewSpec_cxx; }
|
|
47
|
+
|
|
48
|
+
// Include Swift defined types
|
|
49
|
+
#if __has_include("NitroStrokeText-Swift.h")
|
|
50
|
+
// This header is generated by Xcode/Swift on every app build.
|
|
51
|
+
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "NitroStrokeText".
|
|
52
|
+
#include "NitroStrokeText-Swift.h"
|
|
53
|
+
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
54
|
+
#elif __has_include(<NitroStrokeText/NitroStrokeText-Swift.h>)
|
|
55
|
+
#include <NitroStrokeText/NitroStrokeText-Swift.h>
|
|
56
|
+
#else
|
|
57
|
+
#error NitroStrokeText's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "NitroStrokeText", and try building the app first.
|
|
58
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroStrokeTextAutolinking.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 "NitroStrokeText-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridStrokeTextViewSpecSwift.hpp"
|
|
14
|
+
|
|
15
|
+
@interface NitroStrokeTextAutolinking : NSObject
|
|
16
|
+
@end
|
|
17
|
+
|
|
18
|
+
@implementation NitroStrokeTextAutolinking
|
|
19
|
+
|
|
20
|
+
+ (void) load {
|
|
21
|
+
using namespace margelo::nitro;
|
|
22
|
+
using namespace margelo::nitro::stroketext;
|
|
23
|
+
|
|
24
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
+
"StrokeTextView",
|
|
26
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
+
std::shared_ptr<HybridStrokeTextViewSpec> hybridObject = NitroStrokeText::NitroStrokeTextAutolinking::createStrokeTextView();
|
|
28
|
+
return hybridObject;
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroStrokeTextAutolinking.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 NitroStrokeTextAutolinking {
|
|
13
|
+
public typealias bridge = margelo.nitro.stroketext.bridge.swift
|
|
14
|
+
|
|
15
|
+
public static func createStrokeTextView() -> bridge.std__shared_ptr_HybridStrokeTextViewSpec_ {
|
|
16
|
+
let hybridObject = HybridStrokeTextView()
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridStrokeTextViewSpec_ in
|
|
18
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
+
return __cxxWrapped.getCxxPart()
|
|
20
|
+
}()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func isStrokeTextViewRecyclable() -> Bool {
|
|
24
|
+
return HybridStrokeTextView.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridStrokeTextViewSpecSwift.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 "HybridStrokeTextViewSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::stroketext {
|
|
11
|
+
} // namespace margelo::nitro::stroketext
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridStrokeTextViewSpecSwift.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
|
+
#include "HybridStrokeTextViewSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridStrokeTextViewSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace NitroStrokeText { class HybridStrokeTextViewSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `StrokeTextFontStyle` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextFontStyle; }
|
|
17
|
+
// Forward declaration of `StrokeTextAlign` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextAlign; }
|
|
19
|
+
// Forward declaration of `StrokeTextDecorationLine` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextDecorationLine; }
|
|
21
|
+
// Forward declaration of `StrokeTextTransform` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextTransform; }
|
|
23
|
+
// Forward declaration of `StrokeTextEllipsizeMode` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::stroketext { enum class StrokeTextEllipsizeMode; }
|
|
25
|
+
|
|
26
|
+
#include <string>
|
|
27
|
+
#include <optional>
|
|
28
|
+
#include "StrokeTextFontStyle.hpp"
|
|
29
|
+
#include "StrokeTextAlign.hpp"
|
|
30
|
+
#include "StrokeTextDecorationLine.hpp"
|
|
31
|
+
#include "StrokeTextTransform.hpp"
|
|
32
|
+
#include "StrokeTextEllipsizeMode.hpp"
|
|
33
|
+
|
|
34
|
+
#include "NitroStrokeText-Swift-Cxx-Umbrella.hpp"
|
|
35
|
+
|
|
36
|
+
namespace margelo::nitro::stroketext {
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The C++ part of HybridStrokeTextViewSpec_cxx.swift.
|
|
40
|
+
*
|
|
41
|
+
* HybridStrokeTextViewSpecSwift (C++) accesses HybridStrokeTextViewSpec_cxx (Swift), and might
|
|
42
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
43
|
+
*
|
|
44
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
45
|
+
* the future, HybridStrokeTextViewSpec_cxx can directly inherit from the C++ class HybridStrokeTextViewSpec
|
|
46
|
+
* to simplify the whole structure and memory management.
|
|
47
|
+
*/
|
|
48
|
+
class HybridStrokeTextViewSpecSwift: public virtual HybridStrokeTextViewSpec {
|
|
49
|
+
public:
|
|
50
|
+
// Constructor from a Swift instance
|
|
51
|
+
explicit HybridStrokeTextViewSpecSwift(const NitroStrokeText::HybridStrokeTextViewSpec_cxx& swiftPart):
|
|
52
|
+
HybridObject(HybridStrokeTextViewSpec::TAG),
|
|
53
|
+
_swiftPart(swiftPart) { }
|
|
54
|
+
|
|
55
|
+
public:
|
|
56
|
+
// Get the Swift part
|
|
57
|
+
inline NitroStrokeText::HybridStrokeTextViewSpec_cxx& getSwiftPart() noexcept {
|
|
58
|
+
return _swiftPart;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
public:
|
|
62
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
63
|
+
return _swiftPart.getMemorySize();
|
|
64
|
+
}
|
|
65
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
66
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridStrokeTextViewSpecSwift>(other)) {
|
|
67
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
68
|
+
}
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
void dispose() noexcept override {
|
|
72
|
+
_swiftPart.dispose();
|
|
73
|
+
}
|
|
74
|
+
std::string toString() override {
|
|
75
|
+
return _swiftPart.toString();
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public:
|
|
79
|
+
// Properties
|
|
80
|
+
inline std::string getText() noexcept override {
|
|
81
|
+
auto __result = _swiftPart.getText();
|
|
82
|
+
return __result;
|
|
83
|
+
}
|
|
84
|
+
inline void setText(const std::string& text) noexcept override {
|
|
85
|
+
_swiftPart.setText(text);
|
|
86
|
+
}
|
|
87
|
+
inline std::optional<std::string> getColor() noexcept override {
|
|
88
|
+
auto __result = _swiftPart.getColor();
|
|
89
|
+
return __result;
|
|
90
|
+
}
|
|
91
|
+
inline void setColor(const std::optional<std::string>& color) noexcept override {
|
|
92
|
+
_swiftPart.setColor(color);
|
|
93
|
+
}
|
|
94
|
+
inline std::optional<std::string> getStrokeColor() noexcept override {
|
|
95
|
+
auto __result = _swiftPart.getStrokeColor();
|
|
96
|
+
return __result;
|
|
97
|
+
}
|
|
98
|
+
inline void setStrokeColor(const std::optional<std::string>& strokeColor) noexcept override {
|
|
99
|
+
_swiftPart.setStrokeColor(strokeColor);
|
|
100
|
+
}
|
|
101
|
+
inline std::optional<double> getStrokeWidth() noexcept override {
|
|
102
|
+
auto __result = _swiftPart.getStrokeWidth();
|
|
103
|
+
return __result;
|
|
104
|
+
}
|
|
105
|
+
inline void setStrokeWidth(std::optional<double> strokeWidth) noexcept override {
|
|
106
|
+
_swiftPart.setStrokeWidth(strokeWidth);
|
|
107
|
+
}
|
|
108
|
+
inline std::optional<double> getFontSize() noexcept override {
|
|
109
|
+
auto __result = _swiftPart.getFontSize();
|
|
110
|
+
return __result;
|
|
111
|
+
}
|
|
112
|
+
inline void setFontSize(std::optional<double> fontSize) noexcept override {
|
|
113
|
+
_swiftPart.setFontSize(fontSize);
|
|
114
|
+
}
|
|
115
|
+
inline std::optional<std::string> getFontWeight() noexcept override {
|
|
116
|
+
auto __result = _swiftPart.getFontWeight();
|
|
117
|
+
return __result;
|
|
118
|
+
}
|
|
119
|
+
inline void setFontWeight(const std::optional<std::string>& fontWeight) noexcept override {
|
|
120
|
+
_swiftPart.setFontWeight(fontWeight);
|
|
121
|
+
}
|
|
122
|
+
inline std::optional<std::string> getFontFamily() noexcept override {
|
|
123
|
+
auto __result = _swiftPart.getFontFamily();
|
|
124
|
+
return __result;
|
|
125
|
+
}
|
|
126
|
+
inline void setFontFamily(const std::optional<std::string>& fontFamily) noexcept override {
|
|
127
|
+
_swiftPart.setFontFamily(fontFamily);
|
|
128
|
+
}
|
|
129
|
+
inline std::optional<StrokeTextFontStyle> getFontStyle() noexcept override {
|
|
130
|
+
auto __result = _swiftPart.getFontStyle();
|
|
131
|
+
return __result;
|
|
132
|
+
}
|
|
133
|
+
inline void setFontStyle(std::optional<StrokeTextFontStyle> fontStyle) noexcept override {
|
|
134
|
+
_swiftPart.setFontStyle(fontStyle);
|
|
135
|
+
}
|
|
136
|
+
inline std::optional<double> getLineHeight() noexcept override {
|
|
137
|
+
auto __result = _swiftPart.getLineHeight();
|
|
138
|
+
return __result;
|
|
139
|
+
}
|
|
140
|
+
inline void setLineHeight(std::optional<double> lineHeight) noexcept override {
|
|
141
|
+
_swiftPart.setLineHeight(lineHeight);
|
|
142
|
+
}
|
|
143
|
+
inline std::optional<double> getLetterSpacing() noexcept override {
|
|
144
|
+
auto __result = _swiftPart.getLetterSpacing();
|
|
145
|
+
return __result;
|
|
146
|
+
}
|
|
147
|
+
inline void setLetterSpacing(std::optional<double> letterSpacing) noexcept override {
|
|
148
|
+
_swiftPart.setLetterSpacing(letterSpacing);
|
|
149
|
+
}
|
|
150
|
+
inline std::optional<StrokeTextAlign> getTextAlign() noexcept override {
|
|
151
|
+
auto __result = _swiftPart.getTextAlign();
|
|
152
|
+
return __result;
|
|
153
|
+
}
|
|
154
|
+
inline void setTextAlign(std::optional<StrokeTextAlign> textAlign) noexcept override {
|
|
155
|
+
_swiftPart.setTextAlign(textAlign);
|
|
156
|
+
}
|
|
157
|
+
inline std::optional<StrokeTextDecorationLine> getTextDecorationLine() noexcept override {
|
|
158
|
+
auto __result = _swiftPart.getTextDecorationLine();
|
|
159
|
+
return __result;
|
|
160
|
+
}
|
|
161
|
+
inline void setTextDecorationLine(std::optional<StrokeTextDecorationLine> textDecorationLine) noexcept override {
|
|
162
|
+
_swiftPart.setTextDecorationLine(textDecorationLine);
|
|
163
|
+
}
|
|
164
|
+
inline std::optional<StrokeTextTransform> getTextTransform() noexcept override {
|
|
165
|
+
auto __result = _swiftPart.getTextTransform();
|
|
166
|
+
return __result;
|
|
167
|
+
}
|
|
168
|
+
inline void setTextTransform(std::optional<StrokeTextTransform> textTransform) noexcept override {
|
|
169
|
+
_swiftPart.setTextTransform(textTransform);
|
|
170
|
+
}
|
|
171
|
+
inline std::optional<double> getOpacity() noexcept override {
|
|
172
|
+
auto __result = _swiftPart.getOpacity();
|
|
173
|
+
return __result;
|
|
174
|
+
}
|
|
175
|
+
inline void setOpacity(std::optional<double> opacity) noexcept override {
|
|
176
|
+
_swiftPart.setOpacity(opacity);
|
|
177
|
+
}
|
|
178
|
+
inline std::optional<bool> getAllowFontScaling() noexcept override {
|
|
179
|
+
auto __result = _swiftPart.getAllowFontScaling();
|
|
180
|
+
return __result;
|
|
181
|
+
}
|
|
182
|
+
inline void setAllowFontScaling(std::optional<bool> allowFontScaling) noexcept override {
|
|
183
|
+
_swiftPart.setAllowFontScaling(allowFontScaling);
|
|
184
|
+
}
|
|
185
|
+
inline std::optional<double> getMaxFontSizeMultiplier() noexcept override {
|
|
186
|
+
auto __result = _swiftPart.getMaxFontSizeMultiplier();
|
|
187
|
+
return __result;
|
|
188
|
+
}
|
|
189
|
+
inline void setMaxFontSizeMultiplier(std::optional<double> maxFontSizeMultiplier) noexcept override {
|
|
190
|
+
_swiftPart.setMaxFontSizeMultiplier(maxFontSizeMultiplier);
|
|
191
|
+
}
|
|
192
|
+
inline std::optional<bool> getIncludeFontPadding() noexcept override {
|
|
193
|
+
auto __result = _swiftPart.getIncludeFontPadding();
|
|
194
|
+
return __result;
|
|
195
|
+
}
|
|
196
|
+
inline void setIncludeFontPadding(std::optional<bool> includeFontPadding) noexcept override {
|
|
197
|
+
_swiftPart.setIncludeFontPadding(includeFontPadding);
|
|
198
|
+
}
|
|
199
|
+
inline std::optional<double> getNumberOfLines() noexcept override {
|
|
200
|
+
auto __result = _swiftPart.getNumberOfLines();
|
|
201
|
+
return __result;
|
|
202
|
+
}
|
|
203
|
+
inline void setNumberOfLines(std::optional<double> numberOfLines) noexcept override {
|
|
204
|
+
_swiftPart.setNumberOfLines(numberOfLines);
|
|
205
|
+
}
|
|
206
|
+
inline std::optional<StrokeTextEllipsizeMode> getEllipsizeMode() noexcept override {
|
|
207
|
+
auto __result = _swiftPart.getEllipsizeMode();
|
|
208
|
+
return __result;
|
|
209
|
+
}
|
|
210
|
+
inline void setEllipsizeMode(std::optional<StrokeTextEllipsizeMode> ellipsizeMode) noexcept override {
|
|
211
|
+
_swiftPart.setEllipsizeMode(ellipsizeMode);
|
|
212
|
+
}
|
|
213
|
+
inline std::optional<double> getPadding() noexcept override {
|
|
214
|
+
auto __result = _swiftPart.getPadding();
|
|
215
|
+
return __result;
|
|
216
|
+
}
|
|
217
|
+
inline void setPadding(std::optional<double> padding) noexcept override {
|
|
218
|
+
_swiftPart.setPadding(padding);
|
|
219
|
+
}
|
|
220
|
+
inline std::optional<double> getPaddingVertical() noexcept override {
|
|
221
|
+
auto __result = _swiftPart.getPaddingVertical();
|
|
222
|
+
return __result;
|
|
223
|
+
}
|
|
224
|
+
inline void setPaddingVertical(std::optional<double> paddingVertical) noexcept override {
|
|
225
|
+
_swiftPart.setPaddingVertical(paddingVertical);
|
|
226
|
+
}
|
|
227
|
+
inline std::optional<double> getPaddingHorizontal() noexcept override {
|
|
228
|
+
auto __result = _swiftPart.getPaddingHorizontal();
|
|
229
|
+
return __result;
|
|
230
|
+
}
|
|
231
|
+
inline void setPaddingHorizontal(std::optional<double> paddingHorizontal) noexcept override {
|
|
232
|
+
_swiftPart.setPaddingHorizontal(paddingHorizontal);
|
|
233
|
+
}
|
|
234
|
+
inline std::optional<double> getPaddingTop() noexcept override {
|
|
235
|
+
auto __result = _swiftPart.getPaddingTop();
|
|
236
|
+
return __result;
|
|
237
|
+
}
|
|
238
|
+
inline void setPaddingTop(std::optional<double> paddingTop) noexcept override {
|
|
239
|
+
_swiftPart.setPaddingTop(paddingTop);
|
|
240
|
+
}
|
|
241
|
+
inline std::optional<double> getPaddingRight() noexcept override {
|
|
242
|
+
auto __result = _swiftPart.getPaddingRight();
|
|
243
|
+
return __result;
|
|
244
|
+
}
|
|
245
|
+
inline void setPaddingRight(std::optional<double> paddingRight) noexcept override {
|
|
246
|
+
_swiftPart.setPaddingRight(paddingRight);
|
|
247
|
+
}
|
|
248
|
+
inline std::optional<double> getPaddingBottom() noexcept override {
|
|
249
|
+
auto __result = _swiftPart.getPaddingBottom();
|
|
250
|
+
return __result;
|
|
251
|
+
}
|
|
252
|
+
inline void setPaddingBottom(std::optional<double> paddingBottom) noexcept override {
|
|
253
|
+
_swiftPart.setPaddingBottom(paddingBottom);
|
|
254
|
+
}
|
|
255
|
+
inline std::optional<double> getPaddingLeft() noexcept override {
|
|
256
|
+
auto __result = _swiftPart.getPaddingLeft();
|
|
257
|
+
return __result;
|
|
258
|
+
}
|
|
259
|
+
inline void setPaddingLeft(std::optional<double> paddingLeft) noexcept override {
|
|
260
|
+
_swiftPart.setPaddingLeft(paddingLeft);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
public:
|
|
264
|
+
// Methods
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
private:
|
|
268
|
+
NitroStrokeText::HybridStrokeTextViewSpec_cxx _swiftPart;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
} // namespace margelo::nitro::stroketext
|