react-native-list 1.0.1 → 2.0.0-alpha.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/README.md +186 -32
- package/ReactNativeList.podspec +39 -0
- package/android/CMakeLists.txt +48 -0
- package/android/build.gradle +151 -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/JHybridUiListModule.cpp +192 -0
- package/android/src/main/cpp/JHybridUiListModule.h +50 -0
- package/android/src/main/cpp/cpp-adapter.cpp +12 -0
- package/android/src/main/java/com/hannojg/reactnativelist/ReactNativeListPackage.kt +27 -0
- package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridNativeListDataSource.kt +146 -0
- package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridNativeListLayout.kt +86 -0
- package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridUiListModule.kt +116 -0
- package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridUiListView.kt +410 -0
- package/android/src/main/java/com/margelo/nitro/reactnativelist/HybridViewHolder.kt +9 -0
- package/android/src/main/java/com/margelo/nitro/reactnativelist/NativeListAdapter.kt +217 -0
- package/ios/DataSource/HybridNativeListDataSource.swift +213 -0
- package/ios/HybridObjects/HybridUiListModule.swift +49 -0
- package/ios/HybridObjects/HybridViewHolder.swift +16 -0
- package/ios/Layout/HybridNativeListLayout.swift +128 -0
- package/ios/Utils/ErrorUtils.h +26 -0
- package/ios/Utils/HybridIOSWorkletsModuleProxyHolder.swift +10 -0
- package/ios/Utils/SurfaceHelper.h +20 -0
- package/ios/Utils/SurfaceHelper.mm +144 -0
- package/ios/Utils/SurfacePresenterRegistry.h +17 -0
- package/ios/Utils/SurfacePresenterRegistry.m +31 -0
- package/ios/Utils/TurboModuleInstaller.h +18 -0
- package/ios/Utils/TurboModuleInstaller.mm +267 -0
- package/ios/Views/HostCell.swift +216 -0
- package/ios/Views/HybridUiListView.swift +695 -0
- package/lib/ReactFabricMirror.d.ts +4 -0
- package/lib/ReactFabricMirror.js +515 -0
- package/lib/UiListModule.d.ts +2 -0
- package/lib/UiListModule.js +2 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +21 -0
- package/lib/privateGlobals.d.ts +14 -0
- package/lib/privateGlobals.js +2 -0
- package/lib/renderer/RenderHelper.d.ts +2 -0
- package/lib/renderer/RenderHelper.js +11 -0
- package/lib/renderer/UiManagerHelper.d.ts +2 -0
- package/lib/renderer/UiManagerHelper.js +2 -0
- package/lib/renderer/fabric/RenderHelper.d.ts +2 -0
- package/lib/renderer/fabric/RenderHelper.js +11 -0
- package/lib/renderer/fabric/UiManagerHelper.d.ts +2 -0
- package/lib/renderer/fabric/UiManagerHelper.js +2 -0
- package/lib/renderer/react/ReactFabricMirror.d.ts +4 -0
- package/lib/renderer/react/ReactFabricMirror.js +515 -0
- package/lib/renderer/react/ReactFabricRenderer.d.ts +3 -0
- package/lib/renderer/react/ReactFabricRenderer.js +9 -0
- package/lib/specs/IOSWorkletsModuleProxyHolder.nitro.d.ts +6 -0
- package/lib/specs/IOSWorkletsModuleProxyHolder.nitro.js +1 -0
- package/lib/specs/UIListModule.nitro.d.ts +9 -0
- package/lib/specs/UIListModule.nitro.js +1 -0
- package/lib/specs/UIManagerHelper.nitro.d.ts +13 -0
- package/lib/specs/UIManagerHelper.nitro.js +1 -0
- package/lib/specs/UiListView.nitro.d.ts +20 -0
- package/lib/specs/UiListView.nitro.js +1 -0
- package/lib/specs/ViewHolder.nitro.d.ts +6 -0
- package/lib/specs/ViewHolder.nitro.js +1 -0
- package/lib/views/List.d.ts +35 -0
- package/lib/views/List.js +225 -0
- package/lib/views/UiListHostComponent.d.ts +2 -0
- package/lib/views/UiListHostComponent.js +3 -0
- package/metro/RendererProxyThreadSwitch.js +66 -0
- package/metro-config.d.ts +1 -0
- package/metro-config.js +124 -0
- package/nitro.json +47 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/ReactNativeList+autolinking.cmake +99 -0
- package/nitrogen/generated/android/ReactNativeList+autolinking.gradle +27 -0
- package/nitrogen/generated/android/ReactNativeListOnLoad.cpp +156 -0
- package/nitrogen/generated/android/ReactNativeListOnLoad.hpp +34 -0
- package/nitrogen/generated/android/c++/JFunc_bool_NativeListItem_NativeListItem.hpp +83 -0
- package/nitrogen/generated/android/c++/JFunc_bool_double_NativeListItem_double.hpp +83 -0
- package/nitrogen/generated/android/c++/JFunc_double_std__string.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridIOSWorkletsModuleProxyHolderSpec.cpp +49 -0
- package/nitrogen/generated/android/c++/JHybridIOSWorkletsModuleProxyHolderSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridNativeLinearListLayoutSpec.cpp +63 -0
- package/nitrogen/generated/android/c++/JHybridNativeLinearListLayoutSpec.hpp +65 -0
- package/nitrogen/generated/android/c++/JHybridNativeListDataSourceSpec.cpp +101 -0
- package/nitrogen/generated/android/c++/JHybridNativeListDataSourceSpec.hpp +70 -0
- package/nitrogen/generated/android/c++/JHybridNativeListLayoutSpec.cpp +49 -0
- package/nitrogen/generated/android/c++/JHybridNativeListLayoutSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JHybridUiListModuleSpec.cpp +65 -0
- package/nitrogen/generated/android/c++/JHybridUiListModuleSpec.hpp +64 -0
- package/nitrogen/generated/android/c++/JHybridUiListViewSpec.cpp +92 -0
- package/nitrogen/generated/android/c++/JHybridUiListViewSpec.hpp +67 -0
- package/nitrogen/generated/android/c++/JHybridViewHolderSpec.cpp +49 -0
- package/nitrogen/generated/android/c++/JHybridViewHolderSpec.hpp +63 -0
- package/nitrogen/generated/android/c++/JNativeItemSizeEstimate.hpp +61 -0
- package/nitrogen/generated/android/c++/JNativeLinearListLayoutConfig.hpp +81 -0
- package/nitrogen/generated/android/c++/JNativeLinearListLayoutIOSConfig.hpp +59 -0
- package/nitrogen/generated/android/c++/JNativeListItem.hpp +76 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_HybridIOSWorkletsModuleProxyHolderSpec.cpp +26 -0
- package/nitrogen/generated/android/c++/JVariant_NullType_HybridIOSWorkletsModuleProxyHolderSpec.hpp +72 -0
- package/nitrogen/generated/android/c++/views/JHybridUiListViewStateUpdater.cpp +53 -0
- package/nitrogen/generated/android/c++/views/JHybridUiListViewStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/c++/views/JHybridViewHolderStateUpdater.cpp +53 -0
- package/nitrogen/generated/android/c++/views/JHybridViewHolderStateUpdater.hpp +49 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Func_bool_NativeListItem_NativeListItem.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Func_bool_double_NativeListItem_double.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Func_double_std__string.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridIOSWorkletsModuleProxyHolderSpec.kt +52 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridNativeLinearListLayoutSpec.kt +54 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridNativeListDataSourceSpec.kt +87 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridNativeListLayoutSpec.kt +52 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridUiListModuleSpec.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridUiListViewSpec.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/HybridViewHolderSpec.kt +53 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeItemSizeEstimate.kt +56 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeLinearListLayoutConfig.kt +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeLinearListLayoutIOSConfig.kt +51 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/NativeListItem.kt +71 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/ReactNativeListOnLoad.kt +35 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/Variant_NullType_HybridIOSWorkletsModuleProxyHolderSpec.kt +62 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridUiListViewManager.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridUiListViewStateUpdater.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridViewHolderManager.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativelist/views/HybridViewHolderStateUpdater.kt +23 -0
- package/nitrogen/generated/ios/ReactNativeList+autolinking.rb +62 -0
- package/nitrogen/generated/ios/ReactNativeList-Swift-Cxx-Bridge.cpp +162 -0
- package/nitrogen/generated/ios/ReactNativeList-Swift-Cxx-Bridge.hpp +368 -0
- package/nitrogen/generated/ios/ReactNativeList-Swift-Cxx-Umbrella.hpp +92 -0
- package/nitrogen/generated/ios/ReactNativeListAutolinking.mm +83 -0
- package/nitrogen/generated/ios/ReactNativeListAutolinking.swift +86 -0
- package/nitrogen/generated/ios/c++/HybridIOSWorkletsModuleProxyHolderSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridIOSWorkletsModuleProxyHolderSpecSwift.hpp +75 -0
- package/nitrogen/generated/ios/c++/HybridNativeLinearListLayoutSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNativeLinearListLayoutSpecSwift.hpp +92 -0
- package/nitrogen/generated/ios/c++/HybridNativeListDataSourceSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNativeListDataSourceSpecSwift.hpp +132 -0
- package/nitrogen/generated/ios/c++/HybridNativeListLayoutSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridNativeListLayoutSpecSwift.hpp +75 -0
- package/nitrogen/generated/ios/c++/HybridUiListModuleSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridUiListModuleSpecSwift.hpp +93 -0
- package/nitrogen/generated/ios/c++/HybridUiListViewSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridUiListViewSpecSwift.hpp +121 -0
- package/nitrogen/generated/ios/c++/HybridViewHolderSpecSwift.cpp +11 -0
- package/nitrogen/generated/ios/c++/HybridViewHolderSpecSwift.hpp +75 -0
- package/nitrogen/generated/ios/c++/views/HybridUiListViewComponent.mm +118 -0
- package/nitrogen/generated/ios/c++/views/HybridViewHolderComponent.mm +118 -0
- package/nitrogen/generated/ios/swift/Func_bool_NativeListItem_NativeListItem.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_bool_double_NativeListItem_double.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_double_std__string.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridIOSWorkletsModuleProxyHolderSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridIOSWorkletsModuleProxyHolderSpec_cxx.swift +128 -0
- package/nitrogen/generated/ios/swift/HybridNativeLinearListLayoutSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNativeLinearListLayoutSpec_cxx.swift +140 -0
- package/nitrogen/generated/ios/swift/HybridNativeListDataSourceSpec.swift +62 -0
- package/nitrogen/generated/ios/swift/HybridNativeListDataSourceSpec_cxx.swift +222 -0
- package/nitrogen/generated/ios/swift/HybridNativeListLayoutSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridNativeListLayoutSpec_cxx.swift +128 -0
- package/nitrogen/generated/ios/swift/HybridUiListModuleSpec.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridUiListModuleSpec_cxx.swift +175 -0
- package/nitrogen/generated/ios/swift/HybridUiListViewSpec.swift +59 -0
- package/nitrogen/generated/ios/swift/HybridUiListViewSpec_cxx.swift +227 -0
- package/nitrogen/generated/ios/swift/HybridViewHolderSpec.swift +55 -0
- package/nitrogen/generated/ios/swift/HybridViewHolderSpec_cxx.swift +147 -0
- package/nitrogen/generated/ios/swift/NativeItemSizeEstimate.swift +60 -0
- package/nitrogen/generated/ios/swift/NativeLinearListLayoutConfig.swift +60 -0
- package/nitrogen/generated/ios/swift/NativeLinearListLayoutIOSConfig.swift +35 -0
- package/nitrogen/generated/ios/swift/NativeListItem.swift +75 -0
- package/nitrogen/generated/ios/swift/Variant_NullType__any_HybridIOSWorkletsModuleProxyHolderSpec_.swift +30 -0
- package/nitrogen/generated/shared/c++/HybridIOSWorkletsModuleProxyHolderSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridIOSWorkletsModuleProxyHolderSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/HybridNativeLinearListLayoutSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridNativeLinearListLayoutSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridNativeListDataSourceSpec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridNativeListDataSourceSpec.hpp +72 -0
- package/nitrogen/generated/shared/c++/HybridNativeListLayoutSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridNativeListLayoutSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/HybridUiListModuleSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridUiListModuleSpec.hpp +68 -0
- package/nitrogen/generated/shared/c++/HybridUiListViewSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridUiListViewSpec.hpp +79 -0
- package/nitrogen/generated/shared/c++/HybridUiManagerHelperSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridUiManagerHelperSpec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridViewHolderSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridViewHolderSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/NativeItemSizeEstimate.hpp +87 -0
- package/nitrogen/generated/shared/c++/NativeLinearListLayoutConfig.hpp +105 -0
- package/nitrogen/generated/shared/c++/NativeLinearListLayoutIOSConfig.hpp +85 -0
- package/nitrogen/generated/shared/c++/NativeListItem.hpp +101 -0
- package/nitrogen/generated/shared/c++/views/HybridUiListViewComponent.cpp +72 -0
- package/nitrogen/generated/shared/c++/views/HybridUiListViewComponent.hpp +109 -0
- package/nitrogen/generated/shared/c++/views/HybridViewHolderComponent.cpp +72 -0
- package/nitrogen/generated/shared/c++/views/HybridViewHolderComponent.hpp +109 -0
- package/nitrogen/generated/shared/json/UiListViewConfig.json +9 -0
- package/nitrogen/generated/shared/json/ViewHolderConfig.json +9 -0
- package/package.json +152 -5
- package/react-native.config.js +16 -0
- package/src/ListDataSource.ts +232 -0
- package/src/ListLayout.ts +95 -0
- package/src/UiListModule.ts +5 -0
- package/src/hooks/useChangeEffect.ts +50 -0
- package/src/index.tsx +49 -0
- package/src/privateGlobals.ts +20 -0
- package/src/renderer/fabric/RenderHelper.ts +29 -0
- package/src/renderer/fabric/UiManagerHelper.ts +5 -0
- package/src/renderer/react/ReactFabricMirror.bundle.js +1984 -0
- package/src/renderer/react/ReactFabricMirror.ts +766 -0
- package/src/renderer/react/ReactFabricRenderer.ts +11 -0
- package/src/specs/IOSWorkletsModuleProxyHolder.nitro.ts +6 -0
- package/src/specs/NativeLinearListLayout.nitro.ts +23 -0
- package/src/specs/NativeListDataSource.nitro.ts +28 -0
- package/src/specs/NativeListLayout.nitro.ts +6 -0
- package/src/specs/UIListModule.nitro.ts +13 -0
- package/src/specs/UIManagerHelper.nitro.ts +34 -0
- package/src/specs/UiListView.nitro.ts +31 -0
- package/src/specs/ViewHolder.nitro.ts +11 -0
- package/src/views/List.tsx +525 -0
- package/src/views/UiListHostComponent.ts +8 -0
- package/FillRateHelper.js +0 -179
- package/FlatList.js +0 -494
- package/LICENSE.md +0 -31
- package/MetroListView.js +0 -166
- package/SectionList.js +0 -291
- package/ViewabilityHelper.js +0 -260
- package/VirtualizeUtils.js +0 -163
- package/VirtualizedList.js +0 -861
- package/VirtualizedSectionList.js +0 -397
- package/index.js +0 -5
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeListAutolinking.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 "ReactNativeList-Swift-Cxx-Umbrella.hpp"
|
|
11
|
+
#import <type_traits>
|
|
12
|
+
|
|
13
|
+
#include "HybridViewHolderSpecSwift.hpp"
|
|
14
|
+
#include "HybridUiListViewSpecSwift.hpp"
|
|
15
|
+
#include "HybridNativeListDataSourceSpecSwift.hpp"
|
|
16
|
+
#include "HybridNativeListLayoutSpecSwift.hpp"
|
|
17
|
+
#include "HybridNativeLinearListLayoutSpecSwift.hpp"
|
|
18
|
+
#include "HybridUiListModuleSpecSwift.hpp"
|
|
19
|
+
#include "HybridUiManagerHelper.hpp"
|
|
20
|
+
|
|
21
|
+
@interface ReactNativeListAutolinking : NSObject
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
@implementation ReactNativeListAutolinking
|
|
25
|
+
|
|
26
|
+
+ (void) load {
|
|
27
|
+
using namespace margelo::nitro;
|
|
28
|
+
using namespace margelo::nitro::reactnativelist;
|
|
29
|
+
|
|
30
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
31
|
+
"ViewHolder",
|
|
32
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
33
|
+
std::shared_ptr<HybridViewHolderSpec> hybridObject = ReactNativeList::ReactNativeListAutolinking::createViewHolder();
|
|
34
|
+
return hybridObject;
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
38
|
+
"UiListView",
|
|
39
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
40
|
+
std::shared_ptr<HybridUiListViewSpec> hybridObject = ReactNativeList::ReactNativeListAutolinking::createUiListView();
|
|
41
|
+
return hybridObject;
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
45
|
+
"NativeListDataSource",
|
|
46
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
47
|
+
std::shared_ptr<HybridNativeListDataSourceSpec> hybridObject = ReactNativeList::ReactNativeListAutolinking::createNativeListDataSource();
|
|
48
|
+
return hybridObject;
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
52
|
+
"NativeListLayout",
|
|
53
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
54
|
+
std::shared_ptr<HybridNativeListLayoutSpec> hybridObject = ReactNativeList::ReactNativeListAutolinking::createNativeListLayout();
|
|
55
|
+
return hybridObject;
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
59
|
+
"NativeLinearListLayout",
|
|
60
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
61
|
+
std::shared_ptr<HybridNativeLinearListLayoutSpec> hybridObject = ReactNativeList::ReactNativeListAutolinking::createNativeLinearListLayout();
|
|
62
|
+
return hybridObject;
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
66
|
+
"UiListModule",
|
|
67
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
68
|
+
std::shared_ptr<HybridUiListModuleSpec> hybridObject = ReactNativeList::ReactNativeListAutolinking::createUiListModule();
|
|
69
|
+
return hybridObject;
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
73
|
+
"UiManagerHelper",
|
|
74
|
+
[]() -> std::shared_ptr<HybridObject> {
|
|
75
|
+
static_assert(std::is_default_constructible_v<HybridUiManagerHelper>,
|
|
76
|
+
"The HybridObject \"HybridUiManagerHelper\" is not default-constructible! "
|
|
77
|
+
"Create a public constructor that takes zero arguments to be able to autolink this HybridObject.");
|
|
78
|
+
return std::make_shared<HybridUiManagerHelper>();
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
@end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// ReactNativeListAutolinking.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 ReactNativeListAutolinking {
|
|
13
|
+
public typealias bridge = margelo.nitro.reactnativelist.bridge.swift
|
|
14
|
+
|
|
15
|
+
public static func createViewHolder() -> bridge.std__shared_ptr_HybridViewHolderSpec_ {
|
|
16
|
+
let hybridObject = HybridViewHolder()
|
|
17
|
+
return { () -> bridge.std__shared_ptr_HybridViewHolderSpec_ in
|
|
18
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
19
|
+
return __cxxWrapped.getCxxPart()
|
|
20
|
+
}()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func isViewHolderRecyclable() -> Bool {
|
|
24
|
+
return HybridViewHolder.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static func createUiListView() -> bridge.std__shared_ptr_HybridUiListViewSpec_ {
|
|
28
|
+
let hybridObject = HybridUiListView()
|
|
29
|
+
return { () -> bridge.std__shared_ptr_HybridUiListViewSpec_ in
|
|
30
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
31
|
+
return __cxxWrapped.getCxxPart()
|
|
32
|
+
}()
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public static func isUiListViewRecyclable() -> Bool {
|
|
36
|
+
return HybridUiListView.self is any RecyclableView.Type
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public static func createNativeListDataSource() -> bridge.std__shared_ptr_HybridNativeListDataSourceSpec_ {
|
|
40
|
+
let hybridObject = HybridNativeListDataSource()
|
|
41
|
+
return { () -> bridge.std__shared_ptr_HybridNativeListDataSourceSpec_ in
|
|
42
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
43
|
+
return __cxxWrapped.getCxxPart()
|
|
44
|
+
}()
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public static func isNativeListDataSourceRecyclable() -> Bool {
|
|
48
|
+
return HybridNativeListDataSource.self is any RecyclableView.Type
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public static func createNativeListLayout() -> bridge.std__shared_ptr_HybridNativeListLayoutSpec_ {
|
|
52
|
+
let hybridObject = HybridNativeListLayout()
|
|
53
|
+
return { () -> bridge.std__shared_ptr_HybridNativeListLayoutSpec_ in
|
|
54
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
55
|
+
return __cxxWrapped.getCxxPart()
|
|
56
|
+
}()
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public static func isNativeListLayoutRecyclable() -> Bool {
|
|
60
|
+
return HybridNativeListLayout.self is any RecyclableView.Type
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public static func createNativeLinearListLayout() -> bridge.std__shared_ptr_HybridNativeLinearListLayoutSpec_ {
|
|
64
|
+
let hybridObject = HybridNativeLinearListLayout()
|
|
65
|
+
return { () -> bridge.std__shared_ptr_HybridNativeLinearListLayoutSpec_ in
|
|
66
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
67
|
+
return __cxxWrapped.getCxxPart()
|
|
68
|
+
}()
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public static func isNativeLinearListLayoutRecyclable() -> Bool {
|
|
72
|
+
return HybridNativeLinearListLayout.self is any RecyclableView.Type
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public static func createUiListModule() -> bridge.std__shared_ptr_HybridUiListModuleSpec_ {
|
|
76
|
+
let hybridObject = HybridUiListModule()
|
|
77
|
+
return { () -> bridge.std__shared_ptr_HybridUiListModuleSpec_ in
|
|
78
|
+
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
79
|
+
return __cxxWrapped.getCxxPart()
|
|
80
|
+
}()
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public static func isUiListModuleRecyclable() -> Bool {
|
|
84
|
+
return HybridUiListModule.self is any RecyclableView.Type
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridIOSWorkletsModuleProxyHolderSpecSwift.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 "HybridIOSWorkletsModuleProxyHolderSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::reactnativelist {
|
|
11
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridIOSWorkletsModuleProxyHolderSpecSwift.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 "HybridIOSWorkletsModuleProxyHolderSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridIOSWorkletsModuleProxyHolderSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace ReactNativeList { class HybridIOSWorkletsModuleProxyHolderSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
#include "ReactNativeList-Swift-Cxx-Umbrella.hpp"
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::reactnativelist {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The C++ part of HybridIOSWorkletsModuleProxyHolderSpec_cxx.swift.
|
|
25
|
+
*
|
|
26
|
+
* HybridIOSWorkletsModuleProxyHolderSpecSwift (C++) accesses HybridIOSWorkletsModuleProxyHolderSpec_cxx (Swift), and might
|
|
27
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
28
|
+
*
|
|
29
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
30
|
+
* the future, HybridIOSWorkletsModuleProxyHolderSpec_cxx can directly inherit from the C++ class HybridIOSWorkletsModuleProxyHolderSpec
|
|
31
|
+
* to simplify the whole structure and memory management.
|
|
32
|
+
*/
|
|
33
|
+
class HybridIOSWorkletsModuleProxyHolderSpecSwift: public virtual HybridIOSWorkletsModuleProxyHolderSpec {
|
|
34
|
+
public:
|
|
35
|
+
// Constructor from a Swift instance
|
|
36
|
+
explicit HybridIOSWorkletsModuleProxyHolderSpecSwift(const ReactNativeList::HybridIOSWorkletsModuleProxyHolderSpec_cxx& swiftPart):
|
|
37
|
+
HybridObject(HybridIOSWorkletsModuleProxyHolderSpec::TAG),
|
|
38
|
+
_swiftPart(swiftPart) { }
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
// Get the Swift part
|
|
42
|
+
inline ReactNativeList::HybridIOSWorkletsModuleProxyHolderSpec_cxx& getSwiftPart() noexcept {
|
|
43
|
+
return _swiftPart;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
48
|
+
return _swiftPart.getMemorySize();
|
|
49
|
+
}
|
|
50
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
51
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridIOSWorkletsModuleProxyHolderSpecSwift>(other)) {
|
|
52
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
void dispose() noexcept override {
|
|
57
|
+
_swiftPart.dispose();
|
|
58
|
+
}
|
|
59
|
+
std::string toString() override {
|
|
60
|
+
return _swiftPart.toString();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
// Properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
// Methods
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
ReactNativeList::HybridIOSWorkletsModuleProxyHolderSpec_cxx _swiftPart;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNativeLinearListLayoutSpecSwift.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 "HybridNativeLinearListLayoutSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::reactnativelist {
|
|
11
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNativeLinearListLayoutSpecSwift.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 "HybridNativeLinearListLayoutSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridNativeLinearListLayoutSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace ReactNativeList { class HybridNativeLinearListLayoutSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `NativeLinearListLayoutConfig` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::reactnativelist { struct NativeLinearListLayoutConfig; }
|
|
17
|
+
// Forward declaration of `NativeLinearListLayoutIOSConfig` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::reactnativelist { struct NativeLinearListLayoutIOSConfig; }
|
|
19
|
+
// Forward declaration of `NativeItemSizeEstimate` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::reactnativelist { struct NativeItemSizeEstimate; }
|
|
21
|
+
// Forward declaration of `HybridNativeListLayoutSpecSwift` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::reactnativelist { class HybridNativeListLayoutSpecSwift; }
|
|
23
|
+
|
|
24
|
+
#include "NativeLinearListLayoutConfig.hpp"
|
|
25
|
+
#include "NativeLinearListLayoutIOSConfig.hpp"
|
|
26
|
+
#include <optional>
|
|
27
|
+
#include "NativeItemSizeEstimate.hpp"
|
|
28
|
+
#include "HybridNativeListLayoutSpecSwift.hpp"
|
|
29
|
+
|
|
30
|
+
#include "ReactNativeList-Swift-Cxx-Umbrella.hpp"
|
|
31
|
+
|
|
32
|
+
namespace margelo::nitro::reactnativelist {
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The C++ part of HybridNativeLinearListLayoutSpec_cxx.swift.
|
|
36
|
+
*
|
|
37
|
+
* HybridNativeLinearListLayoutSpecSwift (C++) accesses HybridNativeLinearListLayoutSpec_cxx (Swift), and might
|
|
38
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
39
|
+
*
|
|
40
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
41
|
+
* the future, HybridNativeLinearListLayoutSpec_cxx can directly inherit from the C++ class HybridNativeLinearListLayoutSpec
|
|
42
|
+
* to simplify the whole structure and memory management.
|
|
43
|
+
*/
|
|
44
|
+
class HybridNativeLinearListLayoutSpecSwift: public virtual HybridNativeLinearListLayoutSpec, public virtual HybridNativeListLayoutSpecSwift {
|
|
45
|
+
public:
|
|
46
|
+
// Constructor from a Swift instance
|
|
47
|
+
explicit HybridNativeLinearListLayoutSpecSwift(const ReactNativeList::HybridNativeLinearListLayoutSpec_cxx& swiftPart):
|
|
48
|
+
HybridObject(HybridNativeLinearListLayoutSpec::TAG),
|
|
49
|
+
HybridNativeListLayoutSpecSwift(swiftPart),
|
|
50
|
+
_swiftPart(swiftPart) { }
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
// Get the Swift part
|
|
54
|
+
inline ReactNativeList::HybridNativeLinearListLayoutSpec_cxx& getSwiftPart() noexcept {
|
|
55
|
+
return _swiftPart;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
public:
|
|
59
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
60
|
+
return _swiftPart.getMemorySize();
|
|
61
|
+
}
|
|
62
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
63
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridNativeLinearListLayoutSpecSwift>(other)) {
|
|
64
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
65
|
+
}
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
void dispose() noexcept override {
|
|
69
|
+
_swiftPart.dispose();
|
|
70
|
+
}
|
|
71
|
+
std::string toString() override {
|
|
72
|
+
return _swiftPart.toString();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public:
|
|
76
|
+
// Properties
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
public:
|
|
80
|
+
// Methods
|
|
81
|
+
inline void setConfig(const NativeLinearListLayoutConfig& config) override {
|
|
82
|
+
auto __result = _swiftPart.setConfig(std::forward<decltype(config)>(config));
|
|
83
|
+
if (__result.hasError()) [[unlikely]] {
|
|
84
|
+
std::rethrow_exception(__result.error());
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private:
|
|
89
|
+
ReactNativeList::HybridNativeLinearListLayoutSpec_cxx _swiftPart;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNativeListDataSourceSpecSwift.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 "HybridNativeListDataSourceSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::reactnativelist {
|
|
11
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNativeListDataSourceSpecSwift.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 "HybridNativeListDataSourceSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridNativeListDataSourceSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace ReactNativeList { class HybridNativeListDataSourceSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
// Forward declaration of `NativeListItem` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::reactnativelist { struct NativeListItem; }
|
|
17
|
+
|
|
18
|
+
#include "NativeListItem.hpp"
|
|
19
|
+
#include <functional>
|
|
20
|
+
#include <string>
|
|
21
|
+
#include <optional>
|
|
22
|
+
#include <NitroModules/AnyMap.hpp>
|
|
23
|
+
#include <vector>
|
|
24
|
+
|
|
25
|
+
#include "ReactNativeList-Swift-Cxx-Umbrella.hpp"
|
|
26
|
+
|
|
27
|
+
namespace margelo::nitro::reactnativelist {
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The C++ part of HybridNativeListDataSourceSpec_cxx.swift.
|
|
31
|
+
*
|
|
32
|
+
* HybridNativeListDataSourceSpecSwift (C++) accesses HybridNativeListDataSourceSpec_cxx (Swift), and might
|
|
33
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
34
|
+
*
|
|
35
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
36
|
+
* the future, HybridNativeListDataSourceSpec_cxx can directly inherit from the C++ class HybridNativeListDataSourceSpec
|
|
37
|
+
* to simplify the whole structure and memory management.
|
|
38
|
+
*/
|
|
39
|
+
class HybridNativeListDataSourceSpecSwift: public virtual HybridNativeListDataSourceSpec {
|
|
40
|
+
public:
|
|
41
|
+
// Constructor from a Swift instance
|
|
42
|
+
explicit HybridNativeListDataSourceSpecSwift(const ReactNativeList::HybridNativeListDataSourceSpec_cxx& swiftPart):
|
|
43
|
+
HybridObject(HybridNativeListDataSourceSpec::TAG),
|
|
44
|
+
_swiftPart(swiftPart) { }
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
// Get the Swift part
|
|
48
|
+
inline ReactNativeList::HybridNativeListDataSourceSpec_cxx& getSwiftPart() noexcept {
|
|
49
|
+
return _swiftPart;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
54
|
+
return _swiftPart.getMemorySize();
|
|
55
|
+
}
|
|
56
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
57
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridNativeListDataSourceSpecSwift>(other)) {
|
|
58
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
59
|
+
}
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
void dispose() noexcept override {
|
|
63
|
+
_swiftPart.dispose();
|
|
64
|
+
}
|
|
65
|
+
std::string toString() override {
|
|
66
|
+
return _swiftPart.toString();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
public:
|
|
70
|
+
// Properties
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
public:
|
|
74
|
+
// Methods
|
|
75
|
+
inline void setContentEqualCallback(const std::function<bool(const NativeListItem& /* oldItem */, const NativeListItem& /* newItem */)>& isContentEqual) override {
|
|
76
|
+
auto __result = _swiftPart.setContentEqualCallback(isContentEqual);
|
|
77
|
+
if (__result.hasError()) [[unlikely]] {
|
|
78
|
+
std::rethrow_exception(__result.error());
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
inline void replaceData(const std::vector<NativeListItem>& items, bool animated) override {
|
|
82
|
+
auto __result = _swiftPart.replaceData(items, std::forward<decltype(animated)>(animated));
|
|
83
|
+
if (__result.hasError()) [[unlikely]] {
|
|
84
|
+
std::rethrow_exception(__result.error());
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
inline void insertItem(double index, const NativeListItem& item) override {
|
|
88
|
+
auto __result = _swiftPart.insertItem(std::forward<decltype(index)>(index), std::forward<decltype(item)>(item));
|
|
89
|
+
if (__result.hasError()) [[unlikely]] {
|
|
90
|
+
std::rethrow_exception(__result.error());
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
inline void updateItem(double index, const NativeListItem& item) override {
|
|
94
|
+
auto __result = _swiftPart.updateItem(std::forward<decltype(index)>(index), std::forward<decltype(item)>(item));
|
|
95
|
+
if (__result.hasError()) [[unlikely]] {
|
|
96
|
+
std::rethrow_exception(__result.error());
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
inline void removeItem(double index) override {
|
|
100
|
+
auto __result = _swiftPart.removeItem(std::forward<decltype(index)>(index));
|
|
101
|
+
if (__result.hasError()) [[unlikely]] {
|
|
102
|
+
std::rethrow_exception(__result.error());
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
inline void moveItem(double fromIndex, double toIndex) override {
|
|
106
|
+
auto __result = _swiftPart.moveItem(std::forward<decltype(fromIndex)>(fromIndex), std::forward<decltype(toIndex)>(toIndex));
|
|
107
|
+
if (__result.hasError()) [[unlikely]] {
|
|
108
|
+
std::rethrow_exception(__result.error());
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
inline double getCount() override {
|
|
112
|
+
auto __result = _swiftPart.getCount();
|
|
113
|
+
if (__result.hasError()) [[unlikely]] {
|
|
114
|
+
std::rethrow_exception(__result.error());
|
|
115
|
+
}
|
|
116
|
+
auto __value = std::move(__result.value());
|
|
117
|
+
return __value;
|
|
118
|
+
}
|
|
119
|
+
inline NativeListItem getItem(double index) override {
|
|
120
|
+
auto __result = _swiftPart.getItem(std::forward<decltype(index)>(index));
|
|
121
|
+
if (__result.hasError()) [[unlikely]] {
|
|
122
|
+
std::rethrow_exception(__result.error());
|
|
123
|
+
}
|
|
124
|
+
auto __value = std::move(__result.value());
|
|
125
|
+
return __value;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
private:
|
|
129
|
+
ReactNativeList::HybridNativeListDataSourceSpec_cxx _swiftPart;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNativeListLayoutSpecSwift.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 "HybridNativeListLayoutSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::reactnativelist {
|
|
11
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridNativeListLayoutSpecSwift.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 "HybridNativeListLayoutSpec.hpp"
|
|
11
|
+
|
|
12
|
+
// Forward declaration of `HybridNativeListLayoutSpec_cxx` to properly resolve imports.
|
|
13
|
+
namespace ReactNativeList { class HybridNativeListLayoutSpec_cxx; }
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
#include "ReactNativeList-Swift-Cxx-Umbrella.hpp"
|
|
20
|
+
|
|
21
|
+
namespace margelo::nitro::reactnativelist {
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The C++ part of HybridNativeListLayoutSpec_cxx.swift.
|
|
25
|
+
*
|
|
26
|
+
* HybridNativeListLayoutSpecSwift (C++) accesses HybridNativeListLayoutSpec_cxx (Swift), and might
|
|
27
|
+
* contain some additional bridging code for C++ <> Swift interop.
|
|
28
|
+
*
|
|
29
|
+
* Since this obviously introduces an overhead, I hope at some point in
|
|
30
|
+
* the future, HybridNativeListLayoutSpec_cxx can directly inherit from the C++ class HybridNativeListLayoutSpec
|
|
31
|
+
* to simplify the whole structure and memory management.
|
|
32
|
+
*/
|
|
33
|
+
class HybridNativeListLayoutSpecSwift: public virtual HybridNativeListLayoutSpec {
|
|
34
|
+
public:
|
|
35
|
+
// Constructor from a Swift instance
|
|
36
|
+
explicit HybridNativeListLayoutSpecSwift(const ReactNativeList::HybridNativeListLayoutSpec_cxx& swiftPart):
|
|
37
|
+
HybridObject(HybridNativeListLayoutSpec::TAG),
|
|
38
|
+
_swiftPart(swiftPart) { }
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
// Get the Swift part
|
|
42
|
+
inline ReactNativeList::HybridNativeListLayoutSpec_cxx& getSwiftPart() noexcept {
|
|
43
|
+
return _swiftPart;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
public:
|
|
47
|
+
inline size_t getExternalMemorySize() noexcept override {
|
|
48
|
+
return _swiftPart.getMemorySize();
|
|
49
|
+
}
|
|
50
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
51
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridNativeListLayoutSpecSwift>(other)) {
|
|
52
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
void dispose() noexcept override {
|
|
57
|
+
_swiftPart.dispose();
|
|
58
|
+
}
|
|
59
|
+
std::string toString() override {
|
|
60
|
+
return _swiftPart.toString();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public:
|
|
64
|
+
// Properties
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
public:
|
|
68
|
+
// Methods
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
private:
|
|
72
|
+
ReactNativeList::HybridNativeListLayoutSpec_cxx _swiftPart;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro::reactnativelist
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// HybridUiListModuleSpecSwift.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 "HybridUiListModuleSpecSwift.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::reactnativelist {
|
|
11
|
+
} // namespace margelo::nitro::reactnativelist
|