@onekeyfe/react-native-segment-slider 3.0.45 → 3.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/margelo/nitro/segmentslider/HybridSegmentSlider.kt +50 -2
- package/ios/HybridSegmentSlider.swift +52 -1
- package/lib/nitrogen/generated/android/c++/JHybridSegmentSliderSpec.cpp +9 -0
- package/lib/nitrogen/generated/android/c++/JHybridSegmentSliderSpec.hpp +2 -0
- package/lib/nitrogen/generated/android/c++/views/JHybridSegmentSliderStateUpdater.cpp +4 -0
- package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/HybridSegmentSliderSpec.kt +6 -0
- package/lib/nitrogen/generated/ios/c++/HybridSegmentSliderSpecSwift.hpp +6 -0
- package/lib/nitrogen/generated/ios/c++/views/HybridSegmentSliderComponent.mm +5 -0
- package/lib/nitrogen/generated/ios/swift/HybridSegmentSliderSpec.swift +1 -0
- package/lib/nitrogen/generated/ios/swift/HybridSegmentSliderSpec_cxx.swift +11 -0
- package/lib/nitrogen/generated/shared/c++/HybridSegmentSliderSpec.cpp +2 -0
- package/lib/nitrogen/generated/shared/c++/HybridSegmentSliderSpec.hpp +2 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridSegmentSliderComponent.cpp +12 -0
- package/lib/nitrogen/generated/shared/c++/views/HybridSegmentSliderComponent.hpp +1 -0
- package/lib/nitrogen/generated/shared/json/SegmentSliderConfig.json +1 -0
- package/lib/typescript/src/SegmentSlider.nitro.d.ts +7 -0
- package/lib/typescript/src/SegmentSlider.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JHybridSegmentSliderSpec.cpp +9 -0
- package/nitrogen/generated/android/c++/JHybridSegmentSliderSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/views/JHybridSegmentSliderStateUpdater.cpp +4 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/HybridSegmentSliderSpec.kt +6 -0
- package/nitrogen/generated/ios/c++/HybridSegmentSliderSpecSwift.hpp +6 -0
- package/nitrogen/generated/ios/c++/views/HybridSegmentSliderComponent.mm +5 -0
- package/nitrogen/generated/ios/swift/HybridSegmentSliderSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridSegmentSliderSpec_cxx.swift +11 -0
- package/nitrogen/generated/shared/c++/HybridSegmentSliderSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridSegmentSliderSpec.hpp +2 -0
- package/nitrogen/generated/shared/c++/views/HybridSegmentSliderComponent.cpp +12 -0
- package/nitrogen/generated/shared/c++/views/HybridSegmentSliderComponent.hpp +1 -0
- package/nitrogen/generated/shared/json/SegmentSliderConfig.json +1 -0
- package/package.json +2 -2
- package/src/SegmentSlider.nitro.ts +7 -0
- package/lib/nitrogen/nitrogen/generated/android/c++/JFunc_void.hpp +0 -75
- package/lib/nitrogen/nitrogen/generated/android/c++/JFunc_void_double.hpp +0 -75
- package/lib/nitrogen/nitrogen/generated/android/c++/JHybridSegmentSliderSpec.cpp +0 -265
- package/lib/nitrogen/nitrogen/generated/android/c++/JHybridSegmentSliderSpec.hpp +0 -106
- package/lib/nitrogen/nitrogen/generated/android/c++/views/JHybridSegmentSliderStateUpdater.cpp +0 -136
- package/lib/nitrogen/nitrogen/generated/android/c++/views/JHybridSegmentSliderStateUpdater.hpp +0 -49
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/Func_void.kt +0 -80
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/Func_void_double.kt +0 -80
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/HybridSegmentSliderSpec.kt +0 -203
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/segmentsliderOnLoad.kt +0 -35
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/views/HybridSegmentSliderManager.kt +0 -50
- package/lib/nitrogen/nitrogen/generated/android/kotlin/com/margelo/nitro/segmentslider/views/HybridSegmentSliderStateUpdater.kt +0 -23
- package/lib/nitrogen/nitrogen/generated/android/segmentslider+autolinking.cmake +0 -83
- package/lib/nitrogen/nitrogen/generated/android/segmentslider+autolinking.gradle +0 -27
- package/lib/nitrogen/nitrogen/generated/android/segmentsliderOnLoad.cpp +0 -50
- package/lib/nitrogen/nitrogen/generated/android/segmentsliderOnLoad.hpp +0 -25
- package/lib/nitrogen/nitrogen/generated/ios/SegmentSlider+autolinking.rb +0 -60
- package/lib/nitrogen/nitrogen/generated/ios/SegmentSlider-Swift-Cxx-Bridge.cpp +0 -49
- package/lib/nitrogen/nitrogen/generated/ios/SegmentSlider-Swift-Cxx-Bridge.hpp +0 -116
- package/lib/nitrogen/nitrogen/generated/ios/SegmentSlider-Swift-Cxx-Umbrella.hpp +0 -44
- package/lib/nitrogen/nitrogen/generated/ios/SegmentSliderAutolinking.mm +0 -33
- package/lib/nitrogen/nitrogen/generated/ios/SegmentSliderAutolinking.swift +0 -25
- package/lib/nitrogen/nitrogen/generated/ios/c++/HybridSegmentSliderSpecSwift.cpp +0 -11
- package/lib/nitrogen/nitrogen/generated/ios/c++/HybridSegmentSliderSpecSwift.hpp +0 -208
- package/lib/nitrogen/nitrogen/generated/ios/c++/views/HybridSegmentSliderComponent.mm +0 -196
- package/lib/nitrogen/nitrogen/generated/ios/swift/Func_void.swift +0 -47
- package/lib/nitrogen/nitrogen/generated/ios/swift/Func_void_double.swift +0 -47
- package/lib/nitrogen/nitrogen/generated/ios/swift/HybridSegmentSliderSpec.swift +0 -76
- package/lib/nitrogen/nitrogen/generated/ios/swift/HybridSegmentSliderSpec_cxx.swift +0 -423
- package/lib/nitrogen/nitrogen/generated/shared/c++/HybridSegmentSliderSpec.cpp +0 -62
- package/lib/nitrogen/nitrogen/generated/shared/c++/HybridSegmentSliderSpec.hpp +0 -105
- package/lib/nitrogen/nitrogen/generated/shared/c++/views/HybridSegmentSliderComponent.cpp +0 -327
- package/lib/nitrogen/nitrogen/generated/shared/c++/views/HybridSegmentSliderComponent.hpp +0 -128
- package/lib/nitrogen/nitrogen/generated/shared/json/SegmentSliderConfig.json +0 -30
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// segmentsliderOnLoad.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#include <jni.h>
|
|
9
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
10
|
-
|
|
11
|
-
namespace margelo::nitro::segmentslider {
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Initializes the native (C++) part of segmentslider, and autolinks all Hybrid Objects.
|
|
15
|
-
* Call this in your `JNI_OnLoad` function (probably inside `cpp-adapter.cpp`).
|
|
16
|
-
* Example:
|
|
17
|
-
* ```cpp (cpp-adapter.cpp)
|
|
18
|
-
* JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void*) {
|
|
19
|
-
* return margelo::nitro::segmentslider::initialize(vm);
|
|
20
|
-
* }
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
int initialize(JavaVM* vm);
|
|
24
|
-
|
|
25
|
-
} // namespace margelo::nitro::segmentslider
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#
|
|
2
|
-
# SegmentSlider+autolinking.rb
|
|
3
|
-
# This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
# https://github.com/mrousavy/nitro
|
|
5
|
-
# Copyright © 2026 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/SegmentSlider+autolinking.rb'
|
|
18
|
-
# add_nitrogen_files(spec)
|
|
19
|
-
# end
|
|
20
|
-
# ```
|
|
21
|
-
|
|
22
|
-
def add_nitrogen_files(spec)
|
|
23
|
-
Pod::UI.puts "[NitroModules] 🔥 SegmentSlider 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/SegmentSlider-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 C)
|
|
56
|
-
"SWIFT_OBJC_INTEROP_MODE" => "objcxx",
|
|
57
|
-
# Enables stricter modular headers
|
|
58
|
-
"DEFINES_MODULE" => "YES",
|
|
59
|
-
})
|
|
60
|
-
end
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// SegmentSlider-Swift-Cxx-Bridge.cpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#include "SegmentSlider-Swift-Cxx-Bridge.hpp"
|
|
9
|
-
|
|
10
|
-
// Include C++ implementation defined types
|
|
11
|
-
#include "HybridSegmentSliderSpecSwift.hpp"
|
|
12
|
-
#include "SegmentSlider-Swift-Cxx-Umbrella.hpp"
|
|
13
|
-
#include <NitroModules/NitroDefines.hpp>
|
|
14
|
-
|
|
15
|
-
namespace margelo::nitro::segmentslider::bridge::swift {
|
|
16
|
-
|
|
17
|
-
// pragma MARK: std::function<void(double /* value */)>
|
|
18
|
-
Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
19
|
-
auto swiftClosure = SegmentSlider::Func_void_double::fromUnsafe(swiftClosureWrapper);
|
|
20
|
-
return [swiftClosure = std::move(swiftClosure)](double value) mutable -> void {
|
|
21
|
-
swiftClosure.call(value);
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// pragma MARK: std::function<void()>
|
|
26
|
-
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
27
|
-
auto swiftClosure = SegmentSlider::Func_void::fromUnsafe(swiftClosureWrapper);
|
|
28
|
-
return [swiftClosure = std::move(swiftClosure)]() mutable -> void {
|
|
29
|
-
swiftClosure.call();
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// pragma MARK: std::shared_ptr<HybridSegmentSliderSpec>
|
|
34
|
-
std::shared_ptr<HybridSegmentSliderSpec> create_std__shared_ptr_HybridSegmentSliderSpec_(void* NON_NULL swiftUnsafePointer) noexcept {
|
|
35
|
-
SegmentSlider::HybridSegmentSliderSpec_cxx swiftPart = SegmentSlider::HybridSegmentSliderSpec_cxx::fromUnsafe(swiftUnsafePointer);
|
|
36
|
-
return std::make_shared<margelo::nitro::segmentslider::HybridSegmentSliderSpecSwift>(swiftPart);
|
|
37
|
-
}
|
|
38
|
-
void* NON_NULL get_std__shared_ptr_HybridSegmentSliderSpec_(std__shared_ptr_HybridSegmentSliderSpec_ cppType) {
|
|
39
|
-
std::shared_ptr<margelo::nitro::segmentslider::HybridSegmentSliderSpecSwift> swiftWrapper = std::dynamic_pointer_cast<margelo::nitro::segmentslider::HybridSegmentSliderSpecSwift>(cppType);
|
|
40
|
-
#ifdef NITRO_DEBUG
|
|
41
|
-
if (swiftWrapper == nullptr) [[unlikely]] {
|
|
42
|
-
throw std::runtime_error("Class \"HybridSegmentSliderSpec\" is not implemented in Swift!");
|
|
43
|
-
}
|
|
44
|
-
#endif
|
|
45
|
-
SegmentSlider::HybridSegmentSliderSpec_cxx& swiftPart = swiftWrapper->getSwiftPart();
|
|
46
|
-
return swiftPart.toUnsafe();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
} // namespace margelo::nitro::segmentslider::bridge::swift
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// SegmentSlider-Swift-Cxx-Bridge.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `HybridSegmentSliderSpec` to properly resolve imports.
|
|
12
|
-
namespace margelo::nitro::segmentslider { class HybridSegmentSliderSpec; }
|
|
13
|
-
|
|
14
|
-
// Forward declarations of Swift defined types
|
|
15
|
-
// Forward declaration of `HybridSegmentSliderSpec_cxx` to properly resolve imports.
|
|
16
|
-
namespace SegmentSlider { class HybridSegmentSliderSpec_cxx; }
|
|
17
|
-
|
|
18
|
-
// Include C++ defined types
|
|
19
|
-
#include "HybridSegmentSliderSpec.hpp"
|
|
20
|
-
#include <functional>
|
|
21
|
-
#include <memory>
|
|
22
|
-
#include <optional>
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Contains specialized versions of C++ templated types so they can be accessed from Swift,
|
|
26
|
-
* as well as helper functions to interact with those C++ types from Swift.
|
|
27
|
-
*/
|
|
28
|
-
namespace margelo::nitro::segmentslider::bridge::swift {
|
|
29
|
-
|
|
30
|
-
// pragma MARK: std::function<void(double /* value */)>
|
|
31
|
-
/**
|
|
32
|
-
* Specialized version of `std::function<void(double)>`.
|
|
33
|
-
*/
|
|
34
|
-
using Func_void_double = std::function<void(double /* value */)>;
|
|
35
|
-
/**
|
|
36
|
-
* Wrapper class for a `std::function<void(double / * value * /)>`, this can be used from Swift.
|
|
37
|
-
*/
|
|
38
|
-
class Func_void_double_Wrapper final {
|
|
39
|
-
public:
|
|
40
|
-
explicit Func_void_double_Wrapper(std::function<void(double /* value */)>&& func): _function(std::make_unique<std::function<void(double /* value */)>>(std::move(func))) {}
|
|
41
|
-
inline void call(double value) const noexcept {
|
|
42
|
-
_function->operator()(value);
|
|
43
|
-
}
|
|
44
|
-
private:
|
|
45
|
-
std::unique_ptr<std::function<void(double /* value */)>> _function;
|
|
46
|
-
} SWIFT_NONCOPYABLE;
|
|
47
|
-
Func_void_double create_Func_void_double(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
48
|
-
inline Func_void_double_Wrapper wrap_Func_void_double(Func_void_double value) noexcept {
|
|
49
|
-
return Func_void_double_Wrapper(std::move(value));
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// pragma MARK: std::optional<std::function<void(double /* value */)>>
|
|
53
|
-
/**
|
|
54
|
-
* Specialized version of `std::optional<std::function<void(double / * value * /)>>`.
|
|
55
|
-
*/
|
|
56
|
-
using std__optional_std__function_void_double____value______ = std::optional<std::function<void(double /* value */)>>;
|
|
57
|
-
inline std::optional<std::function<void(double /* value */)>> create_std__optional_std__function_void_double____value______(const std::function<void(double /* value */)>& value) noexcept {
|
|
58
|
-
return std::optional<std::function<void(double /* value */)>>(value);
|
|
59
|
-
}
|
|
60
|
-
inline bool has_value_std__optional_std__function_void_double____value______(const std::optional<std::function<void(double /* value */)>>& optional) noexcept {
|
|
61
|
-
return optional.has_value();
|
|
62
|
-
}
|
|
63
|
-
inline std::function<void(double /* value */)> get_std__optional_std__function_void_double____value______(const std::optional<std::function<void(double /* value */)>>& optional) noexcept {
|
|
64
|
-
return *optional;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// pragma MARK: std::function<void()>
|
|
68
|
-
/**
|
|
69
|
-
* Specialized version of `std::function<void()>`.
|
|
70
|
-
*/
|
|
71
|
-
using Func_void = std::function<void()>;
|
|
72
|
-
/**
|
|
73
|
-
* Wrapper class for a `std::function<void()>`, this can be used from Swift.
|
|
74
|
-
*/
|
|
75
|
-
class Func_void_Wrapper final {
|
|
76
|
-
public:
|
|
77
|
-
explicit Func_void_Wrapper(std::function<void()>&& func): _function(std::make_unique<std::function<void()>>(std::move(func))) {}
|
|
78
|
-
inline void call() const noexcept {
|
|
79
|
-
_function->operator()();
|
|
80
|
-
}
|
|
81
|
-
private:
|
|
82
|
-
std::unique_ptr<std::function<void()>> _function;
|
|
83
|
-
} SWIFT_NONCOPYABLE;
|
|
84
|
-
Func_void create_Func_void(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
85
|
-
inline Func_void_Wrapper wrap_Func_void(Func_void value) noexcept {
|
|
86
|
-
return Func_void_Wrapper(std::move(value));
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// pragma MARK: std::optional<std::function<void()>>
|
|
90
|
-
/**
|
|
91
|
-
* Specialized version of `std::optional<std::function<void()>>`.
|
|
92
|
-
*/
|
|
93
|
-
using std__optional_std__function_void____ = std::optional<std::function<void()>>;
|
|
94
|
-
inline std::optional<std::function<void()>> create_std__optional_std__function_void____(const std::function<void()>& value) noexcept {
|
|
95
|
-
return std::optional<std::function<void()>>(value);
|
|
96
|
-
}
|
|
97
|
-
inline bool has_value_std__optional_std__function_void____(const std::optional<std::function<void()>>& optional) noexcept {
|
|
98
|
-
return optional.has_value();
|
|
99
|
-
}
|
|
100
|
-
inline std::function<void()> get_std__optional_std__function_void____(const std::optional<std::function<void()>>& optional) noexcept {
|
|
101
|
-
return *optional;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// pragma MARK: std::shared_ptr<HybridSegmentSliderSpec>
|
|
105
|
-
/**
|
|
106
|
-
* Specialized version of `std::shared_ptr<HybridSegmentSliderSpec>`.
|
|
107
|
-
*/
|
|
108
|
-
using std__shared_ptr_HybridSegmentSliderSpec_ = std::shared_ptr<HybridSegmentSliderSpec>;
|
|
109
|
-
std::shared_ptr<HybridSegmentSliderSpec> create_std__shared_ptr_HybridSegmentSliderSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
|
|
110
|
-
void* NON_NULL get_std__shared_ptr_HybridSegmentSliderSpec_(std__shared_ptr_HybridSegmentSliderSpec_ cppType);
|
|
111
|
-
|
|
112
|
-
// pragma MARK: std::weak_ptr<HybridSegmentSliderSpec>
|
|
113
|
-
using std__weak_ptr_HybridSegmentSliderSpec_ = std::weak_ptr<HybridSegmentSliderSpec>;
|
|
114
|
-
inline std__weak_ptr_HybridSegmentSliderSpec_ weakify_std__shared_ptr_HybridSegmentSliderSpec_(const std::shared_ptr<HybridSegmentSliderSpec>& strong) noexcept { return strong; }
|
|
115
|
-
|
|
116
|
-
} // namespace margelo::nitro::segmentslider::bridge::swift
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// SegmentSlider-Swift-Cxx-Umbrella.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
// Forward declarations of C++ defined types
|
|
11
|
-
// Forward declaration of `HybridSegmentSliderSpec` to properly resolve imports.
|
|
12
|
-
namespace margelo::nitro::segmentslider { class HybridSegmentSliderSpec; }
|
|
13
|
-
|
|
14
|
-
// Include C++ defined types
|
|
15
|
-
#include "HybridSegmentSliderSpec.hpp"
|
|
16
|
-
#include <functional>
|
|
17
|
-
#include <memory>
|
|
18
|
-
#include <optional>
|
|
19
|
-
#include <string>
|
|
20
|
-
|
|
21
|
-
// C++ helpers for Swift
|
|
22
|
-
#include "SegmentSlider-Swift-Cxx-Bridge.hpp"
|
|
23
|
-
|
|
24
|
-
// Common C++ types used in Swift
|
|
25
|
-
#include <NitroModules/ArrayBufferHolder.hpp>
|
|
26
|
-
#include <NitroModules/AnyMapUtils.hpp>
|
|
27
|
-
#include <NitroModules/RuntimeError.hpp>
|
|
28
|
-
#include <NitroModules/DateToChronoDate.hpp>
|
|
29
|
-
|
|
30
|
-
// Forward declarations of Swift defined types
|
|
31
|
-
// Forward declaration of `HybridSegmentSliderSpec_cxx` to properly resolve imports.
|
|
32
|
-
namespace SegmentSlider { class HybridSegmentSliderSpec_cxx; }
|
|
33
|
-
|
|
34
|
-
// Include Swift defined types
|
|
35
|
-
#if __has_include("SegmentSlider-Swift.h")
|
|
36
|
-
// This header is generated by Xcode/Swift on every app build.
|
|
37
|
-
// If it cannot be found, make sure the Swift module's name (= podspec name) is actually "SegmentSlider".
|
|
38
|
-
#include "SegmentSlider-Swift.h"
|
|
39
|
-
// Same as above, but used when building with frameworks (`use_frameworks`)
|
|
40
|
-
#elif __has_include(<SegmentSlider/SegmentSlider-Swift.h>)
|
|
41
|
-
#include <SegmentSlider/SegmentSlider-Swift.h>
|
|
42
|
-
#else
|
|
43
|
-
#error SegmentSlider's autogenerated Swift header cannot be found! Make sure the Swift module's name (= podspec name) is actually "SegmentSlider", and try building the app first.
|
|
44
|
-
#endif
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// SegmentSliderAutolinking.mm
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#import <Foundation/Foundation.h>
|
|
9
|
-
#import <NitroModules/HybridObjectRegistry.hpp>
|
|
10
|
-
#import "SegmentSlider-Swift-Cxx-Umbrella.hpp"
|
|
11
|
-
#import <type_traits>
|
|
12
|
-
|
|
13
|
-
#include "HybridSegmentSliderSpecSwift.hpp"
|
|
14
|
-
|
|
15
|
-
@interface SegmentSliderAutolinking : NSObject
|
|
16
|
-
@end
|
|
17
|
-
|
|
18
|
-
@implementation SegmentSliderAutolinking
|
|
19
|
-
|
|
20
|
-
+ (void) load {
|
|
21
|
-
using namespace margelo::nitro;
|
|
22
|
-
using namespace margelo::nitro::segmentslider;
|
|
23
|
-
|
|
24
|
-
HybridObjectRegistry::registerHybridObjectConstructor(
|
|
25
|
-
"SegmentSlider",
|
|
26
|
-
[]() -> std::shared_ptr<HybridObject> {
|
|
27
|
-
std::shared_ptr<HybridSegmentSliderSpec> hybridObject = SegmentSlider::SegmentSliderAutolinking::createSegmentSlider();
|
|
28
|
-
return hybridObject;
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
@end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// SegmentSliderAutolinking.swift
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
public final class SegmentSliderAutolinking {
|
|
9
|
-
public typealias bridge = margelo.nitro.segmentslider.bridge.swift
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of a Swift class that implements `HybridSegmentSliderSpec`,
|
|
13
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridSegmentSliderSpec_cxx`)
|
|
14
|
-
*
|
|
15
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
16
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `HybridSegmentSlider`).
|
|
17
|
-
*/
|
|
18
|
-
public static func createSegmentSlider() -> bridge.std__shared_ptr_HybridSegmentSliderSpec_ {
|
|
19
|
-
let hybridObject = HybridSegmentSlider()
|
|
20
|
-
return { () -> bridge.std__shared_ptr_HybridSegmentSliderSpec_ in
|
|
21
|
-
let __cxxWrapped = hybridObject.getCxxWrapper()
|
|
22
|
-
return __cxxWrapped.getCxxPart()
|
|
23
|
-
}()
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// HybridSegmentSliderSpecSwift.cpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#include "HybridSegmentSliderSpecSwift.hpp"
|
|
9
|
-
|
|
10
|
-
namespace margelo::nitro::segmentslider {
|
|
11
|
-
} // namespace margelo::nitro::segmentslider
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// HybridSegmentSliderSpecSwift.hpp
|
|
3
|
-
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
-
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
-
///
|
|
7
|
-
|
|
8
|
-
#pragma once
|
|
9
|
-
|
|
10
|
-
#include "HybridSegmentSliderSpec.hpp"
|
|
11
|
-
|
|
12
|
-
// Forward declaration of `HybridSegmentSliderSpec_cxx` to properly resolve imports.
|
|
13
|
-
namespace SegmentSlider { class HybridSegmentSliderSpec_cxx; }
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
#include <string>
|
|
18
|
-
#include <functional>
|
|
19
|
-
#include <optional>
|
|
20
|
-
|
|
21
|
-
#include "SegmentSlider-Swift-Cxx-Umbrella.hpp"
|
|
22
|
-
|
|
23
|
-
namespace margelo::nitro::segmentslider {
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The C++ part of HybridSegmentSliderSpec_cxx.swift.
|
|
27
|
-
*
|
|
28
|
-
* HybridSegmentSliderSpecSwift (C++) accesses HybridSegmentSliderSpec_cxx (Swift), and might
|
|
29
|
-
* contain some additional bridging code for C++ <> Swift interop.
|
|
30
|
-
*
|
|
31
|
-
* Since this obviously introduces an overhead, I hope at some point in
|
|
32
|
-
* the future, HybridSegmentSliderSpec_cxx can directly inherit from the C++ class HybridSegmentSliderSpec
|
|
33
|
-
* to simplify the whole structure and memory management.
|
|
34
|
-
*/
|
|
35
|
-
class HybridSegmentSliderSpecSwift: public virtual HybridSegmentSliderSpec {
|
|
36
|
-
public:
|
|
37
|
-
// Constructor from a Swift instance
|
|
38
|
-
explicit HybridSegmentSliderSpecSwift(const SegmentSlider::HybridSegmentSliderSpec_cxx& swiftPart):
|
|
39
|
-
HybridObject(HybridSegmentSliderSpec::TAG),
|
|
40
|
-
_swiftPart(swiftPart) { }
|
|
41
|
-
|
|
42
|
-
public:
|
|
43
|
-
// Get the Swift part
|
|
44
|
-
inline SegmentSlider::HybridSegmentSliderSpec_cxx& getSwiftPart() noexcept {
|
|
45
|
-
return _swiftPart;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
public:
|
|
49
|
-
inline size_t getExternalMemorySize() noexcept override {
|
|
50
|
-
return _swiftPart.getMemorySize();
|
|
51
|
-
}
|
|
52
|
-
void dispose() noexcept override {
|
|
53
|
-
_swiftPart.dispose();
|
|
54
|
-
}
|
|
55
|
-
std::string toString() override {
|
|
56
|
-
return _swiftPart.toString();
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
public:
|
|
60
|
-
// Properties
|
|
61
|
-
inline double getValue() noexcept override {
|
|
62
|
-
return _swiftPart.getValue();
|
|
63
|
-
}
|
|
64
|
-
inline void setValue(double value) noexcept override {
|
|
65
|
-
_swiftPart.setValue(std::forward<decltype(value)>(value));
|
|
66
|
-
}
|
|
67
|
-
inline double getMin() noexcept override {
|
|
68
|
-
return _swiftPart.getMin();
|
|
69
|
-
}
|
|
70
|
-
inline void setMin(double min) noexcept override {
|
|
71
|
-
_swiftPart.setMin(std::forward<decltype(min)>(min));
|
|
72
|
-
}
|
|
73
|
-
inline double getMax() noexcept override {
|
|
74
|
-
return _swiftPart.getMax();
|
|
75
|
-
}
|
|
76
|
-
inline void setMax(double max) noexcept override {
|
|
77
|
-
_swiftPart.setMax(std::forward<decltype(max)>(max));
|
|
78
|
-
}
|
|
79
|
-
inline double getSegments() noexcept override {
|
|
80
|
-
return _swiftPart.getSegments();
|
|
81
|
-
}
|
|
82
|
-
inline void setSegments(double segments) noexcept override {
|
|
83
|
-
_swiftPart.setSegments(std::forward<decltype(segments)>(segments));
|
|
84
|
-
}
|
|
85
|
-
inline double getSliderHeight() noexcept override {
|
|
86
|
-
return _swiftPart.getSliderHeight();
|
|
87
|
-
}
|
|
88
|
-
inline void setSliderHeight(double sliderHeight) noexcept override {
|
|
89
|
-
_swiftPart.setSliderHeight(std::forward<decltype(sliderHeight)>(sliderHeight));
|
|
90
|
-
}
|
|
91
|
-
inline bool getDisabled() noexcept override {
|
|
92
|
-
return _swiftPart.getDisabled();
|
|
93
|
-
}
|
|
94
|
-
inline void setDisabled(bool disabled) noexcept override {
|
|
95
|
-
_swiftPart.setDisabled(std::forward<decltype(disabled)>(disabled));
|
|
96
|
-
}
|
|
97
|
-
inline bool getShowBubble() noexcept override {
|
|
98
|
-
return _swiftPart.getShowBubble();
|
|
99
|
-
}
|
|
100
|
-
inline void setShowBubble(bool showBubble) noexcept override {
|
|
101
|
-
_swiftPart.setShowBubble(std::forward<decltype(showBubble)>(showBubble));
|
|
102
|
-
}
|
|
103
|
-
inline bool getCenterOrigin() noexcept override {
|
|
104
|
-
return _swiftPart.getCenterOrigin();
|
|
105
|
-
}
|
|
106
|
-
inline void setCenterOrigin(bool centerOrigin) noexcept override {
|
|
107
|
-
_swiftPart.setCenterOrigin(std::forward<decltype(centerOrigin)>(centerOrigin));
|
|
108
|
-
}
|
|
109
|
-
inline double getEpoch() noexcept override {
|
|
110
|
-
return _swiftPart.getEpoch();
|
|
111
|
-
}
|
|
112
|
-
inline void setEpoch(double epoch) noexcept override {
|
|
113
|
-
_swiftPart.setEpoch(std::forward<decltype(epoch)>(epoch));
|
|
114
|
-
}
|
|
115
|
-
inline std::string getFillColor() noexcept override {
|
|
116
|
-
auto __result = _swiftPart.getFillColor();
|
|
117
|
-
return __result;
|
|
118
|
-
}
|
|
119
|
-
inline void setFillColor(const std::string& fillColor) noexcept override {
|
|
120
|
-
_swiftPart.setFillColor(fillColor);
|
|
121
|
-
}
|
|
122
|
-
inline std::string getTrackColor() noexcept override {
|
|
123
|
-
auto __result = _swiftPart.getTrackColor();
|
|
124
|
-
return __result;
|
|
125
|
-
}
|
|
126
|
-
inline void setTrackColor(const std::string& trackColor) noexcept override {
|
|
127
|
-
_swiftPart.setTrackColor(trackColor);
|
|
128
|
-
}
|
|
129
|
-
inline std::string getThumbColor() noexcept override {
|
|
130
|
-
auto __result = _swiftPart.getThumbColor();
|
|
131
|
-
return __result;
|
|
132
|
-
}
|
|
133
|
-
inline void setThumbColor(const std::string& thumbColor) noexcept override {
|
|
134
|
-
_swiftPart.setThumbColor(thumbColor);
|
|
135
|
-
}
|
|
136
|
-
inline std::string getThumbBorderColor() noexcept override {
|
|
137
|
-
auto __result = _swiftPart.getThumbBorderColor();
|
|
138
|
-
return __result;
|
|
139
|
-
}
|
|
140
|
-
inline void setThumbBorderColor(const std::string& thumbBorderColor) noexcept override {
|
|
141
|
-
_swiftPart.setThumbBorderColor(thumbBorderColor);
|
|
142
|
-
}
|
|
143
|
-
inline std::string getMarkActiveColor() noexcept override {
|
|
144
|
-
auto __result = _swiftPart.getMarkActiveColor();
|
|
145
|
-
return __result;
|
|
146
|
-
}
|
|
147
|
-
inline void setMarkActiveColor(const std::string& markActiveColor) noexcept override {
|
|
148
|
-
_swiftPart.setMarkActiveColor(markActiveColor);
|
|
149
|
-
}
|
|
150
|
-
inline std::string getMarkInactiveColor() noexcept override {
|
|
151
|
-
auto __result = _swiftPart.getMarkInactiveColor();
|
|
152
|
-
return __result;
|
|
153
|
-
}
|
|
154
|
-
inline void setMarkInactiveColor(const std::string& markInactiveColor) noexcept override {
|
|
155
|
-
_swiftPart.setMarkInactiveColor(markInactiveColor);
|
|
156
|
-
}
|
|
157
|
-
inline std::string getMarkBorderColor() noexcept override {
|
|
158
|
-
auto __result = _swiftPart.getMarkBorderColor();
|
|
159
|
-
return __result;
|
|
160
|
-
}
|
|
161
|
-
inline void setMarkBorderColor(const std::string& markBorderColor) noexcept override {
|
|
162
|
-
_swiftPart.setMarkBorderColor(markBorderColor);
|
|
163
|
-
}
|
|
164
|
-
inline std::string getBubbleColor() noexcept override {
|
|
165
|
-
auto __result = _swiftPart.getBubbleColor();
|
|
166
|
-
return __result;
|
|
167
|
-
}
|
|
168
|
-
inline void setBubbleColor(const std::string& bubbleColor) noexcept override {
|
|
169
|
-
_swiftPart.setBubbleColor(bubbleColor);
|
|
170
|
-
}
|
|
171
|
-
inline std::string getBubbleTextColor() noexcept override {
|
|
172
|
-
auto __result = _swiftPart.getBubbleTextColor();
|
|
173
|
-
return __result;
|
|
174
|
-
}
|
|
175
|
-
inline void setBubbleTextColor(const std::string& bubbleTextColor) noexcept override {
|
|
176
|
-
_swiftPart.setBubbleTextColor(bubbleTextColor);
|
|
177
|
-
}
|
|
178
|
-
inline std::optional<std::function<void(double /* value */)>> getOnChange() noexcept override {
|
|
179
|
-
auto __result = _swiftPart.getOnChange();
|
|
180
|
-
return __result;
|
|
181
|
-
}
|
|
182
|
-
inline void setOnChange(const std::optional<std::function<void(double /* value */)>>& onChange) noexcept override {
|
|
183
|
-
_swiftPart.setOnChange(onChange);
|
|
184
|
-
}
|
|
185
|
-
inline std::optional<std::function<void()>> getOnSlideStart() noexcept override {
|
|
186
|
-
auto __result = _swiftPart.getOnSlideStart();
|
|
187
|
-
return __result;
|
|
188
|
-
}
|
|
189
|
-
inline void setOnSlideStart(const std::optional<std::function<void()>>& onSlideStart) noexcept override {
|
|
190
|
-
_swiftPart.setOnSlideStart(onSlideStart);
|
|
191
|
-
}
|
|
192
|
-
inline std::optional<std::function<void()>> getOnSlideComplete() noexcept override {
|
|
193
|
-
auto __result = _swiftPart.getOnSlideComplete();
|
|
194
|
-
return __result;
|
|
195
|
-
}
|
|
196
|
-
inline void setOnSlideComplete(const std::optional<std::function<void()>>& onSlideComplete) noexcept override {
|
|
197
|
-
_swiftPart.setOnSlideComplete(onSlideComplete);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
public:
|
|
201
|
-
// Methods
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
private:
|
|
205
|
-
SegmentSlider::HybridSegmentSliderSpec_cxx _swiftPart;
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
} // namespace margelo::nitro::segmentslider
|